/* Generated by design-system/scripts/build-tokens.mjs. Do not edit. */
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-latin-ext.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-ext.woff2") format("woff2");
}

:root {
  --wg-paper: #f7f2e8;
  --wg-coral: #d56668;
  --wg-ink: #332021;
  --neutral-25: #fcfaf6;
  --neutral-50: #f7f2e8;
  --neutral-100: #ebe5db;
  --neutral-150: #e1dacf;
  --neutral-200: #d3cbc0;
  --neutral-300: #baafa5;
  --neutral-400: #9d8f86;
  --neutral-500: #84736c;
  --neutral-600: #6b5954;
  --neutral-700: #55423f;
  --neutral-800: #43302f;
  --neutral-900: #332021;
  --neutral-950: #1f0e0f;
  --coral-50: #fff0ef;
  --coral-100: #ffe0df;
  --coral-200: #ffc6c4;
  --coral-300: #fca1a0;
  --coral-400: #ed8080;
  --coral-500: #d56668;
  --coral-600: #ba4a4f;
  --coral-700: #99393d;
  --coral-800: #772a2e;
  --coral-900: #551f21;
  --coral-950: #351314;
  --sage-50: #f0f8f0;
  --sage-100: #dfefdf;
  --sage-200: #c4e1c4;
  --sage-300: #a0cba0;
  --sage-400: #7fb480;
  --sage-500: #659c67;
  --sage-600: #4c844e;
  --sage-700: #3a6b3d;
  --sage-800: #2c522d;
  --sage-900: #1f3a20;
  --sage-950: #132414;
  --ochre-50: #fdf3e9;
  --ochre-100: #f8e6d2;
  --ochre-200: #f2d1ac;
  --ochre-300: #e5b379;
  --ochre-400: #d4974a;
  --ochre-500: #bb7d27;
  --ochre-600: #a36400;
  --ochre-700: #855000;
  --ochre-800: #673c00;
  --ochre-900: #492b00;
  --ochre-950: #2d1b03;
  --brick-50: #fff0e8;
  --brick-100: #ffe0cf;
  --brick-200: #ffc5a6;
  --brick-300: #ff9f6f;
  --brick-400: #f97c3d;
  --brick-500: #e35d00;
  --brick-600: #c44500;
  --brick-700: #a53700;
  --brick-800: #802b00;
  --brick-900: #5b2100;
  --brick-950: #361404;
  --signal-50: #edf6ff;
  --signal-100: #d9ecff;
  --signal-200: #b9dbff;
  --signal-300: #8ec3f9;
  --signal-400: #68aaec;
  --signal-500: #4c90d4;
  --signal-600: #2f78bc;
  --signal-700: #20609b;
  --signal-800: #174a78;
  --signal-900: #123555;
  --signal-950: #0c2035;
  --app-background: var(--neutral-50);
  --background: #ffffff;
  --muted-background: var(--neutral-50);
  --foreground: var(--neutral-900);
  --muted-foreground: var(--neutral-600);
  --faint: var(--neutral-400);
  --primary: var(--neutral-900);
  --primary-hover: var(--neutral-700);
  --primary-active: var(--neutral-950);
  --on-primary: var(--neutral-50);
  --highlight: var(--coral-600);
  --highlight-hover: var(--coral-500);
  --highlight-active: var(--coral-700);
  --on-highlight: #ffffff;
  --highlight-subtle: var(--coral-50);
  --highlight-text: var(--coral-700);
  --success: var(--sage-600);
  --success-subtle: var(--sage-100);
  --success-text: var(--sage-900);
  --info: var(--ochre-500);
  --info-subtle: var(--ochre-100);
  --info-text: var(--ochre-900);
  --warning: var(--brick-600);
  --warning-subtle: var(--brick-100);
  --warning-text: var(--brick-700);
  --connector: var(--signal-600);
  --on-connector: #ffffff;
  --border: var(--neutral-100);
  --border-strong: var(--neutral-150);
  --border-focus: var(--coral-400);
  --ring: var(--coral-200);
  --hover: var(--neutral-100);
  --epaper-ink: #000000;
  --epaper-bed: #ffffff;
  --info-solid: var(--ochre-600);
  --on-info-solid: #ffffff;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --text-xs: 12px;
  --leading-xs: 16px;
  --tracking-xs: 0;
  --text-sm: 14px;
  --leading-sm: 20px;
  --tracking-sm: -0.28px;
  --text-base: 16px;
  --leading-base: 24px;
  --tracking-base: -0.32px;
  --text-lg: 18px;
  --leading-lg: 26px;
  --tracking-lg: -0.36px;
  --text-xl: 20px;
  --leading-xl: 28px;
  --tracking-xl: -0.4px;
  --text-2xl: 24px;
  --leading-2xl: 30px;
  --tracking-2xl: -0.96px;
  --text-3xl: 32px;
  --leading-3xl: 36px;
  --tracking-3xl: -1.28px;
  --text-4xl: 40px;
  --leading-4xl: 42px;
  --tracking-4xl: -2.4px;
  --text-5xl: 48px;
  --leading-5xl: 52px;
  --tracking-5xl: -2.88px;
  --text-6xl: 56px;
  --leading-6xl: 60px;
  --tracking-6xl: -3.36px;
  --text-7xl: 64px;
  --leading-7xl: 68px;
  --tracking-7xl: -3.84px;
  --text-8xl: 72px;
  --leading-8xl: 76px;
  --tracking-8xl: -4.32px;
  --text-9xl: 80px;
  --leading-9xl: 84px;
  --tracking-9xl: -4.8px;
  --mono-label: 10px;
  --mono-tag: 11px;
  --mono-value: 13px;
  --mono-display: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --spectra6-black: #000000;
  --spectra6-white: #ffffff;
  --spectra6-green: #608050;
  --spectra6-blue: #5080b8;
  --spectra6-red: #a02020;
  --spectra6-yellow: #f0e050;
  --mono1-black: #000000;
  --mono1-white: #ffffff;
  --mix-teal-a: var(--spectra6-green);
  --mix-teal-b: var(--spectra6-blue);
  --mix-cream-a: var(--spectra6-white);
  --mix-cream-b: var(--spectra6-yellow);
  --mix-brown-a: var(--spectra6-red);
  --mix-brown-b: var(--spectra6-green);
  --mix-plum-a: var(--spectra6-red);
  --mix-plum-b: var(--spectra6-blue);
  --radius: 0;
  --h-xs: 24px;
  --h-sm: 28px;
  --h-md: 40px;
  --h-lg: 44px;
  --h-xl: 48px;
  --shadow: 0 2px 6px rgba(51, 32, 33, .10);
  --shadow-md: 0 4px 12px rgba(51, 32, 33, .12);
  --duration-fast: 150ms;
  --duration: 200ms;
  --duration-slow: 300ms;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

@media (prefers-color-scheme: dark) {
  :root[data-surface="product"] {
    --app-background: #170a0b;
    --background: var(--neutral-950);
    --muted-background: var(--neutral-900);
    --foreground: var(--neutral-50);
    --muted-foreground: var(--neutral-300);
    --faint: var(--neutral-500);
    --primary: var(--neutral-50);
    --primary-hover: var(--neutral-150);
    --primary-active: #ffffff;
    --on-primary: var(--neutral-950);
    --highlight: var(--coral-600);
    --highlight-hover: var(--coral-500);
    --highlight-active: var(--coral-700);
    --on-highlight: #ffffff;
    --highlight-subtle: var(--coral-950);
    --highlight-text: var(--coral-300);
    --success: var(--sage-400);
    --success-subtle: var(--sage-950);
    --success-text: var(--sage-100);
    --info: var(--ochre-400);
    --info-subtle: var(--ochre-950);
    --info-text: var(--ochre-100);
    --warning: var(--brick-400);
    --warning-subtle: var(--brick-950);
    --warning-text: var(--brick-100);
    --connector: var(--signal-400);
    --on-connector: var(--neutral-950);
    --border: var(--neutral-800);
    --border-strong: var(--neutral-700);
    --border-focus: var(--coral-400);
    --ring: var(--coral-800);
    --hover: var(--neutral-800);
    --epaper-ink: #000000;
    --epaper-bed: #ffffff;
    --info-solid: var(--ochre-600);
    --on-info-solid: #ffffff;
  }
}

.theme-ink {
  --app-background: #170a0b;
  --background: var(--neutral-950);
  --muted-background: var(--neutral-900);
  --foreground: var(--neutral-50);
  --muted-foreground: var(--neutral-300);
  --faint: var(--neutral-500);
  --primary: var(--neutral-50);
  --primary-hover: var(--neutral-150);
  --primary-active: #ffffff;
  --on-primary: var(--neutral-950);
  --highlight: var(--coral-600);
  --highlight-hover: var(--coral-500);
  --highlight-active: var(--coral-700);
  --on-highlight: #ffffff;
  --highlight-subtle: var(--coral-950);
  --highlight-text: var(--coral-300);
  --success: var(--sage-400);
  --success-subtle: var(--sage-950);
  --success-text: var(--sage-100);
  --info: var(--ochre-400);
  --info-subtle: var(--ochre-950);
  --info-text: var(--ochre-100);
  --warning: var(--brick-400);
  --warning-subtle: var(--brick-950);
  --warning-text: var(--brick-100);
  --connector: var(--signal-400);
  --on-connector: var(--neutral-950);
  --border: var(--neutral-800);
  --border-strong: var(--neutral-700);
  --border-focus: var(--coral-400);
  --ring: var(--coral-800);
  --hover: var(--neutral-800);
  --epaper-ink: #000000;
  --epaper-bed: #ffffff;
  --info-solid: var(--ochre-600);
  --on-info-solid: #ffffff;
}

::selection { background: var(--coral-200); color: var(--foreground); }

/* Framework-neutral WigNet primitives. Layout remains owned by each surface. */
.wg-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.wg-brand img { display: block; width: 32px; height: 16px; }
.wg-brand--product {
  font-family: var(--font-mono);
  font-size: var(--mono-tag);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.wg-brand--product img { width: 28px; height: 14px; }

/* Control sizes. Every control (button, field, select, segmented) takes its
   height from one scale, so two controls of the same size line up in a row:
     sm 28  a quiet control in a dense row (a top bar, a section header)
     md 40  secondary: an action in a list row, a copy field, a choice
     lg 44  the default: a form's buttons and fields, tabs, menu items
     xl 48  a large call to action (the storefront)
   (xs 24 is for chips and a ×.) A size modifier only sets --control-h and
   the padding and text that go with it. */
/* Heights include the border on every surface, with or without a global
   box-sizing reset (the portal and editorial pages have their own). */
:where(.wg-button, .wg-field, .wg-segmented > button, .wg-daypick > button, .wg-tab, .wg-menu-item, .wg-chip, .wg-link) { box-sizing: border-box; }

/* Button = a size × a type, with optional shape and text modifiers:
   size   --sm --md (--lg) --xl
   type   (primary) --highlight --outline --secondary --ghost --warning --danger
   shape  --icon (square at its size) --block (full width)
   text   --mono (a mono micro-label: an action in a list row, so a list of
          them does not read as a form) */
.wg-button {
  --control-h: var(--h-lg);
  --icon-size: 16px;
  min-height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 1px solid var(--primary);
  border-radius: 0;
  background: var(--primary);
  color: var(--on-primary);
  font: 550 14px/20px var(--font-sans);
  letter-spacing: -.28px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);
}
.wg-button svg { display: block; flex: none; }
.wg-button:disabled, .wg-button[aria-disabled="true"] { opacity: .5; cursor: default; pointer-events: none; }

/* Sizes. */
.wg-button--sm { --control-h: var(--h-sm); --icon-size: 12px; height: var(--control-h); padding: 0 10px; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: -.12px; }
.wg-button--md { --control-h: var(--h-md); --icon-size: 14px; padding: 0 14px; font-size: 12px; }
.wg-button--lg { --control-h: var(--h-lg); }
.wg-button--xl { --control-h: var(--h-xl); padding: 0 24px; }

/* Types. Primary (ink) is the normal action; highlight (coral) the one key
   action on a screen; danger confirms what cannot be undone. */
.wg-button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.wg-button:active { background: var(--primary-active); border-color: var(--primary-active); }
.wg-button--highlight { background: var(--highlight); border-color: var(--highlight); color: var(--on-highlight); }
.wg-button--highlight:hover { background: var(--highlight-hover); border-color: var(--highlight-hover); }
.wg-button--highlight:active { background: var(--highlight-active); border-color: var(--highlight-active); }
.wg-button--outline { background: transparent; border-color: var(--border-strong); color: var(--foreground); }
.wg-button--outline:hover { background: var(--hover); border-color: var(--foreground); }
/* Secondary: an outline with the lighter hairline, for controls among
   secondary fields or repeated in a dense panel. */
.wg-button--secondary { background: transparent; border-color: var(--border); color: var(--foreground); }
.wg-button--secondary:hover { background: var(--hover); border-color: var(--border-strong); }
.wg-button--ghost { background: transparent; border-color: transparent; color: var(--muted-foreground); }
.wg-button--ghost:hover { background: var(--hover); color: var(--foreground); }
.wg-button--warning { background: transparent; border-color: var(--warning); color: var(--warning); }
.wg-button--warning:hover { background: var(--warning-subtle); }
/* Danger's text is the surface colour, like the solid warning chip: 5:1 on
   paper, 7:1 on ink (neutral-50 was 4.48:1 on paper and 2.4:1 on ink). */
.wg-button--danger { background: var(--warning); border-color: var(--warning); color: var(--background); }
.wg-button--danger:hover { background: var(--warning); border-color: var(--warning); opacity: .9; }

/* Shape and text. */
.wg-button--icon { width: var(--control-h); height: var(--control-h); padding: 0; }
.wg-button--block { width: 100%; }
/* Toggle: a button that stays on (aria-pressed), drawn in full ink while on,
   like a pressed segmented choice. Mostly an --icon button (fit to box). */
.wg-button[aria-pressed="true"], .wg-button[aria-pressed="true"]:hover { background: var(--foreground); border-color: var(--foreground); color: var(--background); }
.wg-button--mono {
  font: 400 var(--mono-label)/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
/* An icon button holds one icon (Icons.tsx) at its size: 12 sm, 14 md, 16
   lg and xl. A text glyph in its place takes that size too: after --mono. */
.wg-button--icon { font-size: var(--icon-size); line-height: 1; letter-spacing: 0; }

/* Field: sm, md, (lg), xl, the button's heights, so a field and a button of
   one size sit level. The text stays 16px at every size: below it iOS zooms on
   focus. A select is a field (in .wg-select) and takes the same sizes. */
.wg-field {
  --control-h: var(--h-lg);
  width: 100%;
  min-height: var(--control-h);
  padding: 0 12px;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  font: 400 16px/24px var(--font-sans);
  letter-spacing: -.32px;
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.wg-field:focus, .wg-field:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--ring);
}
/* Read-only is content (a MAC, a URL): readable. Disabled may be faint. */
.wg-field:disabled, .wg-field[readonly] { background: var(--muted-background); color: var(--muted-foreground); }
.wg-field:disabled { color: var(--faint); }
.wg-field::placeholder { color: var(--faint); }
/* sm: a dense editor's numbers (a box's x, y, width, height). Mono 13px on
   a mouse; on a touch screen the text goes back to 16px, below which iOS
   zooms on focus. */
.wg-field--sm { --control-h: var(--h-sm); padding: 0 8px; font: 400 var(--mono-value)/20px var(--font-mono); letter-spacing: 0; }
@media (pointer: coarse) { .wg-field--sm { font-size: 16px; } }
.wg-field--md { --control-h: var(--h-md); padding: 0 10px; }
.wg-field--lg { --control-h: var(--h-lg); }
.wg-field--xl { --control-h: var(--h-xl); padding: 0 14px; }
/* Secondary: many fields in a row (a properties panel) read as one group;
   the lighter hairline until hovered or focused. */
.wg-field--secondary { border-color: var(--border); }
.wg-field--secondary:hover { border-color: var(--border-strong); }
textarea.wg-field { min-height: 140px; padding: 12px; resize: vertical; }
.wg-field-label { display: block; margin: 0 0 7px; font: 550 14px/20px var(--font-sans); letter-spacing: -.28px; }
.wg-field-hint { margin: 8px 0 0; color: var(--muted-foreground); font: 400 13px/20px var(--font-sans); }
.wg-field-error { margin: 8px 0 0; color: var(--warning); font: 400 13px/20px var(--font-sans); }
/* Mono micro-label: a machine reading's name (a field, a stat, a section).
   Mono means machine; prose is never mono. */
.wg-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
/* A select keeps the field's box; the native arrow is replaced by a chevron
   (an inline svg, last child of .wg-select). */
.wg-select { position: relative; }
.wg-select select.wg-field { appearance: none; -webkit-appearance: none; padding-right: 36px; }
.wg-select > svg {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted-foreground); pointer-events: none;
}
/* A read-only value with one action beside it (copy a URL). The button
   shares the field's rule: no gap, no second border. */
