/* =========================================================
   4 TEMPERAMENTS — "Liber Naturae" illuminated codex
   Faithful to the temperamentum prototype: warm parchment ground,
   vermilion + gold + ultramarine, Cinzel small caps, Pirata One
   blackletter display, gilded coins, foliate corner engravings,
   the Rota Elementorum octagram.
   Fonts: Pirata One (display), Cinzel (small caps), Source Serif 4 (body).
   ========================================================= */

:root {
  color-scheme: dark light;

  /* --- Dark "Gece Mürekkebi" (default) --- */
  --parc:   #1B150C;
  --parc2:  #221B10;
  --card:   #282013;
  --card2:  #2f2616;
  --ink:    #EADCC0;
  --ink2:   #B9A585;
  --ink3:   #8f7f60;
  --verm:   #C75A45;
  --vermD:  #7a2a1c;
  --ultra:  #7E96C6;
  --gold:   #C8A254;   /* gilt edges / accents */
  --goldL:  #E0BE6E;
  --goldD:  #8a6a17;
  --goldT:  #E0BE6E;   /* gold as text/links */
  --sage:   #8CA075;
  --line:   rgba(216,180,92,0.32);
  --lineS:  rgba(216,180,92,0.14);
  --onGold: #251a06;
  --shadow: 0 10px 26px rgba(0,0,0,0.5);
  --bevelTop: rgba(255,245,215,0.05);
  --bevelBot: rgba(0,0,0,0.35);
  --pageBg: linear-gradient(180deg, #20180C 0%, #33270F 42%, #1E1609 100%);
  --parchA: 0.06;
  --cornA: 0.60;

  --sanguine:    #56B8A4;
  --choleric:    #E27E4E;
  --melancholic: #CD8A46;
  --phlegmatic:  #7098D6;

  --maxw: 1120px;
  --readw: 700px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --corner: url("/assets/img/corner.png");

  --disp: "Pirata One", "UnifrakturCook", Georgia, serif;
  --caps: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="light"] {
  --parc:   #EFE4CC;
  --parc2:  #F6EEDC;
  --card:   #F8F1E1;
  --card2:  #F2E7CD;
  --ink:    #2B2113;
  --ink2:   #5B4C33;
  --ink3:   #8a7550;
  --verm:   #A63A2B;
  --vermD:  #6f2318;
  --ultra:  #2C4A80;
  --gold:   #AE8A3B;
  --goldL:  #D8B45C;
  --goldD:  #7d6122;
  --goldT:  #6b501a;
  --sage:   #5f7048;
  --line:   rgba(140,110,60,0.38);
  --lineS:  rgba(140,110,60,0.18);
  --onGold: #2C2110;
  --shadow: 0 10px 26px rgba(60,40,10,0.14);
  --bevelTop: rgba(255,245,215,0.55);
  --bevelBot: rgba(80,50,15,0.30);
  --pageBg: linear-gradient(180deg, #F2E8D0 0%, #E8DABA 45%, #EFE4CC 100%);
  --parchA: 0.5;
  --cornA: 0.7;
  --sanguine:    #2f8375;
  --choleric:    #C24A34;
  --melancholic: #8A6F3C;
  --phlegmatic:  #2E4E86;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --parc:#EFE4CC; --parc2:#F6EEDC; --card:#F8F1E1; --card2:#F2E7CD;
    --ink:#2B2113; --ink2:#5B4C33; --ink3:#8a7550;
    --verm:#A63A2B; --vermD:#6f2318; --ultra:#2C4A80;
    --gold:#AE8A3B; --goldL:#D8B45C; --goldD:#7d6122; --goldT:#6b501a;
    --sage:#5f7048; --line:rgba(140,110,60,0.38); --lineS:rgba(140,110,60,0.18);
    --onGold:#2C2110; --shadow:0 10px 26px rgba(60,40,10,0.14);
    --bevelTop:rgba(255,245,215,0.55); --bevelBot:rgba(80,50,15,0.30);
    --pageBg:linear-gradient(180deg,#F2E8D0 0%,#E8DABA 45%,#EFE4CC 100%);
    --parchA:0.5; --cornA:0.7;
    --sanguine:#2f8375; --choleric:#C24A34; --melancholic:#8A6F3C; --phlegmatic:#2E4E86;
    color-scheme: light;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--pageBg) fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}
body::before { /* parchment fibres + faint diagonal hatch */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    repeating-linear-gradient(51deg, rgba(200,150,80,0.05) 0 1.5px, transparent 1.5px 6px),
    url("/assets/img/parchment.jpg");
  background-size: auto, 640px;
  opacity: var(--parchA); mix-blend-mode: soft-light;
}

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

a { color: var(--goldT); text-decoration: none; }
a:hover { color: var(--goldL); }
::selection { background: rgba(199,90,69,0.28); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--disp); font-weight: 400; line-height: 1.12; color: var(--ink); }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

.label, .eyebrow {
  font-family: var(--caps); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 0.72rem; color: var(--goldT);
}
.label-ink { color: var(--ink2); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.05rem, 4vw, 2rem); }
.read { max-width: var(--readw); }
.section { padding-block: clamp(2.8rem, 6.5vw, 5rem); }
.section-tight { padding-block: clamp(1.6rem, 4vw, 2.6rem); }
.section-head { max-width: 660px; margin-bottom: 2.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-family: var(--disp); font-size: clamp(1.9rem, 4.4vw, 2.9rem); letter-spacing: 0.01em; margin-top: 0.5rem; }
.lede { font-family: var(--body); font-size: clamp(1.04rem, 1.5vw, 1.2rem); color: var(--ink2); line-height: 1.62; }
.lede + .lede { margin-top: 1.05rem; }
.read > p + p { margin-top: 1.05rem; }

