/* ============================================================================
   Bevel — shared stylesheet
   A mid-90s professional imaging workstation. Depth is the two-tone bevel ONLY:
   raised = actable, sunken = receives. No gradient, no radius, no drop shadow,
   no blur. Palette: beige + ink + white/grey/charcoal bevel ladder + one navy
   + one rationed maroon. Every value below traces to bevel/DESIGN.md.
   ============================================================================ */

/* ---------- Fonts (self-hosted woff2, no CDN) ---------- */
@font-face {
  font-family: "Silkscreen";
  src: url("./assets/fonts/silkscreen-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("./assets/fonts/silkscreen-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/ibm-plex-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* palette */
  --face: #D4D0C8;
  --hilite: #FFFFFF;
  --shadow: #808080;
  --dark: #404040;
  --ink: #1A1A1A;
  --navy: #000080;
  --on-navy: #FFFFFF;
  --alert: #800000;
  --matte: #A0A0A0;
  --title-idle: #808080;

  /* bevel recipes (2px composite, zero blur) */
  --bevel-raised:
    inset  1px  1px 0 #FFFFFF,
    inset -1px -1px 0 #404040,
    inset  2px  2px 0 #D4D0C8,
    inset -2px -2px 0 #808080;
  --bevel-sunken:
    inset  1px  1px 0 #808080,
    inset -1px -1px 0 #FFFFFF,
    inset  2px  2px 0 #404040,
    inset -2px -2px 0 #D4D0C8;

  /* fonts */
  --f-chrome: "Silkscreen", "Courier New", monospace;
  --f-ui: "IBM Plex Sans", "Segoe UI", Tahoma, Arial, sans-serif;
  --f-mono: "JetBrains Mono", "Courier New", monospace;

  /* spacing scale: 2 4 8 12 16 24 32 48 */
  --s2: 2px; --s4: 4px; --s8: 8px; --s12: 12px;
  --s16: 16px; --s24: 24px; --s32: 32px; --s48: 48px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--face);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* mono zero (slashed zero) — the only OpenType feature declared */
.mono, .url, .param, .metric, code, pre {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
}

/* ---------- Bevel utility ---------- */
.raised { background: var(--face); box-shadow: var(--bevel-raised); }
.sunken { background: var(--face); box-shadow: var(--bevel-sunken); }

/* ---------- Window frame ---------- */
.window {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--face);
  box-shadow: var(--bevel-raised);
}
.window__body { flex: 1 1 auto; }