.wg-copyfield { display: flex; align-items: stretch; }
.wg-copyfield .wg-field {
  --control-h: var(--h-md);
  flex: 1; min-width: 0; padding: 0 10px; border-right: 0;
  /* One line that scrolls; still 16px, below which iOS zooms on focus. */
  font-family: var(--font-mono); color: var(--muted-foreground); background: var(--muted-background);
}
.wg-copyfield .wg-button { flex: none; }
/* The MCP connector: the only signal blue on a product page. */
.wg-copyfield--connector .wg-field { border-color: var(--connector); color: var(--foreground); }
.wg-copyfield--connector .wg-button { background: var(--connector); border-color: var(--connector); color: var(--on-connector); }
.wg-copyfield--connector .wg-button:hover { background: var(--signal-700); border-color: var(--signal-700); }
/* Two to four exclusive choices side by side (FR | EN): one tap, the
   current one always visible. Buttons with aria-pressed. Sizes sm, (md), lg. */
.wg-segmented { --control-h: var(--h-md); display: inline-flex; }
.wg-segmented--sm { --control-h: var(--h-sm); }
.wg-segmented--lg { --control-h: var(--h-lg); }
.wg-segmented > button {
  min-width: 56px; min-height: var(--control-h); padding: 0 10px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.wg-segmented > button + button { border-left: 0; }
.wg-segmented > button:hover { background: var(--hover); }
.wg-segmented > button[aria-pressed="true"] { background: var(--foreground); border-color: var(--foreground); color: var(--background); }

/* Menu: the actions behind a "…" or chevron button. Square, on the panel
   surface, under (or, with --up, above) its button. Items are buttons with
   role menuitem / menuitemradio. A level opens in place (--sub, "›") and
   closes with its back row (--back, "‹"), so a phone works like a mouse. */
.wg-menu { position: relative; flex: none; }
.wg-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 10;
  min-width: 200px; max-height: min(70vh, 520px); overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--background); border: 1px solid var(--border-strong);
}
.wg-menu--up .wg-menu-list { top: auto; bottom: calc(100% + 4px); }
/* An item is lg high (two lines grow it); the back row is md. */
.wg-menu-item {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--h-lg); padding: 10px 14px; border: 0; border-radius: 0; background: transparent;
  color: var(--foreground); font: 400 14px/20px var(--font-sans); text-align: left; cursor: pointer;
}
.wg-menu-item + .wg-menu-item { border-top: 1px solid var(--border); }
.wg-menu-item:hover, .wg-menu-item:focus-visible { background: var(--hover); outline: none; }
.wg-menu-item:disabled { color: var(--faint); background: transparent; cursor: default; }
.wg-menu-item--danger { color: var(--warning); }
.wg-menu-item-text { flex: 1; }
/* A section title above a group of items ("Move to…"); not an item. */
.wg-menu-heading {
  padding: 12px 14px 6px; border-top: 1px solid var(--border); color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}
