/* OnDevice Kit, ondevice.theyplay.games. No framework, no external requests. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

:root {
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #17202B;
  --ink-2: #4E5A69;
  --line: #DCE2EA;
  --line-strong: #C3CCD8;
  --link: #2F49C2;
  --apple: #3451D1;
  --local: #0B7F6E;
  --rules: #9A5D08;
  --apple-wash: #E9EDFF;
  --local-wash: #E0F4EF;
  --rules-wash: #FBF0DD;
  --btn: #17202B;
  --btn-ink: #FFFFFF;
  --code-bg: #FFFFFF;
  --code-head: #F0F3F7;
  --t-kw: #9B2393;
  --t-type: #0B4F79;
  --t-string: #C41A16;
  --t-number: #1C00CF;
  --t-comment: #5D6C79;
  --t-member: #326D74;
  --t-fn: #326D74;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10161E;
    --surface: #161E28;
    --ink: #E7ECF2;
    --ink-2: #A0ACBA;
    --line: #263140;
    --line-strong: #364457;
    --link: #9DB0FF;
    --apple: #8FA2FF;
    --local: #4FD1B6;
    --rules: #E7AC52;
    --apple-wash: #1D2645;
    --local-wash: #12302C;
    --rules-wash: #33270F;
    --btn: #E7ECF2;
    --btn-ink: #10161E;
    --code-bg: #1A1F26;
    --code-head: #222831;
    --t-kw: #FF7AB2;
    --t-type: #9EF1DD;
    --t-string: #FF8170;
    --t-number: #D9C97C;
    --t-comment: #8693A1;
    --t-member: #67B7A4;
    --t-fn: #67B7A4;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--apple); outline-offset: 3px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code { background: var(--code-head); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: var(--btn-ink); padding: 10px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { top: 12px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; white-space: nowrap; }
.mark { width: 26px; height: 26px; flex: none; }
.mark .m1 { fill: var(--apple); } .mark .m2 { fill: var(--local); } .mark .m3 { fill: var(--rules); }
.main-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); }
.main-nav a { white-space: nowrap; }
.main-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 0.97rem; }
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"] { color: var(--ink); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
@media (max-width: 480px) { .nav-price { display: none; } .brand span { font-size: 1rem; } }
@media (max-width: 560px) { .main-nav .lang-switch { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; background: var(--btn); color: var(--btn-ink); font-weight: 600; text-decoration: none; border: 1.5px solid var(--btn); transition: transform 0.12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-small { min-height: 36px; padding: 0 16px; font-size: 0.95rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.fine { color: var(--ink-2); font-size: 0.92rem; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(3rem, 9.5vw, 7.25rem); line-height: 0.94; letter-spacing: -0.045em; font-weight: 800; }
.hero .lede { max-width: 40em; margin-top: 28px; font-size: clamp(1.08rem, 1.7vw, 1.25rem); color: var(--ink-2); }
.hero .lede code { font-size: 0.85em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 44em; }

.stage { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(16px, 2.5vw, 32px); margin-top: clamp(36px, 5vw, 64px); align-items: start; }
.stage-code .code { margin: 0; }
.stage-code pre { max-height: none; }
.stage-run { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2vw, 24px); }
.devices { border: 0; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.devices legend { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.devices label { position: relative; cursor: pointer; }
.devices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.devices span { display: block; height: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; line-height: 1.25; }
.devices b { display: block; font-weight: 650; font-size: 0.95rem; }
.devices small { display: block; color: var(--ink-2); font-size: 0.8rem; margin-top: 2px; }
.devices input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.devices input:focus-visible + span { outline: 3px solid var(--apple); outline-offset: 2px; }

.tiers { list-style: none; margin: 0; padding: 0; position: relative; }
.tiers::before { content: ""; position: absolute; left: 13px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.tier { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 12px; align-items: center; padding: 11px 12px 11px 0; border-radius: 12px; transition: background-color 0.25s ease, opacity 0.25s ease; }
.tier-dot { grid-row: 1 / span 2; justify-self: center; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--tc); background: var(--surface); position: relative; z-index: 1; transition: background-color 0.25s ease, transform 0.25s ease; }
.tier-name { font-weight: 650; }
.tier-how { grid-column: 2; color: var(--ink-2); font-size: 0.86rem; }
.tier-state { grid-column: 3; grid-row: 1 / span 2; font-size: 0.84rem; color: var(--ink-2); text-align: right; max-width: 15ch; line-height: 1.25; }
.tier[data-tier="apple"] { --tc: var(--apple); --tw: var(--apple-wash); }
.tier[data-tier="local"] { --tc: var(--local); --tw: var(--local-wash); }
.tier[data-tier="rules"] { --tc: var(--rules); --tw: var(--rules-wash); }
.tier[data-state="skip"] .tier-name { text-decoration: line-through; text-decoration-color: var(--line-strong); color: var(--ink-2); }
.tier[data-state="idle"] { opacity: 0.55; }
.tier[data-state="hit"] { background: var(--tw); }
.tier[data-state="hit"] .tier-dot { background: var(--tc); transform: scale(1.15); }
.tier[data-state="hit"] .tier-state { color: var(--tc); font-weight: 650; }
.outs { margin-top: 14px; }
.outs .code { margin: 0; border-top: 3px solid var(--oc, var(--local)); }
.outs[data-tier="apple"] { --oc: var(--apple); }
.outs[data-tier="rules"] { --oc: var(--rules); }
.stage-note { font-size: 0.84rem; color: var(--ink-2); margin: 12px 2px 0; }
@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage-run { order: -1; }
}
@media (max-width: 560px) {
  .tier { grid-template-columns: 28px minmax(0, 1fr); }
  .tier-dot { grid-row: 1 / span 3; }
  .tier-state { grid-column: 2; grid-row: auto; text-align: left; max-width: none; margin-top: 2px; }
  .code pre { font-size: 0.8rem; padding: 14px 14px 16px; }
}
@media (max-width: 420px) {
  .devices { grid-template-columns: minmax(0, 1fr); }
  .devices span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .devices small { margin: 0; }
}

/* Sections */
section { scroll-margin-top: 72px; }
.band { background: var(--surface); border-block: 1px solid var(--line); padding: clamp(56px, 8vw, 104px) 0; }
.wrap.shipped, .wrap#guides, .faq, .closing { padding-block: clamp(56px, 8vw, 104px); }
.section-title { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -0.035em; }
.section-lede { color: var(--ink-2); font-size: 1.12rem; max-width: 40em; margin: 16px 0 clamp(28px, 4vw, 48px); }

