/*
  site.css
  2026-12-03
  Version: v1.2.0

  PURPOSE:
  The styles for every page of https://screencap.ilhs.app, built by
  website/build.py. Moved out of the old single-page index.html so the
  pages share one cached file.

  Sizes follow the ILHS Shared Sizing Spec, the source of truth for type
  sizes, spacing, and content width on every ILHS website (v2.0.0, kept in
  the maintainers' internal brand notes). The block below is copied from it
  unchanged, matches the pinned copy in docs/shared/ilhs-sizing-tokens.css
  (website/build.py checks), and every size here uses its tokens or rem.
*/

/* Self-hosted fonts (SIL Open Font License, files and licenses in assets/fonts/): no third-party requests. */
@font-face { font-family: "Familjen Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/familjen-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/familjen-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap; src: url("fonts/source-sans-3-var.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-var.woff2") format("woff2"); }

/* ILHS Shared Sizing Spec v2.0.0 start: from ilhs-internal org/brand/SIZING.md, do not edit here */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Phones 0.85x -> 1x at 800 px; 1x to 1920 px; then up to 1.15x at 3840 x 2160. */
  font-size: max(clamp(0.85rem, 0.7rem + 0.6vw, 1rem), min(0.85rem + 0.125vw, 0.85rem + 0.2222vh, 1.15rem));
}
:root {
  --fs-small: clamp(0.8125rem, 0.7851rem + 0.112vw, 0.875rem);    /* 13 -> 14 px */
  --fs-label: 0.8125rem;                                          /* 13 px */
  --fs-nav: clamp(0.875rem, 0.8476rem + 0.112vw, 0.9375rem);      /* 14 -> 15 px */
  --fs-body: clamp(1rem, 0.9726rem + 0.112vw, 1.0625rem);         /* 16 -> 17 px */
  --fs-lede: clamp(1.0625rem, 1.0351rem + 0.112vw, 1.125rem);     /* 17 -> 18 px */
  --fs-h3: clamp(1.0625rem, 1.0077rem + 0.225vw, 1.1875rem);      /* 17 -> 19 px */
  --fs-card: clamp(1.125rem, 1.0702rem + 0.225vw, 1.25rem);       /* 18 -> 20 px */
  --fs-h2: clamp(1.3125rem, 1.1756rem + 0.562vw, 1.625rem);       /* 21 -> 26 px */
  --fs-h1: clamp(1.625rem, 1.4059rem + 0.899vw, 2.125rem);        /* 26 -> 34 px */
  --fs-hero: clamp(1.875rem, 1.4916rem + 1.573vw, 2.75rem);       /* 30 -> 44 px */

  --wrap-max: 75rem;                                              /* 1200 px with gutters */
  --measure: 42rem;                                               /* 672 px reading width */
  --gutter: clamp(1rem, 0.5618rem + 1.798vw, 2rem);               /* 16 -> 32 px */
  --section-pad: clamp(2rem, 1.3427rem + 2.697vw, 3.5rem);        /* 32 -> 56 px */
  --hero-pad: clamp(2rem, 1.1236rem + 3.596vw, 4rem);             /* 32 -> 64 px */
  --card-pad: clamp(1rem, 0.7809rem + 0.899vw, 1.5rem);           /* 16 -> 24 px */
  --inset-pad: clamp(0.75rem, 0.5309rem + 0.899vw, 1.25rem);      /* 12 -> 20 px */
  --gap: clamp(0.75rem, 0.5309rem + 0.899vw, 1.25rem);            /* 12 -> 20 px */
  --tap: max(2.75rem, 44px);                                      /* buttons, fields, menu items */
  --tap-inline: max(1.5rem, 24px);                                /* text links in lines and footers */
  --header-h: max(3.5rem, 56px);                                  /* one-row site header */
}
/* ILHS Shared Sizing Spec v2.0.0 end */

/* Layout: a "how-to guide" page. The hero is step 1 of a real guide; features are numbered steps, the way the tool's own output reads.
   Colors and type follow docs/BRANDING.md: brand-blue for buttons, links, and accents; click-red only for what the product draws. */
