/* WEVA-W-235: the colours below are W-221's brand tokens. _layout.html links
 * brand/tokens.css before this file; the sign-in and OAuth pages link only
 * this file, so it brings the brand tokens itself (the same URL, so a page
 * that already loaded it fetches nothing twice). */
@import url("/static/brand/tokens.css");

/* Inter, served from Weva's own origin (Mat reported 10-15s page loads,
 * 2026-09-13). Google Fonts costs a DNS lookup, a TLS handshake and a
 * render-blocking stylesheet on fonts.googleapis.com, then a second origin
 * for the woff2 - four round trips to a third party before any text is
 * painted, and on a slow or filtered network that is where the seconds go.
 *
 * Self-hosting is also why the CSP no longer needs to allow those two
 * hosts at all. Inter is SIL OFL, so redistributing it is exactly what the
 * licence is for.
 *
 * Variable font, weights 400-600 in one file per subset.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Weva - Stage A.
 *
 * Component structure borrowed from Skills/interactive-dashboard-builder
 * (container, header, section headings, card grid, chips, info banner,
 * footer); every token replaced with Weva's own, per
 * ../../docs/web-platform/web_platform_plan.md. Nothing here invents a colour: if a value
 * is not in docs/brand/brand_profile.md, it is a bug.
 */

/* Dark is the default (Mat, 2026-09-13); light is behind [data-theme="light"].
 *
 * WEVA-W-235 criterion 8: every colour below is a reference to W-221's
 * generated brand tokens (app/static/brand/tokens.css, written by
 * scripts/make_brand_assets.py from docs/brand/brand_profile.md); this file
 * types no colour value of its own. A colour the brand list does not name is
 * mixed from colours it does, the way app/static/tokens.css does it. The
 * brand file switches its values under :root[data-theme="light"], so one
 * block serves both modes; the light block only switches the colour scheme.
 *
 * Inside the member shell (`html.shell-v2`) tokens.css's legacy aliases win
 * over these names; this block is what every other page uses. */
:root {
  --bg:           var(--brand-ground);
  --surface:      var(--brand-surface);
  --surface-2:    color-mix(in srgb, var(--brand-surface), var(--brand-accent) 8%);  /* chips, hover, table heads */
  --border:       var(--brand-border);
  --text:         var(--brand-text);
  --text2:        var(--brand-text-2);
  --primary:      var(--brand-text);       /* headings: the brand's text colour does body text and headings */
  --focus:        var(--brand-lavender);   /* focus outlines: Lavender's own role */
  --accent:       var(--brand-accent-fill);  /* one per view, and only ever under a label: the label sits on accent-fill, never on Purple */
  --on-accent:    var(--brand-on-accent);
  --ok:           var(--brand-ok-text);
  --err:          var(--brand-error-text);
  --btn-bg:       color-mix(in srgb, var(--brand-surface), var(--brand-accent) 18%);  /* not the accent: that is spent on the principle pill */
  --btn-bg-hover: color-mix(in srgb, var(--brand-surface), var(--brand-accent) 28%);
  --btn-fg:       var(--brand-text);
  --field-bg:     var(--brand-ground-2);   /* inset fields and code, one step off the ground */

  --radius:  14px;
  --radius-s: 10px;
  --maxw:  1040px;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "JetBrains Mono", monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- container --- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ------------------------------------------------------------- header --- */
.site-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 28px 0;
}

.site-header img { width: 44px; height: 44px; display: block; }

.site-header .name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--primary);
}

/* --------------------------------------------------------------- hero --- */
.hero { padding-block: 64px 40px; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--primary);
  max-width: 16ch;
}

.hero .lead {
  margin: 0;
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--text);
  max-width: 62ch;
}

.hero .principle {
  display: inline-block;
  margin-top: 26px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--accent);          /* the one accent on this page */
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
}