.wg-menu-heading + .wg-menu-item { border-top: 0; }
.wg-menu-chev { display: inline-flex; flex: none; color: var(--muted-foreground); }
.wg-menu-check { display: inline-flex; flex: none; margin-left: auto; }
.wg-menu-item--back {
  min-height: var(--h-md); padding-top: 0; padding-bottom: 0; color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
}

/* Asked inline before something that cannot be undone: the question, then
   the danger button and Cancel. Placed where it moves nothing under a finger. */
.wg-confirm { padding: 12px; background: var(--muted-background); }
.wg-confirm > p { margin: 0 0 10px; color: var(--muted-foreground); font: 400 13px/20px var(--font-sans); }
.wg-confirm-actions { display: flex; gap: 8px; }

/* Modal: a question the page asks on its own (claim a frame on opening it),
   on the native <dialog> opened with showModal(), so focus stays inside and
   Escape cancels. Square, on the panel surface, over a dimmed page. Actions
   are md buttons (a dialog's answer, not a page's call to action) at the
   end, Cancel first and the confirming one last; on a phone they share the
   width. Something that cannot be undone is asked inline instead
   (.wg-confirm), where it happens. */
.wg-modal {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 24px; overflow-y: auto;
  border: 1px solid var(--border-strong); border-radius: 0;
  background: var(--background); color: var(--foreground);
}
/* The same dimming on paper and ink: a fixed dark neutral, not the text colour. */
.wg-modal::backdrop { background: color-mix(in srgb, var(--neutral-950) 45%, transparent); }
.wg-modal-title { margin: 0 0 12px; font: 500 20px/1.25 var(--font-sans); letter-spacing: -.02em; }
.wg-modal-body { color: var(--muted-foreground); font: 400 14px/22px var(--font-sans); overflow-wrap: anywhere; }
.wg-modal-body > p { margin: 0 0 16px; }
.wg-modal-body strong { color: var(--foreground); font-weight: 550; }
.wg-modal-error { margin: 0 0 16px; color: var(--warning); font: 400 13px/20px var(--font-sans); }
.wg-modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
@media (max-width: 480px) {
  .wg-modal-actions > .wg-button { flex: 1 1 0; }
}

