/* ============================================================
   BIMO — product pages (/bimo/, /bimo/help/, /bimo/privacy/)
   ----------------------------------------------------------------
   Built on the X+1 home page's language (shared/xplus-home.css):
   paper / ink / red, DM Sans set tight, Space Mono labels, numbered
   hairline rules, outlined index type, the red manifesto band and the
   black closing block — pushed into a drafting-room register for a
   Revit tool: wall elevations, clearance outlines, a review-list window.

   Hard constraints (BIMO's Autodesk App Store listing points here, and
   its privacy policy says this site loads nothing third-party):
   - no scripts at all — motion is CSS only, and degrades to static;
   - every request stays on this origin: fonts are self-hosted from
     /assets/fonts/ (SIL OFL), and _headers pins /bimo/* with a CSP;
   - anchors are linked from inside Revit (F1) and must keep their ids.
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-latin-opsz-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/dm-sans-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/space-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/space-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f2f0ea;
  --ink: #101010;
  --red: #ff2b18;
  --white: #fffdf8;
  --muted: #55524c;
  --line: rgba(16, 16, 16, .2);
  --line-strong: #101010;
  --chip: #e6e2d8;
  --night: #0a0a0a;        /* hero, closing */
  --coal: #121212;         /* dark sections */
  --on-dark: #f2f0ea;
  --on-dark-muted: rgba(242, 240, 234, .66);
  --on-dark-line: rgba(242, 240, 234, .2);
  --pad: clamp(20px, 3.3vw, 56px);
  --display: "DM Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Space Mono", Consolas, "Cascadia Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --head: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121212;
    --ink: #f2f0ea;
    --white: #1a1a1a;
    --muted: #aaa69d;
    --line: rgba(242, 240, 234, .18);
    --line-strong: #f2f0ea;
    --chip: #26241f;
    --night: #050505;
    --coal: #0b0b0b;
  }
}

* { box-sizing: border-box; }
/* No smooth scrolling: F1 in Revit deep-links into the help and should land
   on the section at once, not animate down from the top. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 24px); overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--red); color: #111; padding: 12px 16px; font: 700 12px/1 var(--mono); text-transform: uppercase; }
.skip-link:focus { top: 12px; }

.label { font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }

/* ================================================================
   Header — a dark glass bar, fixed, over every page
   ================================================================ */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--head);
  padding: 0 var(--pad); display: flex; align-items: center; gap: 22px;
  color: var(--on-dark); background: rgba(10, 10, 10, .78);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(242, 240, 234, .09);
}
.lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.lockup img { width: 34px; height: 34px; border-radius: 8px; background: #f2f0ea; padding: 2px; }
.wordmark { font: 700 21px/1 var(--display); letter-spacing: -.05em; }
.wordmark b { color: var(--red); }
.by-x1 { font: 400 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--on-dark-muted); text-decoration: none; border-left: 1px solid var(--on-dark-line); padding-left: 14px; }
.by-x1:hover { color: var(--red); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px clamp(16px, 2.2vw, 38px); }
.site-nav a { position: relative; text-decoration: none; font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 8px 0; }
.site-nav a::after { content: ""; position: absolute; height: 1px; background: currentColor; left: 0; right: 100%; bottom: 2px; transition: right .25s ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--red); }
.site-nav a[aria-current="page"]::after { right: 0; }

