/* Beans & Brews — website
   Tokens follow the app's design system (DESIGN_SYSTEM.md §4 in the app repo): warm light canvas,
   white surfaces, espresso for the one action, Petrol as the only interactive hue, SF Pro.
   Appearance: the system's by default; the header's toggle sets data-theme on <html>. */

:root {
  --canvas-top: #FAF8F5;
  --canvas: #EFEAE4;
  --surface: #FFFFFF;
  --ink: #1E1A17;
  --ink-2: #6E665E;
  --hairline: #E3DDD5;
  --espresso: #2B1D16;
  --on-espresso: #FFFFFF;
  --accent: #1E5A63;
  --map: rgba(30, 90, 99, 0.15);
  --bezel: #16120F;
  --glass: rgba(250, 248, 245, 0.72);
  --phone-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 1px 0 1px rgba(43, 29, 22, 0.08), 0 30px 60px -24px rgba(43, 29, 22, 0.42), 0 12px 24px -12px rgba(43, 29, 22, 0.22);
  --button-shadow: 0 10px 24px -12px rgba(43, 29, 22, 0.55);
  color-scheme: light;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 20px;
  --radius-xl: clamp(24px, 3vw, 32px);
  --section: clamp(64px, 10vw, 128px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header: 60px;
}

:root[data-theme="dark"] {
  --canvas-top: #1C1916;
  --canvas: #141210;
  --surface: #221E1B;
  --ink: #F3EFEA;
  --ink-2: #A9A198;
  --hairline: #3A3430;
  --espresso: #E8DCCB;
  --on-espresso: #2B1D16;
  --accent: #6CBAC4;
  --map: rgba(108, 186, 196, 0.12);
  --bezel: #0C0A09;
  --glass: rgba(28, 25, 22, 0.72);
  --phone-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10) inset, 0 0 0 1px #3A3430, 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  --button-shadow: none;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas-top: #1C1916;
    --canvas: #141210;
    --surface: #221E1B;
    --ink: #F3EFEA;
    --ink-2: #A9A198;
    --hairline: #3A3430;
    --espresso: #E8DCCB;
    --on-espresso: #2B1D16;
    --accent: #6CBAC4;
    --map: rgba(108, 186, 196, 0.12);
    --bezel: #0C0A09;
    --glass: rgba(28, 25, 22, 0.72);
    --phone-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10) inset, 0 0 0 1px #3A3430, 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    --button-shadow: none;
    color-scheme: dark;
  }
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0;
  background: var(--canvas-top);
  color: var(--ink);
  font: 400 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
/* Short items read best as even lines; one word alone on the last line looks like an accident. */
.facts li, .faq summary, .tiers-note, .meta, .doc dd { text-wrap: balance; }
p { margin: 0; }
mark { background: #FFE58A; color: #1E1A17; padding: 0 0.25em; border-radius: 4px; }
.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.nowrap { white-space: nowrap; }
/* Headlines break where the sentence breaks; on narrow screens only where they have to. */
@media (max-width: 380px) { br.wide { display: none; } }

/* ---- header: glass bar, the App Store link always at hand ------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); }
.bar {
  max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.015em; justify-self: start; }
.brand img { width: 20px; height: auto; }
.brand span { white-space: nowrap; }
.nav-main { display: flex; gap: 32px; }
.nav-main a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; padding: 8px 0; }
.nav-main a:hover { color: var(--ink); }
.bar-end { display: flex; align-items: center; gap: 10px; justify-self: end; }
.cta-sm {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--espresso); color: var(--on-espresso); font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
.cta-sm:hover { text-decoration: none; opacity: 0.88; }
.i-arrow { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid var(--hairline); color: var(--ink-2);
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle[hidden] { display: none !important; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.theme-toggle .i-sun, .theme-toggle[data-current="dark"] .i-moon { display: none; }
.theme-toggle[data-current="dark"] .i-sun { display: block; }

.menu { position: relative; display: none; }
.menu summary {
  list-style: none; cursor: pointer; height: 36px; display: inline-flex; align-items: center; padding: 0 4px 0 6px;
  font-size: 0.9375rem; color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 232px; padding: 8px;
  display: grid; border-radius: 18px; border: 1px solid var(--hairline);
  /* Inside the glass header a second backdrop blur has nothing to blur: nearly opaque instead. */
  background: var(--canvas-top);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}
