/* Navigator Admin — design system: Navy / Red / Grey / White
   SW-D060 pipeline: Distill → Colorize → Animate → Delight. */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap");

.nav-admin-root {
  --nv-navy: #001F3F;
  --nv-navy-700: #002B5B;
  --nv-navy-900: #001327;
  --nv-red: #D90429;
  --nv-red-700: #B0021E;
  --nv-grey-50: #F8FAFC;
  --nv-grey-100: #F1F5F9;
  --nv-grey-200: #E2E8F0;
  --nv-grey-300: #CBD5E1;
  --nv-grey-500: #64748B;
  --nv-grey-700: #334155;
  --nv-grey-900: #0F172A;
  --nv-white: #FFFFFF;
  --nv-success: #16A34A;
  --nv-warn: #D97706;
  --nv-radius: 8px;
  --nv-radius-lg: 12px;
  --nv-shadow-sm: 0 1px 2px rgba(0, 31, 63, 0.06);
  --nv-shadow-md: 0 1px 2px rgba(0, 31, 63, 0.06), 0 8px 24px rgba(0, 31, 63, 0.08);
  --nv-shadow-lg: 0 4px 12px rgba(0, 31, 63, 0.10), 0 24px 48px rgba(0, 31, 63, 0.12);

  --rail-w: 264px;
  --topbar-h: 64px;

  font-family: "Manrope", -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--nv-grey-900);
  background: var(--nv-grey-50);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  -webkit-font-smoothing: antialiased;
}

.nav-admin-root *,
.nav-admin-root *::before,
.nav-admin-root *::after { box-sizing: border-box; }

.nav-admin-root a { color: inherit; text-decoration: none; }
.nav-admin-root code, .nav-admin-root pre, .nav-admin-root .mono { font-family: "Inter", "JetBrains Mono", ui-monospace, monospace; }

/* ===== Rail ===== */
.nav-rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  background: linear-gradient(180deg, var(--nv-navy) 0%, var(--nv-navy-900) 100%);
  color: var(--nv-white);
  padding: 22px 18px;
  display: flex; flex-direction: column;
  gap: 22px;
}
.nav-rail .brand {
  display: flex; gap: 12px; align-items: center;
  padding: 6px 4px;
}
.nav-rail .brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--nv-red);
  border-radius: var(--nv-radius);
  font-weight: 800; letter-spacing: 0.04em; font-size: 13px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05) inset, 0 8px 18px rgba(217,4,41,0.30);
}
.nav-rail .brand-meta { display: flex; flex-direction: column; line-height: 1.15; }
.nav-rail .brand-name { font-weight: 700; letter-spacing: 0.01em; }
.nav-rail .brand-tag {
  font-size: 11px; color: var(--nv-grey-300);
  letter-spacing: 0.14em; text-transform: uppercase;
}

.rail-nav {
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.rail-nav .rail-section {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--nv-grey-500); padding: 14px 12px 6px;
}
.rail-nav .rail-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--nv-radius);
  color: var(--nv-grey-300);
  font-size: 14px; font-weight: 500;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.rail-nav .rail-link:hover { color: var(--nv-white); background: rgba(255,255,255,0.04); }
.rail-nav .rail-link.is-active {
  background: rgba(217,4,41,0.14);
  color: var(--nv-white);
  box-shadow: inset 3px 0 0 var(--nv-red);
}
.rail-nav .rail-link .glyph {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  font-size: 12px;
}
.rail-nav .rail-link.is-active .glyph { background: var(--nv-red); }
.rail-nav .rail-link .rail-label { flex: 1; }
/* Legacy rail indicators — superseded by .data-patch--inline (T10).
   Retained for any downlevel consumers that still emit them. */
.rail-nav .rail-link .live-bolt {
  margin-left: auto;
  font-size: 11px;
  line-height: 1;
  color: #22c55e;
  text-shadow: 0 0 6px rgba(34,197,94,0.55);
}
.rail-nav .rail-link .live-dot {
  margin-left: auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--nv-red);
  box-shadow: 0 0 0 2px rgba(217,4,41,0.18);
}