/* ---------- Corner engravings (foliate) ---------- */
.corn {
  position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, var(--goldL), var(--gold) 55%, var(--goldD));
  opacity: var(--cornA);
  -webkit-mask: var(--corner) center/contain no-repeat; mask: var(--corner) center/contain no-repeat;
}
.c-tl { top: 5px; left: 5px; }
.c-tr { top: 5px; right: 5px; transform: scaleX(-1); }
.c-bl { bottom: 5px; left: 5px; transform: scaleY(-1); }
.c-br { bottom: 5px; right: 5px; transform: scale(-1, -1); }

/* Inner engraved frame so the corner engravings read as one illuminated border. */
.temp-card::after, .post-card::after, .step::after, .quiz-card::after,
.rota::after, .vplate::after, .pill-cta::after,
.temp-figure::after, .article-figure::after, .hero-figure.plate::after {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--lineS);
  border-radius: 9px; pointer-events: none; z-index: 1;
}
.temp-card::after, .post-card::after { inset: 6px; border-radius: 10px; }

/* Archetype list on temperament pages */
.arch-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.6rem; padding: 0; }
.arch-list li { position: relative; padding-left: 1.35rem; color: var(--ink2); }
.arch-list li::before { content: "❦"; position: absolute; left: 0; top: 0.05rem; color: var(--gold); font-size: 0.75rem; }
@media (max-width: 540px) { .arch-list { grid-template-columns: 1fr; } }

/* ---------- Ornamental rule ---------- */
.rule { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--gold); margin-block: 2.2rem; }
.rule::before, .rule::after { content: ""; height: 1px; width: min(150px, 26vw); background: linear-gradient(90deg, transparent, #2A2C33 0%, var(--goldL) 45%, var(--goldL) 55%, #2A2C33 100%, transparent); opacity: .8; }
.rule .fleur { font-size: 1.1rem; letter-spacing: 0.5em; padding-left: 0.5em; color: var(--verm); }

/* ---------- Framed surface (rounded card + gilt double rule + emboss) ---------- */
.surface {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot),
              inset 0 0 0 4px color-mix(in srgb, var(--parc) 82%, transparent),
              inset 0 0 0 5px var(--lineS), var(--shadow);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--parc) 84%, transparent);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.5ch; font-family: var(--disp); font-size: 1.55rem; letter-spacing: 0.01em; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .num { color: var(--gold); }
.brand .seal { width: 9px; height: 9px; background: radial-gradient(circle at 35% 30%, var(--verm), var(--vermD)); border-radius: 50%; box-shadow: 0 0 0 2px var(--parc), 0 0 0 3px var(--verm); margin-left: 3px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.2rem; }
.nav a.navlink { font-family: var(--caps); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; color: var(--ink2); padding: 0.55rem 0.75rem; border-radius: 8px; position: relative; }
.nav a.navlink:hover { color: var(--ink); }
.nav a.navlink[aria-current="page"] { color: var(--goldT); }
.nav a.navlink[aria-current="page"]::after { content: "❦"; position: absolute; left: 50%; transform: translateX(-50%); bottom: -3px; font-size: 0.5rem; color: var(--gold); }

.header-tools { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: transparent; border: 1px solid var(--line); color: var(--ink2); cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.icon-btn:hover { color: var(--goldT); border-color: var(--gold); background: rgba(200,162,84,0.08); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .moon { display: block; } :root:not([data-theme="light"]) .theme-toggle .sun { display: none; } }

.lang { position: relative; }
.lang-btn { width: auto; min-width: 0; display: inline-flex; align-items: center; gap: 0.4rem; height: 38px; padding: 0 0.7rem; font-family: var(--caps); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.1em; }
.lang-btn svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }
.lang-btn .caret { width: 8px; height: 8px; flex: none; opacity: 0.6; transition: transform .2s; }
.lang.open .lang-btn .caret { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 176px; background: var(--parc2); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 0.35rem; display: none; z-index: 60; }
.lang.open .lang-menu { display: block; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.5rem 0.7rem; border-radius: 7px; color: var(--ink2); font-family: var(--body); font-size: 0.92rem; }
.lang-menu a:hover { background: rgba(200,162,84,0.1); color: var(--ink); }
.lang-menu a[aria-current="true"] { color: var(--goldT); }
.lang-menu a .code { font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink3); }

