/*
 * timez for the web — the layout.
 *
 * Phone-first per ../../MOBILE_FIRST_STANDARD.md: everything below is the
 * 320px layout, and every rule that widens it is a `min-width` query. There
 * is not a single `max-width` media query in this file.
 *
 * Tokens and metrics come from docs/DESIGN_HANDOFF_PLATFORMS.md and the web
 * handoff that accompanies it. The band's geometry is NOT in here — it is
 * computed in app.js from the band's measured width, because the handoff's
 * one instruction about responsiveness is that the band reflows rather than
 * scales.
 */

/* ── Tokens ──
 *
 * Light is the CSS default and dark arrives two ways: from the system, unless
 * the visitor has explicitly chosen light, and from an explicit choice of
 * dark. Written in that order so an override always wins over the system
 * without either rule needing `!important`.
 */
:root {
  --accent: #FF9430;
  --accent-soft: rgba(255, 148, 48, 0.35);
  --accent-ring: rgba(255, 148, 48, 0.16);

  --working: #30D158;
  --awake: #FF9F0A;
  --asleep: rgba(142, 142, 147, 0.75);

  --page: #E8E8EA;
  --app: #FFFFFF;
  --ink: #1C1C1E;
  --sub: #6C6C70;
  --line: #E3E3E6;
  --card: rgba(0, 0, 0, 0.035);
  --wash: rgba(0, 0, 0, 0.075);
  --ground: #F2F2F2;
  --held: #EAEAEA;
  --waking: #EAEAEA;
  --work-lift: #E0E0E0;
  --bar: #C8C8C8;
  --hairline: #D8D8DA;
  --accent-text: #B35A00;
  --field: #E7E7EA;
  --handle-shadow: rgba(0, 0, 0, 0.22);

  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --page: #141416;
    --app: #0C0C0D;
    --ink: #F2F2F7;
    --sub: #8E8E93;
    --line: #1F1F21;
    --card: rgba(255, 255, 255, 0.045);
    --wash: rgba(255, 255, 255, 0.10);
    --ground: #0E0E10;
    --held: #19191C;
    --waking: #161619;
    --work-lift: #1E1E22;
    --bar: #4E4E52;
    --hairline: #28282B;
    --accent-text: #FF9430;
    --field: #1F1F22;
    --handle-shadow: rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme='dark'] {
  --page: #141416;
  --app: #0C0C0D;
  --ink: #F2F2F7;
  --sub: #8E8E93;
  --line: #1F1F21;
  --card: rgba(255, 255, 255, 0.045);
  --wash: rgba(255, 255, 255, 0.10);
  --ground: #0E0E10;
  --held: #19191C;
  --waking: #161619;
  --work-lift: #1E1E22;
  --bar: #4E4E52;
  --hairline: #28282B;
  --accent-text: #FF9430;
  --field: #1F1F22;
  --handle-shadow: rgba(0, 0, 0, 0.35);
}

/* ── Reset ── */

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  /* The band is a horizontal drag. Without this, a drag near the top of a
   * phone screen is a pull-to-refresh and the scrubber never sees it. */
  overscroll-behavior-y: contain;
}

button { font: inherit; color: inherit; }

/* The UA's own `[hidden] { display: none }` is a plain, unlayered rule, so ANY
 * explicit `display` in this file outranks it and the element renders anyway.
 * That already bit the reset pill (`display: inline-flex`) and the DST line
 * (`display: block`), both of which set `hidden` in JS and both of which kept
 * drawing. `!important` is the documented fix rather than a shortcut — it is
 * the only way to say "hidden means hidden" once without auditing every
 * `display` added later.
 *
 * Anything that needs to hold its space while invisible uses a class, not
 * `hidden` — see `.dot--ghost`. */
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── The stage ──
 *
 * On a phone the app IS the page: full bleed, no frame, no shadow. The frame
 * only appears once there is room around it to be a frame.
 */

