/* Bendbook site: the Blueprint look (docs/design-system/project/tokens.json). One mode, no dark theme.
   Fonts are self-hosted from /fonts (SIL OFL), so no visit calls Google. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #FFFFFF; --sheet: #F4F7FB; --grid: #E3EAF3; --line: #C9D3E3; --line-strong: #7F90AB;
  --ink: #0B2545; --ink-2: #4A5A75; --on-ink: #FFFFFF; --mark: #C2410C; --mark-bg: #FFF6F1; --focus: #2F6FEB;
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 8px;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", sans-serif;
  --font-ui: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-figure: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/24px var(--font-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: 34px; line-height: 38px; }
h2 { font-size: 24px; line-height: 28px; }
h3 { font-size: 20px; line-height: 26px; font-family: var(--font-ui); font-weight: 600; }
p { margin: 0; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--mark); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: 16px; top: -56px; background: var(--ink); color: var(--on-ink); padding: 8px 16px; border-radius: var(--radius-lg); z-index: 10; }
.skip-link:focus { top: 8px; }

/* Header: a 2pt ink rule under it, like the app's lists */
.site-header { border-bottom: 2px solid var(--ink); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; min-height: 64px; }
.brand { font: 700 24px/28px var(--font-display); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand svg { display: block; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; font: 600 15px/20px var(--font-ui); }
.nav a { text-decoration: none; color: var(--ink-2); padding: 12px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav .lang { font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); color: var(--ink); padding: 6px 8px; margin: 0; }

.site-footer { border-top: 1px solid var(--line); margin-top: 48px; background: var(--sheet); }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 12px; }
.meta { font: 500 13px/18px var(--font-ui); color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; font: 600 14px/20px var(--font-ui); }
.footer-links a { color: var(--ink-2); text-decoration: none; padding: 8px 0; }
.footer-links a:hover { color: var(--ink); }

