/*
 * docutrip.app (ADR-0028), in Calm (ADR-0061, docs/design/site.md; the
 * canvas's A boards): one stylesheet, the app's own colours (written by
 * `npm run tokens` from docs/design/tokens.json, R2 — change them there), the
 * phone's own fonts, nothing from outside. Phone first (390 wide); from
 * 1024 px the bar becomes a sidebar. Light and dark: the device's, or the
 * visitor's own pick (`data-theme`, set by site.js).
 */
:root {
  /* tokens:begin light */
  --accent: #0a6e6e;
  --accent-text: #0a6e6e;
  --accent-soft: #ddefee;
  --on-accent: #ffffff;
  --warn: #b04e00;
  --warn-soft: #ffeedd;
  --ok: #1e7b36;
  --ok-soft: #e2f4e6;
  --bad: #c4291c;
  --bad-soft: #fde7e5;
  --info: #0b63c4;
  --muted: #5c5c63;
  --line-strong: #8e8e93;
  --sunken: #e9e9ee;
  --info-soft: #e3eefb;
  --sidebar: #ebebf0;
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #111114;
  --line: #e2e2e7;
  --code: #f6f6f9;
  /* tokens:end */
  /* A drawn iPhone's frame (not a colour of the page) and a soft lift. */
  --phone: #1c1c1e;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --glass: rgba(250, 250, 252, 0.86);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* tokens:begin dark */
    --accent: #5ed1cf;
    --accent-text: #5ed1cf;
    --accent-soft: #123b3b;
    --on-accent: #062a2a;
    --warn: #ff9f45;
    --warn-soft: #3a2511;
    --ok: #4cd472;
    --ok-soft: #12301b;
    --bad: #ff6b5e;
    --bad-soft: #3b1512;
    --info: #64a8ff;
    --muted: #aeaeb5;
    --line-strong: #8e8e93;
    --sunken: #2c2c2e;
    --info-soft: #132a44;
    --sidebar: #111113;
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --line: #2e2e31;
    --code: #141416;
    /* tokens:end */
    --phone: #3a3a3c;
    --shadow: none;
    --glass: rgba(30, 30, 32, 0.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  /* tokens:begin picked */
  --accent: #5ed1cf;
  --accent-text: #5ed1cf;
  --accent-soft: #123b3b;
  --on-accent: #062a2a;
  --warn: #ff9f45;
  --warn-soft: #3a2511;
  --ok: #4cd472;
  --ok-soft: #12301b;
  --bad: #ff6b5e;
  --bad-soft: #3b1512;
  --info: #64a8ff;
  --muted: #aeaeb5;
  --line-strong: #8e8e93;
  --sunken: #2c2c2e;
  --info-soft: #132a44;
  --sidebar: #111113;
  --bg: #000000;
  --card: #1c1c1e;
  --text: #f2f2f7;
  --line: #2e2e31;
  --code: #141416;
  /* tokens:end */
  --phone: #3a3a3c;
  --shadow: none;
  --glass: rgba(30, 30, 32, 0.82);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
/* What a page hides stays hidden, whatever a layout below says. */
[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: hidden must beat any layout rule */
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    17px / 1.45 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    system-ui,
    "Segoe UI",
    Roboto,
    sans-serif;
}
a {
  color: var(--accent-text);
}
a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
svg {
  flex: none;
}
.num {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip:focus {
  top: 8px;
}

/* ── The pages' own parts, in Calm. ── */
h1 {
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0 12px;
}
h2 {
  font-size: 24px;
  line-height: 1.25;
  margin: 36px 0 12px;
}
h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 20px 0 6px;
}
p,
li {
  max-width: 68ch;
}
.lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 15px;
}
@media (min-width: 1024px) {
  h1 {
    font-size: 40px;
  }
  .lead {
    font-size: 21px;
  }
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0;
}
.card > :first-child {
  margin-top: 0;
}
.card > :last-child {
  margin-bottom: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.cards .card {
  margin: 0;
  padding: 20px;
}
a.card {
  display: block;
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px transparent;
}
a.card:hover {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.card .icon {
  font-size: 28px;
  line-height: 1;
}
.card h3 {
  margin: 8px 0 4px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  padding-left: 1.4em;
}
.steps li {
  margin: 8px 0;
}

.button,
button {
  font: inherit;
  font-weight: 600;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.button.quiet,
button.quiet {
  background: var(--sunken);
  color: var(--accent-text);
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--sunken);
  border-radius: 6px;
  padding: 1px 5px;
}
textarea {
  width: 100%;
  min-height: 180px;
  font:
    15px / 1.45 ui-monospace,
    "SF Mono",
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
}
textarea.short {
  min-height: 80px;
  font: inherit;
}
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  min-height: 50px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
}
textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent);
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.pair input {
  min-width: 0;
}
label {
  font-weight: 600;
  font-size: 16px;
  display: block;
  margin: 16px 0 6px;
}
input[type="file"] {
  font: inherit;
  max-width: 100%;
}

.note {
  border-radius: 14px;
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--accent-soft);
}
.note.ok {
  background: var(--ok-soft);
}
.note.warn {
  background: var(--warn-soft);
}
.note.bad {
  background: var(--bad-soft);
}
.private {
  border-radius: 20px;
  padding: 20px;
  margin: 24px 0;
  background: var(--accent-soft);
}

