/* LocalSR website. The design language is the desktop app's (desktop/src/styles.css):
   neutral greys, IBM Plex Sans, square-cut corners, and one red that only marks the action
   that starts something (here: downloading). */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/asset?u=https%3A%2F%2Flocalsr.com%2Fassets%2Ffonts%2FIBMPlexSansVar-Roman.woff2") format("woff2");
  font-weight: 100 700;
  font-stretch: 85% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/asset?u=https%3A%2F%2Flocalsr.com%2Fassets%2Ffonts%2FIBMPlexSans-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/asset?u=https%3A%2F%2Flocalsr.com%2Fassets%2Ffonts%2Fibm-plex-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --stage: #0f0f0f;
  --base: #161616;
  --panel: #1b1b1b;
  --chrome: #222222;
  --raised: #2a2a2a;
  --hover: #313131;
  --text: #ececec;
  --body: #d0d0d0;
  --secondary: #a3a3a3;
  --tertiary: #8c8c8c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #b3452a;
  --accent-hi: #bf4c2f;
  --mark: #e0603f;
  --focus: rgba(255, 255, 255, 0.72);
  --warning: #de9935;
  --radius: 2px;
  --radius-surface: 4px;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4.4vw, 64px);
  --header: 64px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--base);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 16px);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--base); }