.overline { font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); }
.prose { padding: 32px 0 0; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { margin: 40px 0 12px; padding-top: 12px; border-top: 2px solid var(--ink); }
.prose h3 { margin: 24px 0 8px; font-size: 18px; line-height: 24px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .updated { font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); margin-bottom: 24px; }
.prose .lead { font-size: 18px; line-height: 26px; color: var(--ink); }
.table-scroll { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.table-scroll th { color: var(--ink); font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; background: var(--sheet); }
.table-scroll tr:last-child td { border-bottom: 0; }
.table-scroll td strong { color: var(--ink); }
.notice { border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 12px 16px; margin: 0 0 16px; background: var(--sheet); color: var(--ink); }
.prose .notice p { margin: 0; color: var(--ink); }

/* FAQ rows: flat, hairline dividers */
.faq { border-top: 2px solid var(--ink); margin: 24px 0 32px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 56px; padding: 14px 0; font: 600 17px/22px var(--font-ui); color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 22px/22px var(--font-figure); color: var(--mark); flex-shrink: 0; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 12px; color: var(--ink-2); }
.faq details p:last-child { margin-bottom: 16px; }

/* Landing */
.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 44px; line-height: 46px; margin-bottom: 12px; }
.hero .lead { font-size: 19px; line-height: 28px; color: var(--ink); margin-bottom: 20px; }
.sheet { background-color: var(--sheet); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 11px 11px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.sheet svg { display: block; width: 100%; height: auto; }
.pill { display: inline-block; font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; border: 1.5px solid var(--mark); color: var(--mark); border-radius: var(--radius-sm); padding: 4px 8px; }
.points { list-style: none; padding: 0; margin: 24px 0 0; border-top: 2px solid var(--ink); }
.points li { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; color: var(--ink-2); }
.points li strong { display: block; color: var(--ink); font: 600 17px/22px var(--font-ui); }

@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  h1 { font-size: 38px; line-height: 42px; }
  .hero h1 { font-size: 56px; line-height: 58px; }
}

/* Guides (pass-bendbook-guides): breadcrumbs, worked examples, diagrams, charts, the app link */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; padding: 0; margin: 0 0 16px; font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide .num { font: 600 15px/24px var(--font-figure); color: var(--ink); white-space: nowrap; }
.example { margin: 24px 0; border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 16px; background: var(--paper); }
.example figcaption { margin-bottom: 12px; color: var(--ink-2); }
.example figcaption .overline { display: block; color: var(--mark); margin-bottom: 4px; }
.example figcaption strong { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 0 0 16px; }
.facts div { border-top: 1px solid var(--line); padding-top: 6px; }
.facts dt { font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font: 600 18px/24px var(--font-figure); color: var(--ink); }
.example .table-scroll table { min-width: 480px; }
.example .table-scroll td strong { font-family: var(--font-figure); }
.example-note { border-left: 3px solid var(--mark); background: var(--mark-bg); padding: 8px 12px; margin: 0 0 12px; color: var(--ink); font-size: 15px; }
.prose .example-note { color: var(--ink); }
.source, .prose .source { font: 500 13px/18px var(--font-ui); color: var(--ink-2); margin: 0 0 8px; }
.diagram { margin: 24px 0; }
.diagram figcaption { font: 500 13px/18px var(--font-ui); color: var(--ink-2); margin-top: 8px; }
.chart h3 { margin-top: 28px; }
.table-scroll caption { caption-side: top; text-align: left; padding: 10px 12px; font: 600 14px/20px var(--font-ui); color: var(--ink); background: var(--sheet); border-bottom: 1px solid var(--line); }
.store-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: var(--radius-md); background: var(--mark); color: var(--on-ink); font: 600 16px/20px var(--font-ui); text-decoration: none; white-space: nowrap; }
.store-button:hover { background: #9A3412; }
.guide-list { list-style: none; padding: 0 !important; border-top: 2px solid var(--ink); }
.guide-list li { margin: 0 !important; padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.guide-list a { font: 600 17px/22px var(--font-ui); }
.guide-list span { font-size: 15px; line-height: 22px; color: var(--ink-2); }
.table-scroll td:first-child { white-space: nowrap; }

/* Guide site design, direction A "Drawing sheet" (pass-bendbook-guides-design;
   docs/guides-design-2026-11/README.md). The guide pages and the home pages. */
.wrap.wide { max-width: 1180px; }
@media (min-width: 768px) { .wrap.wide { padding-left: 32px; padding-right: 32px; } }
.nav .btn-ink { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-md); background: var(--ink); color: var(--on-ink); text-decoration: none; }
.nav .btn-ink:hover { background: #13325C; color: var(--on-ink); }
@media (max-width: 599px) {
  .hide-phone { display: none !important; }
  .crumbs li:first-child, .crumbs li[aria-current] { display: none; }
  .crumbs li:nth-child(2)::before { content: none; }
}

/* Figures in tables: Plex Mono; the mark column in the mark colour */
.table-scroll td.fig, .table-scroll td.fig strong { font: 600 16px/22px var(--font-figure); color: var(--ink); white-space: nowrap; }
.table-scroll td.mark, .table-scroll td.mark strong { color: var(--mark); }
.balloon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mark); color: var(--on-ink); font: 600 14px/1 var(--font-figure); flex-shrink: 0; }

