:root {
  /* Foresimo: a calm precision instrument. Mineral paper, graphite ink, petrol for action,
     sodium amber only where something is live or decisive. */
  --ink: #172226;          /* graphite */
  --ink-2: #22313A;
  --indigo: #12505E;       /* petrol: actions, links, selection */
  --indigo-deep: #0C3B46;
  --indigo-soft: #E1EBEA;
  --sky: #5B97A1;
  --mist: #B7CDCF;
  --signal: #D9962B;       /* sodium: live, decisive */
  --signal-soft: #F6EBD6;
  --bg: #F0F1ED;           /* mineral paper */
  --panel: #FBFBF8;
  --line: #D9DCD4;
  --line-strong: #C3C8BF;
  --text: #172226;
  --muted: #5C676A;
  --good: #2E7650;
  --good-soft: #E2EEE5;
  --bad: #A83A2A;
  --bad-soft: #F5E3DE;
  --warn: #946010;
  --warn-soft: #F5EAD3;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(23, 34, 38, .04);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  font-stretch: 100%;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 28px;
  background: rgba(251, 251, 248, .94); color: var(--text);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; }
.brand-name { font-family: var(--display); font-stretch: 125%; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; font-size: 14px; }
.topnav { display: flex; align-items: center; gap: 18px; }
.topnav a { color: var(--muted); font-size: 14px; }
.topnav a:hover { color: var(--text); text-decoration: none; }
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 9px; font: 500 13px var(--font);
  cursor: pointer; letter-spacing: .02em;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--line-strong); background: var(--panel); }
.lang-btn::after { content: ""; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(23, 34, 38, .12); flex: none; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 168px; margin: 0; padding: 4px;
  list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(23, 34, 38, .10);
}
.lang-menu li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.lang-menu li:hover, .lang-menu li:focus { background: var(--indigo-soft); outline: none; }
.lang-menu li[aria-selected="true"] { font-weight: 600; color: var(--indigo); }

.view { max-width: 1240px; margin: 0 auto; padding: 36px 28px 96px; }

