/* Favilla's page, in the app's own world: graphite on vellum over a steel drafting board, blueprint cobalt for what
   is active, light from the upper left. Tokens are the app's Drafting and Night shift themes; the system picks. */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --board: #ebeef0;
  --board-texture: url(img/board.png);
  --paper: #f6f7f8;
  --paper-texture: url(img/vellum.png);
  --sheet: #ffffff;
  --sheet-2: #eff1f3;
  --code-bg: #eff1f3;
  --ink: #1b2127;
  --ink-2: #47515a;
  --ink-3: #5e6871;
  --ink-4: #a8b0b7;
  --rule: #dde1e5;
  --rule-strong: #c3cad0;
  --accent: #1f56b0;
  --accent-hover: #174a9d;
  --accent-ink: #ffffff;
  --accent-wash: #e3ebf8;
  --add: #267546;
  --del: #b2402d;
  --term: #131518;
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --inset: inset 1px 1px 2px rgba(27, 42, 60, 0.06);
  --shadow-1: 1px 1px 0 rgba(27, 42, 60, 0.03), 1px 2px 5px -2px rgba(27, 42, 60, 0.12);
  --shadow-2: 1px 2px 0 rgba(27, 42, 60, 0.03), 3px 12px 32px -12px rgba(27, 42, 60, 0.3), 1px 4px 10px -4px rgba(27, 42, 60, 0.12);
  --shadow-3: 2px 3px 0 rgba(27, 42, 60, 0.03), 8px 28px 60px -24px rgba(27, 42, 60, 0.38), 2px 8px 18px -8px rgba(27, 42, 60, 0.14);
  --fast: 120ms;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --wide: 1200px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --board: #14171b;
    --board-texture: url(img/graphite-board.png);
    --paper: #1a1d22;
    --paper-texture: url(img/graphite.png);
    --sheet: #22262c;
    --sheet-2: #282d34;
    --code-bg: #15181c;
    --ink: #e3e7ec;
    --ink-2: #adb6c0;
    --ink-3: #95a0aa;
    --ink-4: #56606a;
    --rule: #2c3239;
    --rule-strong: #3c454f;
    --accent: #82abee;
    --accent-hover: #9dbdf2;
    --accent-ink: #0d1420;
    --accent-wash: #1c2a3f;
    --add: #80c898;
    --del: #ec917d;
    --term: #0f1114;
    --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --inset: inset 1px 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-1: 1px 1px 0 rgba(0, 0, 0, 0.2), 1px 2px 6px -2px rgba(0, 0, 0, 0.5);
    --shadow-2: 1px 2px 0 rgba(0, 0, 0, 0.2), 3px 12px 32px -12px rgba(0, 0, 0, 0.7), 1px 4px 10px -4px rgba(0, 0, 0, 0.4);
    --shadow-3: 2px 3px 0 rgba(0, 0, 0, 0.25), 8px 28px 60px -24px rgba(0, 0, 0, 0.8), 2px 8px 18px -8px rgba(0, 0, 0, 0.45);
  }
}

*, *::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(--board) var(--board-texture) repeat;
  background-size: 512px;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--code-bg); box-shadow: var(--inset); color: var(--ink); }
svg { flex: none; }
figure { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--sheet); padding: 8px 12px; }

.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }

/* The top bar sits on the board, as the app's title bar does */
.top { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 6px; box-shadow: var(--shadow-1); }
.top nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] { color: var(--ink); }
.top .lang { padding-left: 22px; border-left: 1px solid var(--rule-strong); }

/* Buttons: a plate that catches the light on its top edge and is pressed in when pushed */
.btn {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px;
  border-radius: 6px; font: 500 16px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn.primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.plain { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule-strong); box-shadow: var(--shadow-1), var(--highlight); }
.btn.plain:hover { background: var(--sheet-2); color: var(--ink); }
.btn svg { width: 19px; height: 19px; }

/* Hero */
.hero { padding-top: 56px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -0.028em; font-weight: 600; margin: 0; max-width: 15ch; text-wrap: balance; }
.hero .lede { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 58ch; margin: 24px 0 0; text-wrap: pretty; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-3); font-size: 14.5px; }
.hero .facts li { display: flex; align-items: center; gap: 7px; }
.hero .facts svg { width: 16px; height: 16px; color: var(--ink-3); }

.stage { position: relative; margin: 56px 0 0; padding-bottom: 40px; }
.stage .desk { border-radius: 10px; overflow: hidden; border: 1px solid var(--rule-strong); box-shadow: var(--shadow-3); background: var(--paper); }
.stage .phone {
  position: absolute; right: -12px; bottom: 0; width: 23%; max-width: 270px;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--rule-strong); box-shadow: var(--shadow-3); background: var(--paper);
}

/* Sections */
section { padding: 112px 0 0; }
h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; margin: 0; text-wrap: balance; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.copy p { color: var(--ink-2); margin: 16px 0 0; max-width: 54ch; text-wrap: pretty; }
.copy p strong { color: var(--ink); font-weight: 500; }

.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.row.flip .copy { order: 2; }
.row.tall { align-items: start; }
.row.tall .copy { position: sticky; top: 48px; }