/* ----------------------------------------------------------- sections --- */
/* WEVA-W-236 criterion 6: the public pages' section rhythm. Not on member pages
   (`<html class="shell-v2">`), whose spacing comes from tokens.css only; `:where()`
   keeps the selector's weight what it was, so every rule that overrides it still does. */
:where(:root:not(.shell-v2)) section { padding-block: 40px; }

section > h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--primary);
}

section > .sub {
  margin: 0 0 26px;
  color: var(--text2);
  font-size: 15px;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------------------------------------------------------- card grid --- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
}

.card p { margin: 0; color: var(--text); font-size: 15px; }

/* --------------------------------------------------------------- chip --- */
.chip {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------- list --- */
.plain-list { margin: 0; padding: 0; list-style: none; }

.plain-list li {
  padding: 13px 0 13px 22px;
  border-bottom: 1px solid var(--border);
  position: relative;
  color: var(--text);
}

.plain-list li:last-child { border-bottom: 0; }

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 10px;
  height: 1px;
  background: var(--text2);
}

/* ------------------------------------------------------------- banner --- */
.banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-s);
  padding: 16px 18px;
  color: var(--text);
  font-size: 15px;
}

/* --------------------------------------------------------------- form --- */
.interest {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.interest form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 14px;
}

.interest input[type="email"],
.interest input[type="text"] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--field-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.interest input:focus-visible,
.interest button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.interest button {
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.interest button:hover { background: var(--btn-bg-hover); }

.interest .note { margin: 0; color: var(--text2); font-size: 13px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#form-status { margin: 12px 0 0; font-size: 14px; min-height: 20px; }
#form-status.ok { color: var(--ok); }
#form-status.err { color: var(--err); }

/* ------------------------------------------------------------- footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 30px;
  padding-block: 26px 40px;
  color: var(--text2);
  font-size: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding-block: 44px 28px; }
}

@media (prefers-reduced-motion: no-preference) {
  .card, .interest button { transition: background-color 120ms ease; }
}

/* --------------------------------------------------------- theme switch --- */
/* Two logos ship; CSS picks the one that reads on the current ground, so
   there is no flash of the wrong mark and no JS involved in the swap. */
.site-header img.for-light { display: none; }
:root[data-theme="light"] .site-header img.for-light { display: block; }
:root[data-theme="light"] .site-header img.for-dark  { display: none; }

.theme-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.theme-switch button {
  border: 0;
  border-radius: 999px;
  padding: 5px 13px;
  background: transparent;
  color: var(--text2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
}

.theme-switch button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
}

.theme-switch button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------------------------------------------------------- the diagram --- */
.diagram {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.diagram img {
  width: 100%;
  height: auto;
  max-width: 900px;
  display: block;
  margin: 0 auto;
}

.diagram figcaption {
  margin-top: 14px;
  color: var(--text2);
  font-size: 13px;
}

/* The diagram is drawn in the light-mode brand colours
   (scripts/make_architecture_diagram.py) and needs a light ground. In dark
   mode it sits on its own light card rather than being recoloured: there
   the brand's text colour, Lilac White, is the light one. */
:root:not([data-theme="light"]) .diagram img {
  background: var(--brand-text);
  border-radius: var(--radius-s);
  padding: 14px;
}

/* ------------------------------------------------------------ the deck --- */
.deck {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  flex-wrap: wrap;
}

.deck .deck-copy { flex: 1 1 320px; }
.deck .deck-copy h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--primary); }
.deck .deck-copy p  { margin: 0; color: var(--text2); font-size: 14px; }

/* Deliberately NOT the accent: it is spent on the principle pill, and
   the brand allows one per view. This is a button either way. */
.deck a.download {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-s);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.deck a.download:hover { background: var(--btn-bg-hover); }
.deck a.download:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 860px) {
  .theme-switch { margin-left: auto; }
  .deck a.download { width: 100%; text-align: center; }
}

