/* Shihanai · Operator-grade theme.
   Dark navy + sky-blue accent. Inter Tight display + Inter body + JetBrains Mono.
   Class names preserved from prior editorial theme so the rest of the portal
   adopts the new look automatically. */

:root {
  /* Surfaces (formerly --paper-*) → operator dark palette */
  --paper:        #0a0e1a;        /* page bg */
  --paper-2:      #121829;        /* elevated card / nav blur */
  --paper-3:      #1a2236;        /* 2nd elevation, hover */

  /* Text (formerly --ink-*) */
  --ink:          #e8ecf4;        /* primary */
  --ink-2:        #cdd6e4;        /* slightly dimmer body copy */
  --ink-soft:     #94a3b8;        /* dim labels */
  --ink-mute:     #64748b;        /* muted captions */

  /* Borders */
  --rule:         #2a3454;
  --rule-soft:    #1e2840;

  /* Accent · sky-blue with cyan as secondary */
  --hue: 200;
  --accent:       #38bdf8;
  --accent-2:     #22d3ee;
  --accent-deep:  #0ea5e9;
  --accent-soft:  rgba(56, 189, 248, 0.12);
  --accent-on:    #0a0e1a;

  /* Status */
  --ok:           #34d399;
  --warn:         #fbbf24;
  --crit:         #f87171;
  --info:         #60a5fa;

  --grid-line:    rgba(255,255,255,0.04);
  --bg-tint:      rgba(56, 189, 248, 0.04);

  /* Typography */
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif:   var(--display);   /* operator theme uses sans display in place of serif */
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --letter-tight: -0.02em;
  --letter-loose: 0.05em;

  --radius: 10px;
  --radius-sm: 6px;
}

/* Per-vertical accent hue (overlays on top of the sky default) */
[data-vertical="telecom"]      { --hue: 198; }
[data-vertical="finance"]      { --hue: 152; }
[data-vertical="healthcare"]   { --hue: 340; }
[data-vertical="public-sector"]{ --hue: 232; }
[data-vertical="energy"]       { --hue: 38;  }
[data-vertical="manufacturing"]{ --hue: 14;  }
[data-vertical="legal"]        { --hue: 270; }
[data-vertical="insurance"]    { --hue: 110; }
[data-vertical="retail"]       { --hue: 320; }
[data-vertical="logistics"]    { --hue: 180; }
[data-vertical="common"]       { --hue: 200; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-on); }

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.15s; }
a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }

/* ─────────── Typography ─────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.display { font-family: var(--display); font-weight: 700; letter-spacing: var(--letter-tight); line-height: 1.05; color: var(--ink); }
.serif { font-family: var(--display); }   /* sans display for operator theme */
.mono { font-family: var(--mono); }
.muted { color: var(--ink-soft); }
.tiny { font-size: 11px; letter-spacing: 0.04em; }

/* ─────────── Layout ─────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }

/* ─────────── Topnav ─────────── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.topnav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 32px;
  max-width: 1400px;
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand a { color: inherit; border-bottom: none; }
.brand-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  border-radius: 6px;
}
.brand-track {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-3);
  padding: 3px 8px;
  border-radius: 4px;
}

.nav-links { display: flex; gap: 4px; align-items: center; justify-self: center; }
.nav-link {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
  border: none !important;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--paper-3); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }

.nav-end { display: flex; gap: 8px; align-items: center; justify-self: end; }

/* ─────────── Mega-menu (Tracks dropdown) ─────────── */
.nav-link.has-mega { position: relative; }
.nav-link.has-mega::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
  transition: transform 0.18s;
}
.mega-host { position: relative; }
.mega-host:hover .nav-link::after,
.mega-host:focus-within .nav-link::after { transform: rotate(-135deg) translateY(0); opacity: 1; }

.mega-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  top: 64px;
  width: min(1100px, calc(100vw - 32px));
  background: color-mix(in srgb, var(--paper-2) 96%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.2);
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.mega-host:hover .mega-menu,
.mega-host:focus-within .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* invisible bridge so cursor can travel from the link into the menu */
.mega-host::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 16px;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 24px;
}
.mega-col { display: flex; flex-direction: column; gap: 10px; }
.mega-tier {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  padding: 6px 10px 4px;
  border-bottom: 1px solid var(--rule-soft);
}
.mega-track {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  color: var(--ink) !important;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.mega-track:hover {
  background: var(--paper-3);
  border-color: var(--rule-soft);
  transform: translateX(2px);
}
.mega-track .dot {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.04em;
}
.mega-track .meta { min-width: 0; }
.mega-track .name {
  display: block;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-track .tag {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--ink-mute);
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0;
  border: none;
  padding: 0;
  background: none;
}
.mega-track:hover .name { color: var(--accent); }

.mega-foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}
.mega-foot a {
  padding: 10px 14px;
  background: var(--paper-3);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink) !important;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}