:root {
  --paper: #f6f7f9;
  --sheet: #ffffff;
  --ink: #17202b;
  --muted: #566273;
  --rule: #d9dee6;
  --blue: #2563eb;          /* brand-blue */
  --on-blue: #ffffff;
  --blue-soft: #e6eefd;
  --red: #e53935;           /* click-red: rings and boxes the product draws */
  --amber: #f59e0b;         /* capture-amber: marks only, never text */
  --navy: #0f1e3d;          /* screen-navy */
  --display: "Familjen Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10151c; --sheet: #18202a; --ink: #e8edf3; --muted: #9aa7b8;
    --rule: #2a3542; --blue: #6ea8fe; --on-blue: #10151c; --blue-soft: #1b2a44; --red: #ff6b66; --amber: #f5a524; --navy: #22355f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10151c; --sheet: #18202a; --ink: #e8edf3; --muted: #9aa7b8;
  --rule: #2a3542; --blue: #6ea8fe; --on-blue: #10151c; --blue-soft: #1b2a44; --red: #ff6b66; --amber: #f5a524; --navy: #22355f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--fs-body); line-height: 1.6; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding-inline: var(--gutter); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 0.5rem; background: var(--blue); color: var(--on-blue); padding: 0.5rem 0.875rem; border-radius: 8px; font-weight: 600; z-index: 10; }
.skip:focus { left: 1rem; }

/* Header: one row, var(--header-h) tall at every width (sizing spec page budget). Below 600 px the menu
   links move into a Menu button (a <details> element, so it works without JavaScript). */
header.top { position: relative; border-bottom: 1px solid var(--rule); background: var(--sheet); }
header.top .wrap { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); padding-block: 0.25rem; }
.brand { display: inline-flex; align-items: center; flex: none; min-height: var(--tap); gap: 0.5rem; font-family: var(--display); font-weight: 700; font-size: 1.125rem; color: var(--ink); text-decoration: none; }
.brand img { width: 1.75rem; height: 1.75rem; display: block; }
nav ul { list-style: none; display: flex; flex-wrap: nowrap; gap: 0 0.25rem; margin: 0; padding: 0; font-size: var(--fs-nav); }
nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 0.5rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--ink); }
.menu { display: none; }
.menu summary { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 0.75rem; border: 1px solid var(--rule); border-radius: 8px; font: 600 var(--fs-nav) var(--body); color: var(--ink); cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 0.45em; height: 0.45em; margin-left: 0.5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-0.15em) rotate(45deg); }
.menu[open] summary::after { transform: translateY(0.1em) rotate(-135deg); }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--sheet); border-bottom: 1px solid var(--rule); padding: 0.25rem var(--gutter) 0.5rem; }
.menu nav ul { flex-direction: column; }
.menu nav a { display: flex; }
.menu nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--blue); }
@media (max-width: 599px) {
  .nav-wide { display: none; }
  .menu { display: block; }
}

.hero { padding-block: var(--hero-pad); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; align-items: center; }
.eyebrow { font: 600 var(--fs-label)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 1rem; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.1; max-width: 14em; font-weight: 700; letter-spacing: -.01em; }
.hero .lede { margin-top: 1.125rem; font-size: var(--fs-lede); line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.ctas { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; min-height: max(3rem, 44px); padding: 0.625rem 1.25rem; font-size: var(--fs-body); border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid var(--rule); color: var(--ink); background: var(--sheet); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.meta { margin-top: 1rem; font: var(--fs-label) var(--mono); color: var(--muted); }
.trust { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: var(--fs-small); color: var(--muted); }
.trust a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--muted); }
.trust strong { color: var(--ink); font-weight: 600; }

/* The hero picture is captioned like a step in the tool's own output */
figure.step { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
figure.step img { display: block; width: 100%; height: auto; }
figure.step figcaption { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.75rem 1rem; border-top: 1px solid var(--rule); font-size: var(--fs-small); }
.num { font: 600 var(--fs-label) var(--mono); color: var(--blue); white-space: nowrap; }
.ts { font: var(--fs-label) var(--mono); color: var(--muted); margin-left: auto; white-space: nowrap; }

section { padding-block: var(--section-pad); border-top: 1px solid var(--rule); }
section > .wrap > h2 { font-size: var(--fs-h2); }
section > .wrap > .sub { margin-top: 0.625rem; color: var(--muted); max-width: var(--measure); }

.flow { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); counter-reset: s; padding: 0; list-style: none; }
.flow li { counter-increment: s; }
.flow li::before { content: "Step " counter(s); display: block; font: 600 var(--fs-label) var(--mono); color: var(--blue); margin-bottom: 0.375rem; }
.flow h3 { font-size: var(--fs-h3); line-height: 1.25; }
.flow p { margin-top: 0.375rem; color: var(--muted); }

