/* memfree.io -- site styles.  One family (Bricolage Grotesque, self-hosted, SIL OFL), five colour fields, one memorable figure. */

@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ultra: #3b2bff;
  --ultra-deep: #2a1dc4;
  --pink: #ff2e88;
  --pink-soft: #ff9ac8;
  --sun: #ffd43b;
  --ink: #160f3b;
  --ink-2: #4a4470;
  --paper: #f6f4ff;
  --white: #ffffff;
  --lilac: #d9d4ff;
  --rule: #cfc9f2;

  --font: "Bricolage", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.4rem);
  --step-4: clamp(2.3rem, 1.4rem + 3.6vw, 4.1rem);
  --step-5: clamp(3.1rem, 1.2rem + 8.2vw, 8.6rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --radius: 10px;
  --shadow-hard: 4px 4px 0 var(--ink);
  --section-pad: clamp(64px, 9vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 3px; }
p { margin: 0 0 1em; max-width: 64ch; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--step-5); font-stretch: 75%; line-height: 0.9; }
h2 { font-size: var(--step-4); font-stretch: 80%; line-height: 0.98; }
h3 { font-size: var(--step-2); font-stretch: 90%; line-height: 1.12; font-weight: 750; }
strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums lining-nums; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.field-ultra :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--sun); color: var(--ink); padding: 10px 14px; font-weight: 700;
  border: 2px solid var(--ink); border-radius: var(--radius); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- colour fields ---------- */
.field { padding-block: var(--section-pad); position: relative; }
.field-ultra { background: var(--ultra); color: var(--white); }
.field-pink { background: var(--pink); color: var(--ink); }
.field-sun { background: var(--sun); color: var(--ink); }
.field-paper { background: var(--paper); color: var(--ink); }
.field-white { background: var(--white); color: var(--ink); }
.field-ink { background: var(--ink); color: var(--paper); }
.field-ultra .muted { color: var(--lilac); }
.field-paper .muted, .field-white .muted { color: var(--ink-2); }
.field-pink .muted, .field-sun .muted { color: var(--ink); opacity: 0.85; }

.lede { font-size: var(--step-1); line-height: 1.5; max-width: 52ch; }
.small { font-size: var(--step--1); line-height: 1.5; }

/* ---------- header ---------- */
.site-header { padding-block: 22px; }
.site-header.on-ultra { background: var(--ultra); color: var(--white); }
.site-header.on-pink { background: var(--pink); color: var(--ink); }
.site-header.on-sun { background: var(--sun); color: var(--ink); }
.site-header.on-paper { background: var(--paper); color: var(--ink); }
.site-header.on-ultra :focus-visible { outline-color: var(--sun); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand {
  display: inline-flex; align-items: center; gap: 0.38em;
  font-weight: 800; font-stretch: 75%; font-size: 1.85rem; letter-spacing: -0.02em; line-height: 1;
  text-decoration: none;
}
.brand-mark { width: 0.5em; height: 0.5em; background: var(--sun); border-radius: 2px; transform: translateY(0.06em); }
.on-sun .brand-mark, .on-pink .brand-mark, .on-paper .brand-mark { background: var(--ultra); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav a { font-weight: 600; text-decoration: none; font-stretch: 95%; }
.nav a:not(.btn):hover, .nav a:not(.btn)[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav .btn { margin-left: 6px; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    font: inherit; font-weight: 700; color: inherit; background: transparent;
    border: 2px solid currentColor; border-radius: var(--radius); padding: 8px 14px; cursor: pointer;
  }
  .nav { display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: 74px; z-index: 5;
         flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); color: var(--ink);
         border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-hard); padding: 8px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 10px; }
  .nav .btn { margin: 8px 0 4px; justify-content: center; }
  .site-header { position: relative; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font: inherit; font-weight: 700; font-stretch: 90%; font-size: 1.0625rem; line-height: 1.1;
  padding: 0.9em 1.35em; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--sun); color: var(--ink); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-hard); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--pink); }