.mega-foot a:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--paper-2);
}
.mega-foot a .arrow { font-family: var(--mono); color: var(--accent); transition: transform 0.15s; }
.mega-foot a:hover .arrow { transform: translateX(3px); }

@media (max-width: 1100px) {
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
  .mega-foot { grid-template-columns: 1fr; }
  .mega-menu { width: calc(100vw - 32px); }
}

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-decoration: none;
}
.btn:hover { border-bottom: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-on); }
.btn-secondary { background: var(--paper-2); color: var(--ink); border-color: var(--rule); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--paper-2); }
.btn-ghost { color: var(--ink-soft); border-color: transparent; padding: 6px 10px; }
.btn-ghost:hover { color: var(--ink); background: var(--paper-3); }
.btn-sm { padding: 6px 10px; font-size: 12px; }

/* ─────────── Hero ─────────── */
.hero {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 18px 0 14px;
  max-width: 22ch;
  color: var(--ink);
}
.hero h1 em { font-style: normal; color: var(--ink-soft); font-weight: 600; }
.lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0;
  font-weight: 400;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule-soft);
}
.stat-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.stat-label {
  font-family: var(--sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-top: 4px;
  font-weight: 500;
}

/* ─────────── Sections ─────────── */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--rule-soft); }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule-soft);
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-head .section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  align-self: end;
  padding-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}
.section-sub {
  font-family: var(--sans);
  font-style: normal;
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 2px;
}

/* ─────────── Cards / Module grid ─────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: all 0.2s;
}
.card[href]:hover { border-color: var(--accent); transform: translateY(-1px); }
.card[href]:hover .card-arrow { color: var(--accent-2); transform: translateX(4px); }
.card-arrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
  transition: all 0.2s;
}

.card-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.card-num .time { color: var(--ink-mute); font-weight: 500; }

.card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.card-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─────────── Tags ─────────── */
.tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  background: var(--paper-3);
  color: var(--ink-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
}
.tag-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}
.tag-premium {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
}
.tag-locked {
  background: var(--paper-3);
  color: var(--ink-mute);
}

/* ─────────── Module page layout ─────────── */
.module-layout {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  gap: 56px;
  padding: 48px 32px 96px;
  max-width: 1320px;
  margin: 0 auto;
}
.module-toc, .module-side {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 12.5px;
}
.module-toc h4, .module-side h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin: 0 0 14px;
  font-weight: 600;
}
.module-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.module-toc li { counter-increment: toc; margin-bottom: 1px; }
.module-toc a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 6px 8px;
  color: var(--ink-soft);
  font-size: 13px;
  border: none !important;
  border-radius: 4px;
  line-height: 1.4;
  transition: all 0.15s;
}
.module-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  padding-top: 2px;
}
.module-toc a:hover { color: var(--ink); background: var(--paper-3); }
.module-toc a.active { color: var(--accent); background: var(--accent-soft); }
.module-toc a.active::before { color: var(--accent); }

.module-content { min-width: 0; max-width: 68ch; }
.module-content h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 12px 0 16px;
  color: var(--ink);
}
.module-content > .lede { margin-bottom: 40px; }
.module-content h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  margin: 56px 0 16px;
  letter-spacing: -0.01em;
  scroll-margin-top: 80px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.module-content h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  margin: 28px 0 8px;
  color: var(--ink);
}
.module-content p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.module-content ul, .module-content ol { padding-left: 22px; margin: 0 0 18px; }
.module-content li { margin-bottom: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.module-content strong { color: var(--ink); font-weight: 600; }
.module-content em { font-style: italic; }

.module-content code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--paper-3);
  padding: 2px 6px;
  color: var(--accent);
  border-radius: 4px;
}
.module-content pre {
  background: #050810;
  color: #c5d0e6;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 16px 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-soft);
}
.module-content pre code { background: none; padding: 0; color: inherit; }

