/*
 * gydeinfo.com: page styles built only from the brand tokens in /brand/tokens.css
 * (source of truth: docs/brand/BRAND.md). Light by default, dark under
 * prefers-color-scheme. No third-party requests.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--gyde-bg);
  color: var(--gyde-text);
  font-family: var(--gyde-font-sans);
  font-size: var(--gyde-text-body-size);
  line-height: var(--gyde-text-body-leading);
}

a {
  color: var(--gyde-brand-text);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 2px;
  border-radius: var(--gyde-radius-xs);
}

/* Logo swap: the on-light art by default, on-dark art in dark mode. */
.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }
  .logo-dark {
    display: inline;
  }
}

/* ---- Home: see the end of this file ---- */

/* ---- Legal and support pages ---- */

.page-header,
main.page,
.site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding-left: var(--gyde-space-5);
  padding-right: var(--gyde-space-5);
}

.page-header {
  padding-top: var(--gyde-space-8);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: var(--gyde-space-2);
  color: var(--gyde-text);
  text-decoration: none;
  font-weight: var(--gyde-weight-bold);
  font-size: var(--gyde-text-heading-size);
}

.brand-link img {
  width: 28px;
  height: 28px;
}

h1 {
  margin: var(--gyde-space-7) 0 var(--gyde-space-2);
  font-family: var(--gyde-font-serif);
  font-weight: var(--gyde-weight-medium);
  font-size: var(--gyde-text-display-size);
  line-height: var(--gyde-text-display-leading);
  letter-spacing: var(--gyde-text-display-tracking);
}

h2 {
  margin: var(--gyde-space-8) 0 var(--gyde-space-2);
  font-size: var(--gyde-text-title-size);
  line-height: var(--gyde-text-title-leading);
  letter-spacing: var(--gyde-text-title-tracking);
  font-weight: var(--gyde-weight-bold);
}

h3 {
  margin: var(--gyde-space-6) 0 var(--gyde-space-1);
  font-size: var(--gyde-text-heading-size);
  line-height: var(--gyde-text-heading-leading);
  font-weight: var(--gyde-weight-semibold);
}

.meta {
  margin: 0;
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
  font-variant-numeric: tabular-nums;
}

main.page {
  padding-top: var(--gyde-space-5);
  padding-bottom: var(--gyde-space-10);
}

main.page p,
main.page li {
  max-width: 64ch;
}

main.page li + li {
  margin-top: var(--gyde-space-2);
}

.callout {
  margin: var(--gyde-space-6) 0;
  padding: var(--gyde-space-5) var(--gyde-space-6);
  background: var(--gyde-surface);
  border: var(--gyde-border-width) solid var(--gyde-border);
  border-radius: var(--gyde-radius-xl);
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: var(--gyde-space-2);
  color: var(--gyde-text-muted);
}

.site-footer {
  padding-top: var(--gyde-space-6);
  padding-bottom: var(--gyde-space-9);
  border-top: var(--gyde-border-width) solid var(--gyde-border);
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gyde-space-2) var(--gyde-space-5);
  margin: 0 0 var(--gyde-space-3);
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--gyde-text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ======================================================================
 * Home (index.html). Every rule is scoped to body.home so the legal
 * pages above keep their own type. The art is the mark's idea at page
 * scale: a horizon line with the sun just clearing it. Flat fills only;
 * Daybreak itself is kept for the one primary button per view and the
 * "noticed" dot.
 * ====================================================================== */

.home {
  --wrap: 1160px;
  --gutter: var(--gyde-space-5);
  --section-pad: clamp(4rem, 2.5rem + 5vw, 7rem);
  --sun: var(--gyde-daybreak-100);
  --bezel: #1E2124;
  overflow-x: clip;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home {
    --sun: var(--gyde-brand-subtle);
  }
}

[data-theme="dark"] .home,
.home [data-theme="dark"] {
  --sun: var(--gyde-brand-subtle);
}

@media (min-width: 640px) {
  .home {
    --gutter: var(--gyde-space-6);
  }
}

@media (min-width: 1024px) {
  .home {
    --gutter: var(--gyde-space-7);
  }
}

.home .wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

.home img {
  display: block;
  max-width: 100%;
}

/* The logo swap at the top of this file, restated to beat `.home img`. */
.home .logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .home .logo-light {
    display: none;
  }
  .home .logo-dark {
    display: block;
  }
}

/* ---- Type ---- */

