/*
Theme Name: Quick Choices Lab
Theme URI: https://quickchoiceslab.com
Author: Quick Choices Lab
Description: Custom classic theme for Quick Choices Lab, ported from the React prototype. Cream editorial palette with a butter-yellow masthead, amber accents and lilac category pills.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quick-choices-lab
Tags: blog, custom-colors, custom-menu, featured-images, right-sidebar, translation-ready
*/

/* ==========================================================================
   1. Tokens - values transcribed from the prototype's compiled Tailwind v4
   ========================================================================== */

:root {
  /* Palette - the 11 colours that form the system */
  --qcl-cream:     #FFF9EE; /* page background             */
  --qcl-card:      #FFFDF8; /* card / panel surface        */
  --qcl-tan:       #F4E7D3; /* input fill, banded section  */
  --qcl-sand:      #DDC9AD; /* the border colour           */
  --qcl-butter:    #F3C969; /* masthead, footer links      */
  --qcl-amber:     #E89A3D; /* accent + CTA fill           */
  --qcl-lilac:     #C7A6D8; /* category pills              */
  --qcl-taupe:     #796257; /* muted text, meta            */
  --qcl-ink:       #34251F; /* body text                   */
  --qcl-espresso:  #3A261D; /* headings, masthead nav      */
  --qcl-btn-ink:   #2F211B; /* label on amber / lilac      */

  /* Outliers, kept exactly as the prototype used them */
  --qcl-wine:      #6B2C3A; /* About headings, BEAUTY rail */
  --qcl-green:     #2A5E44; /* marquee category label      */
  --qcl-footer:    #4A3025; /* footer background           */
  --qcl-logo-ring: #4A3525; /* logo circle stroke          */
  --qcl-logo-mark: #ECA236; /* logo rays / check / tail    */

  /* Typography - the prototype ships no webfont, so these reproduce
     Tailwind's own default stacks verbatim. */
  --qcl-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
              "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
              "Segoe UI Symbol", "Noto Color Emoji";
  --qcl-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

  /* Type scale */
  --qcl-9:    9px;
  --qcl-10:   10px;
  --qcl-13:   13px;
  --qcl-14:   14px;
  --qcl-xs:    0.75rem;   --qcl-xs-lh:   1.3333333;
  --qcl-sm:    0.875rem;  --qcl-sm-lh:   1.4285714;
  --qcl-base:  1rem;      --qcl-base-lh: 1.5;
  --qcl-lg:    1.125rem;  --qcl-lg-lh:   1.5555556;
  --qcl-xl:    1.25rem;   --qcl-xl-lh:   1.4;
  --qcl-2xl:   1.5rem;    --qcl-2xl-lh:  1.3333333;
  --qcl-3xl:   1.875rem;  --qcl-3xl-lh:  1.2;
  --qcl-4xl:   2.25rem;   --qcl-4xl-lh:  1.1111111;
  --qcl-5xl:   3rem;      --qcl-5xl-lh:  1;

  --qcl-tight: 1.25;
  --qcl-snug: 1.375;
  --qcl-loose: 1.625;

  --qcl-r-md:  0.375rem;
  --qcl-r-lg:  0.5rem;
  --qcl-r-xl:  0.75rem;
  --qcl-r-2xl: 1rem;

  --qcl-shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --qcl-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --qcl-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --qcl-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --qcl-wrap: 80rem;  /* max-w-7xl */
}

/* ==========================================================================
   2. Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

/* Smooth scrolling is driven from JS (window.scrollTo), as in the prototype,
   so it stays opt-in per action rather than applying to every anchor jump. */
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--qcl-cream);
  color: var(--qcl-ink);
  font-family: var(--qcl-sans);
  font-size: var(--qcl-base);
  line-height: var(--qcl-base-lh);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

::selection { background: rgb(232 154 61 / 0.3); color: var(--qcl-espresso); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
}
button { cursor: pointer; }
textarea { resize: vertical; }

h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--qcl-espresso);
  outline-offset: 2px;
}

