/* Dosefolder public site (CW-1384): the CW-1381 app-site page system in the
   Dosefolder skin, built from the picked Home A ("Today, opened up").
   No scripts and no third-party requests: Outfit and Inter are self-hosted
   from the app's design-system bundle (design-system/stiqsy/fonts, SIL Open
   Font License; licences beside the font files).
   Colours are the app's G2M1 paper-and-teal tokens (design-system/stiqsy/
   tokens.json): one light theme, as in the app, so a dark system setting
   shows the same page. Sizes are in rem so text follows the reader's
   setting; no text is smaller than 13 px (0.8125rem) at the default size,
   and every link is at least 24 × 24 CSS px. */

@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/outfit-700.woff2") format("woff2");
}

:root {
  color-scheme: light;
  /* G2M1 tokens */
  --paper: #f7f4ef;
  --surface: #ffffff;
  --divider: #e8e2d8;
  --ink-text: #172b36;
  --muted-text: #565e6b;
  --teal: #0c6767;
  --chapter-ink: #1a2433;
  --chapter-ink-top: #26324a;
  --chapter-weight: #2f4a73;
  --chapter-measures: #dee6f2;
  --chapter-checkins: #e9e4f4;
  --measures-fill: #3f5e8f;
  --checkin-fill: #5a4d8c;
  --on-deep-muted: #c9d0db;
  --ink-line: #36435a;
  --ring-teal: #5ec8c2;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 6px 24px -8px rgba(26, 36, 51, 0.25);
  --shadow-soft: 0 6px 24px -8px rgba(26, 36, 51, 0.18);
  /* Working tokens; a chapter or band re-points them. */
  --bg: var(--paper);
  --ink: var(--ink-text);
  --muted: var(--muted-text);
  --line: var(--divider);
  --card: var(--surface);
  --accent: var(--teal);
  --focus: var(--teal);
  /* Page margin and grid gap: 120 px / 24 px at desktop, 48 px under
     1280 px, 20 px / 16 px on phones. */
  --m: min(7.5rem, 8.4vw);
  --g: min(1.5rem, 2vw);
}

/* Spacing is capped by the screen width so that 200% text, not wider
   margins and gaps, gets the extra room. */
@media (max-width: 80rem) {
  :root {
    --m: min(3rem, 5vw);
  }
}