.home .eyebrow {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-eyebrow-size);
  line-height: var(--gyde-text-eyebrow-leading);
  letter-spacing: var(--gyde-text-eyebrow-tracking);
  font-weight: var(--gyde-weight-bold);
  text-transform: uppercase;
}

.home .display {
  font-family: var(--gyde-font-serif);
  font-weight: var(--gyde-weight-medium);
  font-size: clamp(2.75rem, 1.5rem + 4.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.home .section-title {
  font-family: var(--gyde-font-serif);
  font-weight: var(--gyde-weight-medium);
  font-size: clamp(2rem, 1.45rem + 2vw, 2.875rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.home .lede {
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.5;
  color: var(--gyde-text-muted);
  max-width: 34em;
  text-wrap: pretty;
}

.home .body-lg {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--gyde-text-muted);
  text-wrap: pretty;
}

.home h3 {
  font-size: var(--gyde-text-heading-size);
  line-height: var(--gyde-text-heading-leading);
  font-weight: var(--gyde-weight-semibold);
}

.home .muted {
  color: var(--gyde-text-muted);
}

.home .small {
  font-size: var(--gyde-text-footnote-size);
  line-height: var(--gyde-text-footnote-leading);
}

.home .tnum {
  font-variant-numeric: tabular-nums;
}

.home .text-link {
  font-weight: var(--gyde-weight-semibold);
}

/* ---- Buttons (BRAND.md §8), shared by the home page and the flow pages ---- */

:is(.home, .flow) .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--gyde-control-lg);
  padding: 0 1.375rem;
  border: var(--gyde-border-width) solid transparent;
  border-radius: var(--gyde-radius-md);
  font-family: var(--gyde-font-sans);
  font-size: 1.0625rem;
  font-weight: var(--gyde-weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    border-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    color var(--gyde-duration-fast) var(--gyde-ease-standard);
}

:is(.home, .flow) .btn:focus-visible {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 2px;
  border-radius: var(--gyde-radius-md);
}

:is(.home, .flow) .btn-primary {
  background: var(--gyde-brand);
  color: var(--gyde-on-brand);
}

:is(.home, .flow) .btn-primary:hover {
  background: var(--gyde-brand-hover);
}

:is(.home, .flow) .btn-primary:active {
  background: var(--gyde-brand-pressed);
}

:is(.home, .flow) .btn-secondary {
  border-color: var(--gyde-border-strong);
  color: var(--gyde-text);
}

:is(.home, .flow) .btn-secondary:hover {
  background: var(--gyde-surface);
}

:is(.home, .flow) .btn-ghost {
  color: var(--gyde-brand-text);
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

:is(.home, .flow) .btn-ghost:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

:is(.home, .flow) .btn-sm {
  min-height: var(--gyde-control-sm);
  padding: 0 0.875rem;
  border-radius: var(--gyde-radius-sm);
  font-size: 0.9375rem;
}

:is(.home, .flow) .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gyde-space-3) var(--gyde-space-2);
}

/* ---- Skip link ---- */

.skip-link {
  position: absolute;
  left: var(--gyde-space-4);
  top: -100px;
  z-index: 20;
  padding: var(--gyde-space-2) var(--gyde-space-4);
  background: var(--gyde-surface-raised);
  color: var(--gyde-text);
  border-radius: var(--gyde-radius-sm);
  box-shadow: var(--gyde-elevation-2);
}

.skip-link:focus {
  top: var(--gyde-space-3);
}

/* ---- Header ---- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--gyde-bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gyde-space-4);
  min-height: 4rem;
}

.home-brand {
  display: inline-flex;
  border-radius: var(--gyde-radius-sm);
}

.home-brand .lockup {
  width: auto;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gyde-space-6);
}

.nav-links a:not(.btn) {
  display: none;
  color: var(--gyde-text-muted);
  font-size: 0.9375rem;
  font-weight: var(--gyde-weight-medium);
  text-decoration: none;
  transition: color var(--gyde-duration-fast) var(--gyde-ease-standard);
}

.nav-links a:not(.btn):hover {
  color: var(--gyde-text);
}

@media (min-width: 760px) {
  .nav-links a:not(.btn) {
    display: inline;
  }
}

/* ---- Phone frame around the real app captures ---- */

/* :where() keeps this at one class, so each .phone-* size below wins. */
:where(.home) .phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  background: var(--bezel);
  border-radius: calc(var(--w) * 0.165);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--gyde-text) 10%, transparent),
    var(--gyde-elevation-3);
}

