/* Credo — retro pixel look: two inks, square corners, solid offset shadows. */
@font-face { font-family: 'Credo Pixel'; src: url('/fonts/pixelify-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; size-adjust: 78%; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Credo Pixel'; src: url('/fonts/pixelify-sans-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; size-adjust: 78%; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Credo Pixel'; src: url('/fonts/pixelify-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; size-adjust: 78%; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Credo Pixel'; src: url('/fonts/pixelify-sans-latin-ext-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; size-adjust: 78%; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jersey 10'; src: url('/fonts/jersey-10-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Jersey 10'; src: url('/fonts/jersey-10-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+2113, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --background: #EFE6CC; --surface: #F8F2DF; --text: #2A1A22; --text-muted: #6B5A5C;
  --border: #2A1A22; --outline: #2A1A22; --divider: #E2D7B6; --shadow: #2A1A22;
  --primary: #8C2F39; --primary-text: #8C2F39; --on-primary: #F8F1DE;
  --test: #4A2C6B; --test-text: #5B3D8A; --on-test: #F8F1DE; --test-deep: #2B1A3D; --test-soft: #D9CDEB;
  --nemesis: #F2D0C4; --gold: #B8862B;
  --god: #E7B53C; --grace: #D9607A; --church: #5C8FC4; --method: #9A7FD6;
  --s0: #D45D6E; --s1: #EDB3BB; --s3: #C3B4E2; --s4: #6E54A8;
  --pixel: 'Credo Pixel', 'Jersey 10', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 3.5vw, 40px); --max: 1320px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #120E16; --surface: #1C1622; --text: #EEE4CF; --text-muted: #A99EA8;
    --border: #3E3046; --outline: #6E5A86; --divider: #2A2131; --shadow: #33263D;
    --primary: #E07A88; --primary-text: #EE93A0; --on-primary: #120E16;
    --test: #C3A6F0; --test-text: #C9AEF5; --on-test: #120E16; --test-deep: #241A33; --test-soft: #2C2240;
    --nemesis: #3A2026; --gold: #E2B65C;
    --s0: #E67C8B; --s1: #8A4D58; --s3: #6A5A92; --s4: #B79BEA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --background: #120E16; --surface: #1C1622; --text: #EEE4CF; --text-muted: #A99EA8;
  --border: #3E3046; --outline: #6E5A86; --divider: #2A2131; --shadow: #33263D;
  --primary: #E07A88; --primary-text: #EE93A0; --on-primary: #120E16;
  --test: #C3A6F0; --test-text: #C9AEF5; --on-test: #120E16; --test-deep: #241A33; --test-soft: #2C2240;
  --nemesis: #3A2026; --gold: #E2B65C;
  --s0: #E67C8B; --s1: #8A4D58; --s3: #6A5A92; --s4: #B79BEA;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--test-text) var(--divider); }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--divider); }
::-webkit-scrollbar-thumb { background: var(--test-text); border: 2px solid var(--outline); border-radius: 0; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; margin: 0; background: var(--background); color: var(--text); font-family: var(--mono); font-size: 16px; line-height: 1.6; }
body > main { flex: 1 0 auto; }
img { display: block; max-width: 100%; }
a { color: var(--primary-text); text-underline-offset: 3px; }
p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 700; line-height: .9; margin: 0; }
h1 { font-size: clamp(46px, 8.4vw, 80px); }
h2 { font-size: clamp(34px, 5.6vw, 50px); }
h3 { font-size: 27px; }
.pixel-art { image-rendering: pixelated; image-rendering: crisp-edges; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--surface); border: 2px solid var(--outline); padding: 8px 14px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.eyebrow { margin: 0 0 10px; font-family: var(--pixel); font-size: 19px; letter-spacing: .07em; text-transform: uppercase; color: var(--test-text); line-height: 1.1; }

/* Panels and buttons */
.panel { position: relative; background: var(--surface); border: 2px solid var(--outline); box-shadow: 6px 6px 0 var(--shadow); }
.panel.soft { border-color: var(--border); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; font-family: var(--pixel); font-size: 23px; line-height: 1; text-align: center; text-decoration: none; color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 4px 4px 0 var(--shadow); cursor: pointer; transition: transform 80ms, box-shadow 80ms; -webkit-tap-highlight-color: transparent; }
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.button:active { transform: translate(4px, 4px); box-shadow: none; }
.button.primary { background: var(--test); color: var(--on-test); }
.button.brand { background: var(--primary); color: var(--on-primary); }
.button .icon { width: 20px; height: 20px; }
.icon { display: inline-block; width: 22px; height: 22px; flex: none; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; image-rendering: pixelated; }
.link { background: none; border: 0; padding: 4px 2px; font: 400 15px var(--mono); color: var(--text-muted); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link:hover { color: var(--text); }
.link[aria-pressed="true"] { color: var(--test-text); font-weight: 500; }

/* Header — plain bar, not sticky (as on the reference site at every width) */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; color: var(--text); font: 700 32px/1 var(--pixel); }
.logo .logo-mark { width: 36px; height: 36px; border: 2px solid var(--outline); background: var(--test-soft); display: grid; place-items: center; overflow: hidden; }
.logo .logo-mark .mascot, .logo .logo-mark img { width: 26px; height: 30px; margin-top: 6px; }
.site-nav { display: flex; align-items: center; flex-shrink: 0; gap: 20px; font: 400 20.5px/1 var(--pixel); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--primary-text); }
.site-nav .nav-cast, .site-nav .nav-test { gap: 8px; padding: 0 14px; color: var(--on-primary); background: var(--primary); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); transition: transform 80ms, box-shadow 80ms; }
.site-nav .nav-test { color: var(--on-test); background: var(--test); }
.site-nav .nav-cast:hover, .site-nav .nav-test:hover { color: var(--on-primary); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.site-nav .nav-test:hover { color: var(--on-test); }
.site-nav a[aria-current] { box-shadow: none; }
.site-nav a[aria-current]:hover { transform: none; box-shadow: none; }
.site-nav .nav-method[aria-current] { color: var(--primary-text); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.site-nav .icon { width: 22px; height: 22px; }
.site-nav .label-short { display: none; }
.theme-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; font: 400 18px/1 var(--pixel); color: var(--text); background: none; border: 2px solid var(--outline); cursor: pointer; }
.theme-switch .icon { width: 24px; height: 24px; }
@media (max-width: 700px) {
  .site-header .wrap { gap: 6px; }
  .logo { gap: 6px; font-size: 21px; white-space: nowrap; }
  .logo .logo-mark { width: 26px; height: 26px; }
  .logo .logo-mark .mascot, .logo .logo-mark img { width: 18px; height: 21px; margin-top: 4px; }
  .site-nav { gap: 6px; font-size: 15.5px; }
  .site-nav .nav-cast, .site-nav .nav-test { gap: 4px; padding: 0 6px; }
  .site-nav .icon { width: 12px; height: 12px; }
  .theme-switch { padding: 0; width: 44px; justify-content: center; }
  .theme-switch .theme-name { display: none; }
}
@media (max-width: 400px) { .site-nav .label-long { display: none; } .site-nav .label-short { display: inline; } .site-nav .nav-method { display: none; } }

/* Footer — links + language box on one row, legal line beneath */
.site-footer { margin-top: 72px; padding: 28px 0 36px; border-top: 2px solid var(--border); font-size: 14px; color: var(--text-muted); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text); }
.footer-links a:hover, .footer-legal a:hover { color: var(--primary-text); }
.lang-switch { display: flex; margin: 0; border: 2px solid var(--outline); font: 400 18px/1 var(--pixel); }
.lang-switch > * { padding: 4px 9px; line-height: 1.2; color: var(--text-muted); text-decoration: none; }
.lang-switch > * + * { border-left: 2px solid var(--outline); }
.lang-switch [aria-current] { background: var(--primary); color: var(--on-primary); }
.footer-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 12px; }
.footer-legal a { color: var(--text-muted); }

/* ===== Landing ===== */
.start { padding-top: 26px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 0; text-wrap: balance; }
.hero .lead { margin-top: 18px; font-size: 18px; max-width: 62ch; color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { padding: 4px 10px; font-size: 13px; background: var(--surface); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.hero-cta p { font-size: 14px; }
.resume-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.resume-row .button { font-size: 20px; min-height: 46px; }
.invite-banner { margin: 0 0 22px; padding: 12px 16px; display: flex; gap: 14px; align-items: center; }

.hero-art { position: relative; display: grid; justify-items: center; padding: 0 64px 8px; }
.stack-label { margin: 0 0 14px; }
.stack { position: relative; width: 280px; aspect-ratio: 9 / 16; cursor: pointer; touch-action: pan-y; user-select: none; }
.stack-card { position: absolute; inset: 0; container-type: inline-size; transition: transform 320ms ease; }
.stack-card[data-place="0"] { z-index: 3; transform: none; }
.stack-card[data-place="1"] { z-index: 2; transform: translateX(18%) rotate(6deg) scale(.92); }
.stack-card[data-place="2"] { z-index: 1; transform: translateX(-18%) rotate(-6deg) scale(.92); }
.stack-dots { display: flex; gap: 10px; margin-top: 22px; }
.stack-dots button { width: 14px; height: 14px; padding: 0; border: 2px solid var(--outline); background: transparent; cursor: pointer; }
.stack-dots button[aria-current="true"] { background: var(--outline); }
.hero-mascot { position: absolute; right: 20px; bottom: 34px; width: 56px; height: 65px; z-index: 4; animation: bob 2.4s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* Story-format result card (example stack + share image preview) */
.story { container-type: inline-size; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 3cqw; padding: 6cqw 6cqw 5cqw; background: var(--test-deep); color: #F3EADB; border: 2px solid var(--outline); box-shadow: 6px 6px 0 var(--shadow); overflow: hidden; }
:root[data-theme="dark"] .story { box-shadow: 6px 6px 0 #000; }
.story .s-eyebrow { font: 400 5.4cqw/1 var(--pixel); color: #C9AEF5; letter-spacing: .06em; text-transform: uppercase; }
.story .s-title { font: 400 11cqw/0.95 var(--pixel); color: #FFF6E2; }
.story .s-match { display: flex; gap: 4cqw; align-items: center; padding: 3cqw; background: rgba(255,255,255,.06); border: 2px solid #6E5A86; }
.story .s-pct { font: 400 16cqw/0.9 var(--pixel); color: #E2B65C; }
.story .s-small { font: 400 4cqw/1.3 var(--mono); color: #CFC3DA; }
.story .s-name { font: 400 7cqw/1 var(--pixel); color: #FFF6E2; }
.story .s-axes { display: grid; gap: 2.4cqw; }
.story .s-axis { display: grid; gap: 1cqw; }
.story .s-axis b { font: 400 5.2cqw/1 var(--pixel); color: #FFF6E2; font-weight: 400; }
.story .s-track { position: relative; height: 2.6cqw; background: #3B2B50; border: 1px solid #8A74A8; }
.story .s-track i { position: absolute; top: 50%; width: 4.2cqw; height: 4.2cqw; margin: -2.1cqw 0 0 -2.1cqw; background: var(--c, #E2B65C); border: 2px solid #120E16; }
.story .s-list { display: grid; gap: 1.6cqw; }
.story .s-row { display: flex; align-items: center; gap: 2.4cqw; font: 400 4cqw/1.2 var(--mono); }
.story .s-row span:last-child { margin-left: auto; font: 400 6cqw/1 var(--pixel); color: #E2B65C; }
.story .s-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; font: 400 4.6cqw/1 var(--pixel); color: #E2B65C; }
.story .s-foot img { width: 11cqw; height: 12.8cqw; }

/* Lengths dialog */
.dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 30px; color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 8px 8px 0 var(--shadow); overflow: auto; }
.dialog::backdrop { background: rgba(26, 18, 26, .66); }
.dialog[open] { animation: pop 160ms ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
body:has(.dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.dialog-head h2 { font-size: 34px; }
.dialog-close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; transition: transform 80ms, box-shadow 80ms; }
.dialog-close:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.versions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0 6px 6px 0; }
.version { display: flex; flex-direction: column; padding: 24px; }
.version-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 400 21px/1 var(--pixel); letter-spacing: .07em; text-transform: uppercase; color: var(--test-text); }
.badge { padding: 3px 8px; font: 500 12px/1.2 var(--mono); letter-spacing: 0; text-transform: none; color: var(--test-deep); background: var(--surface); border: 2px solid var(--outline); }
.version-count { margin-top: 18px; font-size: 16px; }
.version-count strong { font: 400 66px/0.9 var(--pixel); margin-right: 6px; }
.version-blurb { margin-top: 16px; font-size: 15px; flex: 1; }
.version-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.depth { display: inline-flex; gap: 5px; }
.depth i { width: 18px; height: 6px; background: var(--divider); }
.depth i.on { background: var(--text); }
.version .button { margin-top: 22px; width: 100%; }
.version.featured { background: var(--test-deep); color: #F3EADB; border-color: var(--outline); }
.version.featured .version-name { color: #C9AEF5; }
.version.featured .version-meta { color: #BFB2CC; }
.version.featured .depth i { background: #4A3A60; }
.version.featured .depth i.on { background: #F3EADB; }
.version.featured .button { background: #EDE3CB; color: #2A1A22; box-shadow: 4px 4px 0 #120E16; }
@media (max-width: 860px) { .versions { grid-template-columns: 1fr; } .dialog { padding: 20px; } .version-count strong { font-size: 54px; } }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 64px; }
.how-copy p { margin-top: 16px; max-width: 64ch; }
.section-title { margin-bottom: 22px; }
.how-visual { padding: 28px; }
.how-visual h3 { margin: 6px 0 26px; font-size: 30px; }
.how-visual > p.muted { margin-top: 22px; font-size: 13px; }
.sources-note { font-size: 13px; }
.cast { margin-top: 96px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; justify-self: center; }
  .hero-copy { display: flex; flex-direction: column; }
  .hero-copy .hero-cta { order: 1; margin: 18px 0 4px; }
  .hero-copy .lead, .hero-copy .facts { order: 2; }
  .hero-copy .resume-row { order: 1; }
  .hero h1 { font-size: 50px; }
  .hero .lead { margin-top: 14px; font-size: 16px; }
  .facts { margin-top: 18px; }
}
@media (max-width: 520px) {
  .hero-art { padding: 0 40px; }
  .stack-label { display: none; }
  .stack { width: 132px; }
  .stack-dots { margin-top: 14px; }
  .hero-mascot { right: 4px; bottom: 18px; width: 34px; height: 40px; }
  .hero-cta .button { width: 100%; }
}
@media (max-width: 900px) {
  .how { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* Branch tag */
.branch-tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; font: 400 18px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; background: var(--background); border: 2px solid var(--outline); }
.branch-tag img { width: 22px; height: 22px; }

/* ===== Quiz ===== */
.quiz { display: flex; flex-direction: column; justify-content: center; min-height: calc(100svh - 230px); padding: 10px 0 20px; }
.quiz-wrap { width: 100%; max-width: 860px; margin: 0 auto; }
.quiz-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.quiz-bar > :last-child { justify-self: end; }
.quiz-bar > :first-child { justify-self: start; }
.count { font: 400 22px/1 var(--pixel); }
.progress { height: 14px; margin: 12px 0 26px; background: var(--surface); border: 2px solid var(--outline); }
.progress i { display: block; height: 100%; width: 0; background: var(--test); transition: width 220ms ease-out; }
.qcard { padding: clamp(20px, 4vw, 34px); }
.qcard-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.understand { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; font: 400 18px/1 var(--pixel); color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; transition: transform 80ms, box-shadow 80ms; }
.understand:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.help-mark { display: grid; place-items: center; width: 20px; height: 20px; font: 400 16px/1 var(--pixel); color: var(--on-test); background: var(--test); }
.statement { font: 500 clamp(21px, 3vw, 28px)/1.42 var(--mono); text-wrap: balance; }
.statement.small { font-size: clamp(18px, 2.4vw, 23px); }
.card-eyebrow { font: 400 19px/1.1 var(--pixel); letter-spacing: .07em; text-transform: uppercase; color: var(--test-text); }
.dilemma-art { width: min(100%, 384px); aspect-ratio: 2 / 1; margin: 0 auto 24px; clip-path: polygon(0 6px, 3px 6px, 3px 3px, 6px 3px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 3px, calc(100% - 3px) 3px, calc(100% - 3px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 3px) calc(100% - 6px), calc(100% - 3px) calc(100% - 3px), calc(100% - 6px) calc(100% - 3px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 3px), 3px calc(100% - 3px), 3px calc(100% - 6px), 0 calc(100% - 6px)); background: var(--outline); padding: 3px; }
.dilemma-art img { width: 100%; height: 100%; object-fit: cover; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.choices { display: grid; gap: 14px; margin-top: 26px; }
.option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; min-height: 104px; padding: 14px 10px 18px; font: 400 15px/1.3 var(--mono); text-align: center; color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 4px 4px 0 var(--shadow); cursor: pointer; transition: transform 80ms, box-shadow 80ms, background 120ms; -webkit-tap-highlight-color: transparent; }
.option::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--strip, transparent); }
.option:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.option:active { transform: translate(4px, 4px); box-shadow: none; }
.option.scale-0 { --strip: var(--s0); } .option.scale-1 { --strip: var(--s1); } .option.scale-3 { --strip: var(--s3); } .option.scale-4 { --strip: var(--s4); }
.choices .option { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; min-height: 64px; padding: 14px 18px; font-size: 16px; gap: 14px; }
.key { display: grid; place-items: center; width: 26px; height: 26px; flex: none; font: 400 19px/1 var(--pixel); border: 2px solid var(--outline); background: var(--background); }
.option[aria-pressed="true"] { background: var(--test); color: var(--on-test); }
.option[aria-pressed="true"]::after { display: none; }
.option[aria-pressed="true"] .key { background: transparent; border-color: var(--on-test); color: var(--on-test); }
.extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; margin-top: 22px; }
.quiz-foot { margin-top: 18px; text-align: center; font-size: 13px; min-height: 20px; }
.quiz-state { text-align: center; padding: 40px 0; display: grid; justify-items: center; gap: 16px; }
.quiz-state img { width: 96px; height: 112px; }
@media (max-width: 680px) {
  .scale { grid-template-columns: 1fr; gap: 10px; }
  .scale .option { flex-direction: row; min-height: 50px; padding: 8px 12px 12px; text-align: left; gap: 12px; }
  .scale .option::after { height: 5px; }
  .statement { font-size: 20px !important; }
  .statement.small { font-size: 18px !important; }
  .extras { flex-direction: row !important; flex-wrap: wrap; justify-content: center; gap: 4px 18px !important; }
  .extras .link { font-size: 13px; }
  .quiz { justify-content: flex-start; min-height: 0; }
  .qcard-tools { margin-bottom: 18px; }
}

/* Help (understand) dialog */
.help { width: min(680px, calc(100vw - 32px)); }
.help section + section { margin-top: 20px; }
.help h3 { font-size: 24px; margin-bottom: 6px; }
.help p { font-size: 15px; }
.help .help-note { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--divider); font-size: 12.5px; color: var(--text-muted); }

/* Reveal overlay */
.reveal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(18, 14, 22, .93); color: #F3EADB; cursor: pointer; transition: opacity 260ms; }
.reveal.out { opacity: 0; }
.reveal-stage { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.reveal-stage .r-por { width: 192px; height: 192px; border: 3px solid #C3A6F0; box-shadow: 8px 8px 0 #000; opacity: 0; transform: scale(.8); transition: opacity 300ms, transform 300ms steps(4); }
.reveal-stage.go .r-por { opacity: 1; transform: none; }
.reveal-stage .r-pct { font: 400 92px/0.9 var(--pixel); color: #E2B65C; }
.reveal-stage .r-line { font: 400 30px/1 var(--pixel); opacity: .9; }
.reveal-stage .r-mascot { width: 72px; height: 84px; }
.reveal-skip { margin-top: 10px; background: none; border: 0; color: #BFB2CC; font: 400 13px var(--mono); text-decoration: underline; cursor: pointer; }

/* ===== Result ===== */
.result-wrap { display: grid; gap: 72px; padding-top: 18px; }
.result-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: start; }
.match { padding: 26px; background: var(--test-deep); color: #F3EADB; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
:root[data-theme="dark"] .match, :root[data-theme="dark"] .story { box-shadow: 6px 6px 0 #000; }
.match-score { font: 400 clamp(64px, 9vw, 96px)/0.85 var(--pixel); color: #E2B65C; }
.match .eyebrow { color: #C9AEF5; margin: 6px 0 12px; }
.match-name { font: 400 clamp(32px, 4vw, 42px)/1 var(--pixel); color: #FFF6E2; }
.match-name a { color: inherit; text-decoration: none; }
.match-name a:hover { text-decoration: underline; }
.match .muted { color: #BFB2CC; font-size: 14px; margin-top: 6px; }
.why { grid-column: 1 / -1; }
.why .muted { font-size: 13px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 5px 10px; font-size: 13px; color: #F3EADB; background: rgba(255,255,255,.07); border: 2px solid #6E5A86; }
.also { grid-column: 1 / -1; display: grid; gap: 8px; margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid rgba(195,166,240,.25); }
.also-label { font: 400 17px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: #C9AEF5; }
.also li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.also li a { color: #F3EADB; text-decoration: none; }
.also li a:hover { text-decoration: underline; }
.also li .num { margin-left: auto; font: 400 24px/1 var(--pixel); color: #E2B65C; }
.result-copy { display: grid; gap: 16px; align-content: start; }
.result-copy h1 { font-size: clamp(44px, 6.4vw, 72px); }
.result-def { font-size: 15px; max-width: 54ch; }
.shared-note { padding: 10px 14px; font-size: 14px; background: var(--test-soft); border: 2px dashed var(--outline); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.share-buttons .button { font-size: 21px; min-height: 48px; padding: 0 16px; }
.friend-label { margin-top: 8px; font: 400 18px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--test-text); }
.friend-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; color: var(--text); cursor: pointer; font: inherit; transition: transform 80ms, box-shadow 80ms; }
.friend-tile:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--shadow); }
.friend-tile .tile-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--grace); border: 2px solid var(--outline); }
.friend-tile .tile-icon img { width: 26px; height: 26px; }
.friend-tile strong { display: block; font: 400 23px/1 var(--pixel); }
.friend-tile span.muted { font-size: 13px; }

.branch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.branch-panel { padding: 24px 26px 26px; }
.branch-summary { margin-top: 14px; font: 400 21px/1.15 var(--pixel); color: var(--test-text); }

.people { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.people-list { display: grid; gap: 14px; margin: 0; padding: 0 6px 6px 0; list-style: none; }
.people-list li { display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 12px; background: var(--surface); border: 2px solid var(--outline); box-shadow: 4px 4px 0 var(--shadow); }
.people-list li a { color: inherit; text-decoration: none; }
.people-list li a:hover strong { text-decoration: underline; }
.person { display: grid; gap: 2px; min-width: 0; }
.person strong { font: 400 23px/1 var(--pixel); }
.person .muted { font-size: 13px; }
.num { margin-left: auto; font: 400 30px/1 var(--pixel); }
.people-list.nemesis li { background: var(--nemesis); }

.survey { padding: 34px; }
.survey .lead2 { margin-top: 8px; font-size: 14px; max-width: 80ch; }
.majority { margin-top: 18px; font: 400 27px/1.1 var(--pixel); color: var(--test-text); }
.survey-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; margin-top: 28px; }
.survey h3 { font-size: 25px; margin-bottom: 14px; }
.bars { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 1.2fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.bars li a { color: var(--text); }
.bar { height: 14px; background: var(--background); border: 2px solid var(--outline); position: relative; }
.bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); background: var(--test); }
.bars .num { font-size: 22px; margin: 0; }
.note { margin-top: 12px; font-size: 12.5px; }
.dilemma-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; margin: 0; padding: 0; list-style: none; }
.dilemma-list li { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 2px solid var(--divider); font-size: 13.5px; }
.dilemma-list strong { font: 400 20px/1 var(--pixel); }
.nodata { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding: 16px; border: 2px dashed var(--border); }
.nodata img { width: 48px; height: 56px; }
.foot-note { font-size: 13px; max-width: 90ch; }
.share-panel { padding: 30px; display: grid; gap: 28px; }
.share-strip { display: grid; gap: 22px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }
.share-actions .button { font-size: 21px; min-height: 48px; padding: 0 16px; }
.share-mascot { width: 54px; height: 63px; }
@media (max-width: 960px) {
  .result-hero, .people, .survey-grid, .share-strip { grid-template-columns: 1fr; }
  .branch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .match { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px; }
  .match .why, .match .also { grid-column: 1 / -1; }
  .match-score { font-size: 48px !important; }
  .match-name { font-size: 26px !important; }
  .dilemma-list { grid-template-columns: 1fr; }
  .survey, .share-panel { padding: 22px; }
  .result-wrap { gap: 56px; }
}

/* ===== Theologians ===== */
.page-head { margin: 18px 0 30px; display: grid; gap: 14px; }
.page-head .lead { max-width: 70ch; }
.filter { width: 100%; max-width: 520px; min-height: 50px; padding: 0 14px; font: 400 15px var(--mono); color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 4px 4px 0 var(--shadow); }
.era-title { margin: 44px 0 18px; font-size: 34px; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.t-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; color: var(--text); text-decoration: none; transition: transform 80ms, box-shadow 80ms; }
.t-card:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--shadow); }
.t-card .t-copy { display: grid; gap: 4px; min-width: 0; }
.t-card strong { font: 400 24px/1 var(--pixel); }
.t-card .muted { font-size: 12.5px; }
.t-card .t-tag { font-size: 13px; }
.t-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; margin-top: 10px; }
.t-detail h1 { font-size: clamp(44px, 6.4vw, 72px); margin: 4px 0 10px; }
.t-detail .tagline { font: 400 26px/1.1 var(--pixel); color: var(--test-text); margin-top: 10px; }
.t-detail .bio { margin-top: 16px; max-width: 70ch; }
.credit { margin-top: 14px; font-size: 12px; color: var(--text-muted); }
.credit a { color: var(--text-muted); }
.crumbs { font-size: 13px; margin-bottom: 8px; }
.crumbs a { color: var(--text-muted); }
.t-section { margin-top: 64px; }
.two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; }
.basis { padding: 22px; margin-top: 26px; }
.basis h3 { font-size: 24px; margin-bottom: 8px; }
.works { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }

/* ===== About ===== */
.prose { max-width: 820px; }
.prose h2 { margin: 52px 0 14px; font-size: 38px; }
.prose h3 { margin: 26px 0 8px; font-size: 26px; }
.prose p, .prose li { font-size: 15.5px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; display: grid; gap: 10px; }
.notice { padding: 20px 22px; margin-top: 26px; border-left: 10px solid var(--gold); }
.err { text-align: center; display: grid; justify-items: center; gap: 18px; padding: 60px 0; }
.err img { width: 96px; height: 112px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Go further (two cross-link cards) */
.further { margin-top: 64px; }
.further-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.further-card { display: grid; grid-template-rows: auto 1fr; gap: 24px; min-width: 0; padding: 28px; color: var(--text); text-decoration: none; border-top: 6px solid var(--primary); transition: transform 80ms, box-shadow 80ms; }
.further-card[data-tone="method"] { border-top-color: var(--test); }
.further-card:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--shadow); }
.further-faces { display: grid; grid-template-columns: repeat(4, 60px); gap: 8px; }
.further-icon { display: grid; place-items: center; width: 60px; height: 60px; background: color-mix(in srgb, var(--c) 30%, var(--surface)); outline: 2px solid var(--border); }
.further-icon img { width: 32px; height: 32px; outline: 0; }
.further-copy { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; justify-items: start; min-width: 0; }
.further-copy strong { font: 400 34px/1.05 var(--pixel); }
.further-copy .muted { font-size: 14px; line-height: 1.5; }
.further-copy .button { margin-top: 4px; background: var(--primary); color: var(--on-primary); }
.further-card[data-tone="method"] .button { background: var(--test); color: var(--on-test); }
@media (max-width: 860px) { .further-grid { grid-template-columns: 1fr; } .further-card { padding: 20px; } .further-faces { gap: 4px; } .further-copy strong { font-size: 30px; } .further-copy .button { width: 100%; } }
.friend-cta { margin-top: 18px; }
@media (max-width: 860px) { .people { grid-template-columns: minmax(0, 1fr); } }
.people-list li { min-width: 0; } .people-list .person { flex: 1 1 0; } .person strong { overflow-wrap: anywhere; }

/* Keep thinking panel */
.keep { margin-top: 64px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 30px 40px; background: var(--test-soft); }
.keep-mascot { width: 96px; height: 112px; animation: bob 2.4s steps(2) infinite; }
.keep-copy h2 { font-size: clamp(30px, 4vw, 40px); }
.keep-copy p { margin-top: 8px; max-width: 70ch; }
.keep-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 18px; }
.card-eyebrow { color: var(--text-muted) !important; }
@media (max-width: 560px) { .keep { grid-template-columns: 1fr; padding: 22px; gap: 14px; } .keep-mascot { width: 64px; height: 75px; } .share-actions .button { flex: 1 1 auto; } }
.share-panel .further { margin-top: 12px; }
.share-panel .further .section-title { font-size: clamp(26px, 3.4vw, 34px); }

/* ======================= v3: animated pixel art, real portraits, cast filters, glossary ======================= */
/* -- Mascot: 4-frame idle sprite (flicker, flicker, blink) + gentle bob; size via --mw/--mh or a context rule -- */
:where(.mascot) { width: var(--mw, 24px); height: var(--mh, 28px); }
.mascot { display: inline-block; flex: none; position: relative; overflow: hidden; vertical-align: middle; }
.mascot img { display: block; width: 400% !important; height: 100% !important; max-width: none; image-rendering: pixelated; animation: mascot-idle 3.2s steps(1, end) infinite; }
@keyframes mascot-idle { 0% { transform: translateX(0); } 22% { transform: translateX(-25%); } 44% { transform: translateX(-50%); } 66% { transform: translateX(-25%); } 86% { transform: translateX(-75%); } 92% { transform: translateX(0); } }
.mascot.hop { animation: hop 420ms steps(4, end); }
@keyframes hop { 40% { transform: translateY(-6px); } 70% { transform: translateY(-2px); } }
.logo .logo-mark .mascot { width: 30px; height: 35px; margin-top: 6px; }
.quiz-state .mascot, .err .mascot { width: 96px; height: 112px; }
.nodata .mascot { width: 48px; height: 56px; }
.hero-mascot, .keep-mascot { animation: bob 2.4s steps(2) infinite; }
.logo:hover .logo-mark { animation: wiggle 360ms steps(3, end); }
@keyframes wiggle { 33% { transform: rotate(-4deg); } 66% { transform: rotate(4deg); } }

/* -- Pixel portraits: 3-frame idle (base, breath, candle-glow), desynchronised per theologian via --d -- */

/* -- Real portraits (Wikimedia Commons), 4:5 -- */

/* -- Theologian detail -- */
.t-detail { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; align-items: start; }
.t-figure { margin: 0; }
.t-frame { position: relative; width: fit-content; }
.t-figure .credit { margin-top: 34px; max-width: 300px; line-height: 1.5; }
.t-intro { padding-top: 6px; }
.t-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
@media (max-width: 860px) {
  .t-detail { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .t-figure .credit { max-width: none; margin-top: 28px; }
}

/* -- Cast index (search, chips, sort) -- */
.cast-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.cast-mascot { width: 72px; height: 84px; }
.cast-tools { display: grid; gap: 14px; padding: 18px 20px; margin-bottom: 8px; position: sticky; top: 8px; z-index: 5; }
.search-box { display: flex; align-items: center; gap: 10px; }
.search-box .icon { color: var(--text-muted); }
.search-box .filter { max-width: none; box-shadow: none; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-label { width: 84px; font: 400 18px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; font: 400 13.5px/1 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); box-shadow: 2px 2px 0 var(--shadow); cursor: pointer; transition: transform 80ms, box-shadow 80ms; }
.chip:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.chip[aria-pressed="true"] { background: var(--test); color: var(--on-test); }
.chip-n { font: 400 15px/1 var(--pixel); opacity: .7; }
.cast-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.sort { display: flex; gap: 14px; }
.era-title { display: flex; align-items: baseline; gap: 12px; }
.era-title .muted { font-size: 22px; }
.t-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.t-card { align-items: stretch; gap: 16px; }
.t-card .t-trad { font-size: 12.5px; color: var(--test-text); }
.t-card .t-tag { margin-top: 2px; }
.t-empty { display: grid; justify-items: center; gap: 12px; padding: 50px 0; text-align: center; }
@media (max-width: 680px) {
  .cast-tools { position: static; padding: 14px; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-label { width: auto; flex: none; }
  .chip { flex: none; }
  .cast-mascot { width: 48px; height: 56px; }
  .t-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* -- Credits -- */
.credit-list { list-style: none; padding: 0 !important; display: grid; gap: 16px !important; margin-top: 30px; }
.credit-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.credit-list .credit { margin-top: 4px; font-size: 12.5px; }

/* -- Quiz: buddy mascot, animated progress, glossary terms -- */
.count { display: inline-flex; align-items: center; gap: 10px; }
.q-mascot { width: 24px; height: 28px; }
.progress { position: relative; overflow: visible; }
.progress i { position: relative; transition: width 420ms steps(6, end); background-image: repeating-linear-gradient(90deg, transparent 0 8px, rgba(255,255,255,.18) 8px 12px); background-size: 24px 100%; animation: march 1.2s steps(6, end) infinite; }
.progress i::after { content: ""; position: absolute; right: -6px; top: -5px; width: 10px; height: 20px; background: var(--gold); border: 2px solid var(--outline); animation: blink 1s steps(2, end) infinite; }
@keyframes march { to { background-position: 24px 0; } }
@keyframes blink { 50% { opacity: .25; } }
.progress.milestone { animation: shake 300ms steps(3, end); }
@keyframes shake { 33% { transform: translateX(-3px); } 66% { transform: translateX(3px); } }
.term { display: inline; padding: 0; margin: 0; font: inherit; color: inherit; background: none; border: 0; text-decoration: underline dotted var(--test-text); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: help; }
.term:hover, .term[aria-expanded="true"] { color: var(--test-text); background: var(--test-soft); }
.term-pop { position: absolute; z-index: 60; padding: 16px 44px 16px 18px; }
.term-pop .term-title { font: 400 24px/1 var(--pixel); color: var(--test-text); margin-bottom: 8px; }
.term-pop .term-def { font-size: 14px; line-height: 1.5; }
.term-pop .dialog-close { position: absolute; top: 8px; right: 8px; }
.term-pop.pop-in { animation: pop 180ms steps(3, end); }
.dilemma-art img { animation: none; } /* v12: pixel-art scene images are static (no wipe-in) */

/* -- Reveal: real portrait, hit flash, pixel confetti -- */
.reveal-stage .r-por { display: block; width: 192px; height: 192px; overflow: hidden; border: 3px solid #C3A6F0; box-shadow: 8px 8px 0 #000; opacity: 0; transform: scale(.8); transition: opacity 300ms, transform 300ms steps(4); }
.reveal-stage.go .r-por { opacity: 1; transform: none; }
.reveal-stage.hit .r-por { animation: flash 500ms steps(4, end); }
@keyframes flash { 25% { filter: brightness(1.6); } 50% { filter: none; } 75% { filter: brightness(1.3); } }
.reveal-stage .r-mascot { width: 72px; height: 84px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 101; }
.confetti i { position: absolute; top: -12px; display: block; animation: fall var(--t) steps(14, end) var(--dl) forwards; box-shadow: 2px 2px 0 rgba(0,0,0,.35); }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(var(--dx), var(--dy)) rotate(270deg); opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
  .progress i, .progress i::after { animation: none !important; }
  .confetti { display: none; }
}
.quiz { min-height: calc(100svh - 92px); }
.quiz-wrap { max-width: 820px; }
@media (max-width: 680px) { .quiz { min-height: calc(100svh - 80px); } }
.hero-mascot { right: 30px; bottom: 44px; }
@media (max-width: 560px) { .hero-mascot { right: 4px; bottom: 30px; } }
@media (max-width: 560px) { .hero-mascot { right: 22px; bottom: 52px; } }
.progress i { min-width: 6px; }
.mascot.hero-mascot { position: absolute; right: 26px; bottom: 56px; z-index: 4; }
@media (max-width: 560px) { .mascot.hero-mascot { right: 18px; bottom: 44px; } }

/* ======================= v4: real faces everywhere, reference-style axis rows, mobile pass ======================= */
@media (max-width: 860px) { .t-detail { grid-template-columns: minmax(0, 1fr); } .two { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .mascot img { animation: none !important; transform: none !important; } }

/* -- Faces: real colour portrait (Commons) or initials monogram. --w sets the width. -- */
.face { --w: 60px; position: relative; display: block; flex: none; width: var(--w); aspect-ratio: 1; overflow: hidden; border: 2px solid var(--outline); background: var(--divider); }
.face.face-tall { aspect-ratio: 4 / 5; }
.face > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.face.face-tall > img { object-position: 50% 50%; }
.face-mono { display: grid; place-items: center; background: var(--test-deep); color: #E2B65C; box-shadow: inset 0 0 0 calc(var(--w) * .06) var(--test-deep), inset 0 0 0 calc(var(--w) * .06 + 2px) #6E5A86; }
.face-mono > span { font: 500 calc(var(--w) * .36)/1 var(--mono); letter-spacing: -.02em; }
.face.face-tall.face-mono > span { font-size: calc(var(--w) * .34); }
.people-list li:hover .face, .also li:hover .face, .t-card:hover .face, .credit-list li:hover .face, .further-card:hover .ff:nth-child(odd) { animation: wiggle 360ms steps(3, end); }
.further-card:hover .ff:nth-child(even) { animation: wiggle 360ms steps(3, end) 90ms; }

/* where faces sit */
.invite-banner .face { --w: 48px; }
.story .s-por { border: 2px solid #C3A6F0; }
.story .s-row .face { border: 1px solid #8A74A8; }
.story .face-mono > span { font-size: calc(var(--w) * .36); }
.further-faces { display: grid; grid-template-columns: repeat(4, 60px); gap: 8px; }
.further-faces .ff { outline: 0; border-color: var(--border); }
.match > .face { border-color: #C3A6F0; }
.also .face { border-color: #6E5A86; }
.people-list .face { --w: 60px; }
.t-card .face { align-self: flex-start; }
.t-frame .face { width: var(--w); max-width: 100%; box-shadow: 8px 8px 0 var(--shadow); }
.reveal-stage .r-por { width: 192px; height: 192px; border: 3px solid #C3A6F0; }
.bar-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-who .face { --w: 32px; }
.bar-who a { overflow-wrap: anywhere; }
@media (max-width: 860px) { .t-frame .face { --w: 220px !important; } }
@media (max-width: 560px) { .match > .face { --w: 112px !important; } .people-list .face { --w: 52px !important; } }

/* -- Axis rows, after the reference: 10px track, square marker with a heavy outline, poles at the ends -- */
.axes { display: grid; gap: 18px; margin: 20px 0 0; padding: 0; list-style: none; }
.axes li.blank { opacity: .55; }
.axis-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.axis-name { font-size: 13px; color: var(--text-muted); }
.axis-lean { flex: none; max-width: 50%; text-align: right; font: 400 19px/1.05 var(--pixel); }
.track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 6px; font-size: 11.5px; line-height: 1.3; color: var(--text-muted); }
.track > .pole:last-child { text-align: right; }
.track-line { position: relative; height: 10px; background: var(--divider); border: 2px solid var(--outline); }
.track-line i { position: absolute; z-index: 2; top: 50%; left: calc(var(--x) * 1%); width: 16px; height: 16px; background: var(--branch); border: 3px solid var(--outline); transform: translate(-50%, -50%); }
.track-line b.them { position: absolute; z-index: 1; top: 50%; left: calc(var(--x) * 1%); width: 6px; height: 24px; background: var(--text); border: 0; transform: translate(-50%, -50%); }
.like-me { margin-top: 4px; font-size: 12px; color: var(--test-text); }
.axis-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: -8px 0 22px; font: 400 18px/1.1 var(--pixel); }
.axis-legend span { display: inline-flex; align-items: center; gap: 8px; }
.axis-legend .lg-you::before { content: ""; width: 14px; height: 14px; flex: none; background: linear-gradient(90deg, var(--god) 0 25%, var(--grace) 25% 50%, var(--church) 50% 75%, var(--method) 75%); border: 3px solid var(--outline); box-sizing: border-box; }
.axis-legend .lg-them::before { content: ""; width: 6px; height: 20px; flex: none; background: var(--text); }
.branch-panel { padding: 22px 24px 24px; }
.branch-summary { margin-top: 8px; font-size: 19px; }
@media (max-width: 700px) {
  .branch-summary { display: none; }
  .axes { gap: 20px; }
  .axis-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .axis-name { font-size: 12.5px; }
  .axis-lean { max-width: none; text-align: left; font-size: 19px; }
  .track { grid-template-columns: 1fr 1fr; grid-template-areas: "line line" "left right"; gap: 8px 12px; font-size: 11px; }
  .track .track-line { grid-area: line; }
  .track > .pole:first-child { grid-area: left; }
  .track > .pole:last-child { grid-area: right; }
  .branch-panel { padding: 18px 18px 20px; }
}

/* -- Landing "one axis, close up", after the reference -- */
.example-axis { position: relative; height: 20px; background: var(--divider); border: 2px solid var(--outline); }
.example-axis i { position: absolute; top: 50%; left: 36%; width: 20px; height: 24px; background: var(--god); border: 2px solid var(--outline); transform: translate(-50%, -50%); transition: left 300ms; }
.example-poles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; margin-top: 22px; font-size: 13px; color: var(--text); overflow-wrap: break-word; hyphens: auto; }
.example-poles strong { font: 500 13px/1.45 var(--mono); color: var(--test-text); text-align: center; }
.example-poles > :last-child { text-align: right; }

/* -- Survey bars: name · bar · %, stacked on phones -- */
.bars li { grid-template-columns: minmax(0, 1.2fr) minmax(80px, 1.2fr) auto; }
@media (max-width: 700px) {
  .bars li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who num" "bar bar"; gap: 8px 12px; }
  .bars li > .bar-who { grid-area: who; } .bars li > .bar { grid-area: bar; } .bars li > .num { grid-area: num; }
}


.how-visual { margin: 0; }
.stack-dots { gap: 0; margin-top: 12px; }
.stack-dots button { position: relative; width: 44px; height: 44px; border: 0; background: transparent; }
.stack-dots button::before { content: ""; position: absolute; left: 15px; top: 15px; width: 14px; height: 14px; border: 2px solid var(--outline); box-sizing: border-box; }
.stack-dots button[aria-current="true"] { background: transparent; }
.stack-dots button[aria-current="true"]::before { background: var(--outline); }
.sort .link { min-height: 44px; padding: 0 6px; }
.result-wrap > .keep { margin-top: 0; }
@media (max-width: 700px) {
  .track > .pole { align-self: start; }
  .share-buttons .button, .keep-actions .button { flex: 1 1 calc(50% - 14px); padding: 0 12px; }
  .keep-actions .button { flex-basis: 100%; }
  .how-visual { padding: 22px 20px; }
  .how-visual h3 { font-size: 26px; }
}
section.cast { margin-top: 0; }
.crumbs { margin: 10px 0 14px; }
.quiz-bar .link, .extras .link { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
.understand { white-space: nowrap; min-height: 44px; }
@media (max-width: 700px) {
  .cast-head { position: relative; grid-template-columns: minmax(0, 1fr); }
  .cast-head .cast-mascot { position: absolute; right: 0; top: 0; }
  .chip { min-height: 44px; }
  .chip-label { position: sticky; left: 0; z-index: 1; align-self: stretch; display: flex; align-items: center; padding-right: 8px; background: var(--surface); }
  .footer-links a, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-links { gap: 0 20px; }
  .footer-legal { gap: 0 16px; }
  .site-footer { margin-top: 48px; padding-top: 18px; }
  .branch-tag { font-size: 16px; }
  .qcard-tools { gap: 10px; }
  .quiz-bar { gap: 6px; }
  .quiz-bar .link { font-size: 14px; }
  .extras { gap: 0 18px !important; }
}
@media (max-width: 380px) { .qcard .branch-tag { font-size: 14px; padding: 4px 8px 4px 4px; } .understand { padding: 0 10px; font-size: 16px; } }

/* -- About / Support / legal pages -- */
.page-cta { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 30px !important; }
.faq { margin: 0; display: grid; gap: 4px; }
.faq dt { margin-top: 18px; font-weight: 500; }
.faq dd { margin: 4px 0 0; font-size: 15.5px; color: var(--text-muted); }
.prose code { font-family: var(--mono); background: var(--divider); padding: 0 4px; }
.feedback { display: grid; gap: 18px; padding: 24px; margin-top: 8px; }
.feedback label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.feedback label .muted { font-weight: 400; }
.feedback select, .feedback input, .feedback textarea { width: 100%; min-height: 44px; padding: 10px 12px; font: 400 16px/1.4 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); border-radius: 0; }
.feedback textarea { resize: vertical; }
.feedback select:focus, .feedback input:focus, .feedback textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.feedback .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.feedback-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.feedback-status { font-size: 14px; }
.small { font-size: 13px !important; margin-top: 12px; }
@media (max-width: 700px) { .feedback { padding: 18px 16px; } }
/* v6: restored pre-v5 logo (candle tile on surface + Jersey 10 wordmark) inside the KS header */
.logo { font: 400 34px/1 'Jersey 10', var(--pixel); letter-spacing: .01em; gap: 10px; }
.logo .logo-mark { width: 40px; height: 40px; background: var(--surface); }
.logo .logo-mark .mascot, .logo .logo-mark img { width: 30px; height: 35px; margin-top: 6px; }
@media (max-width: 700px) {
  .logo { gap: 6px; font-size: 26px; }
  .logo .logo-mark { width: 30px; height: 30px; }
  .logo .logo-mark .mascot, .logo .logo-mark img { width: 22px; height: 26px; margin-top: 5px; }
}
/* v6: Community nav item (plain, like Method) */
.site-nav .nav-community[aria-current] { color: var(--primary-text); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
@media (max-width: 900px) { .site-nav .nav-method { display: none; } }

/* v6: optional name step */
.name-step { width: min(560px, 100%); margin: 24px auto; padding: 30px 28px 26px; text-align: center; gap: 12px; }
.name-step .name-mascot { width: 72px; height: 84px; }
.name-step .eyebrow { margin: 0; }
.name-step h2 { font-size: clamp(30px, 5vw, 42px); }
.name-step h2 label { cursor: text; }
.name-help { max-width: 42ch; margin: 0; font-size: 14.5px; }
.name-input { width: 100%; min-height: 54px; padding: 10px 14px; font: 400 18px/1.3 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); border-radius: 0; text-align: center; box-shadow: inset 3px 3px 0 var(--divider); }
.name-input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.name-input[aria-invalid="true"] { border-color: var(--primary); outline-color: var(--primary); }
.name-count { margin: -6px 0 0; justify-self: end; font-size: 12px; }
.name-err { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--primary-text); font-weight: 500; }
.name-err:empty { min-height: 0; }
.name-actions { display: flex; gap: 14px; justify-content: center; width: 100%; flex-wrap: wrap; }
.name-actions .button { min-width: 150px; }
@media (max-width: 560px) {
  .name-step { margin: 8px auto; padding: 22px 16px 20px; box-shadow: 4px 4px 0 var(--shadow); }
  .name-step .name-mascot { width: 56px; height: 66px; }
  .name-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
  .name-actions .button { min-width: 0; padding: 0 12px; }
}

/* v6: name on result */
.r-name { margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.r-name[hidden] { display: none; }
.r-name-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.r-name strong { font: 400 26px/1 var(--pixel); color: var(--primary-text); overflow-wrap: anywhere; }

/* v6: share-to-community block on the result page */
.community-share { margin: 18px 0 6px; padding: 16px 18px; display: grid; gap: 12px; }
.community-share[hidden] { display: none; }
.community-share.is-on { border-color: var(--outline); background: var(--test-soft, var(--surface)); }
.cs-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.cs-head .tile-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--church); border: 2px solid var(--outline); }
.cs-head .tile-icon img { width: 26px; height: 26px; }
.cs-title { margin: 0; font: 400 23px/1 var(--pixel); }
.cs-sub { margin: 4px 0 0; font-size: 13px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 6px; font: 400 18px/1 var(--pixel); color: var(--text); background: var(--background); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; }
.switch-knob { position: relative; width: 44px; height: 24px; background: var(--divider); border: 2px solid var(--outline); }
.switch-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--surface); border: 2px solid var(--outline); transition: left 120ms steps(3, end); box-sizing: border-box; }
.switch[aria-checked="true"] .switch-knob { background: var(--test); }
.switch[aria-checked="true"] .switch-knob::after { left: 22px; }
.switch:disabled { opacity: .6; cursor: wait; }
.switch:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.cs-name { display: grid; gap: 6px; }
.cs-name label { font-size: 13.5px; font-weight: 500; }
.cs-name-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.cs-name-row input { min-height: 46px; padding: 8px 12px; font: 400 16px/1.3 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); border-radius: 0; min-width: 0; }
.cs-name-row input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.cs-name-row .button { min-height: 46px; font-size: 19px; padding: 0 14px; box-shadow: 3px 3px 0 var(--shadow); }
.cs-msg { margin: 0; font-size: 13.5px; min-height: 0; }
.cs-msg.bad { color: var(--primary-text); font-weight: 500; }
.cs-note { margin: 0; font-size: 12.5px; }
@media (max-width: 480px) {
  .cs-head { grid-template-columns: auto minmax(0, 1fr); }
  .cs-head .switch { grid-column: 1 / -1; justify-self: start; }
  .cs-name-row { grid-template-columns: 1fr; }
}

/* v6: Community page */
.community-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.week { padding: 20px 22px; margin-bottom: 22px; }
.week-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 18px; margin-bottom: 14px; }
.week-head .section-title { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.week-head p { margin: 0; font-size: 13.5px; }
.week-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.week-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); text-decoration: none; background: var(--background); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); transition: transform 80ms, box-shadow 80ms; }
.week-item:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
.week-rank { position: absolute; top: -10px; left: -10px; display: grid; place-items: center; width: 26px; height: 26px; font: 400 18px/1 var(--pixel); color: var(--on-test); background: var(--test); border: 2px solid var(--outline); }
.week-copy { display: grid; gap: 2px; min-width: 0; }
.week-copy strong { font-size: 14.5px; font-weight: 500; line-height: 1.25; }
.week-copy .muted { font-size: 12.5px; }
.week-empty { margin: 0; }
.feed-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 18px; margin-bottom: 22px; }
.feed-tools .chip { text-decoration: none; min-height: 40px; }
.feed-filter { display: flex; align-items: center; gap: 8px; }
.feed-filter select { min-height: 44px; max-width: 260px; padding: 6px 10px; font: 400 14px/1.2 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); border-radius: 0; }
.feed-filter select:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.feed-count { margin: 0 0 0 auto; font-size: 13.5px; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.post { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px; }
.post-face { align-self: start; }
.post-body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.post-body p { margin: 0; }
.post-meta { font-size: 13.5px; overflow-wrap: anywhere; }
.post-who { font-weight: 500; }
.post-who .anon { font-style: italic; font-weight: 400; color: var(--text-muted); }
.post-match { font: 400 22px/1.05 var(--pixel); }
.post-match a { color: var(--text); text-decoration: none; }
.post-match a:hover { text-decoration: underline; }
.post-pct { color: var(--primary-text); }
.post-head { font-size: 14px; }
.post-nem { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.post-nem a { color: var(--text); }
.post-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: 4px; }
.post-actions .link { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.post-report { color: var(--text-muted); }
.post-report .icon { width: 14px; height: 14px; }
.post-report:disabled { opacity: .7; cursor: default; }
.post-gone { grid-column: 1 / -1; margin: 0; padding: 12px 0; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 28px; }
.pager > :last-child { justify-self: end; }
.feed-empty { display: flex; align-items: center; gap: 24px; padding: 28px; }
.feed-empty h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 8px; }
.feed-empty .button { margin-top: 14px; }
.report-dialog { max-width: 520px; }
@media (max-width: 700px) {
  .community-head { position: relative; grid-template-columns: minmax(0, 1fr); }
  .community-head .cast-mascot { position: absolute; right: 0; top: 0; }
  .week { padding: 16px 14px; }
  .week-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .week-item { padding: 8px; gap: 8px; }
  .week-item .face { --w: 40px !important; }
  .feed-tools { padding: 12px 14px; gap: 10px; }
  .feed-filter { width: 100%; }
  .feed-filter select { flex: 1; max-width: none; min-width: 0; }
  .feed-count { margin: 0; }
  .feed { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .post { padding: 12px; gap: 12px; box-shadow: 4px 4px 0 var(--shadow); }
  .post-face .face { --w: 76px !important; }
  .post-match { font-size: 20px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager > .muted { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .feed-empty { flex-direction: column; text-align: center; padding: 22px 16px; }
}
@media (max-width: 520px) {
  .site-nav .nav-cast .label-long { display: none; } .site-nav .nav-cast .label-short { display: inline; }
}
@media (max-width: 400px) {
  .site-nav { gap: 5px; }
  .site-nav .nav-cast .icon, .site-nav .nav-test .icon { display: none; }
  .logo { font-size: 24px; gap: 5px; }
}
.community .foot-note { margin-top: 28px; }
@media (max-width: 700px) { .community-head h1, .community-head .eyebrow { padding-right: 64px; } .community-head .cast-mascot { width: 52px; height: 61px; } }

/* v7: outbound "See photo" link for monogram theologians (photo not hosted by Credo) */
.see-photo { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; padding: 6px 12px; min-height: 44px; border: 2px solid var(--ink, currentColor); background: var(--surface, transparent); color: inherit; font-size: 12px; line-height: 1.2; text-decoration: none; white-space: nowrap; max-width: 100%; }
.see-photo:hover, .see-photo:focus-visible { background: var(--divider, rgba(0,0,0,.06)); text-decoration: underline; }
.see-photo .see-src { overflow: hidden; text-overflow: ellipsis; }
.t-figure .see-photo { display: flex; width: fit-content; }
@media (max-width: 400px) { .see-photo { white-space: normal; } }

/* v8: graded dilemmas (lean buttons) */
.lean-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.lean-label { font: 400 13px/1.3 var(--mono); }
.lean { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; font: 400 14px/1.2 var(--mono); color: var(--text); background: var(--surface); border: 2px solid var(--outline); box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lean:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--shadow); }
.lean .key { width: 22px; height: 22px; font-size: 16px; }
.lean[aria-pressed="true"] { background: var(--test); color: var(--on-test); }
@media (max-width: 420px) { .lean-row { gap: 8px; } .lean-label { width: 100%; text-align: center; } .lean { flex: 1 1 0; justify-content: center; padding: 8px 8px; } }
.lean[aria-pressed="true"] .key { background: transparent; border-color: var(--on-test); color: var(--on-test); }
/* v8: hotlinked publisher photos for theologians without a free portrait */
.ext-credit { display: block; margin-top: 6px; font: 400 11px/1.3 var(--mono); color: var(--text-muted); }
.ext-credit a { color: inherit; text-decoration: underline; }
.t-figure .ext-credit { display: inline; font-size: inherit; margin: 0; }
.match-face { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.match-face > .face { border-color: #C3A6F0; }
.match-face .ext-credit { color: #CFC3DA; margin: 0; text-align: center; max-width: 200px; }
.t-card .ext-credit { margin-top: 4px; }
@media (max-width: 560px) { .match-face > .face { --w: 112px !important; } .match-face .ext-credit { max-width: 112px; } }

/* -- v9: end-of-page Post to Community (owner only) -- */
.post-community { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 24px; align-items: center; padding: 26px 32px; }
.post-community[hidden] { display: none; }
.post-community.is-on { background: var(--test-soft); }
.pc-icon { display: grid; place-items: center; width: 56px; height: 56px; background: var(--church); border: 2px solid var(--outline); }
.pc-icon img { width: 32px; height: 32px; }
.pc-copy { min-width: 0; }
.pc-copy h2 { font-size: clamp(28px, 3.6vw, 36px); }
.pc-sub, .pc-anon { margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.pc-actions { display: grid; gap: 8px; justify-items: stretch; min-width: 0; }
.pc-actions .button { min-height: 52px; font-size: 22px; padding: 0 22px; white-space: normal; }
.pc-actions .button[hidden], .pc-link[hidden] { display: none; }
.pc-link { min-height: 44px; padding: 0 4px; font: 500 14px/1.2 var(--mono); color: var(--text); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pc-anon .pc-link { display: flex; align-items: center; padding: 0; margin-top: 2px; }
.pc-remove { justify-self: center; color: var(--text-muted); }
.pc-name { display: grid; gap: 6px; margin-top: 12px; max-width: 420px; }
.pc-name[hidden] { display: none; }
.pc-name label { font-size: 13.5px; font-weight: 500; }
.pc-name input { min-height: 46px; padding: 8px 12px; font: 400 16px/1.3 var(--mono); color: var(--text); background: var(--background); border: 2px solid var(--outline); border-radius: 0; min-width: 0; width: 100%; }
.pc-name input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.pc-msg { margin: 0; font-size: 13px; text-align: center; min-height: 0; }
.pc-msg:empty { display: none; }
.pc-msg.bad { color: var(--primary-text); font-weight: 500; }
@media (max-width: 760px) {
  .post-community { grid-template-columns: auto minmax(0, 1fr); padding: 22px; gap: 14px 16px; }
  .pc-icon { width: 44px; height: 44px; align-self: start; margin-top: 4px; } .pc-icon img { width: 26px; height: 26px; }
  .pc-actions { grid-column: 1 / -1; }
  .pc-actions .button { width: 100%; font-size: 21px; padding: 0 14px; }
}

/* ---------- v11: profile in depth + read more ---------- */
.in-depth { padding: 34px; }
.in-depth .section-title { margin-bottom: 14px; }
.ia-overview { display: grid; gap: 10px; max-width: 86ch; font-size: 15px; }
.ia-kicker { font-family: var(--pixel); font-size: 21px; color: var(--test-text); line-height: 1.1; }
.ia-list-wrap { margin-top: 24px; border-top: 2px solid var(--divider); }
.ia-item { border-bottom: 2px solid var(--divider); }
.ia-item > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 4px 16px; min-height: 56px; padding: 10px 2px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ia-item > summary::-webkit-details-marker { display: none; }
.ia-item > summary:focus-visible { outline: 3px solid var(--test-text); outline-offset: 2px; }
.ia-sum-title { font-family: var(--pixel); font-size: 25px; line-height: 1.05; font-weight: 700; }
.ia-sum-sub { font-size: 13px; color: var(--text-muted); text-align: right; }
.ia-chev { width: 28px; height: 28px; border: 2px solid var(--outline); background: var(--background); position: relative; }
.ia-chev::before, .ia-chev::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; background: var(--text); transform: translate(-50%, -50%); }
.ia-chev::after { transform: translate(-50%, -50%) rotate(90deg); }
.ia-item[open] .ia-chev::after { display: none; }
.ia-body { padding: 6px 2px 26px; display: grid; gap: 14px; font-size: 15px; max-width: 100%; }
.ia-body p { max-width: 86ch; }
.ia-body h4 { font-family: var(--pixel); font-size: 22px; margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ia-branches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ia-branch { padding: 18px 20px; background: var(--background); border: 2px solid var(--border); border-left: 8px solid var(--branch); }
.ia-tag { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 2px 8px; border: 2px solid var(--outline); background: var(--surface); }
.ia-axes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ia-axes li p + p { margin-top: 2px; }
.ia-q { font-size: 13px; color: var(--text-muted); }
.ia-band { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--text-muted); color: var(--text-muted); }
.band-strong-left .ia-band, .band-strong-right .ia-band { color: var(--test-text); border-color: var(--test-text); }
.ia-note { font-size: 14px; color: var(--text-muted); }
.ia-small { font-size: 13px; }
.ia-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.ia-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ia-list li { display: grid; gap: 2px; padding-left: 14px; border-left: 3px solid var(--divider); }
.ia-list li span { font-size: 14px; color: var(--text-muted); }
.ia-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; font-size: 13px; border: 2px solid var(--outline); background: var(--background); color: var(--text); }
.ia-combos, .ia-neigh, .ia-dil { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ia-combos li, .ia-neigh li, .ia-dil li { padding: 14px 16px; background: var(--background); border: 2px solid var(--border); display: grid; gap: 6px; }
.ia-combo-title { font-family: var(--pixel); font-size: 22px; line-height: 1.05; }
.ia-stat { font-weight: 500; }
.ia-neigh { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ia-neigh .num, .ia-rank .num, .ia-eras .num { font-family: var(--pixel); font-size: 20px; color: var(--primary-text); }
.ia-table { display: grid; border: 2px solid var(--border); background: var(--background); font-size: 14px; }
.ia-tr { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--divider); align-items: center; }
.ia-th { border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.ia-lbl { display: none; font-style: normal; color: var(--text-muted); }
.ia-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.ia-gap b { display: inline-block; width: calc(var(--g) * .6px + 4px); height: 10px; background: var(--test-text); }
.k-in-step .ia-gap b { background: var(--church); } .k-close .ia-gap b { background: var(--god); } .k-apart .ia-gap b { background: var(--primary); }
.ia-kind { font-size: 12px; color: var(--text-muted); }
.ia-rank { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.ia-rank li span.muted { display: block; font-size: 13px; }
.ia-eras { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ia-eras li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) 3.2em; gap: 10px; align-items: center; font-size: 14px; }
.ia-bar { height: 10px; border: 2px solid var(--outline); background: var(--background); position: relative; }
.ia-bar b { position: absolute; inset: 0 auto 0 0; width: calc((var(--p) - 50) * 2%); max-width: 100%; background: var(--test-text); }
.read-more .lead2 { margin: -8px 0 22px; font-size: 14px; max-width: 86ch; }
.rm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.rm-group { padding: 24px 24px 18px; min-width: 0; }
.rm-group h3 { font-size: 27px; }
.rm-blurb { font-size: 13px; margin: 6px 0 10px; }
.rm-list { list-style: none; margin: 0; padding: 0; display: grid; }
.rm-item { padding: 10px 0; border-top: 1px solid var(--divider); display: grid; gap: 4px; min-width: 0; }
.rm-link { display: block; font-weight: 500; overflow-wrap: anywhere; min-height: 24px; padding: 4px 0; line-height: 1.4; }
.rm-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-muted); align-items: center; overflow-wrap: anywhere; }
.rm-kind, .rm-oa { padding: 0 6px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.rm-kind.k-scholarly { color: var(--test-text); } .rm-kind.k-primary { color: var(--primary-text); }
.rm-oa { color: var(--text); background: var(--test-soft); border-color: var(--test-soft); }
.rm-why { font-size: 12px; color: var(--text-muted); font-style: italic; }
.rm-more > summary { list-style: none; display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; padding: 0 14px; font-family: var(--pixel); font-size: 20px; border: 2px solid var(--outline); background: var(--background); box-shadow: 3px 3px 0 var(--shadow); cursor: pointer; }
.rm-more > summary::-webkit-details-marker { display: none; }
.rm-more[open] > summary { margin-bottom: 8px; box-shadow: none; }
.rm-more[open] > summary span { font-size: 0; } .rm-more[open] > summary span::after { content: "Show fewer"; font-size: 20px; }
@media (max-width: 860px) {
  .ia-branches, .ia-cols, .ia-neigh, .rm-grid { grid-template-columns: minmax(0, 1fr); }
  .ia-th { display: none; }
  .ia-tr { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; }
  .ia-tq { font-weight: 500; }
  .ia-lbl { display: inline; }
}
@media (max-width: 520px) {
  .in-depth { padding: 22px 16px; }
  .ia-item > summary { grid-template-columns: minmax(0, 1fr) 28px; }
  .ia-sum-sub { grid-column: 1; grid-row: 2; text-align: left; }
  .ia-chev { grid-column: 2; grid-row: 1 / span 2; }
  .ia-sum-title { font-size: 23px; }
  .ia-branch { padding: 14px; }
  .ia-eras li { grid-template-columns: 7.6em minmax(0, 1fr) 3em; }
  .rm-group { padding: 18px 16px 14px; }
}