/* Frame cards: an account's frames as a grid, on the page's own surface
   (no panel background). The card is one link: the frame's name in bold,
   then its screen as it hangs inside a square (a pure white bed in a
   full-ink frame, like every e-paper preview), and a chip on the
   square's corner for what is scheduled. One column on a phone. */
.wg-frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.wg-frame-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--border); background: transparent; color: var(--foreground);
  text-decoration: none; cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.wg-frame-card:hover { border-color: var(--foreground); }
.wg-frame-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.wg-frame-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--h-xl); padding: 0 14px; }
.wg-frame-card-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/20px var(--font-sans); letter-spacing: -.01em; }
/* Sized from the square's width (container units), so a portrait screen
   cannot stretch the square, nor the grid row with it. */
.wg-frame-card-screen {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  container-type: inline-size; overflow: hidden;
  border-top: 1px solid var(--border); background: var(--muted-background);
}
.wg-frame-card-screen img {
  display: block; max-width: calc(100cqw - 32px); max-height: calc(100cqw - 32px); width: auto; height: auto;
  border: 1px solid var(--epaper-ink); background: var(--epaper-bed); image-rendering: pixelated;
}
.wg-frame-card-chip { position: absolute; top: 10px; right: 10px; }

/* Overlay: a full view opened over the page (a frame's detail over the
   frame list), under the page's own top bar, which stays usable. A cream
   veil, not a blur: backdrop-filter would make the overlay the containing
   block of the view's own fixed bars. The page behind is inert and does not
   scroll; the overlay scrolls. Close with its ×, Escape or Back. */