.qcl-sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.qcl-skip:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 20px; background: var(--qcl-amber);
  color: var(--qcl-btn-ink); border-radius: 9999px;
  font-size: var(--qcl-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

.qcl-wrap {
  width: 100%;
  max-width: var(--qcl-wrap);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px) { .qcl-wrap { padding-inline: 24px; } }
@media (min-width: 1024px) { .qcl-wrap { padding-inline: 32px; } }

.qcl-wrap--5xl { max-width: 64rem; }
.qcl-wrap--4xl { max-width: 56rem; }

.qcl-main { flex: 1 0 auto; }

/* ==========================================================================
   4. Shared atoms
   ========================================================================== */

.qcl-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--qcl-lilac);
  color: var(--qcl-btn-ink);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: var(--qcl-xs-lh);
}
.qcl-pill--sm { padding: 2px 10px; font-size: var(--qcl-10); }
.qcl-pill--xs { padding: 2px 8px; font-size: var(--qcl-9); letter-spacing: 0.05em; }

.qcl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 16px;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-amber);
  color: var(--qcl-btn-ink);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--qcl-shadow-xs);
  transition: background-color .2s, color .2s;
}
.qcl-btn:hover { background: var(--qcl-butter); }
.qcl-btn--block { width: 100%; }
.qcl-btn--pill { border-radius: 9999px; padding: 10px 24px; }
.qcl-btn--sm { padding: 10px 16px; border-radius: var(--qcl-r-lg); }

.qcl-linkish {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--qcl-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--qcl-amber);
  transition: color .2s;
}
.qcl-linkish:hover { color: var(--qcl-espresso); }

.qcl-sechead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--qcl-sand);
}
.qcl-sechead h2 {
  font-size: var(--qcl-2xl);
  line-height: var(--qcl-2xl-lh);
  font-weight: 800;
  color: var(--qcl-ink);
}
@media (min-width: 640px) {
  .qcl-sechead h2 { font-size: var(--qcl-3xl); line-height: var(--qcl-3xl-lh); }
}

/* Card -------------------------------------------------------------------- */

.qcl-card {
  display: flex; flex-direction: column;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-xl);
  padding: 14px;
  box-shadow: var(--qcl-shadow-xs);
  transition: border-color .2s;
}
.qcl-card:hover { border-color: var(--qcl-amber); }

.qcl-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-tan);
  margin-bottom: 12px;
}
.qcl-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.qcl-card:hover .qcl-card__media img { transform: scale(1.05); }
.qcl-card__media .qcl-pill { position: absolute; top: 10px; left: 10px; z-index: 2; }

.qcl-card__title {
  font-size: var(--qcl-xl);
  line-height: var(--qcl-snug);
  font-weight: 700;
  color: var(--qcl-ink);
  margin-bottom: 6px;
  transition: color .2s;
}
.qcl-card:hover .qcl-card__title { color: var(--qcl-amber); }

.qcl-card__excerpt {
  font-size: var(--qcl-sm);
  line-height: var(--qcl-sm-lh);
  color: var(--qcl-taupe);
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.qcl-card__byline { font-size: var(--qcl-xs); color: var(--qcl-taupe); }

.qcl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .qcl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .qcl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ==========================================================================
   5. Masthead
   ========================================================================== */

.qcl-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--qcl-butter);
  border-bottom: 1px solid var(--qcl-sand);
  box-shadow: var(--qcl-shadow-sm);
}
.qcl-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  height: 80px;
}

/* Logo */
.qcl-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.qcl-logo__icon { flex-shrink: 0; width: 48px; height: 48px; }
.qcl-logo__rule { width: 2px; height: 40px; background: rgb(58 38 29 / 0.3); }
.qcl-logo__text {
  display: flex; align-items: center;
  padding-block: 4px;
  white-space: nowrap;
  font-size: var(--qcl-2xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--qcl-espresso);
}
.qcl-logo__accent { color: var(--qcl-logo-mark); }
@media (min-width: 640px) { .qcl-logo__text { font-size: 28px; } }

