/* ==========================================================================
   Lumina — Lighting Design Suite
   Responsive, accessible stylesheet. Mobile first; the design workspace
   progressively becomes a two-pane layout on wider screens.
   ========================================================================== */

:root {
  --navy-900: #0f1522;
  --navy-800: #16233c;
  --navy-700: #1f3b63;
  --navy-600: #2b5088;
  --blue-500: #3b7dd8;
  --blue-400: #5b9bf0;
  --blue-100: #e8f0fb;

  --ink:        #1a2033;
  --ink-2:      #47506a;
  --ink-3:      #6b7490;
  --line:       #dfe4ee;
  --line-2:     #eef1f7;
  --bg:         #f5f7fb;
  --surface:    #ffffff;
  --surface-2:  #f9fbfd;

  --pass:   #147a45;
  --pass-bg:#e6f6ec;
  --fail:   #bc2622;
  --fail-bg:#fdeceb;
  --warn:   #a86c06;
  --warn-bg:#fff5e0;
  --info:   #1b6aa5;
  --info-bg:#e8f4fc;

  --radius:   10px;
  --radius-s: 6px;
  --shadow:   0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-s: 0 1px 2px rgba(16, 24, 40, .08);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --focus: 0 0 0 3px rgba(59, 125, 216, .45);
  --header-h: 56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8ecf5; --ink-2: #aeb7cc; --ink-3: #8a93ab;
    --line: #2a3347; --line-2: #222a3b;
    --bg: #0d121c; --surface: #141b29; --surface-2: #19212f;
    --blue-100: #1a2942;
    --pass-bg:#11291d; --fail-bg:#2c1615; --warn-bg:#2a2010; --info-bg:#132433;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-s: 0 1px 2px rgba(0,0,0,.45);
  }
}
[data-theme="dark"] {
  --ink: #e8ecf5; --ink-2: #aeb7cc; --ink-3: #8a93ab;
  --line: #2a3347; --line-2: #222a3b;
  --bg: #0d121c; --surface: #141b29; --surface-2: #19212f;
  --blue-100: #1a2942;
  --pass-bg:#11291d; --fail-bg:#2c1615; --warn-bg:#2a2010; --info-bg:#132433;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-s: 0 1px 2px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font: 15px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .92rem; }
p  { margin: 0 0 .85rem; }
a  { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: .82em; color: var(--ink-3); }
code, kbd, samp { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-700); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------- header --- */
.app-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 clamp(.75rem, 2vw, 1.25rem);
  background: var(--navy-800);
  color: #eaf0fa;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(0,0,0,.18);
}
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; letter-spacing: -.02em; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; flex: 0 0 auto; }
.brand-sub { font-weight: 400; font-size: .72rem; color: #9db4d6; display: none; }
@media (min-width: 900px) { .brand-sub { display: inline; } }

.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav a, .nav button {
  color: #cfdcf0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .88rem; padding: .45rem .7rem; border-radius: var(--radius-s);
  text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav-primary { display: none; }
@media (min-width: 820px) { .nav-primary { display: flex; gap: .15rem; } }

.nav-toggle { display: inline-flex; }
@media (min-width: 820px) { .nav-toggle { display: none; } }
.mobile-nav {
  display: none; flex-direction: column; gap: .15rem;
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 59;
  background: var(--navy-800); padding: .5rem; box-shadow: var(--shadow);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: #cfdcf0; padding: .7rem .8rem; border-radius: var(--radius-s); }
.mobile-nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ----------------------------------------------------------------- shell --- */
.wrap { max-width: 1440px; margin: 0 auto; padding: clamp(1rem, 2.4vw, 1.75rem); }
.wrap-narrow { max-width: 920px; }
.wrap-wide { max-width: 1760px; }

.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-start; margin-bottom: 1.25rem; }
.page-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.page-head h1 { margin-bottom: .2rem; }
.page-head .sub { color: var(--ink-3); font-size: .9rem; margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .82rem; color: var(--ink-3); margin-bottom: .5rem; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb span::after { content: "/"; margin-left: .35rem; color: var(--line); }
.breadcrumb > :last-child::after { content: ""; }

/* ----------------------------------------------------------------- cards --- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-s);
  margin-bottom: 1.1rem; overflow: hidden;
}
.card > header {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line-2); background: var(--surface-2);
}
.card > header h2, .card > header h3 { margin: 0; font-size: .98rem; }
.card > header .spacer { margin-left: auto; }
.card-body { padding: 1rem; }
.card-body > :last-child { margin-bottom: 0; }
.card.flush .card-body { padding: 0; }

.grid { display: grid; gap: 1.1rem; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 680px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1040px) {
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------- stats --- */
.stats { display: grid; gap: .65rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat {
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-s); padding: .7rem .8rem;
}
.stat .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; }
.stat .value { font-size: 1.32rem; font-weight: 680; letter-spacing: -.02em; margin: .15rem 0 0; font-variant-numeric: tabular-nums; }
.stat .value .unit { font-size: .66em; font-weight: 500; color: var(--ink-3); margin-left: .15em; }
.stat .foot { font-size: .74rem; color: var(--ink-3); margin-top: .1rem; }
.stat.pass { border-left: 3px solid var(--pass); }
.stat.fail { border-left: 3px solid var(--fail); }
.stat.warn { border-left: 3px solid var(--warn); }

/* --------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-size: .88rem; font-weight: 550;
  padding: .5rem .85rem; min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
.btn-danger { background: var(--fail); border-color: var(--fail); color: #fff; }
.btn-danger:hover { background: #a01f1c; border-color: #a01f1c; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--blue-500); }
.btn-ghost:hover { background: var(--blue-100); border-color: transparent; }
.btn-sm { font-size: .8rem; padding: .32rem .6rem; min-height: 30px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: .4rem; }

/* ----------------------------------------------------------------- forms --- */
.field { margin-bottom: .9rem; }
.field > label, .field-label {
  display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem;
}
.field .hint { display: block; font-size: .76rem; color: var(--ink-3); margin-top: .25rem; }
.field .error { display: block; font-size: .78rem; color: var(--fail); margin-top: .25rem; font-weight: 550; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=date], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: .9rem;
  padding: .48rem .6rem; min-height: 38px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s);
}
input[type=number] { font-variant-numeric: tabular-nums; }
textarea { min-height: 76px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input:disabled, select:disabled, textarea:disabled { background: var(--line-2); color: var(--ink-3); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--fail); }
input[type=range] { width: 100%; accent-color: var(--blue-500); }
input[type=checkbox], input[type=radio] { accent-color: var(--navy-700); width: 16px; height: 16px; }

