/* Explorer page layout. Uses tokens and components from theme.css; add no raw colors here. */
/* header */
.top{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--space-m)}
.top .lede{max-width:60ch;color:var(--neutral-7);margin-top:var(--space-xs);font-size:1rem;line-height:1.5rem}
.question{display:flex;flex-direction:column;gap:var(--space-xxs)}
.question h2 em{font-style:italic}
.stack{display:flex;flex-direction:column;gap:var(--space-m)}
.hint{font-size:0.75rem;line-height:1rem;color:var(--neutral-7)}

/* spectrum */
.spectrum{min-width:720px;padding:var(--space-l) var(--space-l) var(--space-xs)}
.poles{display:grid;grid-template-columns:128px 1fr}
.poles-inner{display:flex;justify-content:space-between;gap:var(--space-l);padding:0 var(--space-xxs) var(--space-s)}
.pole{max-width:42%;display:flex;flex-direction:column;gap:2px}
.pole b{font-family:var(--font-display);font-size:1.5rem;line-height:2rem;font-weight:500;letter-spacing:-.01em}
.pole span{font-size:0.75rem;line-height:1rem;color:var(--neutral-7)}
.pole.r{text-align:right}
.axisbar{grid-column:2;height:6px;border-radius:var(--radius-full);background:linear-gradient(90deg,var(--color-1) 0%,color-mix(in srgb,var(--color-1) 55%,var(--neutral-4)) 30%,var(--neutral-4) 50%,color-mix(in srgb,var(--brand-green) 55%,var(--neutral-4)) 70%,var(--brand-green) 100%);position:relative;margin:0 var(--space-xxs) var(--space-xs)}
.lane{display:grid;grid-template-columns:128px 1fr;border-top:1px solid var(--neutral-4)}
.lane-name{padding:var(--space-s) var(--space-s) var(--space-s) 0;display:flex;flex-direction:column;gap:2px}
.lane-name b{font-weight:500}
.lane-name span{font-family:var(--font-data);font-size:0.75rem;line-height:1rem;color:var(--neutral-7);font-variant-numeric:tabular-nums}
.track{position:relative;margin:0 var(--space-xxs);background-image:linear-gradient(90deg,transparent calc(50% - .5px),var(--neutral-4) calc(50% - .5px),var(--neutral-4) calc(50% + .5px),transparent calc(50% + .5px))}
.node{position:absolute;display:flex;align-items:center;gap:var(--space-xs);border:0;background:transparent;padding:var(--space-xxs) var(--space-xs) var(--space-xxs) var(--space-xxs);border-radius:var(--radius-s);transform:translateX(-12px);white-space:nowrap;transition:background-color var(--motion-duration) var(--motion-easing)}
.node.flip{flex-direction:row-reverse;padding:var(--space-xxs) var(--space-xxs) var(--space-xxs) var(--space-xs);transform:translateX(calc(-100% + 12px))}
.node:hover{background:var(--neutral-3)}
.dot{width:16px;height:16px;border-radius:50%;background:var(--c);box-shadow:0 0 0 3px var(--neutral-1),0 0 0 4px var(--c);flex:0 0 auto}
.node .txt{display:flex;flex-direction:column;text-align:left}
.node.flip .txt{text-align:right}
.node .nm{font-size:0.875rem;line-height:1.25rem;font-weight:500}
.node .st{font-size:0.75rem;line-height:1rem;color:var(--neutral-7)}
.offaxis{display:flex;flex-wrap:wrap;gap:var(--space-xs);align-items:center;border-top:1px dashed var(--neutral-5);padding:var(--space-s) 0 var(--space-xs)}
.offaxis .lab{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);width:120px}
.chip-node{display:inline-flex;align-items:center;gap:var(--space-xs);border:0;box-shadow:inset 0 0 0 1px var(--neutral-4);background:none;border-radius:var(--radius-s);padding:var(--space-xxs) var(--space-s) var(--space-xxs) var(--space-xs);font-size:0.875rem;line-height:1.25rem}
.chip-node:hover{background:var(--neutral-3)}
.chip-node .dot{width:10px;height:10px;box-shadow:none}

/* Phones (<=700px): the whole axis fits the screen. Lane names sit above each track, dots show a short name,
   and the stance moves to the drawer. JS (COMPACT in app.js) shortens names and tightens rows to match. */