/* The page: the article and, from 960 px, the app rail */
main.wrap.wide { padding-top: 20px; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.guide-layout .prose { padding-top: 0; }
.guide .updated { margin-bottom: 24px; }
.guide .app-card + p { font-size: 17px; line-height: 26px; color: var(--ink); }
@media (min-width: 960px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .guide h1 { font-size: 48px; line-height: 50px; margin-bottom: 10px; }
  .guide h2 { font-size: 26px; line-height: 30px; }
  .guide .updated { margin-bottom: 36px; }
  .guide .app-card + p { font-size: 18px; line-height: 28px; }
}

/* The answer sheet: the key figure and the engine's drawing on the 11 px grid */
.answer { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "figure label" "figure note" "drawing drawing" "source source"; gap: 4px 14px; padding: 14px; margin: 0 0 16px; align-items: start; }
.answer-label { grid-area: label; align-self: end; }
.prose .answer p { margin: 0; }
.prose .answer-figure { grid-area: figure; font: 600 52px/56px var(--font-figure); color: var(--ink); white-space: nowrap; }
.prose .answer-note { grid-area: note; margin: 0; color: var(--ink); font-size: 15px; line-height: 21px; }
.prose .answer-source { grid-area: source; margin: 0; }
.answer-drawing { grid-area: drawing; margin: 6px 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px; }
.answer-drawing svg { display: block; width: 100%; height: auto; }
.answer-drawing figcaption { font: 500 13px/18px var(--font-ui); color: var(--ink-2); padding: 4px 4px 0; }
@media (min-width: 700px) {
  .answer { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: 1fr auto auto auto auto 1fr; grid-template-areas: ". drawing" "label drawing" "figure drawing" "note drawing" "source drawing" ". drawing"; gap: 6px 24px; padding: 20px; margin-bottom: 36px; }
  .answer-label { align-self: auto; }
  .prose .answer-figure { font-size: 64px; line-height: 68px; }
  .answer-drawing { margin: 0; padding: 8px; align-self: center; }
}

/* The app: a card after the sheet on the phone, a sticky rail on desktop */
.app-card { display: flex; gap: 14px; align-items: center; border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 14px; margin: 0 0 24px; }
.app-card-shot { width: 88px; height: 112px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.app-card-shot img, .app-rail-shot img { width: 100%; height: auto; display: block; }
.app-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.prose .app-card p { margin: 0; color: var(--ink); font-size: 15px; line-height: 21px; }
.prose .app-card .overline, .app-rail .overline { color: var(--mark); }
.app-rail { display: none; }
.app-rail-card { border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--paper); }
.app-rail-shot { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); height: 320px; }
.app-rail-title { font: 700 24px/28px var(--font-display); color: var(--ink); }
.app-rail p:not([class]) { color: var(--ink-2); font-size: 15px; line-height: 22px; }
.app-rail .store-button { flex: 1 1 100%; }
@media (min-width: 960px) {
  .app-card { display: none; }
  .app-rail { display: block; position: sticky; top: 24px; }
}