@media (max-width: 43.75rem) {
  :root {
    /* 16 px or more at 320 px; never grows past the screen at 200% text. */
    --m: min(1.25rem, 5vw);
    --g: min(1rem, 5vw);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

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

ul,
ol {
  list-style: none;
}

/* Links. Inline links get just enough vertical padding for a hit area at
   least 24 px tall: Inter's content box is about 1.175em, so the padding
   tops it up to 24.4 px and drops to nothing once the text is big enough.
   A fixed 0.3em made a link's box taller than the line, so links on
   neighbouring lines overlapped (CW-1384 QA). Links that sit on their own
   get min-height. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  padding-block: max(0px, calc(12.2px - 0.5875em));
}

a:hover {
  text-decoration-thickness: 0.14em;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--teal);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--ink-text);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: calc(75rem + 2 * var(--m));
  margin: 0 auto;
  padding: 0 var(--m);
}

/* Flex and grid items default to min-width: auto, the width of their
   longest word, so one long word in a wider font can push a row past a
   320 px screen at 200% text. Items here may shrink to their row. */
.site-header .wrap > *,
.site-nav li,
.foot-grid > *,
.foot-nav > *,
.hero-grid > *,
.bento > *,
.split > *,
.legal-body > *,
.tiles > *,
.cards > *,
.chips > * {
  min-width: 0;
  max-width: 100%;
}

/* Type roles */

.eyebrow,
.cap {
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
}

.cap {
  color: var(--muted);
}

.display,
.h2,
.chap h2,
.prose h2,
.page-head h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* Headings scale with the screen, never past 17vw, so the longest word
   fits a 320 px screen with text at 200%. */
.h2 {
  margin-top: 1rem;
  font-size: min(clamp(2rem, 3.6vw, 3.375rem), 12vw);
  line-height: 1.08;
  max-width: 18ch;
}

.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

.num {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.num small {
  font-family: var(--body);
  font-weight: 600;
  font-size: max(0.35em, 13px);
  letter-spacing: 0;
  margin-left: 0.2em;
}

/* Header */

.site-header {
  background: var(--paper);
  color: var(--ink-text);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  container-type: inline-size;
}

/* The wordmark: "Dosefolder" in Outfit 700 with the K1 Cycle ring as its
   "o". The ring is an image whose alternative text is the letter, so the
   link's name and copied text stay "Dosefolder". It keeps its 1.5rem size
   wherever it fits; on a narrow screen with large text the word scales
   with the header, never below the body text size. */
.brand,
.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}

.brand {
  min-height: 2.75rem;
  padding: 0;
  font-size: clamp(1.0625rem, 17cqi, 1.5rem);
  /* Last resort if a font is wider still: the word breaks inside the
     header rather than running past the screen edge. */
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.wm-o {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin: 0.08em 0.02em 0 0.03em;
  flex: none;
}

/* The header links are a popover (HTML only, no script): on a desktop they
   show as a row, overriding the browser's popover styles; on a phone they
   open from the Menu button, as in the shared page mockup (CW-1384 QA). */
.site-nav {
  order: 2;
  display: block;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow: visible;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  max-width: 100%;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-text);
  text-decoration: none;
}

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

.site-nav a[aria-current="page"] {
  color: var(--ink-text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.status-pill {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
}

.status-pill::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.menu-button {
  display: none;
  order: 4;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-text);
  font: inherit;
  cursor: pointer;
}

.menu-icon {
  display: block;
  width: 1rem;
  height: 0.625rem;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

/* Under 860 px: the brand and the Menu button on one row. */
@media (max-width: 53.75rem) {
  .brand {
    order: 1;
  }

  .status-pill {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    display: none;
  }

  /* The open Menu hangs below its button, so the button that closes it is
     never covered. With large text the button wraps under the brand, so a
     fixed offset once put Home over it (CW-1384 QA round 2). Browsers with
     anchor positioning place the panel from the button itself; the others
     start it below where even a wrapped button ends, unless that leaves
     less than 12rem: then the panel moves up, as far as 0.5rem from the
     top, so it never shrinks to a clipped strip on a short landscape
     screen (CW-1384 review). Tapping outside it or Escape still closes
     it. */
  .site-header .site-nav:popover-open {
    --menu-top: clamp(0.5rem, calc(100dvh - 12.5rem), 8rem);
    display: block;
    position: fixed;
    inset: var(--menu-top) 1rem auto;
    min-height: min(8rem, calc(100dvh - 1rem));
    max-height: calc(100dvh - var(--menu-top) - 0.5rem);
    overflow: auto;
    padding: 0.5rem;
    border: 1px solid var(--divider);
    border-radius: 1.25rem;
    background: var(--surface);
    color: var(--ink-text);
    box-shadow: 0 24px 48px -16px rgba(26, 36, 51, 0.45);
  }

  /* The anchored panel starts 0.5rem below the button and ends at least 1rem
     above the bottom of the window, so its height is capped by the room
     left under the button and the links scroll inside it; on a short
     landscape phone with large text the last link was once off screen with
     no way to reach it (CW-1384 review).
     It is absolute, not fixed, so it belongs to the page's scrolling area:
     when the page has scrolled on and keyboard focus comes back to a Menu
     link (Shift+Tab), the browser scrolls the page back to show it. Fixed,
     it followed its button off the top of the window, and Support took
     focus at -413 px (CW-1384 QA round 6). With the page at the top it sits
     exactly where the fixed panel did, and the site still runs no script. */
  /* data-menu-fallback on the root element turns this path off, so the
     tests can check the fallback in a browser that has anchor positioning. */
  @supports (position-area: bottom span-all) {
    :root:not([data-menu-fallback]) .menu-button {
      anchor-name: --site-menu-button;
    }

    :root:not([data-menu-fallback]) .site-header .site-nav:popover-open {
      position: absolute;
      position-anchor: --site-menu-button;
      /* An anchored absolute box can take the whole scrollable page as its
         containing block, so the bottom edge is set from the window's
         height: 1rem above the bottom of the window with the page at the
         top, as the fixed panel was. */
      inset: calc(anchor(bottom) + 0.5rem) 1rem calc(100% - 100dvh + 1rem);
      width: auto;
      /* Between those edges the panel is as tall as its links, and no
         taller than the room. */
      height: auto;
      margin: 0;
      min-height: 0;
      max-height: max-content;
      overflow-y: auto;
      scroll-padding-block: 0.5rem;
    }
  }

  .site-header .site-nav:popover-open ul {
    flex-direction: column;
  }

  .site-header .site-nav:popover-open a {
    display: flex;
    min-height: 3rem;
    padding: 0.5rem 1rem;
  }

  /* A browser without popovers keeps the links as a row of their own. */
  @supports not selector(:popover-open) {
    .menu-button {
      display: none;
    }

    .site-nav {
      display: block;
      flex-basis: 100%;
    }
  }
}

/* The home page opens on the ink chapter, as the app's Today does. */
.page-home .site-header {
  background: var(--chapter-ink-top);
  color: #ffffff;
  --ink: #ffffff;
  --focus: var(--ring-teal);
}

.page-home .site-nav a {
  color: var(--on-deep-muted);
}

.page-home .site-nav a:hover {
  color: #ffffff;
}

.page-home .site-nav a[aria-current="page"] {
  background: #ffffff;
  color: var(--ink-text);
  box-shadow: none;
}

.page-home .status-pill {
  background: transparent;
  border-color: var(--ink-line);
  color: #ffffff;
}

.page-home .status-pill::before {
  background: var(--ring-teal);
}

.page-home .menu-button {
  border-color: var(--ink-line);
  background: transparent;
  color: #ffffff;
}

/* The open Menu is a white panel on every page, the ink home page included,
   so its links keep dark text and the paper-and-teal focus ring in every
   state. These rules come after the home ink rules so they win over them:
   the home page's white hover once turned a link white on white (CW-1384
   review). */
@media (max-width: 53.75rem) {
  .site-header .site-nav:popover-open {
    --focus: var(--teal);
  }

  .site-header .site-nav:popover-open a,
  .site-header .site-nav:popover-open a:hover,
  .site-header .site-nav:popover-open a:focus-visible,
  .site-header .site-nav:popover-open a:active {
    background: transparent;
    color: var(--ink-text);
    box-shadow: none;
  }

  .site-header .site-nav:popover-open a[aria-current="page"] {
    background: var(--paper);
  }
}

/* Bands and chapters. A band re-points the working tokens. */

.on-ink {
  --bg: var(--chapter-ink);
  --ink: #ffffff;
  --muted: var(--on-deep-muted);
  --line: var(--ink-line);
  --card: var(--chapter-ink-top);
  --accent: var(--ring-teal);
  --focus: var(--ring-teal);
  background: linear-gradient(to bottom, var(--chapter-ink-top), var(--chapter-ink));
  color: #ffffff;
}

.on-blue {
  --bg: var(--chapter-weight);
  --ink: #ffffff;
  --muted: var(--on-deep-muted);
  --line: #4a638a;
  --card: var(--measures-fill);
  --accent: #ffffff;
  --focus: var(--ring-teal);
  background: var(--chapter-weight);
  color: #ffffff;
}

.on-measures {
  --bg: var(--chapter-measures);
  --line: #c5d2e6;
  --accent: var(--measures-fill);
  background: var(--chapter-measures);
  color: var(--ink-text);
}

.on-violet {
  --bg: var(--chapter-checkins);
  --line: #d3cbe6;
  --accent: var(--checkin-fill);
  background: var(--chapter-checkins);
  color: var(--ink-text);
}

.on-white {
  --bg: var(--surface);
  background: var(--surface);
  color: var(--ink-text);
}

/* Small pieces shared by the app's screens */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.dchip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.375rem;
  padding: 0.25rem 1rem;
  border-radius: 1.1875rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  text-decoration: none;
}

.dchip::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.dchip.k1 {
  background: #ffffff;
  color: var(--ink-text);
}

.dchip.k2 {
  background: var(--chapter-weight);
}

.dchip.k3 {
  background: var(--measures-fill);
}

.dchip.k4 {
  background: var(--checkin-fill);
}

.dchip.k5 {
  background: var(--chapter-ink);
}

.tile {
  background: var(--surface);
  color: var(--ink-text);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  --ink: var(--ink-text);
  --muted: var(--muted-text);
  --line: var(--divider);
  --accent: var(--teal);
  --focus: var(--teal);
}

/* Example cards. Every example is made up and says so. */
.example-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.example figcaption,
.illustration figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.slip {
  background: var(--surface);
  color: var(--ink-text);
  border-radius: 1.25rem;
  padding: 1.125rem 1.25rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  --ink: var(--ink-text);
  --muted: var(--muted-text);
  --line: var(--divider);
}

.slip dl > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.125rem 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--divider);
}

.slip dt {
  color: var(--muted-text);
}

.slip dd {
  font-weight: 500;
  text-align: right;
}

.slip figcaption {
  border-top: 1px solid var(--divider);
  padding-top: 0.625rem;
  margin-top: 0;
}

/* The dose cycle ring with its count */
/* Wraps the words under the ring when 200% text leaves no room beside it. */
.cycle {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.cycle > :last-child {
  flex: 1 1 9rem;
  min-width: 0;
}

.cycle > .ring-count {
  flex: none;
}

.ring-count {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
}

.ring-count img {
  width: 100%;
  height: 100%;
}

.ring-count b {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--display);
  font-size: 1.625rem;
  line-height: 1;
  color: var(--ink-text);
}

.ring-count b small {
  display: block;
  margin-top: 1px;
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-text);
}

