/*
Theme Name: quotesby — Editorial
Theme URI: https://quotesby.net/
Description: Premium, lightweight editorial theme for QuotesBy.net. Presentation only — all routing, data and SEO remain owned by the quotesby-core plugin. Deactivating this theme falls back to the plugin's own templates.
Author: QuotesBy
Version: 1.0.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: quotesby-editorial
*/

/* ============================================================ FONTS ===== */
/* Self-hosted, latin subset, variable. First-party so there is no third-party
   connection on the critical path. swap keeps text visible immediately. */
@font-face{
  font-family:'Inter';
  src:url('assets/fonts/inter-latin-var.woff2') format('woff2');
  font-weight:400 600;font-style:normal;font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Source Serif 4';
  src:url('assets/fonts/source-serif-4-latin-var.woff2') format('woff2');
  font-weight:400 600;font-style:normal;font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* =========================================================== TOKENS ===== */
:root{
  --bg:#FFFDF8;
  --fg:#17211B;
  --card:#F2EEE5;
  --line:#E3DDD2;

  /* Brand accents. The spec's terracotta and sage are kept for decorative and
     large-format use, where they meet the 3:1 non-text threshold. Text-weight
     variants are darkened so link and metadata copy clears 4.5:1 on cream. */
  --accent:#D97852;          /* decorative: quote marks, rules, markers  3.06:1 */
  --accent-text:#A94E2B;     /* accent text and links                    5.42:1 */
  --accent-soft:rgba(217,120,82,.13);
  --sage:#718477;            /* decorative                               3.92:1 */
  --sage-text:#55655B;       /* secondary metadata text                  6.08:1 */

  --muted:#55655B;
  --focus:#A94E2B;

  --ui:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  --serif:'Source Serif 4',Georgia,'Iowan Old Style','Times New Roman',serif;

  --w:1140px;          /* page container */
  --w-read:38rem;      /* comfortable reading measure */
  --r:10px;            /* the one corner radius */
  --pad:clamp(1rem,4vw,1.75rem);
}

/* Dark mode: a re-tuned palette, not an inversion. Cream warmth is preserved
   in the text; the accent is lightened so it stays legible on near-black. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#171A17;
    --fg:#F4F0E8;
    --card:#222821;
    --line:#2E362F;
    --accent:#E89A72;
    --accent-text:#E89A72;      /* 7.77:1 on dark bg */
    --accent-soft:rgba(232,154,114,.14);
    --sage:#9FB3A5;
    --sage-text:#A8BBAD;        /* 8.67:1 */
    --muted:#A8BBAD;
    --focus:#E89A72;
  }
}
:root[data-theme="dark"]{
  --bg:#171A17;
  --fg:#F4F0E8;
  --card:#222821;
  --line:#2E362F;
  --accent:#E89A72;
  --accent-text:#E89A72;
  --accent-soft:rgba(232,154,114,.14);
  --sage:#9FB3A5;
  --sage-text:#A8BBAD;
  --muted:#A8BBAD;
  --focus:#E89A72;
}

/* ============================================================= BASE ===== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--fg);
  font:400 1rem/1.6 var(--ui);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-wrap:break-word;
}
img{max-width:100%;height:auto}
a{color:var(--accent-text);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:2px}
h1,h2,h3{margin:0;font-weight:600;letter-spacing:-.015em;line-height:1.22}
p{margin:0}
ul,ol{margin:0;padding:0;list-style:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:where(a,button,[tabindex]):focus-visible{
  outline:2px solid var(--focus);outline-offset:3px;border-radius:3px;
}
.qb-skip{
  position:absolute;top:0;left:0;z-index:100;
  background:var(--fg);color:var(--bg);padding:.7rem 1.1rem;border-radius:0 0 var(--r) 0;
  transform:translateY(-120%);
}
.qb-skip:focus{transform:translateY(0)}
.qb-sep{margin:0 .45em;color:var(--sage);opacity:.7}
.qb-visually-hidden{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* =========================================================== LAYOUT ===== */
.qb-shell{max-width:var(--w);margin:0 auto;padding:0 var(--pad) 4rem}
.qb-main{padding-top:1.5rem}
.qb-narrow{max-width:var(--w-read)}

/* Content + rail. Single column on mobile; the rail is supporting material,
   so it follows the content in source order and never pushes it down. */
.qb-cols{display:grid;gap:2.5rem}
@media (min-width:62rem){
  .qb-cols{grid-template-columns:minmax(0,1fr) 17rem;gap:3.5rem;align-items:start}
  .qb-rail{position:sticky;top:1.5rem}
}

/* =========================================================== HEADER ===== */
.qb-header{border-bottom:1px solid var(--line);background:var(--bg)}
.qb-header__inner{
  max-width:var(--w);margin:0 auto;padding:0 var(--pad);
  display:flex;align-items:center;gap:1rem;flex-wrap:wrap;min-height:60px;
}
.qb-brand{
  display:inline-flex;align-items:baseline;gap:.12em;
  font-family:var(--ui);font-weight:600;font-size:1.2rem;letter-spacing:-.02em;
  color:var(--fg);text-decoration:none;padding:1rem 0;margin-right:auto;
}
.qb-brand:hover{text-decoration:none}
.qb-brand__mark{
  font-family:var(--serif);color:var(--accent);
  font-size:1.55em;line-height:0;position:relative;top:.12em;
}
/* Drawn in CSS, not as a text node: a text node put a stray " into the
   extracted text of every page. */