@media (max-width:700px){
  .spectrum{min-width:0;padding:var(--space-m) var(--space-m) var(--space-xs)}
  .poles,.lane{grid-template-columns:minmax(0,1fr)}
  .poles > div:first-child{display:none}
  .axisbar{grid-column:1}
  .pole{max-width:48%}
  .pole b{font-size:1.125rem;line-height:1.5rem}
  .lane-name{flex-direction:row;align-items:baseline;gap:var(--space-xs);padding:var(--space-s) 0 0}
  .track{margin:0 var(--space-s)}
  .node .st{display:none}
  .node .nm{font-size:0.8125rem}
  .node .dot{width:14px;height:14px}
  .node{transform:translateX(-11px)}
  .node.flip{transform:translateX(calc(-100% + 11px))}
}
.refs{display:flex;flex-wrap:wrap;gap:var(--space-xxs)}
.ref{font-family:var(--font-data);font-size:0.75rem;line-height:1rem;font-weight:500;background:var(--option-badge-background);color:var(--option-badge-foreground);border-radius:var(--radius-xs);padding:2px var(--space-xs);font-variant-numeric:tabular-nums}

/* matrix */
.matrix{border-collapse:separate;border-spacing:0;min-width:880px;width:100%}
.matrix th,.matrix td{padding:var(--space-s) var(--space-m);border-bottom:1px solid var(--neutral-4);text-align:left;vertical-align:middle}
.matrix tbody tr:last-child td{border-bottom:0}
.matrix thead th{font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--neutral-7)}
.matrix thead th .pp{display:flex;justify-content:space-between;gap:var(--space-xs);font-weight:400;margin-top:2px;color:var(--neutral-7)}
.matrix tbody tr{cursor:pointer;transition:background-color var(--motion-duration) var(--motion-easing)}
.matrix tbody tr:hover,.matrix tbody tr:focus-visible{background:var(--neutral-2)}
.matrix tbody tr:focus-visible{outline-offset:-2px}
.who{display:flex;align-items:center;gap:var(--space-s);min-width:200px}
.who .dot{width:10px;height:10px;box-shadow:none}
.who b{font-weight:500;display:block}
.who span{font-size:0.75rem;line-height:1rem;color:var(--neutral-7)}
.mini{position:relative;height:4px;border-radius:var(--radius-full);background:var(--neutral-3);min-width:110px}
.mini::after{content:"";position:absolute;left:50%;top:-3px;height:10px;width:1px;background:var(--neutral-5)}
.mini i{position:absolute;top:50%;width:12px;height:12px;border-radius:50%;background:var(--c);transform:translate(-50%,-50%);box-shadow:0 0 0 2px var(--neutral-1)}
.cell-st{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);margin-top:var(--space-xs);display:block;max-width:160px}
.na{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);font-style:italic}

/* ---------- Data view: Text field (spec: input.md) applied to the textarea ---------- */
.schema{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--space-m);align-items:start}
@media (max-width:860px){.schema{grid-template-columns:1fr}}
.card-pad{padding:var(--space-l);display:flex;flex-direction:column;gap:var(--space-s)}
.fields{width:100%;border-collapse:collapse}
.fields td{padding:var(--space-xs) 0;border-bottom:1px solid var(--neutral-4);vertical-align:top}
.fields tr:last-child td{border-bottom:0}
.fields td:first-child{font-family:var(--font-data);font-size:0.75rem;line-height:1.25rem;font-weight:500;white-space:nowrap;padding-right:var(--space-m);color:var(--color-1)}
pre{margin:0;background:var(--neutral-3);border-radius:var(--radius-s);padding:var(--space-s);font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;font-size:0.75rem;line-height:1.125rem;overflow-x:auto;max-height:420px;color:var(--neutral-9)}
.btns{display:flex;flex-wrap:wrap;gap:var(--space-xs)}
.msg{font-size:0.75rem;line-height:1rem;color:var(--neutral-7)}
.msg.err{color:var(--error)}
.msg.ok{color:var(--success)}

/* Standalone page: keep content clear of phone notches (the artifact host did this before). */
/* The top inset lives inside the sticky app bar, so the bar's own background covers the status bar when it pins
   (iPhone audit 2026-11-25: on :root the bar slid under the clock once scrolled, full screen from the Home Screen). */
.site-bar{padding-top:env(safe-area-inset-top,0px)}
body{margin:0}

/* scripture text (BSB) */
.ref-btn{border:0;cursor:pointer;transition:background-color var(--motion-duration) var(--motion-easing),color var(--motion-duration) var(--motion-easing)}
.ref-btn:hover{background:var(--neutral-4)}
.ref-btn[aria-pressed="true"]{background:var(--neutral-10);color:var(--neutral-1)}
.vpanel{margin-top:var(--space-xxs)}
.vtext{margin:0;font-family:var(--font-display);font-size:0.9375rem;line-height:1.375rem;color:var(--neutral-10);box-shadow:inset 2px 0 0 var(--neutral-5);padding:var(--space-xxs) 0 var(--space-xxs) var(--space-s);text-wrap:pretty}
.vtext sup{font-family:var(--font-data);font-size:0.625rem;line-height:0;color:var(--neutral-7);margin-right:2px;font-variant-numeric:tabular-nums}
.vtext cite{font-family:var(--font-data);font-style:normal;font-size:0.6875rem;letter-spacing:.02em;color:var(--neutral-7);white-space:nowrap}
.vtext .muted{font-family:var(--font-body);font-size:0.8125rem}

