/* Longform, writelongform.com. The Clothbound world from DESIGN.md: a cover, then pages.
   Cover-blue book cloth on the hero and the closing band only; flat papers everywhere else;
   Baskerville for the writer's words and the titles, Avenir Next for everything you operate.
   Dark values are the app's night papers (ios/Longform/Longform/Design/ClothboundColors.swift).
   build.py replaces asset(name) with the hashed URL of site/src/assets/name. */

:root {
  --blue: #27365b;
  --on-blue: #fdfdfa;
  --on-blue-muted: #dce5f7;
  --stamp: #eef2fa;
  --orange: #d72f01;
  --ink: #222728;
  --muted: #535956;
  --line: #cdd0c7;
  --control-line: #8a8f86;
  --soft: #eeefea;
  --paper: #f5f5f1;
  --panel: #fdfdfa;
  --active: #273f75;
  --selection: #e5e9f0;
  --primary: #27365b;
  --primary-hover: #273f75;
  --primary-press: #1d2846;
  --rule: #c4c9bf;
  --complete: #e2eae2;
  --complete-ink: #294b3c;
  --scenes: #2b736b;
  --discover: #a06921;
  --explore: #785795;
  --compose: #4d6d9a;
  --shadow: 0 18px 40px -18px rgba(20, 26, 40, .42), 0 2px 6px rgba(20, 26, 40, .10);
  --edge: rgba(20, 26, 40, .10);
  --shot: none;
  --serif: Baskerville, "Baskerville Old Face", "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1180px;
  --measure: 36rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7e9e3;
    --muted: #a9afaa;
    --line: #3a3f3c;
    --control-line: #6a706c;
    --soft: #1c1f20;
    --paper: #141617;
    --panel: #1d2021;
    --active: #9db6ea;
    --selection: #27324a;
    --primary: #34497a;
    --primary-hover: #3d5590;
    --primary-press: #2b3d66;
    --rule: #464c47;
    --complete: #22352a;
    --complete-ink: #b7d6c2;
    --scenes: #5bb0a5;
    --discover: #d39b4f;
    --explore: #b28fd0;
    --compose: #86a6d4;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
    --edge: rgba(255, 255, 255, .10);
    /* Light screenshots on a dark page: a step down, so they do not glare. */
    --shot: brightness(.84) contrast(1.02);
  }
}
:root[data-theme="dark"] {
  --ink: #e7e9e3;
  --muted: #a9afaa;
  --line: #3a3f3c;
  --control-line: #6a706c;
  --soft: #1c1f20;
  --paper: #141617;
  --panel: #1d2021;
  --active: #9db6ea;
  --selection: #27324a;
  --primary: #34497a;
  --primary-hover: #3d5590;
  --primary-press: #2b3d66;
  --rule: #464c47;
  --complete: #22352a;
  --complete-ink: #b7d6c2;
  --scenes: #5bb0a5;
  --discover: #d39b4f;
  --explore: #b28fd0;
  --compose: #86a6d4;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
  --edge: rgba(255, 255, 255, .10);
  --shot: brightness(.84) contrast(1.02);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

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

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
  scrollbar-color: var(--control-line) var(--paper);
  scroll-padding-top: 16px;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-wrap: break-word;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; min-width: 0; }