/* ===== Data-source integration patch (T10) =====
   .has-patch is the relative-positioned host. .data-patch is the corner dot.
   Inline variant (--inline) sits in flow next to a label (rail nav, screen-h title). */
.has-patch { position: relative; overflow: visible; }
/* .stat sets overflow: hidden for the hover-sweep gradient — override on patched
   tiles so the corner dot (which sits at -4/-4) is not clipped. */
.stat.has-patch { overflow: visible; }
.data-patch {
  position: absolute;
  top: -4px; right: -4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--nv-white);
  box-shadow: 0 0 0 1px rgba(0, 31, 63, 0.10), 0 1px 2px rgba(0, 31, 63, 0.10);
  z-index: 5;
  pointer-events: none;
}
.data-patch--seed { background: var(--nv-red); }
.data-patch--live { background: var(--nv-success); }
.data-patch--inline {
  position: static;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  border: none;
  width: 8px; height: 8px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.rail-nav .rail-link .data-patch--inline { margin-left: auto; }
.screen-h .data-patch--inline {
  margin-left: 10px;
  box-shadow: 0 0 0 2px rgba(0, 31, 63, 0.06);
}
.data-patch--seed.data-patch--inline { box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.18); }
.data-patch--live.data-patch--inline { box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.20); }

.rail-foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; color: var(--nv-grey-300);
}
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 5px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}
.badge-prototype { background: rgba(217,4,41,0.18); color: var(--nv-red); }
.rail-actor { font-family: "Inter", monospace; }

/* ===== Topbar ===== */
.content { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h);
  background: var(--nv-white);
  border-bottom: 1px solid var(--nv-grey-200);
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
}
.crumb { font-weight: 600; color: var(--nv-grey-700); display: flex; align-items: center; gap: 10px; }
.crumb .crumb-sep { color: var(--nv-grey-300); }
.crumb .crumb-current { color: var(--nv-navy); }
.topbar-actions { display: flex; gap: 8px; }
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  padding: 9px 14px; border-radius: var(--nv-radius);
  font: 600 13px "Manrope", sans-serif; letter-spacing: 0.01em;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.btn.primary { background: var(--nv-navy); color: var(--nv-white); }
.btn.primary:hover { background: var(--nv-navy-700); }
.btn.ghost { background: transparent; color: var(--nv-grey-700); border-color: var(--nv-grey-300); }
.btn.ghost:hover { background: var(--nv-grey-100); color: var(--nv-navy); }
.btn.danger { background: var(--nv-red); color: var(--nv-white); }
.btn.danger:hover { background: var(--nv-red-700); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn:focus-visible { outline: 3px solid rgba(0,31,63,0.18); outline-offset: 1px; }

/* ===== Screen ===== */
.screen {
  padding: 28px 30px 80px;
  animation: screen-in 220ms ease-out;
}
@keyframes screen-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.screen-h {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.screen-h h1 {
  font-family: "Manrope", sans-serif;
  font-weight: 700; font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: -0.005em; color: var(--nv-navy); margin: 0;
}
.screen-h p { color: var(--nv-grey-500); margin: 4px 0 0; max-width: 720px; }

/* ===== Cards ===== */
.card {
  background: var(--nv-white);
  border: 1px solid var(--nv-grey-200);
  border-radius: var(--nv-radius-lg);
  box-shadow: var(--nv-shadow-sm);
}
.card-h { padding: 16px 20px; border-bottom: 1px solid var(--nv-grey-200); display: flex; align-items: center; justify-content: space-between; }
.card-h h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--nv-navy); letter-spacing: -0.005em; }
.card-h .card-h-meta { color: var(--nv-grey-500); font-size: 12px; }
.card-b { padding: 18px 20px; }
.card-b.tight { padding: 0; }