.field-row { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .field-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-row.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) { .field-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .88rem; margin-bottom: .5rem; }
.check input { margin-top: .18rem; flex: 0 0 auto; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .9rem; margin: 0 0 1rem; }
legend { font-size: .8rem; font-weight: 650; color: var(--ink-2); padding: 0 .35rem; }

/* ---------------------------------------------------------------- tables --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); font-weight: 650; white-space: nowrap;
}
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 650; border-top: 2px solid var(--line); }
table.compact th, table.compact td { padding: .32rem .5rem; font-size: .8rem; }

/* ---------------------------------------------------------------- badges --- */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .72rem; font-weight: 650; letter-spacing: .02em;
  padding: .16rem .45rem; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge.pass { background: var(--pass-bg); color: var(--pass); }
.badge.fail { background: var(--fail-bg); color: var(--fail); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.na   { background: var(--line-2); color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; padding: .22rem .55rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.chip.active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* --------------------------------------------------------------- notices --- */
.notice {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .7rem .85rem; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: .88rem; margin-bottom: .9rem;
}
.notice strong { font-weight: 650; }
.notice.success { background: var(--pass-bg); border-color: color-mix(in srgb, var(--pass) 28%, transparent); }
.notice.error   { background: var(--fail-bg); border-color: color-mix(in srgb, var(--fail) 28%, transparent); }
.notice.warn    { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice.info    { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.notice .icon { flex: 0 0 auto; font-weight: 700; }

.flash-stack { position: fixed; top: calc(var(--header-h) + .6rem); right: .8rem; z-index: 90; width: min(380px, calc(100vw - 1.6rem)); }
.flash-stack .notice { box-shadow: var(--shadow); }

/* ------------------------------------------------------------- workspace --- */
.workspace { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 380px; }
  .workspace-side { position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto; }
}
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0, 1fr) 420px; } }