/* -------------------------------------------------------------- the guide --- */
.site-header a.home { display: block; line-height: 0; }
.site-header a.home:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.prose { margin: 0; max-width: 68ch; color: var(--text); font-size: 16px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }

.step {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child { border-bottom: 0; }

.step-n {
  flex: 0 0 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body { flex: 1 1 auto; min-width: 0; }
.step-body h3 { margin: 3px 0 8px; font-size: 17px; font-weight: 600; color: var(--primary); }
.step-body p { margin: 0; color: var(--text); font-size: 15px; max-width: 66ch; }
.step-body .note { margin-top: 10px; color: var(--text2); font-size: 14px; }

pre.cmd {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--field-bg);
  overflow-x: auto;
}

pre.cmd code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  white-space: pre;
}

.site-footer a { color: inherit; }

@media (max-width: 640px) {
  .step { gap: 12px; }
  .step-n { flex-basis: 26px; height: 26px; font-size: 13px; }
}

/* ====================================================================== */
/* Navigation - see ../../docs/web-platform/uiux_navigation_guide.md.       */
/* Sticky, because the way out should never scroll away; destinations      */
/* only, because the one accent per view is spent inside the page.         */
/* ====================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-s) 0;
}

.skip-link:focus {
  left: 0;
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  /* display:block explicitly: an earlier rule in this file made the header a
     flex container, which turned .header-inner into a shrink-to-fit flex item
     and centred the whole bar instead of aligning it to the content column. */
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding-block: 0;
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header a.home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 0;
}

.site-header a.home:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.site-header img { width: 34px; height: 34px; display: block; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--text); }
.site-nav a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* You are here. Not optional - see the navigation guide. */
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.menu-toggle { display: none; }

/* ------------------------------------------------------ grouped nav --- */
/* WEVA-W-022. A handful of top-level groups, each opening a panel of its
   destinations - see ../../docs/web-platform/uiux_navigation_guide.md's grouped-nav
   section for why this reads as one panel per trigger rather than one
   full-width bar. `aria-expanded` on the trigger is the only thing that
   decides whether the panel shows - see the script in _layout.html - so a
   closed panel is `display:none`, not just invisible, and never sits in
   the Tab order. */
.nav-item { position: relative; }

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding-block: 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text2);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.nav-trigger:hover { color: var(--text); }
.nav-trigger:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.nav-trigger[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--primary);
}

.nav-caret { width: 10px; height: 7px; flex: 0 0 auto; }

@media (prefers-reduced-motion: no-preference) {
  .nav-caret { transition: transform 140ms ease; }
}

.nav-trigger[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* Padding, not a margin, on the wrapper: the gap between trigger and
     card is inside the hoverable/clickable box, so crossing it does not
     count as leaving the item. */
  padding-top: 10px;
  z-index: 60;
}

.nav-trigger[aria-expanded="true"] + .nav-panel { display: block; }

.nav-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 280px;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}

.nav-panel-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-s);
  color: inherit;
  text-decoration: none;
}

.nav-panel-link:hover { background: var(--surface-2); }
.nav-panel-link:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.nav-panel-link[aria-current="page"] { background: var(--surface-2); }
.nav-panel-link[aria-current="page"] .nav-panel-label { color: var(--primary); }

.nav-panel-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  color: var(--text2);
}

.nav-panel-icon svg { width: 17px; height: 17px; }

.nav-panel-copy { min-width: 0; }

.nav-panel-label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.nav-panel-blurb {
  display: block;
  margin-top: 2px;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
}

/* ----------------------------------------------------------- page head --- */
.page-head { padding-block: 56px 12px; }

.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--primary);
  max-width: 20ch;
}

.page-head .lead { margin: 0; font-size: 18px; color: var(--text); max-width: 62ch; }

/* --------------------------------------------------------- index cards --- */
.index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding-block: 8px 20px;
}

a.index-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
}

a.index-card:hover { border-color: var(--text2); }
a.index-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

a.index-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
}

