/* Shared light and dark palettes for the site and documentation. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg:        #ffffff;
  --bg-soft:   #f8f9fb;
  --bg-sunk:   #f1f3f6;
  --bg-code:   #f6f7f9;
  --fg:        #11151b;
  --fg-muted:  #5a6472;
  --fg-subtle: #626e7e;
  --line:      #e3e7ec;
  --line-soft: #eef1f4;
  --accent:      #b8410f;
  --accent-weak: #fdf1eb;
  --accent-line: #f0c6b1;
  --on-accent:   #ffffff;
  --ok:      #1a7f4b;
  --warn:    #9a6200;
  --shadow:  0 1px 2px rgb(16 22 30 / 4%), 0 8px 24px -12px rgb(16 22 30 / 12%);

  --shell:   82rem;
  --prose:   45rem;
  --radius:  10px;
  --radius-sm: 6px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0d1116;
    --bg-soft:   #12171e;
    --bg-sunk:   #161c24;
    --bg-code:   #12171e;
    --fg:        #e7ebf1;
    --fg-muted:  #9aa5b4;
    --fg-subtle: #9aa5b4;
    --line:      #232b35;
    --line-soft: #1b222b;
    --accent:      #ff8a4c;
    --accent-weak: #1f1712;
    --accent-line: #4a2f1e;
    --on-accent:   #17110c;
    --ok:      #4ac585;
    --warn:    #e0a92e;
    --shadow:  0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:        #0d1116;
  --bg-soft:   #12171e;
  --bg-sunk:   #161c24;
  --bg-code:   #12171e;
  --fg:        #e7ebf1;
  --fg-muted:  #9aa5b4;
  --fg-subtle: #9aa5b4;
  --line:      #232b35;
  --line-soft: #1b222b;
  --accent:      #ff8a4c;
  --accent-weak: #1f1712;
  --accent-line: #4a2f1e;
  --on-accent:   #17110c;
  --ok:      #4ac585;
  --warn:    #e0a92e;
  --shadow:  0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px -14px rgb(0 0 0 / 60%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.68;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: .75rem; top: .75rem; z-index: 100;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: .5rem .8rem;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav {
  max-width: var(--shell); margin: 0 auto;
  padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1.4rem;
}
.brand {
  font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em;
  color: var(--fg); display: inline-flex; align-items: baseline; gap: .4rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand .mark { font-size: 1rem; }
.site-nav .links { display: flex; gap: 1.2rem; font-size: .93rem; }
.site-nav .links a { color: var(--fg-muted); }
.site-nav .links a:hover, .site-nav .links a[aria-current="page"] { color: var(--fg); text-decoration: none; }
.site-nav .spacer { flex: 1; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-soft); color: var(--fg-muted);
  cursor: pointer; font-size: .95rem; line-height: 1;
}
.icon-btn:hover { color: var(--fg); border-color: var(--fg-subtle); }

@media (max-width: 46rem) {
  .site-nav { padding: .6rem 1rem; gap: .9rem; }
  .site-nav .links { gap: .9rem; font-size: .88rem; }
}

@media (max-width: 30rem) {
  .site-header { position: static; }
  .site-nav { flex-wrap: wrap; row-gap: .4rem; }
  .site-nav .links { order: 1; flex-basis: 100%; flex-wrap: wrap; }
}

/* ── Page shells ────────────────────────────────────────────────────────── */

main { display: block; }

.prose-shell { max-width: var(--shell); margin: 0 auto; padding: 0 1.5rem; }

/* The article comes first in the source, so a phone reader and a crawler meet
   the content before the navigation; the grid puts the sidebar back on the left. */
.docs-shell {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 1.5rem;
  display: grid; gap: 3rem;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-areas: "nav article";
  align-items: start;
}
.docs-shell.has-toc {
  grid-template-columns: 15rem minmax(0, 1fr) 13rem;
  grid-template-areas: "nav article toc";
}
.docs-shell > article { grid-area: article; }
.docs-shell > .docs-nav { grid-area: nav; }
.docs-shell > .toc { grid-area: toc; }
@media (max-width: 75rem) {
  .docs-shell.has-toc { grid-template-columns: 15rem minmax(0, 1fr); grid-template-areas: "nav toc" "nav article"; column-gap: 3rem; row-gap: 0; }
  .docs-shell.has-toc > .toc { position: static; margin-top: 2.5rem; max-height: none; }
}
@media (max-width: 62rem) {
  .docs-shell, .docs-shell.has-toc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "toc" "article" "nav"; gap: 0; }
}