.qcl-logo--light .qcl-logo__rule { background: rgb(243 201 105 / 0.3); }
.qcl-logo--light .qcl-logo__text { color: var(--qcl-butter); }

/* Desktop nav */
.qcl-nav { display: none; flex-shrink: 0; }
@media (min-width: 1024px) { .qcl-nav { display: block; } }

.qcl-nav__list {
  display: flex;
  align-items: center;
  gap: 24px;          /* prototype: space-x-6 */
  margin: 0;
  padding: 0;
  list-style: none;
}
.qcl-nav__list > li { list-style: none; display: block; }
.qcl-nav__list > li::marker { content: none; }

.qcl-nav a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(58 38 29 / 0.8);
  transition: color .2s, border-color .2s;
}
.qcl-nav a:hover { color: var(--qcl-espresso); border-bottom-color: rgb(58 38 29 / 0.4); }
.qcl-nav .current-menu-item > a,
.qcl-nav .current-menu-parent > a,
.qcl-nav .current-post-ancestor > a,
.qcl-nav a[aria-current="page"] {
  color: var(--qcl-espresso);
  border-bottom-color: var(--qcl-espresso);
}

/* Header actions */
.qcl-header__actions { display: flex; align-items: center; gap: 12px; }

.qcl-search { position: relative; display: flex; align-items: center; }
.qcl-search input {
  width: 144px;
  padding: 8px 32px 8px 36px;
  border-radius: 9999px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  color: var(--qcl-ink);
  box-shadow: var(--qcl-shadow-xs);
  transition: border-color .2s, box-shadow .2s;
}
.qcl-search input::placeholder { color: var(--qcl-taupe); opacity: 1; }
.qcl-search input:focus {
  outline: none;
  border-color: var(--qcl-espresso);
  box-shadow: 0 0 0 1px rgb(58 38 29 / 0.2);
}
.qcl-search__icon {
  position: absolute; left: 12px;
  width: 16px; height: 16px;
  color: var(--qcl-taupe);
  pointer-events: none;
}
@media (min-width: 640px)  { .qcl-search input { width: 192px; } }
@media (min-width: 768px)  { .qcl-search input { width: 224px; } }
@media (min-width: 1024px) { .qcl-search input { width: 176px; } }
@media (min-width: 1280px) { .qcl-search input { width: 224px; } }

.qcl-subscribe-btn {
  display: none;
  align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--qcl-amber);
  border: 1px solid rgb(58 38 29 / 0.2);
  color: var(--qcl-btn-ink);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--qcl-shadow-xs);
  transition: background-color .2s, color .2s;
}
.qcl-subscribe-btn:hover { background: var(--qcl-cream); color: var(--qcl-espresso); }
@media (min-width: 640px) { .qcl-subscribe-btn { display: inline-flex; } }

.qcl-burger {
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  color: var(--qcl-espresso);
}
@media (min-width: 1024px) { .qcl-burger { display: none; } }
.qcl-burger .qcl-icon-close { display: none; }
.qcl-burger.is-open .qcl-icon-open { display: none; }
.qcl-burger.is-open .qcl-icon-close { display: block; }

/* Mobile drawer */
.qcl-drawer {
  display: none;
  background: var(--qcl-butter);
  border-top: 1px solid var(--qcl-sand);
  padding: 12px 16px 24px;
}
.qcl-drawer.is-open { display: block; }
@media (min-width: 1024px) { .qcl-drawer, .qcl-drawer.is-open { display: none; } }

.qcl-drawer__search { position: relative; margin-bottom: 8px; }
.qcl-drawer__search input {
  width: 100%;
  padding: 10px 36px;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  color: var(--qcl-ink);
}
.qcl-drawer__search input::placeholder { color: var(--qcl-taupe); opacity: 1; }
.qcl-drawer__search input:focus { outline: none; border-color: var(--qcl-espresso); }
.qcl-drawer__search .qcl-search__icon { top: 12px; }

.qcl-drawer__list { margin: 0; padding: 0; list-style: none; }
.qcl-drawer__list > li { list-style: none; display: block; }
.qcl-drawer__list > li::marker { content: none; }