.menu-panel a { padding: 12px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 1.0625rem; }
.menu-panel a:hover, .menu-panel button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
/* The menu's own switch: a full row with a label, after a hairline. */
.theme-toggle.in-menu {
  width: auto; height: auto; border-radius: 12px; border: 0; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 10px; padding: 14px; margin-top: 6px;
  font: inherit; font-size: 1.0625rem; color: var(--ink); text-align: left; white-space: nowrap;
}
.theme-toggle.in-menu svg { grid-area: auto; color: var(--ink-2); }
.theme-toggle .to-light, .theme-toggle[data-current="dark"] .to-dark { display: none; }
.theme-toggle[data-current="dark"] .to-light { display: inline; }
@media (max-width: 820px) {
  .bar { grid-template-columns: 1fr auto; }
  .nav-main, .bar-end > .theme-toggle { display: none; }
  .menu { display: block; }
}
/* The smallest iPhones: name, Download and Menu still fit on one line. */
@media (max-width: 360px) {
  .bar { gap: 8px; }
  .brand { gap: 8px; font-size: 0.9375rem; }
  .bar-end { gap: 2px; }
  .cta-sm { padding: 0 12px; font-size: 0.8125rem; }
  .menu summary { padding: 0 0 0 4px; }
}

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

.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--espresso); color: var(--on-espresso);
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; letter-spacing: -0.01em;
  box-shadow: var(--button-shadow);
  transition: transform 0.25s var(--ease);
}
a.store:hover { transform: translateY(-1px); text-decoration: none; }
.store.is-soon { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; cursor: default; }

/* Before the release: the sign-up for the release email, in the place of the App Store button. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notify { width: 100%; max-width: 440px; }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.notify-row { display: flex; gap: 8px; }
.notify input {
  flex: 1; width: 100%; min-width: 0; min-height: 52px; padding: 0 20px; border-radius: 999px;
  border: 1.5px solid var(--hairline); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1.0625rem;
}
.notify input::placeholder { color: var(--ink-2); }
.notify input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.notify .store { flex: none; border: 0; cursor: pointer; font-family: inherit; padding: 0 24px; }
.notify .store:hover { transform: translateY(-1px); }
.notify .store:disabled { opacity: 0.6; cursor: default; transform: none; }
.notify-note { margin-top: 10px; font-size: 0.8125rem; color: var(--ink-2); text-wrap: balance; }
.notify.is-done .notify-row { display: none; }
/* After a sign-up the form gives way to a capsule, so the next step (the confirmation email) is seen. */
.notify.is-done .notify-note {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 0; padding: 14px 20px 14px 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: var(--button-shadow); color: var(--ink); font-size: 0.9375rem; line-height: 1.45;
  text-align: left; text-wrap: pretty;
}
.notify.is-done .notify-note::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%; background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.bridge .notify, .closing .notify { margin-left: auto; margin-right: auto; }
@media (max-width: 360px) {
  .notify input { padding: 0 16px; }
  .notify .store { padding: 0 18px; }
}

/* ---- contour map (the app's "Höhenlinien") --------------------------------------------------- */