.features { margin-top: 2.25rem; display: grid; gap: 3.5rem; }
.feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 2.5rem; align-items: center; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.feature:nth-child(even) .copy { order: 2; }
.feature h3 { font-size: var(--fs-card); line-height: 1.2; }
.feature p { margin-top: 0.625rem; color: var(--muted); }
.feature ul { margin: 0.75rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.feature li + li { margin-top: 0.25rem; }
.shot { margin: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--sheet); }
.shot img { display: block; width: 100%; height: auto; }

.compare { margin-top: 1.75rem; overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); }
table { border-collapse: collapse; width: 100%; min-width: 35rem; font-size: var(--fs-body); }
th, td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font: 600 var(--fs-label) var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td:first-child { color: var(--muted); width: 40%; }

.install { margin-top: 1.75rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.375rem; border-bottom: 1px solid var(--rule); }
.tabs button { min-height: var(--tap); font: 600 var(--fs-nav) var(--body); color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 0.625rem 0.875rem; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.panel { padding-top: 1.25rem; display: grid; gap: 1.75rem; }
.panel p { color: var(--muted); max-width: 46em; }
.panel .req { font: 600 var(--fs-label)/1.5 var(--mono); color: var(--ink); padding: 0.625rem 0.875rem; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--blue); border-radius: 8px; max-width: none; }
.panel[hidden] { display: none; }
.way { display: grid; gap: 0.75rem; }
.panel > *, .way > *, .steps li, .install { min-width: 0; }
.way h3 { font-size: var(--fs-h3); line-height: 1.25; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.way .compare { margin-top: 0; }
.way td code { font: var(--fs-label) var(--mono); white-space: nowrap; }
.way td:first-child { width: 34%; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.panel > .btn, .panel > .row { justify-self: start; }
.btn.ghost { background: none; color: var(--blue); }
.note { font-size: var(--fs-small); padding: 0.625rem 0.875rem; border-radius: 8px; background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--amber); color: var(--ink) !important; }
.steps { margin: 0; padding-left: 1.375rem; display: grid; gap: 0.875rem; }
.steps li { padding-left: 0.25rem; }
.steps li::marker { font: 600 var(--fs-small) var(--mono); color: var(--blue); }
.steps li p { margin-bottom: 0.5rem; }
.plain { margin: 0; padding-left: 1.25rem; color: var(--muted); }
.plain li + li { margin-top: 0.25rem; }
.pill.ok { background: var(--blue); color: var(--on-blue); }
.reqs th[scope="row"] { font: 600 var(--fs-small) var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); width: 16%; }
.reqs td:first-child { color: inherit; width: auto; }
.reqs td { width: 28%; }
.fine { margin-top: 0.875rem; font-size: var(--fs-small); color: var(--muted); max-width: var(--measure); }
.cmd { display: flex; gap: 0.5rem; align-items: stretch; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; padding: 0.75rem 0.875rem; font: var(--fs-small)/1.5 var(--mono); }
.cmd button { min-width: var(--tap); min-height: var(--tap); font: 600 var(--fs-label) var(--body); border: 0; border-left: 1px solid var(--rule); background: none; color: var(--blue); padding: 0 0.875rem; cursor: pointer; }
.pill { display: inline-block; font: 600 var(--fs-label) var(--mono); padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--blue-soft); color: var(--blue); vertical-align: middle; }

/* Footer: the shared ILHS Site Footer for application sites (sizing spec v2, "Site Footer"). Centered lines,
   top to bottom: the app's tagline and version; the FOSS For All mark with the copyright; contact and source.
   From 600 px the last two join, so the desktop footer is two lines. At most 120 px tall on desktop and 200 px on phones. */