.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0.1rem; background: var(--parc2); border-bottom: 1px solid var(--line); padding: 0.7rem clamp(1.05rem,4vw,2rem) 1.1rem; box-shadow: var(--shadow); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; margin-left: 0; }
  body.nav-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav a.navlink { padding: 0.7rem; font-size: 0.86rem; }
  .nav a.navlink[aria-current="page"]::after { display: none; }
  .nav-toggle { display: inline-grid; order: 3; margin-left: auto; }
}

/* ---------- Buttons (gilded coins) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--disp); font-weight: 400; letter-spacing: 0.06em; font-size: 1.05rem;
  padding: 0.7rem 1.5rem; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s var(--ease), filter .16s, box-shadow .16s; text-align: center; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
/* Gilded coin: radial highlight, engraved inner rule, warm bevel. */
.btn-gold {
  background:
    linear-gradient(180deg, rgba(255,250,228,0.55), rgba(255,250,228,0) 42%),
    radial-gradient(130% 150% at 34% 18%, var(--goldL), var(--gold) 60%, var(--goldD) 100%);
  border-color: var(--goldD); color: var(--onGold);
  box-shadow: 0 6px 16px rgba(150,110,40,0.42), inset 0 1px 0 rgba(255,248,222,0.8),
              inset 0 0 0 1px rgba(255,240,200,0.35), inset 0 -3px 5px rgba(90,60,15,0.32);
  text-shadow: 0 1px 0 rgba(255,246,214,0.4);
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); color: var(--onGold); box-shadow: 0 10px 24px rgba(150,110,40,0.5), inset 0 1px 0 rgba(255,248,222,0.85), inset 0 0 0 1px rgba(255,240,200,0.4), inset 0 -3px 5px rgba(90,60,15,0.32); }
.btn-ghost { background: linear-gradient(180deg, rgba(200,162,84,0.07), transparent); color: var(--goldT); border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(200,162,84,0.18); }
.btn-ghost:hover { background: rgba(200,162,84,0.12); color: var(--goldL); transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--gold); }
.btn-verm { background: linear-gradient(180deg, rgba(255,220,200,0.35), transparent 40%), radial-gradient(130% 150% at 34% 18%, var(--verm), var(--vermD)); border-color: var(--vermD); color: #f6e7d8; box-shadow: 0 6px 16px rgba(110,40,25,0.4), inset 0 1px 0 rgba(255,220,200,0.4); }
.btn-verm:hover { transform: translateY(-2px); filter: brightness(1.08); color: #f6e7d8; }
.btn-lg { padding: 0.85rem 1.9rem; font-size: 1.2rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(2.4rem, 5.5vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.4rem); align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; }
.hero-eyebrow::before, .hero-eyebrow::after { content: ""; width: 22px; height: 1px; background: var(--gold); }
.hero h1 { font-family: var(--disp); font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; margin: 1rem 0 0; }
.hero h1 em, .hero h1 .accent { color: var(--gold); font-style: normal; }
.hero .lede { margin-top: 1.15rem; max-width: 34ch; }
.hero-aphorism { font-family: var(--body); font-style: italic; color: var(--ink2); margin-top: 1rem; font-size: 1.08rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.7rem; }
.hero-meta { margin-top: 1.7rem; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.hero-meta div { line-height: 1.05; }
.hero-meta b { font-family: var(--disp); font-size: 1.7rem; color: var(--gold); display: block; }
.hero-meta span { font-family: var(--caps); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink3); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 380px; margin: 1.4rem auto 0; }
  .hero .lede { max-width: none; }
  .hero-meta { gap: 1.2rem 1.4rem; }
}

.hero-figure { position: relative; }

/* ---------- Illuminated image plates ----------
   Photographic and engraved images sit inside a warm gilded mat (the figure)
   with a foliate corner border, and an inner window (.frame) whose vignette and
   warm tint sink the image's own light paper into the codex palette. This keeps
   images from reading as flat white boxes, especially on the light parchment. */
.hero-figure .frame,
.temp-figure .frame, .article-figure .frame {
  position: relative; overflow: hidden; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--goldL), inset 0 0 0 2px color-mix(in srgb, var(--parc) 55%, transparent);
}
.hero-figure .frame img,
.temp-figure .frame img, .article-figure .frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: sepia(0.4) saturate(0.8) brightness(0.92) contrast(1.05);
}
.hero-figure .frame::after,
.temp-figure .frame::after, .article-figure .frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 44px 7px rgba(28,18,7,0.44);
  background:
    radial-gradient(125% 100% at 50% 38%, transparent 52%, rgba(38,24,9,0.22) 100%),
    linear-gradient(180deg, rgba(40,26,10,0.05), rgba(40,26,10,0.14));
  mix-blend-mode: multiply;
}

