/* Shared by the app (/app) and the website (/): tokens, answer visuals, "How Jev decided". */
:root {
  color-scheme: light;
  /* warm paper */
  --bg: #f4eee6;
  --bg-2: #eee6db;
  --surface: #ffffff;
  --surface-2: #fbf7f2;
  --surface-3: #f1e9df;
  --line: #e3d8cb;
  --line-2: #d3c5b5;
  --dots: #cbbcab;
  /* warm brown ink, never black */
  --text: #2b2118;
  --text-hover: #45362a;
  --text-2: #5e5045;
  --muted: #8e7f72;
  --faint: #b2a395;

  /* light orange family */
  --orange: #e8692b;
  --orange-soft: #f39a5e;
  --peach: #fbdcc6;
  --peach-2: #fdeee2;
  --rust: #b4501f;
  --amber: #c98a1e;
  --taupe: #8c7b6e;
  --ok: #3f8f5f;
  --warn: #c98a1e;
  --danger: #c8462f;
  --on-accent: #ffffff;

  --grad: linear-gradient(120deg, #e8692b 0%, #f39a5e 55%, #f8c29c 100%);
  --grad-warm: linear-gradient(120deg, #c9bbae, #8c7b6e);
  --shadow: 0 1px 2px rgba(80, 50, 20, .05), 0 12px 32px rgba(80, 50, 20, .07);

  --code-bg: #fbf7f2;
  --code-text: #3a2d22;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --caps: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --sidebar: 272px;
  --drawer: 480px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

.kind { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; }
.kind::before { content: ''; width: 8px; height: 8px; border-radius: 2px; }
.kind-noul { color: var(--orange); } .kind-noul::before { background: var(--orange); border-radius: 50%; }
.kind-choice { color: var(--rust); } .kind-choice::before { background: var(--rust); }
.kind-score { color: var(--amber); } .kind-score::before { background: var(--amber); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.result {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(255,255,255,.75) 100%);
  padding: 18px 18px 16px;
}
.result + .result { margin-top: -4px; }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.result-head h3 { margin: 8px 0 0; font: 600 15px/1.4 var(--font); color: var(--text-2); }
.result-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }

.verdict { font: 600 34px/1.05 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.verdict.yes { color: var(--orange); }
.verdict.no { color: var(--taupe); }
.verdict-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.verdict-sub b { color: var(--text-2); font-weight: 600; }

.conf { display: flex; align-items: center; gap: 10px; flex: none; }
.ring { width: 46px; height: 46px; position: relative; }
.ring svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px/1 var(--display); }
.conf-label { font-size: 12px; line-height: 1.3; color: var(--muted); }
.conf-label b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.conf.high .val { stroke: var(--ok); } .conf.mid .val { stroke: var(--amber); } .conf.low .val { stroke: var(--danger); }

/* yes / no meter */
.yn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--grad); width: 0; transition: width .9s var(--ease); }
.meter.no i { background: var(--grad-warm); }
.meter-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.meter-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--bg); }

/* choice bars */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) 44px; gap: 12px; align-items: center; font-size: 14px; }
.bars .lbl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bars .bar i { display: block; height: 100%; border-radius: 999px; background: var(--line-2); width: 0; transition: width .9s var(--ease); }
.bars li.win .lbl { color: var(--text); font-weight: 600; }
.bars li.win .bar i { background: var(--grad); }
.bars .pct { text-align: right; font: 500 13px/1 var(--mono); color: var(--muted); }
.bars li.win .pct { color: var(--text); }

/* score track */
.track-wrap { padding-top: 4px; }
.track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #f8dcc6, #f39a5e 55%, #d9542b); }
.track .tick { position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(255,255,255,.75); }
.track .marker {
  position: absolute; top: 50%; left: 0;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: var(--text); border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-2), 0 4px 14px rgba(80,50,20,.14);
  transition: left .9s var(--ease);
}
.levels { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.levels li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13.5px; color: var(--muted); }
.levels li .n { font: 600 11px/1 var(--mono); color: var(--faint); text-align: center; padding: 4px 0; border-radius: 6px; border: 1px solid var(--line); }
.levels li .pct { text-align: right; font: 500 12.5px/1 var(--mono); }
.levels li.on { color: var(--text); }
.levels li.on .n { color: var(--on-accent); background: var(--amber); border-color: var(--amber); }