::selection { background: var(--selection); color: var(--ink); }
.cloth ::selection { background: rgba(220, 229, 247, .28); color: var(--on-blue); }
a { color: var(--active); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--active); outline-offset: 4px; border-radius: 4px; }
.cloth :focus-visible, .cover :focus-visible { outline-color: var(--on-blue); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
abbr[title] { text-decoration: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 20;
  background: var(--panel); color: var(--active); padding: 10px 14px; border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- the cover: book cloth

   One 420px tile of plain-weave cloth drawn by make_cloth.py (short over-under threads, low
   contrast), sharp at 2x. The masthead and the hero share one piece of cloth: the hero's tile is
   shifted up by the masthead's 72px so the weave runs on without a seam. */

.cloth {
  position: relative;
  background-color: var(--blue);
  background-image: url("/assets/cloth.276ea34ee0.jpg");
  background-image: image-set(url("/assets/cloth.afeb959230.webp") type("image/webp"), url("/assets/cloth.276ea34ee0.jpg") type("image/jpeg"));
  background-size: 420px 420px;
  color: var(--on-blue);
}
.cloth a:not(.btn) { color: var(--on-blue); }
.cover { background: var(--blue); color: var(--on-blue); }

/* Pressed into the cloth, tone on tone: pale cover-blue ink with a soft lip below each letter. */
.pressed {
  color: var(--stamp);
  text-shadow: 0 .03em 0 rgba(10, 15, 36, .42), 0 -.012em 0 rgba(255, 255, 255, .07);
}
@media (prefers-reduced-motion: no-preference) {
  .pressed.stamp { animation: stamp 900ms var(--ease-out) 120ms both; }
}
@keyframes stamp {
  from { text-shadow: 0 0 0 rgba(10, 15, 36, 0), 0 0 0 rgba(255, 255, 255, 0); transform: translateY(-.02em); }
  to { text-shadow: 0 .03em 0 rgba(10, 15, 36, .42), 0 -.012em 0 rgba(255, 255, 255, .07); transform: none; }
}

/* A short swelled rule, as on a title page. Only on the cover, the plan, and the closing band. */
.rule::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: .5em;
  background: var(--orange); border-radius: 2px;
}
.centered .rule::after, .rule.centered::after { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px;
  font: 600 16px/1.3 var(--sans); text-decoration: none; text-align: center;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { flex: none; }
.btn-primary { background: var(--primary); color: var(--on-blue); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-press); transform: translateY(1px); }
/* On cloth the main action is a foil label: panel paper with cover-blue type. */
.btn-foil { background: var(--on-blue); color: #27365b; box-shadow: 0 1px 0 rgba(8, 12, 30, .35), 0 6px 14px -8px rgba(8, 12, 30, .6); }
.btn-foil:hover { background: #fff; color: #273f75; }
.btn-foil:active { background: #e4e9f3; box-shadow: inset 0 1px 2px rgba(8, 12, 30, .3); transform: translateY(1px); }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cta-note { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--on-blue-muted); }
.cta-note a { display: inline-block; min-height: 44px; padding: 10px 0; }
.paper-cta .cta-note { color: var(--muted); }
.paper-cta .cta-note a { color: var(--active); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* ---------------------------------------------------------------- masthead */

.masthead { position: relative; z-index: 2; }
.masthead .wrap { display: flex; align-items: center; gap: 12px 24px; height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--on-blue); text-decoration: none; font: 650 19px/1 var(--sans); letter-spacing: -.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.masthead nav { margin-left: auto; display: flex; align-items: center; gap: 4px 22px; }
.masthead nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-blue-muted); text-decoration: none; font-size: 15px;
}
.masthead nav a:not(.btn):hover, .masthead nav a[aria-current="page"] {
  color: var(--on-blue); text-decoration: underline; text-underline-offset: 6px;
}
@media (max-width: 719px) {
  .masthead nav a.nav-extra:not(.btn) { display: none; }
  .masthead nav { gap: 4px 16px; }
}

/* ---------------------------------------------------------------- hero: the cover */

.hero {
  overflow: hidden;
  --fade-at: 50% 22%;
  /* The weave fades out behind the copy so the words sit on near-flat blue. */
  background-image:
    radial-gradient(ellipse 85% 46% at var(--fade-at), rgba(39, 54, 91, .72), rgba(39, 54, 91, 0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .18) 100%),
    url("/assets/cloth.276ea34ee0.jpg");
  background-image:
    radial-gradient(ellipse 85% 46% at var(--fade-at), rgba(39, 54, 91, .72), rgba(39, 54, 91, 0) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .18) 100%),
    image-set(url("/assets/cloth.afeb959230.webp") type("image/webp"), url("/assets/cloth.276ea34ee0.jpg") type("image/jpeg"));
  background-size: 100% 100%, 100% 100%, 420px 420px;
  background-position: 0 0, 0 0, 0 -72px;
}
.hero-grid {
  display: grid; gap: 40px; align-items: center;
  padding-top: clamp(24px, 6vw, 72px);
}
.hero h1 {
  font: 600 clamp(2.9rem, 1.4rem + 6.4vw, 6rem)/1 var(--serif);
  letter-spacing: -.012em;
  max-width: 9.5em;
}
.hero .lede {
  margin: 22px 0 0; max-width: 26ch;
  font: 500 clamp(1.2rem, 1.02rem + .7vw, 1.5rem)/1.35 var(--sans); color: var(--on-blue-muted);
}
.hero .rule::after { margin-top: 24px; }
.stance {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font: 600 15px/1.4 var(--sans); color: var(--on-blue);
}
.stance li { display: flex; align-items: center; gap: 9px; }
.stance li::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px;
  background: var(--on-blue-muted); opacity: .75;
}
.hero-copy > p.body { max-width: 33rem; margin: 20px 0 30px; color: var(--on-blue-muted); font-size: 18px; }
.devices { position: relative; z-index: 1; justify-self: center; width: 100%; }
.hero .phone { width: min(70vw, 280px); margin: 0 auto -40%; }
.hero .tablet { display: none; }

@media (min-width: 960px) {
  .hero { --fade-at: 24% 44%; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); padding-bottom: 0; gap: 24px; }
  .hero-copy { padding-bottom: 120px; }
  .devices { height: 640px; align-self: end; }
  .hero .tablet { display: block; position: absolute; right: 0; top: 0; width: min(520px, 100%); }
  .hero .phone { position: absolute; left: 0; bottom: -150px; width: 260px; margin: 0; }
}
@media (min-width: 1240px) { .hero .phone { left: 30px; } }

