:root {
  --ink-950: #050c12;
  --ink-900: #07131d;
  --ink-850: #0a1823;
  --ink-800: #0d202c;
  --ink-750: #122a38;
  --steel-700: #4b6672;
  --steel-600: #67808b;
  --steel-500: #879da5;
  --steel-400: #a8b8bc;
  --steel-300: #b9c5c7;
  --steel-200: #d7dede;
  --text-muted: #7f98a1;
  --text-secondary: #9bafb5;
  --paper: #edf0ed;
  --paper-warm: #e6e8e3;
  --orange: #ff8a32;
  --orange-bright: #ff9d52;
  --orange-dark: #b54f0c;
  --cyan: #5ad0d7;
  --green: #6ad495;
  --red: #ff6b62;
  --yellow: #edc55b;
  --line: rgba(151, 177, 185, .16);
  --line-strong: rgba(151, 177, 185, .28);
  --panel: rgba(10, 25, 36, .88);
  --panel-solid: #0b1c27;
  --shadow: 0 24px 70px rgba(0, 0, 0, .27);
  --sidebar-width: 246px;
  --topbar-height: 86px;
  --display: "Bahnschrift SemiCondensed", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --body: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; overflow-x: hidden; background: var(--ink-950); }
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--steel-200);
  background:
    radial-gradient(circle at 78% 8%, rgba(64, 116, 130, .12), transparent 29rem),
    linear-gradient(rgba(112, 146, 154, .027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 146, 154, .027) 1px, transparent 1px),
    var(--ink-900);
  background-size: auto, 28px 28px, 28px 28px, auto;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
body.drawer-open, body.nav-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { color: var(--ink-950); background: var(--orange); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ink-900); }
::-webkit-scrollbar-thumb { background: var(--steel-700); border: 2px solid var(--ink-900); }

.boot-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-content: center; gap: 20px;
  text-align: center; background: var(--ink-950);
  transition: opacity .35s ease, visibility .35s ease;
}
.boot-screen.fade-out { opacity: 0; visibility: hidden; }
.boot-screen p { margin: 0; color: var(--steel-500); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.boot-mark { display: flex; align-items: end; justify-content: center; gap: 5px; height: 34px; }
.boot-mark i { width: 7px; background: var(--orange); animation: bootBars 1s ease-in-out infinite; }
.boot-mark i:nth-child(1) { height: 18px; }
.boot-mark i:nth-child(2) { height: 31px; animation-delay: .12s; }
.boot-mark i:nth-child(3) { height: 24px; animation-delay: .24s; }
@keyframes bootBars { 0%, 100% { transform: scaleY(.45); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

.login-stage {
  min-height: 100vh; padding: 28px;
  display: grid; place-items: center;
  background:
    linear-gradient(115deg, transparent 0 50%, rgba(255, 138, 50, .035) 50% 50.2%, transparent 50.2%),
    radial-gradient(circle at 18% 18%, rgba(76, 139, 153, .17), transparent 25rem);
}
.login-stage::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, .07) 3px 4px);
  opacity: .42;
}
.login-panel {
  position: relative; width: min(1040px, 100%); min-height: 610px;
  display: grid; grid-template-columns: 1.25fr .75fr; grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line-strong); background: rgba(7, 19, 29, .91); box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  animation: revealPanel .62s cubic-bezier(.2, .76, .18, 1) both;
}
.login-panel::before { content: ""; position: absolute; top: 0; right: 26px; left: 0; height: 3px; background: linear-gradient(90deg, var(--orange) 0 22%, var(--steel-700) 22%); }
.login-panel::after { content: "HC / AUTO / 01"; position: absolute; right: -28px; bottom: 92px; transform: rotate(-90deg); color: var(--steel-700); font: 10px var(--mono); letter-spacing: .2em; }
@keyframes revealPanel { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }
.login-brand { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; padding: 26px 30px; border-bottom: 1px solid var(--line); }
.login-brand > div:last-child { display: flex; flex-direction: column; }
.login-brand span { color: var(--steel-500); font: 10px var(--mono); letter-spacing: .12em; }
.login-brand h1 { margin: 1px 0 0; color: var(--paper); font: 600 19px/1.1 var(--display); letter-spacing: .08em; }
.brand-glyph { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 138, 50, .38); background: rgba(255, 138, 50, .07); }
.brand-glyph svg { width: 31px; fill: var(--steel-300); }
.brand-glyph .brand-spark { fill: none; stroke: var(--orange); stroke-width: 2; }
.login-copy { padding: 80px 70px 60px; border-right: 1px solid var(--line); }
.eyebrow { margin: 0 0 8px; color: var(--orange); font: 700 10px/1.3 var(--mono); letter-spacing: .17em; text-transform: uppercase; }
.login-copy h2 { margin: 10px 0 26px; color: var(--paper); font: 600 clamp(42px, 6vw, 70px)/1.04 var(--display); letter-spacing: -.035em; }
.login-copy h2 em { color: transparent; -webkit-text-stroke: 1px var(--steel-500); font-style: normal; }
.login-copy > p:last-child { max-width: 560px; margin: 0; color: var(--steel-400); font-size: 15px; line-height: 2; }
.login-form { align-self: center; padding: 54px 46px; display: grid; gap: 22px; }
label > span { display: block; margin-bottom: 8px; color: var(--steel-400); font-size: 12px; font-weight: 650; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 0;
  color: var(--paper); background: rgba(4, 13, 20, .72); outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input, select { height: 44px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 138, 50, .09); background: var(--ink-950); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { color-scheme: dark; }
.form-error { min-height: 20px; margin: -7px 0 0; color: var(--red); font-size: 12px; }
.login-panel > footer { grid-column: 1 / -1; padding: 17px 30px; display: flex; align-items: center; justify-content: space-between; color: var(--steel-600); border-top: 1px solid var(--line); font: 10px var(--mono); letter-spacing: .1em; }
.signal { display: flex; align-items: center; gap: 8px; }
.signal i, .api-plate > i, .live-stamp i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel-600); box-shadow: 0 0 0 4px rgba(110, 135, 145, .08); }
.signal i.online, .api-plate > i.online { background: var(--green); box-shadow: 0 0 10px rgba(106, 212, 149, .6); }
.signal i.offline, .api-plate > i.offline { background: var(--red); box-shadow: 0 0 10px rgba(255, 107, 98, .5); }

.button {
  min-height: 42px; padding: 0 17px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .035em; text-decoration: none;
  transition: transform .16s ease, background .16s, border-color .16s, color .16s, opacity .16s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .46; }