/* research states */
.status.sourced{color:var(--color-1);background:var(--color-1-transparent)}
.why{font-size:0.8125rem;line-height:1.25rem;color:var(--neutral-8);display:flex;flex-direction:column;gap:2px;box-shadow:inset 2px 0 0 var(--neutral-5);padding:var(--space-xxs) 0 var(--space-xxs) var(--space-s)}
.why .lab,.refs .lab{font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--neutral-7)}
.refs .lab{align-self:center;margin-right:var(--space-xxs)}
.dr-thread{color:var(--neutral-8);font-size:0.875rem;line-height:1.25rem}
.question .shared{margin-top:var(--space-xs)}
.src a{color:inherit;text-decoration:underline;text-decoration-color:var(--neutral-5);text-underline-offset:2px}
.src a:hover{text-decoration-color:currentColor}
.offaxis.todo .chip-node{color:var(--neutral-7)}
.vpanel .vtext{max-height:320px;overflow:auto;overscroll-behavior:contain}

/* drawer: brief → at a glance → doctrine by doctrine */
.btn-xs{padding:2px var(--space-xs);font-size:0.75rem;line-height:1.25rem;gap:4px}
.btn-xs .ico{width:14px;height:14px}
.glance{display:flex;flex-direction:column;gap:var(--space-xs);background:var(--neutral-2);border-radius:var(--radius-m);padding:var(--space-s) var(--space-s) var(--space-xs)}
.glance-head{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-s);padding:0 var(--space-xs)}
.gl-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.gl-row{width:100%;display:grid;grid-template-columns:minmax(96px,8.5rem) minmax(90px,1fr) minmax(0,1.3fr);align-items:center;gap:var(--space-s);border:0;background:none;text-align:left;color:inherit;font:inherit;padding:var(--space-xs);border-radius:var(--radius-s);min-height:36px}
button.gl-row{cursor:pointer;transition:background-color var(--motion-duration) var(--motion-easing)}
button.gl-row:hover,button.gl-row:focus-visible{background:var(--neutral-1);box-shadow:var(--border-shadow-s)}
.gl-name{font-size:0.8125rem;line-height:1rem;font-weight:500}
.gl-bar .mini{min-width:0}
.gl-st{font-size:0.8125rem;line-height:1rem;color:var(--neutral-8);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gl-off{font-size:0.75rem;color:var(--neutral-7);font-style:italic}
.gl-row.todo .gl-name,.gl-row.todo .gl-st{color:var(--neutral-6)}
.gl-row.todo .mini{opacity:.5}
@container (max-width:520px){
  .gl-row{grid-template-columns:1fr minmax(80px,40%);grid-template-areas:"n b" "s s";row-gap:2px}
  .gl-name{grid-area:n}.gl-bar{grid-area:b}.gl-st{grid-area:s;white-space:normal}
}
.more{border-radius:var(--radius-s)}
.more summary{display:flex;align-items:center;gap:var(--space-xs);cursor:pointer;list-style:none;font-size:0.8125rem;line-height:1.25rem;font-weight:500;color:var(--neutral-8);padding:var(--space-xxs) 0;width:fit-content}
.more summary::-webkit-details-marker,.dsec summary::-webkit-details-marker{display:none}
.more summary .ico{transition:transform var(--motion-duration) var(--motion-easing);transform:rotate(-90deg)}
.more[open] summary .ico{transform:none}
.more > p,.more > .works{margin:var(--space-xs) 0 0 22px;color:var(--neutral-8)}
.dsecs{display:flex;flex-direction:column}
.dsecs-head{display:flex;justify-content:space-between;align-items:center;padding:var(--space-xs) 0;border-bottom:1px solid var(--neutral-4)}
.dsec{border-bottom:1px solid var(--neutral-4);scroll-margin-top:var(--space-m)}
.dsec summary{display:grid;grid-template-columns:1fr auto;column-gap:var(--space-s);row-gap:var(--space-xxs);cursor:pointer;list-style:none;padding:var(--space-s) 0;border-radius:var(--radius-s)}
.dsec summary:focus-visible{outline-offset:2px}
.dsec-top{display:flex;justify-content:space-between;align-items:center;gap:var(--space-xs);grid-column:1}
.dsec-st{font-family:var(--font-display);font-size:1.0625rem;line-height:1.5rem;font-weight:500;grid-column:1}
.dsec-bar,.dsec-off{grid-column:1;display:block}
.dsec-bar .mini-l{margin-top:var(--space-xxs)}
.dsec-chev{grid-column:2;grid-row:1 / span 3;align-self:center;color:var(--neutral-7);display:flex}
.dsec-chev .ico{width:18px;height:18px;transition:transform var(--motion-duration) var(--motion-easing)}
.dsec[open] .dsec-chev .ico{transform:rotate(180deg)}
.dsec summary:hover .dsec-chev{color:var(--neutral-10)}
.dsec-body{display:flex;flex-direction:column;gap:var(--space-m);padding:0 0 var(--space-m)}
.dsec-body .why{font-size:0.9375rem;line-height:1.375rem;color:var(--neutral-10);box-shadow:inset 3px 0 0 var(--c,var(--color-1))}
.dsec-sum{color:var(--neutral-8);max-width:68ch}
.cites{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-s)}
.cite{display:flex;flex-direction:column;gap:2px;box-shadow:inset 2px 0 0 var(--neutral-5);padding:var(--space-xxs) 0 var(--space-xxs) var(--space-s)}
.cite-main{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--space-xs)}
.cite-title{font-family:var(--font-display);font-style:italic;font-size:0.9375rem;line-height:1.375rem;color:var(--neutral-10)}
a.cite-title{text-decoration:underline;text-decoration-color:var(--neutral-5);text-underline-offset:3px}
a.cite-title:hover{text-decoration-color:currentColor}
.cite-date{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);font-variant-numeric:tabular-nums}
.cite-loc{font-size:0.75rem;line-height:1.125rem;color:var(--neutral-7)}
.cite-q{margin:var(--space-xxs) 0 0;font-family:var(--font-display);font-size:0.875rem;line-height:1.25rem;color:var(--neutral-10)}
.cite-act{display:flex;gap:var(--space-xxs);margin:var(--space-xxs) 0 0 calc(-1 * var(--space-xs))}
.cite-act a.btn{text-decoration:none}
.gl-bar,.dsec-bar{display:block;padding:0 6px}
.gl-bar .mini,.dsec-bar .mini{display:block;width:100%}
.dsec-bar .mini-l{display:flex;margin-left:-6px;margin-right:-6px}
.glance-head{flex-wrap:wrap;row-gap:0}.glance-head .sub{white-space:nowrap}
.focus{display:flex;flex-direction:column;gap:var(--space-s);border-top:1px solid var(--neutral-4);padding-top:var(--space-m)}
.focus:focus{outline:none}
.focus-head{display:grid;row-gap:var(--space-xxs)}
.focus .dsec-st{font-size:1.25rem;line-height:1.75rem}
.focus .dsec-body{padding-bottom:0}
.more .others{margin:var(--space-xs) 0 0;background:var(--neutral-2);border-radius:var(--radius-m);padding:var(--space-xs)}
.chip-node{text-align:left}