/* ---------------------------------------------------------------- screens: plain rounded glass with a shadow */

.screen {
  position: relative; overflow: hidden; border-radius: 30px; background: var(--panel);
  box-shadow: var(--shadow);
}
.screen::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--edge);
}
.screen img { width: 100%; filter: var(--shot); }
.screen.is-dark img { filter: none; }
.screen.tablet { border-radius: 18px; }
/* A Mac window (make_mac.py): the capture's own rounded corners, about 42 of its 2880 x 1800
   pixels, redrawn as a clip in percentages so the shadow follows them at every width. */
.screen.mac { border-radius: 1.46% / 2.33%; }
.cloth .screen { box-shadow: 0 34px 60px -26px rgba(4, 7, 18, .85), 0 3px 10px rgba(4, 7, 18, .25); }
.cloth .screen::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

/* The watch: a black rounded screen, padded so its own corners never cut the app's text. */
.watch {
  width: min(42vw, 176px); padding: 9% 8%; border-radius: 26%/22%; background: #000;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.watch img { border-radius: 4px; }

/* ---------------------------------------------------------------- sections */

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section h2 {
  font: 600 clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem)/1.06 var(--serif); letter-spacing: -.01em;
}
.section .intro { max-width: var(--measure); margin-top: 22px; font-size: 18px; color: var(--muted); }
.centered { text-align: center; }
.centered .intro { margin-left: auto; margin-right: auto; }

/* Lines from the sample story, set as the writer sees them in the app. */
.line {
  font: 400 clamp(1.3rem, 1.15rem + .6vw, 1.6rem)/1.45 var(--serif); color: var(--ink);
  margin: 22px 0 0; max-width: 30rem; text-wrap: pretty;
}
.line cite { display: block; margin-top: 8px; font: 400 13px/1.4 var(--sans); font-style: normal; color: var(--muted); }

/* ---------------------------------------------------------------- the plan: why short sessions add up */

