:root {
  color-scheme: dark;
  --bg: #16181c;
  --panel: #1e2126;
  --control: #2a2e34;
  --inset: #111316;
  --ink: #d8dee6;
  --muted: #8a93a0;
  --line: #383d45;
  --selected: #3b6ea8;
  --on-selected: white;
  --accent: #7fb2e5;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --width: 76rem;
  --gutter: clamp(1.15rem, 5vw, 5rem);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 1rem/1.65 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; z-index: 5; top: .75rem; left: .75rem; padding: .55rem 1rem; background: var(--bg); transform: translateY(-180%); }
.skip:focus { transform: none; }
.bar {
  position: relative;
  z-index: 2;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  --nav-surface: var(--panel);
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  --nav-border: var(--line);
  --nav-accent: var(--accent);
  --nav-button: var(--selected);
  --nav-button-ink: var(--on-selected);
  --nav-width: var(--width);
}
.foot, .section, .reader { width: min(100% - 2 * var(--gutter), var(--width)); margin-inline: auto; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.75rem, 2.3vw, 2rem); }
.foot a { color: var(--muted); text-decoration: none; font-weight: 520; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.cover { isolation: isolate; position: relative; min-height: clamp(32rem, 63svh, 48rem); display: grid; align-content: center; background: var(--inset); overflow: hidden; }
.cover-photo, .cover::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-photo { object-fit: cover; object-position: 50% 55%; z-index: -2; }
.cover::before { content: ""; z-index: -1; background: linear-gradient(90deg,#111316f5 1%,#111316e8 22%,#111316b0 45%,transparent 75%),linear-gradient(0deg,#1113168c,transparent 26%); }
.cover-copy { width: min(100% - 2 * var(--gutter), var(--width)); margin: 0 auto; padding-block: 4.5rem 5.5rem; }
.cover h1 { font-size: clamp(3rem, 6.1vw, 6.7rem); font-weight: 540; letter-spacing: -.065em; line-height: 1.04; }
.cover h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.06em; color: var(--accent); }
.cover-copy p { color: var(--ink); margin-block: 1.35rem 1.85rem; max-width: 29rem; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.55; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.button { display: inline-block; text-decoration: none; font-weight: 620; padding: .72rem 1.15rem; border-radius: .45rem; }
.primary { background: var(--selected); color: var(--on-selected); }
.ghost { border: 1px solid var(--muted); background: var(--control); color: var(--ink); }
.button:hover { text-decoration: underline; }
.credit { position: absolute; right: var(--gutter); bottom: 1.5rem; display: grid; text-align: right; text-shadow: 0 1px 5px #000; color: white; line-height: 1.4; }
.credit strong { font-size: .9rem; font-weight: 600; }
.credit span { font-size: .82rem; }
.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section h2 { font-size: clamp(2rem, 3.6vw, 3.65rem); line-height: 1.14; font-weight: 540; letter-spacing: -.055em; }
.section p { color: var(--muted); font-size: 1.06rem; max-width: 46rem; }
.intro, .manual-links { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(1.25rem, 6vw, 5rem); }
.intro { align-items: start; padding-bottom: 2rem; }
.explore { min-width: 0; padding: 0; margin: 0; border: 0; }
.explore legend, .explore input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.explore label { display: inline-block; cursor: pointer; padding: .45rem .92rem; margin: 0 .18rem .8rem 0; color: var(--muted); border-radius: 2rem; border: 1px solid var(--line); }
.explore input:checked + label { background: var(--selected); border-color: var(--selected); color: var(--on-selected); }
.explore input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 3px; }
.panel { display: none; }
#show-editor:checked ~ .panels .editor, #show-layers:checked ~ .panels .layers, #show-export:checked ~ .panels .output { display: block; }
.panel a { display: grid; place-items: center; overflow: hidden; background: var(--inset); border: 1px solid var(--line); border-radius: .55rem; }
.panel a img { width: 100%; height: clamp(21rem, 53vw, 44rem); object-fit: contain; }
.panel figcaption, .reader figcaption { margin-top: .7rem; color: var(--muted); font-size: .95rem; }
.manual-band { border-block: 1px solid var(--line); background: var(--panel); }
.manual-links h2 { margin-bottom: .75rem; }
.chapters a { display: grid; padding: 1.15rem 0; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.chapters a:last-child { border-bottom: 1px solid var(--line); }
.chapters strong { font-size: 1.25rem; font-weight: 600; }
.chapters a:hover strong { color: var(--accent); text-decoration: underline; }
.chapters span { color: var(--muted); margin-top: .15rem; }
.paired { display: flex; gap: 1.65rem; align-items: flex-start; }
.paired h2 { font-size: 2.15rem; }
.paired p { margin: .65rem 0; }
.text-link { font-weight: 600; }
footer { background: var(--panel); border-top: 1px solid var(--line); }
.foot { padding-block: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .93rem; }
.reader { --width: 72rem; display: grid; grid-template-columns: minmax(11rem, 17rem) minmax(0, 48rem); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: 3rem 5rem; }
.contents { position: sticky; top: 1.2rem; max-height: calc(100vh - 2.4rem); overflow: auto; scrollbar-width: thin; padding: .2rem 1.25rem 1rem 0; border-right: 1px solid var(--line); }
.contents summary { cursor: pointer; font-weight: 620; margin-bottom: .5rem; }
.contents a { display: block; text-decoration: none; color: var(--muted); padding: .3rem .4rem .3rem 0; font-size: .95rem; line-height: 1.4; }
.contents a:hover { color: var(--accent); text-decoration: underline; }
.reader article { min-width: 0; overflow-wrap: break-word; }
.reader h1 { font-size: clamp(2.6rem, 4.8vw, 4.5rem); font-weight: 540; line-height: 1.05; letter-spacing: -.06em; margin-bottom: 1.1rem; }
.reader h1 + p { color: var(--muted); font-size: 1.16rem; }
.reader h2 { margin: 2.8rem 0 .8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-weight: 580; line-height: 1.2; font-size: clamp(1.55rem, 2.8vw, 2.1rem); letter-spacing: -.035em; }
.reader h3 { margin: 1.6rem 0 .4rem; font-size: 1.18rem; line-height: 1.35; }
.reader :is(h2, h3)[id] { scroll-margin-top: 1.5rem; }
.reader p { margin: .7rem 0; }
.reader li { padding-left: .25rem; margin: .5rem 0; }
.reader :is(ol,ul) { padding-left: 1.6rem; }
.reader :is(ol,ul) li::marker { color: var(--accent); font-weight: 620; }
.reader dt { font-weight: 650; margin-top: .85rem; }
.reader dd { margin: .2rem 0 .8rem; }
.reader figure { margin: 1.25rem 0; }
.reader figure img { border-radius: .45rem; border: 1px solid var(--line); }
.reader figure.detail img { max-height: 32rem; width: auto; }
.reader table { width: 100%; border-collapse: collapse; margin-block: 1rem; font-size: .97rem; }
.reader :is(td, th) { border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; padding: .55rem .55rem .55rem 0; }
.reader th { color: var(--accent); }
.reader code, .reader kbd { font: .9em ui-monospace, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: .22rem; padding: .07em .24em; overflow-wrap: anywhere; }
.reader pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.reader .next { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
@media (max-width: 48rem) {
  .cover { min-height: 33rem; }
  .cover::before { background: linear-gradient(0deg,#111316 0%,#111316f3 27%,#111316a6 58%,#11131620 86%); }
  .cover-photo { object-position: 62% 20%; }
  .cover-copy { padding-top: 12rem; padding-bottom: 5.3rem; }
  .cover-copy p { max-width: 30rem; }
  .credit { left: var(--gutter); right: auto; bottom: 1.2rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; text-align: left; align-items: baseline; }
  .intro, .manual-links, .reader { grid-template-columns: minmax(0,1fr); gap: 1.1rem; }
  .paired { gap: .8rem; }
  .paired img { width: 2.7rem; }
  .reader { padding-top: 1.4rem; }
  .contents { position: static; max-height: none; border: 1px solid var(--line); border-radius: .4rem; padding: .5rem .75rem; }
  .contents summary { margin: 0; }
  .contents nav { columns: 2 10rem; margin-top: .5rem; }
  .contents a { break-inside: avoid; }
}
@media print {
  :root { color-scheme: light; --bg: white; --ink: black; --muted: #333; --line: #aaa; --accent: black; --selected: #333; --on-selected: white; --control: white; --panel: white; }
  .bar, footer, .contents, .next, .skip { display: none; }
  .reader { width: 100%; display: block; padding: 0; }
  .reader :is(h2,h3) { break-after: avoid; }
  .reader figure { break-inside: avoid; }
}
.function-index { margin-block: 1.3rem; padding: .65rem 1rem; background: var(--panel); border-radius: .4rem; }
.function-index summary { cursor: pointer; }
.function-index ul { columns: 2 11rem; }
.function-index li { break-inside: avoid; }
.hdr-feature { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; gap: clamp(1.25rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.hdr-feature h2 { font-size: clamp(2rem, 3vw, 3rem); }
.hdr-feature p { margin: 1rem 0; }
.hdr-feature img { border-radius: .45rem; }
.hdr-feature figcaption { color: var(--muted); font-size: .9rem; margin-top: .45rem; }
.manual-links .text-link { display: inline-block; margin-top: 1rem; }
@media (max-width: 48rem) {
  .hdr-feature { grid-template-columns: minmax(0, 1fr); }
}

.case-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.7rem, 2vw, 1.5rem); margin-block: 1.5rem; }
.case-gallery a { display: flex; flex-direction: column; gap: .15rem; color: var(--ink); text-decoration: none; }
.case-gallery a:hover strong, .case-gallery a:focus-visible strong { text-decoration: underline; }
.case-gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: .4rem; margin-bottom: .4rem; }
.case-gallery span { color: var(--muted); font-size: .92rem; }
.examples { border-top: 1px solid var(--line); }
.reader .pair { margin-block: 1.5rem 2rem; }
.pair-views figure { display: none; }
.reader .pair-views figure { margin: 0; }
.pair-views img { display: block; width: 100%; height: auto; }
input.view-before:checked ~ .pair-views .view-before,
input.view-after:checked ~ .pair-views .view-after { display: block; }
@media (max-width: 40rem) {
  .case-gallery { grid-template-columns: 1fr; }
  .case-gallery a { display: grid; grid-template-columns: minmax(5rem, 30%) 1fr; column-gap: 1rem; align-content: center; }
  .case-gallery img { grid-row: span 2; margin: 0; }
  .case-gallery strong { align-self: end; }
}
@media print {
  .pair input, .pair label { display: none; }
  .pair .pair-views { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pair .pair-views figure { display: block; }
}
.model-example dt { color: var(--accent); font-weight: 650; }
.tour .model-link { margin: 1rem 0 2rem; }
.reader .model-example { border-inline-start: 2px solid var(--line); padding-inline-start: 1.2rem; }
.reader .example-prompt { margin: .8rem 0; padding: .4rem 1.1rem; border-inline-start: 2px solid var(--accent); background: var(--panel); }
input.view-stars:checked ~ .pair-views .view-stars { display: block; }

.reader .study-map { display: grid; grid-template-columns: minmax(9rem, 36%) 1fr; gap: 1rem; align-items: center; }
.reader .study-map img, .reader .model-pair img { display: block; width: 100%; height: auto; }
.reader .study-map figcaption { margin: 0; }
.study-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-block: 1rem; align-items: start; }
.reader .study-links figure { margin: 0; }
.reader .study-proof img, .reader .study-color img { max-width: 100%; height: auto; }
.reader .study-title { font-size: 1.55rem; }
.reader .model-pair { max-width: 39rem; margin: .85rem 0 1.4rem; }
@media (max-width: 42rem) {
  .study-links { grid-template-columns: 1fr; }
  .reader .study-map { grid-template-columns: 1fr; gap: .4rem; }
}

.live-stretch { scroll-margin-top: 1rem; }
.live-stretch video { background: var(--inset); border: 1px solid var(--line); }
.live-stretch figcaption { max-width: 56rem; margin: .75rem 0; color: var(--muted); }
.live-stretch figcaption strong { color: var(--ink); }
.familiar-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.3rem, 4vw, 3.5rem); margin: 3rem 0; }
.familiar-tools section { display: flex; flex-direction: column; align-items: flex-start; }
.familiar-tools h3 { margin: 0 0 .6rem; font-size: clamp(1.3rem, 2vw, 1.85rem); line-height: 1.22; font-weight: 580; }
.familiar-tools figure { margin: auto 0 .55rem; padding-top: 1rem; width: 100%; }
.familiar-tools img { width: 100%; aspect-ratio: 2 / 1; object-fit: contain; background: var(--inset); border: 1px solid var(--line); border-radius: .45rem; }
@media (max-width: 48rem) { .familiar-tools { grid-template-columns: minmax(0, 1fr); } }

.reader .illustrated-steps { padding-inline-start: 1.7rem; }
.illustrated-steps > li::marker { color: var(--accent); font-weight: 650; }
.reader .step-shot { margin: .8rem 0 1.6rem; }
.step-views { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; align-items: start; gap: .85rem; }
.step-views a { display: block; width: fit-content; max-width: 100%; text-decoration: none; }
.step-views span { display: block; margin-bottom: .3rem; color: var(--ink); font-size: .85rem; font-weight: 650; }
.step-views a:hover span, .step-views a:focus-visible span { text-decoration: underline; }
.reader .step-views img { display: block; width: auto; max-width: 100%; height: auto; max-height: 20rem; border-radius: .25rem; }
.reader .step-shot figcaption { margin-top: .55rem; }
@media (max-width: 42rem) {
  .step-views { grid-auto-flow: row; }
}

.hdr-scale caption { text-align: left; margin-bottom: .4rem; font-weight: 600; }
.reader .hdr-scale th[scope="row"] { color: inherit; font-weight: 500; }
.hdr-delivery { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.2rem; align-items: start; }
.reader .hdr-delivery figure { margin: .7rem 0; }
@media (max-width: 44rem) { .hdr-delivery { display: block; } }

.math-jump { margin-block: 1rem; }
.math-jump summary { cursor: pointer; }
.math-jump nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .65rem 0; }
.reader .math-control { max-width: 27rem; }
.reader .math-detail { max-width: 37rem; }
.reader .math-template { margin-block: 2rem; }
.math-channels { margin: .6rem 0; }
.math-channels > div { display: grid; grid-template-columns: 4rem 1fr; align-items: baseline; gap: .4rem; }
.reader .math-channels :is(dt, dd) { margin: 0; }
.math-template code { overflow-wrap: anywhere; }
.math-expression strong { margin-inline-end: .5rem; }

/* Platform downloads on the product homepage. */
.download-section { padding-block: clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.download-section .download-version { margin-top: .35rem; }
.platform-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .65rem;
  margin-block: 1.25rem;
}
.platform-links a {
  display: grid;
  padding: .9rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .45rem;
  color: var(--ink);
  text-decoration: none;
}
.platform-links a:hover, .platform-links a:focus-visible { border-color: var(--accent); }
.platform-links span { color: var(--muted); font-size: .9rem; }
.download-section p + p { margin-top: .5rem; }