.wg-overlay {
  position: fixed; inset: var(--wg-overlay-top, 0px) 0 0 0; z-index: 20;
  overflow-y: auto; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--app-background) 86%, transparent);
}

/* Tabs: switch between panels of one screen, never between pages (that is
   navigation, a link). Mono micro-labels; the current tab takes full ink and
   a 2px underline that sits on the bar's own 1px rule. Scrolls sideways
   rather than wrapping when the labels outgrow a phone. */
.wg-tabs {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  background: var(--background);
  /* The rule is an inset shadow, not a border: the selected tab's underline
     paints over it without a negative margin, which would make the bar 1px
     taller than its box and so scroll vertically (overflow-x forces y). */
  box-shadow: inset 0 -1px 0 var(--border);
}
.wg-tabs::-webkit-scrollbar { display: none; }
.wg-tab {
  /* Equal shares from a zero basis, so tabs line up with any 1fr grid above
     them whatever their label length; a flex item's min-width is still its
     label, so a crowded bar overflows (and scrolls) instead of squashing. */
  flex: 1 1 0;
  min-height: var(--h-lg);
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted-foreground);
  font: 400 var(--mono-tag)/16px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.wg-tab:hover { color: var(--foreground); background: var(--hover); }
.wg-tab[aria-selected="true"] { color: var(--foreground); border-bottom-color: var(--foreground); }
.wg-tab:disabled, .wg-tab[aria-disabled="true"] { color: var(--faint); background: transparent; cursor: default; }
.wg-tabs--start .wg-tab { flex: 0 0 auto; }

/* A range: a value picked along a line (the owner page's battery sync
   frequency). Square and hairline like the fields; an ink thumb; the value
   it stands for in mono beside it, never inside the thumb. */
.wg-range { display: flex; align-items: center; gap: 14px; }
.wg-range input[type="range"] {
  flex: 1;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.wg-range input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--border-strong); }
.wg-range input[type="range"]::-moz-range-track { height: 1px; background: var(--border-strong); }
.wg-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 0;
  border-radius: 0;
  background: var(--foreground);
}
.wg-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: var(--foreground);
}
.wg-range input[type="range"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
.wg-range input[type="range"]:disabled { cursor: default; }
.wg-range input[type="range"]:disabled::-webkit-slider-thumb { background: var(--faint); }
.wg-range input[type="range"]:disabled::-moz-range-thumb { background: var(--faint); }
.wg-range-value { min-width: 48px; font: 400 var(--mono-value)/20px var(--font-mono); text-align: right; }

.wg-card { padding: 24px; background: var(--background); border: 1px solid var(--border); border-radius: 0; }
.wg-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--h-xs);
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 0;
  font: 400 var(--mono-tag)/16px var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wg-chip--neutral { color: var(--foreground); background: var(--muted-background); border-color: var(--border); }
.wg-chip--highlight { color: var(--highlight-text); background: var(--highlight-subtle); }
.wg-chip--success { color: var(--success-text); background: var(--success-subtle); }
.wg-chip--info { color: var(--info-text); background: var(--info-subtle); }
.wg-chip--warning { color: var(--warning-text); background: var(--warning-subtle); }
/* Solid: the same five tones at full strength, for a chip that must read
   over a picture or a busy surface (a frame's preview). Text colours are
   chosen for at least 4.5:1 on paper and ink. Info is a deeper ochre with
   white text (--info-solid, 4.79:1); success uses its text shade, as white
   on the sage itself stays under 4.5:1 on paper. */
.wg-chip--solid.wg-chip--neutral { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.wg-chip--solid.wg-chip--highlight { color: var(--on-highlight); background: var(--highlight); }
.wg-chip--solid.wg-chip--info { color: var(--on-info-solid); background: var(--info-solid); }
.wg-chip--solid.wg-chip--warning { color: var(--background); background: var(--warning); }
.wg-chip--solid.wg-chip--success { color: var(--background); background: var(--success-text); }
.wg-status-mark { width: 6px; height: 6px; display: inline-block; flex: none; background: currentColor; }
.wg-spinner { width: 28px; height: 28px; border: 2px solid var(--border); border-top-color: var(--foreground); border-radius: 50%; animation: wg-spin .8s linear infinite; }
@keyframes wg-spin { to { transform: rotate(360deg); } }

:where(.wg-button, .wg-field, .wg-tab, .wg-focusable):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring);
}

/* The tab bar scrolls, which would clip an outer ring: draw it inside. */
.wg-tab:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }

@media (prefers-reduced-motion: reduce) {
  .wg-button, .wg-field, .wg-tab, .wg-link, .wg-list-row, .wg-daypick > button { transition: none; }
  .wg-spinner { animation-duration: 1.6s; }
}

/* Top bar: a page's own row, its title or brand at the start and quiet
   controls (compact buttons, a status) at the end. On the page's canvas,
   ruled below; the surface decides whether it is pinned. It reserves the
   notch's safe area, so a page under it needs no other top padding. */
.wg-appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: var(--app-background);
}
.wg-appbar-title {
  display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0;
  color: inherit; text-decoration: none;
  font: 600 var(--text-lg)/24px var(--font-sans); letter-spacing: -.02em;
}
.wg-appbar-title img, .wg-appbar-title picture { display: block; flex: none; }
.wg-appbar-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-appbar-end { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }

/* Link: a mono micro-label that moves (‹ Back, a store page); it never
   changes data, which is a button's job. In a .wg-nav the current page's
   entry (aria-current, set by the router) takes full ink and a hairline. */
.wg-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--h-sm); padding: 0;
  border: 0; background: none; color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.wg-link:hover { color: var(--foreground); }
