/* Lux Visual Systems - Tri-Swiss — documentation site stylesheet.
 * Tokens mirror skills/lux-visual-systems-tri-swiss/assets/theme.css exactly; keep them in sync.
 * Everything below the token blocks is the showcase/documentation chrome and the
 * component patterns documented in skills/lux-visual-systems-tri-swiss/references/components.md. */

:root {
  --background:#f5efe0; --foreground:#000000; --card:#faf6ec; --card-foreground:#000000;
  --primary:#d3281b; --primary-foreground:#f5efe0; --primary-foreground-strong:#faf6ec; --secondary:#000000; --secondary-foreground:#f5efe0;
  --muted:#ebe5d5; --muted-foreground:#4a4838; --border:#000000; --input:#faf6ec; --ring:#d3281b;
  --highlight:#56bfa3; --highlight-foreground:#000000;
  --radius:0.5rem;
  /* Role fonts — Space flavor (default). --font-serif is shared by both flavors and
     is never overridden by .geist. --font-display defaults to --font-mono until the
     .jost accent is applied. */
  --font-mono:'Space Mono',ui-monospace,monospace; --font-sans:'Space Grotesk',system-ui,sans-serif;
  --font-serif:'Zilla Slab',Georgia,serif; --font-display:var(--font-mono);
}
/* Geist flavor — class="geist" on <html>; composes with .dark and .jost. */
.geist { --font-mono:'Geist Mono',ui-monospace,monospace; --font-sans:'Geist',system-ui,sans-serif; }
/* Jost heading accent — not a flavor, an independent on/off switch. */
.jost { --font-display:'Jost',system-ui,sans-serif; }
.dark {
  --background:#000000; --foreground:#f5efe0; --card:#161616; --card-foreground:#f5efe0;
  --primary:#e2503f; --primary-foreground:#f5efe0; --primary-foreground-strong:#1a120e; --secondary:#f5efe0; --secondary-foreground:#000000;
  --muted:#1f1f1f; --muted-foreground:#a8a696; --border:#f5efe0; --input:#161616; --ring:#e2503f;
  --highlight:#63cbae; --highlight-foreground:#000000;
}

/* ---------- Base ---------- */
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--background); color:var(--foreground);
  font-family:var(--font-sans); line-height:1.65;
  -webkit-font-smoothing:antialiased; font-feature-settings:"kern","liga","calt"; }
h1,h2,h3,h4,h5,h6 { font-family:var(--font-display); font-weight:700; margin:0; }
h1 { font-size:3rem; letter-spacing:-0.02em; line-height:1.1; }
h2 { font-size:2.25rem; letter-spacing:-0.02em; line-height:1.15; }
h3 { font-size:1.5rem; line-height:1.3; }
h4 { font-size:1.25rem; line-height:1.3; }
h5 { font-size:1.125rem; line-height:1.3; }
p { margin:0; }
p + p { margin-top:14px; }
a { color:inherit; }
code { font-family:var(--font-mono); font-size:0.85em; background:var(--muted); padding:1px 5px; }
pre { font-family:var(--font-mono); font-size:0.85rem; line-height:1.6; background:var(--muted);
  border:1px solid var(--border); padding:16px 20px; margin:0; overflow:auto; }
pre code { background:none; padding:0; font-size:inherit; }
blockquote { font-family:var(--font-serif); font-style:italic; font-size:1.5rem; line-height:1.45;
  border-left:2px solid var(--border); margin:40px 0 0; padding:2px 0 2px 24px; max-width:62ch; }
.label { font-family:var(--font-mono); font-size:0.75rem; text-transform:uppercase;
  letter-spacing:0.2em; color:var(--muted-foreground); }
