/* pensum.fit — the whole site's stylesheet.
 *
 * Look: "Graphite & Bone", Pensum's chosen theme
 * (company-hq products/pensum/brand/THEME-A-GRAPHITE-BONE.md). Near-black
 * graphite, warm bone, Archivo, one tint. Every hex below is transcribed from
 * that file; the contrast arithmetic lives there and is quoted in web/DESIGN.md.
 * Do not introduce a colour that is not in the theme, and never an orange.
 *
 * NOTHING ON THIS SITE IS EVER ITALIC. No italic face is loaded,
 * `font-synthesis: none` stops the browser faking one, and i/em/cite/var/dfn/
 * address are reset upright. Emphasis is weight, size or colour.
 *
 * No third-party request of any kind — Archivo is self-hosted below. That is
 * what lets the Worker serve the invite and shared-plan pages under a
 * `default-src 'none'` Content-Security-Policy, and it is why a font CDN link
 * must never be pasted into this file (web/test/pages.test.mjs fails on it).
 *
 * Two systems share this sheet:
 *   1. the marketing pages (home, for-coaches) — hero, sections, the graphite
 *      stage and the HTML/CSS device frames;
 *   2. the utility pages (legal, delete-account, 404) and the Worker-rendered
 *      invite and shared-plan pages, which reuse .wrap/.card/.button/.stores
 *      and friends. Both follow the visitor's OS theme; there is no switch.
 */

/* ---------------------------------------------------------------- type --- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* -------------------------------------------------------------- tokens --- */

:root {
  color-scheme: light dark;

  --ground: #edeae3;
  --surface: #f8f6f1;
  --elevated: #ffffff;
  --ink: #17181a;
  --ink-2: #55585c;
  --ink-3: #6b6f74;
  --hair: #d9d4c9;
  --hair-strong: #c3bcac;
  --fill: #e4e0d6;
  --accent: #23262a;
  --accent-ink: #f8f6f1;
  --danger: #8c2f2f;
  --bar: rgba(237, 234, 227, 0.82);

  /* The graphite panel the product is staged on — the same value in both
     schemes, because it is a physical surface, not a background. */
  --stage: #1b1d20;
  --stage-ink: #eceae4;
  --stage-ink-2: #a9aaae;
  --stage-hair: rgba(236, 234, 228, 0.16);
  --stage-accent: #d8cfbe;

  /* The QR code is drawn dark-on-light in both schemes. Scanners cope with
     inverted codes inconsistently and a misread invite is a lost client, so
     this one element deliberately does not follow the theme. */
  --qr-dark: #17181a;
  --qr-light: #ffffff;

  --shell: 1140px;
  --gutter: clamp(20px, 5vw, 56px);

  --step-display: clamp(2.5rem, 6.6vw, 5rem);
  --step-h2: clamp(1.875rem, 4vw, 3rem);
  --step-h3: clamp(1.5rem, 2.6vw, 2rem);
  --step-lead: clamp(1.125rem, 1.6vw, 1.4375rem);
  --step-body: 1.0625rem;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d0e10;
    --surface: #17181b;
    --elevated: #202226;
    --ink: #eceae4;
    --ink-2: #9a9ca0;
    --ink-3: #8a8d92;
    --hair: #2c2e33;
    --hair-strong: #3d4046;
    --fill: #262a2e;
    --accent: #d8cfbe;
    --accent-ink: #101113;
    --danger: #e09a9a;
    --bar: rgba(13, 14, 16, 0.82);

    --stage: #17181b;
    --stage-hair: rgba(236, 234, 228, 0.12);
  }
}

/* ---------------------------------------------------------------- base --- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--hair-strong) var(--ground);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family:
    'Archivo',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-synthesis: none;
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* No italic face is loaded and none is faked. The legal pages emphasise a word
   here and there with <em>; upright-but-identical would silently delete that
   emphasis, so emphasis becomes weight — which is what the theme specifies. */
i,
em,
address,
cite,
dfn,
var {
  font-style: normal;
}

i,
em {
  font-weight: 600;
  color: var(--ink);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

:where(a) {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-display);
}

h2 {
  font-size: var(--step-h2);
}

h3 {
  font-size: var(--step-h3);
  letter-spacing: -0.026em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transition: top 0.16s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bar);
  border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 58px;
}

/* The horizontal lockup (scale + wordmark) is an inline SVG in currentColor,
   so it follows --ink in both themes; 20px tall, the slot THEME-A §5 kept. */