/* 1–10 scale */
.score{font-family:var(--font-data);font-size:0.75rem;line-height:1rem;font-weight:600;color:var(--neutral-10);background:var(--neutral-3);border-radius:var(--radius-xs);padding:2px var(--space-xs);font-variant-numeric:tabular-nums}
.score small{font-weight:400;color:var(--neutral-7);font-size:0.6875rem}
.dsec-top .meta{gap:var(--space-xxs)}
.parts{grid-column:1;display:flex;gap:var(--space-m);font-size:0.75rem;line-height:1rem;color:var(--neutral-7);margin-top:var(--space-xxs)}
.parts b{color:var(--neutral-10);font-weight:600;font-variant-numeric:tabular-nums}
.scale-key{margin-top:var(--space-s)}
.anchors{list-style:none;margin:var(--space-xs) 0 0;padding:0;display:grid;gap:var(--space-xxs)}
.anchors li{display:grid;grid-template-columns:3rem 1fr;gap:var(--space-s);font-size:0.8125rem;line-height:1.125rem;color:var(--neutral-8)}
.anchors b{font-family:var(--font-data);font-variant-numeric:tabular-nums;color:var(--neutral-10)}



/* Popup close (Josh, 2026-11-25): the thread through a person's thought and their key works, always shown, quietly set.
   Two columns when the sheet is wide enough, stacked on phones. */