.stage {
  max-width: 1160px;
  margin: 0 auto;
  background: var(--app);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1240px) {
  body { padding: 28px 20px 40px; }
  .stage {
    min-height: 0;
    border-radius: 12px;
    /* `clip`, NOT `hidden`. Both round the corners, but `hidden` makes this a
     * scroll container, and a scroll container is exactly what stops the
     * dock's `position: sticky` from sticking. */
    overflow: clip;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  }
  :root[data-theme='dark'] .stage { box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35); }
}

/* ── Header ──
 *
 * Two rows on a phone and one wherever there is room: the wordmark and the
 * readout share the first, and the anchor's city names take the whole of the
 * second rather than fighting the clock for the middle. The date is NOT here
 * any more — the day strip under the band owns it, because the band is the
 * thing drawing that day.
 */

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 16px 10px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-top: max(10px, env(safe-area-inset-top));
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* A link home needs the 44px floor. Taken as height with a matching
   * negative margin so the wordmark sits where it always did. */
  min-height: 44px;
  margin: -8px 0;
}

.wordmark-back {
  flex: 0 0 auto;
  color: var(--sub);
  transition: transform 0.15s ease;
}

.wordmark:hover .wordmark-back { transform: translateX(-2px); }

.anchor-name {
  flex: 1 0 100%;
  order: 3;
  font-size: 12px;
  color: var(--sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: -2px;
}

.readout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.anchor-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

/* Square, like every other control on the site. */
.pill {
  font-size: 12px;
  padding: 0 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent-text);
  white-space: nowrap;
}

@media (min-width: 720px) {
  .app-header { padding: 14px 20px 12px; }
  .anchor-time { font-size: 26px; }
}

/* ── The day strip ──
 *
 * The band draws one day. This says which, and moves it.
 */

.day-strip {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  border-top: 1px solid var(--hairline);
  background: var(--app);
  flex: 0 0 auto;
}

.day-step,
.day-label {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.day-step {
  width: 52px;
  flex: 0 0 auto;
  color: var(--sub);
}

.day-step:disabled { opacity: 0.25; cursor: default; }

.day-label {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 10px;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}

/* "today" is the resting state and says nothing; anything else is the thing
 * the strip exists to tell you, so it takes the accent. */
.day-relative { color: var(--sub); }
.day-label[data-today='false'] .day-relative { color: var(--accent-text); }
.day-label[data-today='true'] { cursor: default; }

/* ── The band ──
 *
 * Height, insets and the bar geometry are set from app.js against the
 * measured width. Only the things that never change live here.
 */

.band {
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  background: var(--ground);
  border-top: 1px solid var(--hairline);
  transition: background 0.18s ease, border-color 0.18s ease;
  flex: 0 0 auto;
}

.band[data-held='true'] {
  background: var(--held);
  border-top-color: var(--accent);
  cursor: grabbing;
}

.band-lift {
  position: absolute;
  top: 0;
  bottom: 0;
}

.band-lift--waking { background: var(--waking); }
.band-lift--working { background: var(--work-lift); }

.band-bars {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.band-bar {
  flex: 1;
  min-width: 0;
  background: var(--bar);
  transition: height 0.2s ease, background 0.12s ease;
}

.band-bar[data-near='now'] { background: var(--accent); }
.band-bar[data-near='close'] { background: var(--accent-soft); }

.band-hour {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--sub);
  opacity: 0.75;
  pointer-events: none;
}

.band-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.band-handle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 4px var(--handle-shadow);
  transition: width 0.22s ease, height 0.22s ease, left 0.22s ease,
    top 0.22s ease, box-shadow 0.22s ease;
}

.band[data-held='true'] .band-handle {
  box-shadow: 0 0 0 12px var(--accent-ring);
}

/* ── The dock ──
 *
 * The day strip and the band, at the bottom edge, where every native surface
 * puts them. Sticky rather than merely last: the card grid grows with the
 * list, and the scrubber is the product — it must not be a thing you scroll
 * away from.
 *
 * It needs its own background. A sticky element is painted over the content
 * that scrolls beneath it, and a transparent one would let the cards through.
 */