.cycle-title {
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-text);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
  margin-top: 0.75rem;
}

.bars i {
  width: 16px;
  border-radius: 4px;
  background: var(--chapter-weight);
}

.bars i:nth-child(1) { height: 44px; }
.bars i:nth-child(2) { height: 42px; }
.bars i:nth-child(3) { height: 40px; }
.bars i:nth-child(4) { height: 39px; }
.bars i:nth-child(5) { height: 37px; background: #5f7fae; }
.bars i:nth-child(6) { height: 36px; background: #5f7fae; }
.bars i:nth-child(7) { height: 35px; background: #5f7fae; }
.bars i:nth-child(8) { height: 34px; background: #5f7fae; }
.bars i:nth-child(9) { height: 33px; background: #a9bcd8; }

/* Store slots. "Coming soon" only: no badge artwork, no download wording. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: min(11rem, 100%);
  min-height: 3.75rem;
  padding: 0.5rem 1.25rem;
  border: 1.5px dashed var(--muted);
  border-radius: 1rem;
  color: var(--ink);
}

.store-k {
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.store-v {
  font-size: 1.0625rem;
  line-height: 1.25;
  font-weight: 600;
}

.stores-note {
  margin-top: 0.875rem;
  max-width: 44ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Home: the hero */

.hero {
  position: relative;
  z-index: 1;
  border-radius: 0 0 3.5rem 3.5rem;
  padding-top: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--g);
  align-items: start;
}

.hero-copy {
  padding-bottom: 6rem;
}

.hero h1 {
  margin-top: 2.75rem;
  max-width: 4.3em;
  font-family: var(--display);
  font-weight: 700;
  font-size: min(clamp(3rem, 6.6vw, 6.5rem), 17vw);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero .lede {
  margin-top: 1.75rem;
  max-width: 46ch;
}

.hero .stores {
  margin-top: 2.25rem;
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: flex-end;
  /* The phone opens out of the chapter onto the page below. */
  margin-bottom: -10rem;
}

.folder {
  position: absolute;
  left: -2.25rem;
  bottom: 12rem;
  width: 14.375rem;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35));
}

/* A drawing of the Today screen. Fixed pixel sizes, because it is a picture
   of a phone; none is under 13 px. */
.illustration {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
}

.illustration figcaption {
  margin: 0 0 1rem;
  color: var(--on-deep-muted);
}

.phone {
  width: 100%;
  padding: 9px;
  border-radius: 46px;
  background: #0d1420;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 40px 80px -20px rgba(0, 0, 0, 0.55), 0 18px 36px -18px rgba(0, 0, 0, 0.5);
}

/* The screen keeps the phone's proportions but grows when larger text
   needs more room, so nothing is cut off; the bottom padding keeps the tab
   bar clear of the content above it (CW-1384 QA). */
.scr {
  position: relative;
  aspect-ratio: 282 / 606;
  padding-bottom: 84px;
  border-radius: 37px;
  background: var(--paper);
  color: var(--ink-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-x: visible;
  overflow-y: clip;
  overflow-wrap: anywhere;
}

.scr-hero {
  padding: 46px 14px 14px;
  border-radius: 37px 37px 26px 26px;
  background: linear-gradient(to bottom, var(--chapter-ink-top), var(--chapter-ink));
  color: #ffffff;
}

.scr-time {
  position: absolute;
  top: 16px;
  left: 26px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.scr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scr-top .wordmark {
  font-size: 19px;
  color: #ffffff;
}

.scr-avatar {
  flex: none;
  display: grid;
  place-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink-text);
  font-size: 13px;
  font-weight: 600;
}

.scr .chips {
  gap: 6px;
  margin-top: 14px;
}

.scr .dchip {
  min-height: 28px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 14px;
  font-size: 13px;
}

.scr .dchip::before {
  width: 7px;
  height: 7px;
}

.scr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
}

.scr-head b {
  display: block;
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.scr-head span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--on-deep-muted);
}

.scr-head img {
  flex: none;
  width: 76px;
  height: auto;
}

.scr-hero .tile {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
}

.scr .cycle {
  gap: 10px;
}

.scr .ring-count {
  width: 58px;
  height: 58px;
}

.scr .ring-count b {
  font-size: 21px;
}

.scr .ring-count b small {
  font-size: 13px;
}

.scr .cycle-title {
  font-size: 13px;
}

.scr-detail {
  font-size: 13px;
  color: var(--muted-text);
}

.scr-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  margin-top: 10px;
  border-radius: 14px;
  background: var(--chapter-ink);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.scr-weight {
  margin: 10px 10px 0;
  padding: 14px;
  border-radius: 24px;
  background: var(--chapter-weight);
  color: #ffffff;
}

.scr .cap {
  font-size: 13px;
}

.scr-weight .cap {
  color: var(--on-deep-muted);
}

.scr-weight-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4px 8px;
  margin-top: 4px;
}

.scr-weight-row .num {
  font-size: 30px;
}

.scr-weight-row span {
  font-size: 13px;
  color: var(--on-deep-muted);
}

.scr-weight-row .scr-weight-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.scr-weight-row .scr-change strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

/* The reference's weekly weigh-ins tile and weigh-in action, drawn as plain
   text and shapes: nothing here is a control (CW-1384 home parity). */
.scr-weight .scr-weigh-tile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: none;
}

