/* Moral Atlas — night-atlas visual language.
   Deep indigo chart-room, parchment map, gold compass lines, crimson accent.
   Deliberately distinct from the-lure's green felt. */
:root {
  --night: #0e1330;
  --night-2: #171d42;
  --night-3: #202753;
  --parchment: #f5ecda;
  --parchment-dim: #e7dabf;
  --ink: #1b1f3a;
  --gold: #d9a441;
  --gold-soft: #f0cd7e;
  --crimson: #c0392b;
  --teal: #2a9d8f;
  --muted: #9aa1c7;
  --line: rgba(217, 164, 65, .28);
  --radius: 14px;
  --serif: "Fraunces", "Source Serif 4", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body {
  margin: 0; background: var(--night); color: var(--parchment);
  font-family: var(--body); font-size: 18px; line-height: 1.65;
}
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* faint graticule backdrop */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(217,164,65,.06) 79px 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(217,164,65,.06) 79px 80px);
}

.topbar { position: sticky; top: 0; z-index: 5; background: rgba(14,19,48,.94); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1060px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { color: var(--gold-soft); text-decoration: none; font-family: var(--mono); font-size: .85rem; letter-spacing: .04em; }
.brand span { color: var(--parchment); border: 1px solid var(--gold); border-radius: 50%; padding: .1em .45em; margin-right: .4em; }
.dots { display: flex; gap: .4rem; margin-left: auto; }
.dots i { width: .65rem; height: .65rem; border-radius: 50%; border: 1px solid var(--gold); display: block; }
.dots i.done { background: var(--gold); }
.dots i.now { background: var(--crimson); border-color: var(--crimson); }
.langswitch { display: flex; gap: .35rem; }
.langswitch a { color: var(--muted); font-family: var(--mono); font-size: .8rem; text-decoration: none; border: 1px solid transparent; border-radius: 6px; padding: .15em .5em; }
.langswitch a[aria-current="true"] { color: var(--night); background: var(--gold); }
.langswitch a:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 1.1rem; position: relative; z-index: 1; }
.wrap-wide { max-width: 1060px; margin: 0 auto; padding: 0 1.1rem; position: relative; z-index: 1; }

.hero { padding: 3.2rem 0 1.6rem; text-align: left; }
.kicker { font-family: var(--mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 .8rem; }
.display { font-family: var(--serif); font-weight: 650; font-size: clamp(2rem, 5.4vw, 3.3rem); line-height: 1.08; margin: 0 0 1rem; }
.display em { color: var(--gold-soft); font-style: italic; }
.deck-line { font-size: 1.12rem; color: var(--parchment); max-width: 38rem; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; padding: 0; margin: 1.2rem 0; font-family: var(--mono); font-size: .86rem; color: var(--parchment-dim); }
.facts strong { color: var(--gold-soft); font-size: 1.05rem; margin-right: .3em; }
.privacy { color: var(--muted); font-size: .95rem; max-width: 38rem; }
.privacy strong { color: var(--parchment-dim); }

.stage { background: linear-gradient(180deg, var(--night-2), var(--night)); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.2rem, 3vw, 2.4rem); margin: 1rem 0 2.5rem; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.phase-label { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem; text-align: center; }
.dilemma-q { font-family: var(--serif); font-size: clamp(1.25rem, 3.4vw, 1.7rem); line-height: 1.35; text-align: center; max-width: 34rem; margin: 0 auto 1.4rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; max-width: 640px; margin: 0 auto; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.choice {
  font-family: var(--body); font-size: 1.05rem; line-height: 1.4; cursor: pointer;
  background: var(--parchment); color: var(--ink); border: 2px solid transparent; border-radius: var(--radius);
  padding: 1rem 1.1rem; min-height: 88px; transition: transform .12s ease, border-color .12s ease;
}
.choice small { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: #6b5d3f; margin-bottom: .35em; text-transform: uppercase; }
.choice:hover { transform: translateY(-2px); border-color: var(--gold); }
.choice.opt-b { background: var(--night-3); color: var(--parchment); border-color: var(--line); }
.choice.opt-b small { color: var(--muted); }
.choice.opt-b:hover { border-color: var(--crimson); }
.hint { text-align: center; color: var(--muted); font-size: .88rem; margin: 1rem 0 0; }
.backrow { text-align: center; margin-top: .8rem; }
.linkbtn { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: .82rem; cursor: pointer; text-decoration: underline; }

/* result */
.badge { text-align: center; border: 1px solid var(--gold); border-radius: 18px; padding: 1.6rem 1.2rem; background: radial-gradient(ellipse at 50% 0%, rgba(217,164,65,.16), transparent 65%), var(--night-3); margin-bottom: 1.2rem; }
.badge .k { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.badge h2 { font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); margin: .3em 0 .2em; }
.badge h2 .pct { color: var(--gold-soft); }
.badge p { max-width: 36rem; margin: .4em auto; }
.bars { max-width: 560px; margin: 0 auto 1rem; }
.bar { display: grid; grid-template-columns: 92px 1fr 52px; gap: .7rem; align-items: center; margin: .55rem 0; font-family: var(--mono); font-size: .85rem; }
.bar .track { height: 14px; border-radius: 8px; background: rgba(245,236,218,.14); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 8px; background: var(--teal); }
.bar.top .fill { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.bar .n { text-align: right; color: var(--gold-soft); }
.ro-note { border-left: 3px solid var(--teal); padding: .4rem 0 .4rem .9rem; color: var(--parchment-dim); max-width: 38rem; margin: 0 auto 1.2rem; font-size: .98rem; }
.limit-inline { color: var(--muted); font-size: .9rem; max-width: 38rem; margin: 0 auto 1.2rem; }
.btnrow { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin: 1rem 0 .4rem; }
.btn { font-family: var(--mono); font-size: .95rem; cursor: pointer; border-radius: 10px; padding: .8rem 1.3rem; border: 1px solid var(--gold); background: var(--gold); color: var(--night); min-height: 48px; }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn:hover { filter: brightness(1.07); }
.sharetext { max-width: 560px; margin: 0 auto; width: 100%; background: var(--night); color: var(--parchment-dim); border: 1px dashed var(--line); border-radius: 10px; font-family: var(--mono); font-size: .82rem; padding: .7rem .9rem; }

article section { margin: 0 0 2.2rem; }
article h2 { font-family: var(--serif); font-size: clamp(1.4rem, 3.6vw, 1.9rem); line-height: 1.2; margin: 0 0 .7rem; color: var(--gold-soft); }
article h3 { font-family: var(--mono); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
article p, article li { color: var(--parchment); }
article a { color: var(--gold-soft); }
.cluster-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1rem 0; }
@media (max-width: 560px) { .cluster-cards { grid-template-columns: 1fr; } }
.cluster-cards div { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; background: rgba(245,236,218,.04); }
.cluster-cards strong { font-family: var(--serif); font-size: 1.1rem; color: var(--gold-soft); }
.cluster-cards p { font-size: .92rem; margin: .3em 0 0; color: var(--parchment-dim); }
.method { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; background: rgba(42,157,143,.08); font-size: .95rem; }
.sources-list { font-size: .92rem; color: var(--parchment-dim); }
footer.site { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.4rem 0 2.4rem; color: var(--muted); font-size: .88rem; position: relative; z-index: 1; }
footer.site a { color: var(--gold-soft); }
