/* LEDlights.org — encyclopedia design system */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-muted: #eef1f5;
  --bg-elev: #ffffff;
  --text: #16181d;
  --text-2: #444b58;
  --text-3: #6a7180;
  --border: #e3e7ec;
  --border-strong: #cdd3dc;
  --link: #0a5fc2;
  --link-hover: #07488f;
  --accent: #0a5fc2;
  --accent-soft: #eaf2fd;
  --ok: #157f3b;
  --warn: #9a5b00;
  --warn-soft: #fff6e5;
  --mark: #ffec99;
  --code-bg: #f2f4f7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .10);
  --header-h: 60px;
  --radius: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* diagram palette */
  --d-line: #3b4250;
  --d-soft: #8a93a3;
  --d-p: #fde9e7;
  --d-n: #e5eefc;
  --d-dep: #eceef2;
  --d-hole: #c2410c;
  --d-electron: #1d4ed8;
  --d-metal: #9aa3b2;
  --d-housing: #f3f1ea;
  --d-phosphor: #f4dc72;
  --d-die: #283142;
  --d-gold: #c8962e;
  --d-pcb: #2f7d4f;
  --d-copper: #c77b3a;
  --d-sink: #aeb6c2;
  --d-heat: #e8590c;
  --d-lens: rgba(196, 220, 255, .45);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0f14;
  --bg-soft: #11151c;
  --bg-muted: #171c25;
  --bg-elev: #141922;
  --text: #e7eaf0;
  --text-2: #b6bdc9;
  --text-3: #8b93a2;
  --border: #222934;
  --border-strong: #303846;
  --link: #6db1ff;
  --link-hover: #a3cdff;
  --accent: #4d9bff;
  --accent-soft: #10223a;
  --ok: #4ade80;
  --warn: #f5b041;
  --warn-soft: #2a2110;
  --mark: #5c4b00;
  --code-bg: #171c25;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
  --d-line: #c9d0db;
  --d-soft: #7d8696;
  --d-p: #3a2224;
  --d-n: #1a2a44;
  --d-dep: #232934;
  --d-hole: #fb923c;
  --d-electron: #60a5fa;
  --d-metal: #6b7383;
  --d-housing: #d9d5c8;
  --d-phosphor: #d9bf4d;
  --d-die: #0b0e13;
  --d-pcb: #2a6b45;
  --d-sink: #5d6573;
  --d-lens: rgba(120, 160, 230, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.7 var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-h) + 18px); }