details {
  background: var(--card);
  border-radius: 14px;
  padding: 0 16px;
  margin: 8px 0;
}
summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}
details[open] {
  padding-bottom: 14px;
}

/* The checker's result. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}
.stats li {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 16px;
}
.stats b {
  font-size: 26px;
  line-height: 1.2;
  display: block;
  font-variant-numeric: tabular-nums;
}
.lines {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.lines li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  word-break: break-word;
}
.lines .n {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

/* ── The frame: on a phone a bar on top; from 1024 px a sidebar. ── */
.side {
  background: var(--bg);
  padding: 8px 16px 4px;
}
.side-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
}
.mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.safe {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 15px;
  font-weight: 600;
}
.theme-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: var(--sunken);
  color: var(--accent-text);
  font: 600 16px / 1 inherit;
  cursor: pointer;
}
.theme-toggle[hidden],
.theme[hidden] {
  display: none;
}

/* Get the app: a note that it is coming, not a button that leads nowhere. */
.getapp,
.getapp[open] {
  position: relative;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
.getapp summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
}
.getapp summary::-webkit-details-marker {
  display: none;
}
.getapp .pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  width: min(300px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.4;
}

/* On a phone the pages share one row; a narrow screen scrolls it sideways. */
.nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0;
  margin: 4px -8px 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav li.home {
  display: none;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav a svg {
  display: none;
}
.nav a:hover {
  background: var(--sunken);
}
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}
.side-more,
.topbar {
  display: none;
}