/* The gilded mat around temperament and article images. */
.temp-figure, .article-figure, .hero-figure.plate {
  position: relative; padding: 9px; border-radius: 16px;
  background: linear-gradient(158deg, var(--card2) 0%, var(--parc2) 52%, var(--card2) 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 6px var(--bevelBot), var(--shadow);
}
.temp-figure figcaption, .article-figure figcaption {
  margin: 9px 4px 2px; padding-top: 0.6rem; border-top: 1px solid var(--line);
  font-family: var(--body); font-style: italic; font-size: 0.8rem; line-height: 1.5;
  color: var(--ink3); text-align: center; background: transparent;
}

/* ---------- Compass (octagram) ---------- */
.compass { width: 100%; max-width: 430px; margin-inline: auto; aspect-ratio: 1; position: relative; }
.compass svg { width: 100%; height: 100%; overflow: visible; }
.compass .cmp-square-gold { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.compass .cmp-square-verm { fill: none; stroke: var(--verm); stroke-width: 1.6; opacity: 0.92; }
.compass .cmp-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.compass .cmp-tick { stroke: var(--line); stroke-width: 1; }
.compass .cmp-qual { font-family: var(--caps); font-weight: 600; font-size: 7px; letter-spacing: 1.4px; fill: var(--ink3); text-transform: uppercase; }
.compass .cmp-elem { font-family: var(--caps); font-weight: 700; font-size: 8px; letter-spacing: 1px; text-transform: uppercase; }
.compass .cmp-dot { fill: var(--goldL); filter: drop-shadow(0 0 5px rgba(224,190,110,0.85)); transition: cx .5s var(--ease), cy .5s var(--ease); }
.compass .cmp-dot-ring { fill: none; stroke: var(--goldL); stroke-width: 1; opacity: 0.5; transition: cx .5s var(--ease), cy .5s var(--ease); }
.compass .e-sanguine { fill: var(--sanguine); } .compass .e-choleric { fill: var(--choleric); }
.compass .e-melancholic { fill: var(--melancholic); } .compass .e-phlegmatic { fill: var(--phlegmatic); }

/* ---------- Medallion ---------- */
.medallion { position: relative; width: clamp(190px, 40vw, 236px); aspect-ratio: 1; margin-inline: auto; }
.medallion::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--line); opacity: 0.55; pointer-events: none; }
.medallion .disc { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--card2);
  box-shadow: 0 20px 50px rgba(0,0,0,.45), inset 0 0 0 6px color-mix(in srgb, var(--parc) 80%, transparent), inset 0 0 0 7px var(--gold); }
.medallion .disc img { width: 100%; height: 100%; object-fit: cover; object-position: center 26%; filter: sepia(0.42) saturate(0.8) brightness(0.9) contrast(1.05); }
.medallion .disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 42px 6px rgba(24,16,6,0.6); background: radial-gradient(circle at 50% 42%, transparent 50%, rgba(24,16,6,0.34) 100%); }
.medallion .mk { position: absolute; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--parc); border: 1.5px solid currentColor; font-size: 0.72rem; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.medallion .mk.n { top: -13px; left: 50%; transform: translateX(-50%); }
.medallion .mk.e { right: -13px; top: 50%; transform: translateY(-50%); }
.medallion .mk.s { bottom: -13px; left: 50%; transform: translateX(-50%); }
.medallion .mk.w { left: -13px; top: 50%; transform: translateY(-50%); }

/* ---------- Temperament cards ---------- */
.temp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .temp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .temp-grid { grid-template-columns: 1fr; } }
.temp-card { --accent: var(--gold); position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; overflow: hidden; }
.temp-card:hover { transform: translateY(-4px); box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 0 0 1px var(--accent), var(--shadow); }
.temp-card .thumb { margin: 12px 12px 0; aspect-ratio: 5/4; overflow: hidden; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--goldL); background: var(--card2); }
.temp-card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.34) saturate(0.82) brightness(0.94) contrast(1.04); transition: transform .4s var(--ease); }
.temp-card:hover .thumb img { transform: scale(1.05); }
.temp-card .body { padding: 0.9rem 1.05rem 1.2rem; display: flex; flex-direction: column; flex: 1; text-align: center; }
.temp-card .sym { font-size: 1.05rem; color: var(--accent); }
.temp-card .kick { font-family: var(--caps); font-weight: 600; font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-top: 0.2rem; }
.temp-card h3 { font-family: var(--disp); font-size: 1.5rem; margin: 0.25rem 0 0.35rem; }
.temp-card h3 a { color: var(--ink); }
.temp-card p { font-size: 0.9rem; color: var(--ink2); flex: 1; }
.temp-card .more { margin-top: 0.8rem; font-family: var(--caps); font-weight: 600; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.temp-card .more::after { content: " ❦"; font-size: 0.6rem; }
.t-sanguine { --accent: var(--sanguine); } .t-choleric { --accent: var(--choleric); }
.t-melancholic { --accent: var(--melancholic); } .t-phlegmatic { --accent: var(--phlegmatic); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.6rem 1.4rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); text-align: center; }
.step .n { font-family: var(--caps); font-weight: 700; font-size: 1.1rem; color: var(--onGold); display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 0.7rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--goldL), var(--gold)); border: 1px solid var(--goldD); }
.step h3 { font-family: var(--disp); font-size: 1.35rem; margin-bottom: 0.35rem; }
.step p { color: var(--ink2); font-size: 0.94rem; }