code, kbd, .mono { font-family: var(--font-mono); font-size: .9em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 0 .4em; border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 5px; background: var(--bg-soft); color: var(--text-3);
  font-size: 12px; line-height: 1.5; text-align: center;
}
mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: 0; transform: translateY(-120%); z-index: 100; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { transform: translateY(10px); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { max-width: 1480px; height: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; font-size: 17px; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand small { font-weight: 500; color: var(--text-3); font-size: 13px; margin-left: 2px; }
.search { position: relative; flex: 1 1 auto; max-width: 560px; }
.search-input {
  width: 100%; height: 38px; padding: 0 70px 0 38px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--bg-soft); color: var(--text); font: inherit; font-size: 14.5px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { outline: none; border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-icon { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search-hint { position: absolute; right: 10px; top: 9px; pointer-events: none; }
.search-panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 320px; max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: none;
}
.search.is-open .search-panel { display: block; }
.sr { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.sr:hover, .sr.is-active { background: var(--accent-soft); text-decoration: none; color: var(--text); }
.sr-title { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.sr-path { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.sr-snip { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }
.sr-empty, .sr-foot { padding: 12px; font-size: 13.5px; color: var(--text-3); }
.sr-foot { border-top: 1px solid var(--border); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.quick-nav { display: flex; gap: 2px; margin-left: auto; }
.quick-nav a { padding: 6px 10px; border-radius: 7px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.quick-nav a:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.quick-nav a[aria-current="page"] { color: var(--text); background: var(--bg-muted); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-muted); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
.menu-toggle { display: none; }

/* ---------- Layout ---------- */
.layout { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 26px 14px 48px 20px; border-right: 1px solid var(--border); font-size: 14px; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.side-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px 8px; }
.side-nav, .side-nav ol, .side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav > li { margin-bottom: 2px; }
.side-link { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text-2); font-weight: 550; }
.side-link:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { color: var(--text); background: var(--bg-muted); }
.side-link .num { font: 600 11px var(--font-mono); color: var(--text-3); width: 18px; }
.toc { margin: 4px 0 10px 16px; padding-left: 10px; border-left: 1px solid var(--border); }
.toc li { position: relative; }
.toc-row { display: flex; align-items: flex-start; }
.toc a { display: block; flex: 1; padding: 4px 8px; border-radius: 6px; color: var(--text-3); line-height: 1.4; font-size: 13.5px; }
.toc a:hover { color: var(--text); background: var(--bg-muted); text-decoration: none; }
.toc a.is-active { color: var(--accent); font-weight: 600; }
.toc li.is-active-parent > .toc-row > a { color: var(--text); }
.toc-exp { flex: none; width: 24px; height: 24px; margin-top: 2px; border: 0; border-radius: 5px; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.toc-exp:hover { background: var(--bg-muted); color: var(--text); }
.toc-exp svg { width: 12px; height: 12px; transition: transform .18s; }
.toc-exp[aria-expanded="true"] svg { transform: rotate(90deg); }
.toc-sub { margin-left: 10px; display: none; }
.toc-sub.is-open { display: block; }
.toc-sub a { font-size: 13px; }
.side-foot { margin: 22px 8px 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.nav-backdrop { display: none; }

.content { min-width: 0; padding: 30px 48px 96px; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--link); }
.article { max-width: 900px; }
.article::after { content: ""; display: table; clear: both; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.6rem); margin: 0 0 6px; font-weight: 750; letter-spacing: -.025em; }
.subtitle { color: var(--text-3); font-size: 15px; margin: 0 0 22px; }
h2 {
  font-size: 1.6rem; font-weight: 700; margin: 2.6em 0 .7em; padding-bottom: .35em; border-bottom: 1px solid var(--border);
  display: flow-root;
}
h3 { font-size: 1.22rem; font-weight: 650; margin: 2em 0 .5em; }
h4 { font-size: 1.02rem; font-weight: 650; margin: 1.6em 0 .4em; }
p { margin: 0 0 1.05em; }
.article > p, .article section > p, .article li { color: var(--text); }
.lead { font-size: 1.12rem; line-height: 1.7; color: var(--text-2); }
.lead strong { color: var(--text); }
ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
li { margin: .25em 0; }
.heading-anchor { margin-left: 8px; font-weight: 400; color: var(--text-3); opacity: 0; text-decoration: none; font-size: .8em; }
h2:hover .heading-anchor, h3:hover .heading-anchor, .heading-anchor:focus { opacity: 1; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
sup.ref a { font-size: 11px; padding: 0 1px; }

/* ---------- Infobox ---------- */
.infobox {
  float: right; clear: right; width: 316px; margin: 4px 0 26px 34px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); font-size: 13.5px; line-height: 1.5; overflow: hidden;
}
.infobox-title { margin: 0; padding: 12px 16px; font-size: 15px; font-weight: 700; text-align: center; background: var(--bg-muted); border-bottom: 1px solid var(--border); letter-spacing: 0; }
.infobox figure { margin: 0; padding: 12px 12px 6px; text-align: center; }
.infobox figure img { width: 100%; height: auto; max-height: 300px; object-fit: contain; border-radius: 8px; background: var(--bg-muted); display: block; }
.infobox figcaption { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th, .infobox td { padding: 7px 14px; vertical-align: top; text-align: left; border-top: 1px solid var(--border); }
.infobox th { width: 40%; color: var(--text-2); font-weight: 600; }
.infobox td { color: var(--text); }
.infobox .ib-section { background: var(--bg-muted); text-align: center; font-weight: 700; color: var(--text); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.infobox .ib-symbol-row { padding: 12px 14px 10px; text-align: center; }
.infobox .ib-symbol { display: block; margin: 0 auto; width: 100%; max-width: 240px; height: auto; color: var(--text); }
.ibs-lead, .ibs-body, .ibs-bar, .ibs-ph { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ibs-lead, .ibs-body { stroke-width: 2.4; }
.ibs-body { fill: var(--accent-soft); }
.ibs-bar { stroke-width: 3.6; }
.ibs-pin { fill: var(--bg-soft); stroke: currentColor; stroke-width: 2; }
.ibs-ph { stroke: var(--accent); stroke-width: 2.2; }
.ibs-ph-head { fill: var(--accent); }
.ibs-label { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.ib-symbol-caption { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }

/* ---------- Content blocks ---------- */
.definition {
  margin: 0 0 1.6em; padding: 16px 20px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft);
}
.definition p:last-child { margin-bottom: 0; }
.definition-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.callout { margin: 1.4em 0; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); font-size: 15px; }
.callout p:last-child { margin: 0; }
.callout--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.callout-title { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.formula { margin: 1.2em 0; padding: 14px 18px; border-radius: 10px; background: var(--code-bg); font-family: var(--font-mono); font-size: 15px; overflow-x: auto; white-space: nowrap; }
.formula small { display: block; font-family: var(--font-sans); color: var(--text-3); font-size: 13px; white-space: normal; margin-top: 4px; }
.keyfacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 1.4em 0 1.8em; padding: 0; list-style: none; }
.keyfacts li { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.keyfacts b { display: block; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; }
.keyfacts span { font-size: 13px; color: var(--text-3); }

/* figures */
figure.fig { margin: 1.6em 0; }
figure.fig img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-muted); }
figure.fig--right { float: right; clear: right; width: 300px; margin: .3em 0 1.2em 30px; }
figure.fig--left { float: left; clear: left; width: 260px; margin: .3em 30px 1.2em 0; }
figure.fig--portrait img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
figure.fig img.on-white { background: #fff; padding: 10px; }
.cct-rooms .frame { position: relative; }
.cct-rooms ol { position: absolute; inset: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; pointer-events: none; }
.cct-rooms li { justify-self: start; margin: 12px 0 0 12px; padding: 4px 10px 5px; border-radius: 8px; background: rgba(12, 14, 18, .62); color: #fff; font-size: 12.5px; line-height: 1.3; }
.cct-rooms li b { display: block; font-size: 16px; font-weight: 600; }
@media (max-width: 640px) { .cct-rooms li { margin: 6px 0 0 6px; padding: 2px 6px 3px; font-size: 10.5px; } .cct-rooms li b { font-size: 12.5px; } }
figcaption { font-size: 13px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
figcaption .credit { display: block; font-size: 11.5px; margin-top: 2px; }
figcaption .credit a { color: var(--text-3); text-decoration: underline; text-decoration-color: var(--border-strong); }
img.is-fallback { object-fit: contain !important; background: var(--bg-muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 1.6em 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); display: block; background: var(--bg-muted); }
.gallery img.on-white { object-fit: contain; background: #fff; }
.clear { clear: both; }

/* tables */
.table-wrap { margin: 1.4em 0 1.8em; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
table.data caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border); }
table.data th, table.data td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.data thead th { background: var(--bg-soft); font-size: 13px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom: 0; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--bg-muted) 60%, transparent); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody th { font-weight: 600; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; border: 1px solid rgba(0, 0, 0, .15); }
.sort-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sort-btn:focus-visible { outline: 2px solid var(--accent); border-radius: 3px; }
.sort-btn::after { content: "↕"; font-size: 11px; color: var(--text-3); }
th[aria-sort="ascending"] .sort-btn::after { content: "↑"; color: var(--accent); }
th[aria-sort="descending"] .sort-btn::after { content: "↓"; color: var(--accent); }
.table-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 1em 0 -0.6em; }
.table-count { font-size: 13px; color: var(--text-3); margin-left: auto; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--bg-muted); color: var(--text-2); white-space: nowrap; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--text-2); font-weight: 550; }
.input, .select {
  height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; font-weight: 400; min-width: 0;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--bg-muted); }
.btn[aria-pressed="true"], .btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .6; cursor: progress; }
a.btn:hover { color: var(--text); text-decoration: none; }
.btn--primary:hover, a.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); color: #fff; }
[data-theme="dark"] .btn[aria-pressed="true"], [data-theme="dark"] .btn--primary, [data-theme="dark"] a.btn--primary:hover { color: var(--bg); }
input[type="range"]:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-2);
  font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Diagrams ---------- */
.diagram { margin: 1.8em 0; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); clear: both; }
.diagram-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.diagram-canvas svg { display: block; width: 100%; height: auto; }
.diagram-controls { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; margin-top: 14px; }
.diagram-controls .field { min-width: 180px; }
.diagram-readout { margin-top: 12px; padding: 12px 14px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); min-height: 48px; }
.diagram-readout b { color: var(--text); }
.diagram figcaption { margin-top: 12px; }
.diagram text { font-family: var(--font-sans); fill: var(--text-2); }
.diagram .t-strong { fill: var(--text); font-weight: 700; }
.diagram .t-soft { fill: var(--text-3); }
.diagram .t-mono { font-family: var(--font-mono); }
.d-line { stroke: var(--d-line); fill: none; }
.d-soft { stroke: var(--d-soft); fill: none; }
.marker-pin { cursor: pointer; }
.marker-pin:focus { outline: none; }
.marker-pin:focus circle, .marker-pin:hover circle, .marker-pin.is-active circle { stroke: var(--accent); stroke-width: 3; }
.pkg { cursor: pointer; transition: opacity .2s; }
.pkg:hover .pkg-body, .pkg.is-active .pkg-body, .pkg:focus .pkg-body { stroke: var(--accent); stroke-width: 2.5; }
.pkg:focus { outline: none; }
/* P-N junction animation */
.pn .carrier { transition: opacity .3s; }
.pn .photon { opacity: 0; transition: opacity .3s; }
.pn.is-on .photon { animation: photon-out 1.6s ease-out infinite; animation-delay: var(--d, 0s); }
.pn.is-on .hole { animation: drift 2.4s linear infinite; animation-delay: var(--d, 0s); }
.pn.is-on .electron { animation: drift 2.4s linear infinite; animation-delay: var(--d, 0s); }
.pn .dep-zone { transition: transform .5s ease; transform-box: fill-box; transform-origin: center; }
.pn.is-on .dep-zone { transform: scaleX(.45); }
.pn .current { opacity: .15; transition: opacity .3s; }
.pn.is-on .current { opacity: 1; }
@keyframes drift { 0% { transform: translateX(0); opacity: 1; } 80% { transform: translateX(var(--dx)); opacity: 1; } 100% { transform: translateX(var(--dx)); opacity: 0; } }
@keyframes photon-out { 0% { opacity: 0; transform: translateY(18px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.xsec .heat { opacity: 0; transition: opacity .35s; }
.xsec.show-heat .heat { opacity: 1; }
.cri-swatches { display: grid; grid-template-columns: 92px repeat(9, minmax(0, 1fr)); gap: 6px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.cri-swatches .sw { height: 38px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); }
.cri-swatches .lbl { text-align: center; font-family: var(--font-mono); }
.cct-swatch { width: 100%; height: 56px; border-radius: 10px; border: 1px solid var(--border); margin-top: 10px; transition: background .2s; }

/* ---------- Timeline ---------- */
.year-rail { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 12px; margin: .6em 0 1em; scrollbar-width: thin; }
.year-rail button {
  flex: none; height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2);
  font: 600 12.5px var(--font-mono); cursor: pointer;
}
.year-rail button:hover { border-color: var(--accent); color: var(--accent); }
.year-rail button.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.year-rail button[hidden] { display: none; }
.timeline { list-style: none; margin: 1.2em 0 2em; padding: 0 0 0 26px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline > li { position: relative; margin: 0 0 14px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.timeline > li::before {
  content: ""; position: absolute; left: -25px; top: 20px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--era, var(--accent));
}
.timeline > li.is-highlight { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.timeline > li[hidden] { display: none; }
.tl-year { font: 700 13px var(--font-mono); color: var(--era, var(--accent)); }
.tl-title { display: block; font-weight: 700; font-size: 16px; margin: 2px 0 4px; color: var(--text); }
.tl-body { margin: 0; font-size: 14.5px; color: var(--text-2); }
.tl-more { font-size: 13.5px; font-weight: 600; }
.era-discovery { --era: #8b5cf6; }
.era-infrared { --era: #dc2626; }
.era-visible { --era: #ea580c; }
.era-blue { --era: #2563eb; }
.era-ssl { --era: #059669; }

/* ---------- Home ---------- */
.home-hero { padding: 6px 0 4px; }
.home-banner { margin: 0 0 20px; }
.home-banner img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: #111418; }
.home-banner figcaption { margin-top: 6px; }
@media (max-width: 640px) { .home-banner img { aspect-ratio: 5 / 2; } }
.home-hero h1 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3rem); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 1.4em 0 2em; clear: both; }
.card { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: var(--accent); text-decoration: none; color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-kicker { font: 700 11.5px var(--font-mono); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.card h3 { margin: 6px 0 6px; font-size: 1.08rem; }
.card p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.card ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--text-3); }
.card ul li { margin: 2px 0; }

/* ---------- Calculators ---------- */
.calc { margin: 1.6em 0 2.2em; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); overflow: hidden; clear: both; }
.calc-head { padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--bg); }
.calc-head h3 { margin: 0; font-size: 1.1rem; }
.calc-head p { margin: 4px 0 0; font-size: 14px; color: var(--text-3); }
.calc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.calc-inputs { padding: 20px; display: grid; gap: 14px; align-content: start; border-right: 1px solid var(--border); }
.calc-inputs .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets .chip { height: 28px; font-size: 12.5px; padding: 0 10px; }
.calc-out { padding: 20px; display: grid; gap: 14px; align-content: start; }
.result-big { font-size: 2.1rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.result-big small { font-size: 1rem; font-weight: 600; color: var(--text-3); }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-grid div { padding: 10px 12px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border); }
.result-grid b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.result-grid span { font-size: 12.5px; color: var(--text-3); }
.calc-note { font-size: 13px; color: var(--text-3); margin: 0; }
.calc-warn { font-size: 13.5px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border)); }
.calc-warn:empty { display: none; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 76px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 14px; background: var(--bg-muted); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--text-3); transition: width .35s ease; }
.bar-fill.is-led { background: var(--ok); }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--bg); }
.calc-actions .btn { height: 32px; padding: 0 12px; font-size: 13.5px; }
.calc-actions-status { font-size: 13px; font-weight: 600; color: var(--ok); }
.roi { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.roi-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.roi-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.45; }
.roi-table th, .roi-table td { padding: 6px 0; border-top: 1px solid var(--border); text-align: left; vertical-align: top; }
.roi-table tr:first-child th, .roi-table tr:first-child td { border-top: 0; }
.roi-table th { width: 40%; padding-right: 12px; font-weight: 600; color: var(--text-3); }
.roi-table td { color: var(--text); font-variant-numeric: tabular-nums; }
.btn.lead-open { height: auto; min-height: 40px; padding: 8px 14px; justify-content: center; text-align: center; line-height: 1.3; }
.roi-note { margin: 0; font-size: 12.5px; color: var(--text-3); }
.print-sheet { display: none; }

/* ---------- FAQ / refs / footer ---------- */
.faq details { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 10px; background: var(--bg); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 14px; color: var(--text-2); }
.faq details > div p:last-child { margin-bottom: 0; }
.refs { font-size: 14px; color: var(--text-2); }
.refs li { margin: .4em 0; }
.credits { font-size: 12.5px; color: var(--text-3); }
.credits li { margin: .2em 0; }
.see-also { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.see-also li { margin: 0; }
.see-also a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; font-size: 14px; }
.page-meta { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-inner { max-width: 1480px; margin: 0 auto; padding: 32px 20px 40px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; font-size: 14px; color: var(--text-3); }
.footer-inner h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; border: 0; margin: 0 0 10px; padding: 0; color: var(--text-2); }
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner a { color: var(--text-2); }
.footer-inner p { margin: 0 0 .6em; }

/* ---------- Answer-first summaries, glossary, pros/cons, sub-navigation ---------- */
.answer {
  margin: 0 0 1.1em; padding: 2px 0 2px 14px; border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  font-size: 1.03rem; line-height: 1.65; color: var(--text);
}
h3 + .answer { margin-top: .1em; }
.glossary { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); margin: 1.4em 0 1.8em; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; clear: both; }
.glossary dt, .glossary dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--border); }
.glossary dt:first-of-type, .glossary dt:first-of-type + dd { border-top: 0; }
.glossary dt { font-weight: 650; background: var(--bg-soft); color: var(--text); scroll-margin-top: calc(var(--header-h) + 16px); }
.glossary dd { font-size: 15px; color: var(--text-2); }
.glossary dd a { white-space: nowrap; }
.proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1em 0 1.6em; clear: both; }
.proscons > div { padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-soft); }
.proscons .pc-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.proscons .pros .pc-title { color: var(--ok); }
.proscons .cons .pc-title { color: var(--warn); }
.proscons ul { margin: 0; padding-left: 1.1em; font-size: 15px; }
.examples { font-size: 15px; color: var(--text-2); }
.examples strong { color: var(--text); }
.gallery figcaption { font-size: 12.5px; }
.gallery--photos img { aspect-ratio: 4 / 3; }
.side-sub { margin: 2px 0 6px 26px; padding-left: 8px; border-left: 1px dashed var(--border-strong); }
.side-sublink { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text-3); font-size: 13px; line-height: 1.4; }
.side-sublink:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.side-sublink[aria-current="page"] { color: var(--text); background: var(--bg-muted); font-weight: 600; }
.side-sub .toc { margin-left: 6px; }
.side-link[aria-current="true"] { color: var(--text); }
.quick-nav a[aria-current="true"] { color: var(--text); background: var(--bg-muted); }
.breadcrumb span[aria-current] { color: var(--text-2); }
.related-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 1.2em 0 1.8em; padding: 0; list-style: none; clear: both; }
.related-guides li { margin: 0; }
.related-guides a { display: block; height: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-weight: 600; font-size: 15px; }
.related-guides a span { display: block; margin-top: 2px; font-weight: 400; font-size: 13.5px; color: var(--text-3); }
.related-guides a:hover { border-color: var(--accent); text-decoration: none; }