/* A section's own pages, as one segmented row. */
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  margin: 0 0 20px;
  border-radius: 12px;
  background: var(--sunken);
  overflow-x: auto;
}
.tabs a {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a[aria-current="page"] {
  background: var(--card);
  color: var(--accent-text);
  box-shadow: var(--shadow);
}

.page {
  display: block;
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}
.foot {
  max-width: 880px;
  margin: 32px auto 0;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.foot p {
  margin: 0 0 6px;
}
.foot b {
  color: var(--text);
}

/* From a small tablet: the promise beside the name. */
@media (min-width: 700px) {
  .side {
    padding: 8px 32px 4px;
  }
  .safe {
    display: inline-flex;
  }
  .nav ul {
    justify-content: flex-start;
    gap: 4px;
    margin: 4px 0 0;
  }
  .nav a {
    padding: 0 14px;
  }
  .page {
    padding: 24px 32px 56px;
  }
  .foot {
    padding: 28px 32px 48px;
  }
}

/* From 1024 px: Calm's desktop — the sidebar, a top bar, the page beside. */
@media (min-width: 1024px) {
  .shell {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    min-height: 100vh;
  }
  .side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 14px;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
  }
  .side-top {
    padding: 0 10px 12px;
  }
  .side-top .safe,
  .side-top .theme-toggle,
  .side-top .getapp {
    display: none;
  }
  .brand {
    font-size: 22px;
  }
  .mark {
    width: 32px;
    height: 32px;
  }
  .nav ul {
    flex-direction: column;
    gap: 2px;
    margin: 0;
  }
  .nav li.home {
    display: block;
  }
  .nav a {
    display: flex;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 17px;
  }
  .nav a svg {
    display: block;
  }
  .nav a[aria-current="page"] {
    background: var(--card);
    color: var(--accent-text);
    box-shadow: var(--shadow);
  }
  .side-more {
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  .sec {
    margin: 18px 12px 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .here {
    margin: 0 12px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
  }
  .side-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .proof {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    background: var(--ok-soft);
    font-size: 15px;
    line-height: 1.35;
  }
  .side .proof svg {
    color: var(--ok);
    margin-top: 2px;
  }
  .theme {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 11px;
    background: var(--sunken);
  }
  .theme button {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: 600 16px / 1 inherit;
    cursor: pointer;
  }
  .theme button[aria-pressed="true"] {
    background: var(--card);
    color: var(--accent-text);
    box-shadow: var(--shadow);
  }
  .body {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 12px 32px;
    border-bottom: 1px solid var(--line);
  }
  .crumb {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .crumb a {
    color: var(--muted);
    text-decoration: none;
  }
  .crumb span:last-child {
    color: var(--accent-text);
  }
  .page {
    width: 100%;
    max-width: 1040px;
    padding: 32px 40px 56px;
  }
  .foot {
    width: 100%;
    max-width: 1040px;
    margin-top: auto;
    padding: 28px 40px 40px;
  }
}

/* On a desktop, Get the app is the quiet kind (the A-Calm-Desktop board). */
.topbar .getapp summary {
  background: var(--sunken);
  color: var(--accent-text);
  border-radius: 12px;
}

/* ── Home (S5b): the words and the iPhone, how it works, your AI, the proof. ── */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}
.badge.accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.warn,
.badge.lock {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.info {
  background: var(--info-soft);
  color: var(--info);
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.page-index {
  max-width: 1200px;
}
.hero {
  display: grid;
  gap: 32px;
  padding: 16px 0 40px;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero-text > * {
  margin: 0;
}
.display {
  font-size: 40px;
  line-height: 44px;
  letter-spacing: -0.02em;
}
.hero-phone {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.hero-phone figcaption {
  max-width: 320px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}
.band {
  padding: 8px 0 40px;
}
.band h2 {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 34px;
}
.band .lead {
  margin: -8px 0 20px;
}
.grid3 {
  display: grid;
  gap: 16px;
}
ol.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step,
.way {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: none;
  padding: 24px;
  border-radius: 20px;
  background: var(--card);
}
.step h3,
.way h3 {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
}
.step p,
.way p {
  margin: 0;
  color: var(--muted);
}
.stepn {
  color: var(--accent-text);
  font-size: 44px;
  line-height: 48px;
  font-weight: 700;
}
.small-button {
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  padding: 0 16px;
  font-size: 16px;
}
.proof-band {
  display: grid;
  gap: 24px;
  margin: 8px 0 16px;
  padding: 28px 20px;
  border-radius: 20px;
  background: var(--accent-soft);
}
.proof-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 34px;
}
.proof-text p {
  margin: 0 0 20px;
  font-size: 19px;
  line-height: 1.5;
}
.facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card);
}
.facts b {
  color: var(--ok);
}
@media (min-width: 700px) {
  .display {
    font-size: 52px;
    line-height: 56px;
  }
  .grid3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .proof-band {
    padding: 40px;
  }
}
@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 64px;
    align-items: center;
    padding: 24px 0 64px;
  }
  .display {
    font-size: 64px;
    line-height: 68px;
    letter-spacing: -0.025em;
  }
  .band h2 {
    font-size: 34px;
    line-height: 41px;
  }
  .proof-band {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
  }
  .proof-text h2 {
    font-size: 34px;
    line-height: 41px;
  }
}

/* The iPhone, drawn: its screen is the app's, its words are the core's. */
.phone {
  width: 320px;
  height: 660px;
  flex: none;
  padding: 10px;
  border-radius: 50px;
  background: var(--phone);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
}
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 40px;
  background: var(--bg);
  color: var(--text);
}
.island {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  border-radius: 20px;
  background: #000;
}
.pbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 48px 12px 6px;
}
.glass {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--accent-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.ptitle {
  flex: 1;
  flex-direction: column;
  padding: 3px 10px;
  color: var(--text);
  line-height: 1.2;
}
.ptitle b {
  font-size: 13px;
}
.pmode {
  color: var(--muted);
  font-size: 10px;
}
.pbody {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding: 8px 12px 80px;
  font-size: 13px;
  line-height: 17px;
}
.pwait {
  margin: 0;
  color: var(--muted);
}
.phead {
  padding: 2px 2px 4px;
}
.pday {
  font-size: 22px;
  line-height: 27px;
  font-weight: 700;
}
.psub {
  color: var(--muted);
  font-size: 12px;
}
.pcard {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--card);
}
.pnow {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.plabel {
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
}
.ptime {
  flex: none;
  font-weight: 600;
}
.pnow .ptime {
  color: var(--warn);
  font-size: 20px;
}
.ptag {
  align-self: flex-start;
  margin-top: 2px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
}
.pstay {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.pdot {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: var(--bad);
}
.ptiles {
  display: flex;
}
.ptile {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
}
.pl {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--card);
}
.pl .ptime {
  width: 40px;
}
.pl.booked .ptime,
.pl.book .ptime {
  color: var(--warn);
}
.pl.idea {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.pl.choice {
  background: var(--sunken);
}
.pwords {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pchips {
  display: flex;
  margin: -6px 0 -4px;
}
.ptabs {
  position: absolute;
  left: 12px;
  right: 58px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 50px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.pask {
  position: absolute;
  right: 12px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--accent-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.screen .ptab {
  min-height: 44px;
  min-width: 0;
  padding: 0 9px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 44px;
}
.screen .ptab[aria-pressed="true"] {
  background: var(--sunken);
  color: var(--accent-text);
}
/* A day's chip: 44 points to tap, a small pill to see. */
.screen .pchip {
  min-height: 44px;
  padding: 0 3px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.pchip span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
}
.pchip[aria-pressed="true"] span {
  background: var(--accent);
  color: var(--on-accent);
}

.plater {
  margin-top: 4px;
  color: var(--muted);
}
.plate {
  padding: 0 2px;
  font-size: 13px;
}

/* ── Start a new plan (S5c): four steps; one at a time on a phone. ── */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
fieldset {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}
.lbl {
  display: block;
  padding: 0;
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 16px;
}
.flow-head h1 {
  margin-top: 0;
}
.stepper {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
}
.stepper button,
.seg button,
.chips button,
button.plain {
  min-height: 44px;
  font-size: 16px;
}
.stepper button {
  flex: none;
  justify-content: center;
  gap: 10px;
  min-width: 52px;
  min-height: 52px;
  padding: 6px 12px;
  background: var(--card);
  color: var(--muted);
  font-weight: 500;
  text-align: left;
}
/* Only the step you are on says its name; the others show their number. */
.stepper button:not([aria-current="step"]) .sl {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stepper button[aria-current="step"] {
  flex: 1;
  justify-content: flex-start;
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.sn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
}
.fstep h2 .sn,
.stepper [aria-current="step"] .sn {
  background: var(--accent);
  color: var(--on-accent);
}
.fstep {
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
}
.fstep h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 22px;
}
.fstep label:first-of-type {
  margin-top: 12px;
}
.fstep input,
.fstep textarea,
.fstep select {
  background: var(--bg);
}
/* On a phone, one step at a time; from 1024 px every step shows. */
@media (max-width: 1023px) {
  .flow[data-step="1"] .fstep:not([data-n="1"]),
  .flow[data-step="2"] .fstep:not([data-n="2"]),
  .flow[data-step="3"] .fstep:not([data-n="3"]),
  .flow[data-step="4"] .fstep:not([data-n="4"]) {
    display: none;
  }
}
.seg button {
  white-space: nowrap;
}
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--sunken);
}
.seg button {
  flex: 1;
  padding: 0 8px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}
.seg button[aria-pressed="true"] {
  background: var(--card);
  color: var(--accent-text);
  box-shadow: var(--shadow);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips button {
  padding: 0 16px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line);
}
.chips button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--accent);
}
button.plain {
  padding: 0 8px;
  background: transparent;
  color: var(--accent-text);
}
.row-between,
.buttons.between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.buttons.end {
  justify-content: flex-end;
}
.buttons.center,
.center-text {
  justify-content: center;
  text-align: center;
}
.code-box {
  min-height: 260px;
  font-size: 14px;
  line-height: 21px;
}
.short-code {
  min-height: 140px;
}
.badge.live {
  font-size: 14px;
}
.fstep .hero-phone {
  margin: 8px 0 16px;
}
.pnext {
  gap: 4px;
  padding: 16px;
}
.pbig {
  font-size: 22px;
  line-height: 26px;
}
.pempty {
  padding: 14px;
  border-radius: 14px;
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* From 1024 px: the steps on the left, the iPhone beside them. */
@media (min-width: 1024px) {
  .stepper,
  .fstep .nav-row,
  .badge.live {
    display: none;
  }
  .flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
  }
  .flow .fstep[data-n="4"] {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: sticky;
    top: 20px;
    padding: 20px 10px;
  }
  .page-builder {
    max-width: 1200px;
  }
}

/* From 1600 px: all four steps in a row, as the A-Calm-Desktop board. */
@media (min-width: 1600px) {
  .page-builder {
    max-width: none;
  }
  .flow {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr) 340px;
  }
  .flow .fstep[data-n="4"] {
    grid-column: 4;
    grid-row: 1;
  }
  .badge.live {
    display: inline-flex;
  }
  .fstep .pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  #message {
    min-height: 620px;
  }
}