/* Store buttons: the App Store, and Google Play beside it once it is live */
.store-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.store-button-play { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.store-button-play:hover { background: var(--sheet); }

/* "Calculate this bend", under the first worked numbers */
.calc-prompt { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin: 0 0 24px; border: 1.5px solid var(--mark); border-radius: var(--radius-lg); background: var(--mark-bg); }
.calc-prompt-text { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.prose .calc-prompt p { margin: 0; color: var(--ink); font-size: 15px; line-height: 22px; }
.calc-prompt .store-button { min-height: 44px; padding: 10px 16px; font-size: 15px; }
@media (max-width: 599px) {
  .calc-prompt { flex-direction: column; align-items: stretch; gap: 12px; }
  .calc-prompt-text { align-items: flex-start; }
  .calc-prompt .store-button { flex: 1; }
}

/* Steps with numbered balloons */
.prose ol.steps { list-style: none; padding: 0; margin: 0 0 16px; border-top: 2px solid var(--ink); }
.prose ol.steps li { display: flex; gap: 14px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }

/* The phone's store bar: fixed at the bottom once the app card has scrolled away */
.store-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 2px solid var(--ink); transform: translateY(110%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
.store-bar.is-shown { transform: none; visibility: visible; transition: transform .2s ease; }
.store-bar[hidden] { display: none; }
.store-bar .balloon { width: 36px; height: 36px; font-size: 16px; }
.store-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.store-bar-text strong { font: 600 15px/20px var(--font-ui); color: var(--ink); }
.store-bar-text span { font: 500 13px/18px var(--font-ui); color: var(--ink-2); }
.store-bar .store-buttons { flex-wrap: nowrap; }
.store-bar .store-button { min-height: 48px; padding: 10px 16px; }
.store-bar:has(.store-button-play) .balloon, .store-bar:has(.store-button-play) .store-bar-text span { display: none; }
@media (max-width: 959px) {
  .has-store-bar .site-footer .wrap { padding-bottom: calc(32px + 88px + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) { .store-bar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .store-bar, .store-bar.is-shown { transition: none; } }

/* The home pages (the Landing board) */
.l-section { padding: 64px 0; }
.l-section-sheet { background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.l-hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 48px; padding-bottom: 56px; }
.l-hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.l-h1 { font-size: 64px; line-height: 64px; }
.l-h2 { font-size: 38px; line-height: 42px; max-width: 760px; text-wrap: wrap; }
.l-lead { font-size: 19px; line-height: 28px; color: var(--ink); max-width: 560px; }
.l-hero-shots { flex: 1 1 420px; padding: 28px 20px 0; display: flex; justify-content: center; gap: 16px; overflow: hidden; height: 470px; }
.l-hero-shots img { width: 210px; height: auto; border-radius: 24px 24px 0 0; border: 1px solid var(--line); border-bottom: 0; display: block; align-self: flex-start; background: var(--paper); }
.l-hero-shots img + img { margin-top: 44px; }
.l-intro { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.l-intro p:not([class]) { color: var(--ink-2); font-size: 18px; line-height: 27px; max-width: 640px; }
.l-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; list-style: none; margin: 0; padding: 0; }
.l-points li { padding: 16px 0; border-top: 2px solid var(--ink); display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.l-points strong { color: var(--ink); font: 600 18px/24px var(--font-ui); }
.l-screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.l-screen { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.l-screen-frame { height: 380px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px 22px var(--radius-md) var(--radius-md); background: var(--paper); }
.l-screen-frame img { width: 100%; height: auto; display: block; }
.l-screen b { font: 600 17px/22px var(--font-ui); color: var(--ink); }
.l-screen span { color: var(--ink-2); font-size: 15px; line-height: 22px; }
.l-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.l-trust-card { border: 1.5px solid var(--ink); border-radius: var(--radius-lg); padding: 18px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.l-trust-card h3 { font-size: 19px; line-height: 24px; }
.l-trust-card p:not([class]) { color: var(--ink-2); }
.l-source { font: 600 13px/18px var(--font-figure); color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; }
.l-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 32px; }
.l-guides h3 { font: 600 12px/16px var(--font-figure); letter-spacing: .6px; text-transform: uppercase; color: var(--mark); margin: 0 0 8px; }
.l-guides .guide-list { margin: 0; }
.l-price { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 28px; background: var(--paper); }
.l-price > div:first-child { flex: 1 1 420px; display: flex; flex-direction: column; gap: 10px; }
.l-price .overline { color: var(--mark); }
.l-price .l-h2 { font-size: 32px; line-height: 36px; }
.l-price p:not([class]) { color: var(--ink-2); font-size: 17px; line-height: 26px; }
.l-end { padding-bottom: 64px; }
.site-footer.l-foot { margin-top: 0; }
@media (max-width: 600px) {
  .l-section { padding: 44px 0; }
  .l-hero { padding-top: 24px; padding-bottom: 36px; gap: 28px; }
  .l-h1 { font-size: 42px; line-height: 44px; }
  .l-h2 { font-size: 28px; line-height: 32px; }
  .l-hero-copy .store-buttons, .l-price .store-buttons { width: 100%; }
  .l-hero-copy .store-button, .l-price .store-button { flex: 1 1 100%; }
  .l-hero-shots { height: 360px; padding: 20px 8px 0; gap: 10px; }
  .l-hero-shots img { width: 168px; }
  .l-screens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .l-screen-frame { height: 280px; border-radius: 16px 16px var(--radius-md) var(--radius-md); }
  .l-price { padding: 20px; }
  .l-end { padding-bottom: 44px; }
}