/* ---------- Bands ---------- */
.band { background: color-mix(in srgb, var(--parc2) 70%, transparent); border-block: 1px solid var(--line); position: relative; }
.cta-band { text-align: center; }
.cta-band h2 { font-family: var(--disp); font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.cta-band p { color: var(--ink2); max-width: 52ch; margin: 0.8rem auto 1.5rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.2rem 1.1rem 0; position: relative; font-family: var(--disp); font-size: 1.2rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "❦"; position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); font-size: 0.9rem; color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq details p { padding-bottom: 1.15rem; color: var(--ink2); max-width: 68ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--parc2) 70%, transparent); margin-top: 2.6rem; }
.footer-sources { text-align: center; padding-top: 2rem; font-family: var(--caps); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.72rem; color: var(--ink3); }
.footer-sources .fleur { color: var(--verm); margin-inline: 0.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding-block: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; } }
@media (max-width: 440px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand { font-size: 1.55rem; }
.footer-brand p { color: var(--ink3); font-size: 0.9rem; margin-top: 0.7rem; max-width: 34ch; }
.footcol h4 { font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--goldT); margin-bottom: 0.75rem; font-weight: 600; }
.footcol a { display: block; color: var(--ink2); font-size: 0.92rem; padding: 0.26rem 0; }
.footcol a:hover { color: var(--goldL); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.1rem 1.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; justify-content: space-between; color: var(--ink3); font-size: 0.8rem; }
.footer-bottom a { color: var(--ink3); } .footer-bottom a:hover { color: var(--goldL); }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 760px; margin-inline: auto; }
.quiz-top { text-align: center; margin-bottom: 1.2rem; }
.quiz-qlabel { font-family: var(--caps); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; font-size: 0.72rem; color: var(--goldT); }
.quiz-compass { max-width: 296px; margin: 0.6rem auto 0.2rem; }
.quiz-progress { display: flex; align-items: center; gap: 0.8rem; max-width: 340px; margin: 0.4rem auto 0; }
.quiz-progress .track { flex: 1; height: 4px; border-radius: 3px; background: var(--lineS); overflow: hidden; }
.quiz-progress .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--goldL)); transition: width .4s var(--ease); }

.quiz-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); padding: clamp(1.5rem, 4vw, 2.4rem); margin-top: 1rem; }
.quiz-q { font-family: var(--disp); font-size: clamp(1.45rem, 3.3vw, 2rem); line-height: 1.18; text-align: center; margin-bottom: 1.3rem; }
.quiz-options { display: grid; gap: 0.6rem; }
.quiz-opt { display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left; background: var(--parc2); border: 1px solid var(--line); border-radius: 11px; padding: 0.85rem 1rem; font: inherit; color: var(--ink); cursor: pointer; transition: background .16s, box-shadow .16s, transform .12s; }
.quiz-opt:hover { background: rgba(200,162,84,0.1); box-shadow: inset 0 0 0 1px var(--gold); }
.quiz-opt:active { transform: scale(0.995); }
.quiz-opt .mark { flex: none; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; font-family: var(--caps); font-weight: 700; font-size: 0.72rem; color: var(--ink3); background: var(--parc); box-shadow: inset 0 0 0 1px var(--line); }
.quiz-opt.sel { background: rgba(200,162,84,0.16); box-shadow: inset 0 0 0 1.5px var(--gold); }
.quiz-opt.sel .mark { color: var(--onGold); background: radial-gradient(circle at 35% 30%, var(--goldL), var(--gold)); box-shadow: none; }
.quiz-opt .txt { font-family: var(--body); font-size: 1rem; line-height: 1.4; }
.quiz-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }

/* ---------- Result ---------- */
.result { max-width: 820px; margin-inline: auto; }
.result-hero { text-align: center; padding-top: 1rem; }
.result-hero .medallion { margin-block: 1.2rem 1.4rem; }
.result-name { font-family: var(--disp); font-size: clamp(2.6rem, 6.4vw, 3.8rem); line-height: 1; }
.result-name .accent { color: var(--accent); }
.result-sub { font-family: var(--body); font-style: italic; color: var(--ink2); margin-top: 0.5rem; font-size: 1.12rem; }
.result-quality { display: inline-block; margin-top: 0.9rem; font-family: var(--caps); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--goldT); }
.result-quality .sep { color: var(--ink3); margin-inline: 0.5rem; }