/* ================================================================
   Overview hero — dark, full bleed, a wall elevation being scanned
   ================================================================ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 1000px); display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--head) + 30px) var(--pad) 26px;
  background: var(--night); color: var(--on-dark);
}
.hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,10,10,.97) 0%, rgba(10,10,10,.9) 38%, rgba(10,10,10,.62) 56%, rgba(10,10,10,.12) 76%, transparent 90%),
    linear-gradient(0deg, rgba(10,10,10,.85) 0%, transparent 28%); }
.hero-topline { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid rgba(242,240,234,.5); padding-top: 11px; color: rgba(242,240,234,.85); }
.hero-content { align-self: end; max-width: 1060px; padding: clamp(60px, 9vw, 120px) 0 clamp(30px, 4vw, 54px); }
.hero h1 { margin: 0 0 30px; font-size: clamp(46px, 7.4vw, 124px); font-weight: 650; line-height: .87; letter-spacing: -.066em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .07em; margin-bottom: -.07em; }
.hero h1 .line > span { display: block; animation: line-up .95s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .1s; }
.hero h1 .line:nth-child(3) > span { animation-delay: .2s; }
.hero .lead { margin: 0; max-width: 640px; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; color: var(--on-dark-muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: clamp(30px, 3.6vw, 46px); }
.btn { position: relative; display: inline-flex; align-items: center; gap: 22px; overflow: hidden; isolation: isolate; background: var(--red); color: #111; text-decoration: none; font: 700 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 19px 22px; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #f2f0ea; transform: scaleY(0); transform-origin: bottom; transition: transform .35s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn span, .text-link span { display: inline-block; transition: translate .25s ease; }
.btn:hover span, .text-link:hover span { translate: 4px -4px; }
.text-link { display: inline-flex; gap: 22px; align-items: center; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 7px; font: 500 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.text-link:hover { color: var(--red); }
.hero-foot { position: relative; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid rgba(242,240,234,.4); padding-top: 12px; color: rgba(242,240,234,.8); }
.hero-index { position: absolute; right: var(--pad); bottom: 62px; z-index: 1; font: 700 clamp(44px, 8vw, 128px)/1 var(--mono); letter-spacing: -.1em; color: transparent; -webkit-text-stroke: 1.5px rgba(242,240,234,.85); pointer-events: none; }

/* drawing: hatch, services, red clearance outlines, a scan line */
.art-label { font: 400 12px var(--mono); letter-spacing: .06em; fill: rgba(242,240,234,.72); text-transform: uppercase; }
.art-label--red { fill: var(--red); }
.art-cut { fill: none; stroke: var(--red); stroke-width: 2.2; transform-box: fill-box; transform-origin: center; animation: cut-in .9s var(--ease) both; }
.art-cut--dash { stroke-dasharray: 9 6; }
.art-cut:nth-of-type(2) { animation-delay: .35s; }
.art-cut.d1 { animation-delay: .5s; } .art-cut.d2 { animation-delay: .8s; } .art-cut.d3 { animation-delay: 1.1s; } .art-cut.d4 { animation-delay: 1.4s; }
.art-tag { opacity: 0; animation: fade-in .6s ease both; }
.art-tag.d1 { animation-delay: .9s; } .art-tag.d2 { animation-delay: 1.2s; } .art-tag.d3 { animation-delay: 1.5s; } .art-tag.d4 { animation-delay: 1.8s; }
.art-scan { animation: scan 7s cubic-bezier(.45, 0, .55, 1) 1.6s infinite; }

/* ================================================================
   Red manifesto band — the home page's, with BIMO's vocabulary
   ================================================================ */
.manifesto { overflow: hidden; padding: clamp(56px, 7vw, 110px) 0; background: var(--red); color: #111; }
.ticker { display: flex; width: max-content; white-space: nowrap; font: 400 clamp(17px, 2.2vw, 32px)/1 var(--mono); text-transform: uppercase; animation: ticker 32s linear infinite; }
.ticker--reverse { animation: ticker-reverse 38s linear infinite; }
.ticker span { padding-right: .5em; }
.manifesto p { margin: clamp(56px, 8vw, 120px) var(--pad); max-width: 1400px; font-size: clamp(46px, 8.6vw, 140px); font-weight: 700; line-height: .86; letter-spacing: -.065em; }

/* ================================================================
   Sections
   ================================================================ */
.section { position: relative; padding: clamp(90px, 11vw, 170px) var(--pad); }
.section--dark { background: var(--coal); color: var(--on-dark); }
.section-label { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.section-label span:first-child { color: var(--red); }
.section-label span:last-child:not(:nth-child(2)) { color: var(--muted); }
.section--dark .section-label { border-color: var(--on-dark-line); }
.section--dark .section-label span:last-child:not(:nth-child(2)) { color: var(--on-dark-muted); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr); align-items: end; gap: 34px 70px; margin: clamp(50px, 6vw, 80px) 0 clamp(56px, 7vw, 110px); }
.section-head h2 { margin: 0; font-size: clamp(38px, 5.6vw, 88px); font-weight: 550; line-height: .97; letter-spacing: -.056em; }
.section-head h2 em { font-style: normal; color: var(--red); }
.section-head p { margin: 0; max-width: 470px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--muted); }
.section--dark .section-head p { color: var(--on-dark-muted); }