.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .mark {
  display: block;
  height: 20px;
  width: auto;
  aspect-ratio: 2371.7 / 355;
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(13px, 3vw, 30px);
  font-size: 0.9375rem;
  white-space: nowrap;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}

.nav a:hover {
  text-decoration: underline;
}

/* Coach sign in: the nav's one quiet button. */
.nav a.nav-signin {
  padding: 5px 13px;
  border: 1px solid var(--hair-strong);
  border-radius: 7px;
  color: var(--ink);
}

.nav a.nav-signin:hover {
  background: var(--elevated);
  text-decoration: none;
}

@media (max-width: 480px) {
  /* The wordmark already goes home; keep the row on one line. For coaches stays in the footer. */
  .nav a[href='/'],
  .nav a[href$='/for-coaches/'] {
    display: none;
  }

  .wordmark {
    flex: none;
  }

  .wordmark .mark {
    height: 16px;
  }
}

/* One header everywhere: on a phone only For coaches and Coach sign in stay in the row. */
@media (max-width: 760px) {
  .nav a:not(.nav-signin):not([href$='/for-coaches/']) {
    display: none;
  }
}

@media (max-width: 400px) {
  .site-header .wrap {
    gap: 12px;
  }

  .nav {
    font-size: 0.875rem;
  }
}

/* -------------------------------------------------------------- layout --- */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* A reading column for the utility and legal pages: header and footer keep the
   full shell above, the prose does not. */
main > .wrap {
  max-width: 70ch;
  padding-top: clamp(52px, 7vw, 96px);
  padding-bottom: clamp(60px, 8vw, 112px);
}

main > .wrap section + section {
  margin-top: clamp(40px, 4.6vw, 60px);
}

main > .wrap h1 {
  font-size: clamp(2.125rem, 4.8vw, 3.5rem);
}

main > .wrap h2 {
  font-size: clamp(1.3125rem, 2.3vw, 1.75rem);
  letter-spacing: -0.026em;
}

main > .wrap h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

main > .wrap p,
main > .wrap ul,
main > .wrap ol {
  margin-top: 16px;
  color: var(--ink-2);
  /* A bare URL in the legal text must not push the page sideways at 320px. */
  overflow-wrap: anywhere;
}

main > .wrap li + li {
  margin-top: 10px;
}

main > .wrap strong {
  color: var(--ink);
  font-weight: 600;
}

/* Marketing sections: more air above a heading than below the block it closes,
   so the page reads as one column of sections, not a stack of equal boxes. */
main > section {
  padding-top: clamp(76px, 11vw, 152px);
  padding-bottom: clamp(56px, 8vw, 108px);
  border-top: 1px solid var(--hair);
}

main > section > .wrap > h2 {
  max-width: 18ch;
  margin-inline: auto;
  text-align: center;
}

.section-lead {
  max-width: 54ch;
  margin-inline: auto;
  margin-top: clamp(18px, 2.2vw, 26px);
  text-align: center;
  font-size: var(--step-lead);
  line-height: 1.42;
  letter-spacing: -0.018em;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- type --- */

.lead {
  margin-top: clamp(18px, 2.2vw, 26px);
  font-size: var(--step-lead);
  line-height: 1.42;
  letter-spacing: -0.018em;
  color: var(--ink-2);
}

/* A quiet label, not a marketing kicker: the invite page's "Your invite code"
   and the shared plan's byline. Sentence case, no tracking — an uppercase
   eyebrow above a heading is the reliable machine-made tell, and it does
   nothing at all in a language with no case. */
.eyebrow {
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-2);
}

small,
.small {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

ul.plain {
  list-style: none;
  padding-left: 0;
}

ul.plain > li {
  position: relative;
  padding-left: 26px;
}

ul.plain > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 13px;
  height: 1px;
  background: var(--hair-strong);
}

ol.plain {
  padding-left: 22px;
}

hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: clamp(28px, 3vw, 40px) 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 16px;
  font-size: 0.9375rem;
}

/* Wide content scrolls inside its own container; the page body never does. */
.scroll-x {
  overflow-x: auto;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-2);
}

th {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ controls --- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: clamp(30px, 3.6vw, 42px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.24s var(--ease);
}

.button:hover {
  opacity: 0.88;
  text-decoration: none;
}

.button--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-strong);
}