.module { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(20px, 4vw, 56px); padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line); align-items: start; }
.module h3 { font-size: 1.45rem; }
.module h3 code { font-family: var(--mono); font-size: 0.9em; background: none; border: 0; padding: 0; letter-spacing: -0.02em; font-weight: 600; }
.module-kind { color: var(--ink-2); font-size: 0.9rem; margin: 6px 0 14px; font-family: var(--mono); }
.module-text ul { padding-left: 1.1em; margin: 0 0 1em; }
.module-text li { margin-bottom: 0.45em; }
.module .code { margin: 0; }
.also { border-top: 1px solid var(--line); padding-top: 28px; color: var(--ink-2); max-width: 52em; margin: 0; }
@media (max-width: 860px) { .module { grid-template-columns: minmax(0, 1fr); } }

.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); }
.app { border-left: 3px solid var(--local); padding-left: 20px; }
.app + .app { border-left-color: var(--apple); }
.app h3 { font-size: 1.6rem; margin-bottom: 10px; }
.app h3 a { color: var(--ink); text-decoration-color: var(--line-strong); }
.app p { color: var(--ink-2); }
.lesson { margin-top: clamp(28px, 4vw, 44px); font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.3vw, 1.65rem); line-height: 1.3; letter-spacing: -0.015em; max-width: 34em; }
.lesson code { font-weight: 500; }
@media (max-width: 720px) { .apps { grid-template-columns: minmax(0, 1fr); } }

.table-scroll { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; color: var(--ink-2); font-size: 0.88rem; background: var(--code-head); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 650; white-space: nowrap; }
.by { display: block; color: var(--ink-2); font-weight: 400; font-size: 0.85rem; }
.band .table-scroll { background: var(--paper); }

.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: clamp(28px, 4vw, 44px) 0 24px; }
.numbers div { border-top: 2px solid var(--ink); padding-top: 14px; }
.numbers dt { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 4.4vw, 3.2rem); letter-spacing: -0.04em; line-height: 1; }
.numbers dd { margin: 10px 0 0; color: var(--ink-2); font-size: 0.95rem; max-width: 22em; }
@media (max-width: 720px) { .numbers { grid-template-columns: minmax(0, 1fr); } }