.dr-close{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-l);border-top:1px solid var(--neutral-4);padding-top:var(--space-l);margin-top:var(--space-xs)}
@container (min-width:640px){.dr-close{grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:var(--space-xl)}}
.through{display:flex;flex-direction:column;gap:var(--space-s)}
.through p{font-family:var(--font-display);font-size:1.0625rem;line-height:1.6875rem;color:var(--neutral-9);text-wrap:pretty;max-width:60ch}
.through p::first-letter{font-size:1.15em}
.kw{display:flex;flex-direction:column;gap:var(--space-s)}
.kw-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.kw-list li{display:flex;justify-content:space-between;align-items:baseline;gap:var(--space-s);padding:var(--space-xs) 0;border-bottom:1px solid var(--neutral-3)}
.kw-list li:last-child{border-bottom:0}
.kw-list i{font-family:var(--font-display);font-size:0.9375rem;line-height:1.375rem;color:var(--neutral-10)}
.kw-list span{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);font-variant-numeric:tabular-nums;white-space:nowrap}

/* App bar (Josh, 2026-11-25: "like an actual SaaS app, Dilekt is the app name"): sticky product chrome with the
   Dilekt logo and the two main sections as nav, then a plain page header. Shared by spectrum.html and council.html. */
.site-bar{position:sticky;top:0;z-index:40;background:color-mix(in srgb,var(--neutral-1) 88%,transparent);
  -webkit-backdrop-filter:saturate(1.4) blur(12px);backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid var(--neutral-4)}
.site-bar-in{max-width:1180px;margin:0 auto;padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));height:56px;
  display:flex;align-items:center;gap:var(--space-l)}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--neutral-10);text-decoration:none;flex:0 0 auto}