/* ===== Stats grid ===== */
.stats-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 22px;
}
.stat {
  background: var(--nv-white); border: 1px solid var(--nv-grey-200);
  border-radius: var(--nv-radius-lg); padding: 16px 18px;
  box-shadow: var(--nv-shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--nv-shadow-md); }
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--nv-navy); border-top-left-radius: var(--nv-radius-lg); border-bottom-left-radius: var(--nv-radius-lg);
}
.stat.alt::before { background: var(--nv-red); }
.stat .lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nv-grey-500); font-weight: 700; }
.stat .val { font-family: "Inter", monospace; font-weight: 700; font-size: 28px; color: var(--nv-navy); letter-spacing: -0.01em; }
.stat .sub { font-size: 12px; color: var(--nv-grey-700); }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
.field-set {
  display: flex; flex-direction: column; gap: 6px;
}
.field-set label { font-size: 12px; font-weight: 600; color: var(--nv-grey-700); letter-spacing: 0.02em; }
.field-set .help { font-size: 11px; color: var(--nv-grey-500); }
.input, .select, .textarea {
  appearance: none;
  border: 1px solid var(--nv-grey-300);
  border-radius: var(--nv-radius);
  background: var(--nv-white);
  padding: 10px 12px;
  font: 14px "Manrope", sans-serif;
  color: var(--nv-grey-900);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--nv-navy);
  box-shadow: 0 0 0 4px rgba(0,31,63,0.08);
}
.textarea { min-height: 80px; resize: vertical; font-family: "Inter", monospace; font-size: 12.5px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--nv-grey-100); color: var(--nv-grey-700);
  border: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.chip:hover { background: var(--nv-grey-200); }
.chip.is-on {
  background: var(--nv-navy); color: var(--nv-white);
  border-color: var(--nv-navy-700);
}
.chip.tone-red.is-on { background: var(--nv-red); border-color: var(--nv-red-700); }

.segmented {
  display: inline-flex; padding: 3px; gap: 3px; background: var(--nv-grey-100);
  border-radius: var(--nv-radius); border: 1px solid var(--nv-grey-200);
}
.segmented button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--nv-grey-700);
  border-radius: 6px; transition: background 140ms ease, color 140ms ease;
}
.segmented button.is-on { background: var(--nv-white); color: var(--nv-navy); box-shadow: var(--nv-shadow-sm); }

.radio-ladder { display: flex; flex-direction: column; gap: 4px; }
.radio-ladder .rad {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--nv-grey-200); border-radius: var(--nv-radius);
  cursor: pointer; transition: border-color 140ms ease, background 140ms ease;
}
.radio-ladder .rad.is-on { border-color: var(--nv-navy); background: var(--nv-grey-50); }
.radio-ladder .rad .dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--nv-grey-300);
  position: relative;
}
.radio-ladder .rad.is-on .dot { border-color: var(--nv-navy); }
.radio-ladder .rad.is-on .dot::after {
  content: ""; position: absolute; inset: 2px;
  background: var(--nv-navy); border-radius: 50%;
}
.radio-ladder .rad .name { font-weight: 600; }
.radio-ladder .rad .pct { font-size: 11px; color: var(--nv-grey-500); font-family: "Inter", monospace; }

/* ===== Tables ===== */
.tbl-wrap { overflow-x: auto; }
.tbl {
  width: 100%; border-collapse: collapse;
  font-family: "Inter", sans-serif; font-size: 13px;
}
.tbl thead th {
  text-align: left; font-weight: 600; letter-spacing: 0.04em;
  color: var(--nv-grey-500); text-transform: uppercase; font-size: 10.5px;
  padding: 10px 14px; background: var(--nv-grey-50);
  border-bottom: 1px solid var(--nv-grey-200);
}
.tbl tbody td {
  padding: 11px 14px; border-bottom: 1px solid var(--nv-grey-100);
  color: var(--nv-grey-900);
}
.tbl tbody tr:hover { background: var(--nv-grey-50); }
.tbl .pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
}
.pill.tone-navy   { background: rgba(0,31,63,0.08);   color: var(--nv-navy); }
.pill.tone-red    { background: rgba(217,4,41,0.10);  color: var(--nv-red); }
.pill.tone-grey   { background: var(--nv-grey-100);   color: var(--nv-grey-700); }
.pill.tone-green  { background: rgba(22,163,74,0.10); color: var(--nv-success); }
.pill.tone-amber  { background: rgba(217,119,6,0.10); color: var(--nv-warn); }