/* Guide list */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.guide-list li { border-top: 1px solid var(--line); }
.guide-list a { display: block; padding: 22px 0 24px; color: inherit; text-decoration: none; }
.guide-list h3 { font-size: 1.22rem; transition: color 0.15s ease; }
.guide-list a:hover h3 { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.guide-list p { color: var(--ink-2); font-size: 0.97rem; margin: 8px 0 8px; }
.guide-list .meta { font-size: 0.85rem; color: var(--ink-2); }
.guide-list.big h3 { font-size: 1.4rem; }
@media (max-width: 760px) { .guide-list { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); max-width: 880px; }
.plan { padding: clamp(24px, 3vw, 36px); border: 1.5px solid var(--line-strong); border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; scroll-margin-top: 90px; }
.plan h3 { font-size: 1.5rem; }
.price { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 10px; }
.amount { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 6vw, 4rem); letter-spacing: -0.045em; line-height: 1; }
.per { color: var(--ink-2); }
.seats { color: var(--ink-2); }
.plan ul { list-style: none; padding: 0; margin: 8px 0 28px; flex: 1; }
.plan li { padding: 8px 0 8px 26px; border-top: 1px solid var(--line); position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 12px; height: 7px; border-left: 2px solid var(--local); border-bottom: 2px solid var(--local); transform: rotate(-45deg); }
.plan-team { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan-team .per, .plan-team .seats { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.plan-team li { border-top-color: color-mix(in srgb, var(--paper) 18%, var(--ink)); }
.plan-team li::before { border-color: var(--local-wash); }
.plan-team .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.plan-team :focus-visible { outline-color: var(--paper); }
.pricing-band .fine { max-width: 52em; margin-top: 28px; }
@media (max-width: 720px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq details { border-top: 1px solid var(--line); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.2rem; display: inline; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq .answer { padding: 0 0 18px; color: var(--ink-2); max-width: 46em; }

.closing { text-align: left; }
.closing h2 { font-size: clamp(2.2rem, 6vw, 4.5rem); letter-spacing: -0.04em; max-width: 14em; }
.closing p { color: var(--ink-2); font-size: 1.12rem; margin-top: 18px; }

/* Code blocks */
.code { margin: 1.4em 0; background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.code figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 0 14px; min-height: 38px; background: var(--code-head); border-bottom: 1px solid var(--line); font: 500 0.8rem/1.2 var(--mono); color: var(--ink-2); }
.code figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy { font: 600 0.78rem/1 var(--body); color: var(--ink-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 10px; cursor: pointer; flex: none; }
.copy:hover { color: var(--ink); border-color: var(--ink-2); }
.copy[data-done] { color: var(--local); border-color: var(--local); }
.code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; font: 400 0.84rem/1.6 var(--mono); tab-size: 4; color: var(--ink); }
.code pre code { font-size: inherit; }
.t-kw { color: var(--t-kw); font-weight: 600; }
.t-type { color: var(--t-type); }
.t-string { color: var(--t-string); }
.t-number { color: var(--t-number); }
.t-comment { color: var(--t-comment); font-style: italic; }
.t-member { color: var(--t-member); }
.t-fn { color: var(--t-fn); }

/* Articles: docs and guides */
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 780px); column-gap: clamp(32px, 5vw, 72px); padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 104px); align-items: start; }
.article-grid > * { grid-column: 2; min-width: 0; }
.article-grid > .toc { grid-column: 1; grid-row: 1 / span 4; }
.toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 0.92rem; }
.toc summary { font-weight: 650; cursor: pointer; padding: 4px 0 10px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc li a:hover { color: var(--ink); }
.toc li a[aria-current="true"] { color: var(--ink); border-left-color: var(--local); font-weight: 600; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; font-size: 0.9rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-2); }
.article-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.04; overflow-wrap: anywhere; hyphens: auto; }
.article-head .lede { margin-top: 20px; }
.article-meta { color: var(--ink-2); font-size: 0.92rem; margin: 0; }
.article-head { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.prose { max-width: 70ch; }
.prose .code, .prose .table-scroll { max-width: none; }
.prose > :first-child { margin-top: 1.4em; }
.prose h2 { font-size: clamp(1.55rem, 2.8vw, 2rem); letter-spacing: -0.025em; margin: 2.2em 0 0.6em; scroll-margin-top: 84px; }
.prose h3 { margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--ink-2); }
.note { border-left: 3px solid var(--apple); background: var(--apple-wash); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 1.5em 0; }
.note p:last-child, .kit p:last-child { margin-bottom: 0; }
.kit { margin: 2.6em 0 0; padding: 20px 22px; border: 1px solid var(--line); border-left: 3px solid var(--local); border-radius: 0 12px 12px 0; background: var(--surface); }
.related { margin-top: 56px; padding-top: 8px; }
.related h2 { font-size: 1.5rem; margin-bottom: 14px; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { border-top: 1px solid var(--line); padding: 16px 0; }
.related li a { font-family: var(--display); font-weight: 650; font-size: 1.12rem; }
.related li p { color: var(--ink-2); font-size: 0.95rem; margin: 6px 0 0; }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-grid > *, .article-grid > .toc { grid-column: 1; grid-row: auto; }
  .toc { position: static; max-height: none; margin: 20px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; background: var(--surface); }
  .toc summary { padding: 4px 0; }
  .toc details[open] summary { padding-bottom: 10px; }
  .article-head { margin-bottom: 0; }
}