.rota { position: relative; margin-top: 1.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); padding: clamp(1.4rem, 4vw, 2rem); }
.rota-title { text-align: center; font-family: var(--caps); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; font-size: 0.72rem; color: var(--goldT); margin-bottom: 1.3rem; }
.bars { display: grid; gap: 0.95rem; }
.bar-row .bar-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.3rem; }
.bar-row .bar-name { font-family: var(--caps); font-weight: 600; letter-spacing: 0.05em; color: var(--ink); font-size: 0.92rem; }
.bar-row .bar-name .sw { display: inline-block; width: 9px; height: 9px; margin-right: 0.5rem; background: var(--accent); transform: rotate(45deg); }
.bar-row .bar-name .lat { color: var(--ink3); font-size: 0.68rem; letter-spacing: 0.12em; margin-left: 0.4rem; }
.bar-row .bar-val { font-family: var(--caps); font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; }
.bar-row .bar-track { height: 10px; border-radius: 5px; background: var(--lineS); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); overflow: hidden; }
.bar-row .bar-fill { height: 100%; border-radius: 5px; width: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 72%, #000), var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }

.virtus { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.6rem; }
@media (max-width: 560px) { .virtus { grid-template-columns: 1fr; } }
.vplate { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); padding: 1.2rem 1.3rem; }
.vplate h3 { font-family: var(--caps); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.7rem; text-align: center; padding-top: 0.3rem; }
.vplate.v h3 { color: var(--sage); } .vplate.u h3 { color: var(--verm); }
.vplate ul { list-style: none; }
.vplate li { position: relative; padding-left: 1.3rem; margin-bottom: 0.4rem; color: var(--ink2); font-size: 0.92rem; }
.vplate.v li::before { content: "❦"; position: absolute; left: 0; color: var(--sage); font-size: 0.72rem; top: 0.1rem; }
.vplate.u li::before { content: "❦"; position: absolute; left: 0; color: var(--verm); font-size: 0.72rem; top: 0.1rem; }

.result-blend { margin-top: 1.6rem; text-align: center; }
.result-blend p { color: var(--ink2); font-size: 1.06rem; max-width: 62ch; margin-inline: auto; }
.result-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.8rem; }
.disclaimer { margin-top: 1.8rem; padding: 0.9rem 1.2rem; border: 1px dashed var(--line); border-radius: 10px; color: var(--ink3); font-family: var(--body); font-style: italic; font-size: 0.86rem; text-align: center; }
.hidden { display: none !important; }

/* ---------- Temperament detail ---------- */
.temp-header { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.temp-header::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 15% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%); }
.temp-header .wrap { position: relative; z-index: 1; padding-block: clamp(2.2rem, 5.5vw, 3.6rem); text-align: center; }
.temp-quality { font-family: var(--caps); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.72rem; color: var(--accent); }
.temp-header h1 { font-family: var(--disp); font-size: clamp(2.8rem, 7vw, 4.6rem); margin: 0.6rem 0 0.3rem; }
.temp-header h1 .accent { color: var(--accent); }
.temp-header .tagline { font-family: var(--body); font-style: italic; font-size: 1.18rem; color: var(--ink2); }
.temp-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.8rem; align-items: start; }
@media (max-width: 940px) { .temp-layout { grid-template-columns: 1fr; } }
.temp-aside { position: sticky; top: 88px; }
@media (max-width: 940px) { .temp-aside { position: static; max-width: 420px; margin-inline: auto; } }
/* .temp-figure plate treatment is defined with the illuminated image plates above. */

/* ---------- Prose / article ---------- */
.prose { max-width: var(--readw); margin-inline: auto; font-family: var(--body); font-size: 1.1rem; line-height: 1.78; color: var(--ink); }
.prose > * + * { margin-top: 1.2rem; }
.prose h2 { font-family: var(--disp); font-weight: 400; font-size: 1.7rem; margin-top: 2.3rem; color: var(--ink); }
.prose h3 { font-family: var(--caps); font-weight: 600; font-size: 1.16rem; margin-top: 1.7rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--gold); }
.prose blockquote { border-left: 3px solid var(--verm); padding: 0.2rem 0 0.2rem 1.3rem; margin-block: 1.5rem; font-family: var(--body); font-style: italic; font-size: 1.22rem; color: var(--ink2); }
.prose a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--gold); }
.prose h2 { scroll-margin-top: 88px; }