/* features as the home page's tool rows */
.feature-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line-strong); }
.feature-row { position: relative; z-index: 0; display: grid; grid-template-columns: clamp(80px, 9vw, 150px) minmax(220px, .7fr) 1fr 130px; align-items: center; gap: 24px; min-height: 132px; padding: 22px 0; border-top: 1px solid var(--line-strong); transition: padding .3s var(--ease); }
.feature-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform .35s var(--ease); }
.feature-row:hover { padding-left: 18px; padding-right: 18px; }
.feature-row:hover::before { transform: scaleY(1); }
.feature-num { font: 300 clamp(54px, 6.2vw, 104px)/1 var(--display); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--muted); transition: -webkit-text-stroke-color .3s ease; }
.feature-row h3 { margin: 0; font-size: clamp(24px, 2.6vw, 42px); font-weight: 550; line-height: 1.02; letter-spacing: -.04em; }
.feature-row p { margin: 0; max-width: 560px; color: var(--muted); line-height: 1.55; transition: color .3s ease; }
.feature-tag { justify-self: end; font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; border: 1px solid currentColor; padding: 8px 10px; opacity: .7; }
.feature-row:hover, .feature-row:hover p { color: #111; }
.feature-row:hover .feature-num { -webkit-text-stroke-color: #111; }

/* workflow: steps + the review-list window */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 clamp(60px, 7vw, 100px); padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 22px 26px 6px 0; border-top: 1px solid var(--on-dark-line); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 40px; font: 700 11px/1 var(--mono); color: var(--red); letter-spacing: .08em; }
.steps li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--red); }
.steps h3 { margin: 0 0 10px; font-size: clamp(24px, 2.2vw, 34px); font-weight: 550; letter-spacing: -.04em; line-height: 1; }
.steps p { margin: 0; color: var(--on-dark-muted); line-height: 1.55; max-width: 32ch; }

.window { margin: 0; }
.window-frame { border: 1px solid rgba(242,240,234,.16); background: #171717; box-shadow: 0 40px 120px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.6); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: #1f1f1f; border-bottom: 1px solid rgba(242,240,234,.08); font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--on-dark-muted); }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.window-dots i:first-child { background: var(--red); }
.window-title { color: var(--on-dark); }
.window-meta { margin-left: auto; }
.window-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; border-bottom: 1px solid rgba(242,240,234,.08); }
.wbtn { font: 400 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--on-dark); border: 1px solid rgba(242,240,234,.22); padding: 9px 11px; }
.wbtn--primary { margin-left: auto; background: var(--red); border-color: var(--red); color: #111; font-weight: 700; }
.window-scroll { overflow-x: auto; }
.wtable { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; color: var(--on-dark); }
.wtable th { text-align: left; padding: 12px 16px; font: 400 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--on-dark-muted); border-bottom: 1px solid rgba(242,240,234,.12); }
.wtable td { padding: 14px 16px; border-bottom: 1px solid rgba(242,240,234,.06); white-space: nowrap; }
.wtable tr.is-hl td { background: rgba(255,43,24,.08); }
.wtable tr.is-hl td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.wtable .num { font-family: var(--mono); font-size: 12.5px; }
.tick { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid rgba(242,240,234,.4); }
.tick--on { background: var(--red); border-color: var(--red); }
.tick--on::after { content: ""; width: 8px; height: 4px; border: solid #111; border-width: 0 0 2px 2px; rotate: -45deg; translate: 0 -1px; }
.status { display: inline-block; font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; }
.status--new { background: var(--red); color: #111; }
.status--moved { background: #e9b44c; color: #111; }
.status--same { border: 1px solid rgba(242,240,234,.3); color: var(--on-dark-muted); }
.status--orphan { border: 1px dashed rgba(242,240,234,.45); color: var(--on-dark); }
.window figcaption { margin-top: 16px; color: var(--on-dark-muted); }

/* requirements as a facts strip */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.facts li { padding: 24px 24px 0 0; }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.fact-v { display: block; white-space: nowrap; font-size: clamp(36px, 4.3vw, 72px); font-weight: 600; line-height: .9; letter-spacing: -.06em; }
.fact-v em { font-style: normal; color: var(--red); }
.fact-l { display: block; margin-top: 14px; color: var(--muted); max-width: 26ch; line-height: 1.45; }

/* ================================================================
   Black closing block — support + footer (the home page's contact)
   ================================================================ */
.closing { background: var(--night); color: #fff; padding: clamp(40px, 5vw, 70px) var(--pad) 30px; }
.closing .section-label { border-color: rgba(255,255,255,.22); }
.closing h2 { margin: clamp(60px, 8vw, 120px) 0 clamp(44px, 6vw, 80px); font-size: clamp(64px, 13vw, 214px); font-weight: 650; line-height: .78; letter-spacing: -.075em; }
.support-mail { display: flex; justify-content: space-between; gap: 20px; font-size: clamp(18px, 2.6vw, 38px); letter-spacing: -.02em; text-decoration: none; padding: 0 6px 12px; border-bottom: 1px solid rgba(255,255,255,.6); background: linear-gradient(var(--red), var(--red)) left bottom / 0% 100% no-repeat; transition: background-size .45s var(--ease), color .3s ease; overflow-wrap: anywhere; }
.support-mail:hover { background-size: 100% 100%; color: #0a0a0a; }
.support-copy { max-width: 760px; margin: 26px 0 0; padding: 0 6px; color: rgba(255,255,255,.76); line-height: 1.6; }
.support-copy a { color: #fff; }
.support-copy a:hover { color: var(--red); }
.site-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-top: clamp(64px, 8vw, 120px); padding-top: 24px; border-top: 1px solid rgba(255,255,255,.22); font: 400 11px/2 var(--mono); text-transform: uppercase; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.foot-h { color: rgba(255,255,255,.45); margin-bottom: 6px; }
.site-foot a { text-decoration: none; overflow-wrap: anywhere; }
.site-foot a:hover { color: var(--red); }
.legal { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); display: grid; gap: 6px; font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,.58); }
.closing--slim .site-foot { margin-top: 0; padding-top: 0; border-top: 0; }

/* ================================================================
   Documents — help and privacy
   ================================================================ */
.doc-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--head) + 30px) var(--pad) clamp(44px, 5vw, 70px); background: var(--night); color: var(--on-dark); }
.doc-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(242,240,234,.045) 1px, transparent 1px) 0 0 / 40px 40px,
  linear-gradient(0deg, rgba(242,240,234,.045) 1px, transparent 1px) 0 0 / 40px 40px; mask-image: linear-gradient(90deg, transparent 20%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 75%); }