/* ===== Tree ===== */
.tree { font-family: "Inter", sans-serif; font-size: 13px; }
.tree details { padding-left: 18px; border-left: 1px dashed var(--nv-grey-200); margin-left: 6px; }
.tree summary {
  cursor: pointer; padding: 6px 8px; border-radius: 6px;
  display: flex; gap: 8px; align-items: center;
}
.tree summary:hover { background: var(--nv-grey-50); }
.tree .leaf { padding: 6px 8px 6px 24px; color: var(--nv-grey-700); }
.tree .leaf.is-on { color: var(--nv-navy); font-weight: 600; }

/* ===== JSON viewer ===== */
.json {
  background: var(--nv-navy-900);
  color: #d6e2f0;
  border-radius: var(--nv-radius);
  padding: 14px 16px;
  font-family: "Inter", monospace;
  font-size: 12.5px; line-height: 1.55;
  overflow-x: auto; white-space: pre;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.json .k { color: #5ec2ff; }
.json .s { color: #ffb86b; }
.json .n { color: #b0f5a0; }
.json .b { color: #f48fb1; }
.json .nul { color: #777; }

/* ===== Pipeline viz ===== */
.pipeline { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.pipe-step {
  background: var(--nv-white); border: 1px solid var(--nv-grey-200);
  border-radius: var(--nv-radius); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--nv-shadow-sm);
  position: relative; opacity: 0; transform: translateY(6px);
  animation: pipe-in 360ms cubic-bezier(.2,.7,.3,1) forwards;
}
.pipe-step:nth-child(1)  { animation-delay:   0ms; }
.pipe-step:nth-child(2)  { animation-delay:  60ms; }
.pipe-step:nth-child(3)  { animation-delay: 120ms; }
.pipe-step:nth-child(4)  { animation-delay: 180ms; }
.pipe-step:nth-child(5)  { animation-delay: 240ms; }
.pipe-step:nth-child(6)  { animation-delay: 300ms; }
.pipe-step:nth-child(7)  { animation-delay: 360ms; }
.pipe-step:nth-child(8)  { animation-delay: 420ms; }
.pipe-step:nth-child(9)  { animation-delay: 480ms; }
.pipe-step:nth-child(10) { animation-delay: 540ms; }
.pipe-step:nth-child(11) { animation-delay: 600ms; }
.pipe-step:nth-child(12) { animation-delay: 660ms; }
@keyframes pipe-in { to { opacity: 1; transform: none; } }

.pipe-step .pipe-num {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--nv-navy); color: var(--nv-white);
  display: grid; place-items: center;
  font: 700 12px "Inter", monospace;
}
.pipe-step.is-pass .pipe-num { background: var(--nv-success); }
.pipe-step.is-fail .pipe-num { background: var(--nv-red); }
.pipe-step .pipe-lbl { font-weight: 600; color: var(--nv-grey-900); font-size: 13px; }
.pipe-step .pipe-trace { margin-left: auto; font: 600 11px "Inter", monospace; color: var(--nv-grey-500); }
.pipe-step.is-pass .pipe-trace { color: var(--nv-success); }
.pipe-step.is-fail .pipe-trace { color: var(--nv-red); }

/* ===== Toast ===== */
.toast {
  position: fixed; right: 22px; bottom: 22px;
  background: var(--nv-navy); color: var(--nv-white);
  padding: 12px 16px; border-radius: var(--nv-radius);
  box-shadow: var(--nv-shadow-lg);
  font-weight: 600; font-size: 13px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 30;
  max-width: 380px;
}
.toast.is-on { opacity: 1; transform: none; }

/* ===== Misc ===== */
.row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .row.split { grid-template-columns: 1.05fr 0.95fr; } }
.empty {
  padding: 28px; border-radius: var(--nv-radius-lg);
  background: var(--nv-grey-50); border: 1px dashed var(--nv-grey-300);
  text-align: center; color: var(--nv-grey-500);
}
.kbd {
  font: 600 11px "Inter", monospace; padding: 2px 6px;
  background: var(--nv-grey-100); border: 1px solid var(--nv-grey-200);
  border-radius: 4px; color: var(--nv-grey-700);
}
.divider { height: 1px; background: var(--nv-grey-200); margin: 14px 0; }

.action-row { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding-top: 6px; }

.matrix {
  width: 100%; border-collapse: collapse; font-family: "Inter", sans-serif; font-size: 12.5px;
}
.matrix th, .matrix td { border: 1px solid var(--nv-grey-200); padding: 8px 10px; text-align: center; }
.matrix th { background: var(--nv-grey-50); font-weight: 600; color: var(--nv-grey-700); }
.matrix td.cell-on { background: rgba(0,31,63,0.06); color: var(--nv-navy); font-weight: 700; }
.matrix th.row-h { text-align: left; background: var(--nv-white); color: var(--nv-navy); font-weight: 700; }

@media (max-width: 880px) {
  .nav-admin-root { grid-template-columns: 1fr; }
  .nav-rail { position: static; height: auto; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ===== Polish (SW-D060 Delight) ===== */
.nav-rail .brand-mark { transition: transform 200ms ease, box-shadow 200ms ease; }
.nav-rail .brand-mark:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06) inset, 0 12px 22px rgba(217,4,41,0.42);
}

.stat::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(0,31,63,0.04) 45%, transparent 60%);
  opacity: 0; transition: opacity 200ms ease;
  pointer-events: none;
}
.stat:hover::after { opacity: 1; }

.pipeline.is-all-green {
  position: relative;
  animation: pulse-success 800ms cubic-bezier(.2,.7,.3,1) 720ms 1 both;
}
@keyframes pulse-success {
  0%   { box-shadow: 0 0 0 0 rgba(22,163,74,0.0); }
  35%  { box-shadow: 0 0 0 8px rgba(22,163,74,0.18); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.0); }
}
.pipeline.is-all-green::after {
  content: "✓ Resolved"; position: absolute; right: 0; top: -28px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(22,163,74,0.12); color: var(--nv-success);
  font: 700 10.5px "Inter", monospace; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; animation: tag-in 280ms ease-out 720ms forwards;
}
@keyframes tag-in { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(-4px); } }