.button[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ------------------------------------------------------------- surfaces --- */

.card {
  margin-top: clamp(24px, 3vw, 36px);
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--surface);
}

.well {
  margin-top: 16px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 12px;
  background: var(--surface);
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  border-top: 0;
  padding-top: clamp(64px, 12vw, 148px);
  padding-bottom: clamp(56px, 9vw, 104px);
  text-align: center;
}

.hero h1 {
  max-width: 15ch;
  margin-inline: auto;
  letter-spacing: -0.04em;
}

.hero .lead {
  max-width: 52ch;
  margin-inline: auto;
  margin-top: clamp(22px, 2.8vw, 32px);
}

.hero .actions {
  justify-content: center;
}

/* --------------------------------------------------------------- stage --- */

.stage {
  margin-top: clamp(44px, 5.5vw, 80px);
  padding: clamp(40px, 5.5vw, 84px) clamp(24px, 5vw, 68px) clamp(36px, 4.5vw, 68px);
  border-radius: clamp(16px, 2vw, 26px);
  border: 1px solid transparent;
  background: var(--stage);
  color: var(--stage-ink);
  overflow: clip;
}

/* In dark the stage sits one step above the page, so it needs its own edge. */
@media (prefers-color-scheme: dark) {
  .stage {
    border-color: var(--stage-hair);
  }
}

/* The stage sits inside the centred hero and inherits its axis, so the copy
   block centres on the stage rather than hanging off its left edge. */
.stage-copy {
  max-width: 54ch;
  margin-inline: auto;
}

.stage h2,
.stage h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  letter-spacing: -0.032em;
}

.stage p {
  margin-top: 18px;
  font-size: var(--step-lead);
  line-height: 1.42;
  letter-spacing: -0.018em;
  color: var(--stage-ink-2);
}

/* The tracked caption is a label and stays one; the sentence beside it stays a
   sentence. This is the only uppercase on the site. */
.stage .status,
.status {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stage-accent);
}

.stage a:not(.button) {
  color: var(--stage-accent);
}

.stage .button {
  background: var(--stage-accent);
  color: #101113;
}

.stage :focus-visible {
  outline-color: var(--stage-accent);
}

/* ------------------------------------------------------------ screens ---
   Real screenshots from the app on a phone, status bar cropped off. No
   frame and no padding: the screenshot is the object, rounded like the
   glass it came from, lifted by one soft shadow. */

.devices {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(16px, 2.6vw, 36px);
  margin-top: clamp(40px, 5.5vw, 78px);
}

.device {
  flex: 1 1 0;
  max-width: 280px;
  margin: 0;
  border-radius: 9% / 4.3%;
  overflow: clip;
  box-shadow:
    0 0 0 1px rgba(23, 24, 26, 0.08),
    0 2px 6px -2px rgba(23, 24, 26, 0.12),
    0 30px 60px -24px rgba(23, 24, 26, 0.38);
}

/* On the graphite stage and in dark mode a dark shadow disappears, so the
   edge carries the shape instead. */
.stage .device {
  box-shadow:
    0 0 0 1px rgba(236, 234, 228, 0.14),
    0 30px 60px -24px rgba(0, 0, 0, 0.7);
}

@media (prefers-color-scheme: dark) {
  .device {
    box-shadow:
      0 0 0 1px rgba(236, 234, 228, 0.14),
      0 30px 60px -24px rgba(0, 0, 0, 0.7);
  }
}

/* A trio leads with the centre screen: larger, the sides set back. */
.devices:not(.devices--one) {
  align-items: center;
}

.devices:not(.devices--one) .device:nth-child(2) {
  flex-grow: 1.18;
  max-width: 320px;
}

/* A single screen. `.devices` is a flex item inside .feature-visual and
   .stage, so it needs its own width: without it the `flex: 1 1 0` device
   resolves against a shrink-to-fit parent and collapses to nothing. */
.devices--one {
  width: 100%;
}

.devices--one .device {
  max-width: 320px;
  margin-bottom: 0;
}

/* The one authored moment on the site, and it belongs to the product: the
   phones settle as the stage arrives. The resting state is the default, so a
   browser with no scroll-linked animation and a visitor who asked for less
   motion both simply see the phones in place. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .device {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 12% cover 42%;
    }

    .devices .device:nth-child(2) {
      animation-range: entry 12% cover 52%;
    }

    @keyframes settle {
      from {
        transform: translateY(6%);
      }
      to {
        transform: translateY(0);
      }
    }
  }
}

/* Below 760px the outer two phones of a trio are removed and the centre one
   carries the section alone. `:not(.devices--one)` is load-bearing: a single
   staged phone is both the first and the last child of its row, and without
   this every feature row on a phone would lose its visual entirely. */