.home .phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.135);
  background: var(--gyde-paper-50);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--gyde-border-width) solid var(--gyde-border-strong);
}

.hero-grid {
  display: grid;
  gap: var(--gyde-space-9);
  padding-top: clamp(2.5rem, 1rem + 5vw, 5rem);
}

.hero-copy {
  display: grid;
  gap: var(--gyde-space-5);
  align-content: center;
}

.hero-copy .actions {
  margin-top: var(--gyde-space-2);
}

.hero .fine {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
}

/* Narrow phones: "Get started" and the App Store button each take a line. */
@media (max-width: 420px) {
  .hero-copy .actions .btn,
  .closing .actions .btn {
    flex: 1 1 auto;
  }
}

.hero-art {
  position: relative;
  height: clamp(440px, 60vw, 600px);
}

.home .sun {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: clamp(420px, 70vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  translate: -50% 42%;
  pointer-events: none;
}

.phone-hero {
  --w: clamp(250px, 34vw, 310px);
  position: absolute;
  top: var(--gyde-space-7);
  left: 50%;
  translate: -50% 0;
}

.notif {
  position: absolute;
  top: 46%;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: var(--gyde-space-3);
  width: min(340px, 92%);
  padding: var(--gyde-space-3) var(--gyde-space-4) var(--gyde-space-3) var(--gyde-space-3);
  background: color-mix(in srgb, var(--gyde-surface-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: var(--gyde-border-width) solid var(--gyde-border);
  border-radius: 22px;
  box-shadow: var(--gyde-elevation-3);
  text-align: left;
}

.notif-icon {
  flex: none;
  width: 38px;
  height: 38px;
}

.notif-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notif-top {
  display: flex;
  justify-content: space-between;
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-caption-size);
  font-weight: var(--gyde-weight-semibold);
  letter-spacing: var(--gyde-text-caption-tracking);
  text-transform: uppercase;
}

.notif-top span + span {
  font-weight: var(--gyde-weight-medium);
  text-transform: none;
}

.notif-title {
  font-weight: var(--gyde-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.notif-body {
  font-size: var(--gyde-text-callout-size);
  line-height: var(--gyde-text-callout-leading);
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--gyde-space-7);
    min-height: min(720px, calc(100svh - 4rem));
    padding-top: 0;
  }

  .hero-copy {
    padding: var(--gyde-space-10) 0;
  }

  .hero-art {
    height: auto;
    min-height: 600px;
  }

  .home .hero .sun {
    left: 56%;
  }

  .phone-hero {
    top: auto;
    bottom: -150px;
    left: 58%;
  }

  .notif {
    top: auto;
    bottom: 230px;
    left: 0;
    translate: 0 0;
    width: 330px;
  }
}

/* ---- Sections ---- */

.home .section {
  padding: var(--section-pad) 0;
}

.home .band {
  background: var(--gyde-surface-sunken);
}

.section-head {
  display: grid;
  gap: var(--gyde-space-3);
  max-width: 40rem;
  margin-bottom: var(--gyde-space-9);
}

/* Ask your AI: the question as Gyde says it, then one plain link per assistant. */

.ask-ai .section-head {
  margin-bottom: var(--gyde-space-6);
}

.ask-prompt {
  max-width: 40rem;
  margin: 0 0 var(--gyde-space-6);
  padding-left: var(--gyde-space-4);
  border-left: 3px solid var(--gyde-brand);
  font-family: var(--gyde-font-serif);
  font-style: italic;
  font-size: var(--gyde-text-voice-sm-size);
  line-height: var(--gyde-text-voice-sm-leading);
}

.ask-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gyde-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* How it works: three points on one horizon; the last is the noticed dot. */

.steps {
  display: grid;
  gap: var(--gyde-space-8);
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  display: grid;
  gap: var(--gyde-space-2);
  padding-left: var(--gyde-space-9);
}

.steps li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  bottom: calc(-1 * var(--gyde-space-8));
  width: 1px;
  background: var(--gyde-border);
}

.steps li:last-child::before {
  display: none;
}

.step-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid var(--gyde-border-strong);
  background: var(--gyde-bg);
}

.step-dot-noticed {
  border-color: var(--gyde-brand);
  background: var(--gyde-brand);
}

.step-num {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-eyebrow-size);
  letter-spacing: var(--gyde-text-eyebrow-tracking);
  font-weight: var(--gyde-weight-bold);
  text-transform: uppercase;
}