.qb-brand__mark::before{content:'\201C'}
.qb-brand--static{padding:0}

.qb-navbtn{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.55rem .7rem;margin:.4rem 0;border-radius:var(--r);
  font-size:.9rem;font-weight:500;color:var(--fg);
  min-height:44px;
}
.qb-navbtn:hover{background:var(--card)}

.qb-nav{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}
.qb-nav ul{display:flex;align-items:center;gap:.15rem;flex-wrap:wrap}
.qb-nav a{
  display:block;padding:.6rem .75rem;border-radius:var(--r);
  color:var(--fg);font-size:.925rem;font-weight:500;
}
.qb-nav a:hover{background:var(--card);text-decoration:none;color:var(--accent-text)}
.qb-nav a[aria-current="page"]{color:var(--accent-text);background:var(--accent-soft)}

.qb-theme{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:var(--r);color:var(--muted);
}
.qb-theme:hover{background:var(--card);color:var(--fg)}
.qb-theme__moon{display:none}
:root[data-theme="dark"] .qb-theme__sun{display:none}
:root[data-theme="dark"] .qb-theme__moon{display:block}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-theme__sun{display:none}
  :root:not([data-theme="light"]) .qb-theme__moon{display:block}
}

/* Collapsed mobile nav is opt-in: the class is added by JS, so with scripting
   off the navigation stays fully visible rather than becoming unreachable. */
@media (max-width:47.99rem){
  .qb-header--js .qb-nav{
    display:none;width:100%;order:3;
    padding-bottom:.75rem;border-top:1px solid var(--line);padding-top:.5rem;
  }
  .qb-header--js .qb-nav[data-open="true"]{display:block}
  .qb-header--js .qb-nav ul{display:block}
  .qb-header--js .qb-nav a{padding:.8rem .6rem;font-size:1rem}
  .qb-header--js .qb-theme{margin:.35rem .35rem 0}
}
@media (min-width:48rem){
  .qb-navbtn{display:none!important}
}

/* ============================================================= HERO ===== */
.qb-hero{padding:clamp(2.25rem,7vw,4rem) 0 clamp(1.5rem,4vw,2.5rem);max-width:44rem}
.qb-hero h1{
  font-family:var(--serif);font-weight:600;
  font-size:clamp(2.1rem,7.2vw,3.4rem);line-height:1.1;letter-spacing:-.025em;
  margin-bottom:.85rem;
}
.qb-hero p{
  font-size:clamp(1.02rem,2.4vw,1.16rem);line-height:1.62;
  color:var(--muted);max-width:34rem;
}
.qb-hero__browse{
  display:flex;flex-wrap:wrap;gap:.5rem;margin-top:1.6rem;
}
.qb-btn{
  display:inline-flex;align-items:center;gap:.45rem;
  min-height:44px;padding:.7rem 1.1rem;border-radius:var(--r);
  font-size:.94rem;font-weight:500;border:1px solid var(--line);
  color:var(--fg);background:var(--bg);
  transition:background .15s ease,border-color .15s ease;
}
.qb-btn:hover{background:var(--card);text-decoration:none;border-color:var(--sage)}
.qb-btn--primary{
  background:var(--accent-text);border-color:var(--accent-text);color:#FFFDF8;
}
.qb-btn--primary:hover{background:var(--fg);border-color:var(--fg);color:#FFFDF8}
:root[data-theme="dark"] .qb-btn--primary{color:#171A17}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-btn--primary{color:#171A17}
}

/* ==================================================== SECTION HEADS ===== */
.qb-sect{margin-top:clamp(2.5rem,6vw,3.75rem)}
.qb-shead{
  display:flex;align-items:baseline;justify-content:space-between;gap:1rem;
  padding-bottom:.6rem;margin-bottom:1.25rem;border-bottom:1px solid var(--line);
}
.qb-shead h2{
  font-size:.815rem;font-weight:600;text-transform:uppercase;
  letter-spacing:.1em;color:var(--sage-text);
}
.qb-shead__more{font-size:.875rem;font-weight:500;white-space:nowrap}
.qb-page-h1{
  font-family:var(--serif);font-weight:600;
  font-size:clamp(1.85rem,5.2vw,2.6rem);line-height:1.14;letter-spacing:-.022em;
  margin-bottom:.5rem;
}
.qb-lede{font-size:1.02rem;line-height:1.65;color:var(--muted);max-width:var(--w-read)}
.qb-meta{
  font-size:.875rem;color:var(--muted);margin-top:.35rem;
}

/* ====================================================== QUOTE BLOCK ===== */
/* The quote is the design. No card chrome, no shadow — a hairline rule and
   generous space do the separating. */
.qb-q{margin:0;padding:0}
.qb-q__quote{margin:0;position:relative}
.qb-q__text{
  font-family:var(--serif);font-weight:400;
  font-size:1.24rem;line-height:1.56;letter-spacing:-.006em;
  color:var(--fg);
}
@media (min-width:48rem){ .qb-q__text{font-size:1.3rem;line-height:1.55} }
.qb-q__text a{color:inherit;text-decoration:none}
.qb-q__text a:hover{color:var(--accent-text);text-decoration:none}
.qb-q__text::before{content:'\201C'}
.qb-q__text::after{content:'\201D'}

.qb-q__meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;
  margin-top:.35rem;font-size:.875rem;color:var(--muted);
}
.qb-q__cite{font-style:normal;font-weight:500}
.qb-q__cite a{color:var(--fg)}
.qb-q__cite a:hover{color:var(--accent-text)}
.qb-q__dash{color:var(--accent)}
.qb-q__source{font-style:italic;color:var(--sage-text)}
.qb-q__perma{
  color:var(--sage-text);font-variant-numeric:tabular-nums;font-size:.8rem;
  margin-left:auto;
}
.qb-q__note{
  margin-top:.5rem;font-size:.82rem;color:var(--sage-text);
  padding-left:.7rem;border-left:2px solid var(--line);
}
.qb-q__topics{margin-top:.6rem;font-size:.85rem}
.qb-q__topics a{color:var(--sage-text)}
.qb-q__topics a:hover{color:var(--accent-text)}