.wg-link:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.wg-nav { display: flex; align-items: center; flex-wrap: wrap; }
.wg-nav > .wg-link { padding: 0 12px; border: 1px solid transparent; }
.wg-nav > .wg-link[aria-current="page"] { color: var(--foreground); border-color: var(--border-strong); }

/* Stat strip: a few readings side by side (a Wignet's power and last sync,
   the admin's counts), ruled above and below, cells sharing one rule. The
   label names the reading, then the value; --counts when the number is the
   whole reading. */
.wg-stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.wg-stat { min-width: 0; padding: 12px 20px; }
.wg-stat + .wg-stat { border-left: 1px solid var(--border); }
.wg-stat-label {
  display: block; color: var(--muted-foreground);
  font: 400 var(--mono-label)/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
}
.wg-stat-value { margin-top: 8px; font: 400 var(--mono-value)/1 var(--font-mono); overflow-wrap: anywhere; }
.wg-stats--counts .wg-stat-value { font-size: var(--mono-display); }

/* Rows: one record's readings, the name at the start and the value at the
   end, ruled between (a Wignet's information, a device's details). A <dl>
   with a div per pair, or divs. A value that is a link is underlined: the
   blue belongs to the MCP connector. */
.wg-rows { margin: 0; }
.wg-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.wg-row:last-child { border-bottom: 0; }
.wg-row-key {
  flex: none; margin: 0; color: var(--muted-foreground);
  font: 400 var(--mono-label)/20px var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
}
.wg-row-value { min-width: 0; margin: 0; font: 400 var(--mono-value)/20px var(--font-mono); text-align: right; overflow-wrap: anywhere; }
a.wg-row-value { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted-foreground); }
a.wg-row-value:hover { text-decoration-color: var(--foreground); }
.wg-row-value svg { display: inline; margin-left: 4px; vertical-align: -1px; }

/* List: items as one framed stack sharing its rules (the admin's Wignets,
   the shop's products). A row is one link: a thumbnail, then the name, a
   mono line (MAC, price) and its chips or status. The thumbnail is a screen
   (a white bed in a full-ink frame, like every e-paper preview); --photo
   for a picture. */
.wg-list { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--background); }
.wg-list > * + * { border-top: 1px solid var(--border); }
.wg-list-row {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  color: var(--foreground); text-decoration: none;
  transition: background var(--duration-fast) var(--ease-out);
}
.wg-list-row:hover { background: var(--hover); }
.wg-list-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ring); }
.wg-list-thumb {
  display: block; flex: none; width: 96px; height: 60px; object-fit: contain;
  border: 1px solid var(--epaper-ink); background: var(--epaper-bed); image-rendering: pixelated;
}
.wg-list-thumb--photo { object-fit: cover; border-color: var(--border); background: var(--muted-background); image-rendering: auto; }
.wg-list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wg-list-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/20px var(--font-sans); letter-spacing: -.01em; }
.wg-list-meta { color: var(--muted-foreground); font: 400 var(--mono-tag)/16px var(--font-mono); }

/* Day picker: the days something runs, seven toggles Monday first, pressed
   in full ink like a segmented choice. Buttons with aria-pressed. */
.wg-daypick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wg-daypick > button {
  min-height: var(--h-md); padding: 0;
  border: 1px solid var(--border-strong); border-radius: 0; background: transparent; color: var(--muted-foreground);
  font: 400 var(--mono-tag)/1 var(--font-mono); cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.wg-daypick > button:hover { background: var(--hover); }
.wg-daypick > button[aria-pressed="true"] { background: var(--foreground); border-color: var(--foreground); color: var(--background); }
.wg-daypick > button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }

/* Ink picker (e-paper): one of the inks the screen has, never a colour
   picker. Square swatches in a radiogroup (role="radio", aria-checked),
   each painted as the ink looks on the panel (--swatch-color:
   var(--spectra6-red)); the chosen one ringed in full ink. A mix is a
   coarse checkerboard of its two inks (--mix-a, --mix-b), so it never reads
   as a flat in-between colour the panel cannot show.
   md 28px (touch), --sm 20px (a menu row, a dense panel). */
.wg-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.wg-swatches--sm { gap: 6px; }
.wg-swatch {
  --swatch: 28px;
  flex: none; width: var(--swatch); height: var(--swatch); padding: 0;
  border: 1px solid var(--border-strong); border-radius: 0; background: var(--swatch-color, transparent); cursor: pointer;
}
.wg-swatches--sm .wg-swatch { --swatch: 20px; }
.wg-swatch--mix {
  background: repeating-conic-gradient(var(--mix-a) 0 25%, var(--mix-b) 0 50%) 0 0 / 8px 8px;
}
.wg-swatches--sm .wg-swatch--mix { background-size: 6px 6px; }
.wg-swatch[aria-checked="true"] { outline: 2px solid var(--foreground); outline-offset: 2px; }
.wg-swatch:focus-visible { box-shadow: 0 0 0 4px var(--background), 0 0 0 6px var(--ring); }
.wg-swatch:disabled { opacity: .5; cursor: not-allowed; }

/* Colour picker: only where colours are free (LCD, OLED, HDMI). A square
   holding the native picker beside the hex value in mono. */
.wg-colorfield { display: inline-flex; align-items: stretch; gap: 8px; }
.wg-colorfield input[type="color"] {
  -webkit-appearance: none; appearance: none; flex: none;
  width: var(--h-sm); height: var(--h-sm); padding: 0;
  border: 1px solid var(--border-strong); border-radius: 0; background: none; cursor: pointer;
}
.wg-colorfield input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.wg-colorfield input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 0; }
.wg-colorfield input[type="color"]::-moz-color-swatch { border: 0; border-radius: 0; }
.wg-colorfield input[type="color"]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.wg-colorfield .wg-field { width: 10ch; text-transform: uppercase; }

/* Status: a status mark in the status colour (StatusDot's color, from the
   device's health) and a word. The word is muted text, not the status
   colour: at 10px the sage, ochre and faint tones are under 4.5:1, so the
   colour would carry the meaning alone. Beside a name it is never squeezed.
   A trailing note (seen 3 min ago) is lighter still in tracking. */
