/* The Android app's look on the web: seafoam paper, kelp ink, seam-tape yellow and woven size tags. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/fonts/bricolage-grotesque.woff2) format("woff2-variations");
  font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url(/fonts/atkinson-400.woff2) format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url(/fonts/atkinson-700.woff2) format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  --page: #E4EEE9;          /* seafoam paper */
  --ink: #12302B;           /* kelp ink */
  --ink-soft: #46625C;
  --rule: #B9CCC4;
  --tag: #12302B;           /* woven label */
  --tag-ink: #E4EEE9;
  --tag-soft: #9DB8B0;
  --tape: #F2C230;          /* seam tape */
  --on-tape: #12302B;
  --on-tape-soft: #4B4319;
  --swell: #2F6F8F;
  --figure: #C9DAD3;
  --focus: #2F6F8F;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0C1A18;
    --ink: #DCEBE5;
    --ink-soft: #93AEA7;
    --rule: #24403A;
    --tag: #18332E;
    --tag-ink: #E4EEE9;
    --tag-soft: #8FAEA6;
    --swell: #7DB8D4;
    --figure: #1D3631;
    --focus: #7DB8D4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0C1A18; --ink: #DCEBE5; --ink-soft: #93AEA7; --rule: #24403A;
  --tag: #18332E; --tag-ink: #E4EEE9; --tag-soft: #8FAEA6;
  --swell: #7DB8D4; --figure: #1D3631; --focus: #7DB8D4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Atkinson Hyperlegible", system-ui, sans-serif;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--swell); text-underline-offset: .15em; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--tape); color: var(--on-tape); padding: 8px 14px; border-radius: 3px; font-weight: 700; }
.skip:focus { top: 12px; }

h1, h2, .display {
  font-family: "Bricolage Grotesque", sans-serif;
}
h1 {
  font-stretch: 78%;
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 5.75rem);
  line-height: .9;
  letter-spacing: -.02em;
  margin: 40px 0 0;
}
h1.page-title { font-size: clamp(2.25rem, 7vw, 4rem); line-height: .95; }
h2 { font-weight: 700; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.01em; margin: 36px 0 12px; }
.lede { max-width: 36em; margin: 16px 0 0; color: var(--ink-soft); font-size: 1.125rem; }
.small, .note { font-size: .9375rem; color: var(--ink-soft); }
.cta { font-weight: 700; }

/* ---------- Top bar ---------- */
header.top { border-bottom: 1px solid var(--rule); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; padding-top: 12px; padding-bottom: 12px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.mark-icon { width: 34px; height: auto; }
header nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 0; padding: 0; }
header nav a { color: var(--ink); text-decoration: none; font-size: .9688rem; padding: 6px 0; display: inline-block; border-bottom: 3px solid transparent; }
header nav a:hover { border-bottom-color: var(--rule); }
header nav a[aria-current="page"] { border-bottom-color: var(--tape); font-weight: 700; }