.map { position: relative; isolation: isolate; }
.map::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--map);
  -webkit-mask: url(/assets/contours.svg) top right / cover no-repeat;
  mask: url(/assets/contours.svg) top right / cover no-repeat;
}
/* Where the map meets the plain page, it fades instead of ending on a hard edge. */
.hero.map::before, .closing.map::before {
  -webkit-mask: url(/assets/contours.svg) top right / cover no-repeat, linear-gradient(var(--fade));
  -webkit-mask-composite: source-in;
  mask: url(/assets/contours.svg) top right / cover no-repeat, linear-gradient(var(--fade));
  mask-composite: intersect;
}
.hero.map { --fade: #000 50%, transparent 95%; }
.closing.map { --fade: transparent, #000 40%; }

/* ---- the four backgrounds of the app, one per chapter --------------------------------------------
   Höhenlinien, Jute, Mahlscheibe, Bohnen (DD-116, DD-124 in the app; scripts/patterns.mjs). Each sits at the
   edge of the window beside the chapter's text, in the map's ink, and fades out toward the middle.
   While the page scrolls, the burr turns, the beans tumble and the weave and the map drift a little. */

.chapter { position: relative; isolation: isolate; }
/* The drawings reach past the window; nothing may scroll sideways, on iOS Safari either. */
#features { overflow-x: clip; }
.drawing {
  --size: min(900px, 120vw);
  position: absolute; z-index: -1; pointer-events: none;
  width: var(--size); aspect-ratio: 1;
  top: 50%; margin-top: calc(var(--size) / -2);
  /* Its middle a little inside the window's edge: a bit more than half of it shows. */
  left: calc((100% - 100vw) / 2 - var(--size) * 0.42);
  background: var(--map);
  -webkit-mask: var(--art) center / contain no-repeat, radial-gradient(closest-side, #000 45%, transparent);
  -webkit-mask-composite: source-in;
  mask: var(--art) center / contain no-repeat, radial-gradient(closest-side, #000 45%, transparent);
  mask-composite: intersect;
}
.chapter:nth-child(even) .drawing { left: auto; right: calc((100% - 100vw) / 2 - var(--size) * 0.42); }
.drawing.jute { --art: url(/assets/jute.svg); --size: min(1000px, 150vw); opacity: 0.8; }
.drawing.burr { --art: url(/assets/burr.svg); --size: min(1040px, 140vw); opacity: 0.85; }
.drawing.beans { --art: url(/assets/beans.svg); --size: min(900px, 130vw); }
.drawing.contours {
  --size: min(960px, 130vw);
  -webkit-mask: url(/assets/contours.svg) center / cover no-repeat, radial-gradient(closest-side, #000 45%, transparent);
  -webkit-mask-composite: source-in;
  mask: url(/assets/contours.svg) center / cover no-repeat, radial-gradient(closest-side, #000 45%, transparent);
  mask-composite: intersect;
}
@media (max-width: 860px) {
  /* Stacked: beside the heading, above the screens. */
  .drawing { top: 0; margin-top: calc(var(--size) * -0.3); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .drawing { animation: var(--motion) linear both; animation-timeline: view(); animation-range: cover; }
    .drawing.burr { --motion: turn; }
    .drawing.beans { --motion: tumble; }
    .drawing.jute, .drawing.contours { --motion: drift; }
    @keyframes turn { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
    @keyframes tumble { from { transform: rotate(-14deg) scale(0.92); } to { transform: rotate(10deg) scale(1.06); } }
    @keyframes drift { from { transform: translateY(12%); } to { transform: translateY(-12%); } }
  }
}

/* ---- phone frame ----------------------------------------------------------------------------- */

.phone {
  --w: 300px;
  margin: 0; width: var(--w); flex: none;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.165);
  background: var(--bezel);
  box-shadow: var(--phone-shadow);
}
.phone picture, .phone img { border-radius: calc(var(--w) * 0.135); overflow: hidden; }
.phone img { width: 100%; aspect-ratio: 662 / 1440; background: var(--canvas); object-fit: cover; }
/* A recording plays over its still (site.js); it shows only once it plays and never has controls. */
.phone.anim { position: relative; }
.phone video {
  position: absolute; top: calc(var(--w) * 0.032); left: calc(var(--w) * 0.032);
  width: calc(100% - var(--w) * 0.064); height: auto; aspect-ratio: 662 / 1440;
  border-radius: calc(var(--w) * 0.135); object-fit: cover; pointer-events: none; opacity: 0;
}
.phone video.is-playing { opacity: 1; }
.phone video::-webkit-media-controls,
.phone video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
@media (prefers-reduced-motion: reduce) { .phone video { display: none; } }

/* ---- hero: the promise, the button, and the app itself in the first screen -------------------- */

.hero { padding: clamp(28px, 6vw, 72px) 0 0; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 48px); }
.hero-text { text-align: center; }
.hero h1 { font-size: clamp(2.25rem, 1.1rem + 5vw, 4.5rem); letter-spacing: -0.04em; line-height: 1.03; }
.hero .lede { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); color: var(--ink-2); max-width: 31rem; margin: 18px auto 0; line-height: 1.5; }
.hero .cta { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero .meta { font-size: 0.875rem; color: var(--ink-2); }
/* Until the release: the month, as a capsule above the headline. */
.release {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 7px 14px 7px 12px;
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--button-shadow);
  font-size: 0.875rem; font-weight: 600; color: var(--ink);
}
.release::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.stage { display: flex; justify-content: center; align-items: flex-start; padding-bottom: clamp(24px, 4vw, 64px); }
.stage .phone { --w: min(46vw, 290px); position: relative; }
.stage .phone.front { z-index: 1; }
.stage .phone.back { margin-left: calc(var(--w) * -0.12); margin-top: calc(var(--w) * 0.16); }
@media (min-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; min-height: min(calc(100svh - var(--header)), 760px); }
  .hero-text { text-align: left; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(2.75rem, 4.4vw, 4.25rem); }
  .hero .lede { margin-left: 0; }
  .hero .cta { align-items: flex-start; }
  .stage .phone { --w: clamp(240px, 22vw, 290px); }
}

/* The phones rise once after loading, as Home's cards do after a cold launch in the app. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
  .stage .phone { animation: rise 0.9s var(--ease) 0.1s both; }
  .stage .phone.back { animation-delay: 0.22s; }
  .js .reveal { opacity: 0; transform: translateY(24px); }
  .js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }
}

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

.section { padding: var(--section) 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto clamp(40px, 5vw, 56px); }
.section-head h2, .chapter h2, .closing h2, .bridge h2 { font-size: clamp(1.875rem, 1.1rem + 3.3vw, 3rem); }
.section-head p { color: var(--ink-2); font-size: 1.125rem; margin-top: 16px; }
.eyebrow { display: block; margin-bottom: 16px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; color: var(--accent); }

/* Chapters: text beside a panel with the screens, alternating sides. */
.chapters { display: grid; gap: clamp(88px, 11vw, 144px); }
.chapter { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.chapter:nth-child(even) .chapter-text { order: 2; }
.chapter-text { max-width: 30rem; }
.chapter-text > p { color: var(--ink-2); font-size: 1.125rem; margin-top: 18px; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--hairline); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 1rem; color: var(--ink-2); }
.facts strong { color: var(--ink); font-weight: 600; }
.panel {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(var(--canvas-top), var(--canvas));
  border: 1px solid var(--hairline);
  padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 48px) 0;
  display: flex; justify-content: center; align-items: flex-start;
  min-height: clamp(420px, 50vw, 590px);
}
.panel .phone { --w: clamp(220px, 23vw, 280px); }
.panel .phone.second { --w: clamp(190px, 19vw, 236px); margin-left: calc(var(--w) * -0.2); margin-top: clamp(56px, 7vw, 96px); }
.panel .phone.first { z-index: 1; }
@media (max-width: 860px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-child(even) .chapter-text { order: 0; }
  .chapter-text { max-width: 36rem; }
  .panel { min-height: 0; padding-top: 32px; max-height: 540px; }
  .panel .phone { --w: min(62vw, 280px); }
  .panel .phone.second { --w: min(46vw, 210px); }
}
@media (max-width: 560px) {
  .panel:has(.second) { padding-left: 12px; padding-right: 12px; }
  .panel .phone.first { --w: 50vw; }
  .panel .phone.second { --w: 42vw; margin-left: -6vw; margin-top: 52px; }
}

/* Halfway: the download, for readers who are already convinced. */
.bridge { text-align: center; }
.bridge p { color: var(--ink-2); font-size: 1.125rem; margin: 14px auto 0; max-width: 30rem; }
.bridge .store, .bridge .notify { margin-top: 28px; }
.bridge .notify .store { margin-top: 0; }

/* Light and dark: the same screen twice, side by side, each on the app's own canvas for that
   appearance, whatever the reader's setting. */
.appearance-stage {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--hairline);
  background: linear-gradient(90deg, #EFEAE4 50%, #141210 50%);
}
.appearance-stage .phone { --w: clamp(140px, 26vw, 290px); margin: clamp(28px, 6vw, 72px) clamp(10px, 4vw, 56px); }
.appearance-stage .phone:first-child { justify-self: end; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 60px -24px rgba(43, 29, 22, 0.42); }
.appearance-stage .phone:last-child { justify-self: start; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10) inset, 0 0 0 1px #3A3430, 0 30px 60px -24px rgba(0, 0, 0, 0.7); }

/* Free and Plus. */
.tiers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 880px; margin: 0 auto;
  /* Name, price and list line up across the two cards. */
  grid-template-rows: auto auto 1fr;
}
.tier {
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start;
  border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 40px); background: var(--surface); border: 1px solid var(--hairline);
}
.tier.plus { background: var(--espresso); color: var(--on-espresso); border-color: transparent; }
.tier h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
/* Each price stands on its own, its period below it; Plus's two side by side. */
.tier .price { margin-top: 12px; display: flex; align-items: stretch; gap: 24px; color: color-mix(in srgb, currentColor 66%, transparent); }
.tier .option { display: flex; flex-direction: column; line-height: 1.1; }
.tier .amount { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.25rem); font-weight: 600; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tier.plus .amount { color: var(--on-espresso); }
.tier .trial { margin-top: 14px; font-size: 0.9375rem; line-height: 1.45; text-wrap: pretty; color: color-mix(in srgb, currentColor 80%, transparent); }
.tier .per { margin-top: 6px; font-size: 0.9375rem; }
/* "or" for screen readers and copy; on screen a hairline between the two prices. */
.tier .or { width: 1px; overflow: hidden; color: transparent; background: color-mix(in srgb, var(--on-espresso) 22%, transparent); }
.tier ul { list-style: none; padding: 0; margin: 24px 0 0; align-self: start; }
.tier li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--hairline); font-size: 1rem; line-height: 1.45; }
.tier.plus li { border-top-color: color-mix(in srgb, var(--on-espresso) 18%, transparent); }
.tier li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 14px; height: 8px;
  border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg);
  opacity: 0.8;
}
.tier li.limit::before { width: 12px; height: 0; border-left: 0; transform: none; top: 22px; }
.tiers-note { text-align: center; color: var(--ink-2); max-width: 34rem; margin: 28px auto 0; font-size: 0.9375rem; }
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; grid-template-rows: none; } .tier { grid-row: auto; grid-template-rows: none; } }