/* P-N diagram extras */
.pn-pick { flex: 1 1 100%; }
.diagram-controls .pn-eg { flex: 1 1 260px; }
.pn-eg b { font-family: var(--font-mono); font-weight: 650; color: var(--text); }
.pn-eg small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.pn-compounds { margin: 0; }
.pn-extra { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; margin-top: 14px; }
.pn-band, .pn-color { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.pn-band svg { display: block; width: 100%; height: auto; }
.pn-color { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px 12px; text-align: center; font-size: 13px; color: var(--text-2); }
.pn-glow {
  width: 84px; height: 84px; border-radius: 50%; background: var(--photon, #3b82f6); opacity: .3;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--photon, #3b82f6) 22%, transparent), 0 0 38px 12px color-mix(in srgb, var(--photon, #3b82f6) 50%, transparent);
  transition: opacity .3s, background .3s, box-shadow .3s;
}
.pn-extra.is-on .pn-glow { opacity: 1; }
.pn-color-label b { display: block; font-size: 16px; color: var(--text); font-family: var(--font-mono); }
.pn-color-label small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.band-photon { opacity: 0; }
.pn-extra.is-on .band-e { animation: band-drop 1.8s ease-in infinite; }
.pn-extra.is-on .band-photon { animation: band-photon 1.8s ease-out infinite; }
@keyframes band-drop { 0%, 12% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(var(--gap)); opacity: 1; } 56%, 100% { transform: translateY(var(--gap)); opacity: 0; } }
@keyframes band-photon { 0%, 48% { opacity: 0; transform: translateX(0); } 58% { opacity: 1; } 100% { opacity: 0; transform: translateX(70px); } }

/* CCT diagram extras */
.diagram-subtitle { margin: 18px 0 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.spd-chart { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 6px 4px 0; }
.spd-chart svg { display: block; width: 100%; height: auto; }
.rooms { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.rooms-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-right: 2px; }
.room { padding: 2px 10px; border-radius: 99px; background: var(--bg-muted); border: 1px solid var(--border); font-size: 12.5px; color: var(--text); }

@media (max-width: 760px) {
  .glossary { grid-template-columns: 1fr; }
  .glossary dd { border-top: 0; padding-top: 0; }
  .glossary dt { background: none; }
  .proscons { grid-template-columns: 1fr; }
  .pn-extra { grid-template-columns: 1fr; }
  .answer { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pn-extra.is-on .band-photon { opacity: 1; }
}

/* ---------- Product cards, download call-to-action and forms ---------- */
.recs { clear: both; margin: 1.8em 0; padding: 16px 18px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-soft); }
.recs-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.recs-note { margin: 4px 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.recs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rec-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.rec-cat { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.rec-card .rec-name { margin: 0; font-size: 15px; line-height: 1.3; }
.rec-spec { align-self: flex-start; margin: 0; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--text); font-family: var(--font-mono); font-size: 12px; line-height: 1.6; }
.rec-desc { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.btn.rec-link { align-self: flex-start; margin-top: 4px; height: 32px; font-size: 13.5px; }

.cta-card {
  clear: both; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 28px; align-items: start; margin: 2.2em 0; padding: 20px 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 14px; background: var(--accent-soft);
}
.cta-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.cta-title { margin: 4px 0 6px; font-size: 1.15rem; font-weight: 750; line-height: 1.3; color: var(--text); }
.cta-text { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.cta-meta { font-size: 12.5px; color: var(--text-3); }
.subscribe-form { display: grid; gap: 8px; align-content: start; }
.subscribe-row { display: flex; gap: 8px; }
.subscribe-row .input { flex: 1; }
.form-fine { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.form-status { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.form-status:empty { display: none; }
.form-status.is-error { padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border)); color: var(--text); }
.form-ok { margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; line-height: 1.55; color: var(--text); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.privacy-form { max-width: 480px; margin: 1em 0 0; }

.slideover {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(440px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  border: 0; border-left: 1px solid var(--border); background: var(--bg); color: var(--text); box-shadow: var(--shadow); overflow: auto;
}
.slideover[open] { animation: slide-in .22s ease-out; }
.slideover::backdrop { background: rgba(10, 14, 20, .45); }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.slideover-panel { display: grid; gap: 14px; align-content: start; padding: 18px 20px 28px; }
.slideover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.slideover-title { margin: 0; font-size: 1.1rem; font-weight: 750; line-height: 1.3; }
.slideover-close { flex: none; width: 34px; height: 34px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.slideover-close:hover { background: var(--bg-muted); }
.slideover-intro { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.lead-form { display: grid; gap: 14px; }
.lead-form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.lead-form .btn--primary { justify-content: center; height: 40px; }
.form-done { display: grid; gap: 10px; outline: none; font-size: 14.5px; }
.form-done p { margin: 0; }
.form-done .btn { justify-self: start; }
.form-done-title { font-size: 1.05rem; font-weight: 750; color: var(--ok); }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .content { padding: 28px 34px 80px; }
  .quick-nav a { padding: 6px 7px; font-size: 13.5px; }
}
@media (max-width: 1160px) {
  .infobox { float: none; width: auto; max-width: 520px; margin: 0 0 26px; }
  figure.fig--right, figure.fig--left { width: 240px; }
}
@media (max-width: 1060px) {
  .quick-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 70; top: var(--header-h); left: 0; width: min(320px, 88vw); background: var(--bg); box-shadow: var(--shadow);
    transform: translateX(-104%); transition: transform .22s ease; border-right: 1px solid var(--border);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 65; background: rgba(10, 14, 20, .35); }
  .search { max-width: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { gap: 10px; padding: 0 12px; }
  .brand span.brand-text { display: none; }
  .search-hint { display: none; }
  .search-input { padding-right: 12px; }
  .search-panel { position: fixed; left: 10px; right: 10px; top: calc(var(--header-h) + 6px); min-width: 0; }
  .content { padding: 22px 18px 64px; }
  figure.fig--right, figure.fig--left { float: none; width: auto; margin: 1.4em 0; }
  figure.fig--portrait { max-width: 260px; }
  .calc-body { grid-template-columns: 1fr; }
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--border); }
  .cta-card { grid-template-columns: 1fr; padding: 18px; }
  .lead-form .row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cri-swatches { grid-template-columns: 64px repeat(9, minmax(0, 1fr)); gap: 3px; }
  .diagram { padding: 12px; }
  h2 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .pn.is-on .photon { opacity: 1; }
}
@media print {
  :root, [data-theme="dark"] {
    --bg: #fff; --bg-soft: #fff; --bg-muted: #f1f3f6; --bg-elev: #fff; --text: #111; --text-2: #333; --text-3: #555;
    --border: #ccd1d8; --border-strong: #aab2bd; --accent: #0a5fc2; --accent-soft: #eef4fd; --ok: #157f3b; --warn: #9a5b00; --warn-soft: #fff6e5;
    color-scheme: light;
  }
  .site-header, .sidebar, .site-footer, .diagram-controls, .search, .calc-actions, .cta-card, .recs, .slideover, .lead-open, .roi-note { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  a { color: inherit; }
  .calc, .print-sheet { break-inside: avoid; }
  body[data-print] .print-path > :not(.print-path):not(.print-target) { display: none !important; }
  body[data-print] .print-path { display: block !important; float: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; max-width: none !important; }
  body[data-print] .print-sheet { display: block; margin: 0 0 14px; }
  .print-brand { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
  .print-sheet pre { margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; font: 12px/1.55 var(--font-mono); }
  .print-url { margin: 6px 0 0; font-size: 11px; color: var(--text-3); word-break: break-all; }
}