.steps p:not(.step-num) {
  color: var(--gyde-text-muted);
  max-width: 34ch;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gyde-space-7);
  }

  .steps li {
    padding-left: 0;
    padding-top: var(--gyde-space-9);
  }

  .steps li::before {
    left: 17px;
    right: calc(-1 * var(--gyde-space-7));
    top: 8px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* Feature rows: words on one side, the app on the other. */

.feature-grid {
  display: grid;
  gap: var(--gyde-space-9);
  align-items: center;
}

.feature-copy {
  display: grid;
  gap: var(--gyde-space-5);
  max-width: 34rem;
}

.feature-copy .point {
  display: grid;
  gap: var(--gyde-space-2);
  padding-top: var(--gyde-space-5);
  border-top: var(--gyde-border-width) solid var(--gyde-border);
}

.feature-copy .point p {
  color: var(--gyde-text-muted);
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--gyde-space-11);
  }

  .feature-grid.flip > :first-child {
    order: 2;
  }
}

.verdicts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gyde-space-2);
  margin-top: var(--gyde-space-2);
  padding: 0;
  list-style: none;
}

.verdicts li {
  padding: 0.3rem 0.75rem;
  border: var(--gyde-border-width) solid var(--gyde-border);
  border-radius: var(--gyde-radius-full);
  background: var(--gyde-surface);
  font-size: var(--gyde-text-subhead-size);
  font-weight: var(--gyde-weight-medium);
}

.ticks {
  display: grid;
  gap: var(--gyde-space-3);
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: var(--gyde-space-6);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--gyde-border-strong);
}

/* Two phones: the plan behind, the coach's reading of it in front. */

.phone-pair {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 520 / 690;
  margin: 0 auto;
}

.phone-pair .phone {
  position: absolute;
}

.phone-back {
  --w: min(52vw, 268px);
  top: 0;
  left: 0;
}

.phone-front {
  --w: min(56vw, 290px);
  right: 0;
  bottom: 0;
}

/* One phone on a quiet stage. */

.stage {
  display: grid;
  place-items: center;
  padding: var(--gyde-space-9) var(--gyde-space-5);
  background: var(--gyde-surface-sunken);
  border-radius: var(--gyde-radius-2xl);
}

.band .stage {
  background: var(--gyde-bg);
}

.phone-solo {
  --w: clamp(240px, 64vw, 296px);
}

@media (min-width: 900px) {
  .phone-solo {
    --w: clamp(250px, 24vw, 296px);
  }
}

/* ---- The run card: the app's card, drawn in HTML from the same tokens ---- */

.note-figure {
  display: grid;
  gap: var(--gyde-space-3);
  width: min(100%, 460px);
  margin: 0 auto;
}

.note-figure figcaption {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
  text-align: center;
}

.app-card {
  display: grid;
  gap: var(--gyde-space-3);
  padding: var(--gyde-space-6);
  background: var(--gyde-surface);
  border-radius: var(--gyde-radius-xl);
  box-shadow: var(--gyde-elevation-2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .app-card {
    border: var(--gyde-border-width) solid var(--gyde-border);
    box-shadow: none;
  }
}

[data-theme="dark"] .app-card {
  border: var(--gyde-border-width) solid var(--gyde-border);
  box-shadow: none;
}

.app-card .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gyde-space-3);
}

.card-title {
  font-size: var(--gyde-text-heading-size);
  line-height: var(--gyde-text-heading-leading);
  font-weight: var(--gyde-weight-semibold);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gyde-space-4);
}

@media (min-width: 420px) {
  .metrics {
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    gap: var(--gyde-space-6);
  }
}

.metrics div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.metrics dt {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-caption-size);
  font-weight: var(--gyde-weight-medium);
}

.metrics dd {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-subhead-size);
  font-weight: var(--gyde-weight-medium);
  white-space: nowrap;
}