.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--text-2);
  background: rgba(201,138,30,.06);
  border: 1px solid rgba(201,138,30,.22);
}
.callout::before { content: '!'; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: var(--on-accent); font: 700 11px/1 var(--display); }
.callout.info { background: rgba(232,105,43,.06); border-color: rgba(232,105,43,.22); }
.callout.info::before { content: 'i'; background: var(--rust); }
.callout.err { background: rgba(200,70,47,.07); border-color: rgba(200,70,47,.3); }
.callout.err::before { background: var(--danger); }
.callout .link { margin-left: 4px; }

/* code highlighting */
.tok-s { color: #b4501f; } .tok-k { color: #7a4a26; font-weight: 500; } .tok-c { color: #a89888; font-style: italic; } .tok-n { color: #b07a1f; }

/* pixel accents */
.px-label { font: 400 11px/1.2 var(--caps); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* "How Jev decided" — a replay of the probabilities Jev already returned */
.think-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 2px; padding: 6px 10px 6px 8px;
  border-radius: 9px; border: 1px dashed var(--line-2);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  justify-self: start;
}
.think-toggle:hover { border-color: var(--orange); color: var(--text); }
.think-toggle[aria-expanded="true"] { border-style: solid; border-color: rgba(232,105,43,.5); background: rgba(232,105,43,.08); color: var(--text); }
.think-toggle .px-dot { width: 8px; height: 8px; background: var(--orange); box-shadow: 10px 0 0 var(--rust), 20px 0 0 var(--orange); margin-right: 20px; image-rendering: pixelated; }
.think-toggle .free { font: 400 10px/1 var(--caps); color: var(--ok); letter-spacing: .04em; }

.think {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(232,105,43,.05) 6px 7px);
  padding: 14px 14px 12px;
}
.think-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.think-free { font: 400 10px/1 var(--caps); color: var(--ok); border: 1px solid rgba(63,143,95,.35); padding: 4px 6px; letter-spacing: .04em; }
.think-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.think-step { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
.think-n {
  width: 22px; height: 22px; display: grid; place-items: center;
  font: 400 11px/1 var(--caps); color: var(--on-accent); background: var(--orange);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.12);
}
.think-step:nth-child(2) .think-n { background: var(--rust); }
.think-step:nth-child(3) .think-n { background: var(--amber); }
.think-step b { font-size: 13.5px; font-weight: 600; color: var(--text); }
.think-step p { margin: 3px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.think-step code { font: 12px/1.4 var(--mono); color: var(--rust); }
.think-bars { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.think-bars li { display: grid; grid-template-columns: minmax(70px, 30%) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.think-bars li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.think-bars .tb { height: 10px; background: var(--surface-3); position: relative; overflow: hidden; }
.think-bars .tb i {
  position: absolute; inset: 0 auto 0 0; background: var(--line-2);
  /* pixel stepping on the bar edge */
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
          mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px);
}
.think-bars li.top .tb i { background: var(--grad); }
.think-bars li.top { color: var(--text); font-weight: 600; }
.think-bars .tp { text-align: right; font: 500 12px/1 var(--mono); color: var(--muted); }
.think-bars li.top .tp { color: var(--text); }
.think-bars .even { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(43,33,24,.35); }
.think-advice { padding-left: 10px; border-left: 3px solid var(--line-2); }
.think-advice.high { border-color: var(--ok); }
.think-advice.mid { border-color: var(--amber); }
.think-advice.low { border-color: var(--danger); }
.think-note { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); }
@media (max-width: 560px) { .think-bars li { grid-template-columns: minmax(60px, 34%) minmax(0, 1fr) 40px; gap: 8px; } }

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

/* logo center matches the page */
.logo-hole { fill: var(--bg); }
