/* Wordsmith website. Colors and fonts come from the Wordsmith & Ink brand kit (tokens.json). */

@font-face { font-family: "Courier Prime"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/courier-prime-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/courier-prime-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --brand-ink: #1C2340;
  --brand-paper: #FAFAF7;
  --page: #FAFAF7;
  --raised: #FFFFFF;
  --sunken: #EEEFF4;
  --line: #D9DBE6;
  --ink: #1C2340;
  --muted: #5A6080;
  --accent: #3B4FA8;
  --on-accent: #FFFFFF;
  --night: #12162B;

  --script: #B8862B;      --script-text: #8A6418;
  --manuscript: #D24B3E;  --manuscript-text: #A8322A;
  --book: #2E9473;        --book-text: #1F7358;
  --cork: #E8DCC4;
  --stock: #FFFFFF;
  --stock-cream: #F3EBD9;

  /* The product color of the current page. The home page uses accent. */
  --brand: var(--accent);
  --brand-text: var(--accent);

  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #12162B;
    --raised: #1C2340;
    --sunken: #0C0F1F;
    --line: #2C3358;
    --ink: #E9EAF2;
    --muted: #9EA3BD;
    --accent: #9AABF2;
    --on-accent: #12162B;
    --script-text: #D9AE55;
    --manuscript-text: #F08A7E;
    --book-text: #6CCBA6;
    --cork: #2A2540;
  }
}

.p-script { --brand: var(--script); --brand-text: var(--script-text); }
.p-manuscript { --brand: var(--manuscript); --brand-text: var(--manuscript-text); }
.p-book { --brand: var(--book); --brand-text: var(--book-text); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

h1, h2, h3 { font-family: var(--mono); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40em; }
.eyebrow { font: 700 0.85rem/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--eyebrow, var(--ink)); margin: 0 0 1.1rem; display: flex; align-items: center; gap: 16px; }
.section-head .eyebrow::after, .p-hero .eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); max-width: 100%; }
.p-script, .p-manuscript, .p-book { --eyebrow: var(--brand-text); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.sunken { background: var(--sunken); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--raised); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand-link { display: flex; align-items: center; text-decoration: none; color: var(--ink); flex-shrink: 0; padding-bottom: 6px; }
.brand-link img { height: 27px; width: auto; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav-group { display: flex; align-items: center; gap: 4px; }
.nav-sep { width: 1px; height: 30px; background: var(--line); }
.nav-group a { --tint: var(--accent); --tint-text: var(--ink); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; padding: 8px 13px; border-radius: 8px; transition: background .15s ease, color .15s ease; }
.nav-group a.n-script { --tint: var(--script); --tint-text: var(--script-text); }
.nav-group a.n-manuscript { --tint: var(--manuscript); --tint-text: var(--manuscript-text); }
.nav-group a.n-book { --tint: var(--book); --tint-text: var(--book-text); }
.nav-group a:hover, .nav-group a[aria-current="page"] { background: color-mix(in srgb, var(--tint) 18%, transparent); color: var(--tint-text); }
.nav-group a:not([class]):hover, .nav-group a:not([class])[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 14px; font: 500 0.95rem var(--sans); cursor: pointer; }
@media (max-width: 1280px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 76px; flex-direction: column; align-items: stretch; gap: 6px; background: var(--page); border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 20px; max-height: calc(100vh - 76px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav-group { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-group a { padding: 12px; font-size: 1.05rem; }
  .nav-sep { width: auto; height: 1px; margin: 4px 0; }
  .nav-actions { margin: 10px 0 0; }
  .nav-actions .btn { flex: 1; justify-content: center; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 1rem/1 var(--sans); padding: 14px 20px; border-radius: 10px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--brand-ink); color: var(--brand-paper); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--brand-paper); color: var(--brand-ink); } }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--raised); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { padding: 11px 16px; font-size: 0.95rem; border-radius: 9px; }

/* Status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 0.75rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--raised); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chip, var(--muted)); }
.chip.pre { --chip: var(--accent); }
.chip.dev { --chip: var(--script); }
.chip.planned { --chip: var(--muted); }

/* Hero */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .notice { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); background: var(--raised); border: 1px solid var(--line); padding: 6px 14px 6px 6px; border-radius: 999px; margin-bottom: 28px; text-decoration: none; }
.hero .notice b { font-weight: 600; background: var(--brand-ink); color: var(--brand-paper); padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { .hero .notice b { background: var(--brand-paper); color: var(--brand-ink); } }
.hero-logo { margin-bottom: 28px; }
.hero-logo img { height: clamp(28px, 4.2vw, 46px); width: auto; }

/* The three icons on the home hero */
.icon-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 22px); }
.icon-stack a { display: block; text-decoration: none; color: var(--ink); text-align: center; }
.icon-stack img { width: 100%; border-radius: 22.5%; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -18px rgba(18,22,43,.55); transition: transform .25s ease; }
.icon-stack a:nth-child(2) img { transform: translateY(-18px); }
.icon-stack a:hover img { transform: translateY(-6px); }
.icon-stack a:nth-child(2):hover img { transform: translateY(-24px); }
.icon-stack span { display: block; margin-top: 14px; font: 700 0.95rem var(--mono); }
.icon-stack small { display: block; color: var(--muted); font-size: 0.85rem; }
.hero-flow { margin-top: 28px; display: flex; justify-content: center; gap: 10px; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }

