:root {
  --bg: #F4EFE6;
  --ink: #1D1C1A;
  --ink-2: #3D3A35;
  --muted: #5C574F;
  --line: #C9C2B6;
  --card: #FFFFFF;
  --accent: #2E5E4E;
  --accent-ink: #FFFFFF;
  --accent-soft: #E6EFEA;
  --accent-line: #B9D3C6;
  --track: #EDE8DF;
  --warn-bg: #F6E6CC;
  --warn-ink: #6B4413;
  --radius: 16px;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: #1E4236; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: 880px; margin: 0 auto; padding: 20px 16px 56px; display: flex; flex-direction: column; gap: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.topbar a { font-family: var(--sans); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

/* MargenticOS wordmark as on the homepage (styles.css .wordmark), kept small and quiet. */
.brandbar { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.brand-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wordmark { font-family: var(--sans); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.022em; color: #1A1916; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.wordmark:hover { color: #1C3A2A; }
.wordmark .os { color: #3B6D11; }
.brand-tag { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.brand-line { margin: 0; font-size: 15px; color: var(--muted); max-width: 640px; }

.hero { display: flex; flex-direction: column; gap: 12px; }
h1 { margin: 0; font-size: 32px; line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; }
.lede { margin: 0; font-size: 18px; color: var(--ink-2); }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

.card { background: var(--card); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.picker { gap: 28px; }
.field { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-size: 16px; font-weight: 700; padding: 0; }
.hint { font-size: 14px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"]::before { content: "✓ "; }

/* Industry multi-select: search box, chosen list, scrollable grouped options. */
.chosen { display: flex; flex-wrap: wrap; gap: 8px; }
.chosen-item { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.chosen-item button { min-width: 36px; min-height: 36px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 999px; }
.search { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 16px; }
.options { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 0; overscroll-behavior: contain; }
.group-title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 12px 14px 4px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; cursor: pointer; font-size: 16px; }
.option:hover { background: var(--track); }
.option input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.no-match { padding: 14px; color: var(--muted); font-size: 15px; }

.primary { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 56px; border: 0; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.primary[disabled] { opacity: 0.45; cursor: not-allowed; }
.secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--ink); background: var(--card); font-weight: 700; cursor: pointer; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.stat-big { grid-column: 1 / -1; background: var(--ink); color: var(--bg); padding: 24px; }
.stat-label { font-size: 14px; color: var(--muted); }
.stat-big .stat-label, .stat-big .stat-note { color: #D9D3C7; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat-big .stat-value { font-size: 56px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-note { font-size: 14px; color: var(--muted); }
.stat-pace, .stat-wide { grid-column: 1 / -1; }
.stat-pace { gap: 10px; }
.pace-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink); font-weight: 700; }
.pace-head output { font-weight: 700; font-variant-numeric: tabular-nums; }
.pace { width: 100%; height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; touch-action: pan-y; }
.pace-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: -8px; }
.pace-figures { display: flex; flex-direction: column; gap: 4px; }
.pace-figures .stat-value { font-variant-numeric: tabular-nums; }
.stat-small { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0; }

.insight { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.insight-head { font-size: 21px; font-weight: 700; line-height: 1.3; margin: 0; }
.add-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.add { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
.add-best { background: var(--accent); color: var(--accent-ink); }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.bar-name { font-size: 16px; }
.bar-value { font-family: var(--mono); font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 12px; border-radius: 6px; background: var(--track); }
.bar-fill { height: 12px; border-radius: 6px; background: var(--accent); min-width: 6px; }
.bar-row.selected .bar-name { font-weight: 700; }
.bar-row.selected .bar-fill { background: var(--ink); }

h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.meaning ul { margin: 0; padding-left: 22px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }

.cta-title { font-size: 24px; font-weight: 700; line-height: 1.25; margin: 0; }
.cta p { margin: 0; color: var(--ink-2); }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; }
.email-row input[type="email"] { flex: 1 1 220px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }
.email-row .secondary { flex: 1 1 200px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 15px; margin: 0; }
.form-msg.error { color: #9A2B1B; }
.thanks { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; margin: 0; }
.keep { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--mono); font-size: 13px; background: var(--card); }
.copy-row button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ink); background: var(--card); font-weight: 700; cursor: pointer; }

.state { background: var(--card); border-radius: var(--radius); padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.state-title { font-size: 21px; font-weight: 700; margin: 0; }
.loading-num { display: block; width: 60%; height: 56px; border-radius: 10px; background: #33312D; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .loading-num { animation: none; } }

.footnote { font-size: 13px; color: var(--muted); margin: 0; }

@media (min-width: 720px) {
  .page { padding: 32px 24px 72px; gap: 32px; }
  h1 { font-size: 44px; }
  .card { padding: 32px; }
  .stats { grid-template-columns: 2fr 1fr; gap: 16px; }
  .stat-pace, .stat-wide { grid-column: auto; }
  .stat { padding: 24px; }
  .stat-big .stat-value { font-size: 60px; }
  .stat-value { font-size: 36px; }
  .bar-row { grid-template-columns: 210px 1fr 110px; }
  .bar-name { grid-column: 1; grid-row: 1; }
  .bar-track { grid-column: 2; grid-row: 1; }
  .bar-value { grid-column: 3; grid-row: 1; }
  .insight-head { font-size: 26px; }
}

.stack { display: flex; flex-direction: column; gap: 28px; }
.meaning { display: flex; flex-direction: column; gap: 12px; }
#email-form { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 720px) { .stack { gap: 32px; } }