.metrics b {
  color: var(--gyde-text);
  font-size: 1.375rem;
  line-height: 1.15;
  font-weight: var(--gyde-weight-bold);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.note {
  display: grid;
  gap: var(--gyde-space-2);
  margin-top: var(--gyde-space-2);
  padding-top: var(--gyde-space-4);
  border-top: var(--gyde-border-width) solid var(--gyde-border);
}

.note-headline {
  font-family: var(--gyde-font-serif);
  font-weight: var(--gyde-weight-medium);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.note > p:not(.note-headline):not(.small) {
  font-size: var(--gyde-text-callout-size);
  line-height: var(--gyde-text-callout-leading);
}

/* The noticed reading: Ember text and the Daybreak dot (BRAND.md §5). */
.noticed {
  color: var(--gyde-brand-text);
  font-weight: var(--gyde-weight-semibold);
}

.noticed::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.3em;
  border-radius: 50%;
  background: var(--gyde-viz-noticed);
  vertical-align: 0.1em;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: var(--gyde-space-1);
  padding: 3px;
  background: var(--gyde-surface-sunken);
  border-radius: var(--gyde-radius-md);
}

.seg span {
  padding: 0.5rem 0.25rem;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: var(--gyde-weight-medium);
  text-align: center;
  color: var(--gyde-text-muted);
}

.seg .on {
  background: var(--gyde-surface-raised);
  color: var(--gyde-text);
  font-weight: var(--gyde-weight-semibold);
  box-shadow: 0 0 0 1px var(--gyde-border);
}

/* ---- Waitlist (WAITLIST on): the App Store buttons become this form ----
 * One field with the button inside it. Daybreak stays the button's; the
 * focus ring is the field's, so the two never compete. */

.home .join {
  width: 100%;
  max-width: 31rem;
  scroll-margin-top: 6rem;
}

.home .join-field {
  display: flex;
  align-items: stretch;
  gap: var(--gyde-space-2);
  padding: 6px;
  background: var(--gyde-surface-raised);
  border: var(--gyde-border-width) solid var(--gyde-border-strong);
  border-radius: calc(var(--gyde-radius-md) + 6px);
  box-shadow: var(--gyde-elevation-1);
  transition:
    border-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    box-shadow var(--gyde-duration-fast) var(--gyde-ease-standard);
}

.home .join-field:focus-within {
  border-color: var(--gyde-focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gyde-focus-ring) 30%, transparent);
}

.home .join-field.has-problem {
  border-color: var(--gyde-danger);
}

.home .join-field input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 var(--gyde-space-3);
  border: 0;
  background: transparent;
  color: var(--gyde-text);
  font-family: var(--gyde-font-sans);
  /* 17px: iOS zooms into a field under 16px. */
  font-size: 1.0625rem;
}

.home .join-field input::placeholder {
  color: var(--gyde-text-muted);
  opacity: 0.8;
}

.home .join-field input:focus {
  outline: none;
}

.home .join-field .btn {
  flex: none;
  min-height: 48px;
}

.home .join-fine,
.home .join-problem {
  margin-top: var(--gyde-space-3);
  font-size: var(--gyde-text-footnote-size);
  line-height: var(--gyde-text-footnote-leading);
}

.home .join-fine {
  color: var(--gyde-text-muted);
}

.home .join-problem {
  color: var(--gyde-danger);
  font-weight: var(--gyde-weight-medium);
}

.home .join-problem + .join-fine {
  margin-top: var(--gyde-space-1);
}

/* For bots only: off-screen, out of the tab order, hidden from readers. */
.home .join-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.home .join-done {
  padding: var(--gyde-space-4) var(--gyde-space-5);
  background: var(--gyde-surface-raised);
  border: var(--gyde-border-width) solid var(--gyde-border);
  border-radius: calc(var(--gyde-radius-md) + 6px);
  box-shadow: var(--gyde-elevation-1);
}

.home .join-done-title {
  display: flex;
  align-items: center;
  gap: var(--gyde-space-3);
  font-family: var(--gyde-font-serif);
  font-size: var(--gyde-text-voice-sm-size);
  line-height: var(--gyde-text-voice-sm-leading);
  font-weight: var(--gyde-weight-medium);
}

/* The mark's dot: the sun is up. */
.home .join-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gyde-brand);
}

.home .join-done-body {
  margin-top: var(--gyde-space-1);
  padding-left: calc(10px + var(--gyde-space-3));
  color: var(--gyde-text-muted);
}

.hero-copy .join {
  margin-top: var(--gyde-space-1);
}

.closing .join {
  margin: var(--gyde-space-2) auto 0;
  text-align: left;
}

.closing .join-fine,
.closing .join-problem {
  text-align: center;
}

/* Narrow phones: the button drops under the field, full width. */
@media (max-width: 420px) {
  .home .join-field {
    flex-direction: column;
  }

  .home .join-field .btn {
    width: 100%;
  }
}

/* ---- Closing band: dark in both themes, like the splash ---- */