.plan-section { padding-top: clamp(150px, 20vw, 220px); }
.plan-head { max-width: 42rem; }
.plan-head .intro + .intro { margin-top: 16px; }
.pace { margin-top: 44px; max-width: 46rem; }
.pace svg { display: block; width: 100%; height: auto; overflow: visible; }
.pace-area { fill: var(--scenes); opacity: .14; }
.pace-line { fill: none; stroke: var(--scenes); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.pace-base { stroke: var(--rule); stroke-width: 1; }
.pace-tick { stroke: var(--rule); stroke-width: 1; }
.pace-dot { fill: var(--paper); stroke: var(--scenes); stroke-width: 3; }
.pace-note { font-family: var(--sans); font-size: 15px; fill: var(--ink); }
.pace-axis { font-family: var(--sans); font-size: 13px; fill: var(--muted); }
@media (max-width: 520px) { .pace-note { font-size: 19px; } .pace-axis { font-size: 17px; } }
/* Under the sketch, the plan itself, in the Mac window. */
.mac-shot { margin-top: clamp(44px, 6vw, 72px); max-width: 880px; }

/* ---------------------------------------------------------------- the week */

.week-head { max-width: 40rem; }
.week { display: grid; grid-template-areas: "aside" "days"; margin-top: 36px; }
/* On phones the week strip stays at the top of the screen as the days scroll under it. It runs
   the full width, on flat paper, with a soft edge below instead of a seam. */
.week-aside {
  grid-area: aside; position: sticky; top: 0; z-index: 3;
  margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 8px; background: var(--paper);
}
.week-aside::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: linear-gradient(var(--paper), rgba(0, 0, 0, 0));
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .week-aside::after { background: linear-gradient(var(--paper), rgba(20, 22, 23, 0)); } }
:root[data-theme="dark"] .week-aside::after { background: linear-gradient(var(--paper), rgba(20, 22, 23, 0)); }
.aside-shot { display: none; }
.days { grid-area: days; }
.day { padding: 32px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day h3 { font: 650 clamp(1.35rem, 1.2rem + 1vw, 1.9rem)/1.2 var(--sans); letter-spacing: -.025em; }
.day h3 .when { font: 400 1em/1.2 var(--serif); letter-spacing: 0; color: var(--muted); }
/* On narrow screens the day leads the heading as one phrase, "Tuesday: Write in the app, or on paper",
   so text-wrap: balance breaks the whole line and no label is left alone above the heading. */
@media (max-width: 719px) {
  .day h3 .when .visually-hidden { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; }
}
@media (min-width: 720px) {
  .day { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 12px; align-content: center; }
  .day > * { grid-column: 2; }
  .day > h3 { grid-column: 1 / -1; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
  .day h3 .when { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); }
}
.day p { max-width: var(--measure); margin-top: 14px; font-size: 18px; }
.day p.line { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); margin-top: 20px; }
.day figure { margin: 24px 0 0; }
.day figure .screen { width: 200px; border-radius: 22px; }
.day figure .watch { width: 168px; }
@media (min-width: 720px) { .day figure .screen { width: 240px; border-radius: 26px; } }
/* Shorter on phones: Friday's session page is close to Monday's Today screen, so its words carry it. */
@media (max-width: 719px) { .day figure.wide-only { display: none; } }
figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Closing lines stacked in order: the outline. Story so far is a Build the story session, so the
   marks take its blue, on the same kind of rule that runs through the week strip. */
.day figure.outline { margin-top: 24px; }
.stack { list-style: none; margin: 0; padding: 0; position: relative; max-width: 32rem; }
.stack::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 18px; width: 1px; background: var(--rule); }
.stack li {
  position: relative; padding: 10px 0 10px 32px;
  font: 400 clamp(1.25rem, 1.12rem + .5vw, 1.5rem)/1.4 var(--serif); text-wrap: pretty;
}
.stack li::before {
  content: ""; position: absolute; left: 0; top: calc(10px + .45em); width: 13px; height: 13px; border-radius: 3px;
  background: var(--compose); box-shadow: 0 0 0 4px var(--paper);
}
.stack li + li { border-top: 1px solid var(--line); }
.outline figcaption { padding-left: 32px; }

/* The week strip, after WeekStrip.swift: seven equal columns, one hairline through the marker row
   of every day, broken around each mark. The marks are larger here than in the app, so the four
   activity colours read from across the page. */