.scr-weigh-tile > div {
  flex: 1 1 0;
  min-width: 0;
}

.scr-weigh-tile .cap {
  display: block;
  color: var(--muted-text);
}

.scr-weigh-tile .bars {
  gap: 3px;
  height: 34px;
  margin-top: 6px;
}

.scr-weigh-tile .bars i {
  flex: 0 0 8px;
  width: 8px;
  border-radius: 3px;
}

.scr-weigh-tile .bars i:nth-child(1) { height: 34px; }
.scr-weigh-tile .bars i:nth-child(2) { height: 32px; }
.scr-weigh-tile .bars i:nth-child(3) { height: 31px; }
.scr-weigh-tile .bars i:nth-child(4) { height: 30px; }
.scr-weigh-tile .bars i:nth-child(5) { height: 28px; }
.scr-weigh-tile .bars i:nth-child(6) { height: 27px; }
.scr-weigh-tile .bars i:nth-child(7) { height: 27px; }
.scr-weigh-tile .bars i:nth-child(8) { height: 26px; }
.scr-weigh-tile .bars i:nth-child(9) { height: 25px; }

.scr-weigh-in {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--chapter-weight);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.scr-tabs {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 52px;
  padding: 4px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(26, 36, 51, 0.35), 0 0 0 1px var(--divider);
}