.closing {
  position: relative;
  overflow: hidden;
  background: var(--gyde-surface-sunken);
  color: var(--gyde-text);
  padding: var(--section-pad) 0 calc(var(--section-pad) + 6rem);
  text-align: center;
}

/* The ground: drawn over the sun so it only shows above the horizon. */
.closing::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3rem;
  background: var(--gyde-surface-sunken);
  border-top: var(--gyde-border-width) solid var(--gyde-border-strong);
}

.home .sun-closing {
  bottom: 3rem;
  width: clamp(240px, 36vw, 420px);
  translate: -50% 72%;
}

.closing-inner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--gyde-space-5);
}

.closing-mark {
  width: 64px;
  height: 64px;
}

.closing .lede {
  max-width: 30em;
}

.closing .actions {
  justify-content: center;
  margin-top: var(--gyde-space-2);
}

/* ---- Footer ---- */

.home-footer {
  padding: var(--gyde-space-9) 0 var(--gyde-space-10);
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
}

.home-footer .wrap {
  display: grid;
  gap: var(--gyde-space-3);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gyde-space-4);
  margin-bottom: var(--gyde-space-3);
}

.home-footer .home-brand .lockup {
  height: 28px;
}

.home-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gyde-space-2) var(--gyde-space-5);
  padding: 0;
  list-style: none;
}

.home-footer a {
  color: var(--gyde-text-muted);
}

.home-footer p {
  max-width: 64ch;
}

/* ======================================================================
 * Flow pages: /start (sign-up on the web), /billing/done (back from
 * Stripe) and /admin. One narrow column of the brand's form controls
 * (BRAND.md §8); the buttons are the home page's, shared above. Scoped to
 * body.flow so nothing here reaches the home or the legal pages.
 * ====================================================================== */

.flow {
  --flow-width: 32rem;
  --gutter: var(--gyde-space-5);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

@media (min-width: 640px) {
  .flow {
    --gutter: var(--gyde-space-6);
  }
}

.flow-header,
.flow-main,
.flow .flow-footer {
  width: 100%;
  max-width: calc(var(--flow-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.flow .wide {
  --flow-width: 72rem;
}

/* The script shows one step at a time with the hidden attribute, which the
 * display rules below would otherwise override. */
.flow [hidden] {
  display: none !important;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gyde-space-4);
  padding-top: var(--gyde-space-6);
}

.flow-main {
  flex: 1;
  padding-top: var(--gyde-space-7);
  padding-bottom: var(--gyde-space-10);
}

.flow .flow-footer {
  flex: none;
}

.flow p {
  margin: 0;
}

.flow h1 {
  margin: 0;
  font-size: clamp(2.5rem, 1.9rem + 2.4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.flow h2 {
  margin: 0;
  font-family: var(--gyde-font-serif);
  font-weight: var(--gyde-weight-medium);
  font-size: var(--gyde-text-voice-size);
  line-height: var(--gyde-text-voice-leading);
  letter-spacing: var(--gyde-text-voice-tracking);
  text-wrap: balance;
}

.flow h2:focus,
.flow h1:focus {
  outline: none;
}

.flow .eyebrow {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-eyebrow-size);
  line-height: var(--gyde-text-eyebrow-leading);
  letter-spacing: var(--gyde-text-eyebrow-tracking);
  font-weight: var(--gyde-weight-bold);
  text-transform: uppercase;
}

.flow .lede {
  color: var(--gyde-text-muted);
  font-size: 1.125rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.flow .muted {
  color: var(--gyde-text-muted);
}

.flow .small {
  font-size: var(--gyde-text-footnote-size);
  line-height: var(--gyde-text-footnote-leading);
}

.flow .to {
  color: var(--gyde-text);
  font-weight: var(--gyde-weight-semibold);
  overflow-wrap: anywhere;
}

.flow .callout {
  margin: var(--gyde-space-6) 0 var(--gyde-space-4);
}

.flow-intro {
  display: grid;
  gap: var(--gyde-space-4);
  margin-bottom: var(--gyde-space-7);
}

.flow-intro .eyebrow {
  margin-top: var(--gyde-space-1);
}

.flow .invited {
  justify-self: start;
  padding: var(--gyde-space-2) var(--gyde-space-4);
  background: var(--gyde-brand-subtle);
  border-radius: var(--gyde-radius-full);
  font-size: var(--gyde-text-subhead-size);
  font-weight: var(--gyde-weight-semibold);
}

/* The agreement at sign-up: a real checkbox, its sentence as its label. */
.flow .agree {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--gyde-space-3);
  align-items: start;
  margin-top: var(--gyde-space-5);
  color: var(--gyde-text);
  font-size: var(--gyde-text-callout-size);
  line-height: var(--gyde-text-callout-leading);
  cursor: pointer;
}

.flow .agree input {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--gyde-brand);
}

.flow .agree a {
  color: var(--gyde-brand-text, var(--gyde-text));
  text-decoration: underline;
}

/* ---- Fields (BRAND.md §8, text input) ---- */

.flow-form {
  display: grid;
  gap: var(--gyde-space-5);
}

.flow .field {
  display: grid;
  gap: var(--gyde-space-2);
  min-width: 0;
}

.field-row {
  display: grid;
  gap: var(--gyde-space-5);
}

@media (min-width: 420px) {
  .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gyde-space-3);
  }
}

.flow label,
.flow legend {
  font-size: var(--gyde-text-subhead-size);
  line-height: var(--gyde-text-subhead-leading);
  font-weight: var(--gyde-weight-semibold);
}

.flow fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.flow legend {
  padding: 0;
  margin-bottom: var(--gyde-space-2);
}

.flow .input {
  width: 100%;
  min-height: var(--gyde-control-lg);
  padding: 0 var(--gyde-space-4);
  border: var(--gyde-border-width) solid var(--gyde-border-strong);
  border-radius: var(--gyde-radius-md);
  background: var(--gyde-surface);
  color: var(--gyde-text);
  font-family: var(--gyde-font-sans);
  /* 17px: iOS zooms into a field under 16px. */
  font-size: 1.0625rem;
  transition:
    border-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    box-shadow var(--gyde-duration-fast) var(--gyde-ease-standard);
}

.flow .input::placeholder {
  color: var(--gyde-text-muted);
  opacity: 0.8;
}

.flow .input:focus {
  outline: none;
  border-color: var(--gyde-focus-ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gyde-focus-ring) 30%, transparent);
}