.qcl-drawer a {
  display: block;
  padding-block: 8px;
  font-size: var(--qcl-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-espresso);
}
.qcl-drawer .qcl-btn { margin-top: 8px; }

/* ==========================================================================
   6. Footer
   ========================================================================== */

.qcl-footer {
  flex-shrink: 0;
  background: var(--qcl-footer);
  color: var(--qcl-cream);
  border-top: 1px solid var(--qcl-espresso);
  padding-top: 64px;
  padding-bottom: 48px;
}
.qcl-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
@media (min-width: 768px) { .qcl-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.qcl-footer__brand { margin-left: -12px; }
.qcl-footer__brand p {
  margin-top: 16px; margin-left: 12px;
  font-size: var(--qcl-xs);
  line-height: var(--qcl-loose);
  font-weight: 300;
  color: rgb(255 249 238 / 0.8);
}

.qcl-footer h3 {
  margin-bottom: 16px;
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-amber);
}
.qcl-footer__links li + li { margin-top: 12px; }
.qcl-footer__links a {
  font-size: var(--qcl-14);
  font-weight: 500;
  color: var(--qcl-butter);
  transition: color .2s;
}
.qcl-footer__links a:hover { color: var(--qcl-amber); }

.qcl-footer__blurb {
  margin-bottom: 16px;
  font-size: var(--qcl-14);
  line-height: var(--qcl-loose);
  font-weight: 300;
  color: rgb(255 249 238 / 0.8);
}

.qcl-socials { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.qcl-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 9999px;
  background: var(--qcl-tan);
  color: var(--qcl-footer);
  box-shadow: var(--qcl-shadow-sm);
  transition: background-color .2s;
}
.qcl-socials a:hover { background: var(--qcl-butter); }

.qcl-footer__bottom {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 8px;
  padding-top: 32px;
  border-top: 1px solid var(--qcl-espresso);
  font-size: var(--qcl-xs);
  color: rgb(255 249 238 / 0.6);
}
@media (min-width: 640px) { .qcl-footer__bottom { flex-direction: row; } }

/* Newsletter form (footer) */
.qcl-nl { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.qcl-nl input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-espresso);
  border: 1px solid var(--qcl-taupe);
  font-size: var(--qcl-sm);
  color: var(--qcl-cream);
}
.qcl-nl input::placeholder { color: var(--qcl-sand); opacity: 1; }
.qcl-nl input:focus { outline: none; border-color: var(--qcl-amber); }
.qcl-nl button {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-amber);
  color: var(--qcl-btn-ink);
  font-size: var(--qcl-13);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--qcl-shadow-sm);
  transition: background-color .2s;
}
.qcl-nl button:hover { background: var(--qcl-butter); }

.qcl-nl__note {
  padding: 12px;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-espresso);
  border: 1px solid rgb(232 154 61 / 0.5);
  text-align: center;
  font-size: var(--qcl-sm);
  font-weight: 500;
  color: var(--qcl-butter);
}
.qcl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   7. Archive / category header
   ========================================================================== */

.qcl-archive { padding-top: 32px; padding-bottom: 80px; }

.qcl-archive__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--qcl-sand);
}
.qcl-archive__title {
  margin-top: 8px;
  font-size: var(--qcl-3xl);
  line-height: var(--qcl-3xl-lh);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--qcl-ink);
}
@media (min-width: 640px) {
  .qcl-archive__title { font-size: var(--qcl-4xl); line-height: var(--qcl-4xl-lh); }
}
.qcl-archive__sub {
  margin-top: 4px;
  font-size: var(--qcl-sm);
  color: var(--qcl-taupe);
}
.qcl-archive__count {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 9999px;
  background: var(--qcl-tan);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  font-weight: 600;
  color: var(--qcl-taupe);
  white-space: nowrap;
}
.qcl-archive__empty {
  padding: 64px 24px;
  text-align: center;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  color: var(--qcl-taupe);
}