/* ---------- Title bar ---------- */
.titlebar {
  display: flex;
  align-items: center;
  gap: var(--s8);
  height: 26px;
  min-height: 26px;
  padding: 0 var(--s4) 0 var(--s8);
  background: var(--navy);
  color: var(--on-navy);
  margin: var(--s2);
}
.titlebar--idle { background: var(--title-idle); }
.titlebar__wordmark {
  font-family: var(--f-chrome);
  font-size: 16px;
  line-height: 1;
  color: var(--on-navy);
  letter-spacing: 0;
  white-space: nowrap;
}
.titlebar__caption {
  font-family: var(--f-chrome);
  font-size: 16px;
  line-height: 1;
  color: var(--on-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.titlebar__url {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.titlebar__spacer { flex: 1 1 auto; }
.titlebar__sysbtns { display: flex; gap: var(--s2); margin-left: auto; }
.sysbtn {
  width: 18px; height: 16px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  text-align: center;
}

/* copy button in the title bar */
.copybtn {
  flex: 0 0 auto;
  height: 18px;
  padding: 0 var(--s8);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.copybtn:active { box-shadow: var(--bevel-sunken); transform: translate(1px, 1px); }

/* ---------- Menu bar ---------- */
.menubar {
  display: flex;
  align-items: stretch;
  height: 22px;
  margin: 0 var(--s2);
  padding: 0 var(--s2);
  background: var(--face);
  box-shadow: var(--bevel-raised);
}
.menubar__item {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s8);
  font-family: var(--f-ui);
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: default;
}
.menubar__item .mn { text-decoration: underline; text-underline-offset: 2px; }
a.menubar__item { cursor: pointer; }
.menubar__item:hover, .menubar__item:focus-visible {
  background: var(--navy);
  color: var(--on-navy);
  outline: none;
}

/* ---------- Tab strip (persistent nav) ---------- */
.tabstrip {
  display: flex;
  gap: var(--s4);
  align-items: flex-end;
  margin: var(--s2);
  padding: var(--s4) var(--s8) 0;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s16);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.tab:active { box-shadow: var(--bevel-sunken); transform: translate(1px, 1px); }
.tab[aria-current="page"] {
  background: var(--navy);
  color: var(--on-navy);
  box-shadow: var(--bevel-sunken);
}
.tab[aria-current="page"]:active { transform: none; }

/* ---------- Toolbar (10 parameter buttons) ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin: 0 var(--s2);
  padding: var(--s8);
  background: var(--face);
  box-shadow: var(--bevel-raised);
}
.parambtn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 30px;
  padding: var(--s4) var(--s8);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  cursor: pointer;
  border: 0;
}
.parambtn__name {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.parambtn__val {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  color: var(--ink);
  opacity: 0.85;
}
.parambtn:active { transform: translate(1px, 1px); box-shadow: var(--bevel-sunken); }
.parambtn[aria-pressed="true"] {
  box-shadow: var(--bevel-sunken);
}
.parambtn[aria-pressed="true"] .parambtn__name,
.parambtn[aria-pressed="true"] .parambtn__val { position: relative; top: 1px; left: 1px; }
/* negotiated params: inert, tagged */
.parambtn--negotiated {
  box-shadow: var(--bevel-sunken);
  cursor: default;
}
.parambtn--negotiated .parambtn__name,
.parambtn--negotiated .parambtn__val { opacity: 0.9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 16px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn:active { box-shadow: var(--bevel-sunken); transform: translate(1px, 1px); }
.btn--default {
  outline: 1px solid var(--dark);
  outline-offset: 1px;
}
.btn:disabled, .btn[aria-disabled="true"] {
  box-shadow: none;
  color: var(--shadow);
  text-shadow: 1px 1px 0 var(--hilite);
  cursor: default;
}
.btn:disabled:active, .btn[aria-disabled="true"]:active { transform: none; }

/* ---------- Group box (etched captioned frame) ---------- */
.groupbox {
  position: relative;
  margin-top: var(--s16);
  padding: var(--s24) var(--s16) var(--s16);
  background: var(--face);
  /* etched groove: dark top-left line, light bottom-right line */
  border-top: 1px solid var(--shadow);
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--hilite);
  border-bottom: 1px solid var(--hilite);
}
.groupbox__cap {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 0 var(--s8);
  background: var(--face);
  font-family: var(--f-chrome);
  font-size: 16px;
  line-height: 1;
  color: var(--ink);
}

/* ---------- Section heading (Silkscreen, short) ---------- */
.heading {
  font-family: var(--f-chrome);
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}
.heading-xl {
  font-family: var(--f-chrome);
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}

/* ---------- Body copy helpers ---------- */
.body { font-size: 14px; line-height: 1.5; color: var(--ink); }
.strong { font-weight: 600; }
.label { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.caption { font-size: 12px; line-height: 1.4; color: var(--ink); }
.body a[href] { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Client area / layout ---------- */
.client {
  padding: var(--s24);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- Hero demo ---------- */
.demo { display: grid; grid-template-columns: 300px 1fr; gap: var(--s16); align-items: start; }
.props { margin-top: 0; }
.props__row { display: flex; flex-direction: column; gap: var(--s8); }
.props__label { font-size: 13px; font-weight: 500; color: var(--ink); }
.props__hint { font-size: 12px; line-height: 1.4; color: var(--ink); }

/* file picker */
.filepick { display: flex; align-items: center; gap: var(--s8); margin-bottom: var(--s8); }
.filepick__label { font-size: 12px; color: var(--ink); }
.pickbtn {
  width: 26px; height: 24px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  cursor: pointer;
  border: 0;
}
.pickbtn:active { box-shadow: var(--bevel-sunken); transform: translate(1px,1px); }
.pickbtn[aria-pressed="true"] { box-shadow: var(--bevel-sunken); }

/* canvas well */
.canvas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: var(--s8);
  background: var(--matte);
  box-shadow: var(--bevel-sunken);
  min-height: 320px;
}
.canvas__pane {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  align-items: center;
  justify-content: center;
  padding: var(--s8);
}
.canvas__tag {
  align-self: flex-start;
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  padding: 1px var(--s8);
}
.canvas__stage {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* the "before" plate: the whole source, contained */
.plate--source {
  width: 240px; height: 180px;
  background: var(--matte);
}
.plate--source img { width: 100%; height: 100%; object-fit: contain; }
/* the "after" result plate — sized/transformed live by JS */
.plate--result {
  background: var(--matte);
  overflow: hidden;
  display: flex;
}
.plate--result img { width: 100%; height: 100%; }

/* ---------- Controls: spin, trackbar, combo, hex ---------- */
.field {
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 14px;
  padding: 4px 6px;
  border: 0;
  width: 100%;
}
.field:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }

/* spin control */
.spin { display: flex; align-items: stretch; }
.spin__input {
  flex: 1 1 auto;
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  color: var(--ink);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  padding: 4px 6px;
  border: 0;
  -moz-appearance: textfield;
  appearance: textfield;
  min-width: 0;
}
.spin__input::-webkit-outer-spin-button,
.spin__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.spin__input:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }
.spin__btns { display: flex; flex-direction: column; margin-left: 2px; }
.spin__btn {
  width: 18px; height: 13px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
  font-size: 8px;
  line-height: 11px;
  text-align: center;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.spin__btn:active { box-shadow: var(--bevel-sunken); }

/* combo (dropdown) */
.combo { position: relative; }
.combo select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 14px;
  padding: 4px 26px 4px 6px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.combo select:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }
.combo select:disabled { color: var(--shadow); cursor: default; }
.combo__arrow {
  position: absolute;
  top: 2px; right: 2px; bottom: 2px;
  width: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  font-size: 8px;
  color: var(--ink);
  pointer-events: none;
}

/* trackbar (blur slider) */
.trackbar { display: flex; align-items: center; gap: var(--s8); }
.trackbar input[type="range"] {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  background: transparent;
  margin: 0;
}
.trackbar input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: var(--face);
  box-shadow: var(--bevel-sunken);
}
.trackbar input[type="range"]::-moz-range-track {
  height: 8px;
  background: var(--face);
  box-shadow: var(--bevel-sunken);
}
.trackbar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 20px;
  margin-top: -6px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  border: 0;
  border-radius: 0;
}
.trackbar input[type="range"]::-moz-range-thumb {
  width: 12px; height: 20px;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  border: 0;
  border-radius: 0;
}
.trackbar input[type="range"]:focus-visible { outline: 1px dotted var(--ink); outline-offset: 2px; }
.trackbar__val {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  min-width: 34px;
  text-align: right;
}

/* hex field + swatch */
.hex { display: flex; align-items: stretch; gap: var(--s8); }
.hex__input {
  flex: 1 1 auto;
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  color: var(--ink);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  padding: 4px 6px;
  border: 0;
  min-width: 0;
}
.hex__input:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }
.hex__input.is-bad { box-shadow: var(--bevel-sunken), inset 0 0 0 1px var(--dark); }
.hex__swatch { width: 28px; box-shadow: var(--bevel-sunken); }
.hex.is-disabled { opacity: 1; }
.hex.is-disabled .hex__input { color: var(--shadow); }

/* ---------- Negotiated tag ---------- */
.neg-tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--face);
  border: 1px solid var(--shadow);
  padding: 0 5px;
  vertical-align: middle;
}