.strip-card { max-width: 30rem; margin: 0 auto; }
.strip-title { margin: 0 0 4px; text-align: center; font: 600 13px/1.4 var(--sans); color: var(--muted); }
.strip {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px;
  margin: 0; padding: 4px; list-style: none; background: var(--soft); border-radius: 13px;
}
.strip li {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 1px;
  min-height: 54px; border-radius: 9px; transition: background-color 150ms ease, color 150ms ease;
}
.strip .wd { font-size: 11.5px; line-height: 1.2; color: var(--muted); }
.strip .dt { font: 500 16px/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.strip .mk { position: relative; width: 100%; height: 16px; display: grid; place-items: center; }
.strip .mk::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: var(--rule); }
.strip li:first-child .mk::before { left: 30%; }
.strip li:last-child .mk::before { right: 30%; }
.strip .mk i {
  position: relative; width: 12px; height: 12px; border-radius: 3px; background: var(--c);
  outline: 3px solid var(--soft); transition: background-color 150ms ease, outline-color 150ms ease;
}
.strip li[data-kind="off"] .mk i { display: none; }
.strip li.done { background: var(--complete); }
.strip li.done .dt { color: var(--complete-ink); }
.strip li.done .mk::before, .strip li.sel .mk::before { background: transparent; }
.strip li.done .mk i { outline-color: var(--complete); }
.strip li.skipped .mk i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.strip li.skipped .dt { color: var(--muted); }
.strip li.sel { background: var(--active); }
.strip li.sel .wd, .strip li.sel .dt { color: var(--panel); }
.strip li.sel .mk i { outline-color: var(--active); box-shadow: 0 0 0 1.5px var(--panel); }
.strip li.sel.skipped .mk i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--panel); }
.strip-note { margin: 6px 0 0; text-align: center; font-size: 13.5px; line-height: 1.4; color: var(--muted); min-height: 1.4em; }
.week-aside .strip-note { display: none; }
.js .week-aside .strip-note { display: block; }
.c-scenes { --c: var(--scenes); }
.c-discover { --c: var(--discover); }
.c-explore { --c: var(--explore); }
.c-compose { --c: var(--compose); }