.dock {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--app);
  flex: 0 0 auto;
  /* The home indicator on a notched phone sits where the band's bottom edge
   * would otherwise be. */
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── Cards ── */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  flex: 1 1 auto;
  align-content: start;
}

@media (min-width: 560px) {
  .grid {
    /* 260, not the handoff's 232. The handoff's card had no per-city
     * controls; with an edit and a remove on every line, 232 left "New York
     * City" as "New Y…" at four columns, and a row whose identity is
     * ellipsised is the one thing §2 will not have. */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    padding: 20px;
  }
}

.card {
  padding: 16px 18px 18px;
  border-radius: 12px;
  cursor: pointer;
  background: var(--card);
  box-shadow: inset 0 0 0 1px transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  border: 0;
  width: 100%;
  display: block;
  font: inherit;
  color: inherit;
}

.card[data-anchored='true'] {
  background: var(--wash);
  box-shadow: inset 0 0 0 1px rgba(255, 148, 48, 0.4);
}

.card[data-state='asleep'] { opacity: 0.72; }

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.card[data-anchored='true'] .card-time { font-weight: 600; }

.card-day {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sub);
  padding-top: 3px;
}

.card-codes {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--sub);
  margin-top: 8px;
}

.card-dst {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #FFB340;
}

.card-cities {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}

.city {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.city-flag { font-size: 13px; line-height: 1; flex: 0 0 auto; }

.city-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card[data-anchored='true'] .city-name { font-weight: 600; }

.city-wx {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.card[data-state='asleep'] .city-wx { opacity: 0.45; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-left: auto;
  box-sizing: border-box;
}

/* Invisible but still occupying its place: only the first line of a card
 * carries the state dot, and the rest reserve the space so a row cannot
 * change width mid-scrub. This is NOT `hidden` — that now means gone. */
.dot--ghost { visibility: hidden; }
.dot[data-state='working'] { background: var(--working); }
.dot[data-state='awake'] {
  border: 1.5px solid var(--awake);
  background: linear-gradient(90deg, var(--awake) 50%, transparent 50%);
}
.dot[data-state='asleep'] { border: 1.5px solid var(--asleep); }

/* ── Per-city controls ──
 *
 * Edit and remove, on the line they act on. They replace a single × that
 * removed the whole offset group — silent, unconfirmed, and unrecoverable on
 * a list that syncs nowhere.
 *
 * Both are 44px of target around a small glyph, with negative margins so the
 * ink sits where it looks like it should and the finger gets the room
 * MOBILE_FIRST_STANDARD asks for.
 */

.city-edit,
.city-remove {
  flex: 0 0 auto;
  width: 28px;
  height: 44px;
  margin-top: -13px;
  margin-bottom: -13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sub);
  cursor: pointer;
  opacity: 0.45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.12s ease;
}

.city-remove {
  font-size: 17px;
  line-height: 1;
  margin-right: -10px;
}

.city-edit:hover,
.city-remove:hover,
.city-edit:focus-visible,
.city-remove:focus-visible { opacity: 1; }

/* The dot is pushed right by `margin-left:auto`; the controls follow it, so
 * the gap before them is theirs rather than the dot's. */
.city .dot + .city-edit { margin-left: 4px; }

/* ── The editor ── */

.editor::backdrop { background: rgba(0, 0, 0, 0.45); }

.editor {
  border: 0;
  padding: 0;
  background: var(--app);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  margin: auto auto 0;
  border-radius: 16px 16px 0 0;
  max-height: 88dvh;
  overflow: hidden;
}

.editor[open] {
  display: flex;
  flex-direction: column;
}

.editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.editor-badge { font-size: 20px; line-height: 1; flex: 0 0 auto; }

.editor-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-body {
  padding: 4px 16px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.editor-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--sub);
  margin: 18px 0 8px;
}

.editor-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--sub);
}