/* Pagination */
.qcl-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.qcl-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding-inline: 12px;
  border-radius: 9999px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--qcl-espresso);
  transition: border-color .2s, background-color .2s;
}
.qcl-pagination .page-numbers:hover { border-color: var(--qcl-amber); }
.qcl-pagination .page-numbers.current {
  background: var(--qcl-amber);
  border-color: var(--qcl-amber);
  color: var(--qcl-btn-ink);
}
.qcl-pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ==========================================================================
   8. Single post
   ========================================================================== */

.qcl-single { padding-block: 48px; }

.qcl-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: var(--qcl-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-taupe);
  transition: color .2s;
}
.qcl-back:hover { color: var(--qcl-amber); }

.qcl-single__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 1024px) {
  .qcl-single__layout { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .qcl-single__main { grid-column: span 8 / span 8; }
  .qcl-single__aside {
    grid-column: span 4 / span 4;
    position: sticky; top: 32px;
    align-self: start;
  }
}

.qcl-single__header { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.qcl-single__title {
  font-size: var(--qcl-3xl);
  line-height: var(--qcl-tight);
  font-family: var(--qcl-serif);
  color: var(--qcl-ink);
}
@media (min-width: 640px)  { .qcl-single__title { font-size: var(--qcl-4xl); } }
@media (min-width: 1024px) { .qcl-single__title { font-size: var(--qcl-5xl); } }

.qcl-single__byline {
  padding-top: 8px;
  font-size: var(--qcl-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-taupe);
}

.qcl-single__figure {
  margin-bottom: 32px;
  overflow: hidden;
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  background: var(--qcl-card);
  box-shadow: var(--qcl-shadow-xs);
}
.qcl-single__figure img { width: 100%; height: 400px; object-fit: cover; }
@media (min-width: 640px) { .qcl-single__figure img { height: 480px; } }

.qcl-lede {
  padding: 16px;
  margin-bottom: 24px;
  border-left: 4px solid var(--qcl-amber);
  border-radius: 0 var(--qcl-r-xl) var(--qcl-r-xl) 0;
  background: rgb(244 231 211 / 0.4);
  font-family: var(--qcl-serif);
  font-size: var(--qcl-xl);
  font-style: italic;
  line-height: var(--qcl-loose);
  color: var(--qcl-espresso);
}

.qcl-prose {
  font-size: var(--qcl-base);
  line-height: var(--qcl-loose);
  color: var(--qcl-ink);
}
@media (min-width: 640px) { .qcl-prose { font-size: var(--qcl-lg); } }
.qcl-prose > * + * { margin-top: 24px; }
.qcl-prose h2 {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-2xl);
  line-height: var(--qcl-tight);
  color: var(--qcl-espresso);
}
.qcl-prose h3 {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-xl);
  line-height: var(--qcl-snug);
  color: var(--qcl-espresso);
}
.qcl-prose a { color: var(--qcl-amber); text-decoration: underline; text-underline-offset: 3px; }
.qcl-prose a:hover { color: var(--qcl-espresso); }
.qcl-prose ul, .qcl-prose ol { padding-left: 24px; }
.qcl-prose ul { list-style: disc; }
.qcl-prose ol { list-style: decimal; }
.qcl-prose li + li { margin-top: 8px; }
.qcl-prose blockquote {
  padding-left: 20px;
  border-left: 4px solid var(--qcl-amber);
  font-family: var(--qcl-serif);
  font-style: italic;
  color: var(--qcl-espresso);
}
.qcl-prose img { border-radius: var(--qcl-r-xl); }
.qcl-prose strong { font-weight: 700; }

.qcl-single__foot {
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--qcl-sand);
}
.qcl-totop {
  font-size: var(--qcl-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-amber);
  transition: color .2s;
}
.qcl-totop:hover { color: var(--qcl-espresso); }

/* Sidebar widgets --------------------------------------------------------- */

.qcl-aside { display: flex; flex-direction: column; gap: 32px; }

.qcl-widget {
  padding: 24px;
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  box-shadow: var(--qcl-shadow-xs);
}
.qcl-widget--tan { background: var(--qcl-tan); }
.qcl-widget--card { background: var(--qcl-card); text-align: center; }