/* Labels take their own width and share what is left, so a word never
   breaks in the middle beside the "+" action (CW-1384 home parity). */
.scr-tabs span {
  flex: 1 1 auto;
  white-space: nowrap;
  padding: 8px 0;
  border-radius: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-text);
}

.scr-tabs span.on {
  padding: 8px 6px;
  background: #dfe3e8;
  color: var(--ink-text);
}

.scr-tabs span.scr-tab-add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 2px;
  padding: 0;
  border-radius: 50%;
  background: var(--chapter-ink);
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

/* Home: what it is, and what it is not */

.what {
  padding: 12rem 0 2.5rem;
}

.what .tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--g);
  margin-top: 2.75rem;
}

.what .tiles li {
  padding: 1.75rem;
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.what .tiles li span {
  display: block;
  margin-bottom: 1.75rem;
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.09em;
  color: var(--teal);
}

.what-more {
  margin-top: 1.75rem;
  max-width: 62ch;
  color: var(--muted-text);
}

/* Home: the chapters */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--g);
  padding-top: 2.5rem;
  padding-bottom: 6.25rem;
}

.chap {
  border-radius: 1.75rem;
  padding: min(2.5rem, 3.5vw);
}

.span-12 { grid-column: span 12; }
.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }

.chap h2 {
  margin-top: 0.625rem;
  font-size: min(clamp(1.875rem, 3vw, 2.75rem), 11vw);
  line-height: 1.05;
}

.chap-text p {
  margin-top: 0.875rem;
  max-width: 52ch;
  color: var(--muted);
}

.chap > .example,
.chap > .slip {
  margin-top: 1.75rem;
}

.doses-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.75rem;
  align-items: center;
}

.doses-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.doses-two .tile p.cycle-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-text);
}

/* The seven-day band, the Doses chapter's second row (from Home B) */
.cycle-band {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ink-line);
}

.cycle-band h3 {
  margin-top: 0.75rem;
  max-width: 22ch;
  font-family: var(--display);
  font-size: min(clamp(1.625rem, 2.6vw, 2.375rem), 10vw);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rings {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.rings li {
  container-type: inline-size;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--on-deep-muted);
}

.rings .ring-day {
  position: relative;
  display: block;
  margin-bottom: 0.875rem;
}

.rings img {
  width: 100%;
  height: auto;
}

.rings b {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-family: var(--display);
  font-size: max(13px, 32cqi);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.cycle-fine {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--g);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-line);
  color: var(--on-deep-muted);
}

.wt-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 1.25rem;
}

.wt-row .num {
  font-size: min(clamp(3.5rem, 6vw, 5.5rem), 22vw);
}

.wt-row dl {
  text-align: right;
}

.wt-row dt {
  font-size: 0.875rem;
  color: var(--muted);
}

.wt-row dd {
  font-weight: 600;
}

.wt-row dd + dt {
  margin-top: 0.375rem;
}

.chap .example .tile {
  margin-top: 1.5rem;
}

.measure .num {
  margin-top: 0.625rem;
  font-size: 2.5rem;
  color: var(--measures-fill);
}

/* Date, entry and tag on one line; the entry, then the tag, wrap under the
   date when 200% text leaves no room. */
.logbook dl > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  align-items: center;
  padding: 0.8125rem 0;
  border-top: 1px solid var(--divider);
  font-size: 0.9375rem;
}

.logbook dt {
  font-size: 0.875rem;
  color: var(--muted-text);
}

.logbook dt {
  flex: 0 0 6rem;
}

.logbook dd {
  flex: 1 1 9rem;
  min-width: 0;
}

.logbook dd:last-child {
  flex: none;
}

.logbook dd i {
  font-style: normal;
}