.docs-nav {
  position: sticky; top: 4rem;
  padding: 2.5rem 0 3rem;
  font-size: .92rem;
  max-height: calc(100vh - 4rem); overflow-y: auto;
}
.docs-nav .group-title a { color: inherit; }
.docs-nav .group-title a:hover { color: var(--accent); }
.docs-nav .group-title {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-subtle); font-weight: 700; margin: 0 0 .7rem;
}
.docs-nav ol { list-style: none; margin: 0; padding: 0; }
.docs-nav li { margin: 0; }
.docs-nav a {
  display: flex; gap: .6rem; align-items: baseline;
  padding: .32rem .6rem; margin-left: -.6rem;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}
.docs-nav a:hover { background: var(--bg-sunk); color: var(--fg); text-decoration: none; }
.docs-nav a[aria-current="page"] {
  background: var(--accent-weak); color: var(--accent); font-weight: 600;
}
.docs-nav .num { color: var(--fg-subtle); font-variant-numeric: tabular-nums; font-size: .85em; }
.docs-nav a[aria-current="page"] .num { color: inherit; }

@media (max-width: 62rem) {
  .docs-nav {
    position: static; max-height: none; overflow: visible;
    padding: 1.5rem 0 2rem; border-top: 1px solid var(--line);
  }
  .docs-nav ol { display: flex; flex-wrap: wrap; gap: .3rem; padding-bottom: 1.2rem; }
  .docs-nav a { margin-left: 0; border: 1px solid var(--line); }
}

article { padding: 2.5rem 0 4rem; min-width: 0; }
article > * { max-width: var(--prose); }
article > .wide, article > figure,
article > .mermaid-figure, article > .table-wrap,
article > pre.mermaid { max-width: none; }

/* Without JavaScript a wide table would push the page sideways; the wrapper
   `hems.js` adds is the nicer version of the same thing. */
article > table { display: block; overflow-x: auto; max-width: 100%; }
.table-wrap > table { display: table; }

/* ── Prose ──────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.22; letter-spacing: -.018em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 1.9vw, 2.6rem); margin: 0 0 .5rem; }
h2 {
  font-size: 1.42rem; margin: 3rem 0 1rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}
h3 { font-size: 1.1rem; margin: 2rem 0 .6rem; scroll-margin-top: 4.5rem; }
h4 { font-size: .98rem; margin: 1.6rem 0 .4rem; color: var(--fg-muted); scroll-margin-top: 4.5rem; }
p, ul, ol { margin: 0 0 1.05rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
li > ul, li > ol { margin: .3rem 0; }
strong { font-weight: 650; }

.lead {
  font-size: 1.14rem; line-height: 1.6; color: var(--fg-muted);
  margin: 0 0 1.8rem; max-width: 40rem;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

blockquote {
  margin: 1.4rem 0; padding: .1rem 0 .1rem 1.1rem;
  border-left: 3px solid var(--accent-line); color: var(--fg-muted);
}
blockquote p:last-child { margin-bottom: 0; }

/* ── Code ───────────────────────────────────────────────────────────────── */

code {
  font-family: var(--font-mono); font-size: .875em;
  background: var(--bg-sunk); border-radius: 4px;
  padding: .12em .35em;
  overflow-wrap: break-word;
}
pre {
  font-family: var(--font-mono);
  background: var(--bg-code);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .855rem; line-height: 1.55;
  margin: 1.2rem 0;
  position: relative;
}
pre code { background: none; padding: 0; font-size: inherit; }
/* The syntax theme paints its own ground on `pre`; the page's is the one that
   should show, so that a code block sits in the same surface as everything
   around it. Loaded after the theme sheets, so a tie goes this way. */