/* ---------- generic ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 22px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0 0 10px; line-height: 1.15; }
h1 { font-size: 30px; font-stretch: 118%; letter-spacing: -.015em; }
h2 { font-size: 20px; font-stretch: 112%; letter-spacing: -.005em; }
h3 { font-size: 15.5px; font-stretch: 106%; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stack > * + * { margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  background: var(--indigo); color: #fff; font-weight: 600; cursor: pointer; letter-spacing: .005em;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--indigo-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn { white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--indigo); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--indigo-soft); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { padding: 6px 12px; font-size: 13px; }

.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; background: #fff;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus, select:focus { outline: 2px solid var(--sky); outline-offset: 1px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 3px;
  font-size: 12px; font-weight: 600; background: var(--indigo-soft); color: var(--indigo); white-space: nowrap;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.plain { background: #E8EAE4; color: var(--muted); }

.progress { height: 4px; background: #E3E6DF; border-radius: 2px; overflow: hidden; }
.progress > div { height: 100%; background: var(--indigo); transition: width .4s; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(23,34,38,.18);
  max-width: 90vw; z-index: 50;
}
.toast.error { background: var(--bad); }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: start; }
.hero-copy { padding: 8px 0 0; }
.hero-copy h1 { font-size: clamp(38px, 5.2vw, 64px); font-stretch: 125%; font-weight: 600; line-height: .98;
  letter-spacing: -.03em; margin: 0 0 22px; max-width: 12ch; }
.hero-copy .lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 34em; margin: 0; }
.swarm { margin: 34px 0 6px; }
.swarm svg { width: 100%; height: auto; display: block; }
.swarm circle { fill: var(--ink); opacity: .16; }
.swarm circle.r { animation: wake .5s ease-out both; animation-delay: calc(var(--d) * 26ms + 300ms); }
.swarm circle.r.o { --to: var(--signal); }
.swarm circle.r.s { --to: var(--indigo); }
@keyframes wake { to { fill: var(--to); opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .swarm circle.r { animation: none; fill: var(--to); opacity: .95; } }
.swarm figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 46em; }
.swarm figcaption i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: 0; }
.steps-mini { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 0; position: relative; max-width: 36em; }
.steps-mini li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; padding: 0 0 16px; position: relative; }
.steps-mini li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 2px; width: 1px; background: var(--line-strong); }
.steps-mini .num {
  width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--indigo); font-weight: 600; font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.steps-mini b { font-weight: 600; }
.data-sources { margin-top: 28px; max-width: 46em; line-height: 1.6; }
.hero form.panel { position: sticky; top: 96px; padding: 28px; border-color: var(--line-strong); }
.hero form h2 { font-size: 22px; font-stretch: 118%; }

.drop {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer;
  background: var(--bg); transition: background .15s, border-color .15s;
}
.drop.over { background: var(--indigo-soft); border-color: var(--indigo); }
.drop input { display: none; }
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.files button { border: 0; background: none; color: var(--bad); cursor: pointer; }

.project-list { margin-top: 64px; }
.project-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text);
}
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: var(--bg); text-decoration: none; }
.project-row .q { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- workspace ---------- */
.workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.stepper { position: sticky; top: 92px; padding: 10px; }
.stepper h2 { font-size: 15px; padding: 10px 10px 4px; }
.stepper .question { font-size: 13px; color: var(--muted); padding: 0 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.step-link {
  display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); color: var(--text); cursor: pointer;
  border: 0; background: none; width: 100%; text-align: left; position: relative;
}
.step-link:hover { background: var(--bg); }
.step-link.active { background: var(--indigo-soft); }
.step-link .dot {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); background: #fff;
}
.step-link.done .dot { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.step-link.running .dot { border-color: var(--signal); color: var(--warn); animation: pulse 1.4s infinite; }
.step-link.failed .dot { border-color: var(--bad); color: var(--bad); }
.step-link small { display: block; color: var(--muted); font-size: 12px; }
.step-link[disabled] { opacity: .45; cursor: default; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 150, 43, .55); } 50% { box-shadow: 0 0 0 6px rgba(217, 150, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .step-link.running .dot { animation: none; } }

.stage { min-width: 0; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.stage-head h1 { font-size: 28px; margin: 0; }
.jobline { margin: 0 0 16px; }
.jobline .msg { font-size: 13px; color: var(--muted); margin-top: 6px; }
.alert { padding: 12px 14px; border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); font-size: 14px; margin-bottom: 14px; white-space: pre-wrap; }
.alert.info { background: var(--indigo-soft); color: var(--indigo); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-stretch: 112%; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.graph-box { position: relative; height: 520px; overflow: hidden; }
.graph-box canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.graph-legend { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: 70%; }
.graph-legend span { background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.graph-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.graph-card { position: absolute; right: 12px; top: 12px; width: 280px; max-height: 480px; overflow: auto; padding: 14px; font-size: 13px; }

.log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; max-height: 260px; overflow: auto; padding: 12px 14px; background: #12262B; color: #CFDEDC; border-radius: var(--radius); }
.log div { padding: 1px 0; white-space: pre-wrap; }
.log .warning { color: #E8B65C; }
.log .error { color: #F0907F; }
.log time { color: #6E969B; margin-right: 8px; }

.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.agent { padding: 14px 16px; }
.agent .top { display: flex; gap: 10px; align-items: center; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; }
.agent .name { font-weight: 600; line-height: 1.2; }
.agent .handle { color: var(--muted); font-size: 12px; }
.agent p { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.agent details summary { cursor: pointer; font-size: 12px; color: var(--indigo); }
.agent details p { color: var(--text); white-space: pre-wrap; }

.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feed-col { padding: 0; overflow: hidden; }
.feed-col header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.feed-list { max-height: 560px; overflow: auto; }
.post { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.post .avatar { width: 30px; height: 30px; font-size: 12px; }
.post .meta { font-size: 12px; color: var(--muted); }
.post .meta b { color: var(--text); }
.post blockquote { margin: 6px 0 0; padding: 6px 10px; border-left: 2px solid var(--mist); color: var(--muted); font-size: 13px; background: var(--bg); border-radius: 0 4px 4px 0; }
.post.slim { padding: 7px 16px; color: var(--muted); font-size: 13px; }

.report { max-width: 860px; }
.report h1 { font-size: 34px; font-stretch: 122%; letter-spacing: -.02em; }
.report .summary { font-size: 17px; line-height: 1.6; }
.forecasts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.forecasts li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.md h2 { margin-top: 26px; }
.md p { margin: 0 0 12px; }
.md blockquote { margin: 12px 0; padding: 8px 14px; border-left: 2px solid var(--indigo); background: var(--indigo-soft); border-radius: 0 4px 4px 0; }
.md ul, .md ol { padding-left: 22px; }
.section-pending { color: var(--muted); font-style: italic; }
.spark { width: 100%; height: 90px; }
.report-question { color: var(--muted); font-size: 14px; margin: -2px 0 16px; }
.report-next { max-width: 860px; margin-top: 16px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.print-only { display: none; }

.chat { display: grid; grid-template-columns: 260px 1fr; gap: 14px; height: 640px; }
.chat-list { overflow: auto; padding: 8px; }
.chat-list button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--radius); text-align: left; cursor: pointer; }
.chat-list button:hover { background: var(--bg); }
.chat-list button.active { background: var(--indigo-soft); }
.chat-list .who { font-size: 14px; font-weight: 600; line-height: 1.2; }
.chat-list .what { font-size: 12px; color: var(--muted); }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-msgs { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--indigo); color: #fff; border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: #E9ECE6; border-bottom-left-radius: 4px; }
.bubble.md { white-space: normal; }
.chat-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; height: 46px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; }

footer.foot { text-align: left; color: var(--muted); font-size: 12px; padding: 40px 0 0; margin-top: 40px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .hero, .workspace, .grid-2, .feed, .chat { grid-template-columns: 1fr; }
  .stepper { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chat { height: auto; }
  .chat-msgs { min-height: 360px; }
  .graph-card { position: static; width: auto; }
}
@media (max-width: 520px) {
  .project-row { grid-template-columns: minmax(0, 1fr) auto; }
  .project-row > :last-child { display: none; }
  .view { padding: 18px 16px 60px; }
  .topbar { padding: 0 16px; }
  .brand-name { letter-spacing: .18em; }
}

@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .stepper, .stage-head, .jobline, #log, .stage > h3, .toast, .report-next { display: none !important; }
  .print-only { display: block; }
  .print-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9pt; }
  .report h2 { break-after: avoid; }
  .report blockquote, .forecasts li, .stat { break-inside: avoid; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .badge, .progress > div, .spark rect { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .workspace { display: block; }
  .view { padding: 0; max-width: none; }
  .panel { box-shadow: none; border: 0; }
  .report { max-width: none; }
}

/* ---------- decision engine ---------- */
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1; }
.icon-btn:hover { background: #E8EAE4; color: var(--text); }
.variants { display: grid; gap: 12px; margin-bottom: 10px; }
.variant { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--bg); }
.variant-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.variant-head .vlabel { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; }
.variant textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; background: #fff; }
.vkey { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; background: var(--indigo); color: #fff; font-weight: 600; font-family: var(--display); font-stretch: 120%; flex: none; }
.test-settings { align-items: flex-end; margin-top: 14px; gap: 14px; flex-wrap: wrap; }
.test-settings select { width: 100%; }
.trials { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.trial { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; }
.trial b { font-family: var(--display); color: var(--indigo); }
.trial small { color: var(--muted); }
.trial.running { border-color: var(--signal); }
.trial.done small { color: var(--good); }
.trial.active { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.trial.active b, .trial.active small { color: #fff; }
.eid { color: var(--muted); font-size: 11px; opacity: .7; }

.decision { padding: 24px 26px; margin: 18px 0 8px; border-top: 3px solid var(--indigo); }
.decision .kicker { font-size: 13px; font-weight: 600; color: var(--indigo); }
.decision .verdict { margin: 8px 0 4px; }
.decision .lead { font-size: 16px; }
.winner-msg { margin: 10px 0 14px; }
.vbars { display: grid; gap: 8px; margin: 14px 0; }
.vbar-axis { display: flex; justify-content: space-between; margin-left: 170px; margin-right: 56px; font-size: 11px; color: var(--muted); }
.vbar { display: grid; grid-template-columns: 160px 1fr 46px; gap: 10px; align-items: center; }
.vbar-label { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbar.best .vbar-label { color: var(--indigo); }
.vbar-track, .seg-track { position: relative; height: 18px; background: #E7E9E3; border-radius: 3px; overflow: hidden; }
.vbar-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.vbar-range { position: absolute; top: 5px; height: 8px; background: var(--mist); border-radius: 2px; }
.vbar-mean { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.vbar-mean.pos, .seg-fill.pos { background: var(--good); }
.vbar-mean.neg, .seg-fill.neg { background: var(--bad); }
.vbar-value { font-family: var(--display); font-weight: 600; text-align: right; }
.metric-tiles { margin: 14px 0 6px; }
.metric-tiles .stat b { font-size: 20px; }
.metric-tiles .stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.segments { display: grid; gap: 6px; }
.seg { display: grid; grid-template-columns: 160px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; }
.seg b { text-align: right; }
.seg-fill { position: absolute; top: 4px; height: 10px; border-radius: 2px; opacity: .85; }
.method { margin-top: 14px; }

.kit .improved { border-left: 4px solid var(--good); margin-bottom: 14px; }
.kit .improved p { margin: 8px 0 0; }
.criticisms { display: grid; gap: 10px; }
.crit { padding: 14px 16px; display: grid; gap: 8px; }
.crit-point { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.crit-point .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bad-soft); color: var(--bad); font-size: 12px; font-weight: 700; flex: none; }
.crit-reply { background: var(--good-soft); border-radius: var(--radius); padding: 10px 12px; }
.crit-reply p { margin: 4px 0 8px; }
a.ev { font-size: 12px; font-weight: 600; background: var(--indigo-soft); padding: 1px 6px; border-radius: 3px; }
.stakeholders li { margin-bottom: 8px; }
.ev-pop { position: absolute; z-index: 50; width: min(420px, calc(100vw - 24px)); padding: 14px 16px; box-shadow: 0 10px 40px rgba(12,16,34,.18); }
.ev-pop .close { position: absolute; top: 6px; right: 6px; }
.ev-pop p { margin: 6px 0; }

@media (max-width: 720px) {
  .vbar, .seg { grid-template-columns: 90px 1fr 40px; }
  .vbar-axis { margin-left: 100px; margin-right: 50px; }
}
@media print {
  .crit, .vbar, .seg, .metric-tiles { break-inside: avoid; }
  .vbar-mean, .vbar-range, .seg-fill, .vkey, .crit-reply, .crit-point .num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kit button, .ev-pop { display: none !important; }
}
.segments { margin-bottom: 14px; }
.test-settings .field > span { white-space: nowrap; }
@media (max-width: 720px) { .vbar-axis span:nth-child(2) { visibility: hidden; } }
.queue-note { background: var(--signal-soft); color: var(--warn); border-radius: var(--radius); padding: 10px 14px; font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent input { margin-top: 3px; flex: none; width: 16px; height: 16px; }
.privacy-hint { margin: 8px 0 0; }

/* ---------- realism (R1) ---------- */
.save-state.good { color: var(--good); }
.save-state.warn { color: var(--warn); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.facts { margin: 0; padding-left: 18px; }
.facts li { margin-bottom: 4px; font-size: 14px; }
.share { display: grid; grid-template-columns: 140px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.share-track { height: 10px; background: #E7E9E3; border-radius: 2px; overflow: hidden; }
.share-track span { display: block; height: 100%; background: var(--indigo); opacity: .7; }
.share b { text-align: right; }
.events { display: grid; gap: 10px; margin-bottom: 10px; }
.event-row { display: grid; grid-template-columns: 190px 200px 1fr 32px; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--bg); }
.event-row textarea, .event-row select, .event-row input { width: 100%; }
.event-row .icon-btn { margin-top: 22px; }
.ev-round small { display: block; margin-top: 4px; }
.group-title { margin: 10px 0 -4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.metric-tiles .stat.key { border-color: var(--signal); box-shadow: inset 0 3px 0 var(--signal); }
.crit.misp .num { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .event-row { grid-template-columns: 1fr; }
  .event-row .icon-btn { margin-top: 0; justify-self: end; }
  .share { grid-template-columns: 100px 1fr 40px; }
}
.aud-segs { display: grid; gap: 6px; }
.aud-seg { display: grid; grid-template-columns: 1fr 70px 14px 28px; gap: 6px; align-items: center; }
.aud-seg input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; min-width: 0; }
.post.opening textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 4px; resize: vertical; }
.post.opening .meta { display: flex; align-items: center; gap: 6px; }
.post.opening .meta .icon-btn { margin-left: auto; }
.field.announcer { max-width: 360px; margin-bottom: 4px; }
.society .place { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.society .place p { margin: 6px 0; }
.society .chips.small .badge { font-size: 11px; }
.worldviews { margin-top: 8px; }
.markets { display: grid; gap: 6px; }
.market-row { display: grid; grid-template-columns: 48px 1fr 1fr 1fr 64px 14px 28px; gap: 6px; align-items: center; }
.market-row input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; min-width: 0; }
.identity { margin: -4px 0 6px; }
.badge.worldview { background: var(--indigo-soft); color: var(--indigo); }
@media (max-width: 720px) { .market-row { grid-template-columns: 1fr 1fr; } }

/* Start-over link under the personas */
.fresh-row { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }

/* Shown when the server was updated while this tab was open */
.new-version { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 10px 14px;
  border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; max-width: calc(100% - 32px); }
@media print { .new-version { display: none; } }

/* Message versions compared with the documents */
.check-result { display: grid; gap: 8px; margin: 10px 0 14px; }
.check-issue { border-left: 3px solid var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 10px 12px; }
.check-issue.contradiction { border-left-color: var(--bad); background: var(--bad-soft); }
.check-issue q { display: block; margin: 4px 0; font-style: italic; }
.check-issue p { margin: 4px 0 0; }

/* ===================== v3: accounts, credits, admin, accuracy, reach ===================== */

/* top bar: account area */
.nav-user { display: flex; align-items: center; gap: 14px; }
.nav-user a, .linklike { color: var(--muted); font-size: 14px; }
.linklike { background: none; border: 0; padding: 0; cursor: pointer; }
.linklike:hover { color: var(--text); text-decoration: underline; }
.credit-pill { background: var(--indigo-soft); border: 1px solid transparent; border-radius: 3px; padding: 3px 10px; color: var(--indigo) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.credit-pill:hover { text-decoration: none; border-color: var(--indigo); }
.nav-account { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  background: var(--signal-soft); color: var(--warn); padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #EAD6AE; }

/* sign-in pages */
.auth-page { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 24px; }
.auth-logo { width: 44px; height: 44px; margin-bottom: 12px; }
.auth-links { margin-top: 16px; font-size: 14px; }
.auth-foot { margin-top: 18px; }
.field small { display: block; margin-top: 6px; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted);
  font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.pos { color: var(--good); }
.table td.neg { color: var(--bad); }
.table td.actions { white-space: nowrap; }
.table td.actions .btn + .btn { margin-left: 6px; }
.table select { border: 1px solid var(--line-strong); border-radius: 4px; padding: 4px 6px; background: #fff; }

/* account */
.account > * + * { margin-top: 18px; }
.balance b { display: block; font-family: var(--display); font-stretch: 118%; font-size: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; cursor: pointer;
  text-align: left; border: 1px solid var(--line); transition: border-color .15s, transform .05s; }
.pack:hover { border-color: var(--indigo); }
.pack:active { transform: translateY(1px); }
.pack-credits { font-family: var(--display); font-stretch: 115%; font-size: 22px; font-weight: 600; }
.danger-zone summary { cursor: pointer; color: var(--bad); font-weight: 600; }
.danger-zone input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

/* accuracy */
.accuracy > * + * { margin-top: 18px; }
.accuracy .lead { max-width: 760px; font-size: 16px; }
.cases { display: grid; gap: 14px; }
.case h3 { margin: 0; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.case-grid p { margin: 4px 0; }
.method-box p { margin: 6px 0; }

/* admin */
.admin > * + * { margin-top: 16px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs { gap: 2px 18px; }
.tabs a { padding: 10px 0; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-bottom-color: var(--indigo); }
.tabs a:hover { text-decoration: none; color: var(--indigo); }
#admin-body > * + * { margin-top: 14px; }
.toolbar input, .toolbar select, .wrap input, .wrap select { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.toolbar input { min-width: 260px; }
.row.wrap { flex-wrap: wrap; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.checklist li.ok::before { content: "✓"; color: var(--good); }
.checklist li.warn::before { content: "!"; color: var(--warn); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 6px; overflow-x: auto; }
.bar { flex: 1 0 14px; max-width: 40px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar span { width: 100%; background: var(--indigo); border-radius: 2px 2px 0 0; min-height: 2px; }
.bar small { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pack-row + .pack-row { margin-top: 8px; }
.bad-text { color: var(--bad); }

/* reach panel */
.reach-channels { display: grid; gap: 8px; }
.channel-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.channel-row input { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.channel-row input[data-ch="name"] { flex: 1 1 240px; }
.channel-row input[type="number"] { width: 80px; }
.channel-row label { display: inline-flex; align-items: center; gap: 6px; }
.wom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.wom input { width: 140px; }
.aware-line { margin: 0 0 10px; }

@media (max-width: 720px) {
  .case-grid { grid-template-columns: 1fr; }
  .toolbar input { min-width: 0; width: 100%; }
  .nav-user { gap: 10px; }
  .nav-account { display: none; }
}
@media (max-width: 520px) {
  .topnav { gap: 10px; }
  .topnav > a[href="#/accuracy"] { display: none; }
}

/* Persona model */
.criteria { display: grid; gap: 6px; }
.criterion { display: grid; grid-template-columns: 1fr 190px; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.criterion.strong { border-color: var(--indigo); background: var(--indigo-soft); }
.criterion.weak { opacity: .75; }
.criterion select { width: 100%; }
.group-table input { width: 64px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.group-table .doc-mark { color: var(--indigo); margin-left: 4px; font-size: 10px; vertical-align: super; }
.camps { margin-top: 8px; }
.share.camp-row { grid-template-columns: 170px 1fr 64px; }
.share.camp-row input { width: 60px; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
@media (max-width: 720px) {
  .criterion { grid-template-columns: 1fr; }
  .share.camp-row { grid-template-columns: 110px 1fr 56px; }
}

/* Admin: API keys */
.key-row { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: end; }
.key-row .field { margin: 0; }
.key-row .field input, .key-row .field select { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.key-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 8px; }
.key-meta .badge { width: auto; }
.key-meta .consent { display: flex; align-items: flex-start; gap: 6px; margin: 0; line-height: 1.3; }
.key-meta .consent input { flex: none; margin-top: 2px; }
@media (max-width: 640px) { .key-row { grid-template-columns: 1fr; } .key-meta { padding-bottom: 0; } }

/* v4: forecast horizon picker */
.horizons { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin-top: 12px; }
.horizons legend { padding: 0 6px; font-weight: 600; }
.horizon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.horizon { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.horizon input { position: absolute; opacity: 0; pointer-events: none; }
.horizon.active { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo) inset; }
.horizon:focus-within { outline: 2px solid var(--indigo); outline-offset: 2px; }
.horizon .pro { color: var(--good); }
.horizon .con { color: var(--bad); }
code.secret { font-size: 15px; letter-spacing: 1px; user-select: all; }
pre.recovery { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; user-select: all; }
/* v4: trust card, outcome feedback, one-page summary print */
.trust-points { list-style: none; padding: 0; margin: 10px 0; }
.trust-points li { margin: 4px 0; }
.trust-up span { color: var(--good); }
.trust-down span { color: var(--bad); }
.trust-neutral span { color: var(--muted); }
.outcome summary { cursor: pointer; }
@media print {
  .outcome { display: none !important; }
  body.print-summary .report > :not(h1):not(.report-question):not(.decision):not(.trust):not(.summary-keep):not(.print-foot):not(.muted) { display: none !important; }
  body.print-summary .decision .segments, body.print-summary .decision h3, body.print-summary .decision ul,
  body.print-summary .decision .check-result, body.print-summary .decision .method { display: none !important; }
}
.share-pop { position: fixed; width: min(420px, calc(100vw - 32px)); z-index: 50; }
.share-pop .close { float: right; }
details.paste textarea { width: 100%; margin-top: 6px; }
.rehearsal { margin: 10px 0; }
.qr { margin: 8px 0; line-height: 0; }
.qr svg { border-radius: 6px; border: 1px solid var(--line); }

/* ---------- public home page: the hour before dawn ---------- */
/* Deep night blue for trust, first light at the horizon for the future. One family (Archivo),
   its widest cut for display. Everything below the horizon is quiet, cool paper. */
.lp {
  --night: #0C1838; --dusk: #1B2C66; --haze: #33468A; --dawn: #F4C27A; --ember: #E2A04A;
  --tide: #7CD5C8; --mist: #B9C4E4; --paper: #F2F4F9; --ink: #13203F; --rule: #D5DBEA;
  color: var(--ink);
}
body.on-landing .view { max-width: none; padding: 0; }
body.on-landing { background: #F2F4F9; }
body.on-landing .topbar { position: absolute; left: 0; right: 0; background: transparent; border-bottom-color: transparent;
  backdrop-filter: none; color: #fff; }
body.on-landing .brand, body.on-landing .brand-name { color: #fff; }
body.on-landing .brand-mark { filter: brightness(0) invert(1); }
body.on-landing .topnav a, body.on-landing .nav-user a { color: #C9D2EE; }
body.on-landing .topnav a:hover { color: #fff; }
body.on-landing .lang-btn { color: #fff; border-color: rgba(201, 210, 238, .35); }
body.on-landing .lang-btn::after { border-color: #C9D2EE; }

.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.lp-sky {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 70% at 28% 100%, rgba(244, 194, 122, .55) 0%, rgba(226, 160, 74, .18) 32%, rgba(27, 44, 102, 0) 62%),
    linear-gradient(180deg, #0A1430 0%, var(--night) 38%, var(--dusk) 74%, var(--haze) 100%);
}
.lp-hero { padding-top: 150px; padding-bottom: 36px; }
.lp-hero h1 {
  font-family: var(--display); font-stretch: 125%; font-weight: 600; letter-spacing: -.035em; line-height: .94;
  font-size: clamp(46px, 8vw, 104px); margin: 0 0 30px; max-width: 10ch; color: #fff;
  opacity: 0; animation: lp-rise 1.1s cubic-bezier(.2, .7, .2, 1) .1s forwards;
}
.lp-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--mist); max-width: 37em; margin: 0; }
.lp-proof { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: #fff; font-weight: 600; max-width: 37em; margin: 14px 0 0; }
.lp-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; max-width: 40em; }
.lp-points li { display: flex; gap: 12px; align-items: baseline; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.45; color: var(--mist); }
.lp-points b { color: #fff; font-weight: 600; }
.lp-tick { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--dawn); color: var(--ink); font-size: 13px; font-weight: 700; transform: translateY(3px); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--dawn); color: var(--ink) !important; font-weight: 600; font-size: 16px; border: 1px solid var(--dawn);
}
.lp-btn:hover { text-decoration: none; background: #F8D296; }
.lp-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lp-btn.quiet { background: transparent; color: #fff !important; border-color: rgba(201, 210, 238, .45); }
.lp-btn.quiet:hover { background: rgba(255, 255, 255, .08); }
.lp-btn.line { background: transparent; border-color: var(--rule); color: var(--ink) !important; }
.lp-btn.line:hover { border-color: var(--dusk); }
.lp-btn.line:focus-visible { outline-color: var(--dusk); }

.lp-horizon { position: relative; margin-top: 18px; }
.lp-horizon::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px;
  background: linear-gradient(90deg, rgba(244, 194, 122, 0), rgba(244, 194, 122, .7) 28%, rgba(244, 194, 122, 0) 80%); }
.lp-crowd { display: block; width: 100%; height: 190px; }
.lp-crowd circle { fill: #C9D2EE; opacity: .22; }
.lp-crowd circle.r { animation: lp-wake .7s ease-out both; animation-delay: calc(var(--d) * 70ms + 900ms); }
.lp-crowd circle.r.o { --to: var(--ember); }
.lp-crowd circle.r.s { --to: var(--tide); }
@keyframes lp-wake { to { fill: var(--to); opacity: 1; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.lp-ground { background: linear-gradient(180deg, rgba(12, 24, 56, .0), rgba(12, 24, 56, .55)); padding: 6px 0 40px; }
.lp-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 auto; }
.lp-figures > div { padding: 18px 24px 4px 0; border-left: 1px solid rgba(201, 210, 238, .25); padding-left: 24px; }
.lp-figures > div:first-child { border-left: 0; padding-left: 0; }
.lp-figures dt { font-family: var(--display); font-stretch: 118%; font-weight: 600; font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: #fff; }
.lp-figures dd { margin: 4px 0 0; color: var(--mist); font-size: 14px; max-width: 22ch; }
.lp-legend { margin-top: 22px; font-size: 13px; color: var(--mist); }
.lp-legend span { margin-left: 12px; white-space: nowrap; }
.lp-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.lp-legend i.o { background: var(--ember); }
.lp-legend i.s { background: var(--tide); }

.lp-paper { background: var(--paper); padding: 84px 0 0; }
.lp-paper h2 { font-family: var(--display); font-stretch: 118%; font-weight: 600; font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -.02em; margin: 0 0 30px; color: var(--ink); }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  position: relative; }
.lp-steps::before { content: ""; position: absolute; top: 17px; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, var(--dusk), var(--dawn)); opacity: .5; }
.lp-steps li { position: relative; }
.lp-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--night); color: #fff;
  font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.lp-steps li:nth-child(2) .lp-n { background: var(--dusk); }
.lp-steps li:nth-child(3) .lp-n { background: var(--dawn); color: var(--ink); }
.lp-steps h3 { font-size: 19px; margin: 20px 0 8px; color: var(--ink); }
.lp-steps p { margin: 0; color: #4A5677; line-height: 1.6; max-width: 34ch; }
.lp-sample { margin: 36px 0 0; }
.lp-sample a { color: var(--dusk); font-weight: 600; }

.lp-pricing { margin-top: 96px; }
.lp-sub { color: #4A5677; margin: -14px 0 28px; max-width: 46em; }
.lp-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; align-items: stretch; }
.lp-price { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 26px 24px; }
.lp-price h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.lp-price .amount { font-family: var(--display); font-stretch: 118%; font-weight: 600; font-size: 42px; letter-spacing: -.03em; margin: 0; color: var(--ink); }
.lp-price .credits { margin: 0; font-weight: 600; color: var(--dusk); }
.lp-price .lp-btn { margin-top: auto; align-self: flex-start; min-height: 42px; padding: 0 22px; font-size: 15px; }
.lp-price .lp-small { margin: 2px 0 22px; }
.lp-price.featured { background: var(--night); border-color: var(--night); color: #fff; }
.lp-price.featured h3, .lp-price.featured .amount { color: #fff; }
.lp-price.featured .credits { color: var(--dawn); }
.lp-price.featured .lp-small { color: var(--mist); }
.lp-small { font-size: 13.5px; color: #5A6585; line-height: 1.6; max-width: 70em; margin: 12px 0 0; }
.lp-gap { margin-top: 72px; }
.lp-foot { margin-top: 48px; padding-top: 22px; padding-bottom: 40px; border-top: 1px solid var(--rule); font-size: 14px; color: #5A6585; }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.lp-foot a { color: #3A4A78; }
.lp-foot p a { margin-left: 16px; }

@media (max-width: 760px) {
  .lp-wrap { padding: 0 16px; }
  .lp-hero { padding-top: 110px; }
  .lp-steps { grid-template-columns: 1fr; gap: 28px; }
  .lp-steps::before { top: 18px; bottom: 18px; left: 17px; right: auto; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--dusk), var(--dawn)); }
  .lp-steps li { padding-left: 54px; }
  .lp-n { position: absolute; left: 0; top: 0; }
  .lp-steps h3 { margin-top: 6px; }
  .lp-figures { grid-template-columns: 1fr; }
  .lp-figures > div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(201, 210, 238, .2); padding-top: 14px; }
  .lp-figures > div:first-child { border-top: 0; }
  .lp-crowd { height: 130px; }
  body.on-landing .topbar { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-hero h1 { animation: none; opacity: 1; }
  .lp-crowd circle.r { animation: none; fill: var(--to); opacity: 1; }
}

[hidden] { display: none !important; }

/* ---------- prices ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 10px; }
.price-card { display: grid; gap: 8px; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.price-card.featured { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo); }
.price-card .price { font-size: 34px; font-weight: 600; font-stretch: 118%; letter-spacing: -.02em; }
.price-card .credits { font-weight: 600; color: var(--indigo); }
.price-card .btn { margin-top: 8px; justify-self: start; }
.pack .pack-price { font-weight: 600; }
.pack.topup { border-style: dashed; }
.credit-pill.low { background: var(--signal-soft); color: var(--warn) !important; }
.inline-field { display: inline-flex; align-items: center; gap: 4px; }

.static-intro { max-width: 760px; visibility: hidden; } /* only for crawlers that skip scripts; the app replaces it at once */
.static-intro nav a { margin-right: 14px; }

/* ---------- plans ---------- */
.lp-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; margin: 0 0 18px; background: #fff; }
.lp-toggle button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 600; color: #4A5677; cursor: pointer; }
.lp-toggle button[aria-pressed="true"] { background: var(--night); color: #fff; }
.lp-toggle button span { font-weight: 500; font-size: 12px; color: var(--ember); margin-left: 4px; }
.lp-toggle button[aria-pressed="true"] span { color: var(--dawn); }
.lp-toggle button:focus-visible { outline: 2px solid var(--dusk); outline-offset: 2px; }
.lp-price .per { margin: 0; font-size: 13.5px; color: #5A6585; }
.lp-price.featured .per { color: var(--mist); }
.lp-price.featured .per b { color: var(--dawn); }
.lp-current { margin-top: auto; font-weight: 600; color: var(--dusk); }
.lp-price.featured .lp-current { color: var(--dawn); }
.sub-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg); }
.sub-box p { margin: 0 0 6px; }
.account-plans .lp-prices { margin-bottom: 8px; }

/* ---------- admin: visitors ---------- */
.visit-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.visit-bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.visit-bars i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--indigo); }
.visit-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--panel); }
.visit-toggle button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.visit-toggle button[aria-pressed="true"] { background: var(--indigo); color: #fff; }