.tag {
  display: inline-block;
  padding: 0.375rem 0.625rem;
  border-radius: 0.625rem;
  background: var(--chapter-ink);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

.tag.weight {
  background: var(--chapter-weight);
}

.tag.checkin {
  background: var(--chapter-checkins);
  color: var(--checkin-fill);
}

/* Home: the Progress Report */

.report-band {
  padding: 6.25rem 0;
}

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--g);
  align-items: center;
}

.split > :first-child {
  grid-column: 1 / span 6;
}

.split > :last-child {
  grid-column: 8 / span 5;
}

.report-band .lede {
  margin-top: 1.5rem;
  max-width: 48ch;
}

.report-band .split > :first-child > p:not(.eyebrow):not(.lede) {
  margin-top: 1rem;
  max-width: 54ch;
  color: var(--muted-text);
}

.a4 {
  max-width: 28rem;
  margin-left: auto;
  padding: 2.25rem 2.25rem 1.875rem;
  overflow-wrap: anywhere;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink-text);
  font-size: 0.8125rem;
  box-shadow: 0 30px 70px -30px rgba(26, 36, 51, 0.5);
  transform: rotate(-2deg);
}

.report-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 2px solid var(--teal);
  font-size: 0.8125rem;
  color: var(--muted-text);
}

.report-head > * {
  min-width: 0;
  max-width: 100%;
}

.report-head span:first-child {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink-text);
}

.a4 section {
  margin-top: 1rem;
}

.a4 h3 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

/* A drawn weekly weight line, like the report's weight chart. */
.report-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 0.5rem;
  overflow: visible;
}

.report-chart .grid {
  stroke: var(--divider);
  stroke-width: 1;
}

.report-chart polyline {
  fill: none;
  stroke: var(--chapter-weight);
  stroke-width: 2;
  stroke-linejoin: round;
}

.report-chart circle {
  fill: var(--chapter-weight);
}

.a4 section p {
  margin-top: 0.125rem;
  color: var(--muted-text);
}

.a4 .report-foot {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--divider);
  color: var(--muted-text);
}

/* Home: kept for you */

.keep {
  padding: 6.25rem 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--g);
  margin-top: 2.75rem;
}

.tiles h3,
.cards h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tiles .tile p,
.cards .tile p {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--muted-text);
}

.keep-help {
  margin-top: 2rem;
  max-width: 62ch;
  color: var(--muted-text);
}

/* Home: closing band */

.close {
  margin: 0 1.5rem 1.5rem;
  padding: 5.5rem 0;
  border-radius: 2.5rem;
  text-align: center;
}

.close .mark {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.75rem;
}

.close .h2 {
  margin: 0 auto;
}

.close p {
  margin: 1.125rem auto 0;
  max-width: 52ch;
  color: var(--muted);
}

.close .stores {
  justify-content: center;
  margin-top: 2rem;
}

/* Page heads (Features, Support, the legal pages and the 404 page) */

.page-head {
  padding: 4.5rem 0 4rem;
}

.page-head h1 {
  margin-top: 1.25rem;
  max-width: 16ch;
  font-size: min(clamp(2.5rem, 4.6vw, 4.25rem), 12vw);
  line-height: 1.02;
}

.page-head .lede {
  margin-top: 1.5rem;
  max-width: 56ch;
}

.page-head .lede + p {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--muted);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-meta b {
  color: var(--ink);
  font-weight: 500;
}

/* Features */

.index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2.5rem;
}

.index .dchip.k5 {
  background: var(--chapter-ink);
}

.index .dchip.plain {
  background: #ffffff;
  color: var(--ink-text);
  box-shadow: var(--shadow);
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--g);
  padding-bottom: 6.25rem;
}

.fc {
  padding: min(2.75rem, 4vw);
  scroll-margin-top: 1rem;
}

.fc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.fc-head > * {
  min-width: 0;
}

.fc-head h2 {
  font-size: min(clamp(2rem, 3.4vw, 3.25rem), 11vw);
  line-height: 1;
}

.fc-head > p {
  max-width: 38ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Three cards a row (two for .two) at desktop, two on tablets and one on
   phones, as in the Features mockup. The wide card spans two columns beside
   the first card; dense placement fills the gap it leaves on tablets. */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 1rem;
}

.cards.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards .tile {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.cards .tile p {
  flex: 1;
}

.cards .where {
  margin-top: 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
}

.cards .wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

.cards .wide .ring-count {
  width: min(7rem, 100%);
  height: auto;
  aspect-ratio: 1;
}

.cards .wide .ring-count b {
  font-size: 2.5rem;
}

.on-paper-card {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.on-paper-card .tile {
  background: var(--paper);
  box-shadow: none;
}

.note {
  padding: 1.75rem 2rem;
  border-radius: 1.25rem;
  background: #ffffff;
  color: var(--muted-text);
  box-shadow: var(--shadow-soft);
}

.note b {
  color: var(--ink-text);
}

.note a {
  color: var(--ink-text);
}

/* Legal pages: contents and prose */

.legal-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--g);
  align-items: start;
  padding-top: 4.5rem;
  padding-bottom: 7rem;
}