/* App cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.card-top img { width: 64px; height: 64px; border-radius: 22.5%; }
.card .wordmark { height: 22px; width: auto; margin-bottom: 14px; }
.card p { color: var(--muted); }
.card ul { margin: 0 0 24px; padding: 0; list-style: none; font-size: 0.95rem; }
.card li { padding: 7px 0 7px 22px; border-top: 1px dashed var(--line); position: relative; }
.card li::before { content: ""; position: absolute; left: 2px; top: 0.85em; width: 8px; height: 8px; background: var(--brand); border-radius: 2px; }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; color: var(--brand-text); }
.card .more:hover { text-decoration: underline; }

/* Feature grids */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--raised); padding: 28px; }
.feature h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.feature h3::before { content: ""; width: 10px; height: 10px; background: var(--brand); flex: none; border-radius: 2px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Split: text + visual */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.wide-visual { grid-template-columns: 0.8fr 1.2fr; }
@media (max-width: 900px) { .split, .split.wide-visual { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 10px 0 10px 30px; position: relative; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--brand-text); border-bottom: 2px solid var(--brand-text); transform: rotate(-45deg); }
.ticks li:last-child { border-bottom: 0; }

/* Screenshots */
.shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(18,22,43,.45); background: var(--raised); }
.shot img { width: 100%; }
figure { margin: 0; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }
.principles h3 { font-size: 1.1rem; }
.principles p { color: var(--muted); font-size: 0.97rem; }
.principles .num { font: 700 0.9rem var(--mono); color: var(--muted); display: block; margin-bottom: 10px; }