.brand-mark{width:26px;height:auto;aspect-ratio:875/825;flex:0 0 auto;--logo-navy:#233C56;--logo-green:#2F6F5C}
.brand-mark .lg-n{fill:var(--logo-navy)}
.brand-mark .lg-g{fill:var(--logo-green)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .brand-mark{--logo-navy:#9DB6D3}}
:root[data-theme="dark"] .brand-mark{--logo-navy:#9DB6D3}
.brand-name{font-family:var(--font-body);font-size:1rem;line-height:1.5rem;font-weight:600;letter-spacing:-.01em}
.app-nav{display:flex;align-items:stretch;gap:var(--space-xs);align-self:stretch}
.nav-i{position:relative;display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:0 var(--space-xs);color:var(--neutral-7);
  font:inherit;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-decoration:none;cursor:pointer;
  transition:color var(--motion-duration) var(--motion-easing)}
.nav-i::after{content:"";position:absolute;left:var(--space-xs);right:var(--space-xs);bottom:-1px;height:2px;border-radius:2px;background:transparent;
  transition:background-color var(--motion-duration) var(--motion-easing)}
.nav-i:hover{color:var(--neutral-10)}
.nav-i[aria-pressed="true"],.nav-i[aria-current="page"]{color:var(--neutral-10)}
.nav-i[aria-pressed="true"]::after,.nav-i[aria-current="page"]::after{background:var(--neutral-10)}
.nav-i:focus-visible{outline:2px solid var(--color-1);outline-offset:-2px;border-radius:var(--radius-s)}
@media (max-width:600px){
  .site-bar-in{gap:var(--space-m)}
  .app-nav{gap:0}
}

/* Accounts (auth.js): one-line text fields and a narrower sign-in sheet. */
.input-line{min-height:40px;resize:none}
.drawer.auth-sheet{width:min(440px,calc(100vw - 32px))}
@media (max-width:600px){.drawer.auth-sheet{width:100%}}
.auth-form{gap:var(--space-s)}
.auth-form .btns{margin-top:var(--space-xs)}
/* The account button sits at the far right of the app bar; icon only on phones. */
.acct-btn{margin-left:auto;flex:0 0 auto;color:var(--neutral-8)}
@media (max-width:600px){.acct-btn{padding:var(--space-xs)}.acct-btn span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}

/* The sign-in wall (Josh, 2026-11-25: the whole app needs an account). auth.js sets body.auth-pending until it knows
   who's here, then body.auth-locked with an inline form for anyone signed out. */
body.auth-pending .wrap,body.auth-locked .wrap,body.auth-locked .site-bar nav{display:none}
.auth-gate{max-width:440px;margin:0 auto;padding:var(--space-xxl) var(--space-m) var(--space-xxl);display:flex;flex-direction:column;gap:var(--space-l)}
.auth-card{display:flex;flex-direction:column;gap:var(--space-s);padding:var(--space-l);border-radius:var(--radius-m);font-size:0.875rem;line-height:1.25rem}
@media (max-width:600px){.auth-gate{padding-top:var(--space-xl)}.auth-card{padding:var(--space-m)}}

/* Vertical economy (Josh, 2026-11-25): pages start right under the app bar; the doctrine question carries its
   shared passage and the tradition filter on one line. */
.page-tight,.cn-page{padding-top:var(--space-m)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.qmeta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-xs) var(--space-m);margin-top:var(--space-xs)}
.qmeta .shared{margin-top:0}
.qmeta .vgroup:has(.vpanel:not([hidden])){flex-basis:100%}
.qmeta .legend{margin-left:auto}
@media (max-width:700px){.qmeta .legend{margin-left:0}}
.spectrum{padding-top:var(--space-m)}
@media (min-width:701px){.pole b{font-size:1.25rem;line-height:1.75rem}}
@media (min-width:701px){
  .qmeta .legend{gap:2px}
  .qmeta .trad{padding:4px 10px;font-size:0.8125rem;gap:6px}
  .qmeta .legend .lab{margin-right:4px}
}

/* Load-in intro (intro.js; Josh, 2026-11-25): the emblem spins in like a flywheel, then "dilekt." rises in. */
html.intro-on{overflow:hidden}
.intro{position:fixed;inset:0;z-index:100;background:var(--neutral-2);display:grid;place-items:center;cursor:pointer}
.intro-in{display:flex;flex-direction:column;align-items:center;gap:var(--space-m)}
.intro-mark{width:min(44vw,184px);height:auto;overflow:visible}
.intro-wheel{transform-box:view-box;transform-origin:627px 640px}
.intro-p{fill:var(--color-1);transform-box:fill-box;transform-origin:center}
.intro-g{fill:var(--brand-green)}
.intro-word{font-family:var(--font-body);font-size:2.125rem;line-height:2.5rem;font-weight:600;letter-spacing:-.01em;color:var(--neutral-10)}
.intro-word span{color:var(--brand-green)}
/* Doctrine switcher in the question heading (replaces the two-row tab strip). */
.doc-bar{display:flex;align-items:center;gap:var(--space-s);margin-bottom:var(--space-xxs)}
.doc-switch{position:relative;min-width:0}
.doc-trigger{display:inline-flex;align-items:center;gap:var(--space-xs);border:0;background:var(--neutral-1);margin:0;padding:6px 10px 6px 12px;border-radius:var(--radius-m);
  box-shadow:var(--border-shadow-s),var(--shadow-s);color:var(--neutral-10);font:inherit;font-size:0.9375rem;line-height:1.375rem;font-weight:600;cursor:pointer;
  transition:background-color var(--motion-duration) var(--motion-easing),box-shadow var(--motion-duration) var(--motion-easing)}
.doc-lab{font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--neutral-7);padding-right:var(--space-xs);border-right:1px solid var(--neutral-4)}
.doc-trigger .ico{color:var(--neutral-8);width:16px;height:16px;transition:transform var(--motion-duration) var(--motion-easing)}
.doc-trigger:hover{background:var(--neutral-2);box-shadow:var(--border-shadow-s),var(--shadow-m)}
.doc-trigger[aria-expanded="true"]{background:var(--neutral-2)}
.doc-trigger[aria-expanded="true"] .ico{transform:rotate(180deg)}
.doc-trigger:focus-visible{outline:2px solid var(--color-1);outline-offset:1px}
.doc-menu{position:absolute;z-index:30;top:calc(100% + 6px);left:0;width:min(520px,calc(100vw - 32px));padding:6px;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px var(--space-xs);background:var(--neutral-1);border-radius:var(--radius-l);
  box-shadow:var(--border-shadow-s),var(--shadow-l);animation:dm-in var(--motion-duration) var(--motion-easing)}
.doc-menu[hidden]{display:none}
@keyframes dm-in{from{opacity:0;transform:translateY(-4px)}}
@media (prefers-reduced-motion:reduce){.doc-menu{animation:none}}
.dm-group{display:flex;flex-direction:column;padding-bottom:4px}
.dm-head{font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--neutral-7);padding:8px 10px 4px}
.dm-item{display:flex;align-items:center;justify-content:space-between;gap:var(--space-xs);width:100%;border:0;background:none;padding:6px 10px;border-radius:var(--radius-s);
  color:var(--neutral-10);font:inherit;font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:pointer}
.dm-item:hover,.dm-item:focus-visible{background:var(--neutral-3);outline:none}
.dm-item[aria-checked="true"]{font-weight:600}
.dm-item .ico{color:var(--color-1);width:14px;height:14px}
.doc-step{display:inline-flex;align-items:center;gap:2px;flex:0 0 auto}
.doc-pos{font-size:0.75rem;line-height:1rem;color:var(--neutral-7);font-variant-numeric:tabular-nums;margin-right:4px}
.doc-native{display:none;position:relative}
.doc-native select{appearance:none;-webkit-appearance:none;border:0;background:var(--neutral-1);box-shadow:var(--border-shadow-s);border-radius:var(--radius-m);
  color:var(--neutral-10);font:inherit;font-size:0.9375rem;line-height:1.375rem;font-weight:600;padding:7px 34px 7px 12px;max-width:100%}
.doc-native .ico{position:absolute;right:10px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--neutral-7)}
@media (max-width:700px){
  .doc-trigger,.doc-menu{display:none}
  .doc-native{display:inline-block}
  .doc-pos{display:none}
}
.intro-seat{transform-box:view-box}
.intro-table{fill:var(--neutral-4);opacity:0;transform-box:fill-box;transform-origin:center}