.btn-ink:hover { box-shadow: 5px 5px 0 var(--pink); }
.btn-ink:active { box-shadow: 0 0 0 var(--pink); }
.btn-small { padding: 0.6em 1em; font-size: 0.98rem; }
.field-pink .btn-ink, .on-pink .btn-ink { box-shadow: 4px 4px 0 var(--white); }
.field-pink .btn-ink:hover { box-shadow: 5px 5px 0 var(--white); }
.field-pink .btn-ink:active { box-shadow: 0 0 0 var(--white); }
.link-quiet { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 34px; }

/* ---------- home hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(56px, 7vw, 96px); overflow: hidden; overflow: clip; }
.hero h1 { font-size: clamp(3rem, 1rem + 7.4vw, 7.6rem); }
.hero h1 span { display: block; }
.hero .lede { margin-top: 28px; color: var(--white); }
.hero .lede strong { color: var(--sun); font-weight: 700; }

.bill { margin: clamp(48px, 7vw, 88px) 0 0; }
.bill-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.bill-title { font-weight: 700; font-size: var(--step-1); font-stretch: 90%; }
.bill-key { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--step--1); color: var(--lilac); }
.bill-key span { display: inline-flex; align-items: center; gap: 8px; }
.key-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.key-std { background: var(--pink-soft); }
.key-mf { background: var(--sun); }

.bill-row { display: grid; grid-template-columns: 7.2rem 1fr; gap: 16px; align-items: center; padding-block: 14px; border-top: 1px solid rgba(217, 212, 255, 0.35); }
.bill-row:last-of-type { border-bottom: 1px solid rgba(217, 212, 255, 0.35); }
.bill-len { font-weight: 800; font-stretch: 80%; font-size: var(--step-2); line-height: 1; }
.bill-len small { display: block; font-size: var(--step--1); font-weight: 500; font-stretch: 100%; color: var(--lilac); margin-top: 4px; }
.lanes { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; --k: 0.24cqw; }
.lane { position: relative; display: flex; align-items: center; gap: 12px; min-height: 30px; }
.bar {
  display: block; height: 30px; border-radius: 0 6px 6px 0; flex: none;
  width: max(4px, calc(var(--gb) * var(--k)));
  transform-origin: left center;
}
@media (max-width: 640px) { .lanes { --k: 0.17cqw; } }
.lane-std .bar { background: var(--pink-soft); }
.lane-mf .bar { background: var(--sun); height: 30px; }
.lane-val { font-weight: 700; font-size: 0.98rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lane-val .who { font-weight: 500; color: var(--lilac); margin-left: 6px; }
.lane-off .bar { width: calc(var(--gb) * var(--k)); }
.lane-off .lane-val {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: var(--pink-soft); color: var(--ink); padding: 4px 10px; border-radius: 6px;
}
.lane-off .lane-val .who { color: var(--ink); }
.bill-note { margin-top: 18px; color: var(--lilac); font-size: var(--step--1); max-width: 78ch; }

html.js .bar { transform: scaleX(0); }
html.js.is-ready .bar { transform: scaleX(1); transition: transform 1.5s cubic-bezier(0.2, 0.75, 0.15, 1); transition-delay: calc(var(--i, 0) * 140ms + 200ms); }
html.js .lane-val { opacity: 0; }
html.js.is-ready .lane-val { opacity: 1; transition: opacity 0.4s ease; transition-delay: calc(var(--i, 0) * 140ms + 900ms); }
@media (prefers-reduced-motion: reduce) {
  html.js .bar, html.js.is-ready .bar { transform: none; transition: none; }
  html.js .lane-val, html.js.is-ready .lane-val { opacity: 1; transition: none; }
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
}

@media (max-width: 640px) {
  .bill-row { grid-template-columns: 1fr; gap: 10px; }
  .lane-val { font-size: 0.9rem; }
}

/* ---------- comparison table ---------- */
.vs-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-bottom: 44px; }
.vs-head p { margin: 0; }
@media (max-width: 860px) { .vs-head { grid-template-columns: 1fr; } }
.vs { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.vs caption { text-align: left; caption-side: bottom; padding-top: 16px; color: var(--ink-2); font-size: var(--step--1); }
.vs th, .vs td { text-align: left; vertical-align: middle; padding: 18px 20px; border-bottom: 2px solid var(--ink); }
.vs thead th { font-size: var(--step--1); font-weight: 700; font-stretch: 95%; border-bottom-width: 3px; padding-top: 0; }
.vs tbody th { font-weight: 600; font-stretch: 95%; width: 40%; padding-left: 0; }
.vs td { font-weight: 700; font-stretch: 85%; font-size: var(--step-2); line-height: 1.1; }
.vs td.dim { color: var(--ink-2); font-weight: 500; font-stretch: 95%; font-size: var(--step-0); }
.vs .col-mf { background: var(--sun); }
.vs thead .col-mf { background: transparent; }
.vs thead .col-mf span { background: var(--sun); padding: 4px 10px; border-radius: 6px; border: 2px solid var(--ink); }
.vs tbody tr:first-child .col-mf { border-top-left-radius: 0; }
@media (max-width: 640px) {
  .vs thead { display: none; }
  .vs, .vs tbody, .vs tr, .vs th, .vs td { display: block; width: 100%; }
  .vs tr { padding: 14px 0; border-bottom: 2px solid var(--ink); }
  .vs th, .vs td { border: 0; padding: 4px 0; }
  .vs tbody th { width: 100%; }
  .vs td::before { content: attr(data-label); display: block; font-size: var(--step--1); font-weight: 500; font-stretch: 100%; color: var(--ink-2); }
  .vs .col-mf { background: transparent; }
  .vs td.col-mf { background: var(--sun); padding: 8px 10px; border-radius: 6px; margin-top: 6px; }
}

/* ---------- problem ---------- */
.problem { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px 72px; align-items: start; }
.problem p { font-size: var(--step-1); line-height: 1.5; }
.problem-figs { display: grid; gap: 0; border-top: 3px solid var(--ink); }
.problem-figs div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--ink); }
.problem-figs dt { font-weight: 600; }
.problem-cap { margin: 14px 0 0; font-size: var(--step--1); }
.problem-figs dd { margin: 0; font-weight: 800; font-stretch: 75%; font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .problem { grid-template-columns: 1fr; } }