/* ─────────── Tables ─────────── */
.module-content table, .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 13.5px;
  font-family: var(--sans);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.module-content th, .module-content td,
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  color: var(--ink-2);
}
.module-content th, .data-table th {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--paper-2);
}

/* ─────────── Callouts ─────────── */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 14px 18px;
  margin: 24px 0;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.callout-title {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}
.callout.warn { border-left-color: var(--warn); }
.callout.warn .callout-title { color: var(--warn); }
.callout.success { border-left-color: var(--ok); }
.callout.success .callout-title { color: var(--ok); }
.callout.danger { border-left-color: var(--crit); }
.callout.danger .callout-title { color: var(--crit); }

/* ─────────── Quiz ─────────── */
.quiz {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 24px;
  margin: 32px 0;
  border-radius: var(--radius);
}
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-soft); }
.quiz-head h3 { font-family: var(--display); margin: 0; font-size: 18px; font-weight: 600; color: var(--ink); }
.quiz-q { font-weight: 600; margin: 18px 0 12px; color: var(--ink); }
.quiz-q-num { font-family: var(--mono); font-size: 10.5px; color: var(--accent); margin-right: 8px; letter-spacing: 0.08em; font-weight: 700; }
.quiz-options { display: flex; flex-direction: column; gap: 6px; }
.quiz-option {
  display: flex; gap: 12px; padding: 10px 14px;
  border: 1px solid var(--rule-soft);
  background: var(--paper-3);
  cursor: pointer; font-size: 14px;
  transition: all 0.15s;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}
.quiz-option:hover { border-color: var(--accent); }
.quiz-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option.correct { border-color: var(--ok); background: rgba(52, 211, 153, 0.1); color: var(--ok); }
.quiz-option.wrong { border-color: var(--crit); background: rgba(248, 113, 113, 0.1); color: var(--crit); }
.quiz-option-marker {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--paper);
  font-weight: 600;
}
.quiz-option.correct .quiz-option-marker { background: var(--ok); color: var(--paper); border-color: var(--ok); }
.quiz-option.wrong .quiz-option-marker { background: var(--crit); color: var(--paper); border-color: var(--crit); }
.quiz-feedback { margin-top: 12px; padding: 10px 12px; font-size: 13px; display: none; border-radius: var(--radius-sm); font-style: italic; font-family: var(--sans); }
.quiz-feedback.show { display: block; }

