/*
  Roost product site.

  Colours come from the app's own themes (src/theme.rs in the Roost repo):
  Paper for the page, Dusk for the Nest section and for dark mode.

  Headings use two self-hosted fonts under one family name, "Roost Display":
  Bricolage Grotesque for Latin and Zen Maru Gothic Bold for Japanese (both OFL,
  licences in fonts/). The Japanese file holds only the characters used in
  headings. After changing a heading, rebuild it:
    python roost/assets/fonts/subset.py ZenMaruGothic-Bold.ttf "BricolageGrotesque[opsz,wdth,wght].ttf"
  (needs fonttools and brotli; the two source fonts are on Google Fonts).

  Browsers keep this file, roost.js and the fonts for four hours, but fetch the
  pages fresh every time. So the pages link to them with a version (?v=20261203).
  After changing this file, roost.js or the Japanese font, replace that version
  everywhere under roost/ (the pages and this file) with a new one, such as
  the date. Otherwise returning visitors get new pages with old styles.
*/

@font-face {
  font-family: "Roost Display";
  src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027;
}
@font-face {
  font-family: "Roost Display";
  src: url("fonts/zen-maru-gothic-bold-subset.woff2?v=20261203") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+3000-30FF, U+4E00-9FFF, U+FF00-FFEF;
}

:root {
  color-scheme: light dark;
  --paper: #FBF9F4;
  --surface: #F3EFE6;
  --line: #D0C7B4;
  --ink: #20242B;
  --muted: #5C5F66;
  --accent: #E4572E;
  --button: #28584B;
  --button-hover: #1E463B;
  --on-button: #F5EAD2;
  --focus: #28584B;
  --dusk-bg: #100F22;
  --window-line: #302E55;
  --window-shadow: 0 2.5rem 4rem -2.5rem rgb(16 15 34 / .5);
  --lou-outline: #CFC6B4;

  --body: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  --display: "Roost Display", var(--body);
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: 1.25rem;
  --wrap: min(100% - var(--gutter) * 2, 76rem);
}
:root:lang(en) {
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Dusk: the Nest section, and the whole site when the OS is set to dark. */
.dusk {
  --paper: #100F22;
  --surface: #1A1833;
  --line: #302E55;
  --ink: #F3EEFF;
  --muted: #ABA6CC;
  --accent: #FF8A5C;
  --button: #FF8A5C;
  --button-hover: #FFA07A;
  --on-button: #2B1206;
  --focus: #FF8A5C;
  --lou-outline: #6F6A99;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #100F22;
    --surface: #1A1833;
    --line: #302E55;
    --ink: #F3EEFF;
    --muted: #ABA6CC;
    --accent: #FF8A5C;
    --button: #FF8A5C;
    --button-hover: #FFA07A;
    --on-button: #2B1206;
    --focus: #FF8A5C;
    --dusk-bg: #1A1833;
    --window-line: #3D3A6B;
    --window-shadow: none;
    --lou-outline: #6F6A99;
  }
  .dusk { --surface: #211F42; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.9 var(--body);
  line-break: strict;
  overflow-wrap: anywhere;
}
:lang(en) body, body:lang(en) { line-height: 1.65; }
h1, h2, h3, p, figure, dl, dd, ul, ol, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.4; text-wrap: balance; }
:lang(ja) :is(h1, h2, h3, .lead) { word-break: auto-phrase; }
:lang(en) :is(h1, h2, h3) { line-height: 1.12; letter-spacing: -.025em; }
:lang(en) h3 { line-height: 1.25; letter-spacing: -.01em; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: .09em; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 1.5rem; }
.wrap { width: var(--wrap); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 5; left: 1rem; top: 1rem; padding: .5rem 1rem; background: var(--ink); color: var(--paper); transform: translateY(-300%); }
.skip:focus { transform: none; }
kbd {
  display: inline-block;
  padding: .28em .5em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  font: .82em/1 var(--mono);
  white-space: nowrap;
}