/* Plain pages */
.page-intro { padding-top: clamp(32px, 5vw, 64px); padding-bottom: 32px; }
.page-intro h1, .legal h1, .notfound h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.04; }
.page-intro .lede { margin-top: 20px; }
.page-guides main > .wrap:last-child { padding-bottom: clamp(56px, 8vw, 104px); }
.legal, .notfound { padding-block: clamp(32px, 5vw, 64px) clamp(56px, 8vw, 104px); }
.legal .lede { margin-top: 18px; }
.legal h2 { font-size: 1.4rem; margin: 2em 0 0.5em; }
.legal address { font-style: normal; line-height: 1.7; }
.effective { color: var(--ink-2); font-size: 0.92rem; }
.nf-links { font-size: 1.15rem; padding-left: 1.2em; }
.nf-links li { margin-bottom: 0.4em; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; }
.foot-brand p { color: var(--ink-2); margin: 12px 0 0; max-width: 34em; }
.foot-nav { display: flex; gap: clamp(28px, 5vw, 64px); }
.foot-nav ul { list-style: none; margin: 0; padding: 0; }
.foot-nav li { margin-bottom: 8px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { margin-top: 32px; color: var(--ink-2); font-size: 0.82rem; }
.foot-legal p { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
@media print {
  .site-head, .toc, .copy, .site-foot { display: none; }
  body { background: #fff; color: #000; }
}
.faq .section-title { margin-bottom: clamp(24px, 3vw, 36px); }
td code, th code { white-space: nowrap; }

/* Use-case tabs above the hero demo */
.cases { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: clamp(36px, 5vw, 64px); }
.cases-label { font-size: 0.92rem; color: var(--ink-2); }
.case-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.hero .lede-2 { margin-top: 14px; font-size: clamp(1rem, 1.4vw, 1.1rem); }
.case-tabs [role="tab"] { font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--ink-2); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.case-tabs [role="tab"]:hover { color: var(--ink); border-color: var(--ink-2); }
.case-tabs [role="tab"][aria-selected="true"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.cases + .stage, .wrap:has(> .cases) + .stage { margin-top: 16px; }
.no-rules { margin: 0; padding: 16px; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--ink-2); font-size: 0.92rem; }

/* What you can build */
#build { padding: clamp(56px, 8vw, 104px) 0; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.uses li { background: var(--surface); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.uses h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
.uses p { margin: 0; color: var(--ink-2); font-size: 0.97rem; flex: 1; }
.uses code { align-self: flex-start; font-size: 0.8rem; }
.fit { margin-top: 24px; max-width: 46em; color: var(--ink-2); }
.fit strong { color: var(--ink); }

/* The input of the current use case, at the top of the demo */
.input { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2, var(--line)); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.input-label { display: block; font-size: 0.8rem; color: var(--ink-2); margin-bottom: 4px; }
.input p { margin: 0; font-size: 0.93rem; line-height: 1.45; }
.input .receipt { font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; }

/* Language switch in the header */
.lang-switch { font-size: 0.9rem; color: var(--ink-2); text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch:hover { color: var(--ink); border-color: var(--ink-2); }

/* Japanese: system Japanese fonts (the display font has no Japanese glyphs), a little more air, no letter-spacing tricks */
:lang(ja) body, :lang(ja) .lede, :lang(ja) p, :lang(ja) li { font-family: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; line-height: 1.8; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { font-family: "Bricolage Grotesque", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; letter-spacing: -0.01em; line-height: 1.25; word-break: auto-phrase; }
:lang(ja) .hero h1 { font-size: clamp(1.75rem, 7.2vw, 5.25rem); line-height: 1.15; font-weight: 800; }
.nw { white-space: nowrap; }
:lang(ja) .section-title { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
:lang(ja) p, :lang(ja) li { word-break: auto-phrase; line-break: strict; }
:lang(ja) .article-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.3; }