.qcl-widget__head { text-align: center; margin-bottom: 16px; }
.qcl-widget__head h3 {
  margin-top: 6px;
  font-family: var(--qcl-serif);
  font-size: var(--qcl-xl);
  color: var(--qcl-espresso);
}
.qcl-widget__head p {
  margin-top: 6px;
  font-size: var(--qcl-xs);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}

.qcl-sideform { display: flex; flex-direction: column; gap: 12px; }
.qcl-sideform input {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  color: var(--qcl-ink);
}
.qcl-sideform input::placeholder { color: var(--qcl-taupe); opacity: 1; }
.qcl-sideform input:focus { outline: none; border-color: var(--qcl-amber); }
.qcl-sideform button {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-amber);
  color: var(--qcl-btn-ink);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--qcl-shadow-xs);
  transition: background-color .2s;
}
.qcl-sideform button:hover { background: var(--qcl-butter); }

.qcl-sidenote {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-card);
  border: 1px solid rgb(232 154 61 / 0.5);
  font-size: var(--qcl-xs);
  font-weight: 500;
  color: var(--qcl-espresso);
}
.qcl-sidenote svg { color: var(--qcl-amber); flex-shrink: 0; }

.qcl-recent__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--qcl-sand);
}
.qcl-recent__head h3 {
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-espresso);
}
.qcl-recent__dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--qcl-lilac); }

.qcl-recent__list { display: flex; flex-direction: column; gap: 16px; }
.qcl-recent__item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-xl);
  box-shadow: var(--qcl-shadow-xs);
  transition: border-color .2s;
}
.qcl-recent__item:hover { border-color: var(--qcl-amber); }
.qcl-recent__item img {
  width: 80px; height: 80px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--qcl-r-lg);
  background: var(--qcl-tan);
}
.qcl-recent__body { overflow: hidden; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.qcl-recent__title {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-xs);
  font-weight: 700;
  color: var(--qcl-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.qcl-recent__item:hover .qcl-recent__title { color: var(--qcl-amber); }

.qcl-author__kicker {
  font-size: var(--qcl-10);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-taupe);
}
.qcl-author__avatar {
  width: 80px; height: 80px;
  margin: 16px auto;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid var(--qcl-sand);
}
.qcl-author__name {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-lg);
  font-weight: 700;
  color: var(--qcl-ink);
  margin-bottom: 16px;
}
.qcl-author__bio {
  font-size: var(--qcl-xs);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}

/* ==========================================================================
   9. Contact
   ========================================================================== */

.qcl-page { padding-block: 48px; }

.qcl-page__head { max-width: 42rem; margin: 0 auto 48px; text-align: center; }
.qcl-page__head .qcl-pill { margin-bottom: 12px; }
.qcl-page__title {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-4xl);
  font-weight: 700;
  color: var(--qcl-espresso);
}
@media (min-width: 640px) { .qcl-page__title { font-size: var(--qcl-5xl); line-height: var(--qcl-5xl-lh); } }
.qcl-page__head p {
  margin-top: 12px;
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}

.qcl-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .qcl-contact { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .qcl-contact__media { grid-column: span 5 / span 5; display: flex; flex-direction: column; }
  .qcl-contact__panel { grid-column: span 7 / span 7; }
}
.qcl-contact__media > div {
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  background: var(--qcl-card);
  box-shadow: var(--qcl-shadow-xs);
}
.qcl-contact__media img { width: 100%; height: 100%; min-height: 400px; object-fit: cover; }

.qcl-contact__panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  box-shadow: var(--qcl-shadow-xs);
}
@media (min-width: 640px) { .qcl-contact__panel { padding: 40px; } }

.qcl-form { display: flex; flex-direction: column; gap: 24px; }
.qcl-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px) { .qcl-form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.qcl-field { display: flex; flex-direction: column; gap: 8px; }
.qcl-field label {
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--qcl-espresso);
}
.qcl-field input,
.qcl-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-tan);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  line-height: var(--qcl-loose);
  color: var(--qcl-ink);
}
.qcl-field input::placeholder,
.qcl-field textarea::placeholder { color: var(--qcl-taupe); opacity: 1; }
.qcl-field input:focus,
.qcl-field textarea:focus { outline: none; border-color: var(--qcl-amber); }