.doc-hero h1 { margin: clamp(60px, 8vw, 120px) 0 24px; max-width: 900px; font-size: clamp(54px, 9vw, 150px); font-weight: 650; line-height: .84; letter-spacing: -.07em; }
.doc-hero .lead { margin: 0; max-width: 720px; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55; color: var(--on-dark-muted); }
.doc-hero .lead strong { color: var(--on-dark); }
.doc-hero .hero-index { bottom: auto; top: calc(var(--head) + 70px); }
.doc-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none; background: var(--on-dark-line); border: 1px solid var(--on-dark-line); }
.doc-keys a, .doc-keys li > span { display: flex; flex-direction: column; gap: 22px; height: 100%; padding: 20px 22px 22px; background: var(--night); text-decoration: none; transition: background .3s ease, color .3s ease; }
.doc-keys a:hover { background: var(--red); color: #111; }
.doc-keys .k { display: flex; justify-content: space-between; font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.doc-keys strong { font-size: clamp(22px, 2.2vw, 32px); font-weight: 550; letter-spacing: -.04em; line-height: 1.05; }

.doc { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: clamp(30px, 6vw, 110px); padding: clamp(60px, 7vw, 110px) var(--pad) clamp(90px, 10vw, 160px); }
.toc { position: sticky; top: calc(var(--head) + 28px); align-self: start; max-height: calc(100vh - var(--head) - 56px); overflow: auto; border-top: 1px solid var(--line-strong); padding-top: 14px; }
.toc .label { margin: 0 0 14px; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.toc a { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 6px; padding: 10px 0; text-decoration: none; font-size: 14.5px; line-height: 1.35; transition: color .2s ease, padding .25s var(--ease); }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 400 11px/1.9 var(--mono); color: var(--red); }
.toc a:hover { color: var(--red); padding-left: 8px; }

.prose { max-width: 780px; min-width: 0; counter-reset: sec; }
.prose h2 { counter-increment: sec; margin: clamp(70px, 8vw, 120px) 0 22px; padding-top: 18px; border-top: 1px solid var(--line-strong); font-size: clamp(32px, 3.8vw, 58px); font-weight: 550; line-height: .98; letter-spacing: -.05em; scroll-margin-top: calc(var(--head) + 24px); }
.prose h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 18px; font: 400 11px/1 var(--mono); letter-spacing: .08em; color: var(--red); }
.prose > h2:first-child { margin-top: 0; }
.prose h2:target, .prose h3:target { animation: target-flash 2.6s ease both; }
.prose h3 { margin: 40px 0 12px; font: 700 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--red); scroll-margin-top: calc(var(--head) + 24px); }
.prose h3::before { content: "— "; }
.prose p, .prose li { line-height: 1.68; }
.prose p { margin: 0 0 1em; }
.prose > p:first-of-type, .prose h2 + p { font-size: 17.5px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; padding-left: .2em; }
.prose li::marker { color: var(--red); font-family: var(--mono); font-size: .88em; }
.prose a { color: var(--red); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 650; }