.flow .input[aria-invalid="true"] {
  border-color: var(--gyde-danger);
  box-shadow: inset 0 0 0 1px var(--gyde-danger);
}

.flow .help {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-footnote-size);
  line-height: var(--gyde-text-footnote-leading);
}

/* The 6-digit code: one real field, so paste and autofill fill it whole. */
.flow .input.code {
  max-width: 15rem;
  padding: 0 var(--gyde-space-4) 0 calc(var(--gyde-space-4) + 0.4em);
  min-height: var(--gyde-code-cell-height);
  font-size: 1.625rem;
  font-weight: var(--gyde-weight-semibold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4em;
  text-align: center;
}

/* "How did you first hear about Gyde?": one tap, like the app's pills. */
.flow .pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gyde-space-2);
}

.flow .pill {
  position: relative;
  display: inline-flex;
  font-weight: var(--gyde-weight-medium);
}

.flow .pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.flow .pill span {
  display: inline-flex;
  align-items: center;
  min-height: var(--gyde-tap-min);
  padding: 0 var(--gyde-space-4);
  border: var(--gyde-border-width) solid var(--gyde-border-strong);
  border-radius: var(--gyde-radius-full);
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-callout-size);
  transition:
    background-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    border-color var(--gyde-duration-fast) var(--gyde-ease-standard),
    color var(--gyde-duration-fast) var(--gyde-ease-standard);
}

.flow .pill:hover span {
  background: var(--gyde-surface);
}

.flow .pill input:checked + span {
  border-color: var(--gyde-text);
  box-shadow: inset 0 0 0 1px var(--gyde-text);
  background: var(--gyde-surface-raised);
  color: var(--gyde-text);
  font-weight: var(--gyde-weight-semibold);
}

.flow .pill input:focus-visible + span {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 2px;
}

.flow .pill input[aria-invalid="true"] + span {
  border-color: var(--gyde-danger);
}

.flow .heard-note {
  margin-top: var(--gyde-space-4);
}

/* What went wrong, and what was sent again. Empty lines take no room. */
.flow .problem,
.flow .sent {
  font-size: var(--gyde-text-callout-size);
  line-height: var(--gyde-text-callout-leading);
  font-weight: var(--gyde-weight-medium);
}

.flow .problem {
  color: var(--gyde-danger);
}

.flow .problem:not(:empty)::before {
  content: "\26A0\FE0E";
  margin-right: 0.4em;
}