.label.active, .label-active { color:var(--foreground); font-weight:700; }
.muted { color:var(--muted-foreground); }
.small { font-size:0.85rem; }
.lead { font-size:1.15rem; max-width:60ch; }
.measure { max-width:66ch; }
.mono { font-family:var(--font-mono); }
.serif { font-family:var(--font-serif); }
.tnum { font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1; }
.accent-word { color:var(--primary); }
.hl { color:var(--highlight); }
.icon { width:20px; height:20px; fill:none; stroke:currentColor;
  stroke-width:1.5; stroke-linecap:square; stroke-linejoin:miter; }

/* Section header: heading beside a rule; border by default, primary when emphasized. */
.divider { display:flex; align-items:baseline; gap:12px; margin:0 0 24px; }
.divider .rule { height:1px; flex:1; background:var(--border); }
.divider .rule.red { background:var(--primary); }
.divider .stripe { align-self:center; }
section { padding:64px 0; border-top:1px solid var(--border); }
section.first { border-top:none; padding-top:0; }
.sub { margin:-8px 0 24px; }

/* Tri-part segment stripe: ink, Red, Turquoise, three equal segments, 3px, any length. */
.stripe { display:flex; gap:3px; width:36px; }
.stripe i { height:3px; flex:1; background:var(--foreground); }
.stripe i:nth-child(2) { background:var(--primary); }
.stripe i:nth-child(3) { background:var(--highlight); }
.stripe.hero { width:64px; gap:4px; }
.stripe.flourish { width:140px; gap:6px; }
.flourish-row { display:flex; justify-content:center; padding:32px 0 0; }

/* Hero brand moment: turquoise line with a filled circle icon. */
.hero-moment { display:flex; align-items:center; gap:8px; margin-top:12px; color:var(--highlight);
  font-family:var(--font-mono); font-weight:700; font-size:1.5rem; }

/* ---------- Layout: Structural Block sidebar + content ---------- */
.layout { display:flex; min-height:100vh; }
.sidebar { width:22%; min-width:220px; max-width:280px; flex-shrink:0;
  background:var(--primary); color:var(--primary-foreground);
  position:sticky; top:0; height:100vh; overflow-y:auto;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:32px 28px; }
.sidebar-wordmark { font-family:var(--font-mono); font-weight:700; font-size:1.4rem; line-height:1.2;
  color:inherit; text-decoration:none; }
.sidebar-nav { margin-top:40px; display:flex; flex-direction:column; gap:14px;
  font-family:var(--font-mono); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.15em; }
.sidebar-nav a { color:var(--primary-foreground-strong); text-decoration:none; opacity:0.75;
  border-bottom:2px solid transparent; padding-bottom:2px; width:max-content;
  transition:opacity 0.15s, border-color 0.15s; }
.sidebar-nav a:hover { opacity:1; border-bottom-color:var(--highlight); }
.sidebar-nav a[aria-current="page"] { opacity:1; font-weight:700; }
.sidebar-bottom { color:var(--primary-foreground-strong); display:flex; flex-direction:column; gap:14px; margin-top:32px;
  font-family:var(--font-mono); font-size:0.7rem; text-transform:uppercase; letter-spacing:0.12em; }
.sidebar-bottom a { color:var(--primary-foreground-strong); text-decoration:none; opacity:0.85;
  display:inline-flex; align-items:center; gap:6px; transition:opacity 0.15s; }
.sidebar-bottom a:hover { opacity:1; }
.sidebar-bottom .toggle button { color:var(--primary-foreground-strong); opacity:0.6; }
.sidebar-bottom .toggle button[aria-pressed="true"] { opacity:1; }
.sidebar-bottom .toggle .mid { color:var(--primary-foreground-strong); opacity:0.4; }
.hamburger { display:none; background:none; border:none; color:var(--primary-foreground-strong); cursor:pointer; padding:4px; }
.content { flex:1; min-width:0; }
.content-inner { max-width:900px; margin:0 auto; padding:0 32px; }
.page-head { padding:56px 0 48px; }
.page-head h1 { margin:20px 0 0; }
.page-head .stripe { margin-top:16px; }
.page-head .lead { margin-top:24px; }
footer { border-top:1px solid var(--border); padding:48px 0; }
.footer-row { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:16px;
  font-family:var(--font-mono); font-size:0.75rem; text-transform:uppercase; letter-spacing:0.15em; }