/* ---------- Capability trio ---------- */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s16); }
.cap { display: flex; flex-direction: column; gap: var(--s8); }
.cap__icon { width: 40px; height: 40px; }
.cap__title { font-family: var(--f-chrome); font-size: 16px; color: var(--ink); }
.cap__body { font-size: 14px; line-height: 1.5; color: var(--ink); }
.cap__body .param { font-size: 13px; }

/* ---------- CTA panel ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s16);
  flex-wrap: wrap;
  padding: var(--s16);
  background: var(--face);
  box-shadow: var(--bevel-raised);
}
.cta__text { font-size: 14px; line-height: 1.5; color: var(--ink); max-width: 70ch; }

/* ---------- Status bar ---------- */
.statusbar {
  display: flex;
  align-items: stretch;
  gap: var(--s4);
  margin: var(--s2);
  padding: var(--s2) 16px var(--s2) var(--s2);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  position: relative;
}
.statuscell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px var(--s8);
  background: var(--face);
  box-shadow: var(--bevel-sunken);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.statuscell__k {
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.8;
}
.statuscell--grow { flex: 1 1 auto; }
.statuscell--copy {
  font-family: var(--f-ui);
  font-size: 11px;
  justify-content: flex-end;
}
.statuscell--overflow { display: none; }
.grip {
  position: absolute;
  right: 4px; bottom: 4px;
  width: 2px; height: 2px;
  background: var(--shadow);
  box-shadow:
    -4px 0 0 0 var(--shadow), -8px 0 0 0 var(--shadow),
    0 -4px 0 0 var(--shadow), -4px -4px 0 0 var(--shadow),
    0 -8px 0 0 var(--shadow),
    1px 1px 0 0 var(--hilite), -3px 1px 0 0 var(--hilite), -7px 1px 0 0 var(--hilite),
    1px -3px 0 0 var(--hilite), -3px -3px 0 0 var(--hilite),
    1px -7px 0 0 var(--hilite);
}