h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; color: var(--text); }
h1 em, h2 em, h3 em { font-style: normal; font-weight: inherit; color: var(--secondary); }
img { display: block; max-width: 100%; }
b, strong { font-weight: 600; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
::selection { background: rgba(255, 255, 255, 0.24); color: #ffffff; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 50; left: 16px; top: 12px; padding: 10px 16px;
  background: var(--text); color: var(--base); border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap { max-width: 1312px; margin: 0 auto; padding-inline: var(--gutter); }
.micro { font-size: 14px; line-height: 1.5; color: var(--secondary); }
.quiet { color: var(--secondary); }

/* Buttons. Primary (red) only for the download a visitor is about to start. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--raised); color: var(--text);
  font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #ffffff; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-large { min-height: 52px; padding: 0 26px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(22, 22, 22, 0.94); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
}
.header-row { min-height: var(--header); display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a, .nav-quiet {
  color: var(--secondary); text-decoration: none; font-size: 15px;
  min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav-quiet:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.header-end .btn[aria-current="page"] { background: var(--hover); }
.menu { display: none; position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: 15px; color: var(--text);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--raised); }
.menu > nav {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 6px;
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius-surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.menu > nav a { padding: 11px 12px; text-decoration: none; font-size: 16px; border-radius: var(--radius); }
.menu > nav a:hover { background: var(--raised); }
.menu > nav a[aria-current="page"] { background: var(--raised); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--base); }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px; padding-top: 48px; padding-bottom: 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand p { color: var(--secondary); font-size: 15px; max-width: 320px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 2px; }
.footer-head { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.footer-grid nav a { color: var(--secondary); text-decoration: none; font-size: 15px; padding: 4px 0; }
.footer-grid nav a:hover { color: var(--text); text-decoration: underline; }

/* Sections shared by the home page */
.section { padding-block: 88px; border-top: 1px solid var(--border); }
.band { background: var(--stage); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 36px; }
.section-head p { color: var(--secondary); max-width: 560px; }
.h2 { font-size: clamp(30px, 2.9vw, 42px); line-height: 1.1; letter-spacing: -0.015em; }
.lead { font-size: 19px; line-height: 1.55; color: #b8b8b8; }
.split-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
.split-layout > :first-child { display: flex; flex-direction: column; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ruled { border-top: 1px solid var(--border-strong); padding-top: 20px; }
.ruled h3 { font-size: 21px; margin-bottom: 8px; }
.ruled p { color: var(--secondary); font-size: 16px; }
.label { font-size: 14px; font-weight: 400; color: var(--secondary); margin-left: 6px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "text viewer" "facts viewer";
  grid-template-rows: auto 1fr; gap: 28px 64px; padding-top: 52px; padding-bottom: 72px;
}
.hero-text { grid-area: text; display: flex; flex-direction: column; gap: 22px; }
.hero-text h1 { font-size: clamp(38px, 3.9vw, 58px); line-height: 1.04; letter-spacing: -0.022em; }
.hero-text .lead { max-width: 500px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-note { font-size: 15px; color: var(--secondary); }
.facts { grid-area: facts; align-self: start; margin-top: 16px; font-size: 15.5px; line-height: 1.45; }
.facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.facts > div:last-child { border-bottom: 1px solid var(--border); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--secondary); }

/* The example viewer on the home page */
.viewer { grid-area: viewer; display: flex; flex-direction: column; min-width: 0; }
.viewer-top { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.viewer-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-dims { font-size: 14px; color: var(--secondary); white-space: nowrap; }
.words { margin-left: auto; display: flex; gap: 16px; }
.words button {
  border: 0; border-bottom: 2px solid transparent; background: none; padding: 6px 2px; min-height: 44px;
  font-size: 15px; color: var(--secondary);
}
.words button:hover { color: var(--text); }
.words button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--text); }
.crop { position: relative; margin: 10px; }
.crop > .corner { position: absolute; width: 22px; height: 22px; border: 0 solid #ece9df; pointer-events: none; }
.crop > .corner:nth-of-type(1) { left: -10px; top: -10px; border-left-width: 3px; border-top-width: 3px; }
.crop > .corner:nth-of-type(2) { right: -10px; top: -10px; border-right-width: 3px; border-top-width: 3px; }
.crop > .corner:nth-of-type(3) { left: -10px; bottom: -10px; border-left-width: 3px; border-bottom-width: 3px; }
.crop > .corner:nth-of-type(4) { right: -10px; bottom: -10px; border-right-width: 3px; border-bottom-width: 3px; }
.picks { display: flex; gap: 8px; padding-top: 16px; overflow-x: auto; scrollbar-width: none; }
.picks::-webkit-scrollbar { display: none; }
.picks button {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px;
  padding: 4px 4px 6px; border: 1px solid transparent; border-radius: var(--radius-surface);
  background: none; color: var(--secondary); font-size: 13.5px; line-height: 1.25; text-align: center;
}
.picks button img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.picks button:hover { color: var(--text); background: var(--panel); }
.picks button[aria-pressed="true"] { color: var(--text); background: var(--raised); border-color: var(--border-strong); }
.viewer-facts {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.4;
}
.viewer-facts dt { color: var(--secondary); }
.viewer-facts dd { margin-top: 3px; }
.viewer-status { min-height: 0; }

/* Before/after with a draggable line. Without JavaScript only the result shows. */
.split { position: relative; overflow: hidden; background: var(--stage); aspect-ratio: 4 / 3; isolation: isolate; }
.split > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split .split-before { display: none; }
.split.is-ready .split-before { display: block; }
.split.is-ready .split-after { clip-path: inset(0 0 0 var(--split, 50%)); }
.split-line {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--split, 50%); width: 1px;
  background: #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.split-line > span {
  position: absolute; left: 0; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: var(--base); border: 1px solid rgba(255, 255, 255, 0.3); display: flex; align-items: center; justify-content: center;
}
.split[data-view="before"] .split-line, .split[data-view="after"] .split-line { display: none; }
.split-range {
  position: absolute; z-index: 5; inset: 0 auto 0 -20px; width: calc(100% + 40px); height: 100%; margin: 0; padding: 0;
  appearance: none; -webkit-appearance: none; background: transparent; cursor: ew-resize; touch-action: pan-y; opacity: 0;
}
.split[data-view="before"] .split-range, .split[data-view="after"] .split-range { display: none; }
.split:has(.split-range:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.tag {
  position: absolute; z-index: 4; top: 12px; padding: 4px 9px; border-radius: var(--radius);
  background: rgba(22, 22, 22, 0.86); font-size: 13px; line-height: 1.4; pointer-events: none;
}
.tag-left { left: 12px; }
.tag-right { right: 12px; }
.split:not(.is-ready) .tag-left { display: none; }
.split[data-view="after"] .tag-left, .split[data-view="before"] .tag-right { display: none; }
.split-wide { aspect-ratio: 2 / 1; }
.figure-caption { margin-top: 10px; font-size: 14px; color: var(--secondary); }

/* The app window */
.window-shot { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 16px 0; border-top: 1px solid var(--border-strong); }
.steps li:last-child { border-bottom: 1px solid var(--border-strong); }
.steps-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin: 32px 0 40px; }
.steps-row li, .steps-row li:last-child { border-bottom: 0; }
.steps li > span:first-child { color: var(--tertiary); font-weight: 500; }
.steps li p { color: var(--secondary); font-size: 15.5px; }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@supports (grid-template-rows: subgrid) {
  .platforms { grid-template-rows: repeat(5, auto); row-gap: 0; }
  .platforms > .platform { grid-row: span 5; display: grid; grid-template-rows: subgrid; row-gap: 12px; }
  .platform .btn { margin-top: 6px; align-self: start; width: 100%; }
  .platform-more { align-self: start; }
}
.platform {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 24px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-surface);
}
.platform h3 { font-size: 24px; line-height: 1.2; }
.platform p { color: var(--secondary); font-size: 15.5px; }
.platform .platform-req { color: var(--text); font-size: 15.5px; }
.platform .btn { margin-top: 6px; width: 100%; }
.platform .btn + .platform-more, .platform .platform-more { font-size: 14.5px; }
.platform-more { margin: 4px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.platform-more li { color: var(--secondary); }
.platform-more a { color: var(--text); }
.hardware li { color: var(--secondary); font-size: 15.5px; }
.hardware { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.after-download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 28px; font-size: 15.5px; color: var(--secondary); }
.after-download nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.phone-app { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.phone-app h3 { font-size: 16px; margin-bottom: 6px; }
.phone-app p { font-size: 15px; color: var(--secondary); max-width: 720px; }
.phone-app nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15.5px; }
.inline-code {
  display: inline-block; white-space: nowrap;
  font-family: var(--mono); font-size: 14.5px; color: var(--text); background: var(--panel);
  border: 1px solid var(--border); padding: 7px 12px; border-radius: var(--radius); overflow-wrap: anywhere;
}

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table, .model-table, .model-evidence, .result-table, .beta-table {
  width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45;
}
.data-table th, .data-table td, .model-table th, .model-table td, .model-evidence th, .model-evidence td,
.result-table th, .result-table td, .beta-table th, .beta-table td {
  text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border);
}
.data-table th, .model-table th, .model-evidence th, .result-table th, .beta-table th { font-weight: 400; color: var(--secondary); font-size: 14px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 0; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 14px; }
.model-evidence caption { text-align: left; margin-bottom: 10px; color: var(--secondary); }
.model-table code, .checkpoint { overflow-wrap: anywhere; }
.checkpoint code { white-space: normal; }
.badge {
  display: inline-block; font-size: 12.5px; line-height: 1.5; border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 0 7px; margin-right: 5px; color: var(--secondary); vertical-align: 1px;
  white-space: nowrap;
}
.badge-labs { border-color: rgba(222, 153, 53, 0.55); color: var(--warning); }
.badge-works { border-color: rgba(111, 184, 134, 0.55); color: #8ad1a0; }
.badge-workaround { border-color: rgba(130, 170, 220, 0.55); color: #a8c7ee; }
.badge-experimental { border-color: rgba(222, 153, 53, 0.55); color: var(--warning); }
.badge-cpu { border-color: var(--border-strong); color: var(--secondary); }

/* Questions */
.questions details { border-top: 1px solid var(--border-strong); }
.questions details:last-child { border-bottom: 1px solid var(--border-strong); }
.questions summary { cursor: pointer; list-style: none; padding: 16px 0; font-size: 17px; display: flex; justify-content: space-between; gap: 20px; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; color: var(--secondary); }
.questions details[open] summary::after { content: "\2212"; }
.questions details p { margin: 0 0 18px; color: var(--secondary); font-size: 16px; }

/* Document pages: guide, models, release notes, privacy, terms, support, press, download */
.document-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--border); }
.document-hero .micro { display: block; }
.document-hero h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.02em; margin-top: 14px; max-width: 900px; }
.document-hero > p:last-child { max-width: 680px; font-size: 19px; line-height: 1.55; color: #b8b8b8; margin-top: 18px; }
.document-hero > p:last-child a { color: var(--text); }
.document-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding: 48px 0 96px; }
.document-aside { position: sticky; top: calc(var(--header) + 24px); align-self: start; max-height: calc(100vh - var(--header) - 48px); overflow: auto; font-size: 14.5px; }
.document-aside::before { content: "On this page"; display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 10px; }
.document-aside nav { display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.document-aside nav a {
  color: var(--secondary); text-decoration: none; padding: 5px 0 5px 14px; margin-left: -1px;
  border-left: 2px solid transparent; line-height: 1.35;
}
.document-aside nav a:hover { color: var(--text); }
.document-aside nav a[aria-current="true"] { color: var(--text); border-left-color: var(--text); }
.document-aside > p { color: var(--secondary); }
.document-aside.no-nav::before { content: none; }
.document-body { min-width: 0; max-width: 760px; }
.document-body section + section { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--border); }
.document-body h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 16px; }
.document-body h3 { font-size: 20px; line-height: 1.3; margin: 28px 0 10px; }
.document-body h4 { font-size: 17px; margin: 22px 0 8px; }
.document-body p, .document-body li { color: var(--body); font-size: 17px; line-height: 1.65; }
.document-body p + p, .document-body p + .table-wrap, .document-body .table-wrap + p { margin-top: 14px; }
.document-body ul, .document-body ol { padding-left: 22px; margin: 14px 0; }
.document-body li + li { margin-top: 10px; }
.document-body strong { color: var(--text); }
.document-body a { overflow-wrap: anywhere; }
.document-body code { font-size: 0.84em; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1px 5px; overflow-wrap: anywhere; }
.document-body pre {
  margin: 16px 0; padding: 14px 16px; background: var(--stage); border: 1px solid var(--border);
  border-radius: var(--radius-surface); overflow-x: auto; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.document-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.document-body .table-wrap { margin: 16px 0; }
.document-body blockquote { border-left: 2px solid var(--border-strong); padding-left: 18px; margin: 16px 0; }
.document-callout, .draft-note {
  margin: 18px 0; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-surface);
}
.document-callout p, .draft-note p { font-size: 16px; }
.document-image, .beta-shot { width: 100%; height: auto; margin: 22px 0; border-radius: var(--radius-surface); border: 1px solid var(--border); }
.tutorial-figure { margin: 20px 0 24px; }
.tutorial-video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: var(--stage); border: 1px solid var(--border-strong); border-radius: var(--radius-surface);
}
.tutorial-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--secondary); }
.document-body .grid-2 { gap: 20px 32px; margin: 20px 0; }
.document-body .ruled { padding-top: 16px; }
.document-body .ruled h3 { margin: 0 0 6px; font-size: 18px; }
.document-body .ruled p { font-size: 15.5px; }
.document-body .steps { margin: 18px 0; }
.document-body .questions { margin: 16px 0; }
.document-body .questions details p { margin: 0 0 16px; color: var(--body); font-size: 16px; }
.document-body .btn { margin-top: 24px; }
.document-body .platforms { margin: 20px 0 8px; grid-template-columns: minmax(0, 1fr); }
.document-body .platform h3 { margin: 0; }
.document-body .platform p, .document-body .platform li { font-size: 15.5px; }
.document-body .platform ul { padding: 12px 0 0; margin: 4px 0 0; }
.document-body .platform li + li { margin-top: 0; }
.parts-list { list-style: none; padding: 0 !important; }
.parts-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--border); margin: 0 !important; }
.parts-list a { font-family: var(--mono); font-size: 14px; }