.button-primary { color: #19140f; background: var(--orange); border-color: var(--orange); box-shadow: 0 8px 24px rgba(255, 138, 50, .12); }
.button-primary:hover:not(:disabled) { background: var(--orange-bright); }
.button-secondary { color: var(--steel-200); background: rgba(69, 97, 110, .1); border-color: var(--line-strong); }
.button-secondary:hover:not(:disabled) { border-color: var(--steel-500); background: rgba(69, 97, 110, .2); }
.button-danger-ghost { color: var(--steel-300); background: transparent; border-color: var(--line-strong); }
.button-danger-ghost:hover:not(:disabled), .button-danger-ghost.is-paused { color: #fff; border-color: rgba(255, 107, 98, .64); background: rgba(255, 107, 98, .1); }
.button-wide { width: 100%; justify-content: space-between; height: 50px; padding: 0 18px; }
.button-wide b { font-size: 20px; font-weight: 400; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width);
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; background: rgba(5, 14, 21, .97); border-right: 1px solid var(--line);
  box-shadow: 18px 0 50px rgba(0, 0, 0, .13);
}
.sidebar::after { content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 86px; background: var(--orange); }
.sidebar-brand { height: var(--topbar-height); padding: 0 22px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); text-decoration: none; }
.sidebar-brand, .primary-nav, .sidebar-foot { flex-shrink: 0; }
.brand-glyph.small { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-glyph.small svg { width: 27px; }
.sidebar-brand > span:last-child { display: flex; flex-direction: column; }
.sidebar-brand b { color: var(--paper); font: 600 16px var(--display); letter-spacing: .08em; }
.sidebar-brand small { color: var(--steel-600); font: 9px var(--mono); letter-spacing: .18em; }
.primary-nav { padding: 24px 13px; display: grid; gap: 6px; }
.nav-item { position: relative; width: 100%; height: 46px; padding: 0 11px; display: grid; grid-template-columns: 23px 1fr auto; gap: 10px; align-items: center; border: 1px solid transparent; background: transparent; color: var(--steel-500); cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; }
.nav-item:first-child svg, .nav-item:nth-child(2) svg { fill: currentColor; stroke: none; }
.nav-item span { font-size: 13px; font-weight: 650; }
.nav-item kbd { color: var(--steel-700); font: 9px var(--mono); }
.nav-item:hover { color: var(--steel-200); background: rgba(122, 151, 159, .06); }
.nav-item.active { color: var(--paper); border-color: rgba(255, 138, 50, .17); background: linear-gradient(90deg, rgba(255, 138, 50, .12), rgba(255, 138, 50, .025)); }
.nav-item.active::before { content: ""; position: absolute; left: -13px; top: 8px; bottom: 8px; width: 3px; background: var(--orange); box-shadow: 0 0 14px rgba(255, 138, 50, .45); }
.nav-item.active svg { color: var(--orange); }
.nav-item.active kbd { color: var(--orange-dark); }
.sidebar-foot { margin-top: auto; padding: 17px 15px; border-top: 1px solid var(--line); }
.system-clock { padding: 0 9px 17px; display: grid; grid-template-columns: 1fr auto; align-items: end; }
.system-clock span { color: var(--steel-600); font-size: 10px; }
.system-clock b { color: var(--steel-300); font: 18px var(--mono); }
.system-clock small { grid-column: 1 / -1; color: var(--steel-700); font: 9px var(--mono); }
.operator { width: 100%; padding: 10px; display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; transition: .18s; }
.operator:hover { border-color: var(--line); background: rgba(122, 151, 159, .05); }
.operator-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--orange); border: 1px solid rgba(255, 138, 50, .3); background: rgba(255, 138, 50, .07); font: 700 10px var(--mono); }
.operator > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.operator b { overflow: hidden; color: var(--steel-300); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.operator small { color: var(--steel-700); font-size: 9px; }
.operator i { color: var(--steel-700); font-style: normal; }

.workspace { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-height); padding: 0 clamp(20px, 3vw, 42px);
  display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 29, .9); backdrop-filter: blur(17px);
}
.breadcrumb { margin: 0 0 2px; color: var(--steel-600); font: 9px var(--mono); letter-spacing: .13em; }
.breadcrumb span { color: var(--orange-dark); }
.topbar h1 { margin: 0; color: var(--paper); font: 600 23px/1.2 var(--display); letter-spacing: .04em; }
.topbar-title { min-width: 0; }
.topbar-title h1, .topbar-title p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-status { display: flex; align-items: center; gap: 13px; }
.mode-plate, .api-plate { height: 48px; padding: 0 16px; border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; justify-content: center; }
.mode-plate small, .api-plate small { color: var(--steel-600); font-size: 9px; line-height: 1.3; }
.mode-plate b, .api-plate b { color: var(--steel-300); font: 650 11px var(--display); letter-spacing: .04em; }
.mode-plate[data-mode="shadow"] b { color: var(--cyan); }
.mode-plate[data-mode="review"] b { color: var(--yellow); }
.mode-plate[data-mode="auto"] b { color: var(--orange); }
.api-plate { flex-direction: row; align-items: center; gap: 10px; }
.api-plate span { display: flex; flex-direction: column; }
.icon-button { width: 42px; height: 42px; padding: 0; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }
.mobile-nav-trigger { display: none; }
.alert-strip { position: sticky; top: var(--topbar-height); z-index: 19; min-height: 42px; padding: 8px clamp(20px, 3vw, 42px); display: flex; align-items: center; gap: 13px; color: #17120d; background: var(--orange); font-size: 12px; }
.alert-strip b { font-family: var(--display); letter-spacing: .03em; }
.alert-strip span { flex: 1; opacity: .78; }
.alert-strip button { border: 0; background: transparent; cursor: pointer; font-size: 21px; }

.page { display: none; padding: 30px clamp(20px, 3vw, 42px) 56px; }
.page.active { display: block; }
.panel-reveal { animation: sectionIn .46s cubic-bezier(.2, .75, .2, 1) both; }
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.command-ribbon { min-height: 116px; padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid var(--line-strong); background: linear-gradient(102deg, rgba(24, 53, 67, .61), rgba(9, 25, 36, .8)); position: relative; overflow: hidden; }
.command-ribbon::before { content: ""; position: absolute; inset: 0 64% 0 0; pointer-events: none; background: repeating-linear-gradient(135deg, transparent 0 15px, rgba(255,255,255,.018) 15px 16px); }
.command-ribbon::after { content: ""; position: absolute; right: 0; top: 0; width: 6px; height: 100%; background: var(--orange); }
.command-copy { position: relative; }
.command-copy h2 { margin: 0 0 4px; color: var(--paper); font: 600 24px var(--display); }
.command-copy > p:last-child { margin: 0; color: var(--steel-400); font-size: 12px; }
.command-actions { position: relative; display: flex; flex: 0 0 auto; gap: 9px; }
.run-icon { font-size: 10px; }

.metric-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.metric-card { position: relative; min-height: 116px; padding: 20px; display: grid; grid-template-columns: 1fr auto; align-items: start; background: rgba(10, 25, 36, .72); border-right: 1px solid var(--line); overflow: hidden; }
.metric-card:last-child { border-right: 0; }
.metric-card::after { content: ""; position: absolute; right: -18px; bottom: -32px; width: 75px; height: 75px; border: 1px solid rgba(110, 135, 145, .08); transform: rotate(45deg); }
.metric-card span { color: var(--steel-500); font-size: 11px; }
.metric-card b { grid-row: 1 / 3; grid-column: 2; color: var(--paper); font: 500 40px/1 var(--display); }
.metric-card small { align-self: end; color: var(--steel-700); font: 8px var(--mono); letter-spacing: .12em; }
.metric-card.accent-orange b { color: var(--orange); }
.metric-card.accent-red b { color: var(--red); }

.overview-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); gap: 16px; }
.panel, .data-panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 12px 34px rgba(0, 0, 0, .08); }
.panel-header { min-height: 74px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-header h3 { margin: 0; color: var(--steel-200); font: 600 16px var(--display); letter-spacing: .025em; }
.panel-header .eyebrow { margin-bottom: 3px; color: var(--steel-600); font-size: 8px; }
.live-stamp { display: inline-flex; align-items: center; gap: 8px; color: var(--steel-600); font: 8px var(--mono); letter-spacing: .12em; }
.live-stamp i { background: var(--green); animation: pulseSignal 2s ease-in-out infinite; }
@keyframes pulseSignal { 50% { box-shadow: 0 0 0 7px rgba(106, 212, 149, 0); } }
.flow-panel { min-height: 330px; }
.pipeline-flow { padding: 38px 22px 27px; display: flex; align-items: flex-start; }
.flow-node { flex: 0 0 auto; min-width: 62px; display: grid; justify-items: center; gap: 9px; opacity: .5; }
.flow-node > i { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--steel-700); background: var(--ink-900); color: var(--steel-500); font: normal 9px var(--mono); transform: rotate(45deg); }
.flow-node > i > b { color: inherit; font: inherit; transform: rotate(-45deg); }
.flow-node span { display: flex; flex-direction: column; align-items: center; }
.flow-node b { color: var(--steel-300); font-size: 11px; }
.flow-node small { color: var(--steel-700); font: 7px var(--mono); }
.flow-node.complete, .flow-node.active { opacity: 1; }
.flow-node.complete > i { color: var(--ink-950); border-color: var(--green); background: var(--green); }
.flow-node.active > i { color: var(--ink-950); border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 5px rgba(255, 138, 50, .08), 0 0 22px rgba(255, 138, 50, .18); }
.flow-node.failed > i { color: #fff; border-color: var(--red); background: var(--red); }
.flow-line { flex: 1; min-width: 12px; height: 38px; display: flex; align-items: center; }
.flow-line i { display: block; width: 100%; height: 1px; background: var(--steel-700); }
.flow-line.complete i { background: var(--green); }
.run-detail { margin: 0 20px 20px; min-height: 62px; padding: 13px 15px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: rgba(4, 13, 20, .37); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--steel-600); }
.status-dot.running { background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: pulseSignal 1.5s infinite; }
.status-dot.success { background: var(--green); }
.status-dot.error { background: var(--red); }
.run-detail div { display: flex; flex-direction: column; min-width: 0; }
.run-detail b { overflow: hidden; color: var(--steel-300); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.run-detail small { overflow: hidden; color: var(--steel-600); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.run-detail time { color: var(--steel-600); font: 9px var(--mono); }
.safety-panel { grid-row: span 2; }
.safety-dial { width: 164px; aspect-ratio: 1; margin: 34px auto 25px; padding: 14px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--steel-700) 0 76%, rgba(41,68,82,.15) 76%); position: relative; }
.safety-dial::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel-solid); }
.safety-dial::after { content: ""; position: absolute; top: 0; left: 50%; width: 2px; height: 15px; background: var(--orange); transform: translateX(-50%); }
.safety-dial div { position: relative; width: 100%; height: 100%; display: grid; place-content: center; text-align: center; border: 1px solid var(--line); border-radius: 50%; }
.safety-dial strong { color: var(--steel-300); font: 650 17px var(--display); letter-spacing: .08em; }
.safety-dial small { color: var(--steel-600); font-size: 9px; }
.safety-dial.unlocked { background: conic-gradient(var(--orange) 0 94%, rgba(255,138,50,.14) 94%); }
.safety-dial.unlocked strong { color: var(--orange); }
.safety-list { margin: 0 20px 22px; }
.safety-list div { padding: 10px 0; display: flex; justify-content: space-between; border-top: 1px dashed var(--line); }
.safety-list dt { color: var(--steel-600); font-size: 10px; }
.safety-list dd { margin: 0; color: var(--steel-300); font: 10px var(--mono); }
.queue-panel, .events-panel { min-height: 272px; }
.text-button { border: 0; background: transparent; color: var(--steel-500); cursor: pointer; font-size: 10px; }
.text-button:hover { color: var(--orange); }
.compact-list, .event-stream { padding: 4px 20px 15px; }
.compact-item { min-height: 57px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); }
.compact-index { color: var(--steel-600); font: 9px var(--mono); }
.compact-item > div { min-width: 0; display: flex; flex-direction: column; }
.compact-item b { overflow: hidden; color: var(--steel-300); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-item small { color: var(--steel-700); font-size: 8px; }
.compact-item time { color: var(--steel-600); font: 8px var(--mono); }
.event-item { min-height: 56px; display: grid; grid-template-columns: 8px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.event-item > i { width: 6px; height: 6px; border-radius: 50%; background: var(--steel-600); }
.event-item.success > i { background: var(--green); }
.event-item.failed > i { background: var(--red); }
.event-item.warning > i { background: var(--yellow); }
.event-item > div { min-width: 0; display: flex; flex-direction: column; }
.event-item b { overflow: hidden; color: var(--steel-400); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.event-item small, .event-item time { color: var(--steel-700); font-size: 8px; }
.event-item time { font-family: var(--mono); }
.empty-inline { padding: 45px 15px; color: var(--steel-700); font-size: 11px; text-align: center; }

.section-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-toolbar > div:first-child p { margin: 0; color: var(--steel-500); font-size: 12px; }
.toolbar-actions { display: flex; gap: 9px; align-items: center; }
.search-control { width: min(290px, 34vw); height: 42px; display: flex; align-items: center; border: 1px solid var(--line-strong); background: rgba(4, 13, 20, .48); }
.search-control > span { margin: 0 0 0 12px; color: var(--steel-500); font-size: 18px; }
.search-control input { height: 40px; border: 0; background: transparent; box-shadow: none; }
.filter-bar { margin: 13px 0 15px; display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.filter-bar button { min-width: 98px; padding: 11px 13px; border: 0; border-bottom: 2px solid transparent; color: var(--steel-600); background: transparent; cursor: pointer; font-size: 10px; }
.filter-bar button:hover { color: var(--steel-300); }
.filter-bar button.active { color: var(--orange); border-bottom-color: var(--orange); }
.filter-bar b { margin-left: 4px; color: inherit; font: 9px var(--mono); }
.table-wrap { width: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 960px; }
.data-table th { height: 43px; padding: 0 15px; color: var(--steel-600); background: rgba(4, 13, 20, .43); border-bottom: 1px solid var(--line); font: 8px var(--mono); letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px; border-bottom: 1px solid var(--line); color: var(--steel-400); font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(87, 127, 140, .045); }
.align-right { text-align: right !important; }
.priority-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--steel-500); font: 8px var(--mono); }
.priority-mark.high { color: var(--orange); border-color: rgba(255,138,50,.32); background: rgba(255,138,50,.06); }
.priority-mark.low { color: var(--steel-700); }
.topic-title-cell { max-width: 330px; }
.topic-title-cell b { display: block; margin-bottom: 2px; color: var(--steel-200); font-size: 11px; }
.topic-title-cell small { display: block; overflow: hidden; color: var(--steel-600); text-overflow: ellipsis; white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 3px 7px; color: var(--steel-500); background: rgba(69, 97, 110, .08); border: 1px solid var(--line); font-size: 8px; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line-strong); color: var(--steel-500); background: rgba(69,97,110,.05); font: 8px var(--mono); letter-spacing: .05em; white-space: nowrap; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.review, .status-badge.queued, .status-badge.validated { color: var(--yellow); border-color: rgba(237,197,91,.25); }
.status-badge.researching, .status-badge.drafted, .status-badge.running { color: var(--cyan); border-color: rgba(90,208,215,.25); }
.status-badge.approved, .status-badge.published, .status-badge.live_checked, .status-badge.done, .status-badge.success { color: var(--green); border-color: rgba(106,212,149,.25); }
.status-badge.failed, .status-badge.rejected, .status-badge.blocked { color: var(--red); border-color: rgba(255,107,98,.25); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-action { min-width: 32px; height: 29px; padding: 0 8px; border: 1px solid var(--line); color: var(--steel-500); background: transparent; cursor: pointer; font-size: 8px; }
.row-action:hover { color: var(--orange); border-color: rgba(255,138,50,.35); }
.row-action.danger:hover { color: var(--red); border-color: rgba(255,107,98,.35); }

.article-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.article-card { position: relative; min-height: 215px; padding: 20px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .18s, transform .18s, background .18s; overflow: hidden; }
.article-card::after { content: attr(data-index); position: absolute; right: 12px; bottom: -16px; color: rgba(147, 167, 173, .035); font: 700 86px var(--display); }
.article-card:hover { transform: translateY(-2px); border-color: rgba(255,138,50,.35); background: rgba(13,32,44,.95); }
.article-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.article-card h3 { max-width: 640px; margin: 13px 0 8px; color: var(--steel-200); font: 600 17px/1.5 var(--display); }
.article-card p { height: 41px; margin: 0; overflow: hidden; color: var(--steel-600); font-size: 10px; line-height: 1.9; }
.score-ring { --score: 0; width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), rgba(69,97,110,.16) 0); }
.score-ring::before { content: ""; grid-area: 1 / 1; width: 40px; height: 40px; border-radius: 50%; background: var(--panel-solid); }
.score-ring b { z-index: 1; grid-area: 1 / 1; color: var(--steel-300); font: 650 12px var(--mono); }
.score-ring.low { background: conic-gradient(var(--red) 0 42%, rgba(69,97,110,.16) 42%); }
.score-ring.mid { background: conic-gradient(var(--yellow) 0 84%, rgba(69,97,110,.16) 84%); }
.score-ring.high { background: conic-gradient(var(--green) 0 94%, rgba(69,97,110,.16) 94%); }
.score-ring.unknown { background: conic-gradient(var(--steel-700) 0 12%, rgba(69,97,110,.16) 12%); }
.article-card-meta { margin-top: 18px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.article-card-meta > span { display: flex; gap: 12px; color: var(--steel-700); font: 8px var(--mono); }
.risk-tag { color: var(--red) !important; }
.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed var(--line-strong); }
.empty-state i { color: var(--steel-700); font: normal 36px var(--display); }
.empty-state h3 { margin: 8px 0 3px; color: var(--steel-300); font: 600 16px var(--display); }
.empty-state p { margin: 0 0 19px; color: var(--steel-600); font-size: 10px; }
.empty-state.compact { border: 0; padding: 60px 20px; }

.settings-layout { display: grid; grid-template-columns: 250px minmax(0, 780px); gap: clamp(25px, 4vw, 70px); align-items: start; }
.settings-index { position: sticky; top: calc(var(--topbar-height) + 28px); padding: 27px; border-left: 2px solid var(--orange); background: rgba(10,25,36,.57); }
.settings-index h2 { margin: 0 0 10px; color: var(--paper); font: 600 24px var(--display); }
.settings-index > p:not(.eyebrow) { margin: 0 0 25px; color: var(--steel-600); font-size: 10px; }
.settings-index a { display: block; padding: 9px 0; color: var(--steel-500); border-top: 1px solid var(--line); font-size: 10px; text-decoration: none; }
.settings-index a:hover { color: var(--orange); }
.settings-stack { display: grid; gap: 15px; }
.setting-section { padding: 25px; border: 1px solid var(--line); background: var(--panel); scroll-margin-top: calc(var(--topbar-height) + 20px); }
.setting-section > header { margin-bottom: 22px; display: grid; grid-template-columns: 33px 1fr; gap: 13px; align-items: start; }
.setting-section > header > span { height: 33px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--orange); font: 9px var(--mono); }
.setting-section h3 { margin: 0; color: var(--steel-200); font: 600 16px var(--display); }
.setting-section header p { margin: 2px 0 0; color: var(--steel-600); font-size: 10px; }
.mode-selector { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; }
.mode-selector label { cursor: pointer; }
.mode-selector input { position: absolute; opacity: 0; pointer-events: none; }
.mode-selector label span { min-height: 126px; margin: 0; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(4,13,20,.28); transition: .17s; }
.mode-selector i { color: var(--steel-700); font: normal 8px var(--mono); }
.mode-selector b { margin: 12px 0 5px; color: var(--steel-300); font-size: 11px; }
.mode-selector small { color: var(--steel-600); font-size: 9px; line-height: 1.65; }
.mode-selector input:checked + span { border-color: var(--orange); background: rgba(255,138,50,.07); box-shadow: inset 0 3px var(--orange); }
.mode-selector input:checked + span i, .mode-selector input:checked + span b { color: var(--orange); }
.switch-row { margin-top: 17px; padding: 14px 0 0; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row > span { margin: 0; display: flex; flex-direction: column; }
.switch-row b { color: var(--steel-300); font-size: 11px; }
.switch-row small { color: var(--steel-600); font-size: 9px; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row > i { position: relative; width: 45px; height: 24px; border: 1px solid var(--steel-700); background: var(--ink-950); transition: .18s; }
.switch-row > i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: var(--steel-600); transition: .18s; }
.switch-row input:checked + i { border-color: var(--orange); background: rgba(255,138,50,.1); }
.switch-row input:checked + i::after { left: 24px; background: var(--orange); }
.environment-gates { margin-top: 13px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.environment-gates > span { margin: 0; padding: 10px 12px; display: grid; grid-template-columns: 7px 1fr; column-gap: 8px; align-items: center; border: 1px solid var(--line); background: rgba(4,13,20,.28); }
.environment-gates i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.environment-gates span.enabled i { background: var(--green); box-shadow: 0 0 8px rgba(106,212,149,.35); }
.environment-gates b { color: var(--steel-400); font-size: 9px; }
.environment-gates small { grid-column: 2; color: var(--steel-700); font-size: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.field-grid label > small { display: block; margin-top: 6px; color: var(--steel-700); font-size: 8px; }
.unit-input { position: relative; }
.unit-input input { padding-right: 43px; }
.unit-input i { position: absolute; right: 14px; top: 11px; color: var(--steel-600); font-style: normal; font-size: 10px; }
.range-field > span { margin: 0 0 14px; display: flex; justify-content: space-between; }
.range-field b { color: var(--steel-300); font-size: 11px; }
.range-field output { color: var(--orange); font: 18px var(--mono); }
input[type="range"] { height: 4px; padding: 0; border: 0; background: var(--steel-700); accent-color: var(--orange); }
.range-field > small { display: block; margin-top: 12px; color: var(--steel-600); font-size: 9px; }
.model-status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.model-status-grid div { padding: 12px 14px; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(4,13,20,.27); }
.model-status-grid small { color: var(--steel-600); font-size: 8px; }
.model-status-grid b { color: var(--steel-300); font: 10px var(--mono); word-break: break-all; }
.usage-limits { margin-top: 12px; padding: 15px; border: 1px solid var(--line); background: rgba(4,13,20,.27); }
.usage-limits > header { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.usage-limits > header b { color: var(--steel-300); font-size: 10px; }
.usage-limits > header small { color: var(--steel-600); font: 8px var(--mono); }
.usage-meter { margin-top: 10px; }
.usage-meter > span { margin: 0 0 6px; display: flex; align-items: center; justify-content: space-between; }
.usage-meter b { color: var(--steel-500); font-size: 9px; }
.usage-meter output { color: var(--steel-400); font: 9px var(--mono); }
.usage-meter progress { width: 100%; height: 5px; display: block; border: 0; border-radius: 0; background: var(--steel-700); color: var(--orange); appearance: none; }
.usage-meter progress::-webkit-progress-bar { background: var(--steel-700); }
.usage-meter progress::-webkit-progress-value { background: var(--orange); }
.usage-meter progress::-moz-progress-bar { background: var(--orange); }
.usage-limits > p { margin: 11px 0 0; color: var(--steel-700); font-size: 8px; }
.form-footer { padding: 15px 0; display: flex; align-items: center; justify-content: space-between; }
.form-footer span { color: var(--steel-600); font-size: 9px; }

.log-terminal { border: 1px solid var(--line); background: #040b10; box-shadow: var(--shadow); }
.log-terminal > header { height: 43px; padding: 0 14px; display: flex; align-items: center; gap: 15px; color: var(--steel-600); border-bottom: 1px solid var(--line); background: var(--ink-850); }
.log-terminal > header > span { display: flex; gap: 5px; }
.log-terminal > header i { width: 7px; height: 7px; border-radius: 50%; background: var(--steel-700); }
.log-terminal > header i:first-child { background: var(--red); }
.log-terminal > header i:nth-child(2) { background: var(--yellow); }
.log-terminal > header i:nth-child(3) { background: var(--green); }
.log-terminal > header b { flex: 1; font: 9px var(--mono); letter-spacing: .1em; }
.log-terminal > header small { font: 8px var(--mono); }
.log-terminal ol { max-height: calc(100vh - 250px); min-height: 390px; margin: 0; padding: 8px 0; overflow: auto; counter-reset: logline; list-style: none; }
.log-entry { min-height: 44px; padding: 8px 15px; display: grid; grid-template-columns: 46px 145px minmax(130px, 220px) 1fr; gap: 10px; border-bottom: 1px solid rgba(151,177,185,.05); color: var(--steel-500); font: 9px/1.7 var(--mono); }
.log-entry::before { counter-increment: logline; content: counter(logline, decimal-leading-zero); color: var(--steel-700); }
.log-entry time { color: var(--steel-600); }
.log-entry b { color: var(--cyan); font-weight: 500; word-break: break-all; }
.log-entry > * { min-width: 0; }
.log-entry code { max-width: 100%; overflow-wrap: anywhere; color: var(--steel-400); white-space: pre-wrap; word-break: break-word; }
.log-entry.error b { color: var(--red); }
.log-entry.warning b { color: var(--yellow); }
.log-entry.success b { color: var(--green); }

.dialog { width: min(610px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--steel-300); border: 1px solid var(--line-strong); background: var(--panel-solid); box-shadow: 0 34px 110px rgba(0,0,0,.65); }
.dialog::backdrop { background: rgba(2, 8, 12, .77); backdrop-filter: blur(5px); }
.dialog[open] { animation: dialogIn .2s ease both; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 30px); }
.dialog header { flex: 0 0 auto; min-height: 78px; padding: 18px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog h2 { margin: 0; color: var(--paper); font: 600 20px var(--display); }
.dialog-close { width: 35px; height: 35px; border: 1px solid var(--line); color: var(--steel-500); background: transparent; cursor: pointer; font-size: 20px; }
.dialog-close:hover { color: var(--orange); border-color: rgba(255,138,50,.35); }
.dialog-body { padding: 22px; display: grid; gap: 17px; overflow: auto; }
.dialog-body label > span b { color: var(--orange); }
.dialog footer { flex: 0 0 auto; padding: 15px 21px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.confirm-dialog { width: min(510px, calc(100vw - 28px)); }
.confirm-dialog .dialog-body > p { margin: 0; color: var(--steel-400); font-size: 11px; }

.article-drawer { position: fixed; z-index: 100; inset: 0; overflow: hidden; pointer-events: none; visibility: hidden; }
.article-drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 12, .7); opacity: 0; backdrop-filter: blur(3px); transition: opacity .25s; }
.article-drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(920px, 92vw); display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; background: var(--ink-900); border-left: 1px solid var(--line-strong); box-shadow: -35px 0 90px rgba(0,0,0,.42); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.75,.2,1); }
.article-drawer.open .drawer-panel { transform: none; }
.drawer-header { min-height: 84px; padding: 17px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-header h2 { max-width: 740px; margin: 0; color: var(--paper); font: 600 21px/1.3 var(--display); }
.drawer-close { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line); color: var(--steel-500); background: transparent; cursor: pointer; font-size: 22px; }
.drawer-summary { min-height: 64px; padding: 11px 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 20px; border-bottom: 1px solid var(--line); }
.drawer-summary dl { margin: 0; display: flex; gap: 20px; }
.drawer-summary dl div { display: flex; flex-direction: column; }
.drawer-summary dt { color: var(--steel-700); font-size: 8px; }
.drawer-summary dd { margin: 0; color: var(--steel-300); font: 10px var(--mono); }
.drawer-tabs { padding: 0 24px; display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.drawer-tabs button { min-width: max-content; padding: 12px 14px; border: 0; border-bottom: 2px solid transparent; color: var(--steel-600); background: transparent; cursor: pointer; font-size: 10px; }
.drawer-tabs button.active { color: var(--orange); border-bottom-color: var(--orange); }
.drawer-content { padding: 25px; overflow: auto; }
.drawer-actions { min-height: 70px; padding: 12px 24px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: rgba(5,14,21,.95); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.detail-block { padding: 17px; border: 1px solid var(--line); background: rgba(10,25,36,.62); }
.detail-block.full { grid-column: 1 / -1; }
.detail-block h3 { margin: 0 0 10px; color: var(--steel-300); font: 600 13px var(--display); }
.detail-block p { margin: 0; color: var(--steel-500); font-size: 10px; white-space: pre-wrap; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { padding: 8px 0; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); color: var(--steel-500); font-size: 10px; }
.detail-list li:last-child { border-bottom: 0; }
.gate-list { display: grid; gap: 7px; }
.gate-item { padding: 12px 14px; display: grid; grid-template-columns: 20px 1fr auto; gap: 11px; align-items: start; border: 1px solid var(--line); background: rgba(4,13,20,.28); }
.gate-icon { width: 19px; height: 19px; display: grid; place-items: center; color: var(--green); border: 1px solid currentColor; font-size: 9px; }
.gate-item.fail .gate-icon { color: var(--red); }
.gate-item.warn .gate-icon { color: var(--yellow); }
.gate-item > div { display: flex; flex-direction: column; }
.gate-item b { color: var(--steel-300); font-size: 10px; }
.gate-item small { color: var(--steel-600); font-size: 9px; }
.gate-item > em { color: var(--steel-500); font: normal 9px var(--mono); }
.source-card, .claim-card { margin-bottom: 8px; padding: 14px; border: 1px solid var(--line); background: rgba(4,13,20,.27); }
.source-card header, .claim-card header { display: flex; justify-content: space-between; gap: 12px; }
.source-card h4, .claim-card h4 { margin: 0; color: var(--steel-300); font-size: 11px; }
.source-card a { display: block; margin-top: 7px; overflow: hidden; color: var(--cyan); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.source-card p, .claim-card p { margin: 8px 0 0; color: var(--steel-600); font-size: 9px; }
.claim-card footer { margin-top: 9px; color: var(--steel-700); font: 8px var(--mono); }
.markdown-view { margin: 0; padding: 20px; min-height: 330px; overflow: auto; color: #abc0c6; border: 1px solid var(--line); background: #030a0f; font: 10px/1.8 var(--mono); white-space: pre-wrap; word-break: break-word; }
.article-preview { max-width: 720px; margin: 0 auto; padding: clamp(20px, 5vw, 48px); color: #26363b; background: #edf0eb; box-shadow: 0 20px 55px rgba(0,0,0,.18); }
.article-preview h1 { margin: 0 0 18px; color: #10232b; font: 700 30px/1.4 var(--display); }
.article-preview h2 { margin: 28px 0 10px; color: #16313b; font: 650 20px/1.45 var(--display); }
.article-preview h3 { color: #1c3942; font: 650 15px var(--display); }
.article-preview p, .article-preview li { font-size: 13px; line-height: 2; }
.article-preview blockquote { margin: 18px 0; padding: 13px 17px; border-left: 3px solid var(--orange-dark); background: #dfe5e2; }
.article-preview code { font-family: var(--mono); }
.article-table-scroll { margin: 20px 0 24px; overflow-x: auto; border: 1px solid #b8c4c0; background: rgba(255,255,255,.42); box-shadow: inset 3px 0 0 #b86628; }
.article-table-scroll:focus-visible { outline: 2px solid #b86628; outline-offset: 2px; }
.article-markdown-table { width: 100%; min-width: 620px; border-collapse: collapse; color: #26363b; font-size: 12px; line-height: 1.65; }
.article-markdown-table th, .article-markdown-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-right: 1px solid #c9d1ce; border-bottom: 1px solid #c9d1ce; }
.article-markdown-table th:last-child, .article-markdown-table td:last-child { border-right: 0; }
.article-markdown-table tbody tr:last-child td { border-bottom: 0; }
.article-markdown-table th { color: #14303a; background: #d6dedb; font: 650 11px/1.5 var(--display); letter-spacing: .025em; }
.article-markdown-table tbody tr:nth-child(even) { background: rgba(213,222,218,.45); }
.article-markdown-table .align-center { text-align: center; }
.article-markdown-table .align-right { text-align: right; }
.broken-markdown-link { color: #8c3b35; font-family: var(--mono); font-size: .82em; }

.toast-stack { position: fixed; z-index: 200; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { padding: 13px 15px; display: grid; grid-template-columns: 7px 1fr auto; gap: 11px; align-items: start; color: var(--steel-300); border: 1px solid var(--line-strong); background: rgba(9,25,36,.97); box-shadow: var(--shadow); animation: toastIn .22s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }
.toast > i { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--cyan); }
.toast.success > i { background: var(--green); }
.toast.error > i { background: var(--red); }
.toast.warning > i { background: var(--yellow); }
.toast div { display: flex; flex-direction: column; }
.toast b { font-size: 10px; }
.toast span { color: var(--steel-600); font-size: 9px; }
.toast button { border: 0; color: var(--steel-600); background: transparent; cursor: pointer; }

.skeleton { position: relative; overflow: hidden; color: transparent !important; background: rgba(69,97,110,.1) !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(151,177,185,.08), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.mobile-nav-backdrop { display: none; }

/* Private editorial warehouse */
.library-masthead {
  position: relative; min-height: 154px; padding: 29px 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border: 1px solid var(--line-strong); background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(151,177,185,.018) 18px 19px),
    linear-gradient(104deg, rgba(18,42,56,.92), rgba(7,19,29,.91)); overflow: hidden;
}
.library-masthead::before { content: "PRIVATE / EDITORIAL / 200"; position: absolute; right: 152px; bottom: -18px; color: rgba(151,177,185,.035); font: 700 62px/1 var(--display); letter-spacing: .04em; white-space: nowrap; }
.library-masthead::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--orange); }
.library-masthead-copy { position: relative; z-index: 1; }
.library-masthead h2 { margin: 0 0 7px; color: var(--paper); font: 600 clamp(24px, 3vw, 34px)/1.2 var(--display); letter-spacing: .025em; }
.library-masthead-copy > p:last-child { max-width: 690px; margin: 0; color: var(--steel-400); font-size: 12px; }
.library-seal { position: relative; z-index: 1; width: 104px; height: 104px; flex: 0 0 auto; display: grid; place-content: center; justify-items: center; border: 1px solid rgba(255,138,50,.55); background: rgba(5,12,18,.67); box-shadow: inset 0 0 0 5px rgba(255,138,50,.035); transform: rotate(2deg); }
.library-seal::before, .library-seal::after { content: ""; position: absolute; background: var(--orange); }
.library-seal::before { width: 13px; height: 1px; top: 9px; left: 9px; }
.library-seal::after { width: 1px; height: 13px; top: 9px; left: 9px; }
.library-seal span { color: var(--orange-dark); font: 8px var(--mono); letter-spacing: .22em; }
.library-seal b { color: var(--orange); font: 700 18px var(--display); letter-spacing: .11em; }
.library-seal small { color: var(--steel-500); font-size: 8px; }

.library-safety-rail { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: rgba(5,14,21,.62); }
.library-safety-rail > span { min-height: 58px; padding: 11px 15px; display: grid; grid-template-columns: 29px 1fr; column-gap: 10px; align-items: center; border-right: 1px solid var(--line); }
.library-safety-rail > span:last-child { border-right: 0; }
.library-safety-rail i { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(106,212,149,.3); font: normal 8px var(--mono); }
.library-safety-rail b { align-self: end; color: var(--steel-300); font-size: 9px; }
.library-safety-rail small { align-self: start; color: var(--steel-700); font: 7px var(--mono); letter-spacing: .08em; }

.library-metrics { margin-top: 10px; display: grid; grid-template-columns: 1.15fr repeat(5, 1fr); border: 1px solid var(--line); background: rgba(10,25,36,.7); }
.library-metric { position: relative; min-height: 103px; padding: 17px; display: flex; flex-direction: column; border-right: 1px solid var(--line); overflow: hidden; }
.library-metric:last-child { border-right: 0; }
.library-metric::after { content: ""; position: absolute; width: 44px; height: 44px; right: -25px; bottom: -25px; border: 1px solid rgba(151,177,185,.09); transform: rotate(45deg); }
.library-metric span { color: var(--steel-500); font-size: 10px; }
.library-metric b { margin: 2px 0 auto; color: var(--steel-200); font: 500 29px/1.15 var(--display); }
.library-metric small { color: var(--steel-700); font: 7px var(--mono); letter-spacing: .08em; }
.library-metric.is-total { background: linear-gradient(135deg, rgba(255,138,50,.09), transparent); }
.library-metric.is-total b { color: var(--orange); }
.library-metric.is-ready b { color: var(--green); }
.library-metric.is-stale b { color: var(--red); }
.library-metric.is-approved b { color: var(--yellow); }

.library-toolbar { min-height: 82px; }
.library-filter-controls { flex-wrap: wrap; justify-content: flex-end; }
.compact-select { height: 42px; min-width: 158px; padding-left: 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: rgba(4,13,20,.48); }
.compact-select > span { min-width: max-content; margin: 0; color: var(--steel-700); font: 8px var(--mono); }
.compact-select select { height: 40px; padding: 0 29px 0 2px; border: 0; background: transparent; color: var(--steel-300); font-size: 9px; }
.library-ledger { overflow: hidden; }
.library-ledger-head { height: 42px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(4,13,20,.46); }
.library-ledger-head span { color: var(--steel-500); font: 8px var(--mono); letter-spacing: .11em; }
.library-ledger-head small { color: var(--steel-700); font: 8px var(--mono); }
.library-table { min-width: 1110px; }
.library-table th:first-child, .library-table td:first-child { width: 62px; text-align: center; }
.library-table th:nth-child(2) { width: 31%; }
.library-table tbody tr { cursor: pointer; }
.library-table tbody tr:focus-visible { outline: 1px solid var(--orange); outline-offset: -2px; background: rgba(255,138,50,.045); }
.library-open-mark { display: inline-flex; align-items: center; justify-content: center; }
.library-sequence { color: var(--steel-700); font: 10px var(--mono); }
.library-cluster { color: var(--steel-400); }
.freshness-mark { display: inline-flex; padding: 3px 6px; color: var(--steel-500); border-left: 2px solid var(--steel-700); background: rgba(69,97,110,.06); font-size: 8px; white-space: nowrap; }
.freshness-mark.review_before_publish { color: var(--yellow); border-left-color: var(--yellow); }
.revision-mark { display: inline-block; color: var(--cyan); font: 9px var(--mono); }
.revision-count { display: block; color: var(--steel-700); font-size: 7px; }
.status-badge.editorial_review { color: var(--yellow); border-color: rgba(237,197,91,.25); }
.status-badge.ready { color: var(--green); border-color: rgba(106,212,149,.25); }
.status-badge.stale { color: var(--red); border-color: rgba(255,107,98,.25); }
.status-badge.approved_for_release { color: var(--orange); border-color: rgba(255,138,50,.3); }
.library-error-state i { color: var(--red); }

.library-drawer-panel { width: min(1060px, 94vw); grid-template-rows: auto auto minmax(0,1fr) auto; }
.library-drawer .drawer-summary code { color: var(--cyan); font: 9px var(--mono); }
.library-preview-meta { max-width: 760px; margin: 0 auto 10px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: rgba(4,13,20,.36); }
.library-preview-meta span { min-width: 0; padding: 10px 13px; display: flex; flex-direction: column; color: var(--steel-400); border-right: 1px solid var(--line); font-size: 9px; }
.library-preview-meta span:last-child { border-right: 0; }
.library-preview-meta b { color: var(--steel-700); font: 7px var(--mono); letter-spacing: .08em; }
.library-hero-preview { max-width: 760px; margin: 0 auto 12px; border: 1px solid var(--line-strong); background: #07131c; box-shadow: 0 18px 42px rgba(0,0,0,.2); }
.library-hero-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0b1d28; }
.library-hero-preview figcaption { min-height: 43px; padding: 9px 13px; color: var(--steel-500); font-size: 8px; }
.library-template-brief { margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.library-template-brief h3 { margin: 4px 0 20px; font-size: 22px; }
.library-template-brief > div { margin-top: 18px; }
.library-template-brief b { display: block; margin-bottom: 8px; color: var(--text); font-size: 14px; }
.library-template-brief p, .library-template-brief li { color: var(--muted); font-size: 15px; line-height: 1.75; }
.library-template-brief ol { margin: 0; padding-left: 22px; }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chips span { padding: 6px 10px; border: 1px solid rgba(88,184,238,.26); border-radius: 999px; background: rgba(88,184,238,.08); color: #b9ddf0; font-size: 13px; }
.library-template-brief .template-lock-note { margin: 22px 0 0; padding: 12px 14px; border-left: 3px solid var(--orange); background: rgba(255,138,50,.07); color: #d9c1ad; }
.library-article-preview { max-width: 760px; }
.library-article-preview a { color: #96501c; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.library-editor { max-width: 820px; margin: 0 auto; display: grid; gap: 18px; }
.library-editor > header { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.library-editor > header h3 { margin: 3px 0 5px; color: var(--paper); font: 600 24px/1.25 var(--display); }
.library-editor > header span { color: var(--steel-500); font-size: 13px; }
.library-editor label { display: grid; gap: 7px; }
.library-editor label > span { color: var(--steel-400); font-size: 13px; font-weight: 600; }
.library-editor input, .library-editor textarea { width: 100%; color: var(--steel-200); font-size: 15px; line-height: 1.75; }
.library-editor textarea { resize: vertical; }
.library-editor-sections { display: grid; gap: 14px; }
.library-editor-sections > h4 { margin: 4px 0 0; color: var(--paper); font: 600 18px var(--display); }
.library-editor fieldset { margin: 0; padding: 16px; display: grid; gap: 14px; border: 1px solid var(--line-strong); background: rgba(4,13,20,.32); }
.library-editor legend { padding: 0 8px; color: var(--orange); font: 10px var(--mono); letter-spacing: .08em; }
.library-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.library-evidence-grid > section { min-width: 0; }
.library-evidence-grid > section > header { min-height: 53px; margin-bottom: 9px; padding-bottom: 10px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.library-evidence-grid h3, .library-machine-gates h3, .editorial-checklist h3 { margin: 0; color: var(--steel-200); font: 600 15px var(--display); }
.library-evidence-grid h3 span { color: var(--steel-600); font: 9px var(--mono); }

.library-review-layout { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(460px, 1.28fr); gap: 18px; align-items: start; }
.library-machine-gates, .editorial-checklist { min-width: 0; }
.library-machine-gates > header, .editorial-checklist > header { min-height: 54px; margin-bottom: 10px; padding-bottom: 10px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.editorial-checklist > header strong { color: var(--orange); font: 15px var(--mono); }
.editorial-checklist-note { margin-bottom: 9px; padding: 11px 13px; display: flex; flex-direction: column; border-left: 2px solid var(--orange); background: rgba(255,138,50,.055); }
.editorial-checklist-note b { color: var(--steel-300); font-size: 9px; }
.editorial-checklist-note span { color: var(--steel-600); font-size: 8px; }
.editorial-checks { display: grid; gap: 5px; }
.editorial-check { min-height: 47px; padding: 8px 11px; display: grid; grid-template-columns: 19px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); background: rgba(4,13,20,.29); cursor: pointer; transition: border-color .16s, background .16s; }
.editorial-check:hover { border-color: var(--line-strong); }
.editorial-check.checked { border-color: rgba(106,212,149,.23); background: rgba(106,212,149,.045); }
.editorial-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.editorial-check > span { margin: 0; display: grid; grid-template-columns: 28px 1fr; align-items: center; }
.editorial-check i { color: var(--steel-700); font: normal 8px var(--mono); }
.editorial-check b { color: var(--steel-400); font-size: 9px; font-weight: 550; }
.editorial-check.checked b { color: var(--steel-300); }
.editorial-check input:disabled { opacity: .55; }
.editorial-check:has(input:disabled) { cursor: default; }

.library-receipts { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.library-receipts section { min-width: 0; padding: 13px; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(4,13,20,.31); }
.library-receipts span { color: var(--steel-700); font: 7px var(--mono); letter-spacing: .09em; }
.library-receipts b { color: var(--steel-300); font-size: 9px; }
.library-receipts small { color: var(--steel-600); font-size: 8px; }
.library-receipts code { margin-top: 7px; overflow-wrap: anywhere; color: var(--cyan); font: 8px/1.5 var(--mono); }
.revision-timeline { display: grid; gap: 7px; }
.revision-entry { min-height: 80px; padding: 12px 14px; display: grid; grid-template-columns: 49px 1fr auto; gap: 13px; align-items: center; border: 1px solid var(--line); background: rgba(4,13,20,.3); }
.revision-entry.latest { border-left: 3px solid var(--orange); }
.revision-entry > span { width: 42px; height: 42px; display: grid; place-items: center; color: var(--steel-500); border: 1px solid var(--line-strong); font: 10px var(--mono); }
.revision-entry > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.revision-entry b { color: var(--steel-300); font-size: 9px; }
.revision-entry small { color: var(--steel-700); font-size: 8px; }
.revision-entry code { margin-top: 3px; overflow-wrap: anywhere; color: var(--steel-600); font: 8px var(--mono); }
.revision-flags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.revision-flags i { padding: 3px 6px; color: var(--green); border: 1px solid rgba(106,212,149,.2); font: normal 7px var(--mono); }
.library-drawer-actions { justify-content: flex-end; }
.drawer-action-note { min-width: 0; margin-right: auto; display: flex; flex-direction: column; }
.drawer-action-note b { color: var(--steel-300); font-size: 9px; }
.drawer-action-note small { color: var(--steel-600); font-size: 8px; }

.confirm-revision { padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; border: 1px solid var(--line); background: rgba(4,13,20,.35); }
.confirm-revision span { grid-row: 1 / 3; align-self: center; color: var(--steel-700); font: 8px var(--mono); }
.confirm-revision b { color: var(--orange); font: 10px var(--mono); }
.confirm-revision code { overflow-wrap: anywhere; color: var(--steel-500); font: 8px/1.5 var(--mono); }
.confirmation-check { min-height: 64px; padding: 12px 14px; display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: center; border: 1px solid rgba(237,197,91,.28); background: rgba(237,197,91,.045); cursor: pointer; }
.confirmation-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--yellow); }
.confirmation-check > span { margin: 0; display: flex; flex-direction: column; }
.confirmation-check b { color: var(--steel-300); font-size: 10px; }
.confirmation-check small { color: var(--steel-600); font-size: 8px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Legibility pass: the console is designed for long editorial review sessions,
   so operational labels never rely on sub-11px type. */
.boot-screen p,
.login-panel::after,
.login-brand span,
.eyebrow,
.login-panel > footer,
.sidebar-brand small,
.nav-item kbd,
.system-clock span,
.system-clock small,
.operator-avatar,
.operator small,
.breadcrumb,
.mode-plate small,
.api-plate small,
.panel-header .eyebrow,
.live-stamp,
.flow-node > i,
.flow-node small,
.run-detail small,
.run-detail time,
.safety-dial small,
.compact-index,
.compact-item small,
.compact-item time,
.event-item small,
.event-item time,
.filter-bar b,
.data-table th,
.priority-mark,
.chip,
.status-badge,
.article-card-meta > span,
.setting-section > header > span,
.mode-selector i,
.environment-gates small,
.field-grid label > small,
.range-field > small,
.model-status-grid small,
.usage-limits > header small,
.usage-meter output,
.usage-limits > p,
.form-footer span,
.log-terminal > header b,
.log-terminal > header small,
.drawer-summary dt,
.gate-icon,
.gate-item > em,
.source-card a,
.claim-card footer,
.toast span,
.library-seal span,
.library-seal small,
.library-safety-rail i,
.library-safety-rail small,
.library-metric small,
.compact-select > span,
.library-ledger-head span,
.library-ledger-head small,
.freshness-mark,
.revision-mark,
.revision-count,
.library-drawer .drawer-summary code,
.library-preview-meta b,
.library-evidence-grid h3 span,
.editorial-check i,
.library-receipts span,
.library-receipts code,
.revision-entry small,
.revision-entry code,
.revision-flags i,
.confirm-revision span,
.confirm-revision code {
  font-size: 11px;
}

label > span,
.form-error,
.metric-card small,
.safety-list dt,
.safety-list dd,
.text-button,
.section-toolbar > div:first-child p,
.filter-bar button,
.row-action,
.article-card p,
.empty-state p,
.settings-index > p:not(.eyebrow),
.settings-index a,
.setting-section header p,
.mode-selector small,
.switch-row small,
.environment-gates b,
.unit-input i,
.usage-meter b,
.log-entry,
.confirm-dialog .dialog-body > p,
.drawer-summary dd,
.drawer-tabs button,
.detail-block p,
.detail-list li,
.gate-item small,
.source-card p,
.claim-card p,
.toast b,
.library-safety-rail b,
.library-metric span,
.compact-select select,
.library-preview-meta span,
.library-hero-preview figcaption,
.editorial-checklist-note span,
.library-receipts small,
.drawer-action-note small,
.confirmation-check small {
  font-size: 12px;
}

.button,
.operator b,
.mode-plate b,
.api-plate b,
.alert-strip,
.command-copy > p:last-child,
.metric-card span,
.flow-node b,
.run-detail b,
.compact-item b,
.event-item b,
.data-table td,
.topic-title-cell small,
.article-card-meta,
.mode-selector b,
.switch-row b,
.model-status-grid b,
.usage-limits > header b,
.detail-block h3,
.gate-item b,
.editorial-checklist-note b,
.editorial-check b,
.library-receipts b,
.revision-entry b,
.drawer-action-note b,
.confirmation-check b {
  font-size: 13px;
}

.nav-item span { font-size: 15px; }
.library-sequence { color: var(--steel-500); font-size: 11px; }

.login-copy > p:last-child,
.command-copy h2 + p,
.topic-title-cell b,
.source-card h4,
.claim-card h4,
.library-masthead-copy > p:last-child {
  font-size: 14px;
}

.nav-item { height: 52px; }
.button { min-height: 44px; }
.topbar h1 { font-size: 25px; }
.command-copy h2 { font-size: 27px; }
.panel-header h3,
.setting-section h3,
.empty-state h3 { font-size: 18px; }
.metric-card { min-height: 124px; }
.panel-header { min-height: 78px; }
.compact-item, .event-item { min-height: 64px; }
.section-toolbar { min-height: 78px; }
.filter-bar button { padding-block: 13px; }
.data-table th { height: 49px; padding-inline: 18px; }
.data-table td { padding: 18px; line-height: 1.55; }
.topic-title-cell b { margin-bottom: 4px; line-height: 1.55; }
.chip, .status-badge { padding: 5px 9px; }
.row-action { min-width: 38px; height: 34px; }
.article-card p { height: auto; min-height: 46px; line-height: 1.75; }
.settings-index a { padding-block: 11px; }
.mode-selector label span { min-height: 142px; }
.log-entry { min-height: 50px; line-height: 1.75; }
.drawer-tabs button { padding: 14px 16px; }
.detail-block p, .detail-list li, .source-card p, .claim-card p { line-height: 1.75; }
.gate-item { padding: 14px 16px; }
.gate-item b { line-height: 1.5; }
.gate-item small { margin-top: 3px; line-height: 1.6; }
.markdown-view { font-size: 13px; line-height: 1.85; }
.article-preview { max-width: 780px; }
.article-preview p, .article-preview li { font-size: 16px; line-height: 1.9; }
.article-markdown-table { font-size: 14px; line-height: 1.7; }
.article-markdown-table th { font-size: 13px; }
.library-masthead-copy > p:last-child { line-height: 1.8; }
.library-safety-rail > span { min-height: 68px; }
.library-metrics { grid-template-columns: 1.15fr repeat(5, minmax(132px, 1fr)); overflow-x: auto; }
.library-metric { min-height: 114px; }
.library-ledger-head { height: 48px; }
.library-table { min-width: 1220px; }
.library-preview-meta span { line-height: 1.65; }
.library-hero-preview figcaption { min-height: 50px; line-height: 1.55; }
.library-evidence-grid h3,
.library-machine-gates h3,
.editorial-checklist h3 { font-size: 17px; }
.editorial-checklist-note { padding: 14px 15px; }
.editorial-checklist-note b { line-height: 1.55; }
.editorial-checklist-note span { margin-top: 3px; line-height: 1.6; }
.editorial-check { min-height: 56px; padding: 11px 13px; }
.editorial-check > span { grid-template-columns: 32px 1fr; }
.editorial-check b { line-height: 1.55; }
.library-receipts b, .library-receipts small { line-height: 1.6; }
.revision-entry { min-height: 92px; }
.confirmation-check { min-height: 72px; }

/* Functional muted text remains readable; the darker steel tones are reserved
   for borders, watermarks and non-essential decoration. */
.sidebar-brand small,
.system-clock span,
.system-clock small,
.operator small,
.breadcrumb,
.mode-plate small,
.api-plate small,
.metric-card span,
.metric-card small,
.panel-header .eyebrow,
.live-stamp,
.flow-node small,
.run-detail small,
.run-detail time,
.safety-dial small,
.safety-list dt,
.compact-index,
.compact-item small,
.compact-item time,
.event-item small,
.event-item time,
.section-toolbar > div:first-child p,
.filter-bar button,
.filter-bar b,
.data-table th,
.priority-mark,
.topic-title-cell small,
.chip,
.status-badge,
.row-action,
.article-card p,
.article-card-meta > span,
.settings-index > p:not(.eyebrow),
.settings-index a,
.setting-section header p,
.mode-selector i,
.mode-selector small,
.switch-row small,
.environment-gates b,
.environment-gates small,
.field-grid label > small,
.unit-input i,
.range-field > small,
.model-status-grid small,
.usage-limits > header small,
.usage-meter b,
.usage-meter output,
.usage-limits > p,
.form-footer span,
.log-terminal > header,
.log-entry,
.drawer-summary dt,
.drawer-tabs button,
.detail-block p,
.detail-list li,
.gate-item small,
.gate-item > em,
.source-card p,
.claim-card p,
.claim-card footer,
.toast span,
.library-safety-rail small,
.library-metric span,
.library-metric small,
.compact-select > span,
.library-ledger-head span,
.library-ledger-head small,
.library-sequence,
.library-cluster,
.freshness-mark,
.revision-count,
.library-preview-meta b,
.library-hero-preview figcaption,
.library-evidence-grid h3 span,
.editorial-checklist-note span,
.editorial-check i,
.library-receipts span,
.library-receipts small,
.revision-entry small,
.revision-entry code,
.drawer-action-note small,
.confirm-revision span,
.confirm-revision code,
.confirmation-check small {
  color: var(--text-muted);
}

.nav-item kbd,
.topic-title-cell small,
.library-masthead-copy > p:last-child,
.editorial-checklist-note b,
.editorial-check b,
.drawer-action-note b {
  color: var(--text-secondary);
}

.data-table th,
.priority-mark,
.chip,
.status-badge,
.filter-bar b,
.library-safety-rail small,
.library-metric small,
.compact-select > span,
.library-ledger-head span,
.library-ledger-head small,
.freshness-mark,
.revision-mark,
.library-preview-meta b,
.editorial-check i,
.library-receipts span,
.library-receipts code,
.revision-entry code,
.confirm-revision code {
  font-size: 12px;
  line-height: 1.45;
}

.library-sequence { font-size: 12px; }
.revision-count { font-size: 11px; line-height: 1.45; }
.data-table td { font-size: 14px; }
.row-action { font-size: 13px; }
.markdown-view { font-size: 14px; }

@media (max-width: 1180px) {
  :root { --sidebar-width: 212px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-card:nth-child(3) { border-right: 0; }
  .metric-card:nth-child(n+4) { border-top: 1px solid var(--line); }
  .pipeline-flow { overflow-x: auto; }
  .flow-line { min-width: 30px; }
  .article-board { grid-template-columns: 1fr; }
  .library-metrics { grid-template-columns: repeat(3, 1fr); }
  .library-metric:nth-child(3) { border-right: 0; }
  .library-metric:nth-child(n+4) { border-top: 1px solid var(--line); }
  .library-review-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .library-filter-controls { width: 100%; justify-content: flex-start; }
  .library-filter-controls .search-control { width: 100%; flex-basis: 100%; }
  .library-ledger { border: 0; background: transparent; box-shadow: none; }
  .library-ledger-head { border: 1px solid var(--line); }
  .library-table { min-width: 0; }
  .library-table thead { display: none; }
  .library-table tbody { padding-top: 10px; display: grid; gap: 10px; }
  .library-table tr { padding: 16px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 9px 12px; border: 1px solid var(--line); background: var(--panel); }
  .library-table td { padding: 0; border: 0; }
  .library-table td:first-child { width: auto; grid-row: 1 / 3; display: grid; place-items: start center; }
  .library-table td:nth-child(2) { grid-column: 2; }
  .library-table td:nth-child(7) { grid-column: 3; grid-row: 1; }
  .library-table td:nth-child(n+3):nth-child(-n+6) { grid-column: 2 / 4; display: grid; grid-template-columns: 88px 1fr; align-items: center; }
  .library-table td:nth-child(3)::before { content: "集群"; }
  .library-table td:nth-child(4)::before { content: "形式"; }
  .library-table td:nth-child(5)::before { content: "时效"; }
  .library-table td:nth-child(6)::before { content: "修订"; }
  .library-table td:nth-child(n+3):nth-child(-n+6)::before { color: var(--text-muted); font: 12px/1.45 var(--mono); }
  .library-table td:nth-child(8) { grid-column: 2 / 4; }
  .library-table td:nth-child(8) .row-action { width: 100%; height: 40px; }
  .library-table .revision-count { display: inline; margin-left: 7px; }
}

@media (max-width: 900px) {
  :root { --topbar-height: 72px; }
  .login-panel { grid-template-columns: 1fr; }
  .login-copy { padding: 54px 45px 30px; border-right: 0; }
  .login-copy h2 { font-size: 52px; }
  .login-form { padding: 30px 45px 52px; }
  .sidebar { width: min(280px, 86vw); visibility: hidden; pointer-events: none; transform: translateX(-102%); transition: transform .25s ease, visibility 0s linear .25s; }
  body.nav-open .sidebar { visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
  .mobile-nav-backdrop { position: fixed; z-index: 25; inset: 0; display: block; pointer-events: none; opacity: 0; background: rgba(1,7,11,.72); transition: opacity .25s; }
  body.nav-open .mobile-nav-backdrop { pointer-events: auto; opacity: 1; }
  .workspace { grid-column: 1 / -1; }
  .mobile-nav-trigger { display: block; }
  .overview-grid { grid-template-columns: 1fr; }
  .safety-panel { grid-row: auto; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-index { position: static; }
  .settings-index a { display: inline-block; margin-right: 13px; border-top: 0; }
  .library-safety-rail { grid-template-columns: 1fr; }
  .library-safety-rail > span { border-right: 0; border-bottom: 1px solid var(--line); }
  .library-safety-rail > span:last-child { border-bottom: 0; }
  .library-filter-controls { justify-content: flex-start; }
  .library-filter-controls .search-control { width: 100%; flex-basis: 100%; }
  .library-evidence-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  input, textarea, select, .button { font-size: 16px; }
  .login-stage { padding: 11px; }
  .login-panel { min-height: calc(100vh - 22px); clip-path: none; }
  .login-brand { padding: 19px; }
  .login-copy { padding: 40px 23px 22px; }
  .login-copy h2 { margin-bottom: 18px; font-size: 39px; }
  .login-copy > p:last-child { font-size: 14px; }
  .login-form { padding: 20px 23px 35px; }
  .login-panel > footer { padding: 14px 19px; }
  .login-panel > footer > span:last-child { display: none; }
  .topbar { padding: 0 15px; }
  .topbar { gap: 10px; }
  .topbar-title { flex: 1 1 auto; }
  .topbar-status { gap: 7px; }
  .topbar-status { flex: 0 0 auto; }
  .mode-plate { padding: 0 8px; }
  .api-plate { display: none; }
  .page { padding: 20px 14px 42px; }
  .alert-strip { top: var(--topbar-height); padding: 8px 14px; }
  .command-ribbon { align-items: stretch; flex-direction: column; padding: 20px; }
  .command-actions { display: grid; grid-template-columns: 1fr auto; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 102px; padding: 15px; }
  .metric-card:nth-child(2), .metric-card:nth-child(4) { border-right: 0; }
  .metric-card:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-card:last-child { grid-column: 1 / -1; border-right: 0; }
  .metric-card b { font-size: 32px; }
  .pipeline-flow { padding-inline: 17px; }
  .flow-node { min-width: 51px; }
  .flow-line { min-width: 20px; }
  .section-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .search-control { width: auto; flex: 1; min-width: 0; }
  .filter-bar { overflow-x: auto; }
  .filter-bar button { min-width: max-content; }
  .mode-selector { grid-template-columns: 1fr; }
  .mode-selector label span { min-height: 90px; }
  .field-grid, .model-status-grid, .detail-grid { grid-template-columns: 1fr; }
  .environment-gates { grid-template-columns: 1fr; }
  .detail-block.full { grid-column: auto; }
  .log-entry { grid-template-columns: 32px 1fr; gap: 4px 8px; }
  .log-entry b, .log-entry code { grid-column: 2; }
  .log-terminal { min-width: 0; max-width: 100%; overflow: hidden; }
  .log-terminal ol { max-width: 100%; overflow-x: hidden; }
  .drawer-panel { width: 100%; }
  .drawer-header, .drawer-summary, .drawer-tabs, .drawer-content, .drawer-actions { padding-left: 15px; padding-right: 15px; }
  .drawer-actions { overflow-x: auto; justify-content: flex-start; }
  .drawer-actions .button { min-width: max-content; }
  .article-preview { padding: 24px 18px; }
  .article-preview h1 { font-size: 24px; }
  .library-masthead { min-height: 136px; padding: 23px 19px; }
  .library-masthead::before { display: none; }
  .library-masthead-copy > p:last-child { font-size: 14px; }
  .library-seal { width: 82px; height: 82px; }
  .library-seal b { font-size: 14px; }
  .library-metrics { grid-template-columns: repeat(2, 1fr); }
  .library-metric, .library-metric:nth-child(3) { min-height: 91px; border-right: 1px solid var(--line); }
  .library-metric:nth-child(2n) { border-right: 0; }
  .library-metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .compact-select { flex: 1 1 calc(50% - 5px); min-width: 140px; }
  .library-filter-controls .button { flex: 1 1 100%; }
  .library-ledger { border: 0; background: transparent; box-shadow: none; }
  .library-ledger-head { border: 1px solid var(--line); }
  .library-table { min-width: 0; }
  .library-table thead { display: none; }
  .library-table tbody { padding-top: 8px; display: grid; gap: 8px; }
  .library-table tr { padding: 13px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 7px 10px; border: 1px solid var(--line); background: var(--panel); }
  .library-table td { padding: 0; border: 0; }
  .library-table td:first-child { width: auto; grid-row: 1 / 3; display: grid; place-items: start center; }
  .library-table td:nth-child(2) { grid-column: 2; }
  .library-table td:nth-child(7) { grid-column: 3; grid-row: 1; }
  .library-table td:nth-child(n+3):nth-child(-n+6) { grid-column: 2 / 4; display: grid; grid-template-columns: 74px 1fr; align-items: center; }
  .library-table td:nth-child(3)::before { content: "集群"; }
  .library-table td:nth-child(4)::before { content: "形式"; }
  .library-table td:nth-child(5)::before { content: "时效"; }
  .library-table td:nth-child(6)::before { content: "修订"; }
  .library-table td:nth-child(n+3):nth-child(-n+6)::before { color: var(--text-muted); font: 12px/1.45 var(--mono); }
  .library-table td:nth-child(8) { grid-column: 2 / 4; }
  .library-table td:nth-child(8) .row-action { width: 100%; height: 40px; }
  .library-table .revision-count { display: inline; margin-left: 7px; }
  .library-preview-meta { grid-template-columns: 1fr; }
  .library-preview-meta span { border-right: 0; border-bottom: 1px solid var(--line); }
  .library-preview-meta span:last-child { border-bottom: 0; }
  .library-review-layout { min-width: 0; }
  .editorial-check > span { grid-template-columns: 25px 1fr; }
  .library-receipts { grid-template-columns: 1fr; }
  .revision-entry { grid-template-columns: 43px 1fr; }
  .revision-flags { grid-column: 2; justify-content: flex-start; }
  .library-drawer-actions { align-items: stretch; flex-wrap: wrap; }
  .drawer-action-note { width: 100%; flex: 1 0 100%; }
  .library-drawer-actions .button { flex: 1 1 100%; }
}

@media (max-height: 620px) {
  .primary-nav { padding-block: 12px; gap: 4px; }
  .nav-item { height: 46px; }
  .sidebar-foot { padding-block: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Cobalt booking-console theme: clean white working surfaces on a strong
   royal-blue frame, with cyan reserved for orientation and live status. */
:root {
  --ink-950: #eef1f8;
  --ink-900: #f5f7fc;
  --ink-850: #edf1f8;
  --ink-800: #e6ebf5;
  --ink-750: #dce3f1;
  --steel-700: #8d96ab;
  --steel-600: #707a92;
  --steel-500: #59647d;
  --steel-400: #3f4a64;
  --steel-300: #29344f;
  --steel-200: #17223d;
  --text-muted: #7a849b;
  --text-secondary: #4f5b76;
  --paper: #17223d;
  --paper-warm: #f7f8fc;
  --orange: #4051a5;
  --orange-bright: #4d60bd;
  --orange-dark: #30408f;
  --cyan: #11a7c5;
  --green: #25a36f;
  --red: #dc5d68;
  --yellow: #c58a23;
  --line: rgba(50, 67, 128, .14);
  --line-strong: rgba(50, 67, 128, .24);
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --shadow: 0 20px 55px rgba(42, 55, 115, .14);
}

html { color-scheme: light; background: #eef1f8; }
body {
  color: var(--steel-200);
  background:
    radial-gradient(circle at 86% 0%, rgba(64, 81, 165, .08), transparent 31rem),
    linear-gradient(rgba(64, 81, 165, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 81, 165, .025) 1px, transparent 1px),
    #f5f7fc;
  background-size: auto, 32px 32px, 32px 32px, auto;
}
::selection { color: #fff; background: #4051a5; }
::-webkit-scrollbar-track { background: #edf1f8; }
::-webkit-scrollbar-thumb { background: #aeb7cb; border-color: #edf1f8; }

.boot-screen { background: #4051a5; }
.boot-screen p { color: rgba(255,255,255,.8); }
.boot-mark i { background: #fff; }
.login-stage { background: linear-gradient(135deg, #4051a5 0 52%, #f5f7fc 52%); }
.login-stage::before { opacity: .12; }
.login-panel { border-color: rgba(50,67,128,.18); background: rgba(255,255,255,.97); box-shadow: 0 28px 80px rgba(31,44,104,.22); }
.login-panel::before { background: linear-gradient(90deg, #12a7c5 0 24%, #4051a5 24%); }
.login-copy { border-right-color: var(--line); }
.login-copy h2, .login-brand h1 { color: #17223d; }
.login-copy h2 em { -webkit-text-stroke-color: #4051a5; }
.login-brand, .login-panel > footer { border-color: var(--line); }

input, textarea, select {
  color: #1a2540;
  background: #fff;
  border-color: #cdd4e4;
  box-shadow: 0 1px 2px rgba(35,50,110,.03);
}
input:focus, textarea:focus, select:focus { border-color: #4051a5; box-shadow: 0 0 0 3px rgba(64,81,165,.12); background: #fff; }
select { color-scheme: light; }

.button-primary { color: #fff; background: #4051a5; border-color: #4051a5; box-shadow: 0 8px 22px rgba(64,81,165,.18); }
.button-primary:hover:not(:disabled) { background: #33428f; border-color: #33428f; }
.button-secondary { color: #4051a5; background: #fff; border-color: #bfc7dc; }
.button-secondary:hover:not(:disabled) { color: #2f3d88; border-color: #4051a5; background: #f2f4fb; }
.button-danger-ghost { color: #b54855; background: #fff; border-color: rgba(181,72,85,.3); }

.sidebar { background: linear-gradient(180deg, #4051a5 0%, #354690 100%); border-right: 0; box-shadow: 14px 0 34px rgba(39,51,112,.16); }
.sidebar::after { width: 4px; height: 100%; right: 0; background: #12a7c5; }
.sidebar-brand { border-color: rgba(255,255,255,.15); }
.sidebar-brand b, .system-clock b, .operator b { color: #fff; }
.sidebar-brand small, .system-clock span, .system-clock small, .operator small { color: rgba(255,255,255,.66); }
.brand-glyph { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); }
.brand-glyph svg { fill: #fff; }
.brand-glyph .brand-spark { stroke: #46d1e5; }
.nav-item { color: rgba(255,255,255,.72); }
.nav-item kbd { color: rgba(255,255,255,.45); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active { color: #4051a5; border-color: rgba(255,255,255,.8); background: #fff; box-shadow: 0 9px 24px rgba(20,31,82,.16); }
.nav-item.active::before { left: -13px; background: #37c6df; box-shadow: 0 0 14px rgba(55,198,223,.55); }
.nav-item.active svg, .nav-item.active kbd { color: #4051a5; }
.sidebar-foot { border-color: rgba(255,255,255,.14); }
.operator:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.operator-avatar { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.1); }

.workspace { background: transparent; }
.topbar { background: rgba(255,255,255,.96); border-bottom-color: var(--line); box-shadow: 0 8px 24px rgba(43,56,119,.05); }
.topbar h1, .mode-plate b, .api-plate b { color: #17223d; }
.breadcrumb, .mode-plate small, .api-plate small { color: #7a849b; }
.mode-plate, .api-plate { border-color: var(--line); }
.mobile-nav-trigger { color: #4051a5; background: #fff; border-color: var(--line-strong); }
.alert-strip { color: #fff; background: #4051a5; }

.command-ribbon { border-color: #4051a5; background: linear-gradient(105deg, #4051a5, #33438f); box-shadow: 0 18px 38px rgba(51,67,143,.17); }
.command-ribbon::before { background: repeating-linear-gradient(135deg, transparent 0 15px, rgba(255,255,255,.04) 15px 16px); }
.command-ribbon::after { background: #2dd0e7; }
.command-copy h2, .command-copy > p:last-child { color: #fff; }
.command-ribbon .eyebrow { color: #76e3f1; }

.metric-grid, .library-metrics, .library-safety-rail { border-color: var(--line); box-shadow: 0 13px 32px rgba(43,56,119,.06); }
.metric-card, .library-metric, .library-safety-rail, .library-safety-rail > span { background: #fff; }
.metric-card, .library-metric, .library-safety-rail > span { border-color: var(--line); }
.metric-card b, .library-metric b { color: #263250; }
.metric-card::after, .library-metric::after { border-color: rgba(64,81,165,.09); }
.metric-card.accent-orange, .library-metric.is-total { background: linear-gradient(135deg, rgba(64,81,165,.09), #fff 70%); }

.panel, .data-panel, .article-card, .setting-section, .settings-index { color: #24304d; border-color: var(--line); background: #fff; box-shadow: 0 13px 34px rgba(43,56,119,.07); }
.panel-header, .article-card-meta { border-color: var(--line); }
.panel-header h3, .article-card h3, .setting-section h3, .settings-index h2 { color: #17223d; }
.panel-header .eyebrow { color: #4051a5; }
.article-card:hover { border-color: rgba(64,81,165,.42); background: #fbfcff; box-shadow: 0 18px 38px rgba(43,56,119,.11); }
.article-card::after { color: rgba(64,81,165,.05); }
.filter-bar { border-color: var(--line); }
.filter-bar button:hover { color: #4051a5; }
.filter-bar button.active { color: #4051a5; border-bottom-color: #4051a5; }
.search-control { background: #fff; border-color: #cdd4e4; }
.search-control input { background: transparent; box-shadow: none; }

.data-table th, .library-ledger-head { color: #68738b; background: #eef1f8; border-color: var(--line); }
.data-table td { color: #3f4a64; border-color: var(--line); }
.data-table tbody tr:hover { background: #f6f8fd; }
.row-action { color: #4051a5; border-color: rgba(64,81,165,.24); background: rgba(64,81,165,.04); }
.row-action:hover { color: #fff; background: #4051a5; border-color: #4051a5; }
.chip, .status-badge { background: #f0f3fa; }

.library-masthead { border-color: #4051a5; background: linear-gradient(104deg, #4051a5 0%, #34448f 100%); box-shadow: 0 18px 38px rgba(51,67,143,.16); }
.library-masthead::after { background: #2fd0e7; }
.library-masthead::before { color: rgba(255,255,255,.055); }
.library-masthead h2, .library-masthead-copy > p:last-child { color: #fff; }
.library-masthead .eyebrow { color: #73e1ef; }
.library-seal { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 5px rgba(255,255,255,.035); }
.library-seal::before, .library-seal::after { background: #4ed7e8; }
.library-seal span, .library-seal b, .library-seal small { color: #fff; }
.library-safety-rail i { color: #4051a5; border-color: rgba(64,81,165,.28); background: #f1f4fb; }
.compact-select { border-color: #cdd4e4; background: #fff; }
.compact-select select { color: #35405d; background: transparent; }
.library-ledger { background: #fff; }
.library-table tbody tr:focus-visible { background: #f3f5fb; outline-color: #4051a5; }
.freshness-mark { color: #59647d; background: #f0f3f9; border-left-color: #8c96ae; }
.revision-mark { color: #4051a5; }

.drawer-backdrop { background: rgba(29,40,88,.38); }
.drawer-panel { background: #f5f7fc; border-left-color: rgba(45,60,125,.18); box-shadow: -30px 0 75px rgba(32,44,102,.22); }
.library-drawer .drawer-header { color: #fff; border-color: rgba(255,255,255,.15); background: #4051a5; }
.library-drawer .drawer-header h2, .library-drawer .drawer-header .eyebrow { color: #fff; }
.library-drawer .drawer-close { color: #fff; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.06); }
.library-drawer .drawer-close:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.12); }
.library-drawer .drawer-summary { color: #27324f; background: #fff; border-color: var(--line); }
.library-drawer .drawer-summary dd { color: #27324f; }
.library-drawer .drawer-summary code { color: #4051a5; }
.drawer-content { background: #f4f6fb; }
.library-preview-meta, .library-hero-preview, .library-template-brief, .library-editor fieldset { border-color: var(--line); background: #fff; box-shadow: 0 10px 26px rgba(43,56,119,.06); }
.library-preview-meta span { color: #3f4a64; border-color: var(--line); }
.library-hero-preview figcaption { color: #657089; background: #fff; }
.library-editor > header { border-color: var(--line); }
.library-editor > header h3, .library-editor-sections > h4 { color: #17223d; }
.library-editor > header span, .library-editor label > span { color: #59647d; }
.library-editor input, .library-editor textarea { color: #1a2540; background: #fff; }
.library-editor legend { color: #4051a5; }
.library-drawer-actions { background: #4051a5; border-top-color: rgba(255,255,255,.15); box-shadow: 0 -12px 28px rgba(39,52,112,.12); }
.library-drawer-actions .button-secondary { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.library-drawer-actions .button-secondary:hover:not(:disabled) { color: #4051a5; background: #fff; border-color: #fff; }
.library-drawer-actions .button-primary { color: #4051a5; background: #fff; border-color: #fff; box-shadow: 0 8px 20px rgba(26,37,86,.16); }
.library-drawer-actions .button-primary:hover:not(:disabled) { color: #2f3d88; background: #eef9fb; border-color: #eef9fb; }
.library-drawer-actions .button:disabled { color: rgba(255,255,255,.76); background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.22); }

.dialog { color: #27324f; border-color: var(--line-strong); background: #fff; box-shadow: 0 30px 90px rgba(32,44,102,.24); }
.dialog::backdrop { background: rgba(29,40,88,.42); }
.dialog h2 { color: #17223d; }
.dialog header, .dialog footer { border-color: var(--line); }
.confirmation-check, .confirm-revision { background: #f4f6fb; border-color: var(--line-strong); }
.log-terminal { border-color: #34448f; background: #26346f; box-shadow: 0 18px 45px rgba(39,52,112,.2); }
.log-terminal > header { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.12); background: #34448f; }
.log-entry { color: #dce3ff; border-color: rgba(255,255,255,.08); }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline-color: #12a7c5; }