@media (max-width: 760px) {
  .devices:not(.devices--one) {
    gap: 0;
  }

  .devices:not(.devices--one) .device:first-child,
  .devices:not(.devices--one) .device:last-child {
    display: none;
  }

  .devices:not(.devices--one) .device:nth-child(2) {
    max-width: 258px;
    margin-inline: auto;
  }

  .devices--one .device {
    max-width: 272px;
    margin-inline: auto;
  }
}

/* ------------------------------------------------------------- feature ---
   A statement and the screen that proves it. Two columns on wide screens,
   stacked on narrow ones; the phone leads on alternate rows for rhythm. */

.feature {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(44px, 5.5vw, 80px);
}

.feature + .feature {
  margin-top: clamp(64px, 8vw, 116px);
  padding-top: clamp(64px, 8vw, 116px);
  border-top: 1px solid var(--hair);
}

.feature h3 {
  max-width: 16ch;
}

.feature p {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--ink-2);
}

.feature .detail {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 0.9375rem;
}

.feature-visual {
  display: flex;
  justify-content: center;
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  }

  .feature--flip .feature-copy {
    order: 2;
  }
}

/* -------------------------------------------------------------- prices --- */

.plans {
  display: grid;
  gap: 0;
  margin-top: clamp(40px, 5vw, 72px);
}

.plans > div {
  display: grid;
  gap: 8px 48px;
  padding: clamp(24px, 2.8vw, 36px) 0;
  border-top: 1px solid var(--hair);
}

.plans > div:last-child {
  border-bottom: 1px solid var(--hair);
}

.plans dt {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.024em;
}

.plans dd {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-2);
}

.plans .plus-list {
  margin: 10px 0 12px;
  padding-inline-start: 1.1em;
}

.plans .plus-list li + li {
  margin-top: 4px;
}

.plans .price {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 860px) {
  .plans > div {
    grid-template-columns: minmax(0, 24ch) minmax(0, 1fr);
    align-items: baseline;
  }
}

/* -------------------------------------------------------------- facts ---- */

.facts {
  display: grid;
  gap: 0;
  margin-top: clamp(40px, 5vw, 72px);
  padding: 0;
  list-style: none;
}

.facts li {
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
  max-width: none;
}

.facts li:last-child {
  border-bottom: 1px solid var(--hair);
}

.facts strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.018em;
  margin-bottom: 4px;
}

@media (min-width: 860px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
  }

  .facts li:nth-child(2) {
    border-top: 1px solid var(--hair);
  }

  .facts li:nth-last-child(2) {
    border-bottom: 1px solid var(--hair);
  }
}

/* The slot real store screenshots land in once the app is finished. It is
   deliberately visible and labelled rather than a silent absence. */
.shotslot {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(28px, 3.4vw, 44px);
  border: 1px dashed var(--hair-strong);
  border-radius: 12px;
  text-align: center;
  color: var(--ink-2);
}

.shotslot .status {
  color: var(--ink-2);
}

.shotslot p {
  max-width: 52ch;
  margin: 10px auto 0;
}

/* ------------------------------------------------------ store badges ----- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
}

.stores > li {
  margin: 0;
  max-width: none;
}

.badge {
  display: block;
  text-decoration: none;
}

.badge img {
  display: block;
  height: 48px;
  width: auto;
}

.badge[aria-disabled='true'] {
  opacity: 0.62;
  pointer-events: none;
}

/* --------------------------------------------------------- invite page --- */

.invite {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(44px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 104px);
}

.invite h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
}

.invite h2 {
  margin-top: clamp(36px, 4.4vw, 56px);
  font-size: clamp(1.3125rem, 2.3vw, 1.75rem);
  letter-spacing: -0.026em;
}

/* A shared plan puts an <h3> on every routine and every meal inside a day
   card. At the global display size those compete with the plan's own title, so
   they take the document's h3 instead. */