.footer-row a { text-decoration:none; }
.pager { display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; border-top:1px solid var(--border); padding:32px 0 0; }
.pager a { text-decoration:none; display:inline-flex; align-items:center; gap:8px; }

/* Toggle */
.toggle { display:flex; align-items:baseline; gap:6px; font-family:var(--font-mono);
  font-size:0.75rem; text-transform:uppercase; letter-spacing:0.2em; }
.toggle button { background:none; border:none; padding:0; cursor:pointer;
  font:inherit; letter-spacing:inherit; text-transform:inherit; color:var(--muted-foreground); }
.toggle button:hover, .toggle button[aria-pressed="true"] { color:var(--foreground); }
.toggle .mid { color:var(--muted-foreground); opacity:0.4; }

/* ---------- Grids and cards ---------- */
.grid { display:grid; gap:20px; }
.grid-2 { grid-template-columns:1fr 1fr; }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(4,1fr); }
.grid-auto { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); }
.gap-32 { gap:32px; } .gap-40 { gap:40px; }
.card { border:1px solid var(--border); background:var(--card); color:var(--card-foreground); padding:24px; }
.card h4 { font-family:var(--font-mono); font-size:1rem; }
.card p.small { margin-top:8px; }
.card-emphasis { border-color:var(--primary); }
.card-accent { border-color:var(--highlight); background:color-mix(in srgb, var(--highlight) 8%, var(--card)); }
.card-interactive { display:block; text-decoration:none; color:inherit; background:none; border-color:var(--primary);
  transition:border-color 0.15s, background-color 0.15s; }
.card-interactive:hover, .card-interactive.is-hover-demo { border-color:var(--highlight);
  background:color-mix(in srgb, var(--highlight) 5%, var(--card)); }
.demo { border:1px solid var(--border); padding:20px; }
.demo > .label { display:block; margin-bottom:16px; }
.demo .note { text-transform:none; letter-spacing:normal; color:var(--muted-foreground); }
.index-card { display:block; text-decoration:none; color:inherit; border:1px solid var(--border);
  padding:24px; transition:border-color 0.15s; }
.index-card:hover { border-color:var(--primary); }
.index-card.demo { padding:20px; }
.index-card.demo > .label { display:block; margin-bottom:16px; }
.index-card.demo .btn, .index-card.demo .demo-nav-link { pointer-events:none; }
.index-card h4 { font-family:var(--font-mono); font-size:1rem; margin-top:12px; }
.index-card p { margin-top:8px; font-size:0.85rem; color:var(--muted-foreground); }

/* ---------- Turquoise Structural Block ---------- */
.callout { background:var(--highlight); color:var(--highlight-foreground); padding:14px 16px; max-width:60ch; }
.callout .t { margin:0; font-family:var(--font-mono); font-size:0.7rem; text-transform:uppercase; letter-spacing:0.12em; font-weight:700; }
.callout p { margin:8px 0 0; font-size:0.9rem; }
.panel { background:var(--highlight); color:var(--highlight-foreground); padding:40px; }
.panel .label { color:var(--highlight-foreground); opacity:0.7; }
.panel .statement { margin:12px 0 0; font-family:var(--font-mono); font-weight:700; font-size:1.5rem; line-height:1.3; max-width:44ch; }
.closing-band { background:var(--highlight); color:var(--highlight-foreground); padding:28px 0; text-align:center; }
.closing-band p { margin:0; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.15em; font-size:0.8rem; font-weight:700; }
.hl-underline { border-bottom:2px solid var(--highlight); padding-bottom:2px; }
.hl-dot { width:6px; height:6px; border-radius:9999px; background:var(--highlight); display:inline-block; }
.hl-wash { background:color-mix(in srgb, var(--highlight) 10%, transparent); padding:12px 16px; }