a.index-card p { margin: 0; color: var(--text); font-size: 15px; }

a.index-card .meta {
  display: block;
  margin-top: 12px;
  color: var(--text2);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------- footer ---- */
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--text2); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 760px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    background: var(--surface);
    cursor: pointer;
    position: relative;
  }

  .menu-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

  /* Three lines, drawn rather than typed: an emoji or a glyph would be at
     the mercy of whichever font the device substitutes. */
  .menu-toggle .bars,
  .menu-toggle .bars::before,
  .menu-toggle .bars::after {
    position: absolute;
    left: 11px;
    width: 16px;
    height: 1.5px;
    background: var(--text);
    content: "";
  }

  .menu-toggle .bars { top: 19px; }
  .menu-toggle .bars::before { top: -5px; left: 0; }
  .menu-toggle .bars::after { top: 5px; left: 0; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    /* WEVA-152: the slide-out is absolutely positioned against the sticky
       header rather than flowing with the page, so it never scrolled with
       it - once a group's accordion pushed content past the viewport there
       was no way back to it. 66px is the header's own rendered height at
       this width (`.header-inner`'s padding plus the 40px menu button);
       this keeps the whole slide-out within the viewport and scrollable
       inside itself instead. */
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }

  body.menu-open .site-nav { display: flex; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav a { display: block; padding: 14px 0; font-size: 16px; border-bottom: 0; }
  .site-nav a[aria-current="page"] { color: var(--text); }

  /* The grouped triggers become an accordion: tapping one expands its
     children inline, in the same slide-out - never a second-level flyout,
     which does not work touch-only. */
  .nav-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 0;
    font-size: 16px;
  }

  .nav-trigger[aria-current="true"] { border-bottom: 0; }

  .nav-panel { position: static; padding-top: 0; }

  .nav-panel-inner {
    min-width: 0;
    max-width: none;
    background: none;
    border: 0;
    border-radius: 0;
    padding: 0 0 10px 4px;
    gap: 6px;
    /* WEVA-152: the largest group (Docs, 5 children) grows past what fits
       comfortably above the theme switch on a phone-height viewport, even
       once `.site-nav` itself scrolls - capping the accordion's own content
       area keeps everything below one open group (the rest of the list,
       the theme switch) close by, with the group's own list reachable by
       scrolling inside itself. Product's 3 children (~314px) already fit
       under this cap and never scroll. */
    max-height: 340px;
    overflow-y: auto;
  }

  .nav-panel-link { padding: 8px 4px; }
  .nav-panel-icon { width: 26px; height: 26px; }
  .nav-panel-icon svg { width: 15px; height: 15px; }

  /* A preference, not navigation: below the divider, out of the header. */
  .site-nav .theme-switch { margin: 16px 0 0; align-self: flex-start; }

  .index-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------- small page pieces --- */
.eyebrow { margin: 0 0 10px; font-size: 14px; }
.eyebrow a { color: var(--text2); text-decoration: none; }
.eyebrow a:hover { color: var(--text); }
.eyebrow a::before { content: "\2190"; margin-right: 7px; }

a.text-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

a.text-link:hover { color: var(--text); }
a.text-link::after { content: "\2192"; margin-left: 7px; }

.after-grid { margin: 22px 0 0; }

/* ------------------------------------------------------- admin table ---
   WEVA-W-034: the registry viewer (/admin) is the first page to render
   raw rows rather than cards, so it is also the first to need a table of
   its own - the same tokens the rest of /app/* already uses (.card's own
   surface/border/radius), not a second visual language. */
#table-select,
#table-search {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--field-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

#admin-grid {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

#admin-grid th,
#admin-grid td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  color: var(--text);
}

#admin-grid th {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text2);
  background: var(--surface-2);
}

#admin-grid tbody tr:last-child td { border-bottom: 0; }

/* ===================================================== shared helpers ==== */
/* Added for WEVA-W-010 (Vision & Mission, the roadmap and release notes);   */
/* those pages are gone (W-080, W-202, W-263) and what is left here is used */
/* elsewhere.                                                               */

