/* Festivenomics Offer Check — design tokens and components (SPEC §7). */
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-sunken: #E9ECF1;
  --surface-subtle: #FAFBFC;
  --surface-file: #F6F8FE;
  --border: #E3E5EA;
  --border-control: #D6DAE1;
  --border-dashed: #C9CED8;
  --text: #16181D;
  --text-body: #2A2E37;
  --text-muted: #5B6170;
  --primary: #2F5BEA;
  --primary-strong: #1E3FB0;
  --primary-soft: #E9EEFD;
  --highlight-clear: #DCE5FC;
  --neutral-pill-bg: #EEF0F3;
  --neutral-pill-text: #3A3F4B;
  --muted-pill-bg: #F1F2F4;
  --muted-pill-text: #5B6170;
  --warn-soft: #FDF1E7;
  --warn-text: #8A3D0C;
  --warn-icon: #B4530F;
  --warn-note: #FDF6EF;
  --warn-note-text: #6B3209;
  --highlight-check: #FBE3CF;
  --negative: #9A4510;
  --chart-loss: #D9682B;
  --inverse: #16181D;
  --radius-card: 14px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Times New Roman", "Liberation Serif", Times, serif;
}

@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url("/fonts/Inter.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap; src: url("/fonts/SpaceGrotesk.ttf") format("truetype"); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
a.step, a.tab, a.btn, a.link-btn, a.pill, .wordmark { text-decoration: none; }
.page-title { margin-bottom: 28px; }
.title-row .page-title { margin-bottom: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); }
:focus-visible { outline: 3px solid rgba(47, 91, 234, 0.35); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* Shell */
.header { height: 58px; background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1280px; margin: 0 auto; height: 100%; padding: 0 40px; display: flex; align-items: center; gap: 12px; }
.logo { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.wordmark { font-weight: 700; font-size: 18px; line-height: 24px; color: var(--text); text-decoration: none; }
.divider-v { width: 1px; height: 22px; background: var(--border-control); margin: 0 4px; }
.product { color: var(--text-muted); font-size: 15px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-body); font-size: 15px; }
.header-right select { border: none; background: transparent; font-size: 15px; color: var(--text-body); cursor: pointer; }
.link-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 4px 6px; }
.link-btn:hover { color: var(--text); }
.main { max-width: 1280px; margin: 0 auto; padding: 24px 40px 64px; }

/* Stepper */
.stepper { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.step { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-control); background: var(--surface); color: var(--text-body); font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; cursor: default; }
.step.done { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-strong); cursor: pointer; }
button.step { font-family: inherit; }
.step.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.step:disabled { opacity: 1; }

/* Titles */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1 { font-family: var(--font-display); font-size: 36px; line-height: 44px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.subtitle { color: var(--text-muted); font-size: 17px; line-height: 26px; margin: 0; max-width: 780px; }
.title-pills { display: flex; gap: 8px; flex-shrink: 0; }

/* Layout */
.grid { display: grid; gap: 24px; align-items: start; }
.grid-upload { grid-template-columns: 1fr 320px; }
.grid-terms { grid-template-columns: 440px 1fr; }
.grid-counter { grid-template-columns: 1fr 340px; }
.grid-synced { grid-template-columns: 1fr 360px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; gap: 12px; align-items: center; }
.spacer { flex: 1; }
.actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.actions.split { justify-content: space-between; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.card-title { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 18px; }
.card-sub { color: var(--text-muted); font-size: 14px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; line-height: 18px; }
.label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-muted); }
.big-figure { font-size: 28px; line-height: 34px; font-weight: 700; margin: 10px 0 6px; }
.callout { background: var(--bg); border-radius: 10px; padding: 14px 16px; color: var(--text-body); font-size: 15px; line-height: 22px; }