/* ---------- Buttons ---------- */
.btn { font-family:var(--font-mono); font-size:0.75rem; text-transform:uppercase; letter-spacing:0.2em;
  padding:8px 16px; border:1px solid var(--foreground); background:none; color:var(--foreground);
  cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px;
  transition:background-color 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s; }
.btn-ghost { border-color:transparent; color:var(--muted-foreground); }
.btn-ghost:hover { color:var(--foreground); }
.btn-outlined:hover { background:var(--foreground); color:var(--background); }
.btn-filled { background:var(--foreground); color:var(--background); }
.btn-filled:hover { opacity:0.9; }
.btn-destructive, .btn-accent { border-color:var(--primary); color:var(--primary); }
.btn-destructive:hover, .btn-destructive.is-hover-demo { background:var(--primary); color:var(--primary-foreground-strong); }
.btn-accent:hover, .btn-accent.is-hover-demo { background:var(--highlight); color:var(--highlight-foreground); border-color:var(--highlight); }
.btn:disabled { opacity:0.4; cursor:default; }
.btn:disabled:hover { background:none; color:var(--foreground); }
.btn:focus-visible { outline:1px solid var(--ring); outline-offset:1px; }
.hover-pair { display:flex; gap:24px; flex-wrap:wrap; }
.hover-pair > div { display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.cap { font-family:var(--font-mono); font-size:0.65rem; text-transform:uppercase; letter-spacing:0.12em; color:var(--muted-foreground); }
.on-red { background:var(--primary); padding:16px; display:flex; gap:0; }
.on-red > div { flex:1; }
.on-red .cap { color:var(--primary-foreground-strong); opacity:0.7; }
.demo-nav-link { color:var(--primary-foreground-strong); text-decoration:none; opacity:0.75;
  border-bottom:2px solid transparent; padding-bottom:2px;
  font-family:var(--font-mono); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.15em;
  transition:opacity 0.15s, border-color 0.15s; }
.demo-nav-link:hover, .demo-nav-link.is-hover-demo { opacity:1; border-bottom-color:var(--highlight); }

/* ---------- Tags ---------- */
.tag { font-family:var(--font-mono); font-size:0.65rem; text-transform:uppercase; letter-spacing:0.12em;
  padding:2px 8px; display:inline-flex; align-items:center; gap:6px; }
.tag-neutral { color:var(--muted-foreground); }
.tag-signal { background:var(--foreground); color:var(--background); }
.tag-outlined { border:1px dashed color-mix(in srgb, var(--foreground) 50%, transparent); color:color-mix(in srgb, var(--foreground) 80%, transparent); }
.tag-saved { border:1px solid color-mix(in srgb, var(--foreground) 30%, transparent); color:color-mix(in srgb, var(--foreground) 50%, transparent); }
.tag .dot { width:4px; height:4px; border-radius:9999px; background:currentColor; display:inline-block; }

/* ---------- Status pips ---------- */
.pip { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-mono);
  font-size:0.75rem; text-transform:uppercase; letter-spacing:0.15em; }
.pip i { width:6px; height:6px; border-radius:9999px; background:var(--foreground); }
.pip.warn i { background:var(--primary); }
.pip.load i { background:color-mix(in srgb, var(--muted-foreground) 30%, transparent); animation:pulse 1.2s infinite; }
.pip.off i { background:color-mix(in srgb, var(--foreground) 25%, transparent); }
@keyframes pulse { 50% { opacity:0.3; } }

/* ---------- Inputs ---------- */
.field label { display:block; margin-bottom:8px; }
.field input { width:100%; border:1px solid var(--border); background:var(--input); color:var(--foreground);
  padding:8px 12px; font-family:var(--font-mono); font-size:0.85rem; }
.field input::placeholder { color:var(--muted-foreground); }
.field input:focus, .field input.is-focus-demo { outline:1px solid var(--ring); outline-offset:0; }

