:root {
  --bg: #f7f5ef; --surface: #ffffff; --surface-2: #eef0ea;
  --ink: #17231f; --ink-2: #4c5a54; --line: #dcdfd5;
  --brand: #14433f; --brand-2: #1f6b63; --brand-ink: #ffffff; --accent: #f4b860; --accent-soft: #fbedd3;
  --good: #1c7a4a; --warn: #a86a00; --serious: #c4561b; --bad: #b3261e;
  --good-soft: #dff2e6; --bad-soft: #fae3e0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, Consolas, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101715; --surface: #18211e; --surface-2: #212c28;
    --ink: #eaf0ec; --ink-2: #a7b4ae; --line: #2f3b36;
    --brand: #173f3a; --brand-2: #62c4b5; --accent: #f4b860; --accent-soft: #3b3020;
    --good: #5fcf94; --warn: #e8ad46; --serious: #f0905c; --bad: #f28b82;
    --good-soft: #17352a; --bad-soft: #3f211e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--brand-2); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 28px 0 12px; }
h2 { font-size: 1.35rem; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0; }
section { margin: 28px 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); } .small { font-size: .875rem; } .mono { font-family: var(--mono); }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: var(--surface); padding: 8px 12px; z-index: 30; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.demo-banner { background: var(--accent); color: #2a1e05; padding: 8px 16px; text-align: center; font-size: .9rem; }
.top { background: var(--brand); color: #fff; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; font: 700 1.2rem var(--serif); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.top a:not(.brand):not(.btn) { color: #dbe8e4; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.top a:hover:not(.btn), .top a[aria-current] { color: #fff !important; border-bottom-color: var(--accent) !important; }
.top-user { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.top .btn-ghost { color: #fff; border-color: #6f9c95; }

.btn { display: inline-block; background: var(--brand-2); color: #fff; border: 1px solid transparent; border-radius: 8px; padding: 9px 16px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; }
@media (prefers-color-scheme: dark) { .btn:not(.btn-ghost):not(.btn-danger) { color: #06231f; } }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand-2); border-color: var(--line); }
.btn-danger { background: var(--bad); color: #fff; }
.link { background: none; border: 0; color: var(--brand-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px; align-items: center; margin-top: 12px; }
.eyebrow { color: var(--brand-2); font-weight: 700; font-size: .85rem; letter-spacing: .02em; margin: 24px 0 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.search { display: flex; gap: 8px; max-width: 560px; margin-top: 18px; }
.search input { flex: 1; min-width: 0; }
.hero-stats { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 20px; }
.hero-stats div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero-stats div:last-child { border: 0; }
.hero-stats strong { display: block; font: 700 1.9rem var(--serif); }
.hero-stats span { color: var(--ink-2); font-size: .9rem; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.goal { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: 16px; color: inherit; text-decoration: none; }
.goal:hover { border-color: var(--brand-2); }
.goal strong { display: block; font: 700 1.08rem var(--serif); margin-bottom: 4px; }
.goal span { color: var(--ink-2); font-size: .92rem; }
.steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface-2); border-radius: 12px; padding: 16px; }
.steps li::before { content: counter(s); display: block; font: 700 1.5rem var(--serif); color: var(--brand-2); }
.steps strong, .steps span { display: block; }
.steps span { color: var(--ink-2); font-size: .93rem; }

input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; max-width: 100%; }
input[type=checkbox] { width: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.filters-inline { margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; flex: 1 1 150px; margin-bottom: 0; }
.field.grow { flex: 2 1 220px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0; }
.result-bar p { margin: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 24px 0; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card-head h3 a { color: inherit; text-decoration: none; }
.card-head h3 a:hover { text-decoration: underline; }
.card-head p { margin: 2px 0 0; }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.facts dt { color: var(--ink-2); font-size: .78rem; }
.facts dd { margin: 0; font-weight: 700; }

.risk { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.risk-bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.risk-bars i { width: 5px; height: 12px; border-radius: 2px; background: var(--line); }
.risk-low .on { background: var(--good); } .risk-medium .on { background: var(--warn); }
.risk-high .on { background: var(--serious); } .risk-very-high .on { background: var(--bad); }
.cushion { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.cushion-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: block; }
.cushion-fill { display: block; height: 100%; background: var(--brand-2); border-radius: 0 4px 4px 0; }
.cushion-text { font-size: .84rem; color: var(--ink-2); }
.cushion-below { color: var(--bad); font-weight: 700; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.notice { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.notice-warn { background: var(--accent-soft); border-left: 4px solid var(--warn); }
.crumb { margin: 18px 0 0; font-size: .88rem; color: var(--ink-2); }
.cert-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: flex-end; }
.cert-head h1 { margin-top: 8px; margin-bottom: 4px; }
.cert-head p { margin: 0 0 8px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plain { padding-left: 20px; margin: 0; } .plain li { margin: 6px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi > span { display: block; color: var(--ink-2); font-size: .85rem; }
.kpi strong { display: block; font: 700 1.35rem var(--serif); margin-top: 2px; }
.kpi small { color: var(--ink-2); }
.hint { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1px solid var(--ink-2); background: none; color: var(--ink-2); font-size: .7rem; line-height: 1; cursor: help; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { color: var(--ink-2); font-size: .82rem; font-weight: 600; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare th[scope=row] { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tag { display: inline-block; padding: 1px 8px; font-size: .78rem; border-radius: 10px; background: var(--surface-2); white-space: nowrap; }
.tag-good { background: var(--good-soft); color: var(--good); } .tag-bad { background: var(--bad-soft); color: var(--bad); }

.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid-zero { stroke: var(--ink-2); }
.chart .axis { fill: var(--ink-2); font-size: 12px; font-family: var(--sans); }
.chart .line { fill: none; stroke: var(--brand-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .hit-dot { fill: var(--brand-2); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.chart .hit:hover .hit-dot, .chart .hit:focus .hit-dot { opacity: 1; }
.chart .hit { outline: none; }
.scatter .dot circle { fill: var(--brand-2); fill-opacity: .55; stroke: var(--surface); stroke-width: 1; }
.scatter .dot:hover circle, .scatter .dot:focus circle { fill: var(--accent); fill-opacity: 1; stroke: var(--ink); }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.month { text-align: center; font-size: .75rem; color: var(--ink-2); }
.month-bar { height: 120px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.month-bar i { display: block; width: 100%; background: var(--brand-2); border-radius: 4px 4px 0 0; }
.shares { list-style: none; padding: 0; margin: 0; }
.shares li { display: grid; grid-template-columns: minmax(90px, 1fr) 1.3fr 46px; gap: 10px; align-items: center; padding: 5px 0; font-size: .92rem; }
.share-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.share-track i { display: block; height: 100%; background: var(--brand-2); }
.shares strong { text-align: right; }
.check-list { background: var(--accent-soft); border-radius: 14px; padding: 20px; }
.check-list ul { margin: 0; padding-left: 20px; }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 28px; }
.glossary dt { font-weight: 700; margin-top: 12px; }
.glossary dd { margin: 0; color: var(--ink-2); }
.auth { max-width: 460px; margin: 36px auto; }
.auth h1 { margin-top: 0; }
.auth form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.auth .field { width: 100%; flex: none; }

.foot { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0; font-size: .875rem; color: var(--ink-2); }
.foot-warn { max-width: 90ch; margin-top: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 0; }
.tip { position: fixed; z-index: 40; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 6px; font-size: .82rem; max-width: 280px; pointer-events: none; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .grid-cards { grid-template-columns: 1fr; }
  .top-user { margin-left: 0; }
  .search { flex-wrap: wrap; }
}
@media (forced-colors: active) {
  .cushion-fill, .share-track i, .month-bar i, .risk-bars .on { background: CanvasText; forced-color-adjust: none; }
}
.filters-inline .field { flex: 0 1 280px; }
.more { margin-top: 14px; }
.more summary { cursor: pointer; color: var(--brand-2); font-weight: 600; padding: 6px 0; }
.more[open] summary { margin-bottom: 8px; }
tr.past td { color: var(--ink-2); }
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; }
@media (prefers-color-scheme: dark) {
  :root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; }
}
.chart .barrier { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart .barrier-label { fill: var(--ink); font-weight: 600; }
.chart .hit-line { stroke: var(--ink-2); stroke-width: 1; opacity: 0; }
.chart .hit:hover .hit-line { opacity: .6; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
