/* The header name's font, self-hosted (SIL Open Font License, fonts/orbitron-OFL.txt beside it). Used only for .house-name. */
@font-face {
  font-family: "Orbitron"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(brand/fonts/orbitron-latin-700-normal.woff2) format("woff2");
}
:root {
  --bg: #e9eef0;
  --surface: #ffffff;
  --ink: #14212a;
  --muted: #4d5f69;
  --line: #c6d1d6;
  --wire: #8fa2ab;
  --warn: #8a5a00;
  --warn-soft: #f6ead0;
  --display: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", "Avenir Next", system-ui, sans-serif;
  /* The type scale (settings.TYPE_STEPS): every font-size in frame.css and home.css is one of these five, except one named exception (settings.TYPE_EXCEPTIONS): the header name on a phone (.72rem at 560px and below, .66rem at 380px and below). rem is the browser's 16px; only body text grows from 1600px wide. */
  --size-small: .9rem;
  --size-body: 18px;
  --size-lead: 1.3rem;
  --size-heading: 1.5rem;
  --size-title: clamp(2rem, 2.7vw, 3rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-colour-mode="light"]) {
    --bg: #11181c;
    --surface: #182126;
    --ink: #e4edf0;
    --muted: #9badb4;
    --line: #2b3940;
    --wire: #4f626b;
    --warn: #f0bf5a;
    --warn-soft: #3a2e14;
    color-scheme: dark;
  }
}
:root[data-colour-mode="dark"] {
  --bg: #11181c;
  --surface: #182126;
  --ink: #e4edf0;
  --muted: #9badb4;
  --line: #2b3940;
  --wire: #4f626b;
  --warn: #f0bf5a;
  --warn-soft: #3a2e14;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--size-body);
  line-height: 1.55;
}
@media (min-width: 1600px) { :root { --size-body: 19px; } }

/* House frame */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(clamp(16px, 4vw, 56px), (100% - var(--size-body) * 40) / 2);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.bar-left { display: flex; align-items: center; gap: 12px 28px; min-width: 0; }
.house { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.house .logo { display: block; height: 36px; width: auto; }
.house-name { font-family: "Orbitron", var(--display); font-weight: 700; font-size: var(--size-small); text-transform: uppercase; letter-spacing: .08em; }

/* One centred reading column at every width (Ben, 2026-11-20: "i want it to be centered throught the document in all states, for all the manuals"): the page and the footer share one width and sit in the middle. */
.frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 960px; margin: 0 auto;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px) 80px;
  gap: clamp(24px, 4vw, 72px);
}
.frame > .page, .frame > .foot { width: 100%; max-width: calc(var(--size-body) * 40); justify-self: center; }
.bar-right { display: flex; align-items: center; gap: 18px; }
/* Half a screen is the design width (Ben, 2026-11-16: "it being on half the screen is the design"): when the header has no room for one row, the right-hand group drops to its own row at the column's left edge, and wraps again if it must, each row starting at that edge. Nothing overlaps; a header with room keeps its single row, the right-hand group at the right. */
.bar { flex-wrap: wrap; row-gap: 10px; }
.bar-left { flex: none; max-width: 100%; margin-right: auto; }
.bar-right { flex-wrap: wrap; justify-content: flex-start; row-gap: 8px; }

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

/* Pages */
.page:focus { outline: none; }
/* Every block in the page is the reading column's width, text included: no block gets a measure in em or ch (Ben, 2026-11-20: "i want it to be centered throught the document in all states, for all the manuals"). */
.page h1 {
  font-family: var(--display); font-weight: 600; font-stretch: 87.5%;
  font-size: var(--size-title); line-height: 1.06; letter-spacing: -.01em;
  margin: 0 0 .5em; text-wrap: balance;
}
.page h2 { font-family: var(--display); font-weight: 600; font-size: var(--size-heading); line-height: 1.2; margin: 2.2em 0 .6em; scroll-margin-top: 16px; }
.page h2:first-child { margin-top: 0; }
.page p { margin: 0 0 .8em; }
.lead { font-size: var(--size-lead); line-height: 1.5; margin: 0 0 1em; }
.quiet { color: var(--muted); }

/* The menu on every manual page: All topics, then each page by its short name; the current one filled. */
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; }
.pill { font-family: var(--display); font-weight: 600; font-size: var(--size-small); line-height: 1.3; text-align: center; padding: 3px 12px; border-radius: 6px; border: 1.5px solid var(--line); color: var(--muted); background: transparent; }
.menu .pill:hover { border-color: var(--ink); color: var(--ink); }
.menu .pill.now, .menu .pill.now:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.menu .pill:focus-visible { outline: 3px solid var(--second); outline-offset: 2px; }