/* Buttons */
.btn { height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border-control); background: var(--surface); color: var(--text); font-weight: 600; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #b8bec9; }
.btn-primary { height: 48px; background: var(--primary); border-color: var(--primary); color: #fff; padding: 0 22px; }
.btn-primary:hover { background: #2a52d6; border-color: #2a52d6; }
.btn:disabled, .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-danger { color: var(--negative); }
.btn-sm { height: 34px; font-size: 14px; padding: 0 12px; border-radius: 8px; }

/* Pills */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.pill-lg { height: 32px; padding: 0 14px; font-size: 14px; }
.pill-primary { background: var(--primary-soft); color: var(--primary-strong); }
.pill-neutral { background: var(--neutral-pill-bg); color: var(--neutral-pill-text); }
.pill-muted { background: var(--muted-pill-bg); color: var(--muted-pill-text); }
.pill-warn { background: var(--warn-soft); color: var(--warn-text); }
.pill-inverse { background: var(--inverse); color: #fff; height: 34px; padding: 0 14px; font-size: 14px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .help { font-size: 13px; color: var(--text-muted); }
.field .err { font-size: 13px; color: var(--negative); }
.input, .select, .textarea { height: 44px; border: 1px solid var(--border-control); border-radius: 8px; padding: 0 14px; background: var(--surface); width: 100%; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 22px; resize: vertical; }
.select { appearance: auto; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fields-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.checkbox { width: 22px; height: 22px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.radio-row { display: flex; gap: 18px; align-items: center; }

/* Upload */
.dropzone { border: 2px dashed var(--border-dashed); border-radius: 12px; background: var(--surface-subtle); padding: 42px 24px; text-align: center; transition: border-color 120ms, background 120ms; }
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone-title { font-weight: 600; font-size: 17px; margin: 14px 0 6px; }
.dropzone-sub { color: var(--text-muted); margin-bottom: 18px; }
.file-row { margin-top: 24px; display: flex; align-items: center; gap: 14px; background: var(--surface-file); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
.file-name { font-weight: 600; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: 6px; display: inline-flex; }
.icon-btn:hover { background: var(--surface-sunken); color: var(--text); }
.forward { color: var(--text-muted); }
.progress { height: 10px; background: var(--surface-sunken); border-radius: 999px; overflow: hidden; margin: 18px 0 14px; }
.progress > div { height: 100%; background: var(--primary); border-radius: 999px; }
.progress.over > div { background: var(--negative); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; color: var(--text-body); }
.checklist svg { color: var(--primary); flex-shrink: 0; margin-top: 3px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 14px; font-weight: 600; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table .right { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-subtle); }
.strong { font-weight: 600; }
.pos { color: var(--primary-strong); font-weight: 600; }
.neg { color: var(--negative); font-weight: 600; }
.bold-row td { font-weight: 600; }

/* Terms */
.doc-panel { background: var(--surface-sunken); border-radius: var(--radius-card); padding: 20px 22px 18px; position: sticky; top: 16px; }
.doc-head { display: flex; justify-content: space-between; color: var(--text-body); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.doc-head .pages { font-weight: 400; color: var(--text-muted); }
.doc-page { background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(22, 24, 29, 0.06); padding: 30px 30px 22px; font-family: var(--font-serif); font-size: 14px; line-height: 24px; color: var(--text); max-height: 640px; overflow: auto; }
.doc-title { font-family: var(--font-sans); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.doc-block { margin: 0 0 14px; }
.doc-block b { font-weight: 700; }
.hl { border-radius: 2px; padding: 1px 1px; cursor: pointer; transition: box-shadow 120ms; }
.hl-clear { background: var(--highlight-clear); }
.hl-check { background: var(--highlight-check); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.file-label { position: relative; }
.file-label:focus-within { outline: 3px solid rgba(47, 91, 234, 0.35); outline-offset: 2px; }
.hl.active { box-shadow: 0 0 0 2px var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 14px; color: var(--text-body); align-items: center; }
.legend > span { white-space: nowrap; }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -2px; }
.term-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.term-row:hover .term-value { color: var(--primary-strong); }
.term-row.active { background: linear-gradient(90deg, rgba(233, 238, 253, 0.6), transparent); }
.term-label { font-weight: 600; color: var(--text-body); font-size: 15px; }
.term-value { font-weight: 600; font-size: 17px; line-height: 24px; }
.term-cite { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.note { background: var(--warn-note); color: var(--warn-note-text); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 15px; line-height: 22px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--warn-note); color: var(--warn-note-text); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.notice.info { background: var(--primary-soft); color: var(--primary-strong); }
.allin-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; }
.allin-value { font-size: 28px; font-weight: 700; }
.editor { grid-column: 1 / -1; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 14px; cursor: default; }
.skeleton { height: 18px; border-radius: 6px; background: linear-gradient(90deg, #eef0f3, #f6f7f9, #eef0f3); background-size: 200% 100%; animation: shimmer 1.2s infinite; margin: 12px 0; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Impact */
.ev-head { display: flex; justify-content: space-between; align-items: center; }
.hero { font-family: var(--font-display); font-weight: 700; font-size: 60px; line-height: 64px; color: var(--primary-strong); margin: 22px 0 14px; letter-spacing: -0.02em; }
.hero.neg { color: var(--negative); }
.range { color: var(--text-body); font-size: 17px; margin-bottom: 18px; }
.hist { position: relative; }
.hist-caption { color: var(--text-muted); font-size: 14px; margin: 10px 0 18px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 600; margin: 8px 0 6px; }
.stat-card .stat-value.warn { color: var(--negative); font-weight: 700; }
.stat-card .aside { font-family: var(--font-sans); font-size: 14px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.insight { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.insight:last-child { border-bottom: none; }
.warn-tile { width: 42px; height: 42px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-icon); display: grid; place-items: center; flex-shrink: 0; }
.insight-title { font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

/* Counter */
.sugg { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.sugg-main { flex: 1; }
.sugg-title { font-weight: 600; font-size: 17px; }
.sugg-offer { color: var(--text-muted); font-size: 15px; margin: 4px 0; }
.sugg-counter { font-size: 16px; }
.effect { color: var(--primary-strong); font-weight: 600; text-align: right; max-width: 170px; }
.metric { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 48px; color: var(--primary-strong); margin: 4px 0; }
.metric.neg { color: var(--negative); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.mini-value { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 32px; margin: 4px 0; }
.draft { background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 12px; padding: 16px; white-space: pre-wrap; font-size: 15px; line-height: 24px; min-height: 260px; width: 100%; resize: vertical; field-sizing: content; }

/* Synced */
.success-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 28px; }
.success-tile { width: 54px; height: 54px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }
.kv { display: flex; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--border); }
.kv .v { font-weight: 600; }
.cal-row { display: grid; grid-template-columns: 156px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cal-date { color: var(--primary-strong); font-weight: 600; }
.watch { display: flex; gap: 14px; margin-bottom: 18px; }
.watch svg { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.alert-line { color: var(--negative); font-size: 14px; margin-top: 4px; font-weight: 600; }

/* Setup and admin */
.setup-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.slot-grid { width: 100%; border-collapse: collapse; }
.slot-grid th, .slot-grid td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: middle; }
.slot-grid th { font-size: 14px; color: var(--text-muted); }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-control); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.repeat-row { display: grid; gap: 10px; align-items: end; }
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; background: none; font-weight: 600; color: var(--text-muted); cursor: pointer; font-size: 15px; text-decoration: none; display: inline-flex; align-items: center; }
.tab.on { background: var(--surface); border-color: var(--border); color: var(--text); }
.error-box { background: var(--warn-note); color: var(--warn-note-text); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.empty { color: var(--text-muted); padding: 24px 0; text-align: center; }
.login-wrap { max-width: 420px; margin: 72px auto; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface-sunken); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* Dialog and toast */
dialog { border: none; border-radius: var(--radius-card); padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 20px 50px rgba(22, 24, 29, 0.25); }
dialog::backdrop { background: rgba(22, 24, 29, 0.4); }
.modal-back { position: fixed; inset: 0; background: rgba(22, 24, 29, 0.4); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius-card); padding: 24px; width: 100%; max-width: 520px; box-shadow: 0 20px 50px rgba(22, 24, 29, 0.25); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--inverse); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(22, 24, 29, 0.25); }
.loading { color: var(--text-muted); padding: 48px 0; text-align: center; }

/* Sections: Offer Check, Programme, Economics, Vault */
.sections { display: flex; align-items: stretch; height: 100%; gap: 2px; overflow-x: auto; }
.section { display: inline-flex; align-items: center; padding: 0 12px; color: var(--text-muted); font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap; }
.section:hover { color: var(--text); }
.section.on { color: var(--text); border-bottom-color: var(--primary); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-programme { grid-template-columns: 1fr 380px; }
.grid-vault { grid-template-columns: 1fr 360px; }
.fields-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card-accent { border: 2px solid var(--primary); }

/* Programme */
.lineup { width: 100%; border-collapse: separate; border-spacing: 8px; margin: -8px; }
.lineup th { font-size: 14px; font-weight: 600; color: var(--text-muted); text-align: left; padding: 0 4px; white-space: nowrap; }
.lineup th.lineup-kind { color: var(--text-body); width: 170px; vertical-align: middle; }
.lineup td { vertical-align: top; min-width: 150px; }
.lineup-cell { display: block; min-height: 74px; border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--text); }
.lineup-booked { background: var(--primary-soft); border: 1px solid var(--primary-soft); }
.lineup-offer { background: var(--warn-note); border: 1px dashed var(--warn-icon); }
.lineup-open { background: var(--surface-subtle); border: 1px dashed var(--border-dashed); color: var(--text-muted); }
a.lineup-cell:hover { box-shadow: 0 0 0 2px var(--highlight-clear); }
.lineup-act { font-weight: 600; font-size: 15px; line-height: 20px; }
.lineup-note { font-size: 13px; line-height: 18px; margin-top: 4px; }
.lineup-booked .lineup-note { color: var(--primary-strong); font-weight: 600; }
.lineup-offer .lineup-note { color: var(--warn-text); font-weight: 600; }
.swatch-booked { background: var(--primary-soft); border: 1px solid var(--primary); }
.swatch-offer { background: var(--warn-note); border: 1px dashed var(--warn-icon); }
.swatch-open { background: var(--surface-subtle); border: 1px dashed var(--border-dashed); }
.side-row { display: block; padding: 12px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.side-row:first-of-type { border-top: none; padding-top: 0; }
.side-link:hover .strong { color: var(--primary-strong); }
.upcoming-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }

/* Economics */
.baseline-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; align-items: end; padding: 10px 0; border-top: 1px solid var(--border); }
.baseline-row .strong { padding-bottom: 12px; }

/* Vault */
.search-bar { display: flex; gap: 12px; align-items: center; position: relative; }
.search-bar .input { flex: 1; padding-left: 40px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: inline-flex; }
.vault-table td { vertical-align: top; }
.vault-act { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-control); text-underline-offset: 3px; }
.negotiation { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.neg-step { white-space: nowrap; }
.neg-arrow { color: var(--text-muted); padding-top: 1px; }
.match { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: var(--highlight-clear); color: var(--primary-strong); }
.privacy-strip { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 14px 20px; font-size: 14px; color: var(--text-body); }

/* Make your next check sharper */
.sharper-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.sharper-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sharper-item:hover .sharper-title { color: var(--primary-strong); }
.sharper-box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-control); display: inline-grid; place-items: center; flex-shrink: 0; margin-top: 1px; color: #fff; }
.sharper-box.on { background: var(--primary); border-color: var(--primary); }
.sharper-title { font-weight: 600; font-size: 16px; }
.sharper-desc { display: block; color: var(--text-muted); font-size: 14px; line-height: 20px; margin-top: 4px; }
.sharper-arrow { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.sharper-item.done .sharper-title { color: var(--text-muted); }

@media (max-width: 1023px) {
  .grid-upload, .grid-terms, .grid-counter, .grid-synced, .setup-grid, .grid-2, .grid-programme, .grid-vault { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .doc-panel { position: static; }
}
@media (max-width: 639px) {
  .header-inner, .main { padding-left: 20px; padding-right: 20px; }
  .stepper { flex-wrap: nowrap; overflow-x: auto; }
  h1 { font-size: 28px; line-height: 34px; }
  .hero { font-size: 44px; line-height: 48px; }
  .fields-2, .fields-3, .mini-grid, .stat-row, .sharper-grid { grid-template-columns: 1fr; }
  .fields-4, .baseline-row { grid-template-columns: 1fr 1fr; }
  .header-inner { gap: 8px; }
  .wordmark, .divider-v { display: none; }
  .term-row { grid-template-columns: 1fr auto; }
  .term-row .term-label { grid-column: 1 / -1; }
  .title-row { flex-direction: column; align-items: flex-start; }
  .table thead { display: none; }
  .table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table td { display: block; border: none; padding: 4px 14px; text-align: left !important; }
}