@media (min-width: 720px) {
  .strip li { min-height: 66px; gap: 2px; }
  .strip .wd { font-size: 12px; }
  .strip .dt { font-size: 17px; }
  .strip-title { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
  .strip { padding: 6px 5px; }
}
@media (min-width: 720px) and (max-width: 959px) {
  .strip-card { margin-left: calc(9.5rem + 12px); }
}

@media (min-width: 960px) {
  .week { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); grid-template-areas: "days aside"; gap: 72px; margin-top: 48px; }
  .week-aside { top: 24px; align-self: start; margin: 0; padding: 0; background: none; }
  .week-aside::after { display: none; }
  .js .aside-shot { display: grid; place-items: start center; margin-top: 28px; }
  .aside-shot > * { grid-area: 1 / 1; transition: opacity 200ms ease; }
  .aside-shot .screen { width: 300px; }
  .aside-shot .screen img { aspect-ratio: 1320 / 2400; object-fit: cover; object-position: top; transition: opacity 160ms ease; }
  .aside-shot .screen img.swapping { opacity: 0; }
  /* Sunday is a day off, and its screen is the watch: the phone steps aside for it. */
  .aside-shot .watch { width: 210px; margin-top: 120px; opacity: 0; visibility: hidden; }
  .week-aside.is-watch .aside-shot .screen { opacity: 0; visibility: hidden; }
  .week-aside.is-watch .aside-shot .watch { opacity: 1; visibility: visible; }
  .js .day { min-height: 40vh; }
  .js .day figure:not(.outline) { display: none; }
  .day { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .strip li, .strip .mk i, .aside-shot > *, .aside-shot .screen img { transition: none; }
}

/* ---------------------------------------------------------------- your words: a page of the sample story */

.words { background: var(--soft); }
.words-grid { display: grid; gap: 40px 72px; align-items: center; }
.words h2 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem); line-height: 1.03; max-width: 11em; }
.words h2 span { display: inline-block; }
.words .intro { font-size: clamp(18px, 1rem + .3vw, 20px); max-width: 32rem; }
.page-sample { margin: 0; }
.page-sample blockquote {
  margin: 0; padding: clamp(26px, 4vw, 48px) clamp(22px, 4vw, 52px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 24px 40px -30px rgba(20, 26, 40, .35);
  font: 400 clamp(1.2rem, 1.08rem + .5vw, 1.45rem)/1.65 var(--serif); color: var(--ink);
}
.page-sample blockquote p { margin: 0; text-indent: 1.25em; text-wrap: pretty; }
.page-sample blockquote p.title { text-indent: 0; margin-bottom: .6em; font-weight: 600; font-size: 1.45em; line-height: 1.15; }
.page-sample blockquote p.title + p { text-indent: 0; }
.page-sample figcaption { margin-top: 14px; }
@media (min-width: 900px) { .words-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

/* ---------------------------------------------------------------- devices */

.devices-section { padding-top: clamp(72px, 9vw, 120px); }
/* Two Mac windows, Today in front of Ideas, as they sit on a desk. Phones show Today only. */
.mac-pair { margin-top: 52px; }
.mac-pair .back { display: none; }
@media (min-width: 900px) {
  .mac-pair { display: flow-root; position: relative; max-width: 1000px; }
  .mac-pair .front { z-index: 1; width: 80%; margin-top: 9%; }
  .mac-pair .back { display: block; position: absolute; top: 0; right: 0; width: 60%; }
}
.device-row { display: grid; gap: 40px; margin-top: 52px; align-items: end; }
.device-row .tablet { width: 100%; max-width: 640px; }
.watches { display: flex; gap: 20px; justify-content: center; align-items: flex-end; }
.device-row figcaption { text-align: center; }
@media (min-width: 900px) {
  .device-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .watches { flex-direction: column; align-items: center; }
}

/* ---------------------------------------------------------------- price */

.price-grid { display: grid; gap: 40px 72px; align-items: start; margin-top: 40px; }
@media (min-width: 900px) { .price-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); } }
.slip {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 28px;
  box-shadow: inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--line);
}
.slip > div { padding: 22px 0; display: grid; gap: 4px; }
.slip > div + div { border-top: 1px solid var(--line); }
.slip .amount { font: 600 clamp(2.3rem, 1.9rem + 1.4vw, 2.9rem)/1 var(--serif); font-variant-numeric: lining-nums; }
.slip .amount span { font: 500 1.1rem/1 var(--sans); color: var(--muted); margin-left: 6px; }
.slip .note { font-size: 15px; color: var(--complete-ink); }
.price-text p { max-width: var(--measure); font-size: 18px; }
.price-text .beta { padding: 16px 18px; background: var(--selection); border-radius: 10px; color: var(--ink); }

/* ---------------------------------------------------------------- questions */

.faq { max-width: 46rem; margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none;
  font: 600 clamp(1.05rem, 1rem + .3vw, 1.2rem)/1.35 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 150ms ease; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { padding: 0 0 22px; max-width: var(--measure); }
.faq .answer p { margin: 0 0 .8em; }
@media (prefers-reduced-motion: reduce) { .faq summary svg { transition: none; } }

/* ---------------------------------------------------------------- closing band: the back cover */

.closing {
  background-image:
    radial-gradient(ellipse 60% 70% at 50% 55%, rgba(39, 54, 91, .6), rgba(39, 54, 91, 0) 100%),
    url("/assets/cloth.276ea34ee0.jpg");
  background-image:
    radial-gradient(ellipse 60% 70% at 50% 55%, rgba(39, 54, 91, .6), rgba(39, 54, 91, 0) 100%),
    image-set(url("/assets/cloth.afeb959230.webp") type("image/webp"), url("/assets/cloth.276ea34ee0.jpg") type("image/jpeg"));
  background-size: 100% 100%, 420px 420px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.closing .spray { display: block; }
.closing .spray img { width: min(260px, 64vw); margin: 0 auto 18px; opacity: .5; }
.closing h2 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4.2rem); }
.closing .intro { color: var(--on-blue-muted); }
.closing .cta { justify-content: center; margin-top: 34px; }
.closing .cta-note { text-align: center; }