/* "In this entry" table of contents */
.toc { position: relative; margin: 1.7rem 0 2.1rem; padding: 1.05rem 1.3rem; border: 1px solid var(--line);
  border-radius: 14px; background: linear-gradient(158deg, var(--card2) 0%, var(--parc2) 58%, var(--card2) 100%);
  box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 6px var(--bevelBot); }
.toc .toc-title { font-family: var(--caps); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.7rem; color: var(--goldT); margin-bottom: 0.55rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.42rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li a { font-family: var(--body); font-size: 0.99rem; color: var(--ink2); text-decoration: none;
  display: flex; gap: 0.65rem; align-items: baseline; }
.toc li a::before { content: counter(toc, decimal-leading-zero); font-family: var(--caps); font-weight: 600;
  color: var(--gold); font-size: 0.78rem; flex: none; }
.toc li a:hover { color: var(--goldL); }

/* Previous / next post navigation */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: var(--readw);
  margin: 2.4rem auto 0; }
.pn-slot { position: relative; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot);
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease); }
a.pn-slot:hover { border-color: var(--gold); transform: translateY(-2px); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-label { font-family: var(--caps); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.68rem; color: var(--goldT); display: inline-flex; align-items: center; gap: 0.35rem; }
.pn-label svg { width: 15px; height: 15px; }
.pn-title { font-family: var(--disp); font-size: 1.18rem; color: var(--ink); line-height: 1.22; }
span.pn-slot { background: transparent; border: none; box-shadow: none; }
@media (max-width: 620px) { .post-nav { grid-template-columns: 1fr; }
  .pn-next { text-align: left; align-items: flex-start; } span.pn-slot { display: none; } }
.prose .lead-in::first-letter { font-family: var(--disp); font-size: 3.8rem; float: left; line-height: 0.7; padding: 0.32rem 0.55rem 0 0; color: var(--verm); }

.trait-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.6rem 0; }
@media (max-width: 560px) { .trait-lists { grid-template-columns: 1fr; } }

/* blog cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 0 0 1px var(--gold), var(--shadow); }
.post-card .thumb { margin: 12px 12px 0; aspect-ratio: 16/10; overflow: hidden; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--goldL); background: var(--card2); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.34) saturate(0.82) brightness(0.94) contrast(1.04); transition: transform .4s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
.post-card .body { padding: 0.9rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-family: var(--caps); font-weight: 600; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--goldT); }
.post-card h3 { font-family: var(--disp); font-weight: 400; font-size: 1.4rem; margin: 0.3rem 0 0.4rem; line-height: 1.14; }
.post-card h3 a { color: var(--ink); }
.post-card p { font-size: 0.92rem; color: var(--ink2); flex: 1; }
.post-card .meta { margin-top: 0.85rem; font-family: var(--caps); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--ink3); text-transform: uppercase; }

.article-header { text-align: center; max-width: 760px; margin: 0 auto clamp(1.4rem, 4vw, 2.2rem); }
.article-header .cat { font-family: var(--caps); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--goldT); }
.article-header h1 { font-family: var(--disp); font-weight: 400; font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 0.6rem 0; line-height: 1.1; }
.article-header .meta { font-family: var(--caps); color: var(--ink3); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.article-lede { font-family: var(--body); font-style: italic; font-size: 1.2rem; color: var(--ink2); line-height: 1.5; }
.article-figure { margin: 0 auto clamp(1.4rem,4vw,2.2rem); max-width: 940px; }

.breadcrumb { font-family: var(--caps); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 1.1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--ink3); } .breadcrumb a:hover { color: var(--goldT); }
.breadcrumb .sep { color: var(--gold); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.34rem 0.85rem; background: var(--parc2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink2); border-radius: 999px; }
/* A chip that leads somewhere: it lifts to gold on approach, like the gilded coin buttons. */
.chip-link { transition: color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.chip-link:hover, .chip-link:focus-visible { color: var(--goldT); box-shadow: inset 0 0 0 1px var(--gold); background: var(--card); }
.chip-link.is-active { color: var(--goldT); box-shadow: inset 0 0 0 1px var(--gold); background: var(--card); }

/* ---------- Head to head plate ---------- */
/* Two natures set against each other on one gilded leaf, with a seam down the middle. */
.vs-plate { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 1rem; max-width: 860px; margin: 0 auto clamp(1.6rem, 4vw, 2.4rem); padding: clamp(1.4rem, 4vw, 2.2rem); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); }
.vs-side { text-align: center; }
.vs-glyph { display: block; font-size: 1.8rem; line-height: 1; margin-bottom: 0.5rem; }
.vs-name { font-family: var(--disp); font-size: clamp(1.3rem, 3.4vw, 1.75rem); color: var(--ink); }
.vs-name:hover, .vs-name:focus-visible { color: var(--goldT); }
.vs-tag { font-size: 0.9rem; color: var(--ink2); margin-top: 0.25rem; }
.vs-quality { font-family: var(--caps); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); margin-top: 0.7rem; }
.vs-keys { justify-content: center; margin-top: 0.9rem; }
/* The seam: a gilded rule with VS resting on it. */
.vs-mid { align-self: stretch; display: flex; align-items: center; justify-content: center; font-family: var(--caps); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--goldT); padding-inline: 0.4rem; border-inline: 1px solid var(--line); }
@media (max-width: 640px) {
  .vs-plate { grid-template-columns: 1fr; gap: 0.4rem; }
  .vs-mid { border-inline: 0; border-block: 1px solid var(--line); padding-block: 0.6rem; }
}

