/*
 * Terra Ultima, on a phone.
 *
 * Every colour comes from Telegram's theme params (Tg.kt copies them onto :root), with a fallback
 * for a plain browser. That is not politeness: a Mini App that ignores the client's theme looks
 * like a web page someone embedded, and this one has to read like part of the client for two hours
 * of someone's attention.
 *
 * The layout rule is one column and no tables. `docs/11-TELEGRAM.md` §2 has the reasoning: the
 * terminal frontend's aligned columns turn to pulp at 380 px, so every readout here is a
 * label-and-value row that may wrap anywhere.
 */

:root {
  --bg:      var(--tg-theme-secondary-bg-color, #eff1f5);
  --card:    var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text:    var(--tg-theme-text-color, #13161a);
  --hint:    var(--tg-theme-hint-color, #77808c);
  --subtle:  var(--tg-theme-subtitle-text-color, var(--tg-theme-hint-color, #77808c));
  --accent:  var(--tg-theme-button-color, #2f7fd8);
  --on-accent: var(--tg-theme-button-text-color, #ffffff);
  --link:    var(--tg-theme-link-color, #2f7fd8);
  --danger:  var(--tg-theme-destructive-text-color, #d1453b);
  --sep:     var(--tg-theme-section-separator-color, rgba(0,0,0,.09));
  --chip-bg: rgba(127,140,158,.13);

  --crisis:      #d93b2b;
  --notable:     #b8801a;
  --opportunity: #1f8a52;

  --pad: 14px;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 56px;
}

[data-scheme="dark"] {
  --bg:      var(--tg-theme-secondary-bg-color, #17212b);
  --card:    var(--tg-theme-section-bg-color, #232e3c);
  --text:    var(--tg-theme-text-color, #f4f6f8);
  --hint:    var(--tg-theme-hint-color, #8b9aa8);
  --subtle:  var(--tg-theme-subtitle-text-color, #8b9aa8);
  --sep:     var(--tg-theme-section-separator-color, rgba(255,255,255,.10));
  --chip-bg: rgba(255,255,255,.09);

  --crisis:      #ff6f5e;
  --notable:     #f0ad3c;
  --opportunity: #57c98a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.47 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  overscroll-behavior-y: contain;
}

.screen {
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 12px calc(28px + var(--safe-bottom));
}
.screen.with-tabs { padding-bottom: calc(var(--tabbar-h) + 24px + var(--safe-bottom)); }
.screen.center { min-height: 70vh; display: flex; flex-direction: column;
                 align-items: center; justify-content: center; text-align: center; gap: 8px; }

/* ---------------------------------------------------------------- type */

.title-mark {
  font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.panel-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hint); margin: 20px 2px 8px;
}
.panel-label:first-child { margin-top: 4px; }
.body { margin: 0 0 9px; }
.body:last-child { margin-bottom: 0; }
.body.dim { color: var(--subtle); }
.note { font-size: 13px; color: var(--hint); margin: 4px 2px 8px; }
.note.warn { color: var(--danger); }
.note.mono, .mono { font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bullet { font-size: 14px; color: var(--subtle); padding-left: 14px; position: relative; margin: 3px 0; }
.bullet::before { content: "—"; position: absolute; left: 0; color: var(--hint); }
.footer-note { font-size: 12px; color: var(--hint); text-align: center; margin: 18px 8px 4px; }
/* One locked-elsewhere option per line: run together on one line they read as a sentence. */
.footer-note-item { margin-top: 3px; }

/* ---------------------------------------------------------------- top bar & strip */

.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 2px 8px;
}
.topbar.sticky {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding-top: 8px;
}
.topbar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-main > .ship {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-main > .clock { font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }

.strip {
  position: sticky; top: 44px; z-index: 4;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; margin: 0 0 12px;
  background: var(--card); border-radius: 12px;
  overflow-x: auto; scrollbar-width: none;
  cursor: pointer;
}
.strip::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: baseline; gap: 3px;
  padding: 4px 8px; border-radius: 9px; background: var(--chip-bg);
  font-size: 13px; white-space: nowrap; flex: 0 0 auto;
}
.chip.warn { background: color-mix(in srgb, var(--crisis) 18%, transparent); }
.chip-icon { font-size: 12px; }
.chip-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip-trend { font-size: 11px; color: var(--hint); }
.chip-note { font-size: 11px; color: var(--hint); max-width: 84px;
             overflow: hidden; text-overflow: ellipsis; }
.strip-more { margin-left: auto; color: var(--hint); font-size: 11px; flex: 0 0 auto; padding-left: 4px; }

/* ---------------------------------------------------------------- meanwhile */

.meanwhile { background: var(--card); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.meanwhile-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer;
}
.meanwhile-title { flex: 1; font-size: 13px; color: var(--subtle); }
.meanwhile-peek {
  padding: 0 12px 10px; font-size: 13px; color: var(--text); font-style: italic;
}
.meanwhile-body { padding: 0 12px 12px; border-top: 1px solid var(--sep); padding-top: 10px; }
.digest-year {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hint); margin: 10px 0 3px;
}
.digest-year:first-child { margin-top: 0; }
.digest-note { font-size: 14px; color: var(--subtle); margin: 3px 0; }
.outcome {
  font-size: 14px; margin: 0 0 8px; padding-left: 12px;
  border-left: 2px solid var(--accent);
}

/* ---------------------------------------------------------------- the event */

.event { background: var(--card); border-radius: var(--radius); padding: var(--pad); margin-bottom: 6px; }
.event-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sev {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px;
}
.sev.crisis      { color: #fff; background: var(--crisis); }
.sev.notable     { color: #fff; background: var(--notable); }
.sev.opportunity { color: #fff; background: var(--opportunity); }
.sev.calm        { color: var(--hint); background: var(--chip-bg); }
.since { font-size: 12px; color: var(--hint); }
.event-title { font-size: 19px; font-weight: 700; line-height: 1.24; margin-bottom: 8px; }
.previously { font-size: 13px; color: var(--hint); font-style: italic; margin-bottom: 8px; }

/* ---------------------------------------------------------------- cards & options */

.card {
  background: var(--card); border-radius: var(--radius); padding: var(--pad);
  margin-bottom: 8px; cursor: pointer;
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: box-shadow .12s ease, opacity .12s ease;
}
.card.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.card.locked { opacity: .62; }
.card-top { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 5px; }
.badge {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  background: var(--chip-bg); color: var(--text);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.badge.locked { background: transparent; }
.card.selected .badge { background: var(--accent); color: var(--on-accent); }
.card-title { flex: 1; font-weight: 600; line-height: 1.3; }
.tick { color: var(--accent); font-weight: 800; }
.lock-line { font-size: 13px; color: var(--danger); margin: 0 0 6px 31px; }
.card .body { margin-left: 31px; }
.badge-line {
  margin-left: 31px; margin-top: 6px; font-size: 11px; color: var(--hint);
  text-transform: uppercase; letter-spacing: .07em;
}

.price { display: flex; gap: 7px; margin: 5px 0 0 31px; font-size: 13.5px; align-items: baseline; }
.price-icon { flex: 0 0 auto; font-size: 12px; }
.price-text { flex: 1; }
.price.pays   .price-text { color: var(--text); }
.price.gains  .price-text { color: var(--opportunity); }
.price.starts .price-text { color: var(--subtle); }
.price.learns .price-text { color: var(--link); }

.card.premise { cursor: pointer; }
.teaches {
  margin-top: 8px; font-size: 12px; color: var(--hint);
  text-transform: uppercase; letter-spacing: .06em;
}

.debug {
  margin: 8px 0 0 31px; padding: 8px; border-radius: 8px; background: var(--chip-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--subtle);
}
.debug-line { margin: 1px 0; word-break: break-word; }

/* ---------------------------------------------------------------- readouts */

.row-head { font-size: 17px; font-weight: 700; }
.row-sub { font-size: 13px; color: var(--hint); margin-bottom: 4px; }

.readout { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sep); }
.readout:last-child { border-bottom: none; }
.readout-icon { flex: 0 0 20px; text-align: center; font-size: 14px; }
.readout-body { flex: 1; min-width: 0; }
.readout-top { display: flex; gap: 10px; align-items: baseline; }
.readout-name { flex: 1; min-width: 0; }
.readout-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.readout-note { font-size: 12.5px; color: var(--hint); margin-top: 2px; }
.readout-note.warn { color: var(--danger); }
.readout-note.dim { opacity: .8; }
.readout.warn .readout-value, .readout.warn .readout-icon { color: var(--danger); }

.gauge { padding: 7px 0; }
.gauge-top { display: flex; gap: 8px; align-items: baseline; margin-bottom: 5px; }
.gauge-word { font-weight: 600; }
.gauge-name { font-size: 12px; color: var(--hint); text-transform: uppercase; letter-spacing: .07em; }
.meter { display: flex; gap: 3px; }
.pip { flex: 1; height: 4px; border-radius: 2px; background: var(--chip-bg); }
.pip.on { background: var(--accent); }
.gauge.strain .pip.on { background: var(--notable); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--chip-bg); color: var(--subtle); }
.tag.bad { color: var(--danger); }

.fact { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sep); }
.fact:last-child { border-bottom: none; }
.fact-conf { flex: 0 0 16px; text-align: center; font-size: 12px; }
.fact-conf.measured  { color: var(--opportunity); }
.fact-conf.estimated { color: var(--notable); }
.fact-conf.unknown   { color: var(--hint); }
.fact-body { flex: 1; min-width: 0; }

.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.fact-cell { background: var(--card); border-radius: 12px; padding: 10px 12px; }
.fact-cell .panel-label { margin: 0 0 3px; }
.fact-value { font-size: 16px; font-weight: 600; }

.verdict {
  border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; font-size: 14px;
  background: color-mix(in srgb, var(--opportunity) 14%, var(--card));
}
.verdict.warn { background: color-mix(in srgb, var(--crisis) 14%, var(--card)); }

.aim { padding: 10px 0; border-bottom: 1px solid var(--sep); }
.aim:last-child { border-bottom: none; }
.aim.done { opacity: .6; }
.aim-top { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.aim-kind {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--hint); flex: 0 0 auto;
}
.aim-label { flex: 1; font-weight: 600; }
.aim-pct { font-variant-numeric: tabular-nums; color: var(--subtle); font-size: 13px; }
.bar { height: 5px; border-radius: 3px; background: var(--chip-bg); overflow: hidden; margin-bottom: 5px; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }

.logrow { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sep); }
.logrow:last-child { border-bottom: none; }
.dot { flex: 0 0 7px; height: 7px; border-radius: 50%; margin-top: 7px; background: var(--hint); }
.dot.crisis { background: var(--crisis); }
.dot.notable { background: var(--notable); }
.dot.opportunity { background: var(--opportunity); }
.logrow-body { flex: 1; min-width: 0; }
.logrow-top { display: flex; gap: 8px; align-items: baseline; }
.logrow-year {
  flex: 0 0 auto; font-size: 11px; color: var(--hint); font-variant-numeric: tabular-nums;
  text-transform: uppercase; letter-spacing: .06em;
}
.logrow-title { flex: 1; font-size: 13px; color: var(--subtle); }
.logrow-chosen { font-weight: 600; font-size: 14px; margin-top: 1px; }

.module { padding: 9px 0; border-bottom: 1px solid var(--sep); }
.module:last-child { border-bottom: none; }
.cond { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.cond.ok { color: var(--opportunity); }
.cond.worn { color: var(--notable); }
.cond.broken { color: var(--danger); }

/* ---------------------------------------------------------------- sections */

.section { background: var(--card); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.section-head { display: flex; align-items: center; gap: 8px; padding: 12px 13px; cursor: pointer; }
.section-title {
  flex: 1; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--subtle);
}
.section-chevron { color: var(--hint); font-size: 12px; }
.section-body { padding: 0 13px 13px; }
.premise-card { background: var(--card); border-radius: var(--radius); padding: var(--pad); margin-bottom: 10px; }
.hero { background: var(--card); border-radius: var(--radius); padding: var(--pad); margin-bottom: 16px; }

/* ---------------------------------------------------------------- ending */

.ending-banner {
  border-radius: var(--radius); padding: 20px var(--pad); margin-bottom: 12px; text-align: center;
  background: var(--card);
}
.ending-tier {
  font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 6px;
}
.ending-banner.thriving    .ending-tier { color: var(--opportunity); }
.ending-banner.established .ending-tier { color: var(--accent); }
.ending-banner.clinging    .ending-tier { color: var(--notable); }
.ending-banner.lost        .ending-tier { color: var(--crisis); }
.ending-note { font-size: 15px; color: var(--subtle); }

.identity { padding: 10px 0; border-bottom: 1px solid var(--sep); }
.identity:last-child { border-bottom: none; }
.identity-top { display: flex; gap: 8px; align-items: baseline; }
.identity-strength {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--hint);
  flex: 0 0 auto;
}
.identity-word { font-weight: 700; }

/* ---------------------------------------------------------------- tab bar */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--sep);
}
body.no-tg .tabbar { bottom: calc(52px + var(--safe-bottom)); padding-bottom: 0;
                     height: var(--tabbar-h); }
.tab {
  flex: 1; border: none; background: none; color: var(--subtle); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; padding: 0;
}
.tab-icon { font-size: 17px; }
.tab-label { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }

/* ---------------------------------------------------------------- sheets */

.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 90vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 16px 16px 0 0;
  animation: rise .2s ease-out;
}
@keyframes rise { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-grip { padding: 8px 0 2px; display: flex; justify-content: center; cursor: pointer; }
.sheet-grip::after { content: ""; width: 34px; height: 4px; border-radius: 2px; background: var(--sep); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 14px 10px; }
.sheet-title { flex: 1; font-size: 16px; font-weight: 700; }
.sheet-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 14px calc(20px + var(--safe-bottom));
}

/* ---------------------------------------------------------------- controls */

button.ghost {
  border: none; background: var(--chip-bg); color: var(--subtle);
  font: inherit; font-size: 13px; padding: 6px 11px; border-radius: 9px; cursor: pointer;
}
button.ghost.small { padding: 5px 9px; font-size: 12px; }
.gear-row { display: flex; justify-content: center; margin-top: 14px; }
button.danger {
  border: none; background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger);
  font: inherit; font-weight: 600; padding: 12px; border-radius: 12px; width: 100%; cursor: pointer;
}
.danger-row { margin: 22px 0 6px; }

.toggle-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 13px; cursor: pointer;
  background: var(--card); border-radius: 12px;
}
.toggle-body { flex: 1; }
.switch {
  flex: 0 0 auto; width: 42px; height: 25px; border-radius: 13px; background: var(--chip-bg);
  position: relative; transition: background .15s ease; margin-top: 2px;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(17px); }

.code-block {
  display: flex; gap: 8px; align-items: center; background: var(--card);
  border-radius: 10px; padding: 10px 11px; margin: 8px 0 4px;
}
.code {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; color: var(--subtle); word-break: break-all;
}
.seed-input {
  flex: 1; min-width: 0; border: none; background: var(--chip-bg); color: var(--text);
  font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px;
}

/* The bottom button Telegram would have given us. Only ever visible in a plain browser. */
.fallback-main {
  position: fixed; left: 12px; right: 12px; bottom: calc(8px + var(--safe-bottom)); z-index: 30;
  border: none; border-radius: 12px; padding: 15px;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  max-width: 596px; margin: 0 auto;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.fallback-main.destructive { background: var(--danger); }

@media (min-width: 700px) {
  .fallback-main { left: 50%; right: auto; transform: translateX(-50%); width: 596px; }
}

/* ------------------------------------------------------------------ the Decide screen (round 4)
 * docs/12-MINIAPP.md. Always in front: where you are, what this decision touches, the stakes,
 * the answers. One tap: an answer in full, the tabs. Folded: what another ship could do. */
.screen.with-tabs { padding-bottom: calc(24px + var(--safe-bottom)); }
.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; padding: 6px; margin: 0 0 10px;
  background: var(--card); border-radius: 12px; box-shadow: 0 1px 0 var(--sep); }
.tabbtn { flex: 1; border: 0; background: transparent; color: var(--hint); font: 600 14px/1 inherit;
  padding: 9px 4px; border-radius: 9px; cursor: pointer; }
.tabbtn.on { background: var(--chip-bg); color: var(--text); }
.tabbtn.gear { flex: 0 0 38px; }
.context { margin: 2px 2px 12px; display: grid; gap: 6px; }
.ctx-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ctx-year { font-weight: 700; }
.ctx-place { color: var(--hint); flex: 1; }
.ctx-people { font-weight: 600; }
.ctx-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.ctx-stat .k { color: var(--hint); margin-right: 5px; }
.ctx-stat .v { font-weight: 600; }
.ctx-stat.warn .v { color: var(--danger); }
.event-title { font-size: 26px; line-height: 1.15; font-weight: 700; margin: 4px 0 8px; letter-spacing: -.01em; }
.event .body { font-size: 16px; line-height: 1.45; color: var(--subtle); }
.stakes { margin: 10px 0 12px; padding: 11px 13px; border-left: 3px solid var(--crisis);
  background: rgba(217,59,43,.09); border-radius: 8px; font-size: 15px; line-height: 1.4; }
.answers { display: grid; gap: 8px; }
.answer { background: var(--card); border-radius: 12px; padding: 12px 14px; border: 1.5px solid transparent;
  cursor: pointer; display: grid; gap: 6px; }
.answer.selected { border-color: var(--accent); }
.answer.locked { background: transparent; border: 1.5px dashed var(--sep); color: var(--hint); }
.a-label { font-size: 17px; font-weight: 600; line-height: 1.25; }
.a-hint { font-size: 14px; color: var(--hint); line-height: 1.35; }
.a-lock { font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 13px; line-height: 1; padding: 6px 8px; border-radius: 7px; white-space: nowrap; }
.chip.bad { background: rgba(209,69,59,.12); color: var(--danger); }
.chip.good { background: rgba(31,138,82,.13); color: var(--opportunity); }
.chip.lives { box-shadow: inset 0 0 0 1.5px var(--danger); font-weight: 700; }
.chip.gamble, .chip.none { background: var(--chip-bg); color: var(--hint); }
.odds { margin-top: 6px; display: grid; gap: 4px; }
.odds-line { font-size: 13px; color: var(--hint); }
.odds-line .chip { margin-right: 4px; }
.a-full { display: grid; gap: 7px; border-top: 1px solid var(--sep); padding-top: 9px; font-size: 14.5px; }
.a-full .body { margin: 0; color: var(--subtle); }
.a-row { display: grid; grid-template-columns: 54px 1fr; gap: 8px; line-height: 1.35; }
.a-row.dim { display: block; color: var(--hint); }
.a-k { font-weight: 700; color: var(--hint); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.a-k.bad { color: var(--danger); } .a-k.good { color: var(--opportunity); }
.a-armed { color: var(--danger); font-weight: 600; }
.fold { margin-top: 10px; border-radius: 10px; }
.fold-head { display: flex; justify-content: space-between; padding: 10px 4px; color: var(--hint); cursor: pointer; font-size: 14.5px; }
.fold-item { padding: 6px 4px 6px 14px; font-size: 14.5px; color: var(--subtle); }
.fold-note { padding: 4px 4px 8px 14px; font-size: 13px; color: var(--hint); }
.hint-foot { margin-top: 12px; text-align: center; color: var(--hint); font-size: 13.5px; }
.stop-here { margin-top: 14px; padding: 12px 14px; background: var(--card); border-radius: 12px; display: flex;
  align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; }
