/* Tessera Fit: tesserafit.app
   Built from the "Tessera: mosaic website vision board".
   Mosaic glass on dark grout. One glass colour per sport, also used in the app.
   Type: Space Grotesk (headlines, tile names), Inter (body), JetBrains Mono (every reading). */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark light;

  /* Board palette: dark (default) */
  --grout: #10201b;        /* ground, page background */
  --grout-deep: #0b1612;   /* mosaic bed */
  --raised: #182c25;       /* tiles, panels */
  --raised-2: #203630;
  --line: #2a4038;
  --line-strong: #4d6259;
  --bone: #ede8df;         /* text, light tiles */
  --text: var(--bone);
  --text-2: #cfd8d3;
  --text-3: #a7b5ae;
  --link: #7fc8b5;
  --action: #17805b;       /* primary action (white text) */
  --action-hover: #146e4f;
  --focus: #7fc8b5;
  --field-bg: #ede8df;
  --field-text: #10201b;
  --field-border: transparent;
  --rest: #1b2e28;
  --load-tile: #ede8df;

  /* Glass: one colour per sport / connection */
  --emerald: #1f9d6f;      /* brand anchor; direct API */
  --sea-glass: #7fc8b5;    /* swim; Apple Shortcut */
  --ochre: #d9a441;        /* gym; export */
  --terracotta: #c8623e;   /* run */
  --slate: #4a6fa5;        /* ride, recovery; file upload */
  --later: #7e8f87;        /* coming later */

  /* Text-bearing tile variants, all >= 4.5:1 */
  --t-terracotta: #b4532f; /* with white text */

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --s-2: 0.8125rem;
  --s-1: 0.9375rem;
  --s0: 1.0625rem;
  --s1: 1.3125rem;
  --s2: 1.625rem;
  --s3: clamp(2.1rem, 4.2vw, 3.25rem);
  --s4: clamp(2.75rem, 6.4vw, 5rem);

  --wrap: 82rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --radius: 6px;
}

@media (prefers-color-scheme: light) {
  :root {
    --grout: #f2f1ec;
    --grout-deep: #e2e4de;
    --raised: #ffffff;
    --raised-2: #e9ebe5;
    --line: #d3d8d1;
    --line-strong: #9aa59f;
    --text: #10201b;
    --text-2: #33433c;
    --text-3: #55645d;
    --link: #146e4f;
    --focus: #17805b;
    --field-bg: #ffffff;
    --field-border: #9aa59f;
    --rest: #d9ddd6;
    --load-tile: #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--grout);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--s0);
  line-height: 1.55;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 0.5rem; z-index: 20; background: var(--text); color: var(--grout); padding: 0.6rem 1rem; border-radius: var(--radius); }
.skip:focus { left: 0.5rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-weight: 500; }

/* Header */
.site-header { padding-block: 1.75rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text); text-decoration: none; font: 700 1.375rem/1 var(--display); letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }
.site-nav { display: flex; gap: 0.5rem 2rem; flex-wrap: wrap; font-size: var(--s-1); }
.site-nav a { color: var(--text-2); text-decoration: none; padding-block: 0.4rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Sections */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { font-size: var(--s3); line-height: 1.05; max-width: 20ch; }
.section-head p { color: var(--text-2); max-width: 46ch; margin: 0; }
.section-head.single { grid-template-columns: minmax(0, 1fr); }

/* Hero */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }
.hero h1 { font-size: var(--s4); line-height: 0.98; letter-spacing: -0.025em; max-width: 12ch; }
.hero .lede { font-size: var(--s1); line-height: 1.5; color: var(--text-2); max-width: 36ch; margin: 0; }