.editor-flag { display: flex; gap: 8px; align-items: stretch; }

.editor-emoji {
  flex: 0 0 auto;
  width: 84px;
  text-align: center;
  font-size: 20px;
}

.editor-country {
  flex: 1 1 auto;
  min-width: 0;
  /* 16px or iOS zooms the page when the select takes focus. */
  font-size: 16px;
  font-family: var(--sans);
  padding: 11px 12px;
  min-height: 44px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}

.editor-zone {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
}

.editor-zone-results {
  max-height: 34dvh;
  padding: 4px 0 0;
}

.editor-zone-results:empty { display: none; }

.editor-remove {
  margin-top: 26px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  /* The one destructive control on the page, and the only red in the app.
   * It reads as a warning in greyscale too, because it is the only outlined
   * control that is not the accent. */
  color: #E5484D;
  cursor: pointer;
}

:root[data-theme='dark'] .editor-remove,
:root:not([data-theme='light']) .editor-remove { color: #FF6369; }

@media (min-width: 640px) {
  .editor {
    margin: auto;
    max-width: 460px;
    border-radius: 14px;
    max-height: 80dvh;
  }
}

/* ── Create, in the finder ── */

.finder-create {
  flex: 0 0 auto;
  margin: 0 16px 8px;
  min-height: 44px;
  padding: 0 14px;
  font-size: 14px;
  text-align: left;
  border: 1px dashed var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--accent-text);
  cursor: pointer;
}

.finder-tracked {
  margin-left: 8px;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--sub);
  opacity: 0.8;
}

.empty {
  grid-column: 1 / -1;
  padding: 40px 4px;
  text-align: center;
  color: var(--sub);
  font-size: 14px;
}

/* ── Footer ── */

.app-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 16px 14px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 0 14px;
  /* 44, not the 34 the ink wants. MOBILE_FIRST_STANDARD's floor is about the
   * finger, not the type, and this is the control a thumb reaches for most. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  color: var(--sub);
  border: 1px solid var(--line);
}

.chip--primary { color: var(--accent-text); border-color: var(--accent-text); }

@media (min-width: 720px) {
  .app-footer { padding: 4px 20px 16px; }
}

/* ── Add-a-city sheet ──
 *
 * A bottom sheet on a phone and a centred dialog once there is room. Both are
 * the same <dialog>; only the box moves.
 */

.finder::backdrop { background: rgba(0, 0, 0, 0.45); }

/* No `display` on the base rule. A <dialog> is hidden by the UA's own
 * `display: none`, and any display declared here outranks it — which renders
 * the sheet inline, in the page flow, on top of whatever it lands on. The
 * layout belongs on [open] and nowhere else. */
.finder {
  border: 0;
  padding: 0;
  background: var(--app);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  margin: auto auto 0;
  border-radius: 16px 16px 0 0;
  max-height: 85dvh;
  overflow: hidden;
}

.finder[open] {
  display: flex;
  flex-direction: column;
}

.finder-head {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
  align-items: center;
}

/* 16px minimum or iOS zooms the whole page on focus. */
.finder-input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-family: var(--sans);
  padding: 11px 14px;
  min-height: 44px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}

.finder-close {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-size: 14px;
  cursor: pointer;
}

.finder-results {
  list-style: none;
  margin: 0;
  padding: 0 8px max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.finder-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  font-size: 15px;
}

.finder-result:hover { background: var(--card); }
.finder-result[aria-selected='true'] { background: var(--wash); }

.finder-result .sub {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sub);
  flex: 0 0 auto;
}

.finder-empty { padding: 20px 16px; color: var(--sub); font-size: 14px; }

@media (min-width: 640px) {
  .finder {
    margin: auto;
    max-width: 460px;
    border-radius: 14px;
    max-height: 70dvh;
  }
}

/* ── The note ──
 *
 * The sync boundary, in its own band above the sign-up. It is ours; the
 * sign-up below is the marketing page's and nothing of ours goes in it.
 */