/* Header */
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; flex: none; align-items: center; gap: .6rem; min-height: 2.75rem; white-space: nowrap; font: 700 1.35rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; border-radius: 6px; }
.site-nav { display: flex; align-items: center; gap: clamp(.25rem, 2.2vw, 1.75rem); font-size: .95rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: .35rem; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav .language { color: var(--muted); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .4rem 1.4rem;
  border-radius: 6px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.button:hover { background: var(--button-hover); }
.status { color: var(--muted); font-size: .95rem; }
.more { font-weight: 700; }

/* Hero */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hero h1 { font-size: clamp(1.85rem, 3.7vw, 3.4rem); line-height: 1.32; font-feature-settings: "palt"; }
.hero h1 span { display: inline-block; }
:lang(en) .hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em; font-feature-settings: normal; }
.lead { margin-top: 1.5rem; max-width: 31em; font-size: 1.0625rem; }
:lang(en) .lead { max-width: 32em; font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 2rem; }
.facts { display: flex; flex-wrap: wrap; margin-top: 2.25rem; padding: 1rem 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: .9rem; }
.facts li + li::before { content: "／"; margin-inline: .6em; color: var(--line); }
.stage { --s: 3; position: relative; margin-right: calc((100vw - var(--wrap)) / -2 - 4rem); padding-top: 3.25rem; }
.stage figcaption { max-width: 28rem; }
.stage .lou { position: absolute; left: 16%; top: calc(3.25rem - 20px * var(--s)); }

/* App window */
.window {
  display: block;
  border: 1px solid var(--window-line);
  border-radius: 10px;
  overflow: hidden;
  background: #100F22;
  box-shadow: var(--window-shadow);
}
.window img { width: 100%; }
a.window { cursor: zoom-in; }
figcaption { margin-top: .8rem; color: var(--muted); font-size: .875rem; line-height: 1.7; }

/* Scenes: one topic, one picture */
.scene { padding-block: clamp(3.5rem, 8vw, 7rem); }
.scene + .scene:not(.dusk) { border-top: 1px solid var(--line); }
.dusk + .scene { border-top: 0; }
.scene-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem clamp(1rem, 2.5vw, 2.5rem); align-items: start; }
.scene-text { grid-column: 1 / span 5; }
.scene-media { grid-column: 7 / -1; }
.scene-grid.is-flipped .scene-text { grid-column: 8 / -1; grid-row: 1; }
.scene-grid.is-flipped .scene-media { grid-column: 1 / span 6; grid-row: 1; }
.scene-grid.is-wide .scene-text { grid-column: 1 / span 7; }
.scene-grid.is-wide .scene-media { grid-column: 1 / -1; }
.scene-media.is-small .window { width: 6rem; }
.scene-media > :first-child, .scene-media.rows { margin-top: 0; }
.scene-grid + .scene-grid { margin-top: clamp(3rem, 6vw, 5.5rem); }
.scene h2 { font-size: clamp(1.55rem, 1.6vw + 1.1rem, 2.5rem); }
.scene h3 { font-size: 1.25rem; }
.scene :is(h2, h3) + p, .scene p + p { margin-top: 1rem; }
.scene-text > p { max-width: 34em; }
.keys { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem 1.25rem; align-items: baseline; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.keys dd { color: var(--muted); }
.plain-list { margin-top: 1.25rem; padding: 0; list-style: none; }
.plain-list li { padding: .8rem 0; border-top: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 1px solid var(--line); }

/* The Nest */
.dusk { background: var(--dusk-bg); color: var(--ink); }
/* What happens after the trial, and the request to buy. */
.ask { margin-top: 1.75rem; max-width: 34em; padding-left: 1.1rem; border-left: 3px solid var(--accent); }
.ask strong { display: block; font-size: 1.0625rem; line-height: 1.7; }
.ask p + p { margin-top: .35rem; }
.scene-text > .lou.is-asleep { margin-bottom: .5rem; }

/* Font switcher. Without :has() the three pictures simply stack. */
.switch { display: none; }
.shots { display: grid; gap: 1.5rem; }
@supports selector(:has(a)) {
  .switch { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; padding: 0; border: 0; }
  .switch label { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: .95rem; }
  .switch label:has(:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }
  .switch label:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .switch input { position: absolute; opacity: 0; pointer-events: none; }
  .shots figure { display: none; }
  .shots figcaption { display: none; }
  .demo:has([value="1"]:checked) .shots figure:nth-child(1),
  .demo:has([value="2"]:checked) .shots figure:nth-child(2),
  .demo:has([value="3"]:checked) .shots figure:nth-child(3) { display: block; }
}

/* Lou */
.lou {
  --s: 3;
  display: block;
  width: calc(24px * var(--s));
  height: calc(24px * var(--s));
  padding: 0;
  border: 0;
  background: url("lou-hachiware.png") 0 0 / calc(648px * var(--s)) calc(24px * var(--s)) no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(1px 0 0 var(--lou-outline)) drop-shadow(-1px 0 0 var(--lou-outline)) drop-shadow(0 1px 0 var(--lou-outline)) drop-shadow(0 -1px 0 var(--lou-outline));
}
button.lou { cursor: pointer; }
.lou-stage { display: grid; justify-items: start; gap: 1rem; margin-top: 2rem; }
.lou-perch { width: 100%; max-width: 22rem; padding-left: 2.5rem; border-bottom: 3px solid var(--accent); }
.lou-perch .lou { --s: 5; margin-bottom: calc(-4px * var(--s)); }
.lou-count { color: var(--muted); font-size: .875rem; }
.lou-stage:has([value="mike"]:checked) .lou { background-image: url("lou-mike.png"); }
.lou-stage:has([value="shiro"]:checked) .lou { background-image: url("lou-shiro.png"); }
.lou-stage:has([value="kuro"]:checked) .lou { background-image: url("lou-kuro.png"); }
.lou-stage:has([value="sabi"]:checked) .lou { background-image: url("lou-sabi.png"); }
@media (prefers-reduced-motion: no-preference) {
  .lou { animation: lou-idle 24s step-end infinite; }
  .lou.is-asleep { animation: lou-sleep 23s step-end infinite; }
  .lou.is-petted { animation: lou-play 1s step-end 2; }
  @view-transition { navigation: auto; }
}
.lou.is-asleep { background-position-x: calc(-24px * var(--s) * 8); }
@keyframes lou-idle {
  0%, 32%, 59.5%, 82%, 100% { background-position-x: 0; }
  30% { background-position-x: calc(-24px * var(--s) * 1); }
  31% { background-position-x: calc(-24px * var(--s) * 2); }
  58% { background-position-x: calc(-24px * var(--s) * 20); }
  74%, 78% { background-position-x: calc(-24px * var(--s) * 16); }
  76%, 80% { background-position-x: calc(-24px * var(--s) * 17); }
}
@keyframes lou-sleep {
  0%, 100% { background-position-x: calc(-24px * var(--s) * 8); }
  52% { background-position-x: calc(-24px * var(--s) * 9); }
  54% { background-position-x: calc(-24px * var(--s) * 10); }
  56% { background-position-x: calc(-24px * var(--s) * 11); }
}
@keyframes lou-play {
  0% { background-position-x: calc(-24px * var(--s) * 12); }
  25% { background-position-x: calc(-24px * var(--s) * 13); }
  50% { background-position-x: calc(-24px * var(--s) * 14); }
  75%, 100% { background-position-x: calc(-24px * var(--s) * 15); }
}

/* Lists of facts: services, licence, requirements */
.rows { margin-top: 2rem; border-bottom: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: .25rem clamp(1rem, 2.5vw, 2.5rem); padding: 1.1rem 0; border-top: 1px solid var(--line); }
.rows dt { font-weight: 700; }
.rows dd ul { display: flex; flex-wrap: wrap; gap: .1rem 1.5rem; padding: 0; list-style: none; }
.rows dd { max-width: 46em; }
.rows dd p + p { margin-top: .5rem; }
.rows.is-services dd { font-size: 1.0625rem; }
.note { margin-top: 1.25rem; max-width: 44em; color: var(--muted); font-size: .9rem; }
.note + .note { margin-top: .5rem; }

/* Pricing */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); }
.page-head h1 { font-size: clamp(2rem, 2.6vw + 1.2rem, 3.4rem); }
.page-head .lead { max-width: 34em; }
.price-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem clamp(1rem, 2.5vw, 2.5rem); align-items: end; }
.price-grid > :first-child { grid-column: 1 / span 6; }
.price-box { grid-column: 8 / -1; padding-top: 1.25rem; border-top: 3px solid var(--accent); }
.price-box h2 { font: 700 1rem/1.5 var(--body); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; margin-top: .25rem; }
.amount { font: 700 clamp(3.4rem, 7vw, 5.5rem)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.price-box p + p { margin-top: .75rem; }
.sale-status { font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem clamp(1rem, 2.5vw, 2.5rem); margin-top: 2rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { padding-top: 1rem; border-top: 1px solid var(--ink); counter-increment: step; }
.steps li::before { content: counter(step); display: block; margin-bottom: .5rem; font: 700 2rem/1 var(--display); }
.steps strong { display: block; }
.steps span { display: block; margin-top: .35rem; color: var(--muted); font-size: .95rem; }
.questions { max-width: 50rem; margin-top: 1.5rem; border-bottom: 1px solid var(--line); }
.questions details { border-top: 1px solid var(--line); }
.questions summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding-block: .75rem; cursor: pointer; font-weight: 700; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: none; font: 400 1.5rem/1 var(--mono); color: var(--muted); }
.questions details[open] summary::after { content: "−"; }
.questions details p { max-width: 42em; padding-bottom: 1.25rem; }

/* Documents: terms, refund, privacy. The article text itself is untouched. */
.doc { padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 6rem); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 44rem); column-gap: clamp(2rem, 6vw, 6rem); }
.doc-head { grid-column: 2; margin-bottom: 2rem; }
.doc-head h1 { font-size: clamp(1.8rem, 2vw + 1.1rem, 2.75rem); }
.doc-toc { grid-column: 1; grid-row: 1 / span 3; align-self: start; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; font-size: .875rem; line-height: 1.6; }
.doc-toc summary { min-height: 2.75rem; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.doc-toc ol { margin: .25rem 0 0; padding: 0; list-style: none; }
.doc-toc li a { display: block; padding: .4rem 0; color: var(--muted); text-decoration: none; }
.doc-toc li a:hover { color: var(--ink); text-decoration: underline; }
.doc-toc li.is-sub a { padding-left: 1em; }
.legal { grid-column: 2; min-width: 0; }
.legal > p:nth-child(-n+2) { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.legal > p:nth-child(2) { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.legal > p:nth-child(-n+2) strong { display: inline-block; min-width: 5.5em; color: var(--ink); }
.legal h2 { margin: 3rem 0 .9rem; font-size: 1.35rem; }
.legal h3 { margin: 2.25rem 0 .75rem; font-size: 1.12rem; }
.legal :is(p, ul, ol, table) { margin-bottom: 1.1rem; }
.legal :is(ul, ol) { padding-inline-start: 1.6em; }
.legal li { margin-block: .45rem; }
.legal li > :is(ul, ol) { margin-block: .45rem 0; }
.legal table { width: 100%; border-collapse: collapse; }
.legal :is(th, td) { padding: .75rem .75rem .75rem 0; border-top: 1px solid var(--line); text-align: start; vertical-align: top; }
.legal th { border-top-color: var(--ink); font-size: .9rem; }
.legal tr:last-child td { border-bottom: 1px solid var(--line); }
.legal td:first-child { min-width: 7em; font-weight: 700; }
.doc-related { grid-column: 2; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--ink); }
.doc-related h2 { font: 700 1rem/1.5 var(--body); }
.doc-related ul { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; margin-top: .5rem; padding: 0; list-style: none; }
.doc-related a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Footer */
.site-footer { margin-top: clamp(2rem, 5vw, 4rem); padding-block: 3rem 2.5rem; border-top: 1px solid var(--line); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); gap: 2rem clamp(1rem, 2.5vw, 2.5rem); }
.site-footer h2 { font: 700 1rem/1.5 var(--body); }
.site-footer p { margin-top: .5rem; color: var(--muted); }
.site-footer .brand + p { margin-top: .75rem; }
.footer-links { display: grid; align-content: start; }
.footer-links a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { text-decoration: underline; }
.footer-grid p > a:only-child { display: inline-flex; align-items: center; min-height: 2.75rem; }
.colophon { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .825rem; }

/* Enlarged picture */
.viewer { width: min(100vw - 1.5rem, 1320px); max-width: none; max-height: calc(100dvh - 1.5rem); padding: 0; border: 1px solid #302E55; border-radius: 10px; background: #100F22; color: #F3EEFF; overflow: hidden; }
.viewer::backdrop { background: rgb(16 15 34 / .8); }
.viewer-scroll { max-height: calc(100dvh - 1.5rem - 3.25rem); overflow: auto; }
.viewer-scroll img { max-width: none; width: 1282px; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; padding: 0 .5rem 0 1rem; font-size: .875rem; }
.viewer-bar button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 .9rem; border: 1px solid #302E55; border-radius: 6px; background: #211F42; color: inherit; font: inherit; cursor: pointer; }

/* Narrow screens */
@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .stage { margin-right: -45%; }
  .scene-grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .scene-grid { row-gap: 2rem; }
  .window.is-pan { overflow-x: auto; }
  .window.is-pan img { width: 46rem; max-width: none; }
  .price-grid > * { grid-column: 1 / -1 !important; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-head, .legal, .doc-related { grid-column: 1; }
  .doc-toc { grid-column: 1; grid-row: auto; position: static; max-height: none; margin-bottom: 1.5rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 6px; }
  .doc-toc details[open] { padding-bottom: .75rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  :root { --gutter: 1rem; }
  .site-nav { font-size: .9rem; }
  .brand { font-size: 1.2rem; }
  .site-nav { gap: .25rem; }
  .facts { display: grid; gap: .15rem; }
  .facts li + li::before { content: none; }
  .rows > div { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal tr { padding: .75rem 0; border-top: 1px solid var(--line); }
  .legal tr:last-child { border-bottom: 1px solid var(--line); }
  .legal td, .legal tr:last-child td { padding: 0; border: 0; }
  .legal td:first-child { margin-bottom: .2rem; }
}

/* On the narrowest phones the logo already leads to the product page. */
@media (max-width: 26rem) {
  .site-nav a:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #999; --accent: #000; }
  body { font-size: 10.5pt; line-height: 1.7; }
  .site-header, .doc-toc, .doc-related, .footer-links, .skip, .switch { display: none; }
  .doc-grid { display: block; }
  .legal h2, .legal h3 { break-after: avoid; }
  .legal li, .legal tr { break-inside: avoid; }
  .site-footer { margin-top: 2rem; padding-block: 1rem 0; }
  a { text-decoration: none; }
}