/* Lead: the featured quote and the single-quote page. */
.qb-q--lead .qb-q__text{
  font-size:clamp(1.45rem,4.4vw,2.05rem);line-height:1.36;letter-spacing:-.017em;
}
.qb-q--lead .qb-q__meta{margin-top:1rem;font-size:.95rem}
.qb-q--lead{max-width:34rem}

/* Compact: dense related/sibling lists. */
.qb-q--compact .qb-q__text{font-size:1rem;line-height:1.5}
.qb-q--compact .qb-q__meta{margin-top:.35rem;font-size:.8rem}

/* A quote list: hairline separators only. */
.qb-qlist > li{padding:1.05rem 0;border-top:1px solid var(--line)}
.qb-qlist > li:first-child{border-top:0;padding-top:.25rem}
.qb-qlist--tight > li{padding:.85rem 0}

/* The featured quote gets the one piece of ornament on the site. */
.qb-feature{
  position:relative;padding:clamp(1.75rem,5vw,2.5rem) 0 clamp(1.5rem,4vw,2rem);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
}
.qb-feature__mark{
  font-family:var(--serif);font-size:clamp(4rem,13vw,6.5rem);line-height:.72;
  color:var(--accent);opacity:.22;display:block;height:.42em;overflow:hidden;
  margin-bottom:.3rem;user-select:none;
}

/* ====================================================== QUOTE ACTIONS === */
.qb-q__actions{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1.1rem}
.qb-act{
  display:inline-flex;align-items:center;gap:.4rem;
  min-height:40px;padding:.5rem .85rem;border-radius:var(--r);
  border:1px solid var(--line);font-size:.85rem;font-weight:500;color:var(--muted);
  transition:background .15s ease,color .15s ease,border-color .15s ease;
}
.qb-act:hover{background:var(--card);color:var(--fg);border-color:var(--sage)}
.qb-act[data-done="true"]{
  color:var(--accent-text);border-color:var(--accent);background:var(--accent-soft);
}
.qb-act svg{flex:none}

/* ============================================================ PILLS ===== */
.qb-pills{display:flex;flex-wrap:wrap;gap:.45rem}
.qb-pill{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.5rem .8rem;min-height:40px;border-radius:var(--r);
  background:var(--card);color:var(--fg);
  font-size:.9rem;font-weight:500;
  transition:background .15s ease,color .15s ease;
}
.qb-pill:hover{background:var(--accent-soft);color:var(--accent-text);text-decoration:none}
.qb-pill__n{
  font-size:.75rem;color:var(--sage-text);font-variant-numeric:tabular-nums;
}
.qb-pill--lg{font-size:.98rem;padding:.65rem 1rem;min-height:46px}

/* ============================================================ CARDS ===== */
.qb-grid{display:grid;gap:.4rem;grid-template-columns:1fr}
@media (min-width:26rem){.qb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:48rem){.qb-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:62rem){.qb-grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}}