/* Privacy. */
.privacy-card {
  border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--hairline);
  padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: start;
}
.privacy-card h2 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.5rem); }
.privacy-card .facts { margin-top: 0; }
@media (max-width: 860px) { .privacy-card { grid-template-columns: 1fr; } }

/* FAQ. */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details p { color: var(--ink-2); padding: 0 40px 24px 0; }

/* Closing. */
.closing { text-align: center; padding-bottom: clamp(96px, 12vw, 160px); }
.closing .mark { width: 64px; margin: 0 auto 28px; }
.closing .store, .closing .notify { margin-top: 32px; }
.closing .notify .store { margin-top: 0; }
.closing .meta { margin-top: 14px; font-size: 0.875rem; color: var(--ink-2); }

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

.site-footer { border-top: 1px solid var(--hairline); background: var(--canvas); padding: 48px 0 56px; font-size: 0.9375rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; }
.footer-brand p { margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; justify-content: flex-end; }
.footer-links a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; font-size: 0.8125rem; padding-top: 20px; border-top: 1px solid var(--hairline); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---- text pages (support, legal) ------------------------------------------------------------- */

.doc { max-width: 720px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(72px, 10vw, 128px); }
.doc h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); letter-spacing: -0.035em; }
.doc .updated { color: var(--ink-2); margin-top: 12px; font-size: 0.9375rem; }
.doc .intro { font-size: 1.1875rem; color: var(--ink-2); margin-top: 20px; }
.doc h2 { font-size: 1.5rem; margin-top: 48px; letter-spacing: -0.02em; line-height: 1.2; }
.doc h3 { font-size: 1.125rem; margin-top: 28px; letter-spacing: -0.01em; line-height: 1.3; }
.doc p, .doc ul, .doc ol, .doc address, .doc dl { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin-top: 6px; }
.doc address { font-style: normal; }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.doc dt { color: var(--ink-2); }
.doc dd { margin: 0; }
@media (max-width: 480px) { .doc dl { grid-template-columns: 1fr; gap: 2px; } .doc dd { margin-bottom: 10px; } }
.doc .path { font-weight: 600; color: var(--ink); }
.doc .card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 24px 26px; margin-top: 28px; }
.doc .card h2 { margin-top: 0; font-size: 1.25rem; }
.doc .card p:first-of-type { margin-top: 8px; }

/* ---- 404 ------------------------------------------------------------------------------------- */

.notfound { text-align: center; padding: clamp(72px, 14vw, 160px) var(--gutter); }
.notfound .mark { width: 64px; margin: 0 auto 28px; }
.notfound h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
.notfound p { color: var(--ink-2); margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .stage, .panel { display: none; }
}