/* ---------- Docs: two-pane help window ---------- */
.help { display: grid; grid-template-columns: 220px 1fr; gap: var(--s16); align-items: start; }
.help__manual { max-width: 1040px; min-width: 0; }

/* sidebar tree */
.tree {
  padding: var(--s8);
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
}
.tree__row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  font-family: var(--f-ui);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.tree__row.is-active { background: var(--navy); color: var(--on-navy); }
.tree__node {
  width: 9px; height: 9px;
  flex: 0 0 auto;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  font-size: 8px;
  line-height: 7px;
  text-align: center;
  color: var(--ink);
}
.tree__label { position: relative; }
.tree__guide { border-left: 1px dotted var(--shadow); margin-left: 4px; padding-left: 10px; }
.tree__mobile { display: none; }

/* location field (docs synopsis URL) */
.locfield {
  display: block;
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  color: var(--ink);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  padding: 6px 8px;
  overflow-x: auto;
  white-space: nowrap;
}

/* quickstart steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s16); }
.step { display: grid; grid-template-columns: 28px 1fr; gap: var(--s12); align-items: start; }
.step__num {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 14px;
  font-weight: 500;
}
.step__body { min-width: 0; }
.step__lead { font-weight: 600; }

/* code well */
.codewell {
  position: relative;
  margin-top: var(--s8);
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  padding: var(--s12);
  overflow-x: auto;
}
.codewell pre {
  margin: 0;
  font-family: var(--f-mono);
  font-feature-settings: "zero" 1;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre;
}
.codewell__copy {
  position: absolute;
  top: var(--s8); right: var(--s8);
}
.codewell .cmt { color: var(--shadow); }

/* property table */
.proptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.proptable caption { text-align: left; margin-bottom: var(--s8); }
.proptable th, .proptable td {
  text-align: left;
  vertical-align: top;
  padding: 6px 10px;
  border-top: 1px solid var(--shadow);
  box-shadow: 0 1px 0 0 var(--hilite);
}
.proptable thead th {
  font-family: var(--f-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  border-top: 0;
}
.proptable td .param { font-size: 13px; font-weight: 500; }
.proptable td .vals { font-family: var(--f-mono); font-feature-settings: "zero" 1; font-size: 13px; }
.proptable .col-name { width: 14%; white-space: nowrap; }
.proptable .col-vals { width: 34%; }

/* ---------- Pricing: dialog ---------- */
.desktop {
  padding: var(--s32) var(--s16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s24);
}
.dialog {
  width: 560px;
  max-width: 100%;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  outline: 1px solid var(--dark);
}
.dialog__titlebar {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 var(--s4) 0 var(--s8);
  margin: var(--s2);
  background: var(--navy);
  color: var(--on-navy);
}
.dialog__title {
  font-family: var(--f-chrome);
  font-size: 16px;
  line-height: 1;
  color: var(--on-navy);
}
.dialog__body { padding: var(--s16); }
.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s8);
  margin-top: var(--s16);
}