.invite h3 {
  margin-top: 22px;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.invite .card > h3:first-child {
  margin-top: 0;
}

.invite p,
.invite ul {
  margin-top: 16px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.coach {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.coach__avatar,
.coach__initials {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--hair);
}

.coach__initials {
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}

.coach__name {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.18;
  color: var(--ink);
}

.coach__headline {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* The code is the load-bearing element on the invite page: every failure mode
   of deep linking degrades to a person typing these six characters. */
.code-block {
  text-align: center;
}

.code {
  display: block;
  font-size: clamp(2.5rem, 9vw, 3.75rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-indent: 0.14em; /* offset the trailing letter-space to optically centre */
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
}

.code-hint {
  margin: 0 auto 20px;
  max-width: 42ch;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.copy-status {
  display: block;
  min-height: 1.3em;
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

/* The desktop path. Hidden on touch and narrow screens by CSS rather than by a
   user-agent string: a phone photographing its own screen is absurd, a tablet
   beside a phone is not, and CSS gets that boundary right more often. */
.qr-block {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 28px;
}

.qr {
  flex: none;
  width: 148px;
  height: 148px;
  border-radius: 7px;
}

@media (pointer: coarse), (max-width: 40rem) {
  .qr-block {
    display: none;
  }
}

.code-entry,
.auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0;
}

.auth-form {
  flex-direction: column;
  align-items: stretch;
}

.code-entry label,
.auth-form label {
  flex: 1 0 100%;
  color: var(--ink-2);
}

.code-entry input,
.auth-form input {
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--elevated);
  border: 1px solid var(--hair-strong);
  border-radius: 7px;
}

.code-entry input {
  flex: 1 1 12rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.auth-form input {
  width: 100%;
}

.code-entry input::placeholder,
.auth-form input::placeholder {
  color: var(--ink-3);
}

/* Support page: the same field look for select and textarea, the FAQ
   disclosures, the honeypot and the send status. */
.auth-form select,
.auth-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--elevated);
  border: 1px solid var(--hair-strong);
  border-radius: 7px;
}

.auth-form textarea {
  resize: vertical;
}

.auth-form .hp {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.support-form {
  max-width: 34rem;
  margin-top: 20px;
}

.support-status {
  margin: 0;
  min-height: 1.5em;
  color: var(--ink-2);
}

.support-status.is-error {
  color: var(--danger);
}

details.faq {
  border-top: 1px solid var(--hair);
  padding: 4px 0;
}

details.faq:last-of-type {
  border-bottom: 1px solid var(--hair);
}

details.faq > summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
}

details.faq[open] > summary {
  padding-bottom: 6px;
}

/* -------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--hair);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.site-footer .wrap {
  padding-top: clamp(38px, 4.5vw, 60px);
  padding-bottom: clamp(38px, 4.5vw, 60px);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
  max-width: none;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer p {
  max-width: 62ch;
}

/* ------------------------------------------------------- growth pages ---- */

/* /guess, the calorie battle: two food photos side by side, a draining timer, one tap per round. */
.battle-lead {
  color: var(--ink-2);
}

html:not(.js) .battle-hud,
html:not(.js) .battle-timer,
html:not(.js) .battle-arena,
html:not(.js) .battle-take,
html:not(.js) .battle-start {
  display: none;
}

.battle-hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 20px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.battle-hud strong {
  color: var(--ink);
  font-size: 1.5rem;
}

.battle-timer {
  height: 6px;
  margin-block: 10px 14px;
  border-radius: 3px;
  background: var(--fill);
  overflow: hidden;
}

.battle-timer span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
}

.battle-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.battle-vs {
  align-self: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.food {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 0 0 12px;
  border: 2px solid var(--hair);
  border-radius: 16px;
  background: var(--elevated);
  color: var(--ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    border-color 0.2s ease;
}

.food:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: var(--hair-strong);
}

.food:disabled {
  cursor: default;
}

.food img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--fill);
}

.food-name {
  padding-inline: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.food-portion {
  padding-inline: 12px;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.3;
}

.food-kcal {
  min-height: 1.6em;
  padding-inline: 12px;
  font-size: 1.375rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.food[data-result='more'] {
  border-color: var(--accent);
}

[data-state='wrong'] .food[data-result='more'] {
  border-color: var(--danger);
}

.battle-take {
  min-height: 3em;
  margin-block: 14px 8px;
  font-weight: 600;
  text-align: center;
}

[data-state='wrong'] .battle-take {
  color: var(--danger);
}

.battle-start {
  width: 100%;
}

.battle-start[hidden],
.battle-over[hidden] {
  display: none;
}

.battle-over {
  margin-block-start: 8px;
  text-align: center;
}

.battle-score {
  margin: 0;
}

.battle-score strong {
  display: block;
  font-size: clamp(4rem, 18vw, 7rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.battle-tier {
  font-weight: 600;
}

.battle-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.battle-list ul,
.battle-credits ul {
  padding-inline-start: 1.2em;
}

/* Phones keep the two foods side by side: the whole duel fits on one screen. */
@media (max-width: 480px) {
  .battle-arena {
    gap: 6px;
  }

  .battle-vs {
    font-size: 0.8125rem;
  }

  .food {
    border-radius: 12px;
  }

  .food img {
    aspect-ratio: 1 / 1;
  }

  .food-name,
  .food-portion,
  .food-kcal {
    padding-inline: 8px;
  }

  .food-name {
    font-size: 0.9375rem;
  }

  .food-portion {
    font-size: 0.75rem;
  }

  .food-kcal {
    font-size: 1.125rem;
  }

  .battle-lead {
    font-size: 0.9375rem;
  }
}

.button.button-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
}

.battle-credits {
  margin-block-start: 24px;
}

/* /guess on desktop (Founder 2026-10-08): a wide arena with big photos, centred heading and HUD. */
@media (min-width: 960px) {
  .invite:has(.battle) {
    max-width: 1040px;
  }
  .battle {
    text-align: center;
  }
  .battle-lead {
    margin-inline: auto;
  }
  .battle-hud {
    justify-content: center;
    gap: 32px;
  }
  .battle-arena {
    gap: 28px;
  }
  .battle-arena .food img {
    aspect-ratio: 4 / 3;
    height: auto;
  }
  .battle-start {
    margin-inline: auto;
  }
  .invite:has(.battle) > .small,
  .invite:has(.battle) > h2,
  .invite:has(.battle) > .stores {
    text-align: center;
  }
}

.shot {
  display: block;
  width: 100%;
  height: auto;
}

.getapp {
  margin-top: clamp(48px, 6vw, 88px);
  text-align: center;
}

.getapp p {
  margin: 10px auto 0;
  color: var(--ink-2);
}

.getapp .stores,
.hero > .wrap > .stores {
  justify-content: center;
}


/* --------------------------------------------------- coaching list ------ */

.coach-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  max-width: 52ch;
}

.coach-list li {
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
}

.coach-list strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

/* The coaching row carries a trio, so its visual gets the wider column. */
@media (min-width: 860px) {
  .feature--coach {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
}

/* ------------------------------------------------------- Pensum+ grid --- */

.plus {
  margin-top: clamp(40px, 5vw, 72px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 28px;
  background: var(--stage);
  color: var(--stage-ink);
}

.plus-head h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}

.plus-head .price {
  margin-top: 10px;
  color: var(--stage-accent);
  font-variant-numeric: tabular-nums;
}

.plus-grid {
  display: grid;
  gap: 1px;
  margin-top: clamp(28px, 3.5vw, 44px);
  background: var(--stage-hair);
  border-radius: 18px;
  overflow: hidden;
}

.plus-grid section {
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--stage);
}

.plus-grid h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.plus-grid ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.plus-grid li {
  padding: 9px 0;
  border-top: 1px solid var(--stage-hair);
  color: var(--stage-ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.plus-grid li span {
  display: block;
  margin-top: 2px;
  color: var(--stage-accent);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 700px) {
  .plus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .plus-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Language menu on every page (src/seo/site.js). */
.lang-menu { position: relative; margin-inline-start: 8px; flex: none; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; color: var(--ink-2); font-size: 0.875rem; font-weight: 600; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--ink); }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; min-width: 168px; background: var(--elevated); border: 1px solid var(--hair); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(10, 11, 13, 0.35); z-index: 50; }
.lang-menu li + li { margin-top: 0 !important; }
.lang-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.9375rem; }
.lang-menu a:hover { background: var(--fill); }
.lang-menu a[aria-current] { font-weight: 600; }
.site-header .wrap { gap: 16px; }
.site-header .nav { margin-inline-start: auto; }

/* 320px: the header row must fit the longest sign-in label (de) without sideways scroll. */
@media (max-width: 400px) {
  .site-header .wrap { gap: 8px; }
  .nav { gap: 8px; font-size: 0.8125rem; }
  .nav a.nav-signin { padding: 5px 8px; }
  .lang-menu { margin-inline-start: 0; }
  .lang-menu summary { padding: 0 2px; gap: 4px; }
}
