/* The guide pages' styles. The font, tokens and theme blocks first are copied from index.html (the tests check
 * they agree with the home page's in both themes); after them, the guide layout. Linked as guide.css?v=<the first
 * 12 hex digits of this file's SHA-256>, so change that link whenever this file changes (the tests say the value). */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url('fonts/archivo-latin-wdth.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --dash: #000000;
  --burgundy: #803333;
  --burgundy-light: #C46A6A;
  --linen: #DCDCD8;
  --linen-deep: #CFCFCA;
  --graphite: #3B3C3E;
  --gauge: #F2F2EE;
  --amber: #FFB000;
  --muted-dark: #A3A39E;
  --rule: #B9B9B4;
  --burgundy-hover: #6E2B2B;
  --burgundy-light-hover: #D48080;
  --text-on-dark: #C9C9C4;
  --rule-on-dark: #5A5A57;
  --rule-on-dark-strong: #6A6A66;
  --field-on-dark: #141414;
  --glass-edge: #1C1C1C;
  --glass-highlight: #2A2A2A;
  --amber-unlit: #090704;
  --scrim: rgba(0, 0, 0, 0.72);

  /* Page surfaces. The cabin sections (hero, build, signup) are black in both themes. */
  --page: var(--linen);
  --page-alt: var(--linen-deep);
  --ink: var(--dash);
  --ink-2: var(--graphite);
  --rule-strong: var(--dash);
  --accent-ink: var(--burgundy);
  --focus: var(--burgundy);
  --cabin-edge: transparent;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --measure: 34rem;
  color-scheme: light;
}
/* Dark theme: follows the system unless the visitor picked one with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #161718;
    --page-alt: #1F2022;
    --ink: #ECECE8;
    --ink-2: #A9AAA6;
    --rule: #3A3B3E;
    --rule-strong: #6A6A66;
    --accent-ink: #D48080;
    --focus: #ECECE8;
    --cabin-edge: #2E2F32;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #161718;
  --page-alt: #1F2022;
  --ink: #ECECE8;
  --ink-2: #A9AAA6;
  --rule: #3A3B3E;
  --rule-strong: #6A6A66;
  --accent-ink: #D48080;
  --focus: #ECECE8;
  --cabin-edge: #2E2F32;
  color-scheme: dark;
}
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
* { box-sizing: border-box; }
/* An in-page link lands below the sticky bar, not under it. */
html { scroll-padding-top: 4.5rem; }
[hidden] { display: none !important; }
::selection { background: var(--burgundy); color: var(--gauge); }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: var(--step-0); line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--page); }
.wrap { max-width: 76rem; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.08; }
h1 { font-size: var(--step-3); font-weight: 800; font-stretch: 125%; letter-spacing: -0.005em; max-width: 22ch; }
h2 { font-size: var(--step-2); font-weight: 800; font-stretch: 125%; }
h3 { font-size: var(--step-1); font-weight: 750; font-stretch: 112%; line-height: 1.2; }
p, li { text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: var(--gutter-l); top: -10rem; z-index: 20; background: var(--dash); color: var(--gauge); padding: 0.8rem 1.1rem; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 0.5rem); }
.skip:focus-visible { outline-color: var(--gauge); }
#main:focus { outline: none; }

/* The bar: the logo home, the theme switch and the sign-up, as on the home page. */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--page); border-bottom: 1px solid var(--rule-strong); }
.nav .wrap { display: flex; align-items: center; gap: 1rem; padding-block: 0.8rem 0.7rem; }
.nav .home { display: block; padding-block: 14.5px; margin-block: -14.5px; flex: 0 1 auto; min-width: 0; margin-right: auto; }
.nav img { height: 15px; width: auto; max-width: 100%; display: block; object-fit: contain; object-position: left center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  background: var(--burgundy); color: var(--gauge); border: 0; border-radius: 2px; cursor: pointer;
  font: 600 var(--step-0)/1 var(--sans); padding: 0.8rem 1.25rem; text-decoration: none;
}
.btn:hover { background: var(--burgundy-hover); color: var(--gauge); }
.nav .btn { position: relative; min-height: 0; padding: 0.55rem 0.9rem; font-size: var(--step--1); white-space: nowrap; flex: none; }
.nav .btn::after { content: ""; position: absolute; inset: -7px 0; }
.theme { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-block: -0.5rem; margin-right: -0.5rem; padding: 0; background: none; border: 0; border-radius: 2px; color: var(--ink); cursor: pointer; }
.theme:hover { background: var(--page-alt); }
.theme svg { fill: currentColor; }
.theme .i-sun { display: none; }
.is-dark .theme .i-sun { display: inline; }
.is-dark .theme .i-moon { display: none; }