.site-footer { padding: 44px 0 56px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .fine { font-size: 13px; line-height: 1.55; max-width: 48rem; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.foot-brand img { width: 24px; height: 24px; border-radius: 6px; }

/* ---------------------------------------------------------------- inner pages */

.page { max-width: 44rem; margin: 0 auto; padding: 48px var(--gutter) 64px; }
/* One h1 for Privacy, Terms, Support and the missing page: Baskerville, the same size everywhere. */
.page h1 { font: 600 clamp(2.3rem, 1.8rem + 2.4vw, 3.3rem)/1.08 var(--serif); letter-spacing: -.01em; margin-bottom: 12px; }
.page h2 {
  font: 650 1.4rem/1.3 var(--sans); letter-spacing: -.02em;
  margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 16px;
}
.page h3 { font: 650 1.12rem/1.35 var(--sans); margin: 28px 0 8px; }
.page ul, .page ol { padding-left: 1.4em; margin: 0 0 1em; }
.page li { margin: 0 0 .5em; }
.page li::marker { color: var(--muted); }
.page .lede { font-size: 20px; line-height: 1.55; }
.legal { font-family: var(--serif); font-size: 19px; line-height: 1.65; }
.legal h2, .legal h3, .legal table, .legal .effective { font-family: var(--sans); }
.legal .effective { color: var(--muted); font-size: 15px; }
.legal .effective em { font-style: normal; }
.legal .attribution { font-size: 15px; color: var(--muted); }
.legal .site-note { font-family: var(--sans); font-size: 16px; background: var(--selection); border-radius: 10px; padding: 14px 18px; }
.table-wrap { margin: 8px 0 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 650; background: var(--soft); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0 18px; }
@media (max-width: 640px) {
  .legal { font-size: 18px; }
  .legal .table-wrap { overflow: visible; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .legal tbody tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .legal tbody tr:last-child { border-bottom: 0; }
  .legal td { padding: 3px 0; border: 0; }
  .legal td::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); margin-top: 4px; }
}
.support-list { display: grid; gap: 0; margin-top: 8px; }

/* ---------------------------------------------------------------- the support form (fields from api/internal/support/form.json) */

.support-form {
  --danger: #9a3324;
  margin: 36px 0 8px; padding: clamp(20px, 4vw, 32px); background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .support-form { --danger: #e57a6b; } }
:root[data-theme="dark"] .support-form { --danger: #e57a6b; }
.page .support-form h2 { margin: 0 0 6px; padding: 0; border: 0; }
.support-form form { display: grid; gap: 20px; margin-top: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 16px; }
.field .req { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field .hint { margin: -2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--control-line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 400 17px/1.45 var(--sans);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 160px; }
.field select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--active); outline-offset: 2px; border-color: var(--active);
}
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.field-error { margin: 0; font-size: 15px; font-weight: 600; color: var(--danger); }
.field-error[hidden] { display: none; }
/* For bots only: off-screen, out of the tab order and hidden from assistive technology. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.form-actions .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-status.is-error { color: var(--danger); font-weight: 600; }
.form-privacy { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.form-banner {
  margin: 14px 0 0; padding: 14px 16px; border-radius: 10px; font-size: 16px; font-weight: 600;
  color: var(--danger); background: var(--paper); border: 1px solid var(--danger);
}
.form-done { margin-top: 14px; padding: 18px 20px; border-radius: 10px; background: var(--complete); color: var(--complete-ink); }
.form-done:focus { outline: none; }
.form-done:focus-visible { outline: 2px solid var(--active); outline-offset: 4px; }
.page .form-done h3 { margin: 0 0 4px; }
.form-done p { margin: 0; }
@media (prefers-reduced-motion: reduce) { .field input, .field select, .field textarea { transition: none; } }
.notfound { min-height: 60vh; display: grid; align-content: center; }

@media print {
  .cloth, .cover { background: none; color: #000; }
  .pressed { color: #000; text-shadow: none; }
  .masthead nav, .site-footer nav, .cta, .skip, .spray { display: none; }
  .brand { color: #000; }
  body { background: #fff; color: #000; }
}