/* A crop of the app laid on the board: a sheet with its own edge and shadow */
.sheet { border-radius: 8px; overflow: hidden; border: 1px solid var(--rule-strong); box-shadow: var(--shadow-2); background: var(--paper); }
.sheet.narrow { max-width: 380px; justify-self: center; }
.sheets { display: grid; gap: 20px; }
.term { border-radius: 10px; overflow: hidden; background: var(--term); border: 1px solid #2a2f36; box-shadow: var(--shadow-3); }
.term .bar { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #23282e; color: #9aa3ad; font: 13px/1 var(--mono); }
.term .bar svg { width: 16px; height: 16px; color: #6f7882; }

/* Commands as typed, in a pressed-in well, each with what it does beside it */
.cmds {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 22px; align-items: baseline;
  margin: 26px 0 0; padding: 16px 18px; border-radius: 8px; background: var(--code-bg); box-shadow: var(--inset);
  border: 1px solid var(--rule); color: var(--ink); overflow-x: auto;
}
.cmds .c { font: 14.5px/1.5 var(--mono); white-space: pre; }
.cmds .n { font-size: 14px; line-height: 1.45; color: var(--ink-3); }

/* Measured: a figure that reads as a reading off an instrument */
.figure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 28px 0 0; border-top: 1px solid var(--rule-strong); }
.figure div { padding: 18px 0 0; }
.figure div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.figure b { display: block; font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure span { display: block; color: var(--ink-3); font-size: 14.5px; margin-top: 8px; }
/* The checks section has a reading, not a picture */
.reading { align-self: center; }
.reading .figure { margin-top: 0; }
.table-title { margin: 52px 0 0; font-size: 17px; }
.copy + .table-title { margin-top: 40px; }
.note { color: var(--ink-3); font-size: 14.5px; line-height: 1.55; margin: 18px 0 0; max-width: 60ch; }

/* Providers, set as type rather than logos, on ruled lines */
.models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 0; padding: 0; list-style: none; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--rule); }
.models li { display: flex; align-items: baseline; gap: 8px; padding: 13px 0; border-top: 1px solid var(--rule); }
.models li.all { grid-column: 1 / -1; color: var(--ink-2); }
.models small { color: var(--ink-3); font-size: 13.5px; }

/* Also included: ruled rows in two columns, no cards */
.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; margin: 36px 0 0; }
.more > div { display: grid; align-content: start; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 14px; padding: 22px 0; border-top: 1px solid var(--rule-strong); }
.more svg { width: 20px; height: 20px; color: var(--ink-3); margin-top: 2px; grid-row: span 2; }
.more p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* Tables of measurements */
table { width: 100%; max-width: 760px; border-collapse: collapse; margin: 26px 0 0; font-variant-numeric: tabular-nums; font-size: 15.5px; }
th, td { text-align: right; padding: 12px 0 12px 20px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th + th, td + td { width: 160px; }
thead th { color: var(--ink-3); font-weight: 400; font-size: 14px; border-bottom-color: var(--rule-strong); }
tbody tr.us td { color: var(--ink); font-weight: 500; }
tbody td { color: var(--ink-2); }
.scroll { overflow-x: auto; }

/* Download: two plates on the board */
.get { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 36px 0 0; }
.plate { padding: 28px; border-radius: 10px; background: var(--sheet); border: 1px solid var(--rule-strong); box-shadow: var(--shadow-2), var(--highlight); }
.plate h3 { display: flex; align-items: center; gap: 10px; }
.plate h3 svg { width: 22px; height: 22px; color: var(--ink-3); }
.plate p { color: var(--ink-2); margin: 10px 0 0; font-size: 16px; }
.plate .btn { margin-top: 22px; }
.plate .alt { margin-top: 14px; font-size: 15px; color: var(--ink-3); }
.plate .cmds { margin-top: 20px; }

footer { margin: 120px 0 0; padding: 28px 0 40px; border-top: 1px solid var(--rule-strong); color: var(--ink-3); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
footer a { color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
footer svg { width: 16px; height: 16px; }
footer .end { margin-left: auto; }

/* Chinese: Plex for Latin and figures, the system's own Hei for the rest; CJK takes no negative tracking and
   wants more leading */
html:lang(zh-Hans) { --sans: 'IBM Plex Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif; }
html:lang(zh-Hans) body { line-height: 1.75; }
html:lang(zh-Hans) .hero h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: 0.01em; line-height: 1.2; max-width: none; }
html:lang(zh-Hans) .hero .lede { line-height: 1.7; max-width: 34em; }
html:lang(zh-Hans) h2, html:lang(zh-Hans) h3 { letter-spacing: 0; }
html:lang(zh-Hans) .copy p { max-width: 30em; }
html:lang(zh-Hans) .note { max-width: 34em; }
.nb { display: inline-block; }

@media (max-width: 960px) {
  .row, .row.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .row.flip .copy { order: 0; }
  .row.tall .copy { position: static; }
  .more { grid-template-columns: minmax(0, 1fr); }
  .get { grid-template-columns: minmax(0, 1fr); }
  section { padding-top: 88px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top { gap: 16px; height: 60px; }
  .top nav { gap: 16px; }
  .top nav .wide { display: none; }
  .top .lang { padding-left: 16px; }
  .hero { padding-top: 32px; }
  .hero .lede { font-size: 17.5px; }
  .hero .actions .btn { flex: 1 1 100%; justify-content: center; }
  .stage { margin-top: 40px; padding-bottom: 0; }
  .stage .desk { border-radius: 8px; }
  .stage .phone { position: static; width: 72%; max-width: 300px; margin: -64px 0 0 auto; border-radius: 20px; }
  section { padding-top: 72px; }
  .figure b { font-size: 36px; }
  .cmds { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cmds .n { margin: 0 0 9px; }
  .cmds .n:last-child, .cmds .n:empty { margin-bottom: 0; }
  .figure div + div { padding-left: 16px; }
  .plate { padding: 22px; }
  footer { margin-top: 88px; }
  footer .end { margin-left: 0; }
}
