/* localhoster — a customised copy of the stylesheet.org framework.
 *
 * Same structure and class contract as https://stylesheet.org/stylesheet.css
 * (reset / theme tokens / layout / elements / components), but reskinned into a
 * SILVER & BLACK "finished machine" theme: brushed-metal and dark-speckle
 * textures (embedded SVG), bevels + shadows for physical depth, a little chrome,
 * and LED / chrome-nub accents for selected things. Skeuomorphic but utilitarian.
 *
 * This is a *copy* on purpose — it diverges from the upstream framework. Where
 * stylesheet.org doesn't yet cover a component, sensible local standards are used.
 */

/* ============================================================
   1. RESET  (unchanged from the framework)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { max-width: 100%; height: auto; display: block; }

/* ============================================================
   2. THEME TOKENS  — the silver/black machine theme
   ============================================================ */
:root {
  /* colour — dark machine body, silver text, icy "powered" accent */
  --bg: #070809;               /* near-black body */
  --bg-2: #030404;             /* deepest black */
  --surface: #1a1d23;          /* dark brushed-metal panel */
  --surface-soft: #23262e;     /* nested panel */
  --section-bg: #15171c;       /* section plate */
  --fg: #f7f9fd;               /* main text — white */
  --heading: #ffffff;          /* polished highlight text */
  --muted: #c4cbd8;            /* secondary text — very light silver */
  --border: #3d424b;           /* machined edge */
  --border-strong: #555b66;
  --accent: #44c0ff;           /* bold glowing azure — links, focus, the lit menu */
  --accent-hover: #84d6ff;
  --accent-fg: #04121d;        /* dark text on a lit element */
  --accent-tint: rgba(68, 192, 255, 0.16);
  --accent-2: #5fe0c0;         /* secondary LED (teal) */
  --accent-2-tint: rgba(95, 224, 192, 0.16);
  --code-bg: #08090c;
  --code-fg: #cdd6e6;
  --ok-fg: #74e0a8; --ok-bg: rgba(36,120,82,0.18); --ok-bd: #2f6f50;
  --err-fg: #ff9b95; --err-bg: rgba(150,40,36,0.18); --err-bd: #7a3330;
  --info-fg: #9fc2ff; --info-bg: rgba(60,84,170,0.18); --info-bd: #3a4a86;
  --warn-fg: #f0c66b; --warn-bg: rgba(150,108,20,0.16); --warn-bd: #7a5d20;

  /* type */
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* space + shape */
  --space: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --maxw: 1040px;
  --gutter: max(28px, calc(50vw - var(--maxw) / 2));   /* centres content; lets bands go full-width */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 18px -6px rgba(0,0,0,0.7), 0 2px 6px -2px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 40px -16px rgba(0,0,0,0.8);

  /* --- textures (embedded SVG) --- */
  /* fine dark speckle for black areas */
  --tex-speckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.2'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  /* horizontal brushed-metal streaks (smooth in x, noisy in y) */
  --tex-brushed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.011 0.86' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.16'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");

  /* --- metal fills --- */
  --metal-dark: linear-gradient(180deg, #272c35 0%, #1b1f26 55%, #16191f 100%);
  --metal-soft: linear-gradient(180deg, #323845 0%, #262b34 100%);
  --panel: linear-gradient(180deg, #2e3440 0%, #232833 100%);   /* bolder panel face */
  --silver: linear-gradient(180deg, #e6e9ed 0%, #c6cace 46%, #aeb2b9 54%, #cdd1d6 100%);
  --silver-matte: linear-gradient(180deg, #aeb2b9 0%, #9a9ea6 52%, #8d9199 100%);  /* duller brushed steel — footer */
  --chrome: linear-gradient(180deg, #ffffff 0%, #d3d7dc 20%, #999ea7 49%, #7c828c 51%, #b8bdc4 80%, #f1f3f6 100%);

  /* --- background ladder: hero (darkest) < section < nested panel; level-1 panel is dark again --- */
  --hero-bg: linear-gradient(180deg, #050506 0%, #020203 100%);     /* almost black */
  --section-1: linear-gradient(180deg, #2d323c 0%, #242932 100%);   /* lighter speckled band */
  --section-2: linear-gradient(180deg, #31373f 0%, #282d36 100%);   /* alternate (a touch lighter) */
  --panel-dark: linear-gradient(180deg, #070809 0%, #040405 100%);  /* level-1 panels: almost black */
  --panel-light: linear-gradient(180deg, #2a303a 0%, #1f242d 100%); /* nested panels: lighter */

  /* --- bevels (layered shadows) --- */
  --bevel-up: inset 0 1px 0 rgba(255,255,255,0.07), inset 0 0 0 1px rgba(0,0,0,0.3), 0 6px 16px -8px rgba(0,0,0,0.8);
  --bevel-in: inset 0 2px 6px rgba(0,0,0,0.65), inset 0 -1px 0 rgba(255,255,255,0.04);
  --bevel-silver: inset 0 1px 0 rgba(255,255,255,0.85), inset 0 -2px 3px rgba(0,0,0,0.28), 0 2px 5px rgba(0,0,0,0.55);
  --led-glow: 0 0 6px var(--accent), 0 0 2px var(--accent);
}

/* ============================================================
   3. LAYOUT  (unchanged from the framework)
   ============================================================ */
.row, .column { display: flex; gap: var(--space); }
.row { flex-direction: row; }
.column { flex-direction: column; }
.row > *, .column > * { flex: 0 0 auto; min-width: 0; min-height: 0; }
.stretch { flex: 1 1 0; min-width: 0; min-height: 0; }
.stretch-2 { flex-grow: 2; }
.stretch-3 { flex-grow: 3; }
.grid { display: grid; gap: var(--space); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ============================================================
   4. ELEMENTS
   ============================================================ */
body {
  background:
    var(--tex-speckle),
    radial-gradient(120% 80% at 50% -10%, #15181e, transparent 60%),
    radial-gradient(100% 120% at 50% 120%, #04050700, var(--bg-2) 90%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}

/* typography */
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }
h5, h6 { font-size: 0.9rem; letter-spacing: 0; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { font-weight: 650; color: var(--heading); }
small { color: var(--muted); font-size: 0.875em; }
ul, ol { padding-left: 1.4em; }
li { margin: 5px 0; }
li::marker { color: var(--accent); }
hr { border: none; border-top: 1px solid var(--border); box-shadow: 0 1px 0 rgba(255,255,255,0.04); }
code { font-family: var(--mono); font-size: 0.88em; background: #0c0e12; border: 1px solid var(--border); padding: 0.1em 0.4em; border-radius: 6px; color: var(--code-fg); }
pre { background: var(--tex-speckle), var(--code-bg); color: var(--code-fg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; overflow-x: auto; box-shadow: var(--bevel-in); font-size: 0.85rem; line-height: 1.6; }
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
blockquote { padding: 10px 18px; border-left: 3px solid var(--accent); background: var(--accent-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--fg); }

/* header: a brushed-aluminium faceplate (dark text), sticky, with a chrome lip */
header {
  position: sticky; top: 0; z-index: 10;
  background: var(--tex-brushed), var(--silver);
  border-bottom: 1px solid #6a6f78;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 18px -4px rgba(0,0,0,0.7), 0 2px 0 #05060880;
}
header::after {                            /* thin chrome lip under the faceplate */
  content: ""; display: block; height: 3px;
  background: var(--chrome);
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
nav > a, nav > span { font-weight: 700; color: #1b1e23; letter-spacing: -0.01em; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
nav > a:hover { text-decoration: none; color: #000; }
nav > a { display: inline-flex; align-items: center; gap: 8px; }       /* brand: icon + name */
nav > a img { width: 22px; height: 22px; flex: 0 0 auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
nav > ul { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; padding: 0; list-style: none; }
nav > ul > li { margin: 0; }
nav ul a {
  display: block; padding: 7px 13px; border-radius: 7px; white-space: nowrap;
  color: #2b2f36; font-size: 0.95rem; font-weight: 600; text-decoration: none;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
  transition: background 0.15s, color 0.15s, box-shadow 0.2s, border-color 0.2s;
}
/* top-level bar links are blue backlit keys: a permanent (subtle) bevel, a thin
   dark outline, and an LED with equal padding either side. Hover glows a little;
   selected glows strongly. The size never changes. */
header > nav > ul > li > a {
  position: relative; padding: 6px 13px 6px 28px; color: #06131f; font-weight: 650;
  background: linear-gradient(180deg, #5cc8fb, #2ba1ea);
  border: 1px solid #166aa8; text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.35);
  filter: brightness(0.9);
  transition: filter 0.15s ease, box-shadow 0.2s ease;
}
header > nav > ul > li > a::before {
  content: ""; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eef9ff, #b6e2ff 72%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.28); transition: background 0.2s, box-shadow 0.2s;
}
header > nav > ul > li > a:hover {
  color: #06131f; text-decoration: none;   /* text doesn't change / underline on hover — just glow */
  filter: brightness(1.0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 1px 2px rgba(0,0,0,0.35), 0 0 11px rgba(68,192,255,0.7);
}
header > nav > ul > li > a[aria-current] {
  filter: brightness(1.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 0 8px rgba(255,255,255,0.3),
    0 0 20px rgba(68,192,255,0.95), 0 0 7px rgba(68,192,255,0.85);
}
header > nav > ul > li > a[aria-current]::before {
  background: radial-gradient(circle at 35% 30%, #ffffff, #d6f0ff 72%);
  box-shadow: 0 0 8px #b9e6ff, 0 0 2px #fff;
}
header > nav { padding: 14px 28px; }   /* uniform vertical padding == the gap between buttons */
/* the primary bar carries its own silver gradient so the metallic shine is
   contained to it — it doesn't stretch across into the sub-nav below */
header > nav:first-of-type { background: var(--tex-brushed), var(--silver); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55); }
header > nav:first-of-type > a { font-size: 1.12rem; }                  /* brand */
header > nav:first-of-type > ul { margin-left: auto; }                  /* brand left, links right */
/* secondary (stacked) nav bar: a slightly darker silver band with slightly smaller keys */
header > nav ~ nav { border-top: 1px solid rgba(0,0,0,0.22); background: linear-gradient(180deg, #a7adb4, #959aa1); padding-top: 11px; padding-bottom: 11px; }
header > nav ~ nav > ul { gap: 11px; }
header > nav ~ nav > ul > li > a { font-size: 0.86rem; padding: 5px 11px 5px 25px; }
header > nav ~ nav > ul > li > a::before { left: 10px; width: 5px; height: 5px; }
/* third-level (stacked) nav bar: darker still, smaller keys again */
header > nav ~ nav ~ nav { background: linear-gradient(180deg, #7b808a, #696e78); padding-top: 9px; padding-bottom: 9px; }
header > nav ~ nav ~ nav > ul { gap: 9px; }
header > nav ~ nav ~ nav > ul > li > a { font-size: 0.8rem; padding: 4px 10px 4px 22px; }
header > nav ~ nav ~ nav > ul > li > a::before { left: 9px; width: 4px; height: 4px; }

/* nav dropdowns (no JS) — dark machined cards */
nav li { position: relative; }
nav li > ul, nav details > ul {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 210px; margin: 0; padding: 6px; list-style: none;
  background: var(--tex-speckle), var(--metal-dark); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg), var(--bevel-up);
}
nav li > ul a, nav details > ul a { color: var(--fg); text-shadow: none; }
nav li > ul a:hover, nav details > ul a:hover { background: var(--surface-soft); color: var(--heading); box-shadow: none; }
nav summary { display: block; padding: 7px 13px; border-radius: 7px; cursor: pointer; color: #2b2f36; font-size: 0.95rem; font-weight: 600; list-style: none; text-shadow: 0 1px 0 rgba(255,255,255,0.45); }
nav summary::-webkit-details-marker { display: none; }
nav summary::after { content: "  ▾" / ""; color: #5a5f67; }
nav details[open] > summary::after { content: "  ▴" / ""; }
nav li:has(> ul) > a::after { content: "  ▾" / ""; color: #5a5f67; }
nav li > ul { visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s; }
nav li:hover > ul, nav li:focus-within > ul { visibility: visible; opacity: 1; transform: none; }

/* main: the hero band — the darkest surface. Everything directly in <main> (the
   h1, lead and any hero content, i.e. anything outside a <section>) sits on it. */
main {
  flex: 1 0 auto; width: 100%;
  padding: 44px var(--gutter) 0;
  display: flex; flex-direction: column; gap: 0;
  background: var(--tex-speckle), var(--hero-bg);   /* the hero band — full width, darkest */
}
/* hero items (directly in main, not in a section) sit in the centred column and
   are spaced; the first section gets a groove of breathing room below the hero */
main > :not(section) + :not(section) { margin-top: 16px; }
main > section:first-of-type { margin-top: 30px; }
main > h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.12;
  text-shadow: 0 1px 0 #000, 0 0 22px rgba(68,192,255,0.12); }
main > h1 + p { max-width: 72ch; font-size: 1.15rem; color: var(--muted); }
/* hero (content directly in <main>, not in a section): keep the code box narrow
   and centred, and centre the buttons under the centred title */
main > pre { width: max-content; max-width: 100%; margin-inline: auto; }
main > .buttons { justify-content: center; }
main > ul { padding-left: 1.3em; max-width: 70ch; }
main > ul > li { margin: 0 0 18px; }
main > ul > li:last-child { margin-bottom: 0; }
main > ul > li > strong { font-size: 1.05rem; }
main > ul > li > p { margin-top: 4px; color: var(--muted); }

/* sections: lighter brushed-metal plates than the hero, with a bevelled top edge;
   consecutive sections alternate between two close shades */
section { display: flex; flex-direction: column; gap: 16px; }
main > section {
  width: auto; margin-inline: calc(-1 * var(--gutter));   /* full-width band */
  padding: 30px var(--gutter);                            /* re-centre content to the column */
  background: var(--tex-speckle), var(--section-1);
  border: 0; border-top: 1px solid rgba(0,0,0,0.45); border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);       /* a machined seam at the top */
}
main > section:nth-of-type(even) { background: var(--tex-speckle), var(--section-2); }
main > section > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border-strong); box-shadow: 0 1px 0 rgba(255,255,255,0.05); }
section section { gap: 12px; }
section section section { gap: 9px; }

/* tables */
table { width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--code-bg); border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(0, 0, 0, 0.22); }
caption { text-align: left; padding: 8px 0; font-weight: 600; color: var(--muted); }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--code-bg); }
thead th { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--metal-soft); border-bottom: 2px solid var(--code-bg); }
tbody tr:last-child td { border-bottom: none; }

/* parameter tables: a parameter's allowed values sit in a nested sub-table that
   begins in the description column (an empty first cell indents it), recessed so it
   reads as sub-entries, not a peer table */
td.options { padding: 0; background: rgba(0, 0, 0, 0.25); }
.subtable { border: 0; border-radius: 0; background: transparent; font-size: 0.92em; }
.subtable th, .subtable td { padding: 6px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.subtable thead th { background: transparent; color: var(--muted); font-size: 0.66rem; }
.subtable tr:last-child td { border-bottom: none; }

/* forms: recessed inset wells with an icy focus glow */
form { display: grid; gap: 15px; }
fieldset { padding: 16px; display: grid; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
legend { font-weight: 600; padding: 0 6px; color: var(--heading); }
label > p { font-weight: 550; font-size: 0.9rem; margin-bottom: 6px; color: var(--heading); }
input, select, textarea {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--fg);
  background: #0c0e12; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--bevel-in); transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--bevel-in), 0 0 0 3px var(--accent-tint), 0 0 10px rgba(68,192,255,0.25); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 7px; accent-color: var(--accent); }

/* buttons: primary = a brushed-chrome key with a permanent outline. It never
   changes size — hover / focus / selected add an OUTER GLOW (box-shadow) and a
   ring, so nothing shifts. */
button, input[type="submit"], input[type="reset"], input[type="button"], a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: auto; padding: 9px 18px; font: inherit; font-weight: 650; line-height: 1.4;
  cursor: pointer; text-align: center; text-decoration: none;
  color: #1a1d22; background: var(--tex-brushed), var(--silver);
  border: 1px solid #6f747d; border-radius: var(--radius-sm);
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  box-shadow: var(--bevel-silver);
  transition: filter 0.15s ease, box-shadow 0.2s ease;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover, a.button:hover {
  color: #000; filter: brightness(1.05); text-decoration: none;
  box-shadow: var(--bevel-silver), 0 0 0 1px rgba(68,192,255,0.55), 0 0 16px rgba(68,192,255,0.42);
}
button:focus-visible, input[type="submit"]:focus-visible, input[type="button"]:focus-visible, a.button:focus-visible {
  outline: none;
  box-shadow: var(--bevel-silver), 0 0 0 2px rgba(68,192,255,0.7), 0 0 20px rgba(68,192,255,0.55);
}
button:active, input[type="submit"]:active, input[type="button"]:active, a.button:active {
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.4); filter: brightness(0.96);
}
/* a steadily-glowing selected state */
button.selected, a.button.selected, button[aria-pressed="true"] {
  box-shadow: var(--bevel-silver), 0 0 0 1px rgba(68,192,255,0.7), 0 0 18px rgba(68,192,255,0.5);
}
/* secondary = a dark machined key with a silver legend */
.button.secondary, input[type="reset"], button.secondary {
  color: var(--fg); background: var(--tex-brushed), var(--metal-soft);
  border-color: var(--border-strong); text-shadow: 0 1px 0 rgba(0,0,0,0.6);
  box-shadow: var(--bevel-up);
}
.button.secondary:hover, input[type="reset"]:hover, button.secondary:hover {
  color: var(--heading); filter: brightness(1.12);
  box-shadow: var(--bevel-up), 0 0 0 1px rgba(68,192,255,0.5), 0 0 16px rgba(68,192,255,0.36);
}
.button.secondary:focus-visible, button.secondary:focus-visible {
  outline: none; box-shadow: var(--bevel-up), 0 0 0 2px rgba(68,192,255,0.65), 0 0 18px rgba(68,192,255,0.45);
}
.button.ghost, button.ghost { color: var(--accent); background: transparent; border-color: transparent; text-shadow: none; box-shadow: none; }
.button.ghost:hover, button.ghost:hover { background: var(--accent-tint); color: var(--accent-hover); transform: none; }
.button.small, button.small { padding: 5px 12px; font-size: 0.9rem; }
.button.large, button.large { padding: 12px 24px; font-size: 1.05rem; }

/* menu: a sidebar nav on a dark plate */
menu { display: block; margin: 0; padding: 8px; background: var(--tex-speckle), var(--metal-dark); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--bevel-up); }
menu ol, menu ul { list-style: none; margin: 0; padding: 0; }
menu li { margin: 2px 0; }
menu p { margin: 12px 8px 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
menu a { display: block; padding: 7px 12px; color: var(--fg); border-radius: 7px; transition: background 0.15s; }
menu a:hover { background: var(--surface-soft); text-decoration: none; }
menu a[aria-current] { position: relative; background: #14161b; color: var(--accent); padding-left: 26px; box-shadow: var(--bevel-in); }
menu a[aria-current]::before { content: ""; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d8f1ff, var(--accent) 60%, #1e6fb0 100%); box-shadow: var(--led-glow); }

/* ============================================================
   5. COMPONENTS
   ============================================================ */
/* panel — a dark machined plate; card — a liftable unit */
/* panels alternate by nesting depth: level 1 very dark, nested lighter, repeat */
.panel, .card {
  display: flex; flex-direction: column; gap: 12px;   /* a stack: even spacing between immediate children, on any tag */
  background: var(--tex-speckle), var(--panel-dark);
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--bevel-up);
}
.panel .panel, .card .card, .panel .card, .card .panel {
  background: var(--tex-speckle), var(--panel-light); box-shadow: var(--bevel-in);
}
.panel .panel .panel, .card .card .card { background: var(--tex-speckle), var(--panel-dark); box-shadow: var(--bevel-up); }
.card { transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease; }
a.card { color: inherit; }
a.card:hover, .grid > a.card:hover { text-decoration: none; box-shadow: var(--bevel-up), 0 12px 24px -10px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-tint); border-color: var(--accent); transform: translateY(-2px); }
.card > h2, .card > h3 { color: var(--heading); }

/* card-link — a basic link sitting at the foot of a card; it stretches to make
   the whole card clickable, so the card behaves like a link without nesting <a>s.
   Other links inside the card sit above the stretch so they stay clickable. */
.card-link { display: inline-block; align-self: flex-start; margin-top: 6px; font-weight: 600; color: var(--accent); }
.card:has(> .card-link) { position: relative; display: flex; flex-direction: column; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:has(> .card-link):hover { box-shadow: var(--bevel-up), 0 12px 24px -10px rgba(0,0,0,0.8), 0 0 0 1px var(--accent-tint); border-color: var(--accent); transform: translateY(-2px); }
.card:has(> .card-link) a:not(.card-link) { position: relative; z-index: 1; }

/* chip — an inline machined pill; .accent lights up like an LED tag */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: 0.85rem; font-weight: 600; line-height: 1.5; color: var(--fg); background: var(--metal-soft); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); box-shadow: var(--bevel-up); }
button.chip, a.chip { cursor: pointer; text-decoration: none; transition: filter 0.15s, border-color 0.15s, color 0.15s; }
button.chip:hover, a.chip:hover { filter: brightness(1.12); border-color: var(--accent); color: var(--heading); text-decoration: none; }
.chip.accent { color: var(--accent); border-color: rgba(68,192,255,0.4); box-shadow: var(--bevel-up), inset 0 0 10px rgba(68,192,255,0.12); }
.chip.accent::before, .chip.teal::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.chip.accent::before { background: radial-gradient(circle at 35% 30%, #d8f1ff, var(--accent) 60%, #1e6fb0 100%); box-shadow: var(--led-glow); }
.chip.teal { color: var(--accent-2); border-color: rgba(95,224,192,0.4); box-shadow: var(--bevel-up), inset 0 0 10px rgba(95,224,192,0.12); }
.chip.teal::before { background: radial-gradient(circle at 35% 30%, #d6fff5, var(--accent-2) 60%, #1f8f78 100%); box-shadow: 0 0 6px var(--accent-2), 0 0 2px var(--accent-2); }

/* buttons — a group of actions */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* status — a lit indicator banner with an LED */
.status { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 500; background: var(--metal-soft); box-shadow: var(--bevel-up); }
.status::before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor, 0 0 2px currentColor; }
.status.success { color: var(--ok-fg); border-color: var(--ok-bd); background: var(--ok-bg); }
.status.error   { color: var(--err-fg); border-color: var(--err-bd); background: var(--err-bg); }
.status.info    { color: var(--info-fg); border-color: var(--info-bd); background: var(--info-bg); }
.status.warning { color: var(--warn-fg); border-color: var(--warn-bd); background: var(--warn-bg); }

/* paging — a Pagination nav */
.paging { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.paging a, .paging span { display: inline-block; padding: 7px 13px; border-radius: 7px; color: var(--fg); text-decoration: none; }
.paging a:hover { background: var(--surface); box-shadow: var(--bevel-up); text-decoration: none; }
.paging a[aria-current] { background: var(--tex-brushed), var(--silver); color: #1a1d22; box-shadow: var(--bevel-silver); }
.paging span { color: var(--muted); }

/* footer — a brushed-steel base plate, duller / less bright than the header faceplate */
footer { flex-shrink: 0; border-top: 1px solid #6c7079; color: #23262c;
  background: var(--tex-brushed), var(--silver-matte);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); }
footer > .row { padding: 22px 28px; align-items: center; flex-wrap: wrap; }   /* full-width like the header: flush left & right */
footer small { color: #4a4f57; }
footer a { color: #2b2f36; text-decoration: underline; }
footer a:hover { color: #000; }
