/* Haven's shared controls.
   The app imports this file and the website build puts it at the top of site.css, so a button, a switch,
   a field, a menu or a status chip is the same thing in both. Change a control here, never in one of them.
   Colours come from the tokens each side defines (--accent, --line, --surface, --page, --ink, --muted, --radius). */

/* Buttons. .btn and .primary are the brass button; .line and .ghost are the outlined one. */
.btn, .primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 9px 16px; font: 600 14px/1.3 var(--ui); text-decoration: none; cursor: pointer; white-space: nowrap;
}
/* The brass button is the one filled control on any screen, so it is the thing you look at first.
   A faint top light and a soft brass shadow make it read as raised; it lifts a little under the pointer. */
.btn:not(.line), .primary {
  background-image: linear-gradient(to bottom, color-mix(in srgb, #fff 14%, transparent), transparent 55%);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 30%, transparent), 0 1px 1px rgb(0 0 0 / .35), 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover, .primary:hover { filter: brightness(1.08); }
.btn:not(.line):hover, .primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 34%, transparent), 0 2px 2px rgb(0 0 0 / .3), 0 12px 28px -10px color-mix(in srgb, var(--accent) 85%, transparent); }
@media (prefers-reduced-motion: reduce) { .btn:not(.line):hover, .primary:hover { transform: none; } }
.btn:active, .primary:active, .ghost:active, .btn.line:active { transform: translateY(1px); }
.btn.line, .ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 14px; font: 500 14px/1.3 var(--ui); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.line:hover, .ghost:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.btn.sm, .primary.sm, .ghost.sm { padding: 5px 11px; font-size: 13px; }
.btn.lg { padding: 14px 26px; font-size: 16.5px; }
.btn[disabled], .primary[disabled], .ghost[disabled] { opacity: .55; cursor: default; filter: none; transform: none; box-shadow: none; }

/* A switch between two to four choices: Paper / Night, Monthly / Yearly. */
.seg { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 2px; color: var(--muted); font: 500 13.5px/1.3 var(--ui); cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on, .seg button[aria-pressed='true'], .seg button[aria-selected='true'] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* Fields */
.field, .ui-form input, .ui-form select, .ui-form textarea {
  background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 12px; font: 14px/1.3 var(--ui);
}
.field:focus, .ui-form input:focus, .ui-form select:focus, .ui-form textarea:focus { outline: none; border-color: var(--accent); }

/* The account button and every menu that drops from a button. */
.account { position: relative; display: flex; align-items: center; gap: 10px; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 10px 3px 3px; color: var(--ink); font: 500 13.5px var(--ui); cursor: pointer; max-width: 260px; }
.account-btn:hover { background: var(--accent-soft); }
.acc-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-sm { width: 26px; height: 26px; border-radius: 2px; display: grid; place-items: center; font: 600 12.5px var(--ui); background: var(--plan, var(--muted)); color: #121417; flex: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .45); display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu a, .menu button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 2px; color: var(--ink); text-decoration: none; font: 13.5px/1.35 var(--ui); cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--accent-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menu-head { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.menu-head strong { font-size: 13.5px; word-break: break-all; }

/* Plans: their colour appears only on the name, the badge and the avatar. */
.plan-free { --plan: #8f99a6; } .plan-writer { --plan: #5fae8c; } .plan-author { --plan: #a58bd4; } .plan-lifetime { --plan: #d9ad4a; }
.plan-badge { align-self: flex-start; font: 600 12px var(--ui); padding: 3px 8px; border-radius: 2px; color: var(--plan); background: color-mix(in srgb, var(--plan) 16%, transparent); border: 1px solid color-mix(in srgb, var(--plan) 45%, transparent); }
.plan-badge::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--plan); margin-right: 6px; vertical-align: 1px; }
.avatar-sm[class*='plan-'] { background: var(--plan); color: #15130f; }

/* Chapter status, as on the outline board. */
.status { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--ui); color: var(--muted); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 1px; background: var(--st, var(--line)); }
.st-idea { --st: #8a8f99; } .st-draft { --st: #d4a017; } .st-revised { --st: #7f9cc9; } .st-done { --st: #5fae8c; }

/* A list of places to go, as in the app's sidebar. */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 0; border-radius: 2px; background: none; color: var(--ink); text-decoration: none; font: 14px/1.35 var(--ui); text-align: left; cursor: pointer; width: 100%; }
.side-nav a:hover, .side-nav button:hover { background: var(--accent-soft); }
.side-nav a.on, .side-nav button.on, .side-nav [aria-selected='true'] { background: var(--accent-soft); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.side-nav .n { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* Progress */
.meter { height: 6px; background: var(--line); border-radius: 1px; overflow: hidden; }
.meter.big { height: 10px; }
.meter span, .meter i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }

kbd { font: 12px var(--ui); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 2px; padding: 0 5px; background: var(--surface); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* The header. The website and the app's own pages (Your books, Account, Admin) use the same markup,
   built from site/header.js, so they look and behave the same. */
.top .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 2px; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.acct { display: flex; gap: 10px; align-items: center; }
.acct a.plain { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 8px; }
.acct a.plain:hover { color: var(--ink); }
header.top .menu-btn { display: none; }
.acct .menu { min-width: 240px; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 16px 16px; z-index: 5; }
  .nav a { padding: 10px 8px; }
  .nav a[aria-current] { box-shadow: inset 2px 0 0 var(--accent); }
  .top.open .nav { display: flex; }
  .top .wrap { position: relative; gap: 12px; }
  header.top .menu-btn { display: inline-flex; }
  .top .acct { margin-left: auto; }
  .top .account { position: static; }
  .top .account .menu { right: 16px; top: 60px; max-width: calc(100vw - 32px); }
  .acct a.plain { display: none; }
}
@media (max-width: 760px) {
  .acct .acc-email { display: none; }
  .acct > .btn { display: none; }
}
@media (max-width: 520px) { .top .wrap { padding-inline: 16px; } }

.menu .menu-theme { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.menu [data-out], .menu .menu-theme + button { border-top: 1px solid var(--line); border-radius: 0; margin-top: 6px; padding-top: 10px; }
.menu-head .badges { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.menu-head a.admin-pill, .admin-pill { display: inline-flex; text-decoration: none; cursor: pointer; align-items: center; gap: 5px; font: 600 12px var(--ui); padding: 3px 8px; border-radius: 2px; color: var(--ink); background: var(--accent-soft); border: 1px solid var(--line); }
.menu-head a.admin-pill { color: var(--ink); font: 600 12px var(--ui); border: 1px solid var(--line); background: var(--accent-soft); padding: 3px 8px; border-radius: 2px; transition: background .15s; }
.menu-head a.admin-pill:hover { background: color-mix(in srgb, var(--ink) 12%, var(--accent-soft)); }
.menu-head a.plan-badge { text-decoration: none; font: 600 12px var(--ui); border: 1px solid color-mix(in srgb, var(--plan) 45%, transparent); padding: 3px 8px; border-radius: 2px; cursor: pointer; color: var(--plan); background: color-mix(in srgb, var(--plan) 16%, transparent); transition: background .15s; }
.menu-head a.plan-badge:hover { background: color-mix(in srgb, var(--plan) 26%, transparent); }
/* A picture a member has uploaded gets an edge in their plan's colour, so the plan shows even when the initial is replaced. */
.avatar-sm.pic, .avatar-sm.has-pic { box-shadow: 0 0 0 2px var(--plan, var(--muted)); }

/* The website. Controls (buttons, switches, menus, fields, status chips) come from src/ui.css, which the
   build puts above this file, so they are the same as in the app. This file only lays out pages. */
:root {
  --bg: #121417; --surface: #181b1f; --raise: #1e2126; --page: #1e2126; --ink: #e4e0d8; --muted: #9a9ea5; --soft: #cfcbc3; --line: #2a2e34;
  --accent: #c9a66b; --accent-ink: #1a150c; --accent-soft: #2b271f; --hit: #9bd6a4; --desk: #0d0f11;
  --sheet: #ece5d6; --sheet-ink: #26221b; --sheet-muted: #8d826f;
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --radius: 3px; --sec: 96px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .flush { margin: 0; }

/* Type: the book serif for anything a reader would find in a printed book, the system sans for the rest. */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.4vw, 60px); letter-spacing: -.012em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.005em; }
h3 { font-size: 22px; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 36em; }
/* Labels are the italic serif in brass, as in the app's panels. Never spaced capitals. */
.label { font: italic 16px var(--serif); color: var(--accent); margin: 0 0 10px; }

/* Header: the same 64px bar, lockup and account button as Your books in the app. */
.brand { font: italic 500 22px var(--serif); color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand svg { color: var(--accent); flex: none; }
.brand .bn { display: flex; flex-direction: column; line-height: 1; }
.brand small { font: italic 400 14px var(--serif); color: var(--accent); margin-top: 1px; padding-left: 1px; }

/* Sections */
.sec { padding-block: var(--sec); border-top: 1px solid var(--line); }
.sec-head { max-width: 40em; margin-bottom: 40px; }
.sec-head h2 { margin-bottom: 12px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-sub { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.cta-sub a { color: var(--muted); }
.plain-link { color: var(--muted); font-size: 15px; }
.plain-link:hover { color: var(--ink); }

/* ---------- Home: the live workspace ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 820px; grid-template-rows: auto auto; column-gap: 56px; align-items: center; align-content: center; max-width: 1340px; padding-block: 64px 88px; }
.hero h1 { grid-column: 1; align-self: end; font-size: clamp(36px, 3.6vw, 48px); max-width: 11em; margin-bottom: 20px; }
.hero-side { grid-column: 1; align-self: start; }
.hero .lede { margin: 0 0 24px; }
.hero-side .cta-sub { margin-top: 14px; }
/* A fine grain over the whole site, like the tooth of paper, so the dark ground isn't flat. */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .89  0 0 0 0 .87  0 0 0 0 .84  0 0 0 .0035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23g%29'/%3E%3C/svg%3E"); --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .28  0 0 0 0 .18  0 0 0 .005 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23g%29'/%3E%3C/svg%3E"); }
/* Under the grain, a faded haze like thin cloud on a night sky, so the ground has depth as well as texture. */
:root { --haze: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='1000'%3E%3Cfilter id='h' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .91  0 0 0 0 .88  0 0 0 0 .82  0 0 0 .016 -.0045'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23h%29'/%3E%3C/svg%3E"); }
body { background-image: var(--grain), var(--haze); background-size: 220px 220px, 1000px 1000px; }

/* Behind the top of the home page, soft clouds drift slowly across the night sky.
   They sit under everything, are faint enough never to compete with text, and stand still for anyone who asks for less motion. */
.sky-wrap { position: relative; isolation: isolate; overflow-x: clip; }
.sky { position: absolute; z-index: -1; inset: 0 0 auto; height: 760px; pointer-events: none; overflow: hidden;
  -webkit-mask: linear-gradient(#000 50%, transparent); mask: linear-gradient(#000 50%, transparent); }
.sky-defs { position: absolute; width: 0; height: 0; }
.cloud { position: absolute; left: 0; overflow: visible; animation: drift var(--t) linear infinite; animation-delay: var(--d); will-change: transform; }
.cloud g { filter: url(#cloudy); }
.cloud rect, .cloud circle { fill: url(#puff); }
/* Each cloud keeps to its own band of sky, so drifting clouds never pass over one another. */
.cloud.n1 { left: -60px; top: 64px; width: 440px; opacity: .13; }
.cloud.n4 { right: -70px; left: auto; top: 16px; width: 380px; opacity: .10; }
.cloud.c1 { top: 262px; width: 500px; opacity: .10; --t: 240s; --d: -60s; }
.cloud.c2 { top: 432px; width: 300px; opacity: .09; --t: 280s; --d: -190s; }
.cloud.c3 { top: 584px; width: 380px; opacity: .08; --t: 260s; --d: -120s; }
/* The two by the headline only sway, so the hero always has sky around it. */
.cloud.near { animation: sway var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
.cloud.n1 { --t: 26s; --d: -8s; } .cloud.n4 { --t: 30s; --d: -11s; }
@media (max-width: 900px) { .cloud.n4 { display: none; } }
@keyframes sway { from { transform: translateX(-24px); } to { transform: translateX(24px); } }
@keyframes drift { from { transform: translateX(-60vw); } to { transform: translateX(120vw); } }
@media (prefers-reduced-motion: reduce) {
  .cloud { animation: none; }
  .cloud.c1 { left: 48%; } .cloud.c2 { left: 8%; } .cloud.c3 { left: 62%; }
}
/* The writing screen sits beside the headline at one fixed size, so it never stretches with the window. */
.hero-stage { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }

.ws { --w-bg: var(--surface); --w-desk: var(--desk); --w-line: var(--line); --w-ink: var(--ink); --w-muted: var(--muted); --w-soft: var(--accent-soft);
  --sh: var(--sheet); --sh-ink: var(--sheet-ink); --sh-muted: var(--sheet-muted);
  display: grid; grid-template-columns: 168px minmax(0, 1fr) 204px; grid-template-rows: auto 1fr auto; width: 820px; max-width: 100%; height: 600px; margin-inline: auto;
  border: 1px solid var(--w-line); border-radius: var(--radius); overflow: hidden; background: var(--w-desk); color: var(--w-ink); font-size: 13.5px; line-height: 1.45; }
.ws.paper { --w-bg: #fbf8f2; --w-desk: #f4efe6; --w-line: #e3dbcc; --w-ink: #1f1d1a; --w-muted: #6f675b; --w-soft: #efe5d2; --sh: #fffdf8; --sh-ink: #1f1d1a; --sh-muted: #8d826f;
  --accent: #7f6230; --accent-soft: #efe5d2; --accent-ink: #f6f1e7; --line: #e3dbcc; --surface: #fbf8f2; --ink: #1f1d1a; --muted: #6f675b; }
.ws-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--w-bg); border-bottom: 1px solid var(--w-line); }
.ws-top .crumbs { color: var(--w-muted); margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-top .crumbs b { color: var(--w-ink); font-weight: 600; }
.ws-saved { color: var(--w-muted); font-size: 12.5px; min-width: 4.5em; }
.ws-side { background: var(--w-bg); border-right: 1px solid var(--w-line); padding: 14px 10px; overflow: hidden; }
.ws-book { font: 500 16px/1.2 var(--serif); padding: 0 10px 2px; }
.ws-sub { color: var(--w-muted); font-size: 12.5px; padding: 0 10px 12px; }
.ws-side .side-nav button { font-size: 13.5px; padding: 6px 10px; }
.ws-part { font: italic 13px var(--serif); color: var(--w-muted); padding: 10px 10px 4px; }
.ws-desk { overflow: auto; padding: 24px 5% 40px; scrollbar-width: thin; }
.ws-sheet { background: var(--sh); color: var(--sh-ink); max-width: 560px; margin: 0 auto; min-height: 100%; padding: 40px 44px 56px; box-shadow: 0 1px 2px rgb(0 0 0 / .25), 0 18px 40px -24px rgb(0 0 0 / .6); }
.ws-run { text-align: center; font: 10.5px var(--serif); letter-spacing: .2em; color: var(--sh-muted); margin: 0 0 30px; }
.ws-num { text-align: center; font: italic 14px var(--serif); color: var(--sh-muted); margin: 0 0 4px; }
.ws-sheet h3 { text-align: center; font-size: 28px; margin: 0 0 26px; color: var(--sh-ink); }
.ws-body { font: 16.5px/1.7 var(--serif); text-align: justify; hyphens: auto; outline: 0; caret-color: var(--accent); overflow-wrap: anywhere; min-height: 8em; }
.ws-body p { margin: 0; text-indent: 1.5em; }
.ws-body p:first-child { text-indent: 0; }
.ws-body p:first-child::first-letter { float: left; font-size: 3.3em; line-height: .82; padding: 5px 7px 0 0; }
.ws-body:empty::before { content: 'Start typing. This chapter is still an idea.'; color: var(--sh-muted); font-style: italic; }
.ws-panel { background: var(--w-bg); border-left: 1px solid var(--w-line); padding: 16px 16px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.ws-panel h4 { font: italic 14px var(--serif); color: var(--w-muted); font-weight: 400; margin: 4px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--w-line); }
.ws-panel h4 + .ws-hint { margin-top: 2px; }
.ws-hint { color: var(--w-muted); font-size: 12.5px; margin: 0 0 6px; }
.ws-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ws-card { border: 1px solid var(--w-line); border-left: 3px solid var(--c, var(--accent)); border-radius: var(--radius); padding: 8px 10px; background: var(--w-desk); }
.ws-card b { display: block; font-weight: 600; }
.ws-card span { color: var(--w-muted); font-size: 12.5px; display: block; }
.ws-card em { font-style: normal; font-size: 12.5px; color: var(--accent); }
.ws-card.new { animation: arrive .5s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.ws-today { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 6px; }
.ws-today strong { font: 400 28px var(--serif); }
.ws-status { grid-column: 1 / -1; display: flex; gap: 20px; align-items: center; padding: 7px 14px; background: var(--w-bg); border-top: 1px solid var(--w-line); color: var(--w-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ws-status .meter { width: 120px; }
.ws-status .hint { margin-left: auto; }
.ws.focus { grid-template-columns: 0 minmax(0, 1fr) 0; }
.ws.focus .ws-side, .ws.focus .ws-panel { visibility: hidden; }
.ws { transition: grid-template-columns .35s ease; }
.ws .seg { background: transparent; }

/* ---------- Home: inside Haven (the app's sidebar beside a screenshot) ---------- */
.parts { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
.parts .side-nav { position: sticky; top: 96px; border-left: 1px solid var(--line); padding-left: 10px; }
.parts .side-nav button { font-size: 15px; padding: 10px 14px; }
.parts .side-nav .n { font: italic 13px var(--serif); color: var(--muted); }
.part h3 { font-size: 28px; margin-bottom: 10px; }
.part > p { color: var(--soft); max-width: 38em; }
.part ul { margin: 0 0 24px; padding-left: 20px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; max-width: 40em; }
.part .shot { margin: 0; }
.parts-js .part:not(.on) { display: none; }
.parts .more { margin-top: 18px; }

/* ---------- Home: the outline board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--st); border-radius: var(--radius); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 196px; cursor: grab; user-select: none; touch-action: none; }
.ocard:focus-visible { outline-offset: 3px; }
.ocard.drag { opacity: .35; }
.ocard.ghost-slot { border-style: dashed; }
.ocard .num { font: italic 13px var(--serif); color: var(--muted); }
.ocard h3 { font-size: 19px; line-height: 1.2; }
.ocard p { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 0; flex: 1; }
.ocard .foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ocard .status { background: none; border: 1px solid var(--line); border-radius: 2px; padding: 3px 8px; cursor: pointer; color: var(--ink); }
.ocard .status:hover { border-color: var(--st); }
.ocard .pov { font-size: 12.5px; color: var(--muted); }
.board-foot { display: flex; gap: 20px; align-items: center; margin-top: 18px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.board-foot .meter { width: 200px; }

/* ---------- Home: the four steps, the questions, the last call ---------- */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; counter-reset: step; }
.how li { counter-increment: step; border-top: 1px solid var(--line); padding: 20px 0 0; }
.how h3 { font-size: 21px; margin-bottom: 8px; }
.how h3::before { content: counter(step) '. '; color: var(--accent); }
.how p { margin: 0; font-size: 15px; color: var(--muted); }
.final { padding-block: calc(var(--sec) + 8px); border-top: 1px solid var(--line); }
.final .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.final h2 { font-size: clamp(34px, 5vw, 56px); }
.final p { margin: 10px 0 0; color: var(--muted); }

/* ---------- Home: a Paper section, as in the app's Paper theme ---------- */
.sec.paper { --bg: #f4efe6; --surface: #fbf8f2; --raise: #efe5d2; --page: #fffdf8; --ink: #1f1d1a; --muted: #6f675b; --soft: #3d3830; --line: #e3dbcc;
  --accent: #7f6230; --accent-ink: #f6f1e7; --accent-soft: #efe5d2; background: var(--bg) var(--grain-light); color: var(--ink); border-top: 0; color-scheme: light; }
.sec.paper a:not(.btn) { color: var(--accent); }
.sec.paper + .sec { border-top: 0; }
.sec + .sec.paper { border-top: 0; }

/* ---------- Home: the export preview ---------- */
.ex { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.ex-controls { display: grid; gap: 16px; align-content: start; }
.ex-row { display: grid; gap: 6px; }
.ex-l { font: italic 15px var(--serif); color: var(--accent); }
.ex-row .seg { width: fit-content; max-width: 100%; overflow-x: auto; }
.ex-out { font: 400 26px/1.25 var(--serif); margin: 10px 0 0; }
.ex-note { color: var(--muted); margin: 0; max-width: 32em; }
.ex-desk { background: var(--desk); border: 1px solid var(--line); border-radius: var(--radius); height: 540px; display: grid; place-items: center; overflow: hidden; }
/* Pages are drawn at the same scale (44px to the inch), so the sizes compare truly: 6 × 9 in, A5, US Letter. */
.ex-page { --pw: 264px; --ph: 396px; width: var(--pw); height: var(--ph); background: var(--sheet); color: var(--sheet-ink); position: relative; overflow: hidden;
  padding: 11% 10% 12%; font: 8.6px/1.55 var(--serif); box-shadow: 0 1px 2px rgb(0 0 0 / .3), 0 24px 50px -24px rgb(0 0 0 / .7);
  transition: width .45s ease, height .45s ease, padding .45s ease, font-size .3s ease, border-radius .3s ease; }
.ex-page.s-a5 { --pw: 257px; --ph: 364px; }
.ex-page.s-letter { --pw: 374px; --ph: 484px; }
.ex-ch { text-align: center; font-style: italic; color: var(--sheet-muted); margin: 18% 0 2px; font-size: 1.1em; }
.ex-page h4 { text-align: center; font: 400 2.3em var(--serif); margin: 0 0 1.4em; }
.ex-text p { margin: 0; text-align: justify; hyphens: auto; text-indent: 1.4em; }
.ex-text p:first-child { text-indent: 0; }
.ex-text p:first-child::first-letter { float: left; font-size: 3.2em; line-height: .82; padding: .06em .08em 0 0; }
.ex-text p:first-child::first-line { font-variant: small-caps; letter-spacing: .04em; }
.ex-folio { position: absolute; bottom: 5%; left: 0; right: 0; text-align: center; color: var(--sheet-muted); }
.ex-ms-head, .ex-epub-bar { display: none; }
/* EPUB: a screen, not a page. The text reflows and is a little larger. */
.ex-page.f-epub { --pw: 250px; --ph: 500px; border-radius: 14px; padding: 16% 9% 10%; font-size: 11px; background: #f7f3ea; }
.ex-page.f-epub .ex-epub-bar { display: block; position: absolute; top: 0; left: 0; right: 0; padding: 10px 14px; font: 10px var(--ui); color: var(--sheet-muted); border-bottom: 1px solid #e2d9c6; }
.ex-page.f-epub .ex-folio { display: none; }
.ex-page.f-epub .ex-ch { margin-top: 10%; }
/* Word: standard manuscript format. */
.ex-page.f-docx { --pw: 374px; --ph: 484px; background: #fff; color: #111; padding: 9% 10%; font: 8.5px/2.1 'Times New Roman', Times, serif; }
.ex-page.f-docx .ex-ms-head { display: block; text-align: right; color: #555; margin-bottom: 14%; }
.ex-page.f-docx .ex-ch { font-style: normal; color: #111; margin-top: 10%; }
.ex-page.f-docx h4 { font: 400 1.2em 'Times New Roman', Times, serif; text-transform: uppercase; margin-bottom: 1em; }
.ex-page.f-docx .ex-text p { text-align: left; hyphens: manual; text-indent: 3em; }
.ex-page.f-docx .ex-text p:first-child::first-letter { float: none; font-size: 1em; padding: 0; }
.ex-page.f-docx .ex-text p:first-child::first-line { font-variant: normal; letter-spacing: 0; }
.ex-page.f-docx .ex-folio { display: none; }
@media (max-width: 900px) { .ex { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 520px) { .ex-desk { height: 470px; } .ex-page { transform: scale(.82); } }

/* Screenshots: a plain frame, no fake window chrome. */
.shot, .win { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); margin: 0; }
.shot img, .win img { width: 100%; }

/* Questions */
details.qa { border-top: 1px solid var(--line); }
details.qa:last-of-type { border-bottom: 1px solid var(--line); }
details.qa summary { cursor: pointer; font: 19px/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: '+'; color: var(--accent); font: 22px/1 var(--ui); }
details.qa[open] summary::after { content: '\2212'; }
details.qa summary:hover { color: var(--accent); }
details.qa > div { padding: 0 0 18px; color: var(--soft); }
details.qa > div p:last-child { margin: 0; }
.qa-list { max-width: 760px; }

/* ---------- Inner pages ---------- */
.page-head { padding-block: 72px 40px; }
.page-head .lede { margin-top: 16px; }
.page-head .cta { margin-top: 26px; }
.page-head.centre { text-align: center; }
.page-head.centre h1, .page-head.centre .lede { margin-inline: auto; }
.page-head.narrow { max-width: 720px; }
.crumb { margin: 0 0 10px; font-size: 14px; }
.crumb a { color: var(--muted); }
.prose-page { padding-bottom: var(--sec); }
.prose-page h2 { font-size: 30px; margin: 52px 0 14px; }
.prose-page h3 { font-size: 21px; margin: 30px 0 8px; }
.prose-page p, .prose-page li { color: var(--soft); }
.prose-page ul, .prose-page ol { padding-left: 20px; }
.prose-page li { margin-bottom: 6px; }
.prose-page .cta { margin: 28px 0; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); padding: 14px 18px; border-radius: var(--radius); margin: 0 0 28px; text-align: left; }
.note p:last-child { margin: 0; }
code { font-size: .9em; background: var(--raise); padding: 1px 5px; border-radius: 2px; }
.c-h { padding-top: 56px; }
.c-h > h2 { margin-top: 0; }
.centre-p { margin-top: 24px; }
.plain-list { margin: 12px 0 0; padding-left: 20px; }
.plain-list li { margin-bottom: 6px; color: var(--soft); font-size: 15px; }
.lp .win { margin-bottom: 8px; }
.lp-col { max-width: 720px; }

/* features */
.hl-list { display: grid; gap: 88px; padding-block: 24px var(--sec); }
.hl { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hl.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.hl.flip .text { order: 2; }
.hl h2 { margin-bottom: 12px; }
.hl p { margin: 0 0 12px; }
.all-h { margin-bottom: 18px; }
.ff-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 14px 0; border-bottom: 1px solid var(--line); }
.ff-search { flex: 1 1 260px; max-width: 360px; }
.ff-none { padding: 24px 0; }
.feature-group { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 36px 0; border-top: 1px solid var(--line); }
.feature-group:first-of-type { border-top: 0; }
.prose-page .feature-group h2 { font-size: 26px; margin: 0; }
.feature-group dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.feature-group dt { font-weight: 600; margin-bottom: 4px; }
.feature-group dd { margin: 0; color: var(--muted); font-size: 15px; }
[data-item][hidden], .feature-group[hidden] { display: none; }

/* pricing */
.price-page { max-width: 900px; }
.price-top { display: flex; gap: 20px 32px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.seg em { font: 600 12px var(--ui); color: var(--hit); margin-left: 6px; font-style: normal; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0 0 20px; }
.plan { position: relative; border: 1px solid var(--line); border-top: 3px solid var(--plan); background: var(--surface); border-radius: var(--radius); padding: 28px 28px 26px; display: flex; flex-direction: column; gap: 8px; transition: border-color .2s; }
.plan.pick { border-color: var(--accent); border-top-color: var(--plan); }
.plan h2, .prose-page .plan h2 { font-size: 28px; color: var(--plan); margin: 0; }
.plan .price { font: 400 52px/1 var(--serif); margin: 12px 0 14px; }
.plan .price span { font: 15px var(--ui); color: var(--muted); }
.plan .btn { width: 100%; padding-block: 11px; }
.plan .btn.soon { color: var(--muted); cursor: default; }
.plan .plain-list { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 12px; }
.plans-note { max-width: 40em; }
.qa-h { margin-top: 72px !important; }
.picker { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.picker-q { margin: 0; color: var(--muted); }
.picker label { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 15px; }
.picker input { accent-color: var(--accent); }
.picker-a { flex-basis: 100%; margin: 4px 0 0; color: var(--ink); }
table.compare, .tbl { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.compare th, .compare td, .tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 14px; }
.table-scroll { overflow-x: auto; }

/* install */
.install-hero { padding-block: 72px 56px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.dl-main { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.dl-main p { margin: 0; }
.dl-steps { max-width: 34em; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; color: var(--ink); }
.os-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.os { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.os.mine { border-color: var(--accent); }
.os h3 { margin-bottom: 8px; }
.os .here { display: block; font: italic 14px var(--serif); color: var(--accent); margin-bottom: 4px; }
.installs { scroll-margin-top: 80px; }
.dl-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 28px; }
.dl-card h2, .prose-page .dl-card h2 { font-size: 24px; margin: 0 0 6px; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 36px; margin-bottom: 16px !important; }
.steps li::before { content: counter(s) '.'; position: absolute; left: 0; top: -3px; color: var(--accent); font: 22px var(--serif); }

/* patch notes */
.rel-list { display: grid; }
.rel-date { margin: 0 0 4px; font: italic 16px var(--serif); color: var(--accent); }
.rel-date span { color: var(--muted); }
.release .rel-tag, .prose-page .release .rel-tag { margin: 22px 0 6px; font: italic 400 17px var(--serif); color: var(--soft); }
.release li { margin: 0 0 7px; line-height: 1.5; }
.release { display: block; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 0 28px; border-top: 1px solid var(--line); }
.rel-meta { display: flex; flex-direction: column; gap: 4px; }
.release .ver { font: 400 32px/1 var(--serif); color: var(--accent); }
.release .date { color: var(--muted); font-size: 14px; }
.release h2, .prose-page .release h2 { font: 400 30px/1.15 var(--serif); letter-spacing: -.005em; margin: 0 0 4px; }
.release ul { margin: 0; }
.older { margin-top: 8px; border-top: 1px solid var(--line); max-width: 760px; margin-inline: auto; }
.older > summary { cursor: pointer; font: 600 15px var(--ui); color: var(--accent); padding: 18px 0; list-style: none; }
.older > summary::-webkit-details-marker { display: none; }
.older > summary::before { content: '+ '; }
.older[open] > summary::before { content: '\2212 '; }

/* widgets on the landing pages */
.widget { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 22px; margin: 18px 0 28px; }
.w-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.w-top strong { color: var(--ink); font: 400 20px var(--serif); }
.w-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.sp-sheet { background: #f6f1e5; color: #1b1914; border-radius: 2px; padding: 24px 28px; font: 15px/1.5 'Courier New', Courier, monospace; min-height: 280px; }
.spl input { width: 100%; background: none; border: 0; border-bottom: 1px dotted transparent; font: inherit; color: inherit; padding: 2px 0; }
.spl input:focus { outline: 0; border-bottom-color: #8d826f; }
.spl.on { background: rgba(201,166,107,.15); }
.sp-scene { margin-top: 1.1em; font-weight: 700; text-transform: uppercase; }
.sp-scene:first-child { margin-top: 0; }
.sp-action { margin-top: .9em; }
.sp-character { margin-top: .9em; padding-left: 38%; text-transform: uppercase; }
.sp-dialogue { padding: 0 16% 0 22%; }
.sp-parenthetical { padding: 0 20% 0 30%; }
.sp-transition { margin-top: .9em; text-align: right; text-transform: uppercase; }
.sp-transition input { text-align: right; }
.tree-box { background: #f3efe4; border-radius: 2px; padding: 12px; overflow-x: auto; }
.tree-box .ft-svg { display: block; margin: 0 auto; max-width: none; height: auto; }
.tree-box .ft-line { fill: none; stroke: #8a7a5a; stroke-width: 1.4; }
.tree-box .ft-node rect { fill: #fff; stroke: #8a7a5a; stroke-width: 1.2; }
.tree-box .ft-node { cursor: pointer; }
.tree-box .ft-node:focus { outline: none; }
.tree-box .ft-node:focus rect { stroke: #26221b; stroke-width: 2.4; }
.tree-box .ft-node.sel rect { fill: #e8d8b4; stroke: #6d5320; stroke-width: 2; }
.tree-box .ft-node.rel rect { fill: #f3e9cf; stroke: #6d5320; }
.tree-box .ft-name { font: 600 14px Georgia, serif; fill: #111; }
.tree-box .ft-life { font: 12px Georgia, serif; fill: #6b624e; }
.tree-cap { margin: 12px 0 0; min-height: 3em; color: var(--soft); }
.w-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.w-grid label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.w-grid input, .w-grid select { width: 100%; }
.w-out { margin: 16px 0 6px; font: 400 20px/1.4 var(--serif); color: var(--ink); }
.w-grid-2 { align-items: end; margin-top: 12px; }
.w-out-2 { font-size: 16px; margin: 0; color: var(--soft); }

/* Account box on the site: the app's account button and menu, from ui.css. */

/* Footer */
.foot { background: var(--bg); border-top: 1px solid var(--line); padding: 48px 0 64px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
.foot h4 { font: italic 15px var(--serif); color: var(--accent); margin: 0 0 10px; font-weight: 400; }
.foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .made { margin-top: 12px; }
.crumb{margin:0 0 8px;font-size:14px}.crumb a{color:var(--muted)}
.tbl{width:100%;border-collapse:collapse;margin:12px 0}.tbl th,.tbl td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line)}.tbl th{color:var(--muted);font-weight:500;font-size:14px}
.guide-list{list-style:none;padding:0;margin:0}.guide-list li{padding:14px 0;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:4px}.guide-list a{text-decoration:none}
.prose-page .cta{margin:28px 0}

.reference{margin-top:56px;padding-top:24px;border-top:1px solid var(--line)}
.ref-search{width:100%;margin:12px 0}
.ref-toc{display:flex;flex-wrap:wrap;gap:6px 14px;margin:8px 0 24px;font-size:14px}
.ref-toc a{color:var(--muted)}
.ref-sec h3{margin:32px 0 4px}
.ref-sec dl{margin:12px 0;padding:0}
.ref-item{padding:10px 0;border-top:1px solid var(--line)}
.ref-item dt{font-weight:600}
.ref-item dd{margin:2px 0 0;color:var(--muted)}
.ref-item[hidden],.ref-sec[hidden]{display:none}

/* Documentation: menu on the left, the page in the middle, "On this page" on the right. */
.docs.wrap{max-width:1280px;display:grid;grid-template-columns:260px minmax(0,1fr) 220px;gap:40px;padding-top:28px;padding-bottom:80px;align-items:start}
.docs-menu-btn{display:none}
.docs-side{position:sticky;top:80px;max-height:calc(100vh - 96px);overflow:auto;padding-right:8px}
.docs-nav h4{font:600 12px var(--ui);letter-spacing:.06em;text-transform:uppercase;color:var(--ink);margin:22px 0 6px}
.docs-nav ul{list-style:none;margin:0;padding:0}
.docs-nav a{display:block;padding:6px 10px;border-radius:3px;color:var(--muted);text-decoration:none;font-size:14.5px}
.docs-nav a:hover{color:var(--ink);background:var(--surface)}
.docs-nav a.on{color:var(--accent);background:var(--accent-soft)}
.docs-top{margin-top:14px}
.docs-search{width:100%;font-size:14px}
.docs-results{margin-top:8px!important}.docs-results a{display:flex;flex-direction:column;gap:1px}.docs-results a span{font-size:12.5px;color:var(--muted)}
.docs-main{min-width:0}
.docs-main h1{font:400 clamp(30px,4vw,40px)/1.15 var(--serif);margin:4px 0 12px}
.docs-main .lede{margin:0 0 28px}
.docs-main .crumb{margin:0 0 6px;font-size:13.5px;color:var(--muted)}.docs-main .crumb a{color:var(--accent)}
.docs-h{font:400 24px var(--serif);margin:36px 0 12px}
.doc-item{padding:20px 0;border-top:1px solid var(--line);scroll-margin-top:84px}
.doc-item h2{font:600 18px var(--ui);margin:0 0 6px;position:relative}
.doc-item p{margin:0;color:#cfcbc3}
.doc-item .anchor{position:absolute;left:-22px;color:var(--muted);text-decoration:none;opacity:0}
.doc-item h2:hover .anchor,.doc-item .anchor:focus{opacity:1}
.docs-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.docs-card{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--line);border-radius:3px;background:var(--surface);text-decoration:none;color:var(--ink)}
.docs-card:hover{border-color:var(--accent)}.docs-card span{font-size:14px;color:var(--muted)}
.docs-pager{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:44px}
.docs-pager a{display:flex;flex-direction:column;gap:2px;padding:14px 16px;border:1px solid var(--line);border-radius:3px;text-decoration:none;color:var(--ink)}
.docs-pager a:hover{border-color:var(--accent)}.docs-pager a span{font-size:12.5px;color:var(--muted)}.docs-pager .next{text-align:right;grid-column:2}
.docs-aside{position:sticky;top:80px;display:flex;flex-direction:column;gap:28px;font-size:14px}
.docs-toc h4{font:600 12px var(--ui);letter-spacing:.06em;text-transform:uppercase;margin:0 0 8px}
.docs-toc ul{list-style:none;margin:0;padding:0;border-left:1px solid var(--line)}
.docs-toc a{display:block;padding:4px 12px;color:var(--muted);text-decoration:none}.docs-toc a:hover{color:var(--ink)}
.docs-fb{padding-top:4px}.docs-fb-btns{display:flex;gap:8px;margin-top:8px}
.docs-callout{margin-top:40px}
@media (max-width:1100px){.docs.wrap{grid-template-columns:240px minmax(0,1fr)}.docs-aside{grid-column:2;position:static}}
@media (max-width:820px){
  .docs.wrap{grid-template-columns:1fr;gap:16px}
  .docs-menu-btn{display:inline-flex;justify-self:start}
  .docs-side{display:none;position:static;max-height:none}.docs-side.open{display:block}
  .docs-aside{grid-column:1}.doc-item .anchor{display:none}
}
.docs-page .top .wrap, .docs-page .foot .wrap { max-width: 1280px; }
.docs-nav h4, .docs-toc h4 { font: italic 15px var(--serif); letter-spacing: 0; text-transform: none; color: var(--accent); }
.docs-nav a.on { color: var(--ink); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); border-radius: 2px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 1340px) {
  .hero { grid-template-columns: minmax(0, 1fr); max-width: 1120px; }
  .hero h1, .hero-side, .hero-stage { grid-column: 1; grid-row: auto; }
  .hero h1 { font-size: clamp(36px, 5vw, 56px); max-width: 14em; }
  .hero-side { max-width: 40em; }
  .hero-stage { margin-top: 40px; }
}
@media (max-width: 1060px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --sec: 72px; }
  .hero, .install-hero { grid-template-columns: 1fr; gap: 36px; padding-block: 48px 64px; }
  .parts { grid-template-columns: 1fr; gap: 24px; }
  .parts .side-nav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .parts .side-nav button { width: auto; white-space: nowrap; }
  .parts .side-nav .n { display: none; }
  .parts .side-nav [aria-selected='true'] { box-shadow: inset 0 -2px 0 var(--accent); }
  .how { grid-template-columns: 1fr 1fr; gap: 24px 32px; }
  .hl, .hl.flip, .feature-group, .release, .dl-card { grid-template-columns: 1fr; gap: 24px; }
  .hl.flip .text { order: 0; }
  .os-grid { grid-template-columns: 1fr 1fr; }
  .final .wrap { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 860px) {
  .foot .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .ws { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; height: auto; }
  .ws-side { display: none; }
  .ws-desk { padding: 16px 12px 24px; max-height: 460px; }
  .ws-sheet { padding: 28px 22px 34px; }
  .ws-panel { border-left: 0; border-top: 1px solid var(--line); }
  .ws-status .hint, .ws [data-ws-focus] { display: none; }
  .board { grid-template-columns: 1fr 1fr; }
  .feature-group dl, .plans, .w-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --sec: 56px; }
  .wrap { padding-inline: 16px; }
  .how, .board, .os-grid { grid-template-columns: 1fr; }
  .ocard { min-height: 0; }
  .sp-sheet { padding: 18px 14px; font-size: 13.5px; }
  .widget { padding: 16px; }
  .ws-body { font-size: 16px; }
}

/* trust, tools, news, name generator and sample reader */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 24px; }
.trio > div, .trio > a { border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; background: var(--surface); color: var(--ink); text-decoration: none; }
.trio h3 { font-size: 20px; margin: 0 0 8px; }
.trio p { margin: 0; color: var(--muted); font-size: 15px; }
.trio.tools > a:hover { border-color: var(--accent); }
.data-list { max-width: 44em; }
.news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.news article { border-top: 1px solid var(--line); padding-top: 14px; }
.news-date { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.news h3 { font-size: 20px; margin: 0 0 6px; }
.news p:last-child { margin: 0; color: var(--muted); font-size: 15px; }
.tool-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin-bottom: 18px; }
.tool-bar label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.tool select { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 9px 10px; font: inherit; }
.names { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.names button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 8px 14px; font: 17px var(--serif); cursor: pointer; }
.names button:hover { border-color: var(--accent); }
.names.kept button { border-color: var(--accent); }
.reader { --rs: 18px; max-width: 760px; }
.reader-bar, .reader-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; }
.reader-nav { margin: 18px 0 0; }
.reader-sheet { background: var(--sheet); color: var(--sheet-ink); border-radius: 3px; padding: 56px clamp(22px, 8vw, 80px) 64px; font: var(--rs)/1.7 var(--serif); }
.reader.night .reader-sheet { background: #1e2126; color: #e4e0d8; }
.reader-sheet h2 { text-align: center; font-weight: 400; font-size: 1.7em; margin: 4px 0 6px; }
.reader-sheet .ws-run, .reader-sheet .ws-num { text-align: center; margin: 0; font-size: .62em; letter-spacing: .2em; color: var(--sheet-muted); }
.reader-sheet .ws-num { margin-top: 28px; }
.reader-sheet .ornament { text-align: center; margin: 6px 0 20px; color: var(--sheet-muted); }
.reader-sheet p:not(.ws-run):not(.ws-num) { margin: 0; text-align: justify; hyphens: auto; text-indent: 1.4em; }
.reader-sheet .ornament + p { text-indent: 0; }
@media (max-width: 760px) { .trio, .news { grid-template-columns: 1fr; } }

/* name and prompt generators, tools hub */
.namegen { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.ng-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.ng-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ng-group .chip[disabled] { opacity: .35; cursor: default; }
.ng-roll { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.dice { display: inline-block; font-size: 1.3em; line-height: 1; transition: transform .4s; }
.ng-roll:hover .dice, .ng-roll:active .dice { transform: rotate(180deg); }
.ng-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ng-card { position: relative; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); padding: 16px 44px 16px 18px; min-height: 108px; }
.ng-card h3 { font-size: 22px; margin: 0 0 6px; }
.ng-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.ng-card.kept { border-color: var(--accent); background: var(--accent-soft); }
.ng-card .star, .ng-card .again { position: absolute; right: 8px; background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 6px; line-height: 1; }
.ng-card .star { top: 8px; } .ng-card .again { bottom: 8px; font-size: 18px; }
.ng-card .star:hover, .ng-card .again:hover { color: var(--accent); }
.ng-card.kept .star { color: var(--accent); }
.ng-card.flip { animation: ngflip .45s cubic-bezier(.2,.7,.3,1) both; }
@keyframes ngflip { from { opacity: 0; transform: translateY(10px) rotateX(40deg); } to { opacity: 1; transform: none; } }
.ng-cast { background: var(--sheet); color: var(--sheet-ink); border-radius: 3px; padding: 22px 22px 18px; position: sticky; top: 84px; }
.ng-cast h2 { font-size: 20px; text-align: center; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; font-weight: 400; }
.ng-cast .muted { color: var(--sheet-muted); }
.ng-cast ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ng-cast li { display: grid; gap: 2px; border-bottom: 1px dotted var(--sheet-muted); padding-bottom: 8px; }
.ng-cast li strong { font: 400 18px var(--serif); }
.ng-cast li span { font-size: 13.5px; color: var(--sheet-muted); }
.ng-cast .link { justify-self: start; background: none; border: 0; padding: 0; color: var(--sheet-muted); font-size: 12px; text-decoration: underline; cursor: pointer; }
.ng-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.ng-cast .btn.line { color: var(--sheet-ink); border-color: var(--sheet-muted); }
.pg-parts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.pg-parts li { display: grid; grid-template-columns: 70px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; background: var(--surface); }
.pg-parts li.locked { border-color: var(--accent); background: var(--accent-soft); }
.pg-label { color: var(--accent); font: italic 15px var(--serif); }
.pg-parts p { margin: 0; font: 19px/1.35 var(--serif); }
.pg-parts p.pop { animation: ngflip .4s both; }
.pg-lock { background: none; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); padding: 5px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.pg-lock[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.pg-whole { margin: 18px 0 0; font: italic 19px/1.5 var(--serif); color: var(--muted); }
.trio.tools4 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 40px; }
.tool-ico { display: block; font-size: 30px; color: var(--accent); margin-bottom: 8px; }
@media (max-width: 900px) { .namegen { grid-template-columns: 1fr; } .ng-cast { position: static; } .ng-roll { margin-left: 0; } }
@media (max-width: 560px) { .ng-cards, .trio.tools4 { grid-template-columns: 1fr; } .pg-parts li { grid-template-columns: 1fr auto; } .pg-label { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .ng-card.flip, .pg-parts p.pop { animation: none; } }
.ng-group .chip { font: 600 14px var(--ui); background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 8px 14px; cursor: pointer; }
.ng-group .chip:hover { color: var(--ink); border-color: var(--muted); }
.ng-group .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ng-cast li strong { color: var(--sheet-ink); }
.ng-actions button.plain-link { background: none; border: 0; padding: 0 4px; color: var(--sheet-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.ng-cast .btn.line { background: transparent; }

/* announcement bar, sticky call to action */
.announce { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 40px; background: var(--accent-soft); border-bottom: 1px solid var(--line); position: relative; font-size: 14.5px; text-align: center; }
.announce[hidden] { display: none; }
.announce p { margin: 0; }
.announce a { font-weight: 600; margin-left: 6px; }
.announce strong { font-weight: 700; }
.announce button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); text-align: center; display: none; }
@media (max-width: 760px) { .sticky-cta:not([hidden]) { display: block; } .sticky-cta .btn { width: 100%; } }

/* aged paper behind the page: foxing that drifts, grain, faint ruled lines */
.story-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; --sy: 0; }
.story-bg::before { content: ''; position: absolute; left: 0; right: 0; top: -20vh; height: 170vh; opacity: .035; will-change: transform;
  transform: translate3d(0, calc(var(--sy) * -.08px), 0);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='1000' height='1000'><filter id='f' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.0045 0.006' numOctaves='3' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.79  0 0 0 0 0.62  0 0 0 0 0.36  0 0 0 1.8 -0.82'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>") 0 0 / 1000px 1000px; }
.story-bg::after { content: ''; position: absolute; inset: 0; opacity: .05;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.82  0 0 0 0 0.66  0 0 0 0.6 -0.2'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>") 0 0 / 320px 320px,
    repeating-linear-gradient(to bottom, transparent 0 35px, rgba(201,166,107,.07) 35px 36px),
    linear-gradient(to right, transparent calc(50% - 560px - 52px), rgba(190,90,80,.07) calc(50% - 560px - 52px), rgba(190,90,80,.07) calc(50% - 560px - 51px), transparent calc(50% - 560px - 51px));
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, rgba(0,0,0,.55) 100%); }
main, .foot { position: relative; z-index: 1; }
@media (max-width: 760px) { .story-bg::after { background-size: 320px 320px, auto, auto; } }

/* plain text sections */
.narrow-sec { max-width: 720px; }
.narrow-sec h2 { margin-bottom: 14px; }
.promises, .tool-list { list-style: none; margin: 18px 0 0; padding: 0; }
.promises li { padding: 12px 0; border-top: 1px solid var(--line); }
.promises li:last-child { border-bottom: 1px solid var(--line); }
.promises strong { color: var(--ink); }
.tool-list li { display: grid; grid-template-columns: 250px 1fr; gap: 6px 24px; padding: 11px 0; border-top: 1px solid var(--line); }
.tool-list li:last-child { border-bottom: 1px solid var(--line); }
.tool-list a { font-weight: 600; }
.tool-list span { color: var(--muted); }
@media (max-width: 640px) { .tool-list li { grid-template-columns: 1fr; } }
.tool-wide { max-width: 760px; margin: 0 auto 40px; }

/* The mini app on the home page holds still: the drifting clouds are the one moving thing on the page. */

/* Clearer separation between sections: a stronger rule, and every other plain section sits on a slightly lighter band. */
.sec { border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); }
.sec.paper { box-shadow: 0 -1px 0 rgba(0,0,0,.35); }

/* Frosted bands: a lighter, blurred pane over the textured ground, alternating with the plain dark sections. */
.sec.frost { background: color-mix(in srgb, #e9e4da 3%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-block: 1px solid color-mix(in srgb, #fff 8%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 4%, transparent); }
.sec + .sec.frost, .sec.frost + .sec { border-top-color: color-mix(in srgb, #fff 8%, transparent); }
:root[data-theme="light"] .sec.frost { background: color-mix(in srgb, #fff 55%, transparent); border-color: rgba(0,0,0,.08); }

/* Text pages: bands that alternate between the plain ground and a frosted pane. */
.band { padding-block: 44px 28px; }
.band.frost { padding-block: 52px 40px; }
.band .prose-page { padding-block: 0; }

/* Off-white for the important parts: the plan cards on Pricing. */
.price-page .plan { --surface: #fbf8f2; --ink: #1f1d1a; --muted: #6f675b; --soft: #3d3830; --line: #e3dbcc; background: #f6f1e7; color: #1f1d1a; border-color: #e3dbcc; border-top-color: var(--plan); }
.price-page .plan h2, .price-page .plan h3, .price-page .plan strong { color: #1f1d1a; }
.price-page .plan .muted, .price-page .plan li, .price-page .plan p { color: #3d3830; }
.price-page .plan a:not(.btn) { color: #7f6230; }

/* Pricing cards: badge, billing line, grouped check lists, comparison table and a closing call to action. */
.plan > .plan-badge { position: absolute; top: -13px; left: 28px; margin: 0; background: #1f1d1a; color: #f6f1e7; font-size: 12px; letter-spacing: .04em; padding: 4px 10px; border-radius: 3px; }
.plan-sub { color: var(--muted); margin: -6px 0 14px; }
.plan-best { color: var(--soft); margin: 14px 0 4px; min-height: 3em; }
.plan-h { font: italic 15px var(--serif); color: var(--plan); margin: 16px 0 6px; font-weight: 400; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding: 5px 0 5px 24px; font-size: 15px; color: var(--soft); }
.check-list li::before { content: ''; position: absolute; left: 3px; top: 11px; width: 10px; height: 5px; border-left: 2px solid var(--plan); border-bottom: 2px solid var(--plan); transform: rotate(-45deg); }
.plan .btn { text-align: center; }
.compare-wrap { overflow-x: auto; margin-bottom: 36px; }
.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.compare thead th { font: italic 16px var(--serif); font-weight: 400; color: var(--accent); }
.compare th[scope="row"], .compare thead th:first-child { text-align: left; font-weight: 400; font-style: normal; font-family: var(--ui); color: var(--soft); }
.compare thead th:first-child { color: var(--muted); }
.price-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--ink) 4%, transparent); margin: 12px 0 8px; }
.price-cta h2 { font-size: 24px; margin: 0 0 6px; }
.price-cta p { margin: 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan-best { min-height: 0; } }

.price-page .plan .plan-badge { color: #f6f1e7; background: #1f1d1a; border: 1px solid #3d3830; }
.price-page .check-list { padding: 0; margin: 0; }
.price-page .plan .check-list li { padding-left: 24px; margin: 0; }

/* Pricing, second pass: a wider page, shorter cards that all list the same rows, ticks for what each plan includes. */
.price-page { max-width: 1100px; }
.plans { gap: 24px; align-items: stretch; }
.plan { padding: 30px 28px 28px; gap: 6px; }
.plan .plan-head { min-height: 3.6em; }
.plan .price { margin: 10px 0 4px; }
.plan .plan-sub { margin: 0 0 16px; }
.tick-list { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.price-page .tick-list { padding-left: 0; }
.tick-list li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.35; color: var(--soft); }
.tick-list li::before { content: ''; position: absolute; left: 2px; top: .3em; width: 12px; height: 6px; border-left: 2px solid var(--plan); border-bottom: 2px solid var(--plan); transform: rotate(-45deg); }
.tick-list li.off { color: #9a9283; }
.tick-list li.off::before { border: 0; width: 10px; height: 2px; top: .62em; left: 3px; background: #b9b19f; transform: none; }
.sr { position: absolute; left: -9999px; }
.price-page .plan .btn { margin-top: 4px; }

/* ---------- Calls to action ----------
   A brass button keeps its dark text wherever it sits, including the off-white bands, where links turn a darker brass. */
.btn:not(.line), .btn:not(.line):visited { color: var(--accent-ink); }
.sec.paper .btn:not(.line) { --accent: #c9a66b; --accent-ink: #1a150c; }
.sec.paper .btn.line { color: var(--ink); }
.centre-cta { justify-content: center; margin-top: 28px; }
.page-head.centre .cta-sub { text-align: center; }

/* The last thing on the home page: one plain invitation, with room around it. */
.end-cta { text-align: center; padding-block: 112px; background: radial-gradient(ellipse 60% 80% at 50% 100%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
.end-cta h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 14px; }
.end-cta p { color: var(--muted); font-size: 18px; max-width: 32em; margin: 0 auto 30px; }
.end-cta .cta { justify-content: center; }

/* ---------- Pricing, third pass: the Writer card leads ---------- */
.price-page .picker { gap: 10px; margin-bottom: 4px; }
.price-page .picker-q { flex-basis: 100%; font: italic 17px var(--serif); color: var(--accent); }
.price-page .picker label { position: relative; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; color: var(--soft); transition: border-color .15s, background .15s, color .15s; }
.price-page .picker label:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--ink); }
.price-page .picker input { position: absolute; opacity: 0; pointer-events: none; }
.price-page .picker label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.price-page .picker label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.price-page .picker-a { color: var(--soft); margin-top: 6px; }

.plans { padding-top: 18px; }
.price-page .plan { box-shadow: 0 1px 2px rgb(0 0 0 / .3), 0 22px 44px -30px rgb(0 0 0 / .8); transition: transform .25s ease, box-shadow .25s ease, border-color .2s; }
/* The plan that fits what you picked (Writer to begin with) is lifted and ringed in brass. */
.price-page .plan.pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 2px 4px rgb(0 0 0 / .3), 0 34px 60px -28px color-mix(in srgb, var(--accent) 55%, #000); transform: translateY(-10px); }
.price-page .plan .price { font-size: 60px; letter-spacing: -.01em; }
.price-page .save { margin: -6px 0 6px; font: italic 15px var(--serif); color: #2e7a58; }
.price-page .plan .btn { padding-block: 13px; font-size: 15.5px; }
.price-page .plan.featured .plan-badge { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.price-page .plan.featured .plan-badge::before { display: none; }
.plans-note { margin-top: 18px; }
@media (max-width: 760px) { .price-page .plan.pick { transform: none; } .plans { padding-top: 8px; } }
@media (prefers-reduced-motion: reduce) { .price-page .plan { transition: none; } }

.price-cta { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(to right, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--accent) 3%, transparent)); padding: 32px 36px; margin-top: 36px; }
.price-cta h2 { font-size: 28px; }

/* Install page questions: the heading and a short line on the left, the questions on the right,
   lined up with the device steps above and set well apart from them. */
.faq-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 64px; align-items: start; margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.faq-side h2 { margin-bottom: 12px; }
.faq-side p { font-size: 15px; max-width: 22em; }
.faq-list details.qa:first-of-type { border-top: 0; }
.faq-list details.qa summary { padding: 18px 0; }
.faq-list details.qa > div { max-width: 40em; }
@media (max-width: 760px) { .faq-split { grid-template-columns: 1fr; margin-top: 48px; padding-top: 32px; } .faq-list details.qa:first-of-type { border-top: 1px solid var(--line); } }
.foot .wrap > div:first-child > p { margin: 14px 0 0; }

/* The same night sky behind the opening of every other page. These openings are shorter than the home page's,
   so the sky fits the section and keeps three clouds: two that sway by the heading and one that drifts. */
.sky-page .sky { height: 100%; min-height: 320px; -webkit-mask: linear-gradient(#000 60%, transparent); mask: linear-gradient(#000 60%, transparent); }
.sky-page .cloud.n1 { top: 18px; width: 360px; }
.sky-page .cloud.n4 { top: 8px; width: 320px; }
.sky-page .cloud.c1 { top: 52%; width: 420px; }
.sky-page .cloud.c2, .sky-page .cloud.c3 { display: none; }
.sky-page > header, .sky-page > section { position: relative; }

/* topic chips on Features match the pricing picker chips */
.ff-chips.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; background: none; max-width: 100%; }
.ff-chips.seg button { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--soft); transition: border-color .15s, background .15s, color .15s; }
.ff-chips.seg button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--ink); }
.ff-chips.seg button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 500; }
@media (max-width: 760px) { .ff-bar { position: static; } }

/* The buttons on the pricing cards: the one thing on each card you should look at.
   Deeper brass with a darker edge so it holds its own on the paper card, bigger type, an arrow that moves
   under the pointer, and a light that sweeps across once. The Writer card's button also glows. */
.price-page .plan .plan-btn {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding-block: 16px; font-size: 17px; font-weight: 700; letter-spacing: .01em;
  background-color: #c9a66b;
  background-image: linear-gradient(to bottom, #dcbd85 0%, #c9a66b 48%, #b38d4f 100%);
  border: 1px solid #8f6d36; color: #1a150c;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 2px 3px rgb(60 40 10 / .25), 0 10px 22px -10px rgb(120 85 30 / .7);
}
.price-page .plan .plan-btn .arr { display: inline-block; transition: transform .2s ease; }
.price-page .plan .plan-btn::after {
  content: ''; position: absolute; inset: 0 auto 0 -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / .45), transparent); transform: skewX(-18deg); transition: none;
}
.price-page .plan .plan-btn:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 -2px 0 rgb(0 0 0 / .12), 0 3px 4px rgb(60 40 10 / .25), 0 16px 30px -12px rgb(120 85 30 / .8); }
.price-page .plan .plan-btn:hover .arr { transform: translateX(4px); }
.price-page .plan .plan-btn:hover::after { left: 120%; transition: left .6s ease; }
.price-page .plan.featured .plan-btn { box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 0 0 4px rgb(201 166 107 / .28), 0 12px 26px -10px rgb(120 85 30 / .8); }
@media (prefers-reduced-motion: reduce) {
  .price-page .plan .plan-btn:hover { transform: none; }
  .price-page .plan .plan-btn:hover .arr { transform: none; }
  .price-page .plan .plan-btn::after { display: none; }
}

/* Everything, by topic */
.ff-intro { margin-bottom: 8px; }
.ff-intro .all-h { margin-bottom: 6px; } .ff-intro p { margin: 0 0 6px; }
.ff-chips.seg button .n { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.ff-chips.seg button[aria-pressed='true'] .n { color: var(--accent); }
.ff-count { flex-basis: 100%; margin: 0; min-height: 0; } .ff-count:empty { display: none; }
.feature-group { padding: 44px 0; }
.fg-side { position: sticky; top: 150px; align-self: start; }
.fg-side p { margin: 10px 0 0; font-size: 15px; max-width: 20em; }
.fg-meta { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.fg-meta span { color: var(--muted); }
.feature-group dl { gap: 14px; }
.fcard { padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--surface) 55%, transparent); transition: border-color .15s, background .15s; }
.fcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--surface) 85%, transparent); }
.fcard dt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; color: var(--ink); }
.fcard dt::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.fcard dd { line-height: 1.55; }
.fcard mark { background: var(--accent-soft); color: var(--ink); border-radius: 2px; padding: 0 1px; }
.ftag { font: 600 11.5px/1 var(--ui); letter-spacing: .02em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px; padding: 3px 8px; }
@media (max-width: 760px) { .fg-side { position: static; } .feature-group { padding: 32px 0; } }
.ff-end { margin-top: 48px; }

/* Upgrade pop-up, bottom right. Website only: it is not part of the app. Words and rules are in site/promo.js. */
.promo { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: min(360px, calc(100vw - 24px)); box-sizing: border-box; padding: 22px 22px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); box-shadow: 0 18px 48px -12px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .25); animation: promo-in .35s ease-out both; }
@keyframes promo-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .promo { animation: none; } }
.promo-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 0; border-radius: 3px; color: var(--muted); font: 22px/1 var(--ui); cursor: pointer; }
.promo-x:hover { color: var(--ink); background: var(--accent-soft); }
.promo-eyebrow { margin: 0 0 4px; font: italic 15px var(--serif); color: var(--accent); }
.promo h2 { margin: 0 0 8px; font: 400 23px/1.2 var(--serif); padding-right: 24px; }
.promo-lead { margin: 0 0 12px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.promo ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.promo li { position: relative; padding-left: 24px; font-size: 14.5px; line-height: 1.4; }
.promo li::before { content: ''; position: absolute; left: 2px; top: .35em; width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.promo-more { margin: 0 0 16px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.promo .promo-btn { display: flex; width: 100%; box-sizing: border-box; padding: 14px 18px; font-size: 16px; font-weight: 700; letter-spacing: .01em; background-color: #c9a66b; background-image: linear-gradient(to bottom, #dcbd85 0%, #c9a66b 48%, #b38d4f 100%); border: 1px solid #8f6d36; color: #1a150c; box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 10px 22px -10px rgb(120 85 30 / .7); }
.promo .promo-btn .arr { display: inline-block; transition: transform .2s ease; }
.promo .promo-btn:hover .arr { transform: translateX(4px); }
.promo-later { display: block; margin: 10px auto 0; padding: 6px 10px; background: none; border: 0; color: var(--muted); font: 13.5px var(--ui); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.promo-later:hover { color: var(--ink); }
@media (max-width: 600px) { .promo { right: 12px; bottom: 12px; left: 12px; width: auto; } body:has(.promo:not([hidden])) .sticky-cta { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .promo .promo-btn .arr { transition: none; } }

/* The Upgrade button that stays in the corner when the card is closed. */
.promo[hidden], .promo-tab[hidden] { display: none; }
.promo:focus { outline: none; }
.promo-tab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px 0 16px; border: 1px solid #8f6d36; border-radius: 999px; cursor: pointer;
  background-color: #c9a66b; background-image: linear-gradient(to bottom, #dcbd85 0%, #c9a66b 48%, #b38d4f 100%); color: #1a150c; font: 700 15.5px/1 var(--ui); letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 6px 20px -4px rgb(0 0 0 / .55), 0 0 0 0 rgb(201 166 107 / .55);
  animation: promo-in .35s ease-out both, promo-ping 2.4s ease-out 1.5s 3; transition: transform .15s ease, filter .15s ease; }
.promo-tab:hover { transform: translateY(-2px); filter: brightness(1.06); }
.promo-tab:active { transform: translateY(0); }
.promo-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.promo-tab svg { flex: none; }
@keyframes promo-ping { 0% { box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 6px 20px -4px rgb(0 0 0 / .55), 0 0 0 0 rgb(201 166 107 / .55); } 70%, 100% { box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 -2px 0 rgb(0 0 0 / .12), 0 6px 20px -4px rgb(0 0 0 / .55), 0 0 0 14px rgb(201 166 107 / 0); } }
@media (prefers-reduced-motion: reduce) { .promo-tab { animation: none; transition: none; } .promo-tab:hover { transform: none; } }
@media (max-width: 600px) { .promo-tab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); } }
@media (max-width: 760px) { body:has(.sticky-cta:not([hidden])) .promo-tab { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (max-width: 760px) { body:has(.sticky-cta:not([hidden])) [data-promo-root][data-kind='signup'] .promo-tab { display: none; } }