/* ---------- Toggles ---------- */
.toggles { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0 0 22px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button {
  font: inherit; font-size: .9375rem; color: var(--ink); background: transparent;
  border: 0; padding: 7px 16px; cursor: pointer; min-height: 40px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.seg button:focus-visible { outline-offset: -4px; }

/* ---------- Picker ---------- */
.picker { margin-top: 36px; padding: 26px 0 8px; border-top: 4px solid var(--tape); }
.sentence {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  line-height: 1.45;
  margin: 0;
}
.sentence select {
  font: inherit; color: inherit; background-color: transparent;
  border: 0; border-bottom: 4px solid var(--tape); border-radius: 0;
  padding: 0 1.1em 0 2px; margin: 0 2px; max-width: 100%;
  field-sizing: content; /* as wide as the chosen brand, not the longest one */
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - .55em) 58%, calc(100% - .3em) 58%;
  background-size: .25em .25em; background-repeat: no-repeat;
}
.sentence select option { font-size: 1rem; color: #12302B; background: #fff; }
.covers { margin: 14px 0 0; color: var(--ink-soft); }
.covers strong { color: var(--ink); }
.measure-link { margin: 4px 0 0; }

/* ---------- Results (size tags) ---------- */
.results h2 { margin-top: 32px; }
.legend { color: var(--ink-soft); font-size: .9375rem; margin: -6px 0 16px; }
.tags { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tag {
  position: relative;
  background: var(--tag); color: var(--tag-ink);
  border-radius: 3px;
  padding: 20px 22px;
  display: flex; flex-direction: column;
}
.tag::before { /* blind-stitched seam */
  content: ""; position: absolute; inset: 7px;
  border: 1.5px dashed var(--tape); border-radius: 2px; opacity: .75; pointer-events: none;
}
.tag p { margin: 0; }
.tag .brand { font-weight: 700; font-size: 1rem; position: relative; }
.tag .brand a { color: inherit; text-decoration: none; }
.tag .brand a:hover { text-decoration: underline; }
.tag .size {
  font-family: "Bricolage Grotesque", sans-serif;
  font-stretch: 75%;
  font-weight: 800; font-size: 4.25rem; line-height: 1; letter-spacing: -.01em;
  color: var(--tape); margin: 6px 0 4px;
}
.tag .size.mid { font-size: 3.4rem; }
.tag .size.long { font-size: 2.6rem; }
.tag .fit { font-weight: 700; font-size: .9375rem; display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--tape); }
.dots i.on { background: var(--tape); }
.tag .alt { margin-top: 4px; font-size: .9375rem; color: var(--tag-soft); }
.tag .alt b { color: var(--tag-ink); }
.tag dl { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(228,238,233,.18); display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: .9375rem; }
.tag dt { color: var(--tag-soft); }
.tag dd { margin: 0; font-variant-numeric: tabular-nums; }

.tag.mine { background: var(--tape); color: var(--on-tape); }
.tag.mine::before { border-color: var(--on-tape); opacity: .5; }
.tag.mine .size { color: var(--on-tape); }
.tag.mine dt { color: var(--on-tape-soft); }
.tag.mine dl { border-top-color: rgba(18,48,43,.25); }
.note { margin: 20px 0 0; max-width: 46em; }

/* ---------- Measure ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 40px; margin-top: 32px; padding-top: 28px; border-top: 4px solid var(--tape); align-items: start; }
.figure svg { width: 100%; height: auto; display: block; }
.figure .body { fill: var(--figure); }
.figure .line { stroke: var(--swell); stroke-width: 2.5; fill: none; }
.figure .tape-line { stroke: var(--tape); stroke-width: 4; stroke-linecap: round; }
.figure .num circle { fill: var(--ink); }
.figure .num text { fill: var(--page); font: 700 13px "Atkinson Hyperlegible", sans-serif; text-anchor: middle; dominant-baseline: central; }
.figure .scale { fill: var(--ink-soft); }
ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
ol.steps li { counter-increment: s; position: relative; padding: 0 0 22px 48px; }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--page);
  font-weight: 700; font-size: .9375rem; display: grid; place-items: center;
}
ol.steps h2, .fitcheck h2 { font-size: 1.25rem; margin: 0 0 2px; line-height: 1.3; }
ol.steps p { margin: 0; max-width: 38em; }
.fitcheck { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--rule); }
.fitcheck ul, .tips { margin: 8px 0 0; padding-left: 1.2em; max-width: 40em; }
.fitcheck li, .tips li { margin-bottom: 6px; }
.fitcheck li::marker, .tips li::marker { color: var(--swell); }

/* ---------- Kayak paddle ---------- */
.lede + .toggles { margin-top: 24px; }
.paddle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; padding-top: 24px; border-top: 4px solid var(--tape); }
.answer { background: var(--tape); color: var(--on-tape); border-radius: 3px; padding: 18px 20px; }
.answer p { margin: 0; font-weight: 700; }
.answer .answer-value { font-family: "Bricolage Grotesque", sans-serif; font-stretch: 75%; font-weight: 800; font-size: 4rem; line-height: 1; margin-top: 4px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.25rem; padding: 0; margin-bottom: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 3px; margin-bottom: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.choice:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--tape) 22%, transparent); font-weight: 700; }
.choice input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; }
.tips { margin-top: 24px; }

/* ---------- Size charts ---------- */
.brand-list { list-style: none; margin: 28px 0 0; padding: 22px 0 0; border-top: 4px solid var(--tape); display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.brand-list a { display: flex; flex-direction: column; padding: 14px 16px; background: var(--tag); color: var(--tag-ink); border-radius: 3px; text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.brand-list a:hover { outline: 2px solid var(--tape); }
.brand-list small { color: var(--tag-soft); font-weight: 400; font-size: .875rem; }
.crumb { margin: 32px 0 0; font-size: .9375rem; }
.crumb + h1 { margin-top: 8px; }
h1 + .toggles { margin-top: 24px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; max-width: 720px; font-variant-numeric: tabular-nums; font-size: .9688rem; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
thead th { font-size: .875rem; color: var(--ink-soft); font-weight: 400; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 700; }
.sources { padding-left: 1.2em; margin: 24px 0 8px; }
.sources li { margin-bottom: 4px; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 8px; max-width: 36em; margin-top: 24px; }
.contact label { font-weight: 700; }
.contact textarea {
  font: inherit; color: var(--ink); width: 100%;
  background: color-mix(in srgb, var(--tape) 12%, transparent);
  border: 1.5px solid var(--ink-soft); border-radius: 4px; padding: 12px;
}
.contact textarea:focus { border-color: var(--ink); }
.contact button, .cta-button {
  font: inherit; font-weight: 700; color: var(--on-tape); background: var(--tape);
  border: 0; border-radius: 3px; min-height: 52px; cursor: pointer; margin-top: 8px;
}

/* ---------- Footer ---------- */
footer.foot { margin: 64px 0 0; padding: 20px 0 40px; border-top: 1px solid var(--rule); font-size: .875rem; color: var(--ink-soft); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
footer.foot p { max-width: 52em; margin: 16px 0 0; }

/* ---------- Privacy page ---------- */
.prose { max-width: 40em; }
.prose h2 { font-size: 1.3rem; margin-top: 28px; }

@media (max-width: 760px) {
  .paddle-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  h1 { margin-top: 28px; }
  .guide-grid { grid-template-columns: 1fr; gap: 20px; }
  .figure { max-width: 200px; }
  .tags { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .tag { padding: 18px 16px; }
  .tag .size { font-size: 3.5rem; }
  .tag .size.mid { font-size: 2.8rem; }
  .tag .size.long { font-size: 2.1rem; }
  .tag dl { grid-template-columns: 1fr; gap: 0; }
  .tag dd { margin-bottom: 4px; }
  table { font-size: .875rem; }
  th, td { padding-right: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tags.fresh .tag { animation: drop .32s ease-out both; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}