/* ===== Spectrum audit fixes (Josh, 2026-11-25: "send it on all fixes") ===== */
/* App bar fits 320px phones: nav icons drop out below 380px. Shared top bar, so both pages get it. */
@media (max-width:380px){
  .site-bar-in{gap:var(--space-s)}
  .app-nav{gap:0}
  .nav-i{padding:0 6px}
  .nav-i .ico{display:none}
  .brand{gap:8px}
}
/* Loading: a quiet skeleton of the page until the data arrives. */
.boot{display:flex;flex-direction:column;gap:var(--space-s)}
.skel{display:block;border-radius:var(--radius-s);background:var(--neutral-3);animation:skel 1.4s ease-in-out infinite}
.skel-btn{width:220px;height:36px;border-radius:var(--radius-m)}
.skel-h{width:min(620px,90%);height:28px}
.skel-row{width:min(860px,100%);height:28px}
.skel-card{height:min(60vh,520px);border-radius:var(--radius-m);margin-top:var(--space-xs)}
@keyframes skel{50%{opacity:.55}}
@media (prefers-reduced-motion:reduce){.skel{animation:none}}
/* Scripture chips: at least 24px to tap (32px on phones); the open one is tinted, not solid black. */
.sp .ref-btn{min-height:24px;display:inline-flex;align-items:center;cursor:pointer}
.sp .ref-btn[aria-pressed="true"]{background:var(--color-1);color:var(--on-color-1)}
@media (max-width:700px){.sp .ref-btn{min-height:32px;padding-inline:10px}}
/* Chart: labels sit on the card color so the center line passes behind them, not through them. */
.sp .node{background:var(--neutral-1)}
.sp .node:hover{background:var(--neutral-3)}
/* Phones: the tradition filter is one sideways-scrolling row; bigger touch targets. */
@media (max-width:700px){
  .sp .qmeta .legend{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;width:calc(100% + 32px);margin-inline:-16px;padding:2px 16px;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 24px),transparent)}
  .sp .qmeta .legend::-webkit-scrollbar{display:none}
  .sp .qmeta .legend > *{flex:0 0 auto;white-space:nowrap}
  .sp .trad{min-height:40px}
  .sp .node::before{content:"";position:absolute;inset:-6px 0}
  .sp .more summary{min-height:40px}
  .sp .doc-native select{min-height:40px}
}
/* Person popup: the close button stays put while the popup scrolls. */
.sp .dr-x{position:sticky;top:var(--space-xs);z-index:3;align-self:flex-end;margin-bottom:-44px;flex:0 0 auto;
  background:var(--neutral-1);box-shadow:var(--border-shadow-s),var(--shadow-s);border-radius:var(--radius-full)}
.sp .dr-head{padding-right:44px}
/* Popup: Scripture chips run across the top, sources below in two columns (no empty block beside a long list). */
@container (min-width:640px){
  .sp .pos-refs{grid-template-columns:1fr}
  .sp .pos-refs .cites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-s) var(--space-m)}
}
/* Dark mode: a darker scrim and a lifted popup so it stands apart from the page. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .sp .dr-backdrop{background:color-mix(in srgb,var(--neutral-1) 72%,transparent)}
  :root:not([data-theme="light"]) .sp .drawer{background:var(--neutral-2);box-shadow:0 0 0 1px var(--neutral-4),var(--shadow-l)}
  :root:not([data-theme="light"]) .sp .dr-x{background:var(--neutral-2)}
}
:root[data-theme="dark"] .sp .dr-backdrop{background:color-mix(in srgb,var(--neutral-1) 72%,transparent)}
:root[data-theme="dark"] .sp .drawer{background:var(--neutral-2);box-shadow:0 0 0 1px var(--neutral-4),var(--shadow-l)}
:root[data-theme="dark"] .sp .dr-x{background:var(--neutral-2)}

/* iPhone audit (2026-11-25): Safari zooms the page when a field under 16px gets focus, and stays zoomed. */
@media (max-width:700px),(pointer:coarse){
  .input,.doc-native select,.doc-select select{font-size:16px}
  /* Scripture chips in any sheet (the Council's person sheet too, not just Spectrum's) get a thumb-sized height. */
  .drawer .ref-btn{min-height:32px;display:inline-flex;align-items:center;padding-inline:10px}
  .score small{font-size:0.75rem}
}