.canvas-shell { position: relative; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.canvas-shell canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.canvas-toolbar {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  padding: .55rem .7rem; border-bottom: 1px solid var(--line-2); background: var(--surface-2);
}
.canvas-toolbar .spacer { margin-left: auto; }
.canvas-legend { display: flex; align-items: center; gap: .5rem; font-size: .76rem; color: var(--ink-3); padding: .5rem .7rem; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.legend-bar { height: 10px; flex: 1 1 120px; min-width: 100px; border-radius: 3px; border: 1px solid var(--line); }
.readout {
  position: absolute; pointer-events: none; z-index: 5;
  background: rgba(16, 22, 36, .92); color: #fff; font-size: .75rem;
  padding: .3rem .5rem; border-radius: var(--radius-s); font-variant-numeric: tabular-nums;
  transform: translate(-50%, -140%); white-space: nowrap; opacity: 0; transition: opacity .1s;
}
.readout.show { opacity: 1; }

/* ------------------------------------------------------------------ tabs --- */
.tabs { display: flex; gap: .15rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs button {
  font: inherit; font-size: .86rem; font-weight: 550;
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: .55rem .8rem; color: var(--ink-3); cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--navy-700); border-bottom-color: var(--navy-700); }
[data-theme="dark"] .tabs button[aria-selected=true], @media (prefers-color-scheme: dark) { }
.tab-panel[hidden] { display: none; }

/* --------------------------------------------------------------- details --- */
details.accordion { border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: .6rem; background: var(--surface); }
details.accordion > summary {
  cursor: pointer; padding: .6rem .8rem; font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; gap: .5rem; list-style: none;
}
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion > summary::before { content: "▸"; color: var(--ink-3); transition: transform .12s; }
details.accordion[open] > summary::before { transform: rotate(90deg); }
details.accordion > .accordion-body { padding: 0 .8rem .8rem; border-top: 1px solid var(--line-2); padding-top: .8rem; }

/* ------------------------------------------------------------- criteria --- */
.check-row { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.check-row:last-child { border-bottom: 0; }
.check-row .name { font-size: .88rem; font-weight: 550; }
.check-row .meta { font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.check-row .note { grid-column: 1 / -1; font-size: .78rem; color: var(--ink-3); }

.rec { border-left: 3px solid var(--line); padding: .1rem 0 .1rem .7rem; margin-bottom: .9rem; }
.rec.high { border-left-color: var(--fail); }
.rec.medium { border-left-color: var(--warn); }
.rec.low { border-left-color: var(--info); }
.rec h4 { margin-bottom: .2rem; font-size: .92rem; }
.rec p { font-size: .84rem; color: var(--ink-2); margin-bottom: .4rem; }
.rec ul { margin: 0; padding-left: 1.1rem; font-size: .84rem; color: var(--ink-2); }
.rec li { margin-bottom: .2rem; }

/* -------------------------------------------------------------- fixtures --- */
.fixture-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fixture-card {
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
  padding: .75rem; display: flex; flex-direction: column; gap: .4rem;
}
.fixture-card h3 { font-size: .9rem; margin: 0; }
.fixture-card .brand { font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.fixture-card dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; margin: 0; font-size: .8rem; }
.fixture-card dt { color: var(--ink-3); }
.fixture-card dd { margin: 0; font-variant-numeric: tabular-nums; }
.fixture-card .actions { margin-top: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.fixture-card.selected { border-color: var(--blue-500); box-shadow: 0 0 0 2px var(--blue-100); }

/* ------------------------------------------------------------ definition --- */
dl.defs { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .9rem; margin: 0; font-size: .87rem; }
dl.defs dt { color: var(--ink-3); }
dl.defs dd { margin: 0; font-weight: 550; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { dl.defs { grid-template-columns: 1fr; gap: .05rem; } dl.defs dd { margin-bottom: .45rem; } }

/* ------------------------------------------------------------------ misc --- */
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: .86em; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mb-1 { margin-bottom: .5rem; }
.mt-2 { margin-top: 1rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.stack > * + * { margin-top: .65rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-3); }
.empty h3 { color: var(--ink-2); }

.tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; margin-left: .25rem;
  background: var(--line); color: var(--ink-2); font-size: .68rem; font-weight: 700;
  cursor: help; vertical-align: text-top;
}

.pill-row { display: flex; flex-wrap: wrap; gap: .35rem; }

.progress { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue-500); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- wizard --- */
.steps { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; counter-reset: step; }
.steps li {
  list-style: none; display: flex; align-items: center; gap: .45rem;
  font-size: .82rem; color: var(--ink-3); padding: .35rem .7rem .35rem .4rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--line-2); color: var(--ink-2); font-size: .72rem; font-weight: 700;
}
.steps li.active { color: var(--ink); border-color: var(--navy-700); }
.steps li.active::before { background: var(--navy-700); color: #fff; }
.steps li.done::before { background: var(--pass); color: #fff; content: "✓"; }

/* ------------------------------------------------------------------ docs --- */
.doc-layout { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 980px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); } }
.doc-nav { font-size: .88rem; }
.doc-nav a { display: block; padding: .35rem .5rem; border-radius: var(--radius-s); color: var(--ink-2); }
.doc-nav a:hover { background: var(--surface-2); text-decoration: none; }
.doc-nav a[aria-current=page] { background: var(--blue-100); color: var(--navy-700); font-weight: 650; }
.doc-body { max-width: 74ch; }
.doc-body h2 { margin-top: 1.9rem; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.doc-body h3 { margin-top: 1.4rem; }
.doc-body ul, .doc-body ol { padding-left: 1.3rem; }
.doc-body li { margin-bottom: .3rem; }
.doc-body blockquote { margin: 1rem 0; padding: .7rem 1rem; border-left: 3px solid var(--blue-500); background: var(--surface-2); color: var(--ink-2); font-size: .92rem; }
.doc-body code { background: var(--line-2); padding: .1rem .3rem; border-radius: 3px; }
pre.code {
  background: var(--navy-900); color: #dbe6f5; padding: .85rem 1rem;
  border-radius: var(--radius-s); overflow-x: auto; font-size: .82rem; line-height: 1.5;
}
pre.code code { background: none; padding: 0; color: inherit; }
table.doc-table { font-size: .84rem; margin: 1rem 0; }
table.doc-table th { background: var(--surface-2); }

/* ---------------------------------------------------------------- footer --- */
.app-footer {
  border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.25rem;
  font-size: .8rem; color: var(--ink-3); text-align: center;
}
.app-footer a { color: var(--ink-3); text-decoration: underline; }
.app-footer .links { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-bottom: .5rem; }

/* ----------------------------------------------------------------- print --- */
@media print {
  .app-header, .app-footer, .page-actions, .canvas-toolbar, .tabs,
  .workspace-side, .flash-stack, .skip-link, .no-print { display: none !important; }
  body { background: #fff; font-size: 10pt; }
  .card { border-color: #bbb; box-shadow: none; break-inside: avoid; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  thead th { position: static; }
}