footer { border-top: 1px solid var(--rule); padding-block: 1rem 1.25rem; font-size: var(--fs-small); color: var(--muted); }
footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; }
.foot-site, .foot-brand, .foot-contact { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 1rem; }
footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: var(--tap-inline); text-decoration: underline; }
footer a:hover { color: var(--ink); }
.foot-site > *, .foot-brand > *, .foot-contact > * { white-space: nowrap; }   /* each item wraps as a whole */
.foot-site em { font-style: italic; }
.foot-tag { font: 700 var(--fs-label) var(--mono); color: var(--blue); letter-spacing: .04em; }
@media (min-width: 600px) {
  .foot-lower { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 1rem; }
}
@media (max-width: 599px) {
  .foot-site { flex-direction: column; }   /* the tagline above the version, so no line runs to the screen edges */
}

@media (max-width: 899px) {
  .pkgs table, .pkgs tbody, .pkgs tr, .pkgs td { display: block; min-width: 0; width: auto !important; }
  .pkgs thead { display: none; }
  .pkgs tr { padding: 0.625rem 0; border-bottom: 1px solid var(--rule); }
  .pkgs tr:last-child { border-bottom: 0; }
  .pkgs td { border: 0; padding: 0.1875rem 1rem; }
  .pkgs td:first-child { color: var(--ink); font-weight: 600; }
  .pkgs td code { white-space: normal; word-break: break-all; }
  .flow { grid-template-columns: minmax(0, 1fr); }
}
/* Wide layouts (a picture beside the text) start at 1100 px */
@media (max-width: 1099px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .feature:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-child(even) .copy { order: 0; }
}
@media (max-width: 599px) {
  .compare:not(.pkgs) { overflow: visible; }
  .compare:not(.pkgs) table, .compare:not(.pkgs) tbody, .compare:not(.pkgs) tr, .compare:not(.pkgs) td, .compare:not(.pkgs) th[scope="row"] { display: block; min-width: 0; width: auto !important; }
  .compare:not(.pkgs) thead { display: none; }
  .compare:not(.pkgs) tr { padding: 0.875rem 1rem; border-bottom: 1px solid var(--rule); }
  .compare:not(.pkgs) tr:last-child { border-bottom: 0; }
  .compare:not(.pkgs) td, .compare:not(.pkgs) th[scope="row"] { border: 0; padding: 0; }
  .compare:not(.pkgs) td + td, .compare:not(.pkgs) th + td { margin-top: 0.625rem; }
  .compare:not(.pkgs) td::before { content: attr(data-label); display: block; font: 600 var(--fs-label) var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 0.125rem; }
  .compare:not(.pkgs) td:last-child { color: var(--ink); }
  .reqs th[scope="row"] { font-size: var(--fs-body); margin-bottom: 0.25rem; }
  .hero h1 { overflow-wrap: anywhere; }
}
a.zoom { display: block; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s; } .btn:hover { filter: brightness(1.06); } }

/* Multi-page additions */
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }
.page-head { padding-block: var(--section-pad) 0.5rem; }
.page-head h1 { font-size: var(--fs-h1); max-width: 14em; font-weight: 700; letter-spacing: -.01em; }
.page-head .lede { margin-top: 0.875rem; font-size: var(--fs-lede); line-height: 1.5; color: var(--muted); max-width: var(--measure); }
section.first { border-top: 0; padding-top: 1.5rem; }
.cards { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.card { display: block; padding: var(--card-pad); background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); text-decoration: none; }
.card h3 { font-size: var(--fs-card); line-height: 1.2; }
.card p { margin-top: 0.375rem; color: var(--muted); }
.card .more { display: inline-block; margin-top: 0.625rem; color: var(--blue); font-weight: 600; font-size: var(--fs-small); }
.card:hover { border-color: var(--blue); }
.cta-band { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Without JavaScript every download panel shows, each under its own heading */
.tabs, .os-name { display: none; }
.js .tabs { display: flex; }
html:not(.js) .os-name { display: block; font-size: var(--fs-card); margin-top: 0.75rem; }
html:not(.js) .panel + .panel { margin-top: 1.75rem; border-top: 1px solid var(--rule); }
@media (max-width: 899px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}