/* Compatibility page */
.quick-table th:first-child { white-space: nowrap; }
.compat-sub { display: block; font-size: 13.5px; line-height: 1.45; color: var(--secondary); font-weight: 400; margin-top: 2px; }
@media (min-width: 761px) {
  .compat-table th:nth-child(1), .compat-table td:nth-child(1) { width: 32%; }
  .compat-table th:nth-child(2), .compat-table td:nth-child(2) { width: 1%; white-space: nowrap; }
  .compat-table th:nth-child(3), .compat-table td:nth-child(3) { width: 22%; }
}
.workaround-list { display: grid; gap: 16px; margin: 20px 0; }
.code-block {
  margin: 14px 0; background: var(--stage); border: 1px solid var(--border);
  border-radius: var(--radius-surface); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 10px 6px 14px; background: var(--chrome); border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--secondary);
}
.copy-btn {
  min-height: 30px; padding: 0 11px; font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.copy-btn:hover { background: var(--hover); }
.code-block pre { margin: 0; border: 0; border-radius: 0; }
.disclosure, .agent-details {
  margin: 18px 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-surface);
}
.disclosure summary, .agent-details summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-size: 16.5px; font-weight: 600;
  color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.disclosure summary::-webkit-details-marker, .agent-details summary::-webkit-details-marker { display: none; }