/* The contents stay in view while the page scrolls, and scroll on their own
   when larger text makes them taller than the window, so a focused link is
   never left below the bottom edge (CW-1384 QA). */
.toc {
  grid-column: 1 / span 3;
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 0.9375rem;
}

.toc-h {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.375rem 0 0.375rem 1rem;
  border-left: 2px solid var(--divider);
  color: var(--muted-text);
  text-decoration: none;
  line-height: 1.35;
}

/* The contents scroll on their own, so the focus ring sits inside the link
   where the scroll box cannot clip it. */
.toc a:focus-visible {
  outline-offset: -3px;
}

.toc a:hover {
  border-color: var(--teal);
  color: var(--ink-text);
}

.prose {
  grid-column: 5 / span 8;
  max-width: 42.5rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2 {
  margin-top: 3rem;
  font-size: min(1.875rem, 9vw);
  line-height: 1.2;
  scroll-margin-top: 1rem;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: 1rem;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.75rem;
}

.prose ul li,
.prose ol li {
  margin-top: 0.75rem;
}

.prose ul li {
  position: relative;
  padding-left: 1.375rem;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 8px;
  height: 2px;
  background: var(--teal);
}

.prose strong {
  font-weight: 600;
}

.prose li > strong:first-child {
  display: block;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
}

.callout {
  padding: 1.375rem 1.5rem;
  overflow-wrap: anywhere;
  border-left: 4px solid var(--teal);
  border-radius: 0 1.25rem 1.25rem 0;
  background: var(--surface);
  scroll-margin-top: 1rem;
}

.callout > * + * {
  margin-top: 0.75rem;
}

.callout-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
}

.callout.is-gap {
  border-left-color: #bc7d1c;
}

.callout.is-gap .callout-title {
  color: #7a4f0f;
}

/* The logging-tool disclaimer: its own callout on the legal and support
   pages, as in the shared legal template (CW-1381), not a line of prose. */
.callout.is-disclaimer {
  border-left-color: var(--chapter-ink);
  color: var(--ink-text);
  font-weight: 500;
}

.page-head .callout.is-disclaimer {
  margin-top: 1.5rem;
  max-width: 62ch;
}

.steps {
  counter-reset: step;
}

.prose ol.steps li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1.25rem 0 1.25rem 4rem;
  border-top: 1px solid var(--divider);
}

.prose ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1.125rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-weight: 600;
}

/* Delete account: a short summary first, then numbered sections. */
.summary {
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider);
}

.prose .summary-title {
  margin-top: 0;
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
}

.prose h2 .num {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.75rem;
  padding: 0 0.5rem;
  border-radius: 0.75rem;
  background: var(--chapter-ink);
  color: #ffffff;
  font-size: 1.125rem;
  vertical-align: 0.15em;
}

.closing-links {
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
}

.closing-links > * + * {
  margin-top: 0.75rem;
}

/* A table can scroll sideways on a narrow screen or with large text, so its
   container is a named, keyboard-reachable region (role="region",
   aria-labelledby, tabindex="0"). */
.table-scroll {
  overflow-x: auto;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--paper);
}

tr:last-child td {
  border-bottom: 0;
}

/* Support */

.support-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--g);
  align-items: start;
  padding-top: 4.5rem;
  padding-bottom: 6.25rem;
}

.support-aside {
  grid-column: 1 / span 4;
  display: grid;
  gap: 1.5rem;
}

.support-body .prose {
  grid-column: 6 / span 7;
}

.contact-card {
  padding: 2rem;
  overflow-wrap: anywhere;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider);
}