.qb-acard{
  display:flex;align-items:baseline;justify-content:space-between;gap:.6rem;
  padding:.7rem .8rem;border-radius:var(--r);min-height:44px;
  color:var(--fg);transition:background .15s ease;
}
.qb-acard:hover{background:var(--card);text-decoration:none}
.qb-acard__name{font-weight:500;font-size:.95rem}
.qb-acard:hover .qb-acard__name{color:var(--accent-text)}
.qb-acard__n{
  font-size:.76rem;color:var(--sage-text);white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

/* Plain link lists for long author rosters. */
.qb-linklist{columns:1;column-gap:2rem}
@media (min-width:34rem){.qb-linklist{columns:2}}
@media (min-width:62rem){.qb-linklist{columns:3}}
.qb-linklist li{break-inside:avoid;padding:.42rem 0}
.qb-linklist a{color:var(--fg);font-size:.95rem}
.qb-linklist a:hover{color:var(--accent-text)}
.qb-linklist .qb-n{color:var(--sage-text);font-size:.78rem;margin-left:.35rem;font-variant-numeric:tabular-nums}

/* ====================================================== BREADCRUMBS ===== */
.qb-crumbs{font-size:.82rem;color:var(--muted);margin-bottom:1rem}
.qb-crumbs ol{display:flex;flex-wrap:wrap;align-items:center;gap:.1rem}
.qb-crumbs li{display:flex;align-items:center}
.qb-crumbs li+li::before{
  content:'/';margin:0 .5rem;color:var(--line);
}
.qb-crumbs a{color:var(--muted)}
.qb-crumbs a:hover{color:var(--accent-text)}
.qb-crumbs [aria-current]{color:var(--fg);font-weight:500}

/* ============================================================= RAIL ===== */
.qb-rail{font-size:.9rem}
.qb-mod{margin-bottom:2rem}
.qb-mod h2{
  font-size:.755rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;
  color:var(--sage-text);padding-bottom:.5rem;margin-bottom:.75rem;
  border-bottom:1px solid var(--line);
}
.qb-mod li{padding:.36rem 0}
.qb-mod a{color:var(--fg)}
.qb-mod a:hover{color:var(--accent-text)}
.qb-mod__q{display:block;font-family:var(--serif);font-size:.95rem;line-height:1.45}
.qb-mod__by{display:block;font-size:.78rem;color:var(--sage-text);margin-top:.15rem}

/* ========================================================= ADJACENT ===== */
.qb-adjacent{
  display:flex;flex-wrap:wrap;gap:.75rem 1.5rem;justify-content:space-between;
  margin-top:2.5rem;padding-top:1.25rem;border-top:1px solid var(--line);
  font-size:.9rem;
}
.qb-adjacent a{color:var(--fg)}
.qb-adjacent a:hover{color:var(--accent-text)}

/* ======================================================== ALPHABET ====== */
.qb-alpha{display:flex;flex-wrap:wrap;gap:.35rem}
.qb-alpha a,.qb-alpha strong{
  display:inline-flex;align-items:center;justify-content:center;gap:.3rem;
  min-width:44px;min-height:44px;padding:.5rem .6rem;border-radius:var(--r);
  background:var(--card);color:var(--fg);font-size:.92rem;font-weight:500;
}
.qb-alpha a:hover{background:var(--accent-soft);color:var(--accent-text);text-decoration:none}
.qb-alpha strong{background:var(--accent-text);color:#FFFDF8}
:root[data-theme="dark"] .qb-alpha strong{color:#171A17}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-alpha strong{color:#171A17}
}
.qb-alpha .qb-n{font-size:.7rem;color:var(--sage-text);font-variant-numeric:tabular-nums}
.qb-alpha a:hover .qb-n{color:inherit}
.qb-alpha strong .qb-n{color:inherit;opacity:.75}

/* =========================================================== FOOTER ===== */
.qb-footer{border-top:1px solid var(--line);background:var(--card)}
.qb-footer__inner{
  max-width:var(--w);margin:0 auto;padding:2.75rem var(--pad) 1.75rem;
  display:grid;gap:2rem;
}
@media (min-width:40rem){
  .qb-footer__inner{grid-template-columns:1.4fr 1fr 1fr}
}
.qb-footer__tag{
  font-family:var(--serif);font-size:1.06rem;color:var(--fg);margin-top:.5rem;
}
.qb-footer__note{font-size:.85rem;color:var(--muted);margin-top:.4rem;max-width:22rem}
.qb-footer__nav h2{
  font-size:.755rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;
  color:var(--sage-text);margin-bottom:.7rem;
}
.qb-footer__nav li{padding:.3rem 0}
.qb-footer__nav a{color:var(--fg);font-size:.9rem}
.qb-footer__nav a:hover{color:var(--accent-text)}
.qb-footer__legal{
  max-width:var(--w);margin:0 auto;padding:1rem var(--pad) 2rem;
  font-size:.8rem;color:var(--muted);border-top:1px solid var(--line);
}

/* ========================================================== NOTICES ===== */
.qb-notice{
  max-width:var(--w-read);margin:clamp(2rem,8vw,4rem) 0;
}
.qb-notice h1{
  font-family:var(--serif);font-size:clamp(1.7rem,5vw,2.3rem);
  line-height:1.16;margin-bottom:.75rem;
}
.qb-notice p{color:var(--muted);margin-bottom:1rem;line-height:1.65}

/* ==================================================== REDUCED MOTION ==== */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}


/* ================================================== TAP TARGET SIZING ===
   WCAG 2.5.8 (AA) asks for 24x24 CSS px on interactive targets. These links
   are navigation, not inline prose, so none of them qualify for the inline
   exception — they are padded to clear the threshold without changing the
   visual rhythm. */
.qb-crumbs a,.qb-crumbs [aria-current]{
  display:inline-block;padding:.28rem 0;min-height:24px;
}
.qb-mod li a,
.qb-footer__nav li a,
.qb-linklist a{
  display:inline-block;padding:.3rem 0;min-height:24px;
}
.qb-mod li,.qb-footer__nav li{padding:.1rem 0}
.qb-linklist li{padding:.2rem 0}
.qb-adjacent a{display:inline-block;padding:.3rem 0;min-height:26px}
.qb-q__perma{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:26px;min-height:24px;padding:0 .3rem;margin-left:auto;
}
.qb-q__cite a,.qb-q__topics a{
  display:inline-block;padding:.22rem 0;min-height:24px;
}

.qb-shead__more{display:inline-block;padding:.25rem 0;min-height:24px}
/* Compact quote links are the tap target for the whole line; 1.55 puts the
   line box over the 24px threshold without loosening the dense list. */
.qb-q--compact .qb-q__text{line-height:1.55}
/* The quote text link stays inline: as an inline-block it pushed the typographic
   quote marks (the ::before/::after on .qb-q__text) onto their own lines. Line
   height already carries these links past the 24px target threshold. */

span.qb-q__perma{color:var(--sage-text);opacity:.75}
/* The serial carries the permalink, so it reads as a link rather than as
   muted metadata. */
a.qb-q__perma{color:var(--accent-text);font-weight:500}
a.qb-q__perma:hover{background:var(--accent-soft);text-decoration:none;border-radius:6px}

/* Vertical padding on the inline link grows the hit area past 24px without
   turning it into a block box (which would wrap the quote marks). */
.qb-q__text a{padding:.2rem 0}

/* The topic page's author pills run to several hundred on the biggest topics,
   so they are set a little tighter than topic pills. */
.qb-pills--authors .qb-pill{font-size:.875rem;padding:.45rem .7rem;min-height:38px}

/* Network share links. Muted by default so the quote stays the focus; each
   picks up its own colour only on hover. */
.qb-act--net svg{opacity:.8}
.qb-act--whatsapp:hover{color:#1d7c4d;border-color:#1d7c4d}
.qb-act--x:hover{color:var(--fg);border-color:var(--fg)}
.qb-act--facebook:hover{color:#1b55a8;border-color:#1b55a8}
:root[data-theme="dark"] .qb-act--whatsapp:hover{color:#57d98a;border-color:#57d98a}
:root[data-theme="dark"] .qb-act--facebook:hover{color:#7fb0f2;border-color:#7fb0f2}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-act--whatsapp:hover{color:#57d98a;border-color:#57d98a}
  :root:not([data-theme="light"]) .qb-act--facebook:hover{color:#7fb0f2;border-color:#7fb0f2}
}

/* One quiet control per quote, sitting inside the caption row beside the
   serial so it costs no extra vertical space. On pointer devices it fades in
   with the quote; on touch and for keyboard users it is simply always there. */
.qb-q__actions--compact{
  display:inline-flex;gap:.25rem;margin:0 0 0 auto;order:8;
}
.qb-q__actions--compact + .qb-q__perma{margin-left:.15rem}
.qb-q__actions--compact .qb-act{
  min-height:26px;padding:.2rem .5rem;font-size:.76rem;
  border-color:transparent;color:var(--sage-text);
}
.qb-q__actions--compact .qb-act:hover{border-color:var(--line);color:var(--fg)}
@media (hover:hover){
  .qb-q__actions--compact{opacity:0;transition:opacity .12s ease}
  .qb-qlist > li:hover .qb-q__actions--compact,
  .qb-qlist > li:focus-within .qb-q__actions--compact{opacity:1}
}
/* The serial no longer needs to push itself right when a control precedes it. */
.qb-q__actions--compact ~ .qb-q__perma{margin-left:0}

/* Reading notes, single-quote pages only.
   Set on the card ground rather than the page ground so it reads as apparatus
   around the quote, never as more of the quote. All colours come from the
   shared tokens, so dark mode needs no separate rules here. */
.qb-notes{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r);
  padding:clamp(1.15rem,3vw,1.75rem);
}
.qb-notes .qb-shead{margin-bottom:.35rem;border-bottom-color:var(--line)}

/* Question and answer, so a description list rather than heading+paragraph.
   On wide screens the question sits in its own column: the answers then line
   up and the block can be skimmed down the left edge. */
.qb-notes__dl{margin:.9rem 0 0;display:grid;gap:.5rem 1.5rem}
.qb-notes__dl dt{
  font-family:var(--ui);font-size:.74rem;font-weight:600;
  letter-spacing:.07em;text-transform:uppercase;color:var(--sage-text);
  align-self:baseline;
}
.qb-notes__dl dd{margin:0 0 .5rem;line-height:1.62;color:var(--fg);max-width:34rem}
@media (min-width:46rem){
  .qb-notes__dl{grid-template-columns:11.5rem minmax(0,1fr);gap:.85rem 1.75rem}
  .qb-notes__dl dd{margin-bottom:0}
}

.qb-notes__row{margin-top:1.15rem;padding-top:1.05rem;border-top:1px solid var(--line)}
.qb-notes__row h3{
  font-family:var(--ui);font-size:.74rem;font-weight:600;
  letter-spacing:.07em;text-transform:uppercase;color:var(--sage-text);
  margin-bottom:.5rem;
}
@media (min-width:46rem){
  .qb-notes__row{display:grid;grid-template-columns:11.5rem minmax(0,1fr);gap:1.75rem;align-items:baseline}
  .qb-notes__row h3{margin-bottom:0}
}

/* Short keyword runs read as tags, not as bullets: a three-item bulleted list
   of single words is all structure and no content. */
.qb-notes__tags{display:flex;flex-wrap:wrap;gap:.35rem}
.qb-notes__tags li{
  padding:.28rem .6rem;border-radius:var(--r);
  background:var(--bg);border:1px solid var(--line);
  font-size:.84rem;color:var(--fg);
}
/* Questions are real sentences, so they keep list semantics and markers. */
.qb-notes__questions{line-height:1.62;max-width:34rem}
.qb-notes__questions li{
  position:relative;padding-left:1rem;margin-top:.3rem;color:var(--fg);
}
.qb-notes__questions li::before{
  content:'';position:absolute;left:0;top:.62em;
  width:5px;height:5px;border-radius:50%;background:var(--sage);
}
.qb-notes__questions li:first-child{margin-top:0}
/* The counterpoint is the one item that argues with the quote, so it gets the
   accent rule to mark the turn rather than a louder heading. */
.qb-notes__item--counter p{
  border-left:2px solid var(--accent);padding-left:.85rem;
  line-height:1.62;max-width:34rem;color:var(--fg);
}

/* A topic with no page of its own: shown, not linked. */
.qb-pill--plain{
  background:transparent;border:1px dashed var(--line);color:var(--muted);cursor:default;
}

/* ======================================================================== */
/* VIBRANT LAYER                                                            */
/*                                                                          */
/* Colour here is structural, not decoration: every topic owns a hue, and    */
/* that hue follows it everywhere it appears. A reader learns the topics by  */
/* colour, and the taxonomy pages turn into something worth looking at.      */
/*                                                                          */
/* One rule set drives all ten hues via a --hue custom property, so the      */
/* whole system costs ~10 tiny classes rather than ten copies of every rule. */
/* Lightness is per-hue band (--hl): greens and cyans read lighter at the    */
/* same lightness, so they go darker to hold 4.5:1. Every combination was    */
/* measured; the worst is 5.67:1 in light and 6.09:1 in dark.                */
/* ======================================================================== */

.qb-h0{--hue:349;--hl:32}   /* rose    */
.qb-h1{--hue:22; --hl:28}   /* orange  */
.qb-h2{--hue:38; --hl:28}   /* amber   */
.qb-h3{--hue:142;--hl:25}   /* emerald */
.qb-h4{--hue:173;--hl:25}   /* teal    */
.qb-h5{--hue:199;--hl:32}   /* sky     */
.qb-h6{--hue:221;--hl:32}   /* blue    */
.qb-h7{--hue:258;--hl:32}   /* indigo  */
.qb-h8{--hue:280;--hl:32}   /* violet  */
.qb-h9{--hue:322;--hl:32}   /* fuchsia */

:root{
  --hue:22; --hl:28;
  --grad: linear-gradient(95deg,
            hsl(349 82% 58%), hsl(22 90% 56%), hsl(38 92% 54%),
            hsl(173 72% 42%), hsl(221 82% 58%), hsl(280 72% 58%));
}

/* ------------------------------------------------- hue-driven surfaces -- */
.qb-pill,
.qb-alpha a,
.qb-notes__tags li{
  background:hsl(var(--hue) 92% 95%);
  color:hsl(var(--hue) 72% var(--hl));
  border:1px solid hsl(var(--hue) 74% 88%);
  font-weight:500;
}
.qb-pill:hover,
.qb-alpha a:hover{
  background:hsl(var(--hue) 88% 91%);
  border-color:hsl(var(--hue) 70% 76%);
  color:hsl(var(--hue) 78% calc(var(--hl) - 4%));
  text-decoration:none;
}
.qb-pill__n{color:hsl(var(--hue) 45% calc(var(--hl) + 14%));font-weight:600}
.qb-alpha .qb-n{color:inherit;opacity:.65}
.qb-alpha strong{
  background:hsl(var(--hue) 72% var(--hl));
  border:1px solid hsl(var(--hue) 72% var(--hl));
  color:#fff;
}
.qb-pill--plain{
  background:transparent;color:var(--muted);
  border:1px dashed var(--line);font-weight:400;
}
.qb-pill--plain:hover{background:transparent;border-color:var(--line);color:var(--muted)}

/* The topic row under a quote picks up each topic's own colour, which is the
   cheapest way to make a dense page feel alive without adding any chrome. */
.qb-q__topics a{color:hsl(var(--hue) 72% var(--hl));font-weight:500}
.qb-q__topics a:hover{color:hsl(var(--hue) 82% calc(var(--hl) - 6%))}

/* -------------------------------------------------------------- hero --- */
.qb-hero h1{
  background:var(--grad);
  -webkit-background-clip:text;background-clip:text;
  color:transparent;
  /* A gradient headline must still be readable if background-clip is
     unsupported or images are off, so a solid colour sits underneath. */
  -webkit-text-fill-color:transparent;
}
@supports not (background-clip:text){
  .qb-hero h1{color:var(--fg);-webkit-text-fill-color:currentColor}
}
.qb-hero p a{font-weight:600}
.qb-hero__browse{margin-top:1.8rem}

.qb-btn--primary{
  background:var(--grad);background-size:200% 100%;
  border-color:transparent;color:#fff;font-weight:600;
  transition:background-position .35s ease,transform .15s ease;
}
.qb-btn--primary:hover{background-position:100% 0;color:#fff;transform:translateY(-1px)}
.qb-btn{font-weight:500}
.qb-btn:hover{border-color:hsl(var(--hue) 70% 72%)}

/* ----------------------------------------------------- section heads --- */
/* A short gradient bar instead of a flat rule: it marks the section without
   adding another line of text. */
.qb-shead{
  border-bottom:none;position:relative;padding-bottom:.7rem;margin-bottom:1.3rem;
}
.qb-shead::after{
  content:'';position:absolute;left:0;bottom:0;width:100%;height:2px;
  background:linear-gradient(90deg,hsl(var(--hue) 85% 58%) 0 3.2rem,var(--line) 3.2rem);
  border-radius:2px;
}
.qb-shead h2{color:var(--fg)}

/* ----------------------------------------------------- feature block --- */
.qb-feature{
  border-top:none;border-bottom:none;position:relative;
  padding-left:clamp(.9rem,2.5vw,1.4rem);
}
.qb-feature::before{
  content:'';position:absolute;left:0;top:clamp(1.2rem,4vw,1.8rem);bottom:clamp(1rem,3vw,1.5rem);
  width:4px;border-radius:4px;background:var(--grad);
}
.qb-feature__mark{
  background:var(--grad);-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;opacity:1;
}

/* ------------------------------------------------------ author cards --- */
.qb-acard{border:1px solid transparent;transition:background .15s ease,border-color .15s ease}
.qb-acard:hover{
  background:hsl(var(--hue) 92% 96%);
  border-color:hsl(var(--hue) 70% 86%);
}
.qb-acard:hover .qb-acard__name{color:hsl(var(--hue) 72% var(--hl))}

/* ------------------------------------------------------------ footer --- */
.qb-footer{border-top:none;position:relative}
.qb-footer::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--grad)}
.qb-brand__mark{
  background:var(--grad);-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
}

/* -------------------------------------------------------- dark mode ---- */
/* Not the same numbers dimmed: on a dark ground the fill goes deep and the
   text goes bright, which is the inverse relationship of the light theme. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-pill,
  :root:not([data-theme="light"]) .qb-alpha a,
  :root:not([data-theme="light"]) .qb-notes__tags li{
    background:hsl(var(--hue) 40% 17%);
    color:hsl(var(--hue) 88% 76%);
    border-color:hsl(var(--hue) 35% 27%);
  }
  :root:not([data-theme="light"]) .qb-pill:hover,
  :root:not([data-theme="light"]) .qb-alpha a:hover{
    background:hsl(var(--hue) 45% 23%);
    border-color:hsl(var(--hue) 50% 40%);
    color:hsl(var(--hue) 92% 82%);
  }
  :root:not([data-theme="light"]) .qb-pill__n{color:hsl(var(--hue) 50% 62%)}
  :root:not([data-theme="light"]) .qb-alpha strong{
    background:hsl(var(--hue) 70% 62%);border-color:hsl(var(--hue) 70% 62%);color:#10140F;
  }
  :root:not([data-theme="light"]) .qb-q__topics a{color:hsl(var(--hue) 85% 74%)}
  :root:not([data-theme="light"]) .qb-acard:hover{
    background:hsl(var(--hue) 35% 15%);border-color:hsl(var(--hue) 35% 26%);
  }
  :root:not([data-theme="light"]) .qb-acard:hover .qb-acard__name{color:hsl(var(--hue) 88% 76%)}
  :root:not([data-theme="light"]) .qb-pill--plain{background:transparent;color:var(--muted)}
}
:root[data-theme="dark"] .qb-pill,
:root[data-theme="dark"] .qb-alpha a,
:root[data-theme="dark"] .qb-notes__tags li{
  background:hsl(var(--hue) 40% 17%);
  color:hsl(var(--hue) 88% 76%);
  border-color:hsl(var(--hue) 35% 27%);
}
:root[data-theme="dark"] .qb-pill:hover,
:root[data-theme="dark"] .qb-alpha a:hover{
  background:hsl(var(--hue) 45% 23%);
  border-color:hsl(var(--hue) 50% 40%);
  color:hsl(var(--hue) 92% 82%);
}
:root[data-theme="dark"] .qb-pill__n{color:hsl(var(--hue) 50% 62%)}
:root[data-theme="dark"] .qb-alpha strong{
  background:hsl(var(--hue) 70% 62%);border-color:hsl(var(--hue) 70% 62%);color:#10140F;
}
:root[data-theme="dark"] .qb-q__topics a{color:hsl(var(--hue) 85% 74%)}
:root[data-theme="dark"] .qb-acard:hover{
  background:hsl(var(--hue) 35% 15%);border-color:hsl(var(--hue) 35% 26%);
}
:root[data-theme="dark"] .qb-acard:hover .qb-acard__name{color:hsl(var(--hue) 88% 76%)}
:root[data-theme="dark"] .qb-pill--plain{background:transparent;color:var(--muted)}

/* The long topic index: the name takes the topic's hue with a matching marker,
   which turns a 500-row list into something scannable by colour. */
.qb-linklist li[class*="qb-h"]{position:relative;padding-left:.85rem}
.qb-linklist li[class*="qb-h"]::before{
  content:'';position:absolute;left:0;top:.95em;
  width:6px;height:6px;border-radius:50%;
  background:hsl(var(--hue) 78% 52%);
}
.qb-linklist li[class*="qb-h"] a{color:hsl(var(--hue) 72% var(--hl));font-weight:500}
.qb-linklist li[class*="qb-h"] a:hover{color:hsl(var(--hue) 85% calc(var(--hl) - 6%))}
:root[data-theme="dark"] .qb-linklist li[class*="qb-h"] a{color:hsl(var(--hue) 85% 74%)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-linklist li[class*="qb-h"] a{color:hsl(var(--hue) 85% 74%)}
}

/* The wordmark's quote glyph needs a painted box for background-clip to show;
   at line-height:0 the clip region collapses and the mark disappears. */
.qb-brand__mark{
  line-height:1;top:.06em;display:inline-block;
}

/* ------------------------------------------------ gradient corrections --
   One gradient cannot do three jobs. Measured against the cream and the dark
   grounds, the original vivid ramp failed everywhere it carried text: as a
   headline its amber stop hit 1.98:1 on cream, and as a button fill white sat
   at 2.02:1 on the same stop. Split by job instead:

     --grad-bright  decoration only; never has text on or in it
     --grad         text clipped to it; every stop >= 3.24:1 on cream and
                    >= 3.56:1 on dark, so it is safe as large text in both
     --grad-fill    solid fill under white text; every stop >= 4.61:1
*/
:root{
  --grad-bright: linear-gradient(95deg,
      hsl(349 82% 58%), hsl(22 90% 56%), hsl(38 92% 54%),
      hsl(173 72% 42%), hsl(221 82% 58%), hsl(280 72% 58%));
  --grad: linear-gradient(95deg,
      hsl(349 82% 55%), hsl(22 90% 49%), hsl(38 92% 40%),
      hsl(173 72% 36%), hsl(221 82% 55%), hsl(280 72% 55%));
  --grad-fill: linear-gradient(95deg,
      hsl(349 82% 47%), hsl(22 90% 39%), hsl(38 92% 32%),
      hsl(173 72% 28%), hsl(221 82% 48%), hsl(280 72% 48%));
}
/* Decorative rules keep the bright ramp — nothing is read off them. */
.qb-feature::before,
.qb-footer::before{background:var(--grad-bright)}

.qb-btn--primary{background:var(--grad-fill);background-size:200% 100%}
.qb-btn--primary:hover{color:#fff}

/* Decorative punctuation still has to clear 4.5:1 — it is rendered text even
   though it is aria-hidden, and it sits inline with the attribution. */
.qb-q__dash{color:var(--accent-text)}
.qb-sep{color:var(--sage-text);opacity:1}

:root[data-theme="dark"] .qb-pill__n{color:hsl(var(--hue) 55% 68%)}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-pill__n{color:hsl(var(--hue) 55% 68%)}
}

/* The primary button carries white text in BOTH schemes now. An older rule
   flipped it to near-black in dark mode, which made sense against the old
   bright fill but pairs dark-on-dark with --grad-fill: measured 3.17:1.
   White on --grad-fill is >= 4.61:1 at every stop, in either scheme. */
:root[data-theme="dark"] .qb-btn--primary,
:root[data-theme="dark"] .qb-btn--primary:hover{color:#fff}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .qb-btn--primary,
  :root:not([data-theme="light"]) .qb-btn--primary:hover{color:#fff}
}

/* ====================================================== PROSE ===== */
/* Blog posts and static pages. The global reset zeroes p margins and list
   markers for the quote layouts; article text needs them back. */
.qb-prose{max-width:var(--w-read);font-size:1.05rem;line-height:1.7}
.qb-prose > * + *{margin-top:1.1em}
.qb-prose h2{font-family:var(--serif);font-size:1.45rem;line-height:1.25;margin-top:2em}
.qb-prose h3{font-size:1.1rem;line-height:1.35;margin-top:1.6em}
.qb-prose ul{list-style:disc;padding-left:1.4em}
.qb-prose ol{list-style:decimal;padding-left:1.4em}
.qb-prose li + li{margin-top:.4em}
.qb-prose blockquote{font-family:var(--serif);font-size:1.15rem;border-left:2px solid var(--line);padding-left:1em}
.qb-prose a{text-decoration:underline;text-underline-offset:2px}

/* ---- folded link groups: homepage directory, long author topic lists ---- */
.qb-fold{border-bottom:1px solid var(--line)}
.qb-fold>summary{cursor:pointer;padding:.7rem 0;min-height:44px;font-weight:600;color:var(--fg)}
.qb-fold>summary:hover{color:var(--accent-text)}
.qb-fold>summary .qb-n{color:var(--sage-text);font-size:.78rem;font-weight:400;margin-left:.35rem}
.qb-fold[open]{padding-bottom:1rem}
.qb-dir h3{margin:1.5rem 0 .5rem}
.qb-mod .qb-fold{border-bottom:0}
