:root {
  --paper: #edf0f4;
  --sheet: #f8f9fb;
  --ink: #15213b;
  --ink-soft: #4a5672;
  --rule: #c9d0da;
  --hi: #ffd84d;
  --hi-soft: #fff1b0;
  --ok: #2c7a5b;
  --ok-soft: #dcefe6;
  --warn: #9a3b1e;
  --focus: #2457d6;
  --radius-sm: 4px;
  --radius-lg: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.verdict, #target-v, .bands td + td { font-variant-numeric: tabular-nums; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--focus); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.mark { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; text-decoration: none; }
.mark small { font-weight: 500; font-size: .8rem; color: var(--ink-soft); margin-left: 6px; letter-spacing: 0; }

/* Hero */
.hero { padding: 40px 0 28px; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 18px;
}
.hero h1 .stroke {
  background: linear-gradient(transparent 55%, var(--hi) 55%, var(--hi) 92%, transparent 92%);
  padding: 0 .08em;
}
.hero p { font-size: 1.15rem; color: var(--ink-soft); margin: 0; max-width: 62ch; }

/* Desk */
.desk {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  margin: 12px 0 56px;
}
.desk-part { padding: 22px 22px 24px; border-top: 1px solid var(--rule); }
.desk-part:first-child { border-top: 0; }
.desk h2 { font-size: 1.15rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.desk .hint { color: var(--ink-soft); font-size: .95rem; margin: 0 0 14px; max-width: 70ch; }

.row-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

button, .btn {
  font: inherit; font-weight: 650; font-size: .95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink);
  background: var(--sheet); color: var(--ink);
  padding: 9px 16px; cursor: pointer;
}
button:hover:not(:disabled) { background: var(--paper); }
button.primary { background: var(--ink); color: var(--sheet); }
button.primary:hover:not(:disabled) { background: #22315a; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.quiet { border-color: var(--rule); font-weight: 500; }

textarea, input[type=text], input[type=email], select {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
label.field { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }

.status { font-size: .92rem; color: var(--ink-soft); min-height: 1.4em; margin-top: 10px; }
.status.err { color: var(--warn); }

/* Questions */
.qs { display: grid; gap: 12px; margin-top: 14px; }
.q {
  border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff;
  padding: 12px 14px; display: grid; gap: 8px;
  grid-template-columns: 1fr 140px;
}
.q .full { grid-column: 1 / -1; }
.q .kind { font-size: .8rem; color: var(--ink-soft); }
.q-remove { justify-self: end; font-size: .8rem; padding: 4px 10px; }
@media (max-width: 640px) { .q { grid-template-columns: 1fr; } }

/* Results */
.meter { font-size: .95rem; color: var(--ink-soft); margin: 0 0 12px; }
.meter strong { color: var(--ink); }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #e3e7ee; vertical-align: top; }
th { font-weight: 650; background: var(--sheet); position: sticky; top: 0; white-space: nowrap; }
td.txt { min-width: 260px; max-width: 420px; }
@media (max-width: 640px) { td.txt { min-width: 180px; } th, td { padding: 8px 9px; } }
td.txt b { display: block; font-weight: 650; }
td.txt span { color: var(--ink-soft); }
td.ans { white-space: nowrap; }
.conf { display: block; height: 4px; background: #e3e7ee; border-radius: 2px; margin-top: 4px; width: 84px; }
.conf i { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
tr.review td { background: var(--hi-soft); }
tr.review td.txt b {
  background: linear-gradient(transparent 50%, var(--hi) 50%, var(--hi) 90%, transparent 90%);
}
.tag { font-size: .78rem; font-weight: 650; padding: 1px 7px; border-radius: 999px; }
.tag.auto { background: var(--ok-soft); color: var(--ok); }
.tag.human { background: var(--hi); color: var(--ink); }

/* Trust check */
.trust { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } }
.card-label { border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; padding: 16px; }
.card-label .subj { font-weight: 700; margin: 0 0 4px; }
.card-label .body { margin: 0 0 14px; color: var(--ink-soft); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.picks button[data-jev="1"] { background: var(--hi-soft); box-shadow: inset 0 -4px 0 var(--hi); }
.verdict { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 6px 0 6px; }
.verdict-sub { color: var(--ink-soft); margin: 0 0 14px; }
.rec { border-left: 4px solid var(--hi); padding: 6px 0 6px 12px; margin: 12px 0; }
.rec.ok { border-color: var(--ok); }
input[type=range] { width: 100%; accent-color: var(--ink); }
.bands { width: 100%; font-size: .85rem; margin-top: 10px; }
.bands td, .bands th { padding: 5px 8px; }

/* Prose sections */
.section { padding: 8px 0 48px; max-width: 760px; }
.section h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 10px; }
.section p { color: var(--ink-soft); }
ol.steps { padding-left: 1.2em; }
ol.steps li { margin-bottom: 10px; color: var(--ink-soft); }
ol.steps li strong { color: var(--ink); }

.join { display: grid; gap: 12px; max-width: 520px; }
.foot { border-top: 1px solid var(--rule); padding: 22px 0 40px; color: var(--ink-soft); font-size: .88rem; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  tr.fresh td { animation: land .5s ease-out both; }
  @keyframes land { from { background: var(--ok-soft); } to { background: transparent; } }
  tr.review.fresh td { animation: none; }
}

/* Nav */
.nav { display: flex; gap: 20px; font-size: .95rem; }
@media (max-width: 720px) { .nav a:not(:last-child) { display: none; } }

/* Dataset picker */
#datasets button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }

/* Summary report */
#summary { margin: 0 0 18px; }
.s-route { margin: 0 0 14px; font-size: .95rem; color: var(--ink-soft); }
.s-route strong { color: var(--ink); }
.s-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 28px; }
.s-block h3 { font-size: .92rem; font-weight: 650; margin: 0 0 8px; line-height: 1.35; }
.s-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.s-block li { display: grid; grid-template-columns: 9.5em 1fr 2.5em; align-items: center; gap: 8px; font-size: .86rem; }
.s-label { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-bar { height: 8px; background: #e3e7ee; border-radius: 4px; overflow: hidden; }
.s-bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.s-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Use cases */
.section.wide { max-width: none; }
.section.wide > p { max-width: 62ch; }
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 18px 0 0; }
.uses > div { border-top: 1px solid var(--rule); padding: 14px 0 16px; }
.uses dt { font-weight: 700; margin-bottom: 4px; }
.uses dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .uses { grid-template-columns: 1fr; } }

/* Two ways */
.ways { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--sheet); }
.way { padding: 22px; }
.way + .way { border-left: 1px solid var(--rule); background: #fff; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.way h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.01em; }
.way-lead { margin: 2px 0 14px; color: var(--ink-soft); }
.way dl { margin: 0; }
.way dt { font-weight: 650; margin-top: 12px; }
.way dd { margin: 2px 0 0; color: var(--ink-soft); }
@media (max-width: 720px) {
  .ways { grid-template-columns: 1fr; }
  .way + .way { border-left: 0; border-top: 1px solid var(--rule); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

/* FAQ */
details { border-top: 1px solid var(--rule); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 650; }
details p { margin: 8px 0 0; }

/* Waitlist choice */
fieldset.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
fieldset.choice legend { padding: 0; width: 100%; }
fieldset.choice label { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
fieldset.choice input { accent-color: var(--ink); }

.hero p.watch { margin-top: 14px; font-size: 1rem; }
.hero p.watch a { font-weight: 650; }

label.check { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); }
label.check input { margin-top: 4px; accent-color: var(--ink); }

.mark sup.tm { font-size: .45em; font-weight: 600; margin-left: 1px; vertical-align: super; }
.prose h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 24px 0 8px; }
.prose h2 { font-size: 1.2rem; margin: 28px 0 6px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }

/* Separ8 assistant */
.chat-launch {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  background: var(--ink); color: var(--sheet); border: 0; border-radius: 999px;
  padding: 12px 18px; font: inherit; font-weight: 650; font-size: .95rem; cursor: pointer;
  box-shadow: 0 6px 20px rgba(21, 33, 59, .25);
}
.chat-launch::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--hi); margin-right: 8px; vertical-align: 1px; }
.chat-launch[hidden] { display: none; }
.chat-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 51;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px));
  display: flex; flex-direction: column;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(21, 33, 59, .22);
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); background: var(--ink); color: var(--sheet); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.chat-title { display: flex; flex-direction: column; line-height: 1.3; }
.chat-title span { font-size: .82rem; opacity: .8; }
.chat-close { background: transparent; color: var(--sheet); border: 1px solid rgba(248,249,251,.4); border-radius: var(--radius-sm); padding: 3px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { margin: 0; padding: 9px 12px; border-radius: var(--radius-lg); font-size: .95rem; line-height: 1.45; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.bot { background: #fff; border: 1px solid var(--rule); align-self: flex-start; }
.chat-msg.me { background: var(--hi-soft); align-self: flex-end; }
.chat-msg.pending { color: var(--ink-soft); }
.chat-msg.err { border-color: var(--warn); color: var(--warn); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chip { background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; text-align: left; }
.chat-chip:hover { border-color: var(--ink); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); }
.chat-form textarea { flex: 1; resize: none; font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius-sm); min-height: 40px; max-height: 120px; }
.chat-form button { flex: none; }
.chat-note { margin: 0; padding: 0 12px 10px; font-size: .75rem; color: var(--ink-soft); }
.chat-panel :focus-visible, .chat-launch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .chat-launch { transition: transform .15s; } .chat-launch:hover { transform: translateY(-1px); } }