/* The article: one column, with running text kept to the home page's line length. The fixes' rows run wider
 * so a name and its price share a line. */
.article { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); }
.article .wrap > * { max-width: 42rem; }
.article p, .article ul:not(.options) { max-width: var(--measure); }
.article header { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.article .lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.article .byline { color: var(--ink-2); }
.article section { display: grid; gap: 1rem; padding-block: clamp(1.75rem, 4vw, 2.5rem); border-top: 1px solid var(--rule); }
.article ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.article li::marker { color: var(--ink-2); }
/* Steps to follow in order, such as setting the clock: the lists above, numbered. */
.article ol.how { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; max-width: var(--measure); }
/* A photo in a guide's section, the column's width, with a short caption under it. Its own class, so /setup's step
 * photos keep their own rules. */
.article figure.shot { margin: 0; }
.article figure.shot img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--page-alt); }
.article figure.shot figcaption { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-2); }

/* The fixes, each a row: what it is and roughly what it costs, then how it goes. */
.article .options { list-style: none; padding: 0; gap: 0; border-top: 1px solid var(--rule-strong); }
.options > li { display: grid; gap: 0.6rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
/* The section's own rule follows the last row. */
.options > li:last-child { border-bottom: 0; padding-bottom: 0; }
.options .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.options .cost { font-stretch: 85%; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.options .where { font-size: var(--step--1); font-stretch: 85%; color: var(--ink-2); }

/* Chrono944's own section sits in the cabin, black in both themes, like the home page's. */
.cabin { color-scheme: dark; background: var(--dash); color: var(--gauge); padding-block: clamp(2.5rem, 6vw, 4rem); }
.cabin .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.cabin .copy { display: grid; gap: 1rem; max-width: 34rem; }
.cabin p { color: var(--text-on-dark); }
.cabin a:not(.btn) { color: var(--gauge); }
.cabin :focus-visible { outline-color: var(--gauge); }
.cabin .btn { justify-self: start; background: var(--burgundy-light); color: var(--dash); }
.cabin .btn:hover { background: var(--burgundy-light-hover); color: var(--dash); }
.cabin figure { margin: 0; }
.cabin img { display: block; width: 100%; height: auto; }
.cabin figcaption { margin-top: 0.6rem; font-size: var(--step--1); font-stretch: 85%; color: var(--muted-dark); }

footer { border-top: 1px solid var(--rule-strong); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-block: 1.5rem 2.5rem; font-size: var(--step--1); color: var(--ink-2); font-stretch: 85%; }
footer img { height: 12px; width: auto; display: block; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer a { white-space: nowrap; }
footer .wrap > span { text-wrap: balance; }

@media (max-width: 860px) {
  .cabin .wrap { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the photo comes first, so the reader sees the clock before the pitch. */
  .cabin figure { order: -1; }
}
@media (max-width: 520px) {
  .nav .wrap { gap: 0.5rem; }
  .nav .btn { padding-inline: 0.75rem; }
  /* The home page's closer crop on phones, so the clock reads at this size. */
  .cabin figure { overflow: hidden; }
  .cabin img { width: 200%; max-width: none; margin-left: -46%; }
}

/* ---- /setup (setup/ renders it; see CLAUDE.md, "Setup page"). Tokens only; nothing new on :root. ---- */

/* Read by screen readers, not shown: e.g. the ". " that keeps "1" and "Get the app" apart. */
.setup .vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The three steps done in order carry their number, set wide like the heading itself, so they never read as
 * more of the fitting list's condensed numbers. */
.setup h2 { display: flex; align-items: baseline; gap: 0.6rem; }
.setup h2 .num { font-variant-numeric: tabular-nums; color: var(--accent-ink); }

/* The app: one row per platform that has a link, drawn like the clock guide's options (name left, what it needs
 * right). The visitor's own platform comes first, with a little more room; the other stays, smaller, under it.
 * Every store badge stands the same height, whichever comes first: Google asks that its badge be no smaller than
 * any other. */
.article ul.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 42rem; border-top: 1px solid var(--rule-strong); }
.app { --badge-h: 44px; display: grid; gap: 0.6rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
/* The section's own rule follows the last row, as under the guide's options. */
.apps > .app:last-child { border-bottom: 0; padding-bottom: 0; }
.app .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.app .needs { font-stretch: 85%; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.app .btn { justify-self: start; }
.app.primary { padding-block: 1.5rem; }
.apps.has-primary .app:not(.primary) { gap: 0.4rem; padding-block: 1rem; font-size: var(--step--1); }
.apps.has-primary .app:not(.primary) h3 { font-size: var(--step-0); }
/* The other platform's app, not out yet: a quiet line under the rows, not a row of its own. */
.app-later { color: var(--ink-2); }

/* The stores' official badges, unaltered, sized so both visible badges stand --badge-h tall. Google's file holds
 * its 564 x 168 badge inside a 41 px transparent margin (the badge is 67.2% of the file's height); a negative
 * margin of 41/168 of the badge takes that back, so the link's focus ring hugs the badge itself. */
.badge { justify-self: start; display: inline-flex; line-height: 0; border-radius: 7px; }
.badge-ios { height: var(--badge-h); width: auto; }
.badge-android { height: calc(var(--badge-h) / 0.672); width: auto; margin: calc(var(--badge-h) * -0.2440); }
.setup .fine { font-size: var(--step--1); font-stretch: 85%; color: var(--ink-2); }

/* Fitting. Big condensed numbers in their own gutter, findable from the passenger seat; extra room where the work
 * moves to a new part of the dash; the instruction first so it reads without the photo, then the photo. */
.article .fit-steps { list-style: none; margin: 0; padding: 0; max-width: 42rem; counter-reset: step; }
.fit-steps > li { counter-increment: step; position: relative; padding-left: 2.75rem; }
.fit-steps > li + li { margin-top: 2rem; }
.fit-steps > li.stage { margin-top: 3.5rem; }
.fit-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -0.2rem; width: 2rem; text-align: right;
  font-size: var(--step-2); line-height: 1; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; color: var(--accent-ink);
}
/* The figure reset comes before the spacing below, which has the same specificity, so a step's photos keep their
 * gap from its instruction and from each other. */
.fit-steps figure, .fit-end figure { margin: 0; }
.fit-steps > li > * + * { margin-top: 0.75rem; }
.fit-steps > li > .hint { margin-top: 0.5rem; }
/* A tip or caution with its step: the step's own text, heavier and in the step number's burgundy (6:1 or better in
 * both themes), so it's read before the hands move. */
.fit-steps .hint, .fit-end .hint { font-weight: 600; color: var(--accent-ink); }
.fit-steps img, .fit-end img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--page-alt); }
/* The closing row: putting it back together, as heavy as a step, then the owner's tip and Chrono944 lit up in the
 * dash. It sits in line with the steps' text and photos, past the numbers' gutter. */
.fit-end { display: grid; gap: 0.75rem; max-width: 42rem; margin-top: 2.5rem; padding-top: 1.5rem; padding-left: 2.75rem; border-top: 1px solid var(--rule-strong); }
.fit-end p:not(.hint) { font-size: var(--step-1); font-weight: 700; line-height: 1.35; }

@media (max-width: 520px) {
  .app.primary .btn { justify-self: stretch; }
  /* On a phone the photos run to the screen's edges, so the parts the arrows point at are as big as they can be. */
  .fit-steps figure { margin-left: calc(-2.75rem - var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); }
  .fit-end { padding-left: 0; }
  .fit-end figure { margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); }
  .fit-steps img, .fit-end img { border-radius: 0; }
}