/* ---------- Lists and tables ---------- */
.list-plain { list-style:none; margin:0; padding:0; }
.list-plain li { border-top:1px solid var(--border); padding:10px 0; }
.list-plain li:first-child { border-top:none; }
.list-plain.ordered li { display:flex; gap:12px; }
.list-plain.ordered .n { font-family:var(--font-mono); font-variant-numeric:tabular-nums; color:var(--muted-foreground); }
table.data-table { width:100%; border-collapse:collapse; font-size:0.85rem; }
table.data-table th { font-family:var(--font-mono); font-weight:700; text-transform:uppercase;
  letter-spacing:0.1em; font-size:0.7rem; text-align:left; padding:8px 0; border-bottom:2px solid var(--border); vertical-align:bottom; }
table.data-table td { padding:8px 12px 8px 0; border-bottom:1px solid var(--border); vertical-align:top; }
table.data-table td.num, table.data-table th.num { text-align:right; font-variant-numeric:tabular-nums; padding-right:0; }
table.data-table td code { white-space:nowrap; }
.tok-swatch { display:inline-block; width:14px; height:14px; border:1px solid var(--border); vertical-align:-2px; margin-right:8px; }

/* ---------- Figures ---------- */
figure.img-grid { margin:0; border:1px solid var(--border); }
figure.img-grid .img { aspect-ratio:4/3; background:linear-gradient(135deg, var(--primary) 0%, var(--highlight) 100%); }
figure.img-grid .img.gray { filter:grayscale(1); }
figure.img-grid figcaption, .caption { border-top:1px solid var(--border); padding:10px 12px;
  font-family:var(--font-mono); font-style:italic; font-size:0.85rem; color:var(--muted-foreground); }

/* ---------- Modal demo (static) ---------- */
.modal-demo { position:relative; height:280px; overflow:hidden; border:1px solid var(--border); }
.modal-demo .page { padding:24px; }
.modal-demo .overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:color-mix(in srgb, var(--background) 80%, transparent); padding:0 24px; }
.modal-demo .panel { background:var(--background); color:var(--foreground); width:100%; max-width:560px;
  border:1px solid var(--foreground); padding:24px; font-family:var(--font-mono); font-size:0.85rem; }
.modal-demo .panel h4 { font-family:var(--font-mono); font-size:1rem; margin-bottom:8px; }
.modal-demo .panel p { margin:0 0 20px; color:var(--muted-foreground); font-family:var(--font-sans); }
.row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }

/* ---------- Palette chips ---------- */
.palette { display:grid; grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); gap:16px; }
.palette figure { margin:0; border:1px solid var(--border); }
.pal-chip { height:64px; }
.palette figcaption { border-top:1px solid var(--border); padding:8px 10px; }
.palette .label { display:block; }
.palette .role { font-family:var(--font-mono); font-size:0.7rem; color:var(--muted-foreground); }
.pal-vals { margin:8px 0 0; font-family:var(--font-mono); font-size:0.62rem; line-height:1.55; color:var(--muted-foreground); }

/* ---------- Type specimens ---------- */
.specimen { display:grid; grid-template-columns:200px 1fr; gap:24px; align-items:baseline;
  border-top:1px solid var(--border); padding:16px 0; }
.specimen:first-child { border-top:none; }
.specimen .meta { font-family:var(--font-mono); font-size:0.65rem; letter-spacing:0.12em; text-transform:uppercase; color:var(--muted-foreground); line-height:1.8; }
.specimen .meta b { display:block; color:var(--foreground); font-weight:700; }
.weights p + p { margin-top:14px; }

/* ---------- Cover / banner on the overview ---------- */
.cover-wrap { container-type:inline-size; }
.cover { position:relative; width:100%; aspect-ratio:960/288; overflow:hidden; border:1px solid var(--border); background:var(--background); }
.cover svg { position:absolute; inset:0; width:100%; height:100%; display:block; }
.cover .red { fill:var(--primary); }
.cover .ink { fill:var(--foreground); }
.cover .turq { fill:var(--highlight); }
.cover .rule { stroke:var(--border); stroke-width:1; fill:none; vector-effect:non-scaling-stroke; }
.cover .family { position:absolute; left:5%; bottom:57%; max-width:45%; margin:0; font-family:var(--font-mono);
  font-weight:400; font-size:max(8px, 1.6cqw); line-height:1.4; letter-spacing:0.16em; text-transform:uppercase; color:var(--foreground); }
