@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo-latin-wdth.woff2") format("woff2");
}

:root {
  /* Layout: one quiet paper column. The blueprint plan sheet is the only loud element;
     everything else is rules, tables and plain type in feet and inches. */
  --paper: #F2F4F1;
  --surface: #FFFFFF;
  --ink: #17222C;
  --muted: #55626D;
  --rule: #C8D0CB;
  --blueprint: #1D4A8C;
  --blueprint-deep: #143768;
  --line: #E3EDFB;
  --tape: #F2C12E;
  --tape-ink: #2A2206;
  --link: #1A4686;
  --good: #1F6E45;
  --good-bg: #DDF0E4;
  --tight: #7A4F00;
  --tight-bg: #FAE9C3;
  --bad: #9F2F27;
  --bad-bg: #F7DBD7;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F161D;
    --surface: #17212B;
    --ink: #E7ECEF;
    --muted: #9CA9B4;
    --rule: #2B3944;
    --blueprint: #1B4582;
    --blueprint-deep: #12305C;
    --line: #DCE8FA;
    --link: #8FB8F2;
    --good: #7FD0A0;
    --good-bg: #173B28;
    --tight: #F0C56A;
    --tight-bg: #40300C;
    --bad: #F2A097;
    --bad-bg: #47201B;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0F161D;
  --surface: #17212B;
  --ink: #E7ECEF;
  --muted: #9CA9B4;
  --rule: #2B3944;
  --blueprint: #1B4582;
  --blueprint-deep: #12305C;
  --line: #DCE8FA;
  --link: #8FB8F2;
  --good: #7FD0A0;
  --good-bg: #173B28;
  --tight: #F0C56A;
  --tight-bg: #40300C;
  --bad: #F2A097;
  --bad-bg: #47201B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

[hidden] { display: none !important; }

/* One view at a time once the script is running. Without it, every section reads top to bottom. */
.js [data-view] { display: none; }
.js [data-view].current { display: block; }
h1[tabindex="-1"]:focus { outline: none; }

h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }

h1 {
  font-weight: 750;
  font-stretch: 72%;
  font-size: clamp(2.35rem, 8.6vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2 {
  font-weight: 700;
  font-stretch: 78%;
  font-size: 1.65rem;
  line-height: 1.12;
  text-wrap: balance;
}

h3 {
  font-weight: 700;
  font-stretch: 88%;
  font-size: 1.15rem;
  line-height: 1.25;
  text-wrap: balance;
}

a { color: var(--link); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 18px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 5;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* Header */
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 28px; padding-block: 14px 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-stretch: 70%; font-size: 1.55rem; line-height: 1; letter-spacing: -0.01em;
}
.brand svg { display: block; width: 30px; height: 30px; flex: none; }
.brand .mark-line { stroke: var(--ink); stroke-width: 2; fill: none; }
.brand .mark-dot { fill: var(--tape); stroke: var(--ink); stroke-width: 1.5; }

.site-nav { max-width: 100%; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; padding: 0; white-space: nowrap; }
.site-nav a {
  display: block; padding: 6px 0 4px; color: var(--ink); text-decoration: none;
  font-size: 0.95rem; font-weight: 560; border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--tape); }

.tape {
  height: 14px;
  background-color: var(--tape);
  background-image:
    repeating-linear-gradient(90deg, var(--tape-ink) 0 1.5px, transparent 1.5px 48px),
    repeating-linear-gradient(90deg, var(--tape-ink) 0 1px, transparent 1px 8px);
  background-size: auto 14px, auto 6px;
  background-repeat: repeat-x;
}

.disclosure { border-bottom: 1px solid var(--rule); }
.disclosure p { font-size: 0.86rem; line-height: 1.45; color: var(--muted); padding-block: 9px; max-width: 88ch; }

/* Fit tool */
.hero { display: flex; flex-direction: column; gap: 14px; padding-block: 30px 22px; }
.lede { font-size: 1.12rem; line-height: 1.5; max-width: 56ch; }

.sheet {
  display: grid; gap: 18px; padding: 16px;
  border-radius: 6px;
  color: var(--line);
  background-color: var(--blueprint);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.plan { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.example { font-size: 0.9rem; line-height: 1.4; }
.plan-drawing svg { display: block; width: 100%; height: auto; max-width: 440px; margin-inline: auto; }
.plan-note { font-size: 0.86rem; line-height: 1.4; min-height: 1.4em; }

.p-room { fill: rgba(255, 255, 255, 0.05); stroke: var(--line); stroke-width: 2.5; }
.p-dim { stroke: var(--line); stroke-width: 1; fill: none; }
.p-dimtext { fill: var(--line); font-family: var(--font); font-stretch: 75%; font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; }
.p-label { fill: var(--line); font-family: var(--font); font-stretch: 82%; font-weight: 500; font-size: 11.5px; }
.p-screen { stroke: var(--tape); stroke-width: 4.5; }
.p-net { stroke: var(--tape); stroke-width: 3; stroke-dasharray: 5 4; }
.p-mat { fill: rgba(255, 255, 255, 0.07); stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.p-ball { fill: #FFFFFF; }
.p-golfer { fill: rgba(255, 255, 255, 0.14); stroke: var(--line); stroke-width: 1.5; }
.p-golfer--alt { fill: none; stroke-dasharray: 3 3; }
.p-golfertext { fill: var(--line); font-family: var(--font); font-weight: 700; font-size: 11px; text-anchor: middle; }
.p-unit { fill: var(--tape); stroke: var(--tape-ink); stroke-width: 1; }
.p-unit--ring { fill: none; stroke: var(--tape); stroke-width: 2.5; }
.p-empty { fill: var(--line); font-family: var(--font); font-stretch: 80%; font-weight: 600; font-size: 14px; text-anchor: middle; }

.seg { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg legend { float: left; width: 100%; padding: 0; font-size: 0.86rem; font-weight: 560; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-block; padding: 7px 10px; font-size: 0.88rem; font-weight: 600; line-height: 1.2;
  border: 1.5px solid rgba(227, 237, 251, 0.55); border-radius: 3px; color: var(--line);
}
.seg input:checked + span { background: var(--line); border-color: var(--line); color: var(--blueprint-deep); }
.seg input:disabled { cursor: not-allowed; }
.seg input:disabled + span { opacity: 0.4; text-decoration: line-through; }
.seg input:focus-visible + span { outline: 2px solid var(--tape); outline-offset: 2px; }

.block { border: 1.5px solid var(--line); display: grid; grid-template-columns: 1fr; align-content: start; background: rgba(20, 55, 104, 0.55); }
.cell { display: grid; gap: 4px; padding: 11px 13px 9px; border-top: 1px solid rgba(227, 237, 251, 0.42); min-width: 0; }
.cell:first-child { border-top: 0; }
.cell-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cell-head label { font-size: 0.88rem; font-weight: 560; line-height: 1.3; }
.cell output {
  font-size: 1.75rem; font-weight: 720; font-stretch: 72%; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: #FFFFFF;
}
.cell--check label { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 560; padding-block: 4px; cursor: pointer; }
.cell--check input { width: 20px; height: 20px; accent-color: var(--tape); margin: 0; flex: none; }
.cell--check input:focus-visible { outline: 2px solid var(--tape); outline-offset: 3px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: var(--line); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 3px; background: var(--line); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 28px; margin-top: -12.5px;
  background: var(--tape); border: 2px solid var(--tape-ink); border-radius: 3px;
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 24px; background: var(--tape); border: 2px solid var(--tape-ink); border-radius: 3px; }
input[type="range"]:focus-visible { outline: 2px solid var(--tape); outline-offset: 2px; }

/* Results */
.results { display: grid; gap: 34px; padding-block: 30px 10px; }
.verdict { display: flex; flex-direction: column; gap: 8px; max-width: var(--measure); }
.verdict h2 { font-size: clamp(1.75rem, 5.6vw, 2.3rem); }
.verdict .count { font-weight: 650; }

.checks { border-top: 2px solid var(--ink); max-width: 780px; }
.check { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.check-head { display: flex; align-items: baseline; gap: 12px; }
.check-name { font-weight: 650; }
.check-dim { font-weight: 720; font-stretch: 72%; font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.check p { grid-column: 1 / -1; font-size: 0.95rem; line-height: 1.5; color: var(--muted); max-width: 64ch; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 3px 11px 3px 9px; border-radius: 999px; border: 1.5px solid currentColor;
  font-size: 0.82rem; font-weight: 650; line-height: 1.35;
}
.pill::before { content: ""; width: 9px; height: 9px; flex: none; background: currentColor; }
.pill--good { color: var(--good); background: var(--good-bg); }
.pill--good::before { border-radius: 50%; }
.pill--ok { color: var(--good); background: var(--good-bg); }
.pill--ok::before { border-radius: 50%; background: transparent; border: 2px solid currentColor; }
.pill--tight { color: var(--tight); background: var(--tight-bg); }
.pill--tight::before { width: 10px; height: 9px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pill--no { color: var(--bad); background: var(--bad-bg); }
.pill--no::before { clip-path: polygon(20% 0, 50% 30%, 80% 0, 100% 20%, 70% 50%, 100% 80%, 80% 100%, 50% 70%, 20% 100%, 0 80%, 30% 50%, 0 20%); }

.schedule { display: grid; gap: 26px; max-width: 780px; }
.schedule-head { display: flex; flex-direction: column; gap: 6px; }
.groups { display: grid; gap: 26px; }
.group { display: grid; gap: 8px; }
.group h3 { display: flex; align-items: baseline; gap: 10px; }
.group h3 .n { font-weight: 500; color: var(--muted); font-size: 0.95rem; font-stretch: 100%; }
.rows { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.m-name { font-weight: 700; }
.m-price { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.m-meta { grid-column: 1 / -1; font-size: 0.93rem; line-height: 1.45; color: var(--muted); }
.m-fit { grid-column: 1 / -1; font-size: 0.93rem; line-height: 1.45; }
.group--no .m-name, .group--no .m-price { color: var(--muted); }

/* The link out to a store: the one filled control on the page. */
.m-go { grid-column: 1 / -1; padding-top: 8px; }
.go {
  display: inline-block; padding: 9px 14px; background: var(--blueprint); color: #FFFFFF;
  font-weight: 650; font-size: 0.95rem; line-height: 1.2; text-decoration: none; border-radius: 2px;
}
.go:hover { background: var(--blueprint-deep); }
.go-s { padding: 7px 11px; font-size: 0.88rem; margin: 0 6px 6px 0; }
.m-go:has(.go-s) { padding-top: 8px; margin-bottom: -6px; }
.group--no .go { background: transparent; color: var(--link); padding: 0; text-decoration: underline; font-weight: 500; }
td .go { white-space: nowrap; }
.pk-foot { font-size: 0.93rem; line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.more { border-top: 1px solid var(--rule); padding-top: 12px; }
.more summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
.more[open] summary { margin-bottom: 14px; }

.budget-note { max-width: var(--measure); display: flex; flex-direction: column; gap: 8px; }

.rules { max-width: var(--measure); display: flex; flex-direction: column; gap: 10px; padding-block: 34px 10px; }
.rules ul { padding-left: 1.15em; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; line-height: 1.5; }

.guides { display: grid; gap: 14px; padding-block: 34px 10px; max-width: 780px; margin-inline: 0; }
.guide-list { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.guide-list li { padding: 13px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.guide-list a { font-weight: 700; font-stretch: 88%; font-size: 1.15rem; line-height: 1.25; }
.guide-list p { font-size: 0.95rem; color: var(--muted); line-height: 1.45; }

/* Guides */
.guide { display: flex; flex-direction: column; gap: 26px; padding-block: 30px 10px; }
.guide > * { max-width: var(--measure); }
.guide > .wide { max-width: 860px; }
.guide section { display: flex; flex-direction: column; gap: 12px; }
.guide .intro { font-size: 1.12rem; line-height: 1.5; }
.guide ul, .guide ol { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.note { border-left: 4px solid var(--tape); padding: 4px 0 4px 14px; font-size: 0.95rem; line-height: 1.5; }
.checked { font-size: 0.88rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-weight: 650; border-bottom-color: var(--ink); vertical-align: bottom; }
tbody th { font-weight: 650; min-width: 9.5em; }
td { min-width: 9em; }
td.num, th.num { text-align: right; white-space: nowrap; min-width: 0; }
caption { text-align: left; font-size: 0.88rem; color: var(--muted); padding-bottom: 8px; caption-side: top; }

.spec-list { list-style: none; padding: 0 !important; border-top: 2px solid var(--ink); gap: 0 !important; }
.spec-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.spec-list dl { grid-column: 1 / -1; display: grid; grid-template-columns: 7.2em 1fr; gap: 2px 12px; font-size: 0.93rem; line-height: 1.45; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; }

.sources { font-size: 0.9rem; line-height: 1.45; }
.sources ol { gap: 4px; }
.back { font-weight: 650; }

.site-footer { margin-top: 40px; border-top: 2px solid var(--ink); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 8px; padding-block: 18px 34px; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.site-footer p { max-width: 88ch; }
.site-footer strong { color: var(--ink); font-stretch: 78%; font-size: 1.05rem; }
.foot-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-links a { color: var(--ink); }

/* Page not found */
.lost { display: flex; flex-direction: column; gap: 14px; padding-block: 40px 20px; max-width: var(--measure); }

/* On a phone, tables of three or more columns read as labelled entries, one row at a time,
   like the launch-monitor lists. build.py copies each column heading into data-label. */
@media (max-width: 640px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack tbody th, table.stack td, table.stack caption { display: block; }
  table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  table.stack tbody th { border: 0; padding: 0 0 4px; min-width: 0; font-size: 1rem; }
  table.stack td { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; border: 0; padding: 1px 0; min-width: 0; }
  table.stack td::before { content: attr(data-label); color: var(--muted); }
  table.stack td.num { text-align: left; white-space: normal; }
}

@media (min-width: 720px) {
  .block { grid-template-columns: 1fr 1fr; }
  .cell--span { grid-column: 1 / -1; }
  .cell:nth-child(2) { border-top: 0; border-left: 1px solid rgba(227, 237, 251, 0.42); }
  .cell:nth-child(4), .cell:nth-child(6) { border-left: 1px solid rgba(227, 237, 251, 0.42); }
}

@media (min-width: 900px) {
  .sheet { grid-template-columns: minmax(0, 430px) minmax(0, 1fr); align-items: start; padding: 22px; gap: 26px; }
  .block { grid-template-columns: 1fr; }
  .cell:nth-child(2), .cell:nth-child(4), .cell:nth-child(6) { border-left: 0; }
  .cell:nth-child(2) { border-top: 1px solid rgba(227, 237, 251, 0.42); }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a { transition: border-color 0.12s ease; }
}