.disclosure summary::after, .agent-details summary::after { content: "+"; color: var(--secondary); font-weight: 400; }
.disclosure[open] summary::after, .agent-details[open] summary::after { content: "\2212"; }
.disclosure[open] summary, .agent-details[open] summary { border-bottom: 1px solid var(--border); }
.disclosure-body, .agent-details-body { padding: 16px 20px 20px; }
.disclosure-body > p, .agent-details-body > p { font-size: 15.5px; }
.document-body.wide { max-width: 900px; }
.document-hero .compat-lead { max-width: 680px; font-size: 19px; line-height: 1.55; color: #b8b8b8; margin-top: 18px; }
.document-hero .compat-updated { margin-top: 10px; }
.document-hero .document-callout { max-width: 900px; margin-top: 20px; }
.badge-works, .badge-workaround, .badge-experimental, .badge-cpu { background: color-mix(in srgb, currentColor 12%, transparent); border-radius: 999px; }
.badge-works::before, .badge-workaround::before, .badge-experimental::before, .badge-cpu::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 2px; }
.workaround-list h3 { margin: 12px 0 0; }
.workaround-list .disclosure { margin: 0; }
.fix-facts { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 14px; font-size: 15.5px; line-height: 1.6; }
.fix-facts dt { color: var(--secondary); }
.fix-facts dd { margin: 0; }
.prompt-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
#agent-prompt pre { max-height: 420px; overflow: auto; }
.help-hub .grid-3 { margin-bottom: 32px; }