/* Second iPhone pass (2026-11-25): the browser's own surfaces. Text keeps its size when the phone turns sideways,
   selection and the caret use the brand color, links don't flash gray on tap, and a sheet's scroll stays in the sheet. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
::selection{background:var(--color-1-transparent);color:inherit}
input,textarea{caret-color:var(--color-1)}
a{-webkit-tap-highlight-color:transparent}
.drawer{overscroll-behavior:contain}
/* Person popup: their full polygon portrait beside the name (stacked above it on phones). */
.sp .dr-head{justify-content:flex-start;align-items:center;gap:var(--space-m)}
.sp .dr-portrait{width:120px;height:120px;object-fit:contain;flex:0 0 auto}
@media (max-width:600px){
  .sp .dr-head{flex-direction:column;align-items:flex-start;gap:var(--space-s)}
  .sp .dr-portrait{width:96px;height:96px}
}
/* Faces on the chart: the dot becomes the person's portrait, centered on the same point (Josh, 2026-11-26). */
.sp .dot.face{position:relative;overflow:hidden;background:var(--c);box-shadow:0 0 0 2px var(--c)}
.sp .dot.face img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.15)}
.sp .node .dot.face{width:32px;height:32px}
.sp .node{transform:translateX(-20px)}
.sp .node.flip{transform:translateX(calc(-100% + 20px))}
.sp .chip-node .dot.face{width:20px;height:20px;box-shadow:0 0 0 1.5px var(--c)}
@media (max-width:700px){
  .sp .node .dot.face{width:28px;height:28px}
  .sp .node{transform:translateX(-18px)}
  .sp .node.flip{transform:translateX(calc(-100% + 18px))}
}
/* Passages with notes: chip and note on one row, each reference once. */
.ref-notes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-xs)}
.ref-notes li{display:flex;align-items:baseline;gap:var(--space-s);min-width:0}
.ref-notes li .ref{flex:0 0 auto;white-space:nowrap}
.ref-notes li span{color:var(--neutral-7);font-size:0.8125rem;line-height:1.25rem;min-width:0}
@media (max-width:600px){.ref-notes li{flex-direction:column;align-items:flex-start;gap:2px}}
.ref-notes li{flex-wrap:wrap}
.ref-notes li > .vpanel{flex:1 0 100%}

/* Sign-in gate, centered (Josh, 2026-11-26): five of the twenty seated together over a warmer title, the form under it,
   full-width button, links centered. Labels stay left-aligned with their fields. */
.auth-gate{max-width:420px;position:relative}
@media (min-width:601px){.auth-gate{min-height:calc(100svh - 64px);justify-content:center;padding-block:var(--space-xl) 12vh}}
.auth-gate::before{content:"";position:absolute;inset:-10% -40% auto;height:70%;z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side,color-mix(in srgb,var(--color-2) 28%,transparent),transparent 75%)}
.auth-gate .auth-card{padding:var(--space-xl);border-radius:var(--radius-l);gap:var(--space-m);box-shadow:var(--border-shadow-s),var(--shadow-l)}
.auth-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:var(--space-xs);margin-bottom:var(--space-xs)}
.auth-head .dr-title{font-size:1.875rem;line-height:2.25rem}
.auth-faces{display:flex;margin-bottom:var(--space-s)}
.auth-faces img{width:48px;height:48px;object-fit:cover;border-radius:50%;margin-left:-12px;background:color-mix(in srgb,var(--c) 26%,var(--neutral-1));
  box-shadow:0 0 0 3px var(--neutral-1),var(--shadow-s);animation:af-in .5s var(--motion-large-easing) both;animation-delay:calc(var(--i) * 70ms)}
.auth-faces img:first-child{margin-left:0}
@keyframes af-in{from{opacity:0;transform:translateY(8px) scale(.9)}}
@media (prefers-reduced-motion:reduce){.auth-faces img{animation:none}}
.auth-gate .auth-form .btns{flex-direction:column;align-items:stretch;gap:var(--space-xs)}
.auth-gate .auth-form .btns .btn-primary{width:100%;padding-block:10px;font-size:0.9375rem}
.auth-gate .auth-form > .msg:last-child,.auth-gate .btns .btn-ghost{align-self:center;text-align:center}
.auth-gate .auth-form > .msg:last-child{display:flex;justify-content:center;align-items:center;gap:2px;flex-wrap:wrap}
.auth-gate > .auth-card > .dr-title,.auth-gate > .auth-card > .dr-desc{text-align:center}
@media (max-width:600px){.auth-gate .auth-card{padding:var(--space-l) var(--space-m)}}