/* ─────────── Simulation ─────────── */
.sim {
  border: 1px solid var(--rule);
  margin: 32px 0;
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.sim-head {
  background: var(--paper-3);
  color: var(--ink);
  padding: 12px 18px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 600;
}
.sim-title { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.sim-title::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: livepulse 1.5s infinite;
}
@keyframes livepulse { 50% { opacity: 0.4; } }
.sim-controls { display: flex; gap: 6px; }
.sim-controls .btn { padding: 5px 10px; font-size: 11px; }

.sim-body { padding: 20px; background: var(--paper-2); }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  background: var(--rule-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.kpi {
  padding: 12px 14px;
  background: var(--paper-3);
}
.kpi-label {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
}
.kpi-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.kpi-value.good { color: var(--ok); }
.kpi-value.warn { color: var(--warn); }
.kpi-value.bad { color: var(--crit); }

.console {
  background: #050810;
  color: #c9d4e8;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 12px 14px;
  height: 280px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--rule-soft);
}
.console-line { display: flex; gap: 10px; padding: 2px 0; }
.console-ts { color: #4a5568; flex-shrink: 0; }
.console-tag { padding: 0 6px; font-size: 9.5px; font-weight: 600; align-self: center; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 3px; }
.console-tag.detect { background: rgba(96,165,250,.18); color: #93c5fd; }
.console-tag.correlate { background: rgba(56,189,248,.18); color: #7dd3fc; }
.console-tag.diagnose { background: rgba(167,139,250,.18); color: #c4b5fd; }
.console-tag.execute { background: rgba(251,191,36,.18); color: #fcd34d; }
.console-tag.verify { background: rgba(52,211,153,.18); color: #6ee7b7; }
.console-tag.alarm { background: rgba(248,113,113,.18); color: #fca5a5; }
.console-tag.crit  { background: rgba(239,68,68,.32); color: #fff; }
.console-tag.info  { background: rgba(255,255,255,.08); color: #c9d4e8; }
.console-msg { color: inherit; flex: 1; }

/* Network grid */
.netgrid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  padding: 10px;
  background: var(--paper-3);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
}
.cell {
  aspect-ratio: 1;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-mute);
  border-radius: 3px;
  transition: all 0.2s;
}
.cell.active { background: rgba(52,211,153,.15); border-color: var(--ok); color: var(--ok); }
.cell.warn { background: rgba(251,191,36,.15); border-color: var(--warn); color: var(--warn); animation: pulse 1.2s infinite; }
.cell.alarm { background: rgba(248,113,113,.15); border-color: var(--crit); color: var(--crit); animation: pulse 0.8s infinite; }
.cell.crit { background: var(--crit); color: #fff; border-color: var(--crit); animation: pulse 0.6s infinite; }
.cell.sleep { opacity: 0.4; }
@keyframes pulse { 50% { opacity: 0.55; } }

.slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.slider-row > span:first-child { font-size: 12px; color: var(--ink-soft); flex: 1; }
.slider-row input[type=range] { flex: 2; accent-color: var(--accent); }
.slider-val { font-family: var(--mono); font-size: 12px; color: var(--accent); min-width: 44px; text-align: right; font-weight: 600; }

/* ─────────── Module nav ─────────── */
.module-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
}
.module-nav-btn {
  display: flex; flex-direction: column;
  padding: 16px 20px;
  border: 1px solid var(--rule-soft);
  text-decoration: none !important;
  color: var(--ink) !important;
  background: var(--paper-2);
  transition: all 0.15s;
  border-radius: var(--radius-sm);
}
.module-nav-btn:hover { border-color: var(--accent); background: var(--paper-3); }
.module-nav-btn.next { text-align: right; align-items: flex-end; }
.module-nav-btn .label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; font-weight: 600; }
.module-nav-btn .title { font-family: var(--display); font-size: 16px; font-weight: 600; }

/* ─────────── Auth forms ─────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 440px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--rule-soft);
  background: var(--paper-2);
  border-radius: var(--radius);
}
.auth-label { display: flex; flex-direction: column; gap: 6px; }
.auth-label > span { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; }
.auth-input {
  background: var(--paper-3);
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.auth-input:focus { outline: none; border-color: var(--accent); background: var(--paper-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(248,113,113,0.1);
  border: 1px solid var(--crit);
  color: var(--crit);
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ─────────── Footer ─────────── */
footer {
  border-top: 1px solid var(--rule-soft);
  padding: 32px 0;
  margin-top: 64px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.footer-inner { display: flex; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ─────────── Tier ─────────── */
.tier-badge {
  display: inline-flex;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
}
.tier-badge.premium { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
.tier-badge.free { color: var(--ink-soft); background: var(--paper-3); }

.paywall {
  margin: 32px 0;
  padding: 32px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  text-align: center;
  border-radius: var(--radius);
}
.paywall .lock {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 18px;
  border-radius: var(--radius-sm);
}
.paywall h3 { font-family: var(--display); font-weight: 700; margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.paywall p { color: var(--ink-soft); max-width: 480px; margin: 0 auto 18px; font-size: 14px; line-height: 1.55; }

/* progress */
.progress-bar { height: 4px; background: var(--paper-3); position: relative; overflow: hidden; border-radius: 2px; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s; border-radius: 2px; }

/* utility */
.flex { display: flex; }
.flex-gap { gap: 12px; }
.mt-4 { margin-top: 32px; }
.mt-2 { margin-top: 16px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--rule-soft); margin: 32px 0; }

/* responsive */
@media (max-width: 960px) {
  .module-layout { grid-template-columns: 1fr; padding: 24px 20px; }
  .module-toc, .module-side { position: static; }
  .sim-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

/* ─────────── Operator-grade homepage extras ───────────
   New blocks for the index.html redesign — track-tab selector,
   pillars, careers grid, employer KPIs. */

.op-tab-selector {
  margin-top: 36px;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  overflow: hidden;
}
.op-tab-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-soft);
}
.op-tab {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule-soft);
  border-top: 2px solid transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.op-tab:last-child { border-right: none; }
.op-tab .tab-tier {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 4px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.op-tab:hover { background: var(--paper-3); color: var(--ink); }
.op-tab.active { background: var(--paper-3); color: var(--accent); border-top-color: var(--accent); }

.op-tab-detail {
  padding: 28px 28px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
.op-tab-detail h2 {
  font-family: var(--display);
  font-size: 30px;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}
.op-tab-detail .tag-line {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.op-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.op-stat {
  padding: 12px 14px;
  background: var(--paper-3);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
}
.op-stat .n {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.op-stat .l {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  font-weight: 500;
}

.op-bigstat .n {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.op-bigstat .l {
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  font-weight: 500;
}

.op-pillar {
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 22px;
  transition: all 0.2s;
}
.op-pillar:hover { border-color: var(--accent); }
.op-pillar .n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 10px;
}
.op-pillar h3 { font-size: 18px; margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.op-pillar p { color: var(--ink-soft); font-size: 14px; margin: 0; line-height: 1.55; }

.op-career-tile {
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
}
.op-career-tile .head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}
.op-career-tile .roles { font-size: 13px; color: var(--ink); line-height: 1.5; }

.op-row-kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.op-row-kpi:last-child { border-bottom: none; }
.op-row-kpi .k { font-size: 13px; color: var(--ink-soft); }
.op-row-kpi .v { font-family: var(--mono); font-size: 18px; color: var(--ink); font-weight: 600; }
.op-row-kpi .sub { font-size: 11px; color: var(--ink-mute); }

/* ─────────── Admin console ─────────── */
.adm-body {
  background: #050810;
  color: var(--ink);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.adm-sidebar {
  background: #0a0e1a;
  border-right: 1px solid var(--rule);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.adm-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.adm-brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  border-radius: 8px;
}
.adm-brand-name { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.adm-brand-tag { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }

.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  transition: all 0.12s;
}
.adm-nav-link:hover { background: var(--paper-2); color: var(--ink); }
.adm-nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.adm-nav-icon { font-family: var(--mono); font-size: 14px; opacity: 0.7; width: 24px; flex-shrink: 0; }
.adm-nav-badge {
  background: var(--accent);
  color: var(--accent-on, #050810);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.adm-sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.adm-user-pill {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 6px;
}
.adm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 14px;
}
.adm-user-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.adm-user-role { font-size: 10.5px; color: var(--ink-mute); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.adm-version {
  font-family: var(--mono); font-size: 10px; color: var(--ink-mute);
  letter-spacing: 0.06em; margin-top: 12px; text-align: center;
}

.adm-main {
  padding: 32px 36px;
  max-width: 100%;
  min-width: 0;
}

.adm-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule-soft);
  gap: 16px;
}
.adm-header-title {
  font-family: var(--display); font-weight: 700; font-size: 28px;
  letter-spacing: -0.02em; color: var(--ink);
}
.adm-header-sub {
  font-size: 13px; color: var(--ink-soft); margin-top: 4px;
}
.adm-header-actions { display: flex; gap: 8px; align-items: center; }

/* Admin login (separate state on /admin/index.html) */
.adm-login {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #050810 0%, #0a0e1a 70%);
  padding: 24px;
}
.adm-login-card {
  width: 100%; max-width: 420px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4), 0 0 0 1px var(--rule-soft);
}
.adm-login-brand {
  text-align: center; margin-bottom: 28px;
}
.adm-login-mark {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(56,189,248,0.3);
}
.adm-login-title {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em; color: var(--ink);
}
.adm-login-sub {
  font-size: 12.5px; color: var(--ink-soft); margin-top: 4px;
}
.adm-login-form { display: flex; flex-direction: column; gap: 14px; }

.adm-card {
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.adm-card-title {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
  margin-bottom: 12px;
}
.adm-card-value {
  font-family: var(--display); font-size: 30px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1;
}
.adm-card-delta {
  font-family: var(--mono); font-size: 11px; color: var(--ok);
  margin-top: 6px; letter-spacing: 0.04em;
}
.adm-card-delta.bad { color: var(--crit); }
.adm-card-delta.warn { color: var(--warn); }

.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}
.adm-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600;
  color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.adm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
  vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: var(--paper-3); }

.adm-row-actions { display: flex; gap: 6px; }
.adm-row-actions .btn { padding: 4px 10px; font-size: 11px; }

.adm-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.adm-pill-tier-free       { background: rgba(148,163,184,0.15); color: #94a3b8; }
.adm-pill-tier-premium    { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.adm-pill-tier-enterprise { background: rgba(167,139,250,0.18); color: #c4b5fd; }
.adm-pill-status-active     { background: rgba(52,211,153,0.15); color: var(--ok); }
.adm-pill-status-suspended  { background: rgba(248,113,113,0.15); color: var(--crit); }
.adm-pill-pay-succeeded     { background: rgba(52,211,153,0.15); color: var(--ok); }
.adm-pill-pay-refunded      { background: rgba(251,191,36,0.15); color: var(--warn); }
.adm-pill-pay-failed        { background: rgba(248,113,113,0.15); color: var(--crit); }
.adm-pill-yes               { background: rgba(56,189,248,0.15); color: var(--accent); }
.adm-pill-no                { background: rgba(148,163,184,0.12); color: #94a3b8; }

.adm-toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.adm-search {
  flex: 1; min-width: 220px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 9px 14px;
  font-family: inherit; font-size: 13px;
  border-radius: var(--radius-sm);
}
.adm-search:focus { outline: none; border-color: var(--accent); }
.adm-select {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 8px 12px;
  font-family: inherit; font-size: 12.5px;
  border-radius: var(--radius-sm);
}
.adm-select:focus { outline: none; border-color: var(--accent); }

/* ─────────── Tracks filter bar ─────────── */
.trk-filter {
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.trk-filter-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.trk-filter-input {
  flex: 1 1 280px; min-width: 220px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 9px 14px;
  font-family: inherit; font-size: 13px;
  border-radius: var(--radius-sm);
}
.trk-filter-input:focus { outline: none; border-color: var(--accent); }
.trk-filter-input::placeholder { color: var(--ink-mute); }
@media (max-width: 720px) {
  .trk-filter-row { flex-direction: column; align-items: stretch; }
  .trk-filter-row > * { width: 100%; }
}

/* ─────────── Module breadcrumbs ─────────── */
.module-breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--ink-mute);
  text-transform: uppercase;
}
.module-breadcrumbs a {
  color: var(--ink-soft); border: none;
  text-decoration: none;
}
.module-breadcrumbs a:hover { color: var(--accent); }
.module-breadcrumbs .sep { color: var(--ink-mute); opacity: 0.5; }
.module-breadcrumbs .current { color: var(--ink); }

/* ─────────── Related modules sidebar ─────────── */
.related-modules { margin-top: 28px; }
.related-modules h4 {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute); margin: 0 0 10px;
}
.related-mod {
  display: block; padding: 10px 12px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--paper-2);
  color: inherit; text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.related-mod:hover {
  border-color: var(--accent);
  background: var(--paper-3);
}
.related-mod .rm-num {
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.related-mod .rm-title {
  font-family: var(--serif); font-size: 13px;
  color: var(--ink); margin-top: 3px; line-height: 1.35;
}
.related-mod.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.related-mod.is-current .rm-title { color: var(--accent); }

.adm-modal {
  position: fixed; inset: 0;
  background: rgba(5,8,16,0.78);
  display: none; place-items: center;
  z-index: 200;
  padding: 24px;
}
.adm-modal.show { display: grid; }
.adm-modal-card {
  width: 100%; max-width: 540px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  max-height: 85vh; overflow-y: auto;
}

.adm-toast {
  padding: 10px 14px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  animation: adm-toast-in 0.2s ease-out;
}
.adm-toast-success { border-left-color: var(--ok); }
.adm-toast-error   { border-left-color: var(--crit); }
.adm-toast-warn    { border-left-color: var(--warn); }
@keyframes adm-toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.adm-form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.adm-form-row label { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.adm-form-row input, .adm-form-row select, .adm-form-row textarea {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 9px 12px;
  font-family: inherit; font-size: 13px;
  border-radius: var(--radius-sm);
}
.adm-form-row textarea { font-family: var(--mono); font-size: 12px; min-height: 120px; line-height: 1.55; }
.adm-form-row input:focus, .adm-form-row select:focus, .adm-form-row textarea:focus { outline: none; border-color: var(--accent); }

.adm-empty { padding: 48px 20px; text-align: center; color: var(--ink-mute); font-size: 14px; }

/* Two-pane content editor */
.adm-content-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.adm-content-list {
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  max-height: 70vh; overflow-y: auto;
}
.adm-content-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: var(--ink);
}
.adm-content-item:hover { background: var(--paper-3); }
.adm-content-item.active { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.adm-content-item-track { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.adm-content-item-title { font-size: 14px; font-weight: 500; margin-top: 4px; }
.adm-content-item-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-mute); margin-top: 4px; }
.adm-override-mark { color: var(--warn); margin-left: 6px; }

@media (max-width: 900px) {
  .adm-body { grid-template-columns: 1fr; }
  .adm-sidebar { position: relative; height: auto; }
  .adm-content-grid { grid-template-columns: 1fr; }
}