.toast.is-red { background: var(--nv-red); }
.toast.is-warn { background: var(--nv-warn); }
.toast.is-success { background: var(--nv-success); }

.tbl tbody tr { transition: background 120ms ease; }
.chip:focus-visible, .segmented button:focus-visible, .rail-link:focus-visible {
  outline: 3px solid rgba(0,31,63,0.18); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-admin-root *,
  .nav-admin-root *::before,
  .nav-admin-root *::after {
    animation-duration: 0ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0ms !important;
  }
}

/* ===== Wizard (T2 — two-pane capability-grant builder) ===== */

.wiz-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}
.wiz-pane {
  background: var(--nv-white);
  border: 1px solid var(--nv-grey-200);
  border-radius: 10px;
  box-shadow: var(--nv-shadow-sm);
  padding: 20px;
}
.wiz-pane.is-rail {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wiz-rail-head { border-bottom: 1px solid var(--nv-grey-200); padding-bottom: 12px; }
.wiz-rail-tag, .wiz-step-tag, .wiz-sub-tag, .wiz-modal-tag {
  font-size: 10.5px; font-weight: 700; color: var(--nv-grey-500);
  letter-spacing: 0.16em; text-transform: uppercase;
}
.wiz-rail-head h2 { margin: 4px 0 2px; font-size: 1rem; color: var(--nv-navy); }
.wiz-rail-head p  { margin: 0; font-size: 12px; color: var(--nv-grey-700); }

.wiz-step-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.wiz-step {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 8px; border-radius: 8px;
  cursor: default; transition: background 120ms ease, transform 120ms ease;
  outline: none;
}
.wiz-step.is-current,
.wiz-step.is-done   { cursor: pointer; }
.wiz-step.is-current:hover,
.wiz-step.is-done:hover { background: var(--nv-grey-100); transform: translateX(1px); }
.wiz-step.is-todo       { opacity: 0.7; }

.wiz-step-num {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Inter", monospace; font-weight: 700; font-size: 12px;
  background: var(--nv-grey-200); color: var(--nv-grey-700);
  transition: all 200ms ease;
}
.wiz-step.is-current .wiz-step-num {
  background: var(--nv-red); color: var(--nv-white);
  box-shadow: 0 0 0 4px rgba(217,4,41,0.16);
}
.wiz-step.is-done .wiz-step-num { background: var(--nv-success); color: var(--nv-white); }

.wiz-step-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wiz-step-dim   { font-size: 11.5px; font-weight: 700; color: var(--nv-navy); }
.wiz-step.is-current .wiz-step-dim { color: var(--nv-red); }
.wiz-step-value { font-size: 11px; color: var(--nv-grey-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "Inter", monospace; }
.wiz-step-value.muted { color: var(--nv-grey-400); font-style: italic; font-family: inherit; }

.wiz-rail-foot {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--nv-grey-200); padding-top: 14px;
}

/* Right pane */
.wiz-pane.is-step { display: flex; flex-direction: column; gap: 14px; min-height: 500px; }
.wiz-step-bar    { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wiz-step-h      { margin: 0; font-size: 1.4rem; color: var(--nv-navy); letter-spacing: -0.01em; }
.wiz-step-sub    { margin: 0; color: var(--nv-grey-700); font-size: 14px; max-width: 720px; line-height: 1.5; }
.wiz-step-content{ padding: 12px 0 24px; flex: 1; }
.wiz-step-actions{
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--nv-grey-200); padding-top: 16px;
}
.wiz-step-status { color: var(--nv-grey-500); font-size: 12px; flex: 1; }

/* Choice cards */
.wiz-cards         { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wiz-cards.is-half { grid-template-columns: repeat(2, 1fr); }
.wiz-card {
  border: 1px solid var(--nv-grey-200); background: var(--nv-white);
  padding: 18px; border-radius: 10px; text-align: left; cursor: pointer;
  transition: all 160ms ease;
  display: flex; flex-direction: column; gap: 6px;
  font-family: inherit;
}
.wiz-card:hover { border-color: var(--nv-navy); transform: translateY(-1px); box-shadow: var(--nv-shadow-md); }
.wiz-card.is-selected {
  border-color: var(--nv-red); background: rgba(217,4,41,0.04);
  box-shadow: 0 0 0 2px rgba(217,4,41,0.18) inset;
}
.wiz-card-glyph { font-size: 26px; color: var(--nv-navy); line-height: 1; }
.wiz-card.is-selected .wiz-card-glyph { color: var(--nv-red); }
.wiz-card h3 { margin: 0; font-size: 15px; color: var(--nv-navy); }
.wiz-card p  { margin: 0; font-size: 12.5px; color: var(--nv-grey-700); line-height: 1.45; }

.wiz-sub        { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--nv-grey-200); }
.wiz-sub h4     { margin: 6px 0 12px; font-size: 14px; color: var(--nv-navy); }
.wiz-hint       { font-size: 12px; color: var(--nv-grey-500); margin: 12px 0 0; }
.wiz-pick-wrap  { padding: 8px 0 16px; }
.wiz-placeholder{ padding: 32px; border: 1px dashed var(--nv-grey-200); border-radius: 10px; color: var(--nv-grey-500); text-align: center; }

/* Modal */
.wiz-modal {
  position: fixed; inset: 0;
  background: rgba(0,31,63,0.55);
  display: none; align-items: center; justify-content: center;
  z-index: 9000; backdrop-filter: blur(2px);
  animation: wiz-modal-in 160ms ease-out;
}
.wiz-modal.is-on { display: flex; }
.wiz-modal-card {
  max-width: 540px; width: calc(100% - 40px);
  background: var(--nv-white); border-radius: 12px;
  padding: 24px; box-shadow: 0 24px 64px rgba(0,31,63,0.36);
  border-top: 4px solid var(--nv-red);
}
.wiz-modal-tag  { color: var(--nv-red); }
.wiz-modal-card h3 { margin: 6px 0 8px; color: var(--nv-navy); font-size: 18px; }
.wiz-modal-card p  { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--nv-grey-700); }
.wiz-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
@keyframes wiz-modal-in { from { opacity: 0; } to { opacity: 1; } }

/* Responsive */
@media (max-width: 920px) {
  .wiz-grid { grid-template-columns: 1fr; }
  .wiz-pane.is-rail { position: static; }
  .wiz-cards { grid-template-columns: 1fr; }
}
/* T14b invariant probe 2026-05-10T18:29:17+02:00 */