pre.giallo, pre[class*="z-l-code"], pre[class*="z-d-code"] { background: var(--bg-code); }
.copy-btn {
  position: absolute; top: .45rem; right: .45rem;
  font: 600 .72rem/1 var(--font-sans);
  padding: .35rem .5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg);
  color: var(--fg-muted); cursor: pointer; opacity: 0;
  transition: opacity .12s ease;
}
pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--fg); }

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; margin: 1.3rem 0; max-width: none; }
table {
  border-collapse: collapse; width: 100%;
  font-size: .91rem; line-height: 1.5;
}
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { border-bottom: 1px solid var(--line); font-weight: 650; color: var(--fg); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 1px solid var(--line); }
td code, th code { white-space: nowrap; }

/* ── On this page ───────────────────────────────────────────────────────── */

.toc {
  position: sticky; top: 4rem;
  max-height: calc(100vh - 5rem); overflow-y: auto;
  padding: 2.5rem 0 2rem; font-size: .84rem;
}
.toc > strong {
  display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-subtle); margin-bottom: .6rem;
}
.toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc ul ul { border-left: 0; padding-left: .7rem; }
.toc li { margin: 0; }
.toc a { display: block; padding: .22rem 0 .22rem .8rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--fg-muted); line-height: 1.35; }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 75rem) {
  .toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); padding: .9rem 1.1rem; }
  .toc ul { border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; }
}

/* ── Docs chrome: groups, breadcrumbs, meta ─────────────────────────────── */