.qcl-notice {
  padding: 32px;
  text-align: center;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-tan);
  border: 1px solid rgb(232 154 61 / 0.4);
}
.qcl-notice svg { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--qcl-amber); }
.qcl-notice h3 {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-2xl);
  font-weight: 700;
  color: var(--qcl-espresso);
}
.qcl-notice p {
  max-width: 28rem;
  margin: 16px auto 0;
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}
.qcl-notice .qcl-btn { margin-top: 16px; }
.qcl-notice--error { background: var(--qcl-card); border-color: var(--qcl-wine); }
.qcl-notice--error h3 { color: var(--qcl-wine); }

/* ==========================================================================
   10. Legal
   ========================================================================== */

.qcl-legal { padding-block: 48px; }

.qcl-legal__tabs {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px;
  padding-bottom: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--qcl-sand);
}
.qcl-legal__tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--qcl-espresso);
  transition: border-color .2s, background-color .2s, color .2s;
}
.qcl-legal__tab:hover { border-color: var(--qcl-amber); }
.qcl-legal__tab.is-active {
  background: var(--qcl-amber);
  border-color: var(--qcl-amber);
  color: var(--qcl-btn-ink);
  box-shadow: var(--qcl-shadow-xs);
}

.qcl-legal__panel {
  padding: 32px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  box-shadow: var(--qcl-shadow-xs);
}
@media (min-width: 640px) { .qcl-legal__panel { padding: 48px; } }

.qcl-legal__title {
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--qcl-sand);
  font-family: var(--qcl-serif);
  font-size: var(--qcl-3xl);
  font-weight: 700;
  color: var(--qcl-espresso);
}
@media (min-width: 640px) { .qcl-legal__title { font-size: var(--qcl-4xl); } }

.qcl-legal__body {
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  color: var(--qcl-ink);
}
@media (min-width: 640px) { .qcl-legal__body { font-size: var(--qcl-base); } }
.qcl-legal__body > * + * { margin-top: 24px; }
.qcl-legal__body a { color: var(--qcl-amber); text-decoration: underline; text-underline-offset: 3px; }

.qcl-legal__foot {
  display: flex; align-items: center; justify-content: flex-end;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--qcl-sand);
  font-size: var(--qcl-xs);
  color: var(--qcl-taupe);
}
.qcl-legal__foot a {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qcl-legal__foot a:hover { color: var(--qcl-amber); }

/* ==========================================================================
   11. Generic page + About
   ========================================================================== */

.qcl-basic { padding-block: 48px; }
@media (min-width: 640px) { .qcl-basic { padding-block: 64px; } }

.qcl-basic__head { text-align: center; margin-bottom: 48px; }
.qcl-basic__kicker {
  font-size: var(--qcl-10);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qcl-green);
}
.qcl-basic__title {
  margin-top: 8px;
  font-size: var(--qcl-3xl);
  line-height: var(--qcl-3xl-lh);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--qcl-wine);
}
@media (min-width: 640px) { .qcl-basic__title { font-size: var(--qcl-4xl); line-height: var(--qcl-4xl-lh); } }

.qcl-basic__body { max-width: 48rem; margin-inline: auto; }
.qcl-basic__body > * + * { margin-top: 32px; }
.qcl-basic__body h2 {
  margin-bottom: 10px;
  font-size: var(--qcl-lg);
  line-height: var(--qcl-lg-lh);
  font-weight: 700;
  color: var(--qcl-wine);
}
.qcl-basic__body h2 + p { margin-top: 0; }
.qcl-basic__body p {
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}
@media (min-width: 640px) { .qcl-basic__body p { font-size: var(--qcl-base); } }
.qcl-basic__body ul, .qcl-basic__body ol { padding-left: 24px; color: var(--qcl-taupe); }
.qcl-basic__body ul { list-style: disc; }
.qcl-basic__body ol { list-style: decimal; }
.qcl-basic__body a { color: var(--qcl-amber); text-decoration: underline; text-underline-offset: 3px; }