/* ── Check a plan (S5d): the drop, the report, the doc line by line. ── */
.drop {
  margin: 0 0 20px;
}
.drop-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 32px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 20px;
  background: var(--card);
  color: var(--accent-text);
  text-align: center;
  font-weight: 400;
  cursor: pointer;
}
.drop-in b {
  color: var(--text);
  font-size: 19px;
}
.drop:focus-within .drop-in {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.drop.over .drop-in {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop details {
  margin-top: 12px;
}
.drop .buttons {
  align-items: center;
}
.checker {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.report-side {
  min-width: 0;
}
.before {
  display: none;
  margin-top: 0;
}
.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.summary > div {
  flex: 1;
  min-width: 150px;
}
.summary h2 {
  margin: 0 0 4px;
}
.summary p {
  margin: 0;
}
.ring {
  flex: none;
}
.ring circle {
  fill: none;
  stroke-width: 12;
}
.ring-bg {
  stroke: var(--sunken);
}
.ring-arc {
  stroke: var(--accent);
  stroke-linecap: round;
}
.ring-arc.done {
  stroke: var(--ok);
}
.ring text {
  fill: var(--text);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stats.four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats.four span {
  display: block;
  font-size: 15px;
}
.issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.issue {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font-weight: 400;
  text-align: left;
}
button.issue {
  justify-content: flex-start;
}
.issue-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.issue-words .muted {
  font-size: 15px;
}
.ico {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--sunken);
  color: var(--accent-text);
}
.ico::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}
.tone-ok .ico {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  background: var(--ok-soft);
  color: var(--ok);
}
.tone-lock .ico {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E");
  background: var(--warn-soft);
  color: var(--warn);
}
.tone-warn .ico {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E");
  background: var(--info-soft);
  color: var(--info);
}
.tone-info .ico {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E");
}
#fix-box {
  margin-bottom: 16px;
}
#fix-box h3 {
  margin: 0 0 4px;
}
.keys {
  display: inline-flex;
  gap: 6px;
}
.doc-side .row-between {
  margin-bottom: 8px;
}
.doc {
  position: relative;
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 8px 0;
  border-radius: 16px;
  background: var(--card);
  list-style: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 21px;
}
.doc li {
  display: flex;
  gap: 12px;
  padding: 1px 12px 1px 0;
  border-left: 4px solid transparent;
}
.doc .g {
  flex: none;
  width: 3.2em;
  color: var(--muted);
  text-align: right;
  user-select: none;
}
.doc .t {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doc li.warn {
  border-left-color: var(--info);
  background: var(--info-soft);
}
.doc li.lock {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}
.doc li.hit {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* From 1024 px: the doc on the left, staying in view; the report beside it. */
@media (min-width: 1024px) {
  .page-check {
    max-width: 1400px;
  }
  .checker {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .before {
    display: block;
  }
  .doc-side {
    position: sticky;
    top: 20px;
  }
  .doc {
    max-height: calc(100vh - 120px);
  }
  .stats.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* On a phone, the report first and the doc after it. */
@media (max-width: 1023px) {
  .doc-side {
    order: 2;
  }
}

/* ── Guides, Privacy and the wrong address (S5e). ── */
.guide-list {
  display: none;
}
.guide-body > h1 {
  margin-top: 0;
}
.prevnext {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.prevnext [rel="next"] {
  margin-left: auto;
}
.habits {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.habit {
  margin: 0;
}
.habits .habit summary {
  gap: 12px;
}
.habit .num {
  color: var(--accent-text);
  font-weight: 700;
}
.habit .pair {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.habit .badge {
  margin-bottom: 6px;
}
pre.code {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--code);
  font-size: 15px;
  line-height: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.path {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.path li {
  position: relative;
  margin: 0;
  padding: 20px;
  border-radius: 20px;
}
.path h2 {
  margin: 10px 0 6px;
  font-size: 21px;
}
.path .arrow {
  position: absolute;
  left: 50%;
  bottom: -28px;
  margin-left: -14px;
  color: var(--line-strong);
  transform: rotate(90deg);
}
.none-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 20px;
  padding: 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 20px;
}
.none-box b {
  font-size: 19px;
}
.two .card {
  padding: 20px;
  border-radius: 20px;
}
.two h2 {
  margin: 0 0 12px;
  font-size: 21px;
}
.proofs,
.promises {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding-left: 1.4em;
}
.promises li::marker {
  color: var(--ok);
}
.ways {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ways a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 16px 20px;
  color: var(--text);
  text-decoration: none;
}
.ways b {
  color: var(--accent-text);
  font-size: 19px;
}

@media (min-width: 700px) {
  .habit .pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
  .two .card {
    margin: 0;
  }
}

/* From 1024 px: the guides listed beside the guide; the path drawn across. */
@media (min-width: 1024px) {
  .page-plan,
  .page-ai,
  .page-notion,
  .page-privacy {
    max-width: 1280px;
  }
  .page-plan .tabs,
  .page-ai .tabs,
  .page-notion .tabs {
    display: none;
  }
  .guide {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }
  .guide-list {
    display: block;
    position: sticky;
    top: 20px;
  }
  .guide-list ol {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .guide-list ol a {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    min-height: 64px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
  }
  .guide-list ol a[aria-current="page"] {
    box-shadow: inset 0 0 0 2px var(--accent);
  }
  .guide-list .num {
    width: 20px;
    color: var(--accent-text);
    font-weight: 700;
  }
  .guide-list b,
  .guide-list span span {
    display: block;
  }
  .guide-list span span {
    color: var(--muted);
    font-size: 15px;
  }
  .own {
    margin: 16px 0 0;
    padding: 16px;
    border-radius: 14px;
    background: var(--card);
    color: var(--muted);
    font-size: 15px;
  }
  .own b {
    display: block;
    color: var(--text);
    font-size: 16px;
  }
  .guide-body {
    padding: 36px;
    border-radius: 20px;
    background: var(--card);
  }
  .guide-body details {
    background: var(--bg);
  }
  .path {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
  .path li {
    padding: 28px;
  }
  .path .arrow {
    left: auto;
    right: -38px;
    bottom: auto;
    top: 50%;
    margin: -14px 0 0;
    transform: none;
  }
  .none-box {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
  }
  .ways {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