/* Download page: the three platforms side by side above the reading column */
.download-top { padding: 40px 0 8px; }
.download-top .platforms { margin: 0; }
.phone-platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
.btn-disabled { color: var(--secondary); cursor: default; }
.btn-disabled:hover { background: transparent; }
.phone-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 860px; }
.phone-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 720px; margin: 20px 0 12px; }
.phone-shots img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); }
.os-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.os-notes > div { padding: 0 4px; }
.os-notes h3 { font-size: 16px; margin-bottom: 6px; }
.os-notes p { font-size: 15px; color: var(--secondary); }
.os-notes p .inline-code { padding: 1px 6px; font-size: 13.5px; }

/* Comparison pages (compare/, models/which/) */
.compare-main { max-width: 1312px; margin: 0 auto; padding: 56px var(--gutter) 96px; }
.compare-main > * { max-width: 1024px; }
.compare-main h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.compare-main > p { max-width: 680px; font-size: 18px; line-height: 1.6; color: #b8b8b8; margin-top: 16px; }
.compare-main > p a { color: var(--text); }
.compare-jump { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.compare-jump a { font-size: 15px; color: var(--secondary); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.compare-jump a:hover { color: var(--text); text-decoration: underline; }
.compare-section { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }
.compare-section h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; }
.compare-section > p { font-size: 16.5px; line-height: 1.65; color: var(--body); margin-top: 10px; max-width: 760px; }
.compare-section ul { padding-left: 20px; margin-top: 12px; }
.compare-section li { font-size: 16px; line-height: 1.65; color: var(--body); }
.compare-figure { margin: 28px 0 0; }
.compare-figure figcaption { font-size: 14px; color: var(--secondary); margin-top: 10px; }
.compare-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin-bottom: 12px; }
.compare-pick select {
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 34px 8px 12px; font-size: 15px; color: var(--text);
  background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23a3a3a3' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border-strong); border-radius: var(--radius); appearance: none; -webkit-appearance: none;
}
.compare-pick select:hover { background-color: var(--hover); }
.compare-pick button {
  min-height: 44px; padding: 0 14px; font-size: 14.5px; color: var(--text); background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius); white-space: nowrap;
}
.compare-pick button:hover { background: var(--raised); }
.compare-pick button[aria-pressed="true"] { background: var(--raised); }
.comparison { position: relative; overflow: hidden; background: var(--stage); isolation: isolate; }
.compare-figure .comparison { aspect-ratio: 4 / 3; }
.comparison:not(.is-ready) { display: none; }
.comparison.is-ready + .stacked { display: none; }
.comparison img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; user-select: none; }
.comparison .after-image { clip-path: inset(0 0 0 var(--split, 50%)); }
.image-labels { position: absolute; z-index: 2; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; }
.image-labels > span { max-width: 48%; padding: 4px 9px; border-radius: var(--radius); background: rgba(22, 22, 22, 0.86); font-size: 13px; line-height: 1.4; }
.comparison-line { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--split, 50%); width: 1px; background: #ffffff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }
.comparison-line > span {
  position: absolute; left: 0; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3); display: grid; place-items: center; background: var(--base); color: var(--text); font-size: 18px;
}
.comparison-range {
  position: absolute; z-index: 5; inset: 0 auto 0 -20px; width: calc(100% + 40px); height: 100%; margin: 0; border: 0; padding: 0;
  appearance: none; -webkit-appearance: none; background: transparent; cursor: ew-resize; touch-action: pan-y; outline: none;
}
.comparison-range::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.comparison-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 40px; height: 100%; border: 0; background: transparent; cursor: ew-resize; }
.comparison-range::-moz-range-track { height: 100%; background: transparent; }
.comparison-range::-moz-range-thumb { width: 40px; height: 100%; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; }
.comparison:has(.comparison-range:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.stacked { display: grid; gap: 10px; }
.stacked img { width: 100%; height: auto; }
.stacked p { margin-top: 6px; font-size: 14px; color: var(--secondary); }
.compare-section .table-wrap { margin-top: 14px; }

@media (max-width: 1100px) {
  .nav { gap: 20px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .viewer-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "viewer" "facts"; grid-template-rows: auto; gap: 36px; padding-top: 36px; }
  .split-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid-2, .grid-3, .platforms, .os-notes, .steps-row { grid-template-columns: minmax(0, 1fr); }
  .steps-row li:last-child { border-bottom: 1px solid var(--border-strong); }
  .platforms { grid-template-rows: none; row-gap: 16px; }
  .platforms > .platform { grid-row: auto; display: flex; }
  .document-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .document-aside { position: static; max-height: none; overflow: visible; }
  .document-aside:not(.no-nav) { border: 1px solid var(--border); padding: 16px; }
  .document-aside nav { display: grid; grid-template-columns: 1fr; border: 0; gap: 0 20px; }
  .document-aside nav a { padding: 7px 0; margin: 0; border: 0; }
  .document-aside nav a[aria-current="true"] { color: var(--text); text-decoration: underline; }
  .section { padding-block: 64px; }
}

@media (min-width: 480px) and (max-width: 960px) {
  .document-aside nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav, .nav-quiet { display: none; }
  .menu { display: block; }
}
@media (max-width: 760px) {
  :root { --header: 58px; font-size: 16px; }
  .copy-btn { min-height: 40px; }
  .fix-facts { grid-template-columns: 1fr; gap: 2px; }
  .fix-facts dd + dt { margin-top: 8px; }
  .header-end { gap: 10px; }
  .facts > div { grid-template-columns: 150px minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .document-hero { padding: 36px 0 30px; }
  .document-hero > p:last-child, .lead { font-size: 17px; }
  .document-body p, .document-body li { font-size: 16.5px; }
  .after-download nav { margin-left: 0; }
  .phone-app { grid-template-columns: minmax(0, 1fr); }
  .phone-platforms, .phone-notes { grid-template-columns: minmax(0, 1fr); }
  .phone-shots { gap: 8px; }
  .phone-app .btn { width: 100%; }
  .after-download .inline-code, .os-notes .inline-code { display: block; margin-top: 8px; overflow-x: auto; overflow-wrap: normal; }
  .stack thead { display: none; }
  .stack, .stack tbody, .stack tr, .stack td, .stack tbody th { display: block; min-width: 0 !important; }
  .stack tbody th { border: 0; padding: 0 0 4px; color: var(--text); font-size: 15.5px; }
  .stack { min-width: 0 !important; }
  .stack tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .stack td { border: 0; padding: 1px 0; text-align: left !important; }
  .stack td[data-label]::before { content: attr(data-label) ": "; color: var(--secondary); }
  .stack td:first-child { font-weight: 600; }
  .viewer-top { flex-wrap: wrap; }
  .words { margin-left: 0; }
  .compare-pick { grid-template-columns: minmax(0, 1fr) auto; }
  .compare-pick select:last-child { grid-column: 1 / -1; }
  .image-labels { top: 8px; left: 8px; right: 8px; }
  .image-labels > span { font-size: 12px; line-height: 1.3; padding: 3px 7px; }
  .picks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  .picks button { width: auto; padding: 4px 2px 6px; font-size: 12px; }
  .picks button img { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; }
}

@media (max-width: 420px) {
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .viewer-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media(prefers-reduced-motion:reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .split-line, .comparison-line { background: CanvasText; }
  .split-line > span, .comparison-line > span { background: Canvas; border-color: CanvasText; }
  .btn { border: 1px solid ButtonText; }
}