.contact-card h2 {
  font-family: var(--display);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact-card p {
  margin-top: 0.75rem;
  color: var(--muted-text);
}

.contact-card .contact-line {
  color: var(--ink-text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 3.25rem;
  padding: 0.5rem 1.5rem;
  border-radius: 1rem;
  background: var(--chapter-ink);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button:hover {
  background: var(--chapter-ink-top);
}

/* Common questions open and close in place (details and summary, no
   script). Each row is one question; the sign shows whether it is open. */
.faq-item {
  border-top: 1px solid var(--divider);
  scroll-margin-top: 1rem;
}

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

.prose .faq-item + .faq-item {
  margin-top: 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--divider);
  color: var(--teal);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item summary:hover h3 {
  color: var(--teal);
}

/* The question can shrink and break a long word, so the sign never gets
   pushed off a narrow screen at large text sizes. */
.faq h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  font-family: var(--display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.faq-item > p {
  margin: 0;
  padding-bottom: 1.375rem;
}

.contact-card .button {
  width: 100%;
}

/* Not found */

.links {
  display: grid;
  gap: 0.5rem;
  margin-top: 2rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 500;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 4.5rem 0 2.25rem;
  background: var(--paper);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem var(--g);
}

.foot-blurb {
  margin-top: 1rem;
  max-width: 36ch;
  font-size: 0.9375rem;
  color: var(--muted-text);
}

.site-footer .stores {
  margin-top: 1.375rem;
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem var(--g);
}

.foot-nav h2 {
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0;
  font-size: 0.9375rem;
  text-decoration: none;
}

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

.foot-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--teal);
}

.foot-note {
  margin-top: 3rem;
  padding: 1.125rem 1.375rem;
  border: 1px solid var(--divider);
  border-radius: 0.875rem;
  font-size: 0.875rem;
  color: var(--muted-text);
}

.foot-base {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  font-size: 0.875rem;
  color: var(--muted-text);
}

.foot-base a {
  color: var(--ink-text);
}

/* The wordmark line on the left and the copyright on the right, as in the
   CW-1381 reference footer; on a phone the copyright takes its own line. */
.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.75rem;
}

.foot-by {
  flex: 1 1 32rem;
  min-width: 0;
}

.foot-copy {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}

@media (max-width: 43.75rem) {
  .foot-copy {
    margin-left: 0;
    width: 100%;
  }
}

/* The cr8veworks wordmark, as in the shared page footer (CW-1381). It is the
   company's own outlined file, never live type; its red Full Stop ends the
   sentence. It grows with the text and shrinks to fit a narrow screen. */
.cw {
  color: var(--ink-text);
}

.cw-wordmark {
  display: inline-block;
  width: auto;
  height: 1.05em;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  vertical-align: -0.1em;
}

/* Tablet */

@media (max-width: 62.5rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .doses-row,
  .doses-two,
  .split,
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .split > :first-child,
  .split > :last-child {
    grid-column: auto;
  }

  .hero-copy {
    padding-bottom: 2rem;
  }

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

  .folder {
    left: 0;
  }

  .what .tiles,
  .cycle-fine {
    grid-template-columns: minmax(0, 1fr);
  }

  .rings {
    grid-template-columns: repeat(auto-fill, minmax(min(5.5rem, 100%), 1fr));
  }

  /* One column: twelve columns' gaps alone outgrow a phone at 200% text. */
  .bento,
  .legal-body,
  .support-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .span-12,
  .span-7,
  .span-5 {
    grid-column: 1 / -1;
  }

  .a4 {
    margin: 2.25rem auto 0;
    transform: none;
  }

  .chap .tile,
  .chap .slip,
  .fc .tile,
  .fc .slip {
    padding: min(1.25rem, 4vw);
  }

  .toc,
  .prose,
  .support-aside,
  .support-body .prose {
    grid-column: 1 / -1;
  }

  /* Phones and tablets go straight to the text, as in the shared mockup;
     every section heading stays in the page. */
  .toc {
    display: none;
  }

  .legal-body,
  .support-body {
    padding-top: 2.5rem;
    padding-bottom: 4.5rem;
  }

  .page-head {
    padding: 3.5rem 0 2.5rem;
  }
}

/* Phone */

@media (max-width: 43.75rem) {
  .hero {
    border-radius: 0 0 2.25rem 2.25rem;
    padding-top: 1.75rem;
  }

  .hero h1 {
    margin-top: 1.75rem;
  }

  .folder {
    display: none;
  }

  .illustration {
    width: min(300px, 100%);
  }

  .what {
    padding-top: 12rem;
  }

  .what .tiles li {
    padding: 1.375rem;
    font-size: 1.375rem;
  }

  .what .tiles li span {
    margin-bottom: 1rem;
  }

  .bento {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
  }

  /* Nested padding is capped by the screen width, so 200% text keeps the
     room it needs inside a chapter, a card and an example. */
  .chap,
  .fc {
    padding: min(1.5rem, 6vw);
    border-radius: 1.5rem;
  }

  .chap .tile,
  .chap .slip,
  .fc .tile,
  .fc .slip {
    padding: min(1.25rem, 5vw);
  }

  .wt-row dl {
    text-align: left;
  }

  .logbook dt {
    flex-basis: 100%;
  }

  .report-band,
  .keep {
    padding: 4rem 0;
  }

  .a4 {
    padding: 1.625rem;
  }

  .close {
    margin: 0 0.75rem 0.75rem;
    padding: 3.5rem 0;
    border-radius: 1.75rem;
  }

  .cards,
  .cards.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards .wide {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .foot-nav > div {
    /* Keep two equal columns while the longest words fit. */
    flex: 0 1 calc((100% - var(--g)) / 2);
    min-width: auto;
  }

  .site-footer {
    padding: 3rem 0 1.75rem;
  }

  .contact-card {
    padding: 1.375rem;
  }

  .prose ol.steps li {
    padding-left: 3.25rem;
  }
}