.qcl-figrow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (min-width: 768px) { .qcl-figrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qcl-figrow figure {
  height: 256px;
  padding: 8px;
  background: #FFFFFF;
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  box-shadow: var(--qcl-shadow-sm);
}
@media (min-width: 640px) { .qcl-figrow figure { height: 288px; } }
.qcl-figrow img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--qcl-r-xl); }

/* ==========================================================================
   12. 404
   ========================================================================== */

.qcl-404 { padding-block: 96px; text-align: center; }
.qcl-404 h1 {
  font-family: var(--qcl-serif);
  font-size: var(--qcl-5xl);
  line-height: var(--qcl-5xl-lh);
  color: var(--qcl-espresso);
  margin-bottom: 16px;
}
.qcl-404 p {
  max-width: 36rem;
  margin: 0 auto 32px;
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  color: var(--qcl-taupe);
}

/* ==========================================================================
   13. Subscribe modal
   ========================================================================== */

.qcl-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.qcl-modal__scrim {
  position: absolute; inset: 0;
  background: rgb(58 38 29 / 0.6);
  backdrop-filter: blur(4px);
}
.qcl-modal__panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  padding: 32px;
  background: var(--qcl-card);
  border: 1px solid var(--qcl-sand);
  border-radius: var(--qcl-r-2xl);
  box-shadow: var(--qcl-shadow-xl);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.qcl-modal__close {
  position: absolute; top: 16px; right: 16px;
  color: var(--qcl-taupe);
  transition: color .2s;
}
.qcl-modal__close:hover { color: var(--qcl-amber); }

.qcl-modal__head { text-align: center; margin-bottom: 24px; }
.qcl-modal__head .qcl-pill { background: rgb(199 166 216 / 0.2); color: var(--qcl-espresso); }
.qcl-modal__head h3 {
  margin-top: 8px;
  font-family: var(--qcl-serif);
  font-size: var(--qcl-2xl);
  color: var(--qcl-espresso);
}
.qcl-modal__head p {
  margin-top: 8px;
  font-size: var(--qcl-sm);
  line-height: var(--qcl-loose);
  font-weight: 300;
  color: var(--qcl-taupe);
}

.qcl-modal__form { display: flex; flex-direction: column; gap: 16px; }

.qcl-modal__done {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 16px;
  border-radius: var(--qcl-r-xl);
  background: var(--qcl-tan);
  border: 1px solid rgb(232 154 61 / 0.4);
  font-size: var(--qcl-sm);
  font-weight: 500;
  color: var(--qcl-espresso);
}
.qcl-modal__done svg { color: var(--qcl-amber); flex-shrink: 0; }
.qcl-modal__done.is-error { border-color: var(--qcl-wine); color: var(--qcl-wine); }
.qcl-modal__done.is-error svg { display: none; }

body.qcl-modal-open { overflow: hidden; }

/* Search: the query itself is amber serif italic, per the prototype. */
.qcl-archive__query {
  font-family: var(--qcl-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--qcl-amber);
}

/* ==========================================================================
   14. Narrow-viewport masthead
   
   The prototype pins the logo (shrink-0) next to a fixed 144px search field
   and the burger, which together exceed 375px: the burger gets crushed to
   ~16px and the search runs past the bar. Below sm the drawer already
   carries its own full-width search, so the masthead drops its copy and
   the wordmark is allowed to shrink. Nothing above 640px changes.
   ========================================================================== */

@media (max-width: 639px) {
  .qcl-header__bar { gap: 12px; }

  .qcl-header .qcl-search { display: none; }

  .qcl-logo { min-width: 0; flex-shrink: 1; }
  .qcl-logo__text {
    font-size: var(--qcl-xl);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .qcl-burger { flex-shrink: 0; margin-left: auto; }
}

/* The burger is a real 40px target at every width. */
.qcl-burger { flex: 0 0 auto; min-width: 40px; min-height: 40px; }