/* radio tiles */
.radiogroup { display: flex; flex-direction: column; gap: var(--s8); margin: var(--s12) 0; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.tile__row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: var(--s12);
  align-items: start;
  padding: var(--s12);
  background: var(--face);
  box-shadow: var(--bevel-raised);
  color: var(--ink);
}
.tile__radio {
  width: 13px; height: 13px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--hilite);
  box-shadow: var(--bevel-sunken);
  position: relative;
}
.tile__radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: transparent;
}
.tile input:checked + .tile__row { background: var(--navy); color: var(--on-navy); }
.tile input:checked + .tile__row .tile__name,
.tile input:checked + .tile__row .tile__price,
.tile input:checked + .tile__row .tile__feats { color: var(--on-navy); }
.tile input:checked + .tile__row .tile__radio::after { background: var(--navy); }
.tile input:checked + .tile__row .tile__radio { background: var(--hilite); }
.tile input:focus-visible + .tile__row { outline: 1px dotted var(--ink); outline-offset: -4px; }
.tile input:checked:focus-visible + .tile__row { outline-color: var(--on-navy); }
.tile__name { font-family: var(--f-chrome); font-size: 16px; line-height: 1.2; }
.tile__price {
  font-family: var(--f-ui);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}
.tile__per { font-size: 12px; font-weight: 400; }
.tile__feats {
  grid-column: 2 / 4;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin-top: var(--s4);
}

/* fine print / alert */
.fineprint { font-size: 12px; line-height: 1.5; color: var(--ink); margin-top: var(--s8); }
.alert {
  display: block;
  margin-top: var(--s8);
  padding: 6px 10px;
  background: var(--alert);
  color: var(--on-navy);
  font-size: 12px;
  line-height: 1.5;
}

/* FAQ collapsible help */
.faq { width: 560px; max-width: 100%; }
.faq__head { margin-bottom: var(--s8); }
.faq details {
  background: var(--face);
  box-shadow: var(--bevel-raised);
  margin-bottom: var(--s4);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s8);
  padding: var(--s8) var(--s12);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 1px dotted var(--ink); outline-offset: -4px; }
.faq__box {
  width: 13px; height: 13px;
  flex: 0 0 auto;
  background: var(--face);
  box-shadow: var(--bevel-raised);
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 11px;
  text-align: center;
  color: var(--ink);
}
.faq details[open] .faq__box::before { content: "\2212"; } /* minus */
.faq details:not([open]) .faq__box::before { content: "+"; }
.faq__answer {
  padding: 0 var(--s12) var(--s12) 33px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- Focus (dotted marquee) ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: 2px;
}
.tab[aria-current="page"]:focus-visible,
.menubar__item:focus-visible { outline-color: var(--on-navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .caps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .client { padding: var(--s12); }
  .demo { grid-template-columns: 1fr; }
  .canvas { grid-template-columns: 1fr; }
  .caps { grid-template-columns: 1fr; }
  .help { grid-template-columns: 1fr; }
  .tree { display: none; }
  .tree__mobile { display: block; margin-bottom: var(--s16); }
  .tree__mobile select {
    width: 100%;
    appearance: none; -webkit-appearance: none;
    background: var(--hilite);
    box-shadow: var(--bevel-sunken);
    color: var(--ink);
    font-family: var(--f-ui); font-size: 14px;
    padding: 6px 8px; border: 0;
  }
  .titlebar__url { font-size: 13px; }
  .dialog, .faq { width: 100%; }
  .tile__row { grid-template-columns: 20px 1fr; }
  .tile__price { grid-column: 2; text-align: left; margin-top: var(--s4); }
  .tile__feats { grid-column: 1 / 3; }
  /* status bar: keep two metric cells + overflow marker */
  .statuscell--hideable { display: none; }
  .statuscell--overflow { display: inline-flex; }
  .statuscell--copy { display: none; }
}

/* ---------- Reduced motion: everything is already instant ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