.cover .name { position:absolute; left:5%; bottom:25.7%; margin:0; font-family:var(--font-display);
  font-weight:700; font-size:7.9cqw; line-height:0.92; letter-spacing:-0.02em; color:var(--foreground); white-space:nowrap; }
.cover .tagline { position:absolute; left:5%; bottom:15.3%; margin:0; font-family:var(--font-mono);
  font-size:max(7px, 1.35cqw); max-width:46%; line-height:1.35; letter-spacing:0.12em; text-transform:uppercase; color:var(--muted-foreground); }

/* Keep the short variant title inside the clear field at compact banner sizes. */
@container (max-width: 480px) {
  .cover .family { bottom:65%; }
  .cover .name { bottom:34%; }
  .cover .tagline { bottom:8%; }
}
@container (max-width: 340px) {
  .cover .tagline { display:none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout { flex-direction:column; }
  .sidebar { width:100%; max-width:none; height:auto; position:sticky; top:0; z-index:10;
    flex-direction:row; align-items:center; justify-content:space-between; padding:16px 20px; }
  .sidebar > div:first-child { display:flex; align-items:center; justify-content:space-between; width:100%; }
  .sidebar-nav { display:none; margin-top:0; position:absolute; top:100%; left:0; right:0;
    background:var(--primary); padding:20px; flex-direction:column; gap:16px; }
  .sidebar-nav.open { display:flex; }
  .sidebar-bottom { display:none; }
  .hamburger { display:block; }
  .content-inner { padding:0 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns:1fr; }
  .specimen { grid-template-columns:1fr; gap:8px; }
  h1 { font-size:2.25rem; }
  .page-head { padding:32px 0; }
  section { padding:40px 0; }
}

/* Edition choice: shared action baseline and a compact, readable comparison. */
#install { padding-bottom:32px; }
#editions { margin-top:32px; padding:32px 0 0; }
.edition-grid { gap:24px; margin-top:24px; }
.edition-card { display:flex; flex-direction:column; min-width:0; }
.edition-card h3 { margin-top:12px; }
.edition-thanks { margin-bottom:20px; }
.edition-actions { margin-top:auto; padding-top:4px; }
.edition-actions .btn { display:flex; width:100%; text-align:center; justify-content:center; white-space:normal; }
.edition-table-wrap { margin-top:24px; }
.edition-table { table-layout:fixed; }
.edition-table caption { text-align:left; margin-bottom:12px; font-family:var(--font-mono); }
.edition-table th[scope="row"] { font-family:var(--font-sans); text-transform:none; letter-spacing:normal; font-weight:500; }
.edition-table th, .edition-table td { overflow-wrap:anywhere; }
.edition-table th[scope="row"] { border-bottom:1px solid var(--border); padding:8px 12px 8px 0; }
.edition-note { margin-top:20px; color:var(--muted-foreground); }
@media (max-width:600px) {
  .edition-table th, .edition-table td { font-size:0.75rem; padding-right:8px; }
}

/* Native disclosures keep each host's commands labeled and keyboard accessible. */
.install-hosts > p { margin-top:12px; }
.install-host { border-top:1px solid var(--border); margin-top:20px; padding-top:16px; min-width:0; }
.install-host summary { cursor:pointer; font-family:var(--font-mono); font-weight:700; }
.install-host summary:focus-visible { outline:2px solid var(--ring); outline-offset:4px; }
.install-host p { margin-top:12px; }
.install-host pre { margin:12px 0; font-size:0.85rem; max-width:100%; overflow-x:auto; }
.install-session-note { margin-top:20px; }