/* Waitlist form (used twice) */
.waitlist { display: flex; flex-direction: column; gap: 0.6rem; max-width: 32.5rem; }
.waitlist label { font-size: var(--s-1); font-weight: 600; }
.waitlist .row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.waitlist input[type="email"] {
  flex: 1 1 16rem; min-height: 3.25rem; padding: 0 1rem;
  font: 400 1.0625rem var(--body); color: var(--field-text);
  background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--radius);
}
.waitlist input[type="email"]::placeholder { color: #55645d; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.5rem;
  font: 600 1.0625rem var(--body); color: #fff; background: var(--action);
  border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none;
}
.button:hover { background: var(--action-hover); color: #fff; }
.button[disabled] { opacity: 0.7; cursor: progress; }
.waitlist .note { font-size: var(--s-2); color: var(--text-3); margin: 0; }
.waitlist .status { font-size: var(--s-1); margin: 0; min-height: 1.4em; }
.waitlist .status.ok { color: var(--link); }
.waitlist .status.error { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Hero mosaic: tiles from every app settle into one picture */
.assemble { display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-end; }
.board { width: 100%; aspect-ratio: 1 / 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1.9%, 12px); }
.board .tile {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 0.55rem; border-radius: 5px;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.board .tile .src { font: 600 0.6875rem/1.15 var(--body); }
.board .tile .val { font: 500 clamp(0.75rem, 1.3vw, 0.9375rem)/1 var(--mono); }
.ghost-button {
  min-height: 2.75rem; padding: 0 1rem; font: 500 0.875rem var(--body);
  color: var(--text); background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius); cursor: pointer;
}
.ghost-button:hover { border-color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .board .tile { transition: none; } }

/* Tile colour classes (text pairs all pass WCAG AA) */
.c-emerald { background: var(--emerald); color: #10201b; }
.c-action { background: var(--action); color: #fff; }
.c-sea { background: var(--sea-glass); color: #10201b; }
.c-ochre { background: var(--ochre); color: #10201b; }
.c-terracotta { background: var(--t-terracotta); color: #fff; }
.c-slate { background: var(--slate); color: #fff; }
.c-load { background: var(--load-tile); color: #10201b; }
.c-soon { background: #203630; color: #a7b5ae; }
.c-yours { background: #203630; color: #ede8df; }
@media (prefers-color-scheme: light) {
  .c-load { box-shadow: inset 0 0 0 1px var(--line); }
  .c-soon { background: #e2e4de; color: #55645d; }
  .c-yours { background: #e2e4de; color: #10201b; }
}

/* 2 · The pieces */
.pieces { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 3rem); }
.piece-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.875rem; align-content: start; }
.piece {
  display: flex; flex-direction: column; gap: 0.6rem; min-height: 10.5rem;
  padding: 1rem; background: var(--raised); border: 1px solid var(--raised);
  border-top: 6px solid var(--edge, var(--emerald)); border-radius: var(--radius);
  transition: transform 200ms ease;
}
.piece:nth-child(3n+1) { transform: rotate(-0.4deg); }
.piece:nth-child(3n+2) { transform: rotate(0.35deg); }
.piece:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .piece, .piece:hover { transition: none; transform: none; } }
.piece h3 { font-size: 1.375rem; line-height: 1.1; }
.piece p { margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.piece .how { margin-top: auto; display: flex; align-items: center; gap: 0.45rem; font: 500 0.75rem/1.2 var(--mono); color: var(--text-2); }
.piece .how::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--edge); flex: none; }
.piece.later { background: transparent; border: 1px dashed var(--line-strong); border-top: 6px solid var(--later); }
.piece a { color: var(--link); }
.edge-api { --edge: var(--emerald); }
.edge-shortcut { --edge: var(--sea-glass); }
.edge-export { --edge: var(--ochre); }
.edge-upload { --edge: var(--slate); }
.edge-later { --edge: var(--later); }

.anatomy { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.anatomy h3 { font-size: var(--s1); }
.sample-tile { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.35rem; background: #ede8df; color: #10201b; border-top: 8px solid var(--emerald); border-radius: 8px; }
.sample-tile .name { font: 700 1.75rem/1 var(--display); margin: 0; }
.sample-tile .reading { font: 500 1.875rem/1 var(--mono); margin: 0; }
.sample-tile .when { font-size: 0.875rem; color: #3d4a44; margin: 0; }
.sample-tile .via { font: 500 0.75rem/1 var(--mono); color: #146e4f; margin: 0; }
@media (prefers-color-scheme: light) { .sample-tile { box-shadow: inset 0 0 0 1px var(--line); } }
.anatomy ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; font-size: 0.875rem; color: var(--text-2); }
.anatomy ol strong { color: var(--text); }
.edge-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: 0.875rem; }
.edge-key li { display: flex; align-items: center; gap: 0.55rem; }
.edge-key li::before { content: ""; width: 1rem; height: 0.35rem; border-radius: 2px; background: var(--edge); }

/* 3 · The grout */
.grout-demo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.15fr); gap: 1rem; align-items: center; }
.session { padding: 1.25rem; background: var(--raised); border-radius: var(--radius); border-top: 6px solid var(--edge); display: flex; flex-direction: column; gap: 0.5rem; transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 600ms ease; }
.session h3 { font-size: 1.25rem; }
.session .time { font: 500 0.875rem var(--mono); color: var(--text-2); margin: 0; }
.session dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; font-size: 0.875rem; }
.session dt { color: var(--text-3); }
.session dd { margin: 0; font-family: var(--mono); font-weight: 500; }
.session.merged { border-top: 6px solid var(--emerald); outline: 2px solid var(--emerald); outline-offset: -2px; }
.session.merged .sources { font-size: 0.8125rem; color: var(--text-3); margin: 0; }
.seam { font: 700 1.75rem/1 var(--display); color: var(--text-3); text-align: center; }
.grout-caption { margin-top: 1.25rem; font-size: var(--s-1); color: var(--text-3); }
/* Scroll moment: the two sessions meet and the seam closes */
.js .grout-demo.pending .session.from-left { transform: translateX(-2.5rem); opacity: 0.4; }
.js .grout-demo.pending .session.from-right { transform: translateX(2.5rem); opacity: 0.4; }
.js .grout-demo.pending .session.merged { opacity: 0; transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) {
  .session { transition: none; }
  .js .grout-demo.pending .session { transform: none; opacity: 1; }
}

/* 4 · The picture: customisable dashboard */
.dash-demo { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.dash { list-style: none; margin: 0; padding: 0.875rem; background: var(--grout-deep); border-radius: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.dash-tile { display: flex; flex-direction: column; gap: 0.5rem; min-height: 9.5rem; padding: 1rem; border-radius: var(--radius); background: var(--raised); border-top: 6px solid var(--edge); cursor: grab; }
.dash-tile.dragging { opacity: 0.5; }
.dash-tile.drop-target { outline: 2px dashed var(--text-3); outline-offset: 2px; }
.dash-tile .label { font: 600 1rem/1.2 var(--display); margin: 0; }
.dash-tile .value { font: 500 1.75rem/1 var(--mono); margin: 0; }
.dash-tile .meta { font-size: 0.8125rem; color: var(--text-3); margin: 0; }
.dash-tile .controls { margin-top: auto; display: flex; gap: 0.35rem; flex-wrap: wrap; }
.mini { min-height: 2rem; min-width: 2rem; padding: 0 0.55rem; font: 500 0.8125rem var(--body); color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; }
.mini:hover { border-color: var(--text-2); }
.mini[disabled] { opacity: 0.35; cursor: default; }
.dash-side h3 { font-size: var(--s1); margin-bottom: 0.6rem; }
.dash-side p { color: var(--text-2); font-size: var(--s-1); }
.hidden-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.hidden-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 0.875rem; }
.hidden-empty { font-size: 0.875rem; color: var(--text-3); }
.no-js-note { font-size: 0.875rem; color: var(--text-3); }
.js .no-js-note { display: none; }
html:not(.js) .dash-tile .controls { display: none; }

/* 5 · Turn a tile over */
.flip-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.flip { perspective: 1200px; }
.flip-inner { position: relative; display: grid; transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; border-radius: 8px; min-height: 17rem; background: var(--raised); border-top: 8px solid var(--edge); }
.face.back { transform: rotateY(180deg); }
.face h3 { font-size: var(--s1); }
.face .big { font: 500 3.5rem/1 var(--mono); margin: 0; }
.face dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.9375rem; }
.face dt { color: var(--text-3); }
.face dd { margin: 0; }
.face code { font: 500 0.875rem var(--mono); }
.face .ex { font-size: 0.8125rem; color: var(--text-3); margin: auto 0 0; }
.flip-copy .ghost-button { margin-top: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
html:not(.js) .flip-inner { display: grid; gap: 1rem; transform: none; }
html:not(.js) .face { grid-area: auto; backface-visibility: visible; transform: none; }
html:not(.js) .flip-copy .ghost-button { display: none; }

/* 6 · Andamento */
.phases { display: grid; grid-template-columns: repeat(52, minmax(0, 1fr)); column-gap: 3px; margin-bottom: 0.5rem; }
.phase { border-top: 2px solid var(--line-strong); padding-top: 0.4rem; font: 500 0.75rem/1.2 var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.span-2 { grid-column: span 2; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; } .span-14 { grid-column: span 14; } .span-16 { grid-column: span 16; }
.year { display: grid; grid-template-rows: repeat(7, minmax(10px, 22px)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.day { border-radius: 2px; transition: opacity 400ms ease; }
.d-gym { background: var(--ochre); } .d-swim { background: var(--sea-glass); } .d-ride { background: var(--slate); } .d-run { background: var(--terracotta); } .d-rest { background: var(--rest); }
.o1 { opacity: 0.4; } .o2 { opacity: 0.55; } .o3 { opacity: 0.7; } .o4 { opacity: 0.85; } .o5 { opacity: 1; }
.js .year.pending .day { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .day { transition: none; } }
.year-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; margin-top: 1.25rem; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.875rem; }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend .sw { width: 1rem; height: 1rem; border-radius: 2px; }
.year-foot p { margin: 0; font-size: var(--s-2); color: var(--text-3); }

/* 7 · Pricing as three tiles */
.prices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.price { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.5rem; border-radius: 8px; background: var(--raised); border-top: 8px solid var(--edge); }
.price h3 { font-size: 1.5rem; }
.price .amount { font: 500 2.25rem/1 var(--mono); margin: 0; }
.price .per { font-size: var(--s-1); color: var(--text-2); margin: 0; }
.price ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; font-size: 0.9375rem; color: var(--text-2); }
.price .button { margin-top: auto; align-self: flex-start; }
.price.founding { background: var(--action); color: #fff; border-top-color: #10201b; }
.price.founding .per, .price.founding ul { color: #fff; }
.price.founding .button { background: #10201b; color: #fff; }
.price.founding .button:hover { background: #0b1612; }
.price-note { margin-top: 1rem; font-size: var(--s-2); color: var(--text-3); }

/* 8 · Questions and waitlist */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4rem); margin: 0; }
.faq dt { font: 600 1.1875rem/1.25 var(--display); margin-bottom: 0.4rem; }
.faq dd { margin: 0; color: var(--text-2); max-width: 52ch; }
.closing { margin-top: clamp(3.5rem, 7vw, 5.5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.closing h2 { font-size: var(--s3); line-height: 1.05; margin-bottom: 1.25rem; }
.final-mosaic { padding: 0.875rem; background: var(--grout-deep); border-radius: 8px; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 5px; }
.final-mosaic span { aspect-ratio: 1 / 1; border-radius: 3px; }
.final-mosaic .g1 { background: #1b2e28; } .final-mosaic .g2 { background: #203630; } .final-mosaic .g3 { background: #1a2b26; }
.final-mosaic .line { background: var(--ochre); }
.final-mosaic .em { background: var(--emerald); } .final-mosaic .em2 { background: var(--action); } .final-mosaic .sea { background: var(--sea-glass); } .final-mosaic .sl { background: var(--slate); }
@media (prefers-color-scheme: light) {
  .final-mosaic .g1 { background: #d9ddd6; } .final-mosaic .g2 { background: #e9ebe5; } .final-mosaic .g3 { background: #dfe2dc; }
}
.final-caption { font-size: var(--s-2); color: var(--text-3); margin-top: 0.6rem; }
.rot-a { transform: rotate(-0.8deg); } .rot-b { transform: rotate(0.6deg); } .rot-c { transform: rotate(-0.3deg); } .rot-d { transform: rotate(0.9deg); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--s-1); color: var(--text-3); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem 3rem; }
.site-footer p { max-width: 62ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; justify-items: start; }
.footer-links a { color: var(--text-2); }
.fineprint { grid-column: 1 / -1; font-size: 0.8125rem; }

/* Legal and utility pages */
.legal { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem); }
.legal article { max-width: 70ch; }
.legal h1 { font-size: var(--s4); line-height: 1; margin-bottom: 0.75rem; }
.legal .updated { color: var(--text-3); margin-bottom: 2rem; }
.legal h2 { font-size: var(--s2); line-height: 1.15; margin: 2.75rem 0 0.9rem; scroll-margin-top: 1rem; }
.legal h3 { font-size: var(--s1); margin: 1.75rem 0 0.6rem; }
.legal ul, .legal ol { padding-left: 1.3rem; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4rem; }
.legal .summary { background: var(--raised); border-top: 6px solid var(--emerald); border-radius: var(--radius); padding: 1.25rem 1.5rem 0.5rem; margin: 0 0 2rem; }
.toc { margin: 0 0 2.5rem; }
.toc h2 { font-size: var(--s1); margin: 0 0 0.6rem; }
.toc ol { columns: 2; column-gap: 2rem; margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.legal table { border-collapse: collapse; width: 100%; font-size: var(--s-1); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--line); }
.legal th { font-family: var(--display); font-weight: 700; }
.notfound { padding-block: clamp(3rem, 10vw, 8rem); }
.notfound h1 { font-size: var(--s4); line-height: 1; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 64rem) {
  .hero .wrap, .pieces, .dash-demo, .flip-demo, .closing, .section-head { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { gap: 2.5rem; }
  .assemble { align-items: stretch; }
  .assemble .ghost-button { align-self: flex-end; }
  .piece-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grout-demo { grid-template-columns: minmax(0, 1fr); }
  .seam { transform: rotate(90deg); }
  .prices { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 44rem) {
  .piece-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq, .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .toc ol { columns: 1; }
  .phase { font-size: 0.625rem; }
  .phases .span-2 { visibility: hidden; }
  .year { grid-template-rows: repeat(7, 7px); gap: 2px; }
  .phases { column-gap: 2px; }
}
@media (max-width: 26rem) {
  .piece-grid, .dash { grid-template-columns: minmax(0, 1fr); }
  .site-nav { gap: 0.25rem 1.1rem; }
}

@media print {
  .site-header nav, .skip, .waitlist, .ghost-button { display: none; }
}

.flip-copy h2 { font-size: var(--s3); line-height: 1.05; margin-bottom: 1.25rem; max-width: 16ch; }
.flip-copy p { color: var(--text-2); max-width: 42ch; }
@media (max-width: 44rem) {
  .board .tile { padding: 0.3rem; border-radius: 3px; overflow: hidden; }
  .board .tile .src { font-size: 0.5rem; }
  .board .tile .val { font-size: 0.625rem; }
}