.note-band {
  background: var(--page);
  border-top: 1px solid var(--line);
  padding: 26px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.note-inner { max-width: 640px; margin: 0 auto; }

.sync-note {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--sub);
}

.sync-note strong { color: var(--ink); font-weight: 600; }
.sync-note a { color: var(--accent-text); }

.sync-warning { margin-top: -6px; }

.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.note-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.note-link:hover { text-decoration: underline; }

@media (min-width: 640px) {
  .note-band { padding: 34px 20px; }
}

/* ── The sign-up banner ──
 *
 * A copy of the marketing page's, and the values below are ITS values — the
 * #1A1A1C ground, Archivo, #3A3A3E 2px square fields, #FF9430 on #1A1A1C for
 * the submit. It does NOT use this file's light/dark tokens, on purpose: the
 * banner is the same banner in both appearances, exactly as it is on the
 * marketing page, and theming it here would make the two diverge the first
 * time somebody viewed the app in light mode.
 *
 * Change the marketing page's version and change this one.
 */

.signup {
  background: #1A1A1C;
  color: #F2F2F2;
  font-family: Archivo, var(--sans);
  padding: 40px 16px 48px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}

.signup-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}

.signup-copy { flex: 1 1 380px; min-width: 0; }
.signup-form { flex: 1 1 420px; min-width: 0; max-width: 520px; }

.signup-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #FF9430;
  margin-bottom: 20px;
}

.signup-title {
  font-family: Archivo, var(--sans);
  font-size: clamp(32px, 7vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0 0 18px;
  text-wrap: balance;
}

.signup-lede {
  font-size: 18px;
  line-height: 1.5;
  max-width: 26em;
  margin: 0;
  color: #B8B8BC;
  text-wrap: pretty;
}

.signup-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: #8E8E93;
}

.signup-platforms + .signup-label,
.signup-input + .signup-label { margin-top: 24px; }

.signup-input {
  width: 100%;
  height: 48px;
  border: 2px solid #3A3A3E;
  border-radius: 0;
  background: transparent;
  color: #F2F2F2;
  font-family: Archivo, var(--sans);
  /* 16px, not the marketing page's 16px by coincidence — it is the floor that
   * stops iOS zooming the page when the field takes focus. */
  font-size: 16px;
  padding: 0 14px;
  outline: none;
}

.signup-input::placeholder { color: #6C6C70; }
.signup-input:focus { border-color: #FF9430; }

.signup-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.signup-platform {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
  /* The marketing page's is 10px 6px; this carries a 44px floor as well,
   * because this one is read on a phone far more often than that one. */
  padding: 10px 6px;
  min-height: 44px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-family: Archivo, var(--sans);
  cursor: pointer;
  border: 2px solid #3A3A3E;
  border-radius: 0;
  background: transparent;
  color: #C7C7CC;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.signup-platform[aria-pressed='true'] {
  background: #FF9430;
  border-color: #FF9430;
  color: #1A1A1C;
}

.signup-submit {
  display: inline-block;
  margin-top: 26px;
  padding: 16px 26px;
  min-height: 52px;
  background: #FF9430;
  color: #1A1A1C;
  font-family: Archivo, var(--sans);
  font-size: 18px;
  font-weight: 700;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  width: 100%;
}

.signup-submit[disabled] { opacity: 0.6; cursor: progress; }

.signup-error {
  margin-top: 12px;
  font-size: 14px;
  color: #FF9430;
}

.signup-sent {
  border: 2px solid #FF9430;
  padding: 24px;
}

.signup-sent-title {
  font-family: Archivo, var(--sans);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.signup-sent-detail {
  font-size: 16px;
  line-height: 1.5;
  color: #B8B8BC;
}

@media (min-width: 640px) {
  .signup { padding: 56px 20px 64px; }
  .signup-submit { width: auto; }
}

@media (min-width: 900px) {
  .signup-inner { gap: 56px; }
}

/* ── Motion ── */

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