/* "On this page": one quiet line of links to the page's sections. */
.on-page { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 0 0 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--size-small); }
.on-page-label { color: var(--muted); }
.on-page ul { display: contents; list-style: none; }
.on-page li { display: inline; }
.on-page a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.on-page a:hover { text-decoration-color: currentColor; }

/* A step: what to do, then the screen's own words to look for, as a plain list (no box: the lines are useful, a boxed heading is a checklist). */
.do-this { font-size: var(--size-lead); line-height: 1.45; font-weight: 600; margin: 0 0 12px; }
.step-number { color: var(--accent); margin-right: 2px; }
.see { list-style: none; margin: 0 0 16px; padding: 0; }
.see li { position: relative; padding: 3px 0 3px 22px; }
.see li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 10px; height: 2.5px; border-radius: 2px; background: var(--accent); }
.see .slot, .slot { color: var(--muted); font-style: italic; }
.note { margin: 12px 0 0; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin: 32px 0 0; }
button { font: inherit; cursor: pointer; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 14px 26px; font-family: var(--display); font-weight: 600; font-size: var(--size-body); letter-spacing: .01em; }
.primary:hover { filter: brightness(1.08); }
.link { background: none; border: 0; padding: 6px 2px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: var(--size-body); }
.link:hover { color: var(--ink); }
button:focus-visible { outline: 3px solid var(--second); outline-offset: 3px; }

/* Problems: what you see, why, and the fix. */
.problems-heading { font-family: var(--display); font-weight: 600; font-size: var(--size-lead); line-height: 1.25; margin: 1.6em 0 .4em; }
.issues { list-style: none; margin: 0; padding: 0; }
.issue { border-top: 1px solid var(--line); padding: 20px 0; scroll-margin-top: 16px; }
.issue:last-child { border-bottom: 1px solid var(--line); }
.issue .seen { font-size: var(--size-body); font-weight: 600; margin: 0 0 10px; }
.issue .seen q { quotes: "\201C" "\201D"; }
/* The Why and Fix words sit above their text, at the column's left edge like the rest of the answer (Ben, 2026-11-20). */
.issue dl { margin: 0; }
.issue dt { color: var(--muted); font-size: var(--size-body); }
.issue dd + dt { margin-top: 10px; }
.issue dd { margin: 0; }
.issue dd.fix { color: var(--ink); font-weight: 600; }
.issue .slot { color: var(--muted); font-style: italic; font-weight: 400; }
.issue .shots { margin-top: 14px; }
.issue-note { margin: 0 0 10px; color: var(--muted); font-size: var(--size-body); }

/* All topics: each page, its summary, and its sections. */
.contents { list-style: none; margin: 0; padding: 0; }
.contents > li { padding: 18px 0; border-top: 1px solid var(--line); }
.contents > li:last-child { border-bottom: 1px solid var(--line); }
.contents-page { font-family: var(--display); font-weight: 600; font-size: var(--size-heading); line-height: 1.2; color: var(--ink); }
.contents-summary { margin: 6px 0 8px; color: var(--muted); }
.contents-sections { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--size-small); }
.contents-sections a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.contents-sections a:hover { text-decoration-color: currentColor; }

.foot { margin-top: 48px; color: var(--muted); font-size: var(--size-small); }
.foot p { margin: 0 0 4px; max-width: none; }
.foot-legal { margin-top: 10px !important; }
/* The company's quiet note: the tower at the brand sheet's smallest size (settings.COMPANY_LOGO_PIXELS), on the line with its words. */
.foot-logo { display: inline-block; vertical-align: middle; height: 28px; width: auto; margin: -4px 8px 0 0; }