/* ---------- outcomes ---------- */
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; }
.outcome { border-top: 8px solid var(--ink); padding-top: 22px; }
.outcome:nth-child(1) { border-top-color: var(--ultra); }
.outcome:nth-child(2) { border-top-color: var(--pink); }
.outcome:nth-child(3) { border-top-color: var(--sun); }
.outcome h3 { margin-bottom: 12px; }
.outcome p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .outcomes { grid-template-columns: 1fr; gap: 32px; } }

.also { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 56px; padding-top: 32px; border-top: 2px solid var(--rule); }
.also p { margin: 0; color: var(--ink-2); }
.also strong { color: var(--ink); }
@media (max-width: 760px) { .also { grid-template-columns: 1fr; } }

/* ---------- H200 split ---------- */
.split-card {
  background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ink); padding: clamp(20px, 3.4vw, 40px); margin-top: 44px;
}
.split-title { font-weight: 700; font-size: var(--step-1); font-stretch: 90%; margin: 0 0 6px; }
.split-sub { color: var(--ink-2); margin: 0 0 26px; }
.gpu { margin-bottom: 26px; }
.gpu:last-of-type { margin-bottom: 0; }
.gpu-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.gpu-label b { font-weight: 700; }
.gpu-label .count { font-weight: 800; font-stretch: 75%; font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums; }
.gpu-bar { display: flex; height: 54px; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: repeating-linear-gradient(135deg, #ffffff 0 6px, #ece9fb 6px 8px); }
.seg { height: 100%; flex: none; border-right: 2px solid var(--white); }
.seg:last-child { border-right: 0; }
.seg-model { background: var(--ink); color: var(--white); display: flex; align-items: center; padding-left: 12px; font-size: var(--step--1); font-weight: 600; white-space: nowrap; overflow: hidden; }
.seg-std { background: var(--pink); }
.seg-mf { background: var(--ultra); border-right-width: 1px; }
.gpu-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: var(--step--1); color: var(--ink-2); }
.gpu-legend span { display: inline-flex; align-items: center; gap: 8px; }
.gpu-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid var(--ink); }
.gpu-legend .k-model { background: var(--ink); }
.gpu-legend .k-std { background: var(--pink); }
.gpu-legend .k-mf { background: var(--ultra); }
.gpu-legend .k-free { background: repeating-linear-gradient(135deg, #ffffff 0 3px, #ddd8f7 3px 4px); }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--white); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--sun); color: var(--ink);
  font-weight: 800; margin-bottom: 14px;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--lilac); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.flow { display: flex; align-items: stretch; gap: 0; margin-top: 56px; flex-wrap: wrap; }
.flow-node {
  flex: 1 1 160px; padding: 18px 16px; border: 2px solid var(--white); border-radius: 10px;
  font-weight: 700; font-stretch: 90%; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.flow-node small { font-weight: 500; font-stretch: 100%; color: var(--lilac); }
.flow-node.is-us { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.flow-node.is-us small { color: var(--ink); }
.flow-link { flex: 0 0 44px; display: flex; align-items: center; justify-content: center; }
.flow-link svg { width: 30px; height: 14px; }
@media (max-width: 760px) {
  .flow { flex-direction: column; }
  .flow-node { flex: none; }
  .flow-link { flex: 0 0 34px; transform: rotate(90deg); }
}

/* ---------- pilot band ---------- */
.pilot-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px 72px; align-items: start; }
.pilot-band ul { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.pilot-band li { padding: 13px 0; border-bottom: 2px solid var(--ink); font-weight: 600; }
@media (max-width: 860px) { .pilot-band { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { margin-top: 44px; border-top: 3px solid var(--ink); max-width: 980px; }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-weight: 700; font-stretch: 90%; font-size: var(--step-1); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 18px 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 3px 18px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--ink-2); max-width: 70ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 72px 40px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.foot-top p { color: var(--lilac); }
.foot-brand .brand { font-size: 2.6rem; }
.foot-col h2 { font-size: var(--step--1); font-stretch: 100%; font-weight: 700; letter-spacing: 0; margin-bottom: 12px; color: var(--lilac); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col a { text-decoration: none; font-weight: 600; }
.foot-col a:hover { text-decoration: underline; }
.foot-base { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(217, 212, 255, 0.25); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; color: var(--lilac); font-size: var(--step--1); }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr; } }

/* ---------- inner page heads ---------- */
.page-head { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(56px, 7vw, 96px); }
.page-head h1 { font-size: clamp(2.8rem, 1.2rem + 6.4vw, 6.6rem); max-width: 14ch; }
.page-head .lede { margin-top: 26px; }

.prose h2 { font-size: var(--step-3); font-stretch: 85%; margin: 64px 0 18px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

.two-col { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px 72px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.kv { margin: 0; border-top: 3px solid var(--ink); }
.kv div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; padding: 14px 0; border-bottom: 2px solid var(--ink); }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- results charts ---------- */
.chart-block { margin-top: 72px; }
.chart-block:first-of-type { margin-top: 0; }
.chart-block h2 { font-size: var(--step-3); font-stretch: 85%; margin-bottom: 10px; }
.chart-block > p { color: var(--ink-2); }
.chart { position: relative; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: clamp(14px, 2.6vw, 28px); margin-top: 22px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .axis text, .chart .lab { font-family: var(--font); fill: #4a4470; font-size: 13px; }
.chart .lab-strong { font-family: var(--font); fill: #160f3b; font-size: 14px; font-weight: 700; }
.chart .grid line { stroke: #e4e0f8; stroke-width: 1; }
.chart .ref line { stroke: #160f3b; stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .ref text { font-family: var(--font); fill: #160f3b; font-size: 13px; font-weight: 600; }
.chart .s-std { stroke: var(--pink); fill: none; stroke-width: 2.5; }
.chart .s-mf { stroke: var(--ultra); fill: none; stroke-width: 2.5; }
.chart .m-std { fill: var(--pink); stroke: var(--white); stroke-width: 2; }
.chart .m-mf { fill: var(--ultra); stroke: var(--white); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; }
@media (max-width: 640px) {
  .chart .axis text, .chart .lab { font-size: 24px; }
  .chart .lab-strong { font-size: 26px; }
  .chart .ref text { font-size: 22px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--step--1); color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.legend .l-std { background: var(--pink); }
.legend .l-mf { background: var(--ultra); }
.tip {
  position: absolute; pointer-events: none; z-index: 4; background: var(--ink); color: var(--white);
  padding: 8px 12px; border-radius: 8px; font-size: 0.9rem; line-height: 1.35; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 0.12s ease;
}
.tip.is-on { opacity: 1; }
.tip b { font-weight: 700; }
details.table-view { margin-top: 14px; }
details.table-view summary { cursor: pointer; font-weight: 700; font-size: var(--step--1); }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; font-size: var(--step--1); }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.data-table th { font-weight: 700; }

.dots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 22px; }
.dots-cell { background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 20px; }
.dots-cell h3 { font-size: var(--step-1); margin-bottom: 4px; }
.dots-cell .score { font-weight: 800; font-stretch: 75%; font-size: var(--step-3); line-height: 1; margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.dots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.dot { aspect-ratio: 1; border-radius: 50%; background: var(--ultra); }
.dot.miss { background: transparent; border: 2px solid var(--pink); }
.dots-std { margin-top: 18px; padding-top: 14px; border-top: 2px dashed var(--rule); }
.dots-std .who { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 8px; }
.dots-std .dot { background: var(--pink); }
.dots-std .dot.miss { background: transparent; border: 2px solid var(--pink); }
.no-fit { font-weight: 700; color: var(--ink); background: repeating-linear-gradient(135deg, #fff 0 6px, #ffe3ef 6px 8px); border: 2px dashed var(--pink); border-radius: 8px; padding: 12px; font-size: var(--step--1); }
@media (max-width: 860px) { .dots-grid { grid-template-columns: 1fr; } }

.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 22px; }
.stat {
  background: var(--white); border: 2px solid var(--ink); border-radius: 14px; padding: 22px;
}
.stat .big { font-weight: 800; font-stretch: 75%; font-size: var(--step-4); line-height: 0.95; font-variant-numeric: tabular-nums; }
.stat p { margin: 10px 0 0; color: var(--ink-2); }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- pilot form ---------- */
.form { background: var(--white); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); padding: clamp(20px, 3.2vw, 36px); }
.form h2 { font-size: var(--step-3); font-stretch: 85%; margin-bottom: 8px; }
.form > p { color: var(--ink-2); }
.form fieldset { border: 0; padding: 0; margin: 26px 0 0; }
.form legend { font-weight: 800; font-stretch: 90%; font-size: var(--step-1); margin-bottom: 12px; padding: 0; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.fld { display: grid; gap: 6px; margin-bottom: 16px; }
.fld label, .fld .lbl { font-weight: 700; font-size: 0.98rem; }
.fld .hint { font-size: var(--step--1); color: var(--ink-2); margin-top: -2px; }
.req { color: var(--pink); font-weight: 800; }
.fld input, .fld select, .fld textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
  padding: 11px 12px; width: 100%; min-height: 48px;
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { outline: 3px solid var(--ultra); outline-offset: 1px; }
.fld [aria-invalid="true"] { border-color: var(--pink); background: #fff2f7; }
.err { color: #b0005a; font-size: var(--step--1); font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 8px; padding: 9px 12px; font-weight: 600; cursor: pointer; background: var(--paper); }
.checks input { width: 18px; height: 18px; accent-color: var(--ultra); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 26px; }
.form-note { font-size: var(--step--1); color: var(--ink-2); margin: 0; }
.form-summary { border: 2px solid var(--pink); background: #fff2f7; border-radius: 10px; padding: 14px 16px; margin-top: 18px; }
.form-summary:empty { display: none; }
.form-summary ul { margin: 6px 0 0; padding-left: 1.2em; }
.done { display: none; border: 2px solid var(--ink); background: var(--sun); border-radius: 12px; padding: 22px; margin-top: 22px; }
.done.is-on { display: block; }
.done h3 { margin-bottom: 8px; }
.done pre { white-space: pre-wrap; background: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: 14px; font-family: var(--font); font-size: 0.92rem; max-height: 260px; overflow: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- print (the numbers sheet uses its own file) ---------- */
@media print {
  .site-header .nav, .nav-toggle, .skip, .actions { display: none !important; }
  .field { padding-block: 24px; }
}