.wg-status {
  display: inline-flex; align-items: center; gap: 8px; flex: none; white-space: nowrap; color: var(--muted-foreground);
  font: 400 var(--mono-label)/16px var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
}
.wg-status-note { color: var(--muted-foreground); letter-spacing: .06em; }

/* Accounts and shared frame access: framework-neutral surfaces and feedback. */
.wg-account-panel { padding: 24px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); }
.wg-account-panel h1, .wg-account-panel h2 { margin: 0 0 16px; font: 500 24px/1.25 var(--font-sans); }
.wg-account-panel h2 { font-size: 20px; }
.wg-account-panel p { margin: 0 0 16px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.wg-account-panel[aria-busy="true"] { opacity: .65; }
.wg-account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.wg-account-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.wg-account-row small { display: block; color: var(--muted-foreground); }
.wg-account-row a { color: var(--foreground); }
/* Action row: the whole row is the link or button (an empty account's Buy,
   Build, Claim), ending in a ›. A list of them is ruled above and below. */
.wg-account-row--action {
  width: 100%; padding: 16px 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  background: transparent; color: var(--foreground); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}
.wg-account-row--action:first-child { border-top: 1px solid var(--border); }
/* One line even where account rows wrap on a phone: the › stays at the end. */
.wg-account-row.wg-account-row--action { flex-wrap: nowrap; }
.wg-account-row--action > :first-child { flex: 1; }
.wg-account-row--action:hover { background: var(--hover); }
.wg-account-row--action:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ring); }
.wg-account-row-chev { display: inline-flex; flex: none; color: var(--muted-foreground); }
.wg-account-feedback { margin: 16px 0; padding: 12px 16px; border: 1px solid var(--border); color: var(--foreground); background: var(--muted-background); overflow-wrap: anywhere; }
.wg-account-feedback--error { border-color: var(--warning); color: var(--warning); }
.wg-account-panel a:focus-visible, .wg-account-row a:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
@media (max-width: 480px) {
  .wg-account-panel { padding: 16px; }
  .wg-account-row { flex-wrap: wrap; }
}


/* Product inspection: Components/Product viewer. Shared by the static showroom. */
.wg-viewer { color: var(--foreground); font-family: var(--font-sans); }
.wg-viewer-touch { cursor: grab; touch-action: pan-y; user-select: none; border-radius: 8px; outline-offset: -3px; }
.wg-viewer-touch[data-dragging="true"] { cursor: grabbing; }
.wg-viewer-touch:focus-visible { outline: 2px solid var(--ring); }
.wg-viewer-caption { display: grid; gap: 4px; }
.wg-viewer-name { font-size: 16px; font-weight: 550; letter-spacing: -.02em; }
.wg-viewer-detail { font-size: 12px; line-height: 1.5; color: var(--muted-foreground); }
.wg-viewer-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wg-viewer-button { --control-h: var(--h-lg); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--control-h); min-width: var(--control-h); box-sizing: border-box; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 24px; background: var(--app-background); color: var(--foreground); font: 400 12px/1 var(--font-sans); white-space: nowrap; cursor: pointer; transition: background var(--duration-fast); }
.wg-viewer-button--icon { padding: 0; width: var(--control-h); }
.wg-viewer-button:hover { background: var(--muted-background); }
.wg-viewer-button[aria-pressed="true"] { background: var(--foreground); color: var(--app-background); border-color: var(--foreground); }
.wg-viewer-button:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.wg-viewer-button:disabled { opacity: .4; cursor: default; }
.wg-viewer-icon { display: block; width: 16px; height: 16px; background: currentColor; mask-position: center; mask-size: contain; mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; }
.wg-viewer-message { color: var(--muted-foreground); font-size: 14px; line-height: 1.5; text-align: center; }

/* A simulated AMOLED panel: its luminous palette stays the same on paper/ink. */
.wg-amoled { box-sizing: border-box; width: min(100%, 280px); aspect-ratio: 368 / 448; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 28px; border: 10px solid var(--neutral-950); border-radius: 36px; background: var(--epaper-ink); color: var(--neutral-50); font-family: var(--font-sans); }
.wg-amoled-label { color: var(--coral-500); font: 500 12px/1.5 var(--font-mono); letter-spacing: .08em; }
.wg-amoled-time { font-size: clamp(40px, 10vw, 56px); font-weight: 550; line-height: 1; letter-spacing: -.05em; }
.wg-amoled-copy { font-size: 14px; line-height: 1.5; }
.wg-amoled-action { display: block; padding: 12px; border-radius: 18px; background: var(--neutral-50); color: var(--epaper-ink); text-align: center; font-size: 16px; font-weight: 550; }

/* Page navigation and separate account/language utilities. Components/Site navigation. */
.wg-site-header { color: var(--foreground); background: var(--app-background); border-bottom: 1px solid var(--border); font-family: var(--font-sans); }
.wg-site-header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wg-site-header .wg-brand { flex: none; }
.wg-site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.wg-site-link, .wg-site-signin { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-foreground); font-size: 14px; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.wg-site-link:hover, .wg-site-signin:hover { color: var(--foreground); }
.wg-site-link[aria-current="page"] { color: var(--foreground); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
.wg-site-link:focus-visible, .wg-site-signin:focus-visible, .wg-site-disclosure summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.wg-site-utilities { display: flex; align-items: center; gap: 20px; padding-left: 24px; border-left: 1px solid var(--border); }
.wg-site-disclosure { position: relative; }
.wg-site-disclosure summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--foreground); font: 400 14px/1.4 var(--font-sans); list-style: none; cursor: pointer; }
.wg-site-disclosure summary::-webkit-details-marker { display: none; }
.wg-site-disclosure summary:hover { color: var(--muted-foreground); }
.wg-site-language summary { font: 400 12px/1 var(--font-mono); }
.wg-site-caret { display: block; flex: none; width: 14px; height: 14px; background: currentColor; mask-position: center; mask-size: contain; mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; }
.wg-site-disclosure[open] summary > :last-child { transform: rotate(180deg); }
.wg-site-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; display: grid; min-width: 168px; padding: 8px; margin: 0; list-style: none; border: 1px solid var(--border-strong); background: var(--app-background); box-shadow: 0 8px 24px color-mix(in srgb, var(--foreground) 10%, transparent); }
.wg-site-panel a { display: flex; padding: 10px 12px; min-height: 44px; box-sizing: border-box; }
.wg-site-panel a:hover { background: var(--hover); }
.wg-site-mobile { display: none; }
@media (max-width: 900px) {
  .wg-site-header-inner { gap: 8px; }
  .wg-site-nav { display: none; }
  .wg-site-utilities { margin-left: auto; padding-left: 0; border-left: 0; gap: 10px; }
  .wg-site-mobile { display: block; }
  .wg-site-mobile .wg-site-panel { min-width: 240px; max-width: calc(100vw - 32px); }
}