/* The journal's category rail: sits under the page head on the index and every hub. */
.cat-nav { justify-content: center; margin-top: 1.6rem; }
.cat-nav .chip { font-size: 0.7rem; padding: 0.44rem 1.05rem; }

/* Category eyebrow on a card is a link now, so keep it looking like the label it was. */
.post-card .cat, .article-header .cat { display: inline-block; text-decoration: none; }
.post-card .cat:hover, .article-header .cat:hover, .post-card .cat:focus-visible, .article-header .cat:focus-visible { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.pill-cta { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: inset 0 2px 3px var(--bevelTop), inset 0 -3px 5px var(--bevelBot), var(--shadow); padding: 1.4rem 1.7rem; margin-block: 1.8rem; }
.pill-cta p { font-family: var(--disp); font-size: 1.4rem; }

.muted { color: var(--ink3); }
.center { text-align: center; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--parc); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; color: var(--parc); }

/* ---------- Mobile refinements ---------- */
@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  .header-inner { gap: 0.5rem; }
  .brand, .footer-brand .brand { font-size: 1.35rem; }
  .hero { padding-block: 1.8rem 2.2rem; }
  .hero h1 { font-size: clamp(2.05rem, 8.6vw, 3rem); }
  .quiz-compass { max-width: 226px; }
  .quiz-card { padding: 1.3rem 1.1rem; }
  .quiz-q { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .result-name { font-size: clamp(2.05rem, 9vw, 2.9rem); }
  .temp-header h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .section-title { font-size: clamp(1.65rem, 7vw, 2.4rem); }
  .btn-lg { font-size: 1.08rem; padding: 0.78rem 1.5rem; }
  .result-actions .btn, .hero-cta .btn { flex: 1 1 auto; }
  .virtus, .steps { gap: 0.8rem; }
  .corn { width: 19px; height: 19px; }
}
@media (max-width: 380px) {
  .hero-meta b { font-size: 1.5rem; }
  .quiz-opt .txt { font-size: 0.94rem; }
}

/* ---------- App feel (touch) ---------- */
* { -webkit-tap-highlight-color: transparent; }
html { overscroll-behavior-y: contain; }
@media (hover: none) and (pointer: coarse) {
  .btn:active { transform: scale(0.96); }
  .quiz-opt:active { transform: scale(0.98); }
  .temp-card:active, .post-card:active, .faq summary:active { transform: scale(0.992); }
  .icon-btn:active, .tab:active { transform: scale(0.92); }
}

/* ---------- Mobile app bottom bar ---------- */
.tabbar { display: none; }
@media (max-width: 880px) {
  .nav, .nav-toggle { display: none !important; }
  .site-header { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(64px + env(safe-area-inset-bottom)); padding: 0 3px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--parc2) 90%, transparent);
    backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line);
    box-shadow: 0 -1px 0 var(--lineS), 0 -8px 22px rgba(0,0,0,0.3);
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 3px; padding-top: 9px; color: var(--ink3); text-decoration: none; user-select: none;
    transition: transform .12s var(--ease), color .15s;
  }
  .tab .tab-ico { display: grid; place-items: center; width: 24px; height: 24px; }
  .tab .tab-ico svg { width: 24px; height: 24px; }
  .tab .tab-lbl { font-family: var(--caps); font-weight: 600; font-size: 0.56rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .tab[aria-current="page"] { color: var(--goldT); }
  .tab[aria-current="page"] .tab-ico { filter: drop-shadow(0 0 6px rgba(200,162,84,0.4)); }
  .tab-center { justify-content: flex-start; }
  .tab-center .tab-ico {
    width: 54px; height: 54px; margin-top: -20px; border-radius: 50%;
    background: radial-gradient(circle at 34% 26%, var(--goldL), var(--gold) 60%, var(--goldD));
    color: var(--onGold); border: 1px solid var(--goldD);
    box-shadow: 0 7px 18px rgba(150,110,40,0.5), inset 0 1px 0 rgba(255,245,210,0.6);
  }
  .tab-center .tab-ico svg { width: 27px; height: 27px; }
  .tab-center .tab-lbl { margin-top: 3px; color: var(--goldT); }
  .tab-center:active .tab-ico { transform: scale(0.94); }
  .tab-center[aria-current="page"] .tab-ico::after { display: none; }
}