.flow .sent {
  color: var(--gyde-success);
}

.flow-form .problem:empty,
.flow-form .sent:empty {
  display: none;
}

.flow .actions {
  margin-top: var(--gyde-space-1);
}

.flow-form .actions .btn,
.flow-done .actions .btn {
  min-width: 10rem;
}

@media (max-width: 420px) {
  .flow-form .actions .btn,
  .flow-done .actions .btn {
    flex: 1 1 auto;
  }
}

.flow .btn:disabled {
  background: var(--gyde-surface-sunken);
  border-color: var(--gyde-border);
  color: var(--gyde-text-disabled);
  cursor: progress;
}

.flow .link-button {
  min-height: var(--gyde-tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--gyde-brand-text);
  font: inherit;
  font-size: var(--gyde-text-callout-size);
  font-weight: var(--gyde-weight-semibold);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.flow .link-button:hover {
  text-decoration-thickness: 2px;
}

.flow .link-button:focus-visible {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 2px;
  border-radius: var(--gyde-radius-xs);
}

.flow .link-button:disabled {
  color: var(--gyde-text-disabled);
  cursor: progress;
}

.flow .step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--gyde-space-6);
}

/* ---- Done: the account is open ---- */

.flow-done {
  display: grid;
  gap: var(--gyde-space-4);
}

.flow-done h2 {
  font-size: clamp(2.25rem, 1.8rem + 1.8vw, 2.75rem);
  line-height: 1.08;
}

/* ---- /billing/done: back from Stripe ---- */

.flow-back {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--gyde-space-4);
  text-align: center;
}

.flow .back-mark {
  width: 56px;
  height: 56px;
  margin-bottom: var(--gyde-space-2);
}

.flow-back .actions {
  justify-content: center;
  width: 100%;
  margin-top: var(--gyde-space-2);
}

.flow-back .actions .btn {
  min-width: 12rem;
}

/* ---- /admin: four plain tables ---- */

.flow #numbers h2 {
  margin: var(--gyde-space-8) 0 var(--gyde-space-3);
  font-family: var(--gyde-font-sans);
  font-size: var(--gyde-text-heading-size);
  line-height: var(--gyde-text-heading-leading);
  font-weight: var(--gyde-weight-semibold);
  letter-spacing: 0;
}

.flow #numbers h2 .muted {
  font-weight: var(--gyde-weight-regular);
}

.flow #numbers h1 + .problem,
.flow #numbers .problem + .muted,
.flow #refused .problem,
.flow .admin-sign-in .flow-form {
  margin-top: var(--gyde-space-4);
}

.flow #numbers .problem:empty {
  display: none;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--gyde-surface);
  border: var(--gyde-border-width) solid var(--gyde-border);
  border-radius: var(--gyde-radius-lg);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--gyde-focus-ring);
  outline-offset: 2px;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--gyde-text-callout-size);
  line-height: var(--gyde-text-callout-leading);
  font-variant-numeric: tabular-nums;
}

.table-scroll th,
.table-scroll td {
  padding: var(--gyde-space-2) var(--gyde-space-4);
  border-bottom: var(--gyde-border-width) solid var(--gyde-border);
  text-align: left;
  white-space: nowrap;
}

.table-scroll th {
  color: var(--gyde-text-muted);
  font-size: var(--gyde-text-caption-size);
  letter-spacing: var(--gyde-text-eyebrow-tracking);
  font-weight: var(--gyde-weight-bold);
  text-transform: uppercase;
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll .num {
  text-align: right;
}

.table-scroll .none,
.table-scroll .empty {
  color: var(--gyde-text-muted);
}

/* ---- Motion: calm, no bounce, none at all under reduced motion ---- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes gyde-rise {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes gyde-sunrise {
    from {
      opacity: 0;
      translate: -50% 62%;
    }
  }

  @keyframes gyde-arrive {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.98);
    }
  }

  .hero .sun {
    animation: gyde-sunrise 1100ms var(--gyde-ease-enter) both;
  }

  .phone-hero {
    animation: gyde-rise 700ms var(--gyde-ease-enter) 150ms both;
  }

  .notif {
    animation: gyde-arrive var(--gyde-duration-gentle) var(--gyde-ease-enter) 1000ms both;
  }

  .home .join-done {
    animation: gyde-arrive var(--gyde-duration-gentle) var(--gyde-ease-enter) both;
  }

  @supports (animation-timeline: view()) {
    .home .reveal {
      animation: gyde-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