/* Hardware catalogue: visible per-variant support and resilient vendor photos. */
.wg-hardware-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--border-strong); background: var(--background); color: var(--foreground); }
.wg-hardware-card-media { display: grid; place-items: center; aspect-ratio: 3 / 2; padding: 20px; background: var(--epaper-bed); color: var(--epaper-ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.wg-hardware-card-media img { display: block; width: 100%; height: 180px; object-fit: contain; }
.wg-hardware-card-media img[hidden], .wg-hardware-card-fallback[hidden] { display: none; }
.wg-hardware-card-media--text { background: var(--muted-background); color: var(--muted-foreground); font: 500 24px/1.2 var(--font-sans); }
.wg-hardware-card-fallback { font: 400 14px/1.5 var(--font-sans); text-align: center; }
.wg-hardware-card-body { padding: 24px; display: flex; flex: 1; flex-direction: column; gap: 12px; }
.wg-hardware-card h4 { margin: 0; font: 550 24px/1.2 var(--font-sans); letter-spacing: -.03em; overflow-wrap: anywhere; }
.wg-hardware-card p { margin: 0; }
.wg-hardware-card-maker { font: 400 11px/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted-foreground); }
.wg-hardware-card-spec, .wg-hardware-card-note { font: 400 14px/1.5 var(--font-sans); color: var(--muted-foreground); }
.wg-hardware-card-variants { list-style: none; padding: 0; margin: 4px 0 0; }
.wg-hardware-card-variants > li { padding: 16px 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.wg-hardware-card-model { font: 500 13px/1.5 var(--font-sans); overflow-wrap: anywhere; }
.wg-hardware-card .wg-chip { justify-self: start; max-width: 100%; white-space: normal; height: auto; line-height: 1.5; }
.wg-hardware-card-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 14px/1.5 var(--font-sans); }
.wg-hardware-card .board-links { margin-top: auto; }
.wg-hardware-card-links:empty { display: none; }
.wg-hardware-card-links a { color: inherit; text-underline-offset: 3px; }
.wg-hardware-card a:hover { text-decoration-thickness: 2px; }
.wg-hardware-card a:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.wg-hardware-card-media:focus-visible { outline-offset: -4px; }

/* Hardware budgets are indicative, source-linked and separate from support. */
.wg-hardware-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font: 400 12px/1.4 var(--font-sans); color: var(--muted-foreground); }
.wg-hardware-price strong { font: 550 22px/1.2 var(--font-sans); color: var(--foreground); font-variant-numeric: tabular-nums; }
.wg-hardware-price a { color: var(--foreground); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.wg-hardware-price-scope { font: 400 12px/1.5 var(--font-sans); color: var(--muted-foreground); }

/* Hardware filters: two independent choices, result count and empty state. */
.wg-hardware-filters { display: grid; gap: 20px; padding: 0; border: 0; background: transparent; color: var(--foreground); font-family: var(--font-sans); }
.wg-hardware-filters[hidden], .wg-hardware-card[hidden], .wg-hardware-filter-empty[hidden] { display: none; }
.wg-hardware-filters fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.wg-hardware-filters legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 550; color: var(--muted-foreground); }
.wg-hardware-filter-options { display: flex; flex-wrap: wrap; gap: 4px; }
.wg-hardware-filter { min-height: 32px; padding: 6px 10px; border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--muted-foreground); font: 500 12px/1.4 var(--font-sans); cursor: pointer; }
.wg-hardware-filter:hover { background: var(--hover); color: var(--foreground); }
.wg-hardware-filter[aria-pressed="true"] { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.wg-hardware-filter:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.wg-hardware-filter-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.wg-hardware-filter-summary p { margin: 0; font: 400 13px/1.5 var(--font-sans); color: var(--muted-foreground); }
.wg-hardware-filter-empty { margin: 0; padding-top: 20px; border-top: 1px solid var(--border); font: 400 16px/1.5 var(--font-sans); }

/* Sidebar mode stacks choices on desktop and returns to wrapping on mobile. */
@media (min-width: 961px) {
  .wg-hardware-filters--sidebar { box-sizing: border-box; }
  .wg-hardware-filters--sidebar .wg-hardware-filter-options { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .wg-hardware-filters--sidebar .wg-hardware-filter { text-align: left; }
  .wg-hardware-filters--sidebar .wg-hardware-filter-summary { flex-direction: column; align-items: flex-start; }
}

/* A native disclosure keeps the mobile catalogue compact and keyboard usable. */
.wg-hardware-filter-content { display: grid; gap: 20px; }
.wg-hardware-filter-disclosure > summary { min-height: 44px; align-content: center; cursor: pointer; font: 550 16px/1.5 var(--font-sans); }
.wg-hardware-filter-disclosure > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.wg-hardware-filter-disclosure[open] > summary { margin-bottom: 20px; }
@media (min-width: 961px) {
  .wg-hardware-filter-disclosure > summary { display: none; }
}