/* Dark band (foundation story) */
.band { background: var(--night); color: #E9EAF2; }
.band .lede, .band .muted { color: #9EA3BD; }
.band a { color: #9AABF2; }
.band .btn-primary { background: var(--brand-paper); color: var(--brand-ink); }
.band .btn-ghost { background: transparent; color: #E9EAF2; border-color: #2C3358; }
.band .eyebrow { color: #9AABF2; }

/* Roadmap */
.road { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 900px) { .road { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .road { grid-template-columns: 1fr; } }
.road li { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.road li.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.road .when { font: 700 0.8rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.road li.now .when { color: var(--accent); }
.road h3 { margin: 8px 0 10px; font-size: 1.15rem; }
.road p, .road ul { color: var(--muted); font-size: 0.95rem; margin: 0; }
.road ul { padding-left: 18px; }
.road li li { margin: 4px 0; }

/* Status table */
.status { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.status th, .status td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.status th { font: 600 0.8rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.status td:first-child { font: 700 1rem var(--mono); white-space: nowrap; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Product page hero */
.p-hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.p-hero .app-id { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.p-hero .app-id img.icon { width: 72px; height: 72px; border-radius: 22.5%; box-shadow: 0 14px 30px -14px rgba(18,22,43,.6); }
.p-hero .app-id img.wordmark { height: clamp(24px, 3.4vw, 36px); width: auto; }
.p-hero .endorse { font-size: 0.9rem; color: var(--muted); margin: -16px 0 28px; }
.p-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--muted); font-size: 0.9rem; align-items: center; }
.p-hero .visual { margin-top: clamp(40px, 6vw, 64px); }

/* Callout */
.callout { border: 1px solid var(--line); background: var(--raised); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.callout img { width: 64px; height: 64px; border-radius: 22.5%; }
.callout h3 { margin: 0 0 6px; }
.callout p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .callout { grid-template-columns: 1fr; } }

/* Flow diagram (how the apps fit) */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.flow .step { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.flow .step img { width: 48px; height: 48px; border-radius: 22.5%; margin-bottom: 14px; }
.flow .step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.flow .step p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.flow .arrow { display: flex; align-items: center; justify-content: center; padding: 0 10px; color: var(--muted); }
.flow .arrow svg { width: 28px; height: 28px; }
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { padding: 10px 0; transform: rotate(90deg); }
}
.flow-note { margin-top: 20px; color: var(--muted); font-size: 0.95rem; text-align: center; }

/* Illustrations built in HTML (not screenshots) */
.mock { border-radius: 12px; border: 1px solid var(--line); background: var(--raised); box-shadow: 0 30px 60px -30px rgba(18,22,43,.45); overflow: hidden; font-size: 13px; line-height: 1.45; }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--page); font: 500 12px var(--sans); color: var(--muted); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.mock-bar .title { margin-left: 10px; color: var(--ink); font-weight: 600; }
.mock-body { display: grid; grid-template-columns: 190px 1fr 200px; min-height: 420px; }
.mock-side { background: var(--sunken); padding: 14px 10px; border-right: 1px solid var(--line); font-family: var(--sans); }
.mock-side.right { border-right: 0; border-left: 1px solid var(--line); background: var(--page); }
.mock-side h4 { font: 600 11px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 4px 6px 8px; }
.mock-side .row { padding: 4px 6px; border-radius: 6px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-side .row.in { padding-left: 20px; color: var(--muted); }
.mock-side .row.sel { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--ink); }
.mock-side .field { margin: 6px 6px 12px; }
.mock-side .field b { display: block; font: 600 11px var(--sans); color: var(--muted); margin-bottom: 4px; }
.mock-side .field span { display: block; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: 1px; }
.mock-page { padding: 28px clamp(18px, 4vw, 48px); font-family: var(--mono); font-size: 13.5px; line-height: 2; color: var(--ink); background: var(--raised); }
.mock-page h5 { font: 700 13.5px var(--mono); text-align: center; margin: 0 0 18px; }
.mock-page p { text-indent: 2.4em; margin: 0; }
.mock-page .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--manuscript); vertical-align: -0.2em; margin-left: 1px; }
.mock-foot { display: flex; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--page); font: 500 12px var(--sans); color: var(--muted); }
.target { height: 6px; width: 120px; background: var(--line); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.target b { display: block; height: 100%; width: 68%; background: var(--manuscript); }
@media (max-width: 900px) { .mock-body { grid-template-columns: 160px 1fr; } .mock-side.right { display: none; } }
@media (max-width: 560px) { .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; } .mock-page { font-size: 12.5px; } }

/* Corkboard illustration */
.cork { background: var(--cork); padding: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 560px) { .cork { grid-template-columns: 1fr 1fr; } }
.icard { background: var(--raised); border-radius: 4px; padding: 10px 12px 14px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); font-size: 12.5px; color: var(--ink); min-height: 112px; }
.icard b { display: block; font: 700 13px var(--mono); padding-bottom: 6px; margin-bottom: 6px; border-bottom: 2px solid var(--manuscript); }
.icard span { color: var(--muted); }
.icard:nth-child(3n+1) { transform: rotate(-1deg); }
.icard:nth-child(3n) { transform: rotate(0.8deg); }

/* Book spread illustration */
.spread-wrap { background: linear-gradient(180deg, var(--sunken), var(--page)); border-radius: 12px; border: 1px solid var(--line); padding: clamp(20px, 4vw, 48px); }
.spread { display: grid; grid-template-columns: 1fr 1fr; max-width: 640px; margin: 0 auto; box-shadow: 0 30px 50px -30px rgba(18,22,43,.6); }
.leaf { background: var(--stock-cream); color: #2A2620; aspect-ratio: 5 / 8; padding: 11% 11% 9%; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-size: clamp(6px, 1.5vw, 12.5px); line-height: 1.45; position: relative; overflow: hidden; }
.leaf.left { box-shadow: inset -18px 0 24px -20px rgba(0,0,0,.35); }
.leaf.right { box-shadow: inset 18px 0 24px -20px rgba(0,0,0,.35); }
.leaf .run { text-align: center; font-variant: small-caps; letter-spacing: 0.08em; color: #6B6253; margin-bottom: 1.6em; font-size: 0.9em; }
.leaf p { margin: 0; text-indent: 1.4em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.leaf .folio { position: absolute; bottom: 5%; left: 0; right: 0; text-align: center; color: #6B6253; font-size: 0.9em; }
.leaf .ch-num { text-align: center; margin-top: 22%; font-size: 0.95em; letter-spacing: 0.25em; color: #6B6253; }
.leaf .ch-title { text-align: center; font-size: 1.9em; font-style: italic; margin: 0.4em 0 0.3em; color: #2A2620; }
.leaf .orn { text-align: center; color: var(--book); margin-bottom: 1.6em; letter-spacing: 0.4em; }
.leaf .first { text-indent: 0; }
.leaf .first::first-letter { float: left; font-size: 3.4em; line-height: 0.85; padding: 0.06em 0.08em 0 0; color: #2A2620; }
.leaf .sc { font-variant: small-caps; letter-spacing: 0.04em; }
.guides { position: absolute; inset: 7% 8%; border: 1px dashed color-mix(in srgb, var(--manuscript) 60%, transparent); pointer-events: none; }
.book-ui { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.book-ui span { font: 500 12.5px var(--sans); background: var(--raised); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink); }
.book-ui span.ok { color: var(--book-text); border-color: color-mix(in srgb, var(--book) 50%, var(--line)); }
.book-ui span.ok::before { content: "\2713  "; font-weight: 700; }

/* Launcher illustration */
.launch { max-width: 560px; margin: 0 auto; }
.launch .mock-body { grid-template-columns: 1fr; min-height: 0; }
.launch-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.launch-apps div { text-align: center; font: 600 12px var(--sans); }
.launch-apps img { width: 56px; height: 56px; border-radius: 22.5%; margin: 0 auto 8px; }
.launch-apps small { display: block; color: var(--muted); font-weight: 500; }
.launch-recent { padding: 12px 18px 18px; font-family: var(--sans); }
.launch-recent h4 { font: 600 11px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.launch-recent .r { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.launch-recent .r:hover { background: var(--sunken); }
.launch-recent .r img { width: 22px; height: 22px; border-radius: 22.5%; }
.launch-recent .r span { flex: 1; }
.launch-recent .r small { color: var(--muted); }

/* Code */
pre { background: var(--brand-ink); color: #E9EAF2; border-radius: 10px; padding: 18px 20px; overflow-x: auto; font: 400 14px/1.6 var(--mono); }
code { font-family: var(--mono); font-size: 0.95em; }
:not(pre) > code { background: var(--sunken); padding: 2px 6px; border-radius: 5px; }

/* Footer */
.site-footer { background: var(--night); color: #9EA3BD; padding: 64px 0 40px; font-size: 0.93rem; }
.site-footer a { color: #E9EAF2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font: 600 0.78rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #E9EAF2; margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 0 0 8px; }
.foot-brand img { height: 22px; width: auto; margin-bottom: 16px; }
.foot-legal { border-top: 1px solid #2C3358; margin-top: 48px; padding-top: 24px; font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Utilities */
.center { text-align: center; margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.split > *, .hero-grid > *, .flow > * { min-width: 0; }
.hero .notice b { white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .card-top img, .callout img, .flow .step img, .p-hero .app-id img.icon, .icon-stack img, .launch-apps img { box-shadow: 0 0 0 1px rgba(233,234,242,.14); }
}

/* ---- Revision 2 (mockup feedback) ---- */
.hero .eyebrow { color: var(--ink); }
.hero-note { margin: 22px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 0.93rem; }
.icon-stack { gap: clamp(14px, 2.2vw, 26px); align-items: start; }
.icon-stack a:nth-child(2) img, .icon-stack a img { transform: none; }
.icon-stack a:hover img, .icon-stack a:nth-child(2):hover img { transform: translateY(-6px); }
.icon-stack span { font-size: 1.05rem; margin-top: 16px; }
.icon-stack small { font-size: 0.9rem; }

.section-head .actions { margin-top: 28px; }
h2 .arr { color: var(--muted); font-weight: 400; }

/* App cards are whole links now */
a.card { text-decoration: none; color: var(--ink); border-left: 4px solid var(--brand); padding-left: 30px; transition: transform .2s ease, box-shadow .2s ease; }
a.card::after { display: none; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(18,22,43,.5); }
a.card .card-top img { width: 56px; height: 56px; }
a.card .wordmark { height: 20px; }
a.card p { margin-bottom: 26px; }
a.card .more { display: inline-flex; align-items: center; gap: 8px; }
a.card .more svg { width: 18px; height: 18px; transition: transform .2s ease; }
a.card:hover .more svg { transform: translateX(4px); }
a.card:hover .more { text-decoration: none; }

/* Flow without boxes */
.flow { align-items: start; }
.flow .step { background: none; border: 0; padding: 8px 12px; text-align: center; text-decoration: none; color: var(--ink); border-radius: var(--radius); }
.flow .step img { width: 72px; height: 72px; margin: 0 auto 16px; transition: transform .2s ease; }
.flow .step:hover img { transform: translateY(-4px); }
.flow .step h3 { font-size: 1.15rem; }
.flow .step p { max-width: 17rem; margin: 0 auto; }
.flow .arrow { padding: 26px 8px 0; align-items: flex-start; }
.flow .arrow svg { width: 34px; height: 34px; color: var(--ink); }
@media (max-width: 900px) { .flow .arrow { padding: 4px 0; transform: rotate(90deg); align-items: center; } }

/* Foundation band */
.band .eyebrow { color: #E9EAF2; }
.band .eyebrow::after { background: #2C3358; }
.band .books-art { width: 100%; max-width: 520px; margin: 0 auto; height: auto; display: block; }

/* About */
.about-mark { max-width: 560px; }

/* Footer */
.foot-brand { padding-right: 32px; border-right: 1px solid #2C3358; }
@media (max-width: 860px) { .foot-brand { border-right: 0; padding-right: 0; grid-column: 1 / -1; } }

.nav-group a { white-space: nowrap; }
.section-head { max-width: none; }
.section-head > h2, .section-head > p:not(.eyebrow), .section-head > h1 { max-width: 46rem; }
.hero-grid { grid-template-columns: 1.05fr 0.95fr; }
.icon-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .icon-stack { max-width: 460px; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .icon-stack span { font-size: 0.9rem; } .icon-stack small { font-size: 0.8rem; } }

/* ---- Revision 3: full-width header, more room between sections ---- */
.site-header .wrap { max-width: none; padding: 0 clamp(16px, 3.5vw, 56px); }
.section { padding: clamp(88px, 12vw, 168px) 0; }
.hero { padding: clamp(72px, 11vw, 160px) 0 clamp(88px, 12vw, 168px); }
.p-hero { padding: clamp(72px, 10vw, 144px) 0 clamp(72px, 10vw, 136px); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.site-footer { padding: 88px 0 48px; }

/* ---- Revision 4: menu centered, buttons far right ---- */
.nav-links { display: flex; align-items: center; gap: 14px; }
@media (min-width: 1281px) {
  .site-header .wrap { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav { display: contents; }
  .nav-links { grid-column: 2; }
  .nav-actions { grid-column: 3; justify-self: end; margin-left: 0; }
}
@media (max-width: 1280px) {
  .nav-links { flex-direction: column; align-items: stretch; gap: 6px; }
}