/* One picture per row at the full column width, so the app's own words can be read. */
.shots { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 24px 0 0; max-width: none; }
.shot { margin: 0; aspect-ratio: auto; border: 0; border-radius: 0; display: block; padding: 0; max-width: none; text-align: left; place-items: initial; }
/* A picture is never shown larger than its own pixels (a small system dialog stays sharp); the frame shrinks to it so the ring stays on its box, centred in the column. */
.shot-frame { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); cursor: zoom-in; position: relative; }
.shot-frame img { display: block; width: auto; max-width: 100%; height: auto; }
.shot figcaption { display: flex; gap: 10px; align-items: baseline; margin-top: 8px; font-size: var(--size-small); color: var(--muted); }
.shot-frame svg.marks, .viewer-stage svg.marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
svg.marks[hidden], .mark-line[hidden] { display: none; }
/* A ring: a dark halo under a bright line. An action is solid yellow; a result is thick, dashed and pink. Neither carries a number. */
.marks .mark-halo { stroke: rgba(0, 0, 0, .55); }
.marks rect.mark-action { stroke: #ffcc00; }
.marks rect.mark-result { stroke: #ff3ea5; stroke-linecap: butt; }
/* The one line under a marked picture: "Use:" underlined like the action ring, "Look for:" like the result ring. */
.mark-line { margin: 8px 0 0; font-size: var(--size-small); }
.mark-word { font-weight: 600; padding-bottom: 1px; }
.mark-line[data-kind="action"] .mark-word { border-bottom: 3px solid #ffcc00; }
.mark-line[data-kind="result"] .mark-word { border-bottom: 3px dashed #ff3ea5; }
/* A picture series (data-gallery): with script, one picture at a time, with two round arrows beside the picture (on its edges when the column has no room) and a strip of thumbnails (the tabs) under its caption, to the APG tabbed carousel pattern; without script the pictures stack. */
.shots[data-gallery] { position: relative; }
/* frame.js sizes the overlay to the current picture's frame; only the arrows take clicks, so the rest of the picture still opens the enlarged view. */
.gallery-arrows { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2; pointer-events: none; }
.gallery-arrow { position: absolute; top: 50%; width: 44px; height: 44px; margin: -22px 0 0; padding: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); color: #fff; border: 0; border-radius: 50%; opacity: .85; pointer-events: auto; }
.gallery-arrow:hover, .gallery-arrow:focus-visible { opacity: 1; }
.gallery-arrow:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.gallery-arrow::before { content: ""; width: 11px; height: 11px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; }
.gallery-arrow[data-gallery-previous] { left: 10px; }
.gallery-arrow[data-gallery-next] { right: 10px; }
/* With room in the column (frame.js sets the class), the arrows stand in the gutter, GALLERY_ARROW_GAP_PIXELS off the picture's frame, so they never cover a ring. */
.gallery-arrows-outside .gallery-arrow[data-gallery-previous] { left: auto; right: calc(100% + 8px); }
.gallery-arrows-outside .gallery-arrow[data-gallery-next] { right: auto; left: calc(100% + 8px); }
.gallery-arrow[data-gallery-previous]::before { transform: translateX(2px) rotate(45deg); }
.gallery-arrow[data-gallery-next]::before { transform: translateX(-2px) rotate(-135deg); }
/* The bar holds the strip (the tablist, tabs only) and the count as its sibling, on one line when there is room. */
.gallery-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 14px; }
.gallery-strip { display: flex; flex: 0 1 auto; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px 10px; }
.gallery-thumb { display: block; margin: 0; padding: 0; line-height: 0; overflow: hidden; background: var(--surface); border: 0; border-radius: 6px; opacity: .6; }
.gallery-thumb img { display: block; height: 56px; width: auto; max-width: 120px; object-fit: contain; }
.gallery-thumb:hover, .gallery-thumb:focus-visible { opacity: 1; }
.gallery-thumb[aria-selected="true"] { opacity: 1; outline: 2px solid var(--accent); }
.gallery-thumb:focus-visible { outline: 3px solid var(--second); outline-offset: 3px; }
.gallery-thumb[aria-selected="true"]:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
/* A picture still to come (a draft build) in the strip: a muted box of a thumbnail's height, the "Picture to come" box's shape. */
.gallery-thumb-missing { display: grid; place-items: center; height: 56px; aspect-ratio: 16 / 10; padding: 0 4px; border: 1.5px dashed var(--wire); border-radius: 6px; color: var(--muted); font-size: var(--size-small); line-height: 1.15; text-align: center; }
.gallery-count { font-family: var(--display); font-weight: 600; font-size: var(--size-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.shots.gallery-on { gap: 12px; }
.shots.gallery-on > .shot:not(.gallery-current) { display: none; }
.shots.gallery-on > .shot { touch-action: pan-y pinch-zoom; }

.viewer { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.viewer::backdrop { background: rgba(8, 14, 18, .82); }
.viewer img { display: block; max-width: 94vw; max-height: 84vh; border-radius: 10px; margin: 0 auto; }
.viewer-stage { position: relative; width: fit-content; margin: 0 auto; }
.viewer-stage img { width: auto; height: auto; }
.viewer p { color: #eef3f5; text-align: center; margin: 12px 0 2px; }
.viewer-hint { display: block; text-align: center; color: #a9b8be; font-size: var(--size-small); }

/* Links that look like buttons */
a.pill, a.primary, a.house { text-decoration: none; }
a.primary { display: inline-block; }
a.shot-frame { display: block; }
a:focus-visible { outline: 3px solid var(--second); outline-offset: 3px; border-radius: 6px; }
.yours { background: var(--accent-soft); border-radius: 4px; padding: 0 4px; font-style: italic; }
.yours-note { margin: 10px 0 0; color: var(--muted); font-size: var(--size-small); }
.page-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mode-toggle { background: transparent; color: var(--muted); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: var(--size-small); }
.text-list { margin: 6px 0 12px; padding: 0 0 0 20px; }
.text-list li { padding: 3px 0; }
.shot figcaption { flex-wrap: wrap; }
/* The house logo and name, and beside it the product's website. */
a.house:hover .house-name { text-decoration: underline; text-underline-offset: 4px; }
.house .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-colour-mode="light"]) .house .logo-light { display: none; }
  :root:not([data-colour-mode="light"]) .house .logo-dark { display: block; }
}
:root[data-colour-mode="dark"] .house .logo-light { display: none; }
:root[data-colour-mode="dark"] .house .logo-dark { display: block; }
/* The site link beside the house: the product's website, a quiet text link. */
.site-links { display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.site-links a { color: var(--muted); font-size: var(--size-small); white-space: nowrap; text-decoration: none; }
.site-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
/* On a phone the name stays whole at a smaller size beside the logo (at 320px it wraps to two lines). The phone pass below lays out the rows: the name and the Light/Dark button on the first, the site link on its own row under the name. */
@media (max-width: 560px) {
  .house { gap: 8px; }
  .house-name { font-size: .72rem; letter-spacing: .04em; }
}
@media (max-width: 380px) {
  .house-name { font-size: .66rem; }
}
[hidden] { display: none !important; }

/* Lines that differ by system (per_system) */
.system-line { display: block; margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--wire); background: var(--surface); border-radius: 0 8px 8px 0; font-size: var(--size-body); }
.system-line strong { color: var(--ink); font-weight: 600; }
.system-line + .text-list { margin-top: 4px; }
.do-this + .system-line { margin-top: -4px; margin-bottom: 12px; }
.see .system-line { margin: 6px 0 0; background: var(--bg); }

/* A picture still to come (draft builds): same box as a screenshot, not a link */
.shot-missing { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; border: 2px dashed var(--wire); border-radius: 12px; color: var(--muted); font-size: var(--size-small); }

/* A section's table (tables), e.g. ChimpType's supported file types: full column width, scrolls inside its own box, header stays in view */
.data-table { margin: 24px 0 0; max-width: none; }
.data-table figcaption { font-family: var(--display); font-weight: 600; font-size: var(--size-body); color: var(--muted); margin: 0 0 8px; }
.table-scroll { overflow-x: auto; overflow-y: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.table-scroll:focus-visible { outline: 3px solid var(--second); outline-offset: 3px; }
.data-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--size-small); }
.data-table th, .data-table td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.data-table th:last-child, .data-table td:last-child { border-right: 0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--ink); font-weight: 600; }
.data-table tbody tr:nth-child(even) td { background: var(--bg); }

/* Phone pass (Ben, 2026-11-12): the header's site link sits on its own row under the name, and every tap target is at least 40px tall. The header's rows and the words in the page line up on the column's left edge as at every other width, so nothing is centred here (Ben, 2026-11-20: "i want it to be centered throught the document in all states, for all the manuals"). */
@media (max-width: 560px) {
  .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .bar-left { display: contents; }
  .house { grid-column: 1; grid-row: 1; min-width: 0; }
  .bar-right { grid-column: 2; grid-row: 1; margin: 0; }
  .site-links { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .mode-toggle { padding: 9px 14px; }
  .page { overflow-wrap: anywhere; }
  .menu { gap: 6px; }
  .menu .pill { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; }
  .on-page a, .contents-sections a { display: inline-flex; align-items: center; min-height: 40px; }
  .actions .link { padding: 12px 0; }
  .house { min-height: 40px; }
  .site-links a { display: inline-flex; align-items: center; min-height: 40px; }
  .frame > .foot { overflow-wrap: anywhere; }
}

/* A printed page shows every picture of a series, and no arrows or strip. */
@media print {
  .shots.gallery-on > .shot:not(.gallery-current) { display: block; }
  .gallery-arrows, .gallery-bar { display: none !important; }
}