.docs-nav .nav-group {
  margin: 1.4rem 0 .35rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-subtle);
}
.crumbs { display: flex; gap: .45rem; align-items: center; font-size: .82rem; color: var(--fg-subtle); margin-bottom: .6rem; }
.crumbs a { color: var(--fg-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.meta { font-size: .82rem; color: var(--fg-subtle); margin: -.4rem 0 2rem; }
.meta a { color: var(--fg-muted); }

/* ── Landing ────────────────────────────────────────────────────────────── */

.faq { max-width: var(--prose); }
.faq details { border-bottom: 1px solid var(--line); padding: .2rem 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: .85rem 2rem .85rem 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .3rem; top: .75rem; color: var(--fg-subtle); font-size: 1.2rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1rem; color: var(--fg-muted); }

/* ── Callouts ───────────────────────────────────────────────────────────── */

.note, .caution {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: .9rem 1.1rem; margin: 1.4rem 0; font-size: .94rem;
}
.note > :last-child, .caution > :last-child { margin-bottom: 0; }
.note-title {
  display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 700; color: var(--accent); margin-bottom: .35rem;
}

/* ── Mermaid ────────────────────────────────────────────────────────────── */

.mermaid-figure { margin: 1.8rem 0; }
pre.mermaid {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1rem;
  overflow-x: auto; text-align: center; line-height: 1.4;
}
pre.mermaid:not([data-processed]) {
  text-align: left; white-space: pre; font: .875rem/1.5 var(--font-mono);
}
pre.mermaid svg { max-width: 100%; height: auto; }
.mermaid-figure figcaption {
  font-size: .85rem; color: var(--fg-subtle); text-align: center; margin-top: .6rem;
}

/* Landing and documentation index */
.hero {
  background: #171e21;
  color: #f5f6f3;
  border-bottom: .3rem solid #ff9558;
}
.hero-inner, .band-inner, .docs-index {
  width: min(100%, var(--shell));
  margin: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}
.hero-inner {
  padding-block: clamp(3rem, 7vw, 7rem);
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero-copy h1, .manual-intro h1 {
  font-size: clamp(2.7rem, 5.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  margin: 0;
}
.hero-copy h1 { max-width: 13ch; text-wrap: balance; }
.hero-copy em { font-style: normal; color: #ffab7d; }
.hero-copy p { color: #d0d7d6; max-width: 47ch; font-size: 1.125rem; margin: 1.35rem 0 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.btn { display: inline-block; padding: .65rem 1.05rem; font-weight: 650; border-radius: .45rem; border: 1px solid transparent; }
.btn:hover { text-decoration: none; }
.btn-primary { color: #25201d; background: #ffab7d; }
.btn-primary:hover { background: #ffc5a6; }
.btn-secondary { color: #f4f6f4; border-color: #737d7f; }
.btn-secondary:hover { border-color: #f4f6f4; }
.gateway-preview {
  margin: 0;
  padding: clamp(1rem, 3.6vw, 3rem);
  border: 1px solid #414d50;
  border-radius: 1rem;
  background-color: #273437;
  background-image: radial-gradient(#506366 1px, transparent 1px);
  background-size: 10px 10px;
}
.gateway-preview a, .gateway-preview img { display: block; width: 100%; }
.gateway-preview a {
  border: .45rem solid #14191a; border-radius: .75rem;
  box-shadow: 0 1rem 2rem #0a14175c;
}
.gateway-preview img { height: auto; border-radius: .3rem; }
.gateway-preview figcaption {
  margin: .9rem 0 0;
  color: #f0f5f4; font-size: .875rem; line-height: 1.5;
  background: #273437; width: fit-content; padding: .1rem .35rem;
}
.band { border-bottom: 1px solid var(--line); }
.band-inner { padding-block: clamp(2.75rem, 5vw, 5rem); }
.band h2, .guide-group h2 { margin: 0 0 1.4rem; padding: 0; border: 0; font-size: clamp(1.65rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.systems-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 3.5vw, 3.5rem); }
.systems-grid section { display: flex; flex-direction: column; border-top: 2px solid var(--line); padding-top: 1.25rem; }
.systems-grid h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; margin: 0; font-size: 1.4rem; }
.systems-grid small { font: 500 .875rem var(--font-mono); letter-spacing: .03em; color: var(--fg-muted); }
.systems-grid p { margin: .8rem 0 1.15rem; color: var(--fg-muted); }
.systems-grid a { margin-top: auto; align-self: start; font-weight: 600; }
.faq-band { background: var(--bg-soft); }
.faq-layout, .manual-intro { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.faq details:first-child { border-top: 1px solid var(--line); }
.docs-index { padding-block: clamp(2rem, 5vw, 4rem) 4rem; }
.manual-intro { align-items: end; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.manual-intro h1 { font-size: clamp(2.35rem, 4.4vw, 4rem); }
.manual-intro p { color: var(--fg-muted); font-size: 1.1rem; max-width: 54ch; margin: .85rem 0 0; }
.docs-index .search { margin: 0; }
.docs-index .search input { min-height: 3rem; font-size: 1rem; padding-inline: 1rem; }
.manual-start ul { list-style: none; padding: 0; margin: 1.6rem 0 2.4rem; display: flex; flex-wrap: wrap; gap: .55rem; }
.manual-start a { display: block; padding: .45rem .85rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: .4rem; }
.guide-group { border-top: 1px solid var(--line); padding: 1.75rem 0; display: grid; grid-template-columns: minmax(8rem, 1fr) 3fr; gap: 2rem; }
.guide-group h2 { font-size: 1.4rem; }
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem 2rem; list-style: none; margin: 0; padding: 0; }
.guide-list a { display: block; color: var(--fg); }
.guide-list a:hover { text-decoration: none; }
.guide-list a:hover strong { color: var(--accent); text-decoration: underline; }
.guide-list span { display: block; margin-top: .25rem; color: var(--fg-muted); line-height: 1.5; font-size: .95rem; }
.toc summary { cursor: pointer; font-weight: 650; }
@media (max-width: 52rem) {
  .hero-inner, .manual-intro { grid-template-columns: 1fr; gap: 1.8rem; }
  .gateway-preview { max-width: 38rem; }
  .hero-copy h1 { max-width: 18ch; }
  .systems-grid, .faq-layout { grid-template-columns: 1fr; }
  .guide-group { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 36rem) { .guide-list { grid-template-columns: 1fr; } }

/* ── Pager ──────────────────────────────────────────────────────────────── */

.pager {
  display: flex; gap: 1rem; justify-content: space-between;
  margin-top: 3.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-size: .93rem; max-width: var(--prose);
}
.pager span { flex: 1; }
.pager span:last-child { text-align: right; }
.pager .dir { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-subtle); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  color: var(--fg-muted); font-size: .9rem;
}
.footer-inner {
  max-width: var(--shell); margin: 0 auto; padding: 2.5rem 1.5rem 3rem;
  display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}
.site-footer h2 {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-subtle); margin: 0 0 .6rem; border: 0; padding: 0;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .25rem 0; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--accent); }
.footer-legal {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 1.5rem 2.5rem; font-size: .84rem; color: var(--fg-subtle);
}
.footer-legal p { max-width: 52rem; margin: 0; }

/* ── Anchors ────────────────────────────────────────────────────────────── */

.zola-anchor { color: inherit; text-decoration: none; }
.zola-anchor:hover, .zola-anchor:focus-visible {
  text-decoration: underline;
  text-underline-offset: .15em;
}

@media print {
  .site-header, .docs-nav, .toc, .pager, .copy-btn, .site-footer { display: none; }
  article { padding: 0; }
}

/* ── Search ─────────────────────────────────────────────────────────────── */

.search { position: relative; margin: 0 0 1.6rem; }
.search input {
  width: 100%; padding: .45rem .7rem;
  font: inherit; font-size: .9rem;
  color: var(--fg); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.search input::placeholder { color: var(--fg-subtle); }
.search input:focus { border-color: var(--accent); outline: none; }
.search-results {
  list-style: none; margin: .4rem 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); box-shadow: var(--shadow);
  max-height: 22rem; overflow-y: auto;
}
.search-results:empty { display: none; }
.search-results li { margin: 0; border-bottom: 1px solid var(--line-soft); }
.search-results li:last-child { border-bottom: 0; }
.search-results a { display: block; padding: .5rem .7rem; color: var(--fg); }
.search-results a:hover { background: var(--bg-sunk); text-decoration: none; }
.search-results strong { display: block; font-size: .88rem; font-weight: 620; }
.search-results span { display: block; font-size: .78rem; color: var(--fg-muted); }
.search-empty { padding: .5rem .7rem; font-size: .85rem; color: var(--fg-muted); }

/* The household page, as phones in a row (docs/household, landing). */
.screens{display:flex;flex-wrap:wrap;gap:20px;justify-content:center;margin:28px 0}
.screens img{width:min(240px,42vw);height:auto;border-radius:28px;box-shadow:0 18px 40px -22px rgba(10,20,30,.45),0 0 0 1px rgba(10,20,30,.08)}
.screens.wide img{width:min(420px,88vw);border-radius:14px}
.screens + p video, .walkthrough video{display:block;margin:0 auto;max-width:100%;border-radius:28px;box-shadow:0 18px 40px -22px rgba(10,20,30,.45)}

.home-simulators, .home-simulators article { scroll-margin-top: 7rem; }
.home-simulators article > header h2 {
  margin: 0 0 .5rem;
  padding: 0;
  border: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.home-simulators { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.home-simulators article {
  width: min(100%, var(--shell)); margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}
.home-simulators article + article { border-top: 1px solid var(--line); }
.home-simulators :is(.solar-panel, .peak-console) {
  background: var(--bg); box-shadow: var(--shadow); border-top: 3px solid var(--accent);
}
@media (min-width: 62rem) {
  .home-simulators article { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); column-gap: clamp(2rem, 5vw, 5rem); align-content: start; }
  .home-simulators article > header { grid-area: 1 / 1; }
  .home-simulators article > :is(.solar-panel, .peak-console, #peak-example, #solar-example) {
    grid-column: 2; grid-row: 1 / span 3; align-self: start; margin: 0;
  }
  .home-simulators article > :is(.solar-panel, .peak-console):not([hidden]) ~ details:not([hidden], .solar-assumptions) { grid-row: 4; }
  .home-simulators article > :is(.solar-assumptions, .peak-guide, a) { grid-column: 1; align-self: start; }
}

/* Experimental status line on the home page */
.status-note { display: inline-block; margin: 0 0 .75rem; padding: .15rem .6rem; border: 1px solid currentColor; border-radius: 999px; font-size: .8rem; opacity: .8; }