dl.buttons { display: grid; grid-template-columns: minmax(170px, .4fr) 1fr; margin: 16px 0 0; border-bottom: 1px solid var(--line); }
dl.buttons dt, dl.buttons dd { margin: 0; padding: 15px 0; border-top: 1px solid var(--line); }
dl.buttons dt { grid-column: 1; padding-right: 22px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4; }
dl.buttons dd { grid-column: 2; line-height: 1.62; color: var(--muted); }
dl.buttons dd strong, dl.buttons dd em { color: var(--ink); }
dl.buttons dt:hover, dl.buttons dt:hover + dd { background: linear-gradient(90deg, rgba(255,43,24,.07), transparent 70%); }

code, kbd { font: .84em/1.5 var(--mono); background: var(--chip); padding: 2px 6px; overflow-wrap: anywhere; }
kbd { display: inline-block; min-width: 1.9em; text-align: center; padding: 1px 7px 2px; border: 1px solid var(--line-strong); border-bottom-width: 3px; background: var(--white); color: var(--ink); }
.doc-hero kbd { background: #f2f0ea; color: #111; border-color: #f2f0ea; }
.note { position: relative; margin: 26px 0; padding: 18px 20px 18px 22px; background: var(--white); border-left: 3px solid var(--red); line-height: 1.62; }
.note::before { content: "Note"; display: block; margin-bottom: 8px; font: 700 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.table-scroll { overflow-x: auto; margin: 18px 0; border-top: 1px solid var(--line-strong); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 400 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line-strong); }
td { text-align: left; vertical-align: top; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
td:first-child { font-weight: 600; min-width: 200px; }

/* reveal on scroll — CSS only; where unsupported everything is simply shown */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal-up linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  }
}

@keyframes line-up { from { translate: 0 110%; } to { translate: 0 0; } }
@keyframes cut-in { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { transform: translateY(640px); opacity: 0; } }
@keyframes ticker { to { translate: -50% 0; } }
@keyframes ticker-reverse { from { translate: -50% 0; } to { translate: 0 0; } }
@keyframes reveal-up { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes target-flash { 0%, 30% { color: var(--red); } 100% { color: inherit; } }

@media (max-width: 1000px) {
  .feature-row { grid-template-columns: 70px 1fr; gap: 10px 20px; }
  .feature-row p { grid-column: 2; }
  .feature-tag { display: none; }
  .feature-num { font-size: 46px; grid-row: span 2; align-self: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .doc { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  /* Too narrow to set text beside the drawing: the elevation moves out from
     behind the copy and becomes a figure after it, cropped to the wall. */
  .hero-shade { display: none; }
  .hero-art { position: relative; inset: auto; z-index: 0; order: 3; width: calc(100% + 2 * var(--pad)); max-width: none; height: auto; aspect-ratio: 1.05; margin: 6px calc(-1 * var(--pad)) 18px; }
  .hero-foot { order: 4; }
  .hero-content { padding-bottom: 20px; }
}
@media (max-width: 680px) {
  :root { --head: 0px; }
  html { scroll-padding-top: 16px; }
  .site-header { position: static; height: auto; flex-wrap: wrap; padding-top: 14px; padding-bottom: 12px; background: var(--night); }
  .by-x1 { display: none; }
  .site-nav { margin-left: 0; width: 100%; gap: 4px 20px; }
  .hero { min-height: 0; padding-top: 22px; }
  .hero-index { display: none; }
  .hero-foot span:nth-child(2) { display: none; }
  .doc-hero { padding-top: 22px; }
  .doc-keys { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts li, .facts li + li { padding-left: 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--line); padding-top: 20px; }
  .section-label { grid-template-columns: 32px 1fr; }
  .section-label span:last-child:not(:nth-child(2)) { display: none; }
  .wbtn--primary { margin-left: 0; }
  .window-meta { display: none; }
  dl.buttons { grid-template-columns: 1fr; }
  dl.buttons dt, dl.buttons dd { grid-column: 1; }
  dl.buttons dt { padding-bottom: 4px; }
  dl.buttons dd { border-top: 0; padding-top: 0; }
  .site-foot { grid-template-columns: 1fr 1fr; }
  .site-foot .foot-col:last-child { grid-column: 1 / -1; }
  .btn { width: 100%; justify-content: space-between; }
  td:first-child { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .art-scan { display: none; }
}
@media print {
  .site-header, .toc, .skip-link, .hero-art, .hero-index, .manifesto { display: none; }
  .doc { display: block; }
  .hero, .doc-hero, .closing, .section--dark { background: none; color: #000; }
}