.mono { font-family: var(--font-mono); }

/* ------------------------------------------------------- status chips --- */
/* The brand's status signals, status only, never decoration
   (../../docs/brand/brand_profile.md): the signal itself is the mark (the
   chip's outline), its `-text` variant carries the word, which is the pair
   the profile checks at 4.5:1 in both modes. No fill, so the word always
   reads against the ground or card it sits on. */
.status-chip {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.status-chip.ok      { border-color: var(--brand-ok);    color: var(--brand-ok-text); }     /* succeeded, healthy  */
.status-chip.caution { border-color: var(--brand-warn);  color: var(--brand-warn-text); }   /* pending, needs care */
.status-chip.alert   { border-color: var(--brand-error); color: var(--brand-error-text); }  /* failed, blocked     */
.status-chip.neutral { background: var(--surface-2); color: var(--text2); }

/* WEVA-226: inline-rendered markdown lands straight in p.note, not inside a
   .markdown-body wrapper - so the wrap rule above never reached the <code>
   spans a note can quote (e.g. a file path). Wrap-only, so short code spans
   keep the plain look; only a token that would otherwise overflow breaks.
   (The /roadmap rules beside it went with that page, WEVA-W-080; W-235.) */
.note code { overflow-wrap: anywhere; }

/* ==================================================================== */
/* Illustrated sections (WEVA-W-023), now the catalogue's (W-024).     */
/* Icons from app/illustration_icons.py: same 40x40 viewBox, indigo     */
/* line work + one mustard accent per icon, as Skills/weva-family-      */
/* update/scripts/icons.py - translated into this app rather than       */
/* imported from it (see that module's own docstring for why).          */
/* ==================================================================== */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 6px;
}

/* The h2 sits inside .section-head now, not as section's own direct child,
   so it needs its own copy of the rule above `section > h2` sets - same
   values, restated rather than relying on a selector this markup no longer
   matches. */
.section-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--primary);
}

.card-icon {
  flex: 0 0 auto;
  display: flex;
  line-height: 0;
}

.card-icon { width: 40px; height: 40px; margin-bottom: 4px; }
.card-icon svg { width: 100%; height: 100%; display: block; }

/* These icons are drawn with fixed hexes, not currentColor: dark line work
   needs a light ground. In dark mode the icon sits on its own small light
   chip instead of being recoloured, the same fix `.diagram img` uses above
   (the brand's text colour, Lilac White, is the light one there). */
:root:not([data-theme="light"]) .card-icon svg {
  background: var(--brand-text);
  border-radius: var(--radius-s);
  padding: 5px;
  box-sizing: border-box;
}

.illustrated-grid { margin-top: 22px; }

.card.illustrated { display: flex; flex-direction: column; }
.card.illustrated h3 { margin: 0 0 8px; }
.card.illustrated p { margin: 0; color: var(--text2); font-size: 14.5px; }

@media (max-width: 640px) {
  .section-head { gap: 10px; }
}

/* ------------------------------------------------------- /skills, ------- */
/* Category-grouped card grid, WEVA-W-024. Reuses .grid/.illustrated-grid   */
/* and .card.illustrated (above) rather than a second grid system - the    */
/* n8n reference page this order names is a layout pattern, and the        */
/* existing token-driven grid already is that pattern in Weva's own        */
/* palette (docs/web-platform/web_platform_plan.md's token mapping). No new colour */
/* or radius value is introduced here.                                     */
.skill-category .section-head { margin-bottom: 6px; }

.category-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  margin-left: 6px;
}

/* Reuses .index-card .version's own values (above) - a card here is an
   <article>, not an a.index-card, because no skill detail page exists yet
   to link it to (see this order's own Builder report). */
.card.illustrated .version {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  margin-left: 6px;
}

.thin-note { font-style: italic; }
