/* =====================================================================
   WONIL 인력운영 콘솔 — design system (app.css)
   tokens → base → shell (rail · top bar · palette) → shared components
   → charts → page blocks → legacy vocabulary → responsive → print
   Light is the default. Dark follows the OS unless the viewer picks a
   theme (html[data-theme], set by /theme.js + the top-bar toggle).
   Status colours are fixed and always travel with an icon or a label.
   ===================================================================== */

@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("/assets/fonts/PretendardVariable.woff2") format("woff2-variations"),
       url("/assets/fonts/PretendardVariable.woff2") format("woff2");
}

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f4;
  --overlay: rgba(15, 23, 42, 0.46);

  --text: #131a24;
  --text-2: #4a5464;
  --text-3: #768192;
  --border: #e2e6eb;
  --border-strong: #cdd3db;

  --brand: #1b2a4a;            /* 정본 xlsx·pptx 헤더 남색 */
  --brand-soft: #ebf0f8;
  --brand-ink: #1b2a4a;
  --accent: #1f5fbf;
  --accent-soft: #eaf1fc;
  --on-accent: #ffffff;
  --mark: #e0874f;             /* 정본 주황 계열 — sidebar accent only */

  --btn-bg: #1b2a4a;
  --btn-bg-hover: #26396a;
  --btn-text: #ffffff;

  --ok: #0ca30c;       --ok-ink: #11691c;      --ok-soft: #e8f6ea;      --ok-line: #bfe2c5;
  --warn: #fab219;     --warn-ink: #8a5700;    --warn-soft: #fff5dc;    --warn-line: #f2d48c;
  --serious: #ec835a;  --serious-ink: #a3431c; --serious-soft: #fdeee6; --serious-line: #f2c5b0;
  --bad: #d03b3b;      --bad-ink: #b12323;     --bad-soft: #fdecec;     --bad-line: #f0c0c0;
  --info: #2a78d6;     --info-ink: #1c56a6;    --info-soft: #eaf2fc;    --info-line: #c4d9f4;
  --neutral-soft: #f0f2f5; --neutral-line: #dce1e7;
  --on-warn: #261a00;

  --series-1: #2a78d6;
  --deemph: #c7cdd6;
  --grid-line: #e8ebef;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Malgun Gothic", "맑은 고딕", "Segoe UI", system-ui, sans-serif;
  --font-num: var(--font);
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "D2Coding", monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 10px 28px rgba(16, 24, 40, 0.12);
  --shadow-3: 0 24px 64px rgba(16, 24, 40, 0.26);
  --focus: 0 0 0 3px rgba(31, 95, 191, 0.32);

  --rail-w: 248px;
  --topbar-h: 58px;
  --content-max: 1320px;
  --pad-x: 32px;

  --rail-bg: #15213b;
  --rail-text: rgba(255, 255, 255, 0.72);
  --rail-strong: #ffffff;
  --rail-muted: rgba(255, 255, 255, 0.46);
  --rail-hover: rgba(255, 255, 255, 0.07);
  --rail-active: rgba(255, 255, 255, 0.12);
  --rail-line: rgba(255, 255, 255, 0.09);

  /* legacy aliases — older markup and pages.css resolve through these */
  --asphalt: var(--bg);
  --slab: var(--surface);
  --chalk: var(--text);
  --concrete: var(--text-2);
  --line: var(--border);
  --ink: var(--on-accent);
  --safety: var(--warn);
  --form: var(--border-strong);
  --display: var(--font);
  --body: var(--font);

  /* inline icons for CSS-only spots */
  --ico-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
  --ico-sort: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
  --ico-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E");
  --ico-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23768192' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --ico-check-w: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --ico-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23768192' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e131a; --surface: #151b24; --surface-2: #19202a; --surface-3: #202834; --overlay: rgba(0, 0, 0, 0.62);
    --text: #e7ebf1; --text-2: #aab4c2; --text-3: #7f8a9a; --border: #262f3c; --border-strong: #354151;
    --brand: #8fb0e6; --brand-soft: rgba(143, 176, 230, 0.13); --brand-ink: #bcd0f5;
    --accent: #6ea8ff; --accent-soft: rgba(110, 168, 255, 0.14); --on-accent: #0b1220;
    --btn-bg: #2b64c4; --btn-bg-hover: #3572d6; --btn-text: #ffffff;
    --ok-ink: #62d06d; --ok-soft: rgba(12, 163, 12, 0.14); --ok-line: rgba(12, 163, 12, 0.38);
    --warn-ink: #f6c24f; --warn-soft: rgba(250, 178, 25, 0.13); --warn-line: rgba(250, 178, 25, 0.36);
    --serious-ink: #f39b76; --serious-soft: rgba(236, 131, 90, 0.14); --serious-line: rgba(236, 131, 90, 0.4);
    --bad-ink: #f27d7d; --bad-soft: rgba(208, 59, 59, 0.17); --bad-line: rgba(208, 59, 59, 0.45);
    --info-ink: #83b5f2; --info-soft: rgba(57, 135, 229, 0.16); --info-line: rgba(57, 135, 229, 0.42);
    --neutral-soft: rgba(255, 255, 255, 0.05); --neutral-line: rgba(255, 255, 255, 0.12);
    --series-1: #3987e5; --deemph: #3a4453; --grid-line: #222a35;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35); --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.45); --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.6);
    --focus: 0 0 0 3px rgba(110, 168, 255, 0.4);
    --rail-bg: #0a0f16; --rail-line: rgba(255, 255, 255, 0.07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131a; --surface: #151b24; --surface-2: #19202a; --surface-3: #202834; --overlay: rgba(0, 0, 0, 0.62);
  --text: #e7ebf1; --text-2: #aab4c2; --text-3: #7f8a9a; --border: #262f3c; --border-strong: #354151;
  --brand: #8fb0e6; --brand-soft: rgba(143, 176, 230, 0.13); --brand-ink: #bcd0f5;
  --accent: #6ea8ff; --accent-soft: rgba(110, 168, 255, 0.14); --on-accent: #0b1220;
  --btn-bg: #2b64c4; --btn-bg-hover: #3572d6; --btn-text: #ffffff;
  --ok-ink: #62d06d; --ok-soft: rgba(12, 163, 12, 0.14); --ok-line: rgba(12, 163, 12, 0.38);
  --warn-ink: #f6c24f; --warn-soft: rgba(250, 178, 25, 0.13); --warn-line: rgba(250, 178, 25, 0.36);
  --serious-ink: #f39b76; --serious-soft: rgba(236, 131, 90, 0.14); --serious-line: rgba(236, 131, 90, 0.4);
  --bad-ink: #f27d7d; --bad-soft: rgba(208, 59, 59, 0.17); --bad-line: rgba(208, 59, 59, 0.45);
  --info-ink: #83b5f2; --info-soft: rgba(57, 135, 229, 0.16); --info-line: rgba(57, 135, 229, 0.42);
  --neutral-soft: rgba(255, 255, 255, 0.05); --neutral-line: rgba(255, 255, 255, 0.12);
  --series-1: #3987e5; --deemph: #3a4453; --grid-line: #222a35;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35); --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.45); --shadow-3: 0 24px 64px rgba(0, 0, 0, 0.6);
  --focus: 0 0 0 3px rgba(110, 168, 255, 0.4);
  --rail-bg: #0a0f16; --rail-line: rgba(255, 255, 255, 0.07);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.004em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.cmdk-open { overflow: hidden; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.015em; color: var(--text); }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg { vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
code, kbd, samp { font-family: var(--mono); }
code {
  font-size: 0.88em; padding: 1px 5px; border-radius: 5px;
  background: var(--surface-3); color: var(--text-2); word-break: break-all;
}
kbd {
  display: inline-block; min-width: 20px; padding: 1px 6px; text-align: center;
  font-size: 11px; line-height: 16px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 22px; height: 22px; }

.sr, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 10px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.skip:focus { left: 10px; text-decoration: none; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 8px; }
.t2 { color: var(--text-2); }
.t3, .muted { color: var(--text-3); }
.num, .tnum { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.pos { color: var(--ok-ink); }
.neg { color: var(--bad-ink); }

/* ---------------------------------------------------------------- shell */
.site-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "rail top" "rail main";
  min-height: 100vh;
}
.site-grid > main, body > main {
  grid-area: main;
  min-width: 0;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px var(--pad-x) 72px;
  outline: none;
}

/* rail */
.rail {
  grid-area: rail;
  position: sticky; top: 0; z-index: 30;
  height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  background: var(--rail-bg); color: var(--rail-text);
  border-right: 1px solid var(--rail-line);
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.rail-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px; color: var(--rail-strong); text-decoration: none;
}
.rail-brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 800; letter-spacing: 0.14em; color: #fff; }
.brand-name::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%;
  background: var(--mark); vertical-align: 2px;
}
.brand-sub { margin-top: 3px; font-size: 11.5px; color: var(--rail-muted); letter-spacing: 0.02em; }
.rail-nav { flex: 1; padding: 6px 12px 16px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-group-label {
  margin: 0; padding: 6px 10px 6px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--rail-muted);
}
.rail .nav {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 0 10px; margin: 1px 0; border-radius: 8px;
  color: var(--rail-text); font-size: 13.5px; font-weight: 500; text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.rail .nav .i { width: 18px; height: 18px; opacity: 0.82; }
.rail .nav:hover { background: var(--rail-hover); color: #fff; text-decoration: none; }
.rail .nav[aria-current="page"], .rail .nav.on {
  background: var(--rail-active); color: #fff; font-weight: 650;
  box-shadow: inset 3px 0 0 var(--mark);
}
.rail .nav[aria-current="page"] .i, .rail .nav.on .i { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.nav-badge.warn { background: rgba(250, 178, 25, 0.22); color: #ffd36b; }
.nav-badge.bad { background: var(--bad); color: #fff; }
.nav-badge.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; background: var(--bad); box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.25); }
.rail-foot { padding: 12px 12px 16px; border-top: 1px solid var(--rail-line); }
.rail-env {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); font-size: 12px; line-height: 1.45;
}
.rail-env .i { width: 17px; height: 17px; margin-top: 1px; color: #8fd19a; }
.rail-env b { display: block; color: #fff; font-size: 12.5px; font-weight: 700; }
.rail-env span { color: var(--rail-muted); }
.rail-meta {
  display: flex; justify-content: space-between; gap: 8px; margin: 10px 4px 0;
  font-size: 11px; color: var(--rail-muted); font-variant-numeric: tabular-nums;
}
/* static fallback rail (before app.js mounts / older markup) */
.rail > .brand { display: block; padding: 20px 20px 4px; margin: 0; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: 0.14em; text-decoration: none; }
.rail > .brand-sub { padding: 0 20px 12px; margin: 0; font-size: 11.5px; color: var(--rail-muted); }
.rail > nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; }
.rail-note, .rail-links { padding: 8px 20px; margin: 0; font-size: 11.5px; color: var(--rail-muted); }
.rail-links a { color: var(--rail-text); }
.rail-backdrop { display: none; }

/* top bar */
.topbar {
  grid-area: top;
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 10px;
  max-width: var(--content-max); height: var(--topbar-h); margin: 0 auto; padding: 0 var(--pad-x);
}
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.crumbs .i { width: 14px; height: 14px; opacity: 0.7; }
.crumb-page { color: var(--text); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.tb-spacer { flex: 1; }
.tb-search {
  display: flex; align-items: center; gap: 8px; width: 250px; height: 36px; padding: 0 8px 0 11px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text-3);
  font-size: 13px; cursor: pointer; transition: border-color 0.12s, background 0.12s;
}
.tb-search:hover { border-color: var(--border-strong); background: var(--surface); }
.tb-search .i { width: 16px; height: 16px; }
.tb-search kbd { margin-left: auto; }
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 9px;
  background: var(--surface-3); border: 1px solid var(--border);
}
.seg button, .seg .role-pill {
  height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on, .seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--border); }
.conn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 4px 0 6px;
  font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--deemph); flex: none; }
.conn[data-state="ok"] i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.conn[data-state="err"] i { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); }
.conn[data-state="err"] { color: var(--bad-ink); font-weight: 600; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.menu-btn { display: none; }
body.is-fetching .tb-refresh .i, body.is-loading .tb-refresh .i { animation: wu-spin 0.9s linear infinite; }
@keyframes wu-spin { to { transform: rotate(360deg); } }
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 40% 100% no-repeat;
  transition: opacity 0.2s;
}
body.is-fetching .topbar::after, body.is-loading .topbar::after { opacity: 1; animation: wu-bar 1.1s ease-in-out infinite; }
@keyframes wu-bar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
body.has-shell .page-head .crumb { display: none; }

/* ---------------------------------------------------------------- page head */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin: 6px 0 22px;
}
.page-head > div:first-child { min-width: 0; }
.page-head .crumb { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.page-head .crumb a { color: inherit; }
.page-head h1, .top h1 { margin: 0; font-size: 25px; line-height: 1.25; font-weight: 750; letter-spacing: -0.025em; }
.page-head .lede, .top .lede { margin: 6px 0 0; font-size: 14px; color: var(--text-2); max-width: 72ch; }
.page-head .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stamp { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.top { margin: 6px 0 22px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-text);
  font-family: var(--font); font-size: 13px; font-weight: 650; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; pointer-events: none; }
.btn .i { width: 16px; height: 16px; }
.btn-ghost, .btn-secondary, .btn-xlsx {
  background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-1);
}
.btn-ghost:hover, .btn-secondary:hover, .btn-xlsx:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-quiet { background: transparent; color: var(--text-2); border-color: transparent; box-shadow: none; }
.btn-quiet:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-xlsx { margin: 0; }
.btn-xlsx::before {
  content: ""; width: 15px; height: 15px; flex: none; background: currentColor;
  -webkit-mask: var(--ico-download) center / contain no-repeat; mask: var(--ico-download) center / contain no-repeat;
}
.col > .btn-xlsx { margin-bottom: 12px; }

/* ---------------------------------------------------------------- pills · severity */
.pill, .tag, .badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border: 1px solid var(--neutral-line); border-radius: 999px; background: var(--neutral-soft);
  color: var(--text-2); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  font-family: var(--font); letter-spacing: 0;
}
.pill::before, .tag::before, .badge::before {
  content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; opacity: 0.9;
}
.pill.plain::before, .badge.plain::before { display: none; }
.pill.ok, .tag.ok, .badge.ok { color: var(--ok-ink); background: var(--ok-soft); border-color: var(--ok-line); }
.pill.warn, .tag.warn, .badge.warn { color: var(--warn-ink); background: var(--warn-soft); border-color: var(--warn-line); }
.pill.serious, .tag.serious, .badge.serious { color: var(--serious-ink); background: var(--serious-soft); border-color: var(--serious-line); }
.pill.bad, .tag.bad, .badge.bad { color: var(--bad-ink); background: var(--bad-soft); border-color: var(--bad-line); }
.pill.info, .tag.info, .badge.info { color: var(--info-ink); background: var(--info-soft); border-color: var(--info-line); }
.pill.brand, .badge.brand { color: var(--brand-ink); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 20%, transparent); }
.pill.lock, .badge.lock { color: var(--text-3); }
.pill.lock::before, .badge.lock::before { border-radius: 2px; }
.pill .i { width: 13px; height: 13px; }
.pill.icon::before { display: none; }

.sev {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 7px;
  border: 1px solid transparent; border-radius: 6px; font-family: var(--font-num);
  font-size: 11.5px; font-weight: 750; line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}
.sev.P0 { background: var(--bad); border-color: var(--bad); color: #fff; }
.sev.P1 { background: var(--serious-soft); border-color: var(--serious-line); color: var(--serious-ink); }
.sev.P2 { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.sev.P3 { background: var(--neutral-soft); border-color: var(--neutral-line); color: var(--text-2); }

/* ---------------------------------------------------------------- alerts · banners · callouts */
.alert {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 16px; margin: 0 0 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--info-line); background: var(--info-soft); color: var(--text);
}
.alert.bad { border-color: var(--bad-line); background: var(--bad-soft); }
.alert.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.alert b { margin-right: 6px; }
.alert .alert-msg { font-size: 13px; color: var(--text-2); }

.banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 18px 22px; margin-bottom: 20px; border-radius: var(--radius);
  border: 1px solid var(--ok-line); background: var(--ok-soft); color: var(--ok-ink);
}
.banner.warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn-ink); }
.banner.bad { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad-ink); }
.banner.info { border-color: var(--info-line); background: var(--info-soft); color: var(--info-ink); }
.banner-dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent); }
.banner.bad .banner-dot { animation: wu-pulse 1.5s ease-in-out infinite; }
@keyframes wu-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, currentColor 6%, transparent); } }
.banner-k { display: block; font-size: 12px; font-weight: 650; color: inherit; }
.banner-v { display: block; margin-top: 1px; font-size: 20px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.3; color: var(--text); }
.banner-d { display: block; margin-top: 3px; font-size: 13px; color: var(--text-2); }
.banner-side { text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.callout {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-line); background: var(--neutral-soft); color: var(--text-2); font-size: 13px; line-height: 1.55;
}
.callout > .i { width: 18px; height: 18px; margin-top: 1px; color: var(--text-3); }
.callout b { display: block; margin-bottom: 2px; color: var(--text); font-size: 13.5px; font-weight: 700; }
.callout p { margin: 0; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout ul li + li { margin-top: 3px; }
.callout ul b { display: inline; margin: 0; font-size: inherit; }
.callout.guardrail { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 16%, transparent); }
.callout.guardrail > .i { color: var(--brand-ink); }
.callout.info { background: var(--info-soft); border-color: var(--info-line); } .callout.info > .i { color: var(--info-ink); }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-line); } .callout.warn > .i { color: var(--warn-ink); }
.callout.bad { background: var(--bad-soft); border-color: var(--bad-line); } .callout.bad > .i { color: var(--bad-ink); }
.callout + .callout { margin-top: 10px; }

/* ---------------------------------------------------------------- KPI tiles */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px;
}
.kpi-row.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi {
  position: relative; min-width: 0; padding: 16px 18px 15px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.kpi.ok { box-shadow: inset 0 3px 0 var(--ok), var(--shadow-1); }
.kpi.warn { box-shadow: inset 0 3px 0 var(--warn), var(--shadow-1); }
.kpi.bad { box-shadow: inset 0 3px 0 var(--bad), var(--shadow-1); }
.kpi.info { box-shadow: inset 0 3px 0 var(--info), var(--shadow-1); }
.kpi-k { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; font-weight: 550; color: var(--text-2); letter-spacing: 0; }
.kpi-k .i { width: 16px; height: 16px; color: var(--text-3); }
.kpi-k .pill { margin-left: auto; }
.kpi-v {
  display: block; font-family: var(--font); font-size: 27px; line-height: 1.15; font-weight: 750;
  letter-spacing: -0.025em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: normal;
}
.kpi-v small { margin-left: 3px; font-size: 14px; font-weight: 650; color: var(--text-3); letter-spacing: 0; }
.kpi.bad .kpi-v { color: var(--bad-ink); }
.kpi.warn .kpi-v { color: var(--warn-ink); }
.kpi-sub { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.kpi .meter { margin-top: 12px; }

/* ---------------------------------------------------------------- workflow stepper */
.flow {
  display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr));
  margin: 0 0 20px; padding: 0; list-style: none; counter-reset: step;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
  overflow: hidden;
}
.flow-step { position: relative; min-width: 0; padding: 14px 16px 15px 50px; }
.flow-step + .flow-step { border-left: 1px solid var(--border); }
.flow-step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 14px; width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: 50%;
  font-size: 11.5px; font-weight: 750; font-variant-numeric: tabular-nums;
  background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border);
}
.flow-step.done::before { content: ""; background: var(--ok) var(--ico-check-w) center / 13px no-repeat; border-color: var(--ok); }
.flow-step.pending { background: var(--accent-soft); }
.flow-step.pending::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.flow-step.locked::before { content: ""; background: var(--surface-3) var(--ico-lock) center / 12px no-repeat; }
.flow-step.idle { opacity: 0.62; }
.flow-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.flow-step.locked .flow-label { color: var(--text-2); }
.flow-actor { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.flow-detail { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }

/* ---------------------------------------------------------------- layout · cards */
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split.even, .cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.section { margin-top: 28px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2 { font-size: 17px; font-weight: 750; }
.section-title span { font-size: 12.5px; color: var(--text-3); }

.card {
  min-width: 0; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.split > .card, .stack > .card, .cols-2 > .card, .cols-3 > .card { margin-bottom: 0; }
.card-h {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.card-h h2, .card-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.card-h h2 .i, .card-h h3 .i { width: 17px; height: 17px; color: var(--text-3); }
.card-sub { font-size: 12.5px; color: var(--text-3); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.card-b { padding: 16px 20px 20px; }
.card-b.flush { padding: 0; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.card-f a { font-weight: 600; }
.role-tag {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
}
body[data-role="chief"] .col-chief .role-tag, body[data-role="exec"] .col-exec .role-tag { background: var(--accent-soft); color: var(--accent); }
body[data-role="chief"] .card.col-chief, body[data-role="exec"] .card.col-exec { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* ---------------------------------------------------------------- toolbar · search · chips · tabs */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.search {
  flex: 1 1 220px; min-width: 0; max-width: 320px; height: 34px; padding: 0 12px 0 34px; appearance: none;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface) var(--ico-search) 11px center / 15px no-repeat; color: var(--text); font-size: 13px;
}
.search::placeholder { color: var(--text-3); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.on, .chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 650; }
.chip .n { font-variant-numeric: tabular-nums; font-weight: 700; opacity: 0.72; }
.toolbar .count { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin: 0; padding: 0 12px; border-bottom: 1px solid var(--border); }
.tab {
  appearance: none; position: relative; padding: 13px 10px 12px; border: 0; background: transparent;
  color: var(--text-3); font-size: 13.5px; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 750; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab .n { margin-left: 5px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.tall { max-height: 560px; overflow: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; color: var(--text); }
.grid th {
  text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 650; color: var(--text-3); white-space: nowrap;
  background: var(--surface-2); border-bottom: 1px solid var(--border); letter-spacing: 0;
}
.table-wrap.tall thead th, .grid.sticky thead th { position: sticky; top: 0; z-index: 1; }
.grid td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface-3)); }
.grid th:first-child, .grid td:first-child { padding-left: 20px; }
.grid th:last-child, .grid td:last-child { padding-right: 20px; }
.grid .num { text-align: right; white-space: nowrap; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.grid th.num { text-align: right; }
.grid .center { text-align: center; }
.grid th[data-sort] { cursor: pointer; user-select: none; }
.grid th[data-sort]:hover { color: var(--text); }
.grid th[data-sort]::after {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 4px; vertical-align: -1px;
  background: currentColor; opacity: 0.35;
  -webkit-mask: var(--ico-sort) center / contain no-repeat; mask: var(--ico-sort) center / contain no-repeat;
}
.grid th[aria-sort="ascending"]::after { opacity: 1; -webkit-mask-image: var(--ico-up); mask-image: var(--ico-up); }
.grid th[aria-sort="descending"]::after { opacity: 1; -webkit-mask-image: var(--ico-down); mask-image: var(--ico-down); }
.grid tfoot td { font-weight: 750; background: var(--surface-2); border-top: 1px solid var(--border-strong); border-bottom: 0; }
.grid tr.total td { font-weight: 750; background: var(--surface-2); border-top: 1px solid var(--border-strong); }
.grid tr.group td { background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.grid tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.grid tr.is-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.grid tr.is-dim td { color: var(--text-3); }
.grid td .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); font-weight: 400; }
.grid td.muted { color: var(--text-3); }
.grid .strong { font-weight: 650; }
.flag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin: 1px 4px 1px 0;
  border: 1px solid var(--warn-line); border-radius: 5px; background: var(--warn-soft);
  color: var(--warn-ink); font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.flag.info { border-color: var(--info-line); background: var(--info-soft); color: var(--info-ink); }
.flag.ok { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok-ink); }
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 10px 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.pager > span { margin-right: 6px; }
.id { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: nowrap; }

/* ---------------------------------------------------------------- lists */
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; color: var(--text); }
.note { margin: 12px 0 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--border-strong); font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.note.warn { border-left-color: var(--warn); color: var(--text-2); }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 11px 20px; border-bottom: 1px solid var(--border);
}
.checklist li:last-child { border-bottom: 0; }
.checklist .box { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-radius: 5px; background: var(--surface); }
.checklist li.done .box { background: var(--ok) var(--ico-check-w) center / 12px no-repeat; border-color: var(--ok); }
.checklist .lbl { font-size: 13.5px; font-weight: 550; }
.checklist .lbl small { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv > div { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.kv span { display: block; font-size: 12px; color: var(--text-3); }
.kv b { display: block; margin-top: 3px; font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- states */
.empty { padding: 32px 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.empty b { display: block; margin-bottom: 4px; color: var(--text-2); font-size: 14px; font-weight: 650; }
.empty .i { display: block; width: 26px; height: 26px; margin: 0 auto 10px; color: var(--text-3); }
.skel {
  display: inline-block; width: 4.5em; max-width: 100%; height: 0.95em; border-radius: 4px; vertical-align: middle;
  background: linear-gradient(90deg, var(--surface-3) 0 40%, color-mix(in srgb, var(--surface-3) 45%, var(--surface)) 50%, var(--surface-3) 60% 100%);
  background-size: 300% 100%; animation: wu-shimmer 1.2s linear infinite;
}
.skel-block { display: block; width: 100%; height: 120px; border-radius: var(--radius); }
@keyframes wu-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
body.is-loading .is-stale { opacity: 0.55; transition: opacity 0.2s; }
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; pointer-events: none; max-width: min(420px, calc(100vw - 40px));
  padding: 11px 15px; border-radius: 10px; background: #111827; color: #fff;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(8px); transition: opacity 0.18s, transform 0.18s;
}
.toast.on { opacity: 1; transform: none; }
.toast[data-tone="bad"] { background: #7f1d1d; }
:root[data-theme="dark"] .toast { background: #2a3444; box-shadow: var(--shadow-3), 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ---------------------------------------------------------------- meters · scores */
.meter { position: relative; height: 8px; border-radius: 4px; background: var(--meter-track, var(--info-soft)); }
.meter > span { display: block; height: 100%; min-width: 2px; max-width: 100%; border-radius: 4px; background: var(--meter-fill, var(--series-1)); }
.meter.ok { --meter-track: var(--ok-soft); --meter-fill: var(--ok); }
.meter.warn { --meter-track: var(--warn-soft); --meter-fill: var(--warn); }
.meter.bad { --meter-track: var(--bad-soft); --meter-fill: var(--bad); }
.meter.info { --meter-track: var(--info-soft); --meter-fill: var(--info); }
.meter.slim { height: 6px; }
.meter .tick { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--text-3); transform: translateX(-1px); }
.meter-row { display: flex; align-items: center; gap: 10px; }
.meter-row .meter { flex: 1; min-width: 60px; }
.meter-row b { min-width: 30px; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.meter-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .lbl, .chart .axis { fill: var(--text-3); font-family: var(--font); font-size: 12px; }
.chart .val { fill: var(--text); font-family: var(--font); font-size: 13px; font-weight: 700; }
.chart .gridline { stroke: var(--grid-line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; shape-rendering: crispEdges; }
.chart .bar { fill: var(--deemph); transition: filter 0.12s; }
.chart .bar.em { fill: var(--series-1); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover + .bar, .chart .hit:focus + .bar { filter: brightness(1.08) saturate(1.1); }
.chart-foot { margin-top: 10px; font-size: 12px; color: var(--text-3); }
.viz-tip {
  position: fixed; z-index: 95; pointer-events: none; max-width: 280px;
  padding: 9px 11px; border-radius: 9px; background: #0f1623; color: #fff; font-size: 12.5px; line-height: 1.45;
  box-shadow: var(--shadow-2); opacity: 0; transform: translateY(4px); transition: opacity 0.1s, transform 0.1s;
}
.viz-tip.on { opacity: 1; transform: none; }
.viz-tip b { display: block; font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.viz-tip span { display: block; color: rgba(255, 255, 255, 0.72); }
.viz-tip .k { display: flex; align-items: center; gap: 6px; }
.viz-tip .k::before { content: ""; width: 10px; height: 2px; border-radius: 1px; background: var(--tip-key, #3987e5); }

.barlist { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.barlist li { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) minmax(88px, auto); gap: 12px; align-items: center; }
.barlist .bl-label { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barlist .bl-track { position: relative; height: 14px; }
.barlist .bl-bar { height: 14px; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--deemph); }
.barlist li.em .bl-bar { background: var(--series-1); }
.barlist li.em .bl-label { color: var(--text); font-weight: 700; }
.barlist .bl-val { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.barlist .bl-val small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.barlist li[data-tip] { cursor: default; border-radius: 4px; }
.barlist li[data-tip]:hover .bl-bar { filter: brightness(1.08); }

/* ---------------------------------------------------------------- overview blocks */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 6px 0 22px; }
.hello h1 { font-size: 25px; font-weight: 750; letter-spacing: -0.025em; }
.hello p { margin-top: 6px; color: var(--text-2); }
.hello .when { font-size: 13px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.hello .when b { display: block; color: var(--text); font-size: 15px; font-weight: 700; }

.safe-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 11px 16px; margin-bottom: 20px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); background: var(--brand-soft);
  font-size: 13px; color: var(--text-2);
}
.safe-strip b { color: var(--brand-ink); font-weight: 750; }
.safe-strip > .i { color: var(--brand-ink); }
.safe-strip .sep { width: 1px; height: 14px; background: color-mix(in srgb, var(--brand) 20%, transparent); }
.safe-strip .locks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.safe-strip .locks span { display: inline-flex; align-items: center; gap: 5px; }
.safe-strip .locks .i { width: 14px; height: 14px; color: var(--text-3); }

.actions { margin: 0; padding: 0; list-style: none; }
.action {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 14px; align-items: center;
  padding: 13px 20px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none;
}
.actions li:last-child .action { border-bottom: 0; }
a.action:hover { background: var(--surface-2); text-decoration: none; }
a.action:hover .go { color: var(--text); transform: translateX(2px); }
.action-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--neutral-soft); color: var(--text-2); }
.action-ico .i { width: 18px; height: 18px; }
.action-ico.bad { background: var(--bad-soft); color: var(--bad-ink); }
.action-ico.warn { background: var(--warn-soft); color: var(--warn-ink); }
.action-ico.serious { background: var(--serious-soft); color: var(--serious-ink); }
.action-ico.info { background: var(--info-soft); color: var(--info-ink); }
.action-ico.ok { background: var(--ok-soft); color: var(--ok-ink); }
.action-ico.brand { background: var(--brand-soft); color: var(--brand-ink); }
.action-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; font-weight: 650; color: var(--text); }
.action-d { margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.action-meta { display: flex; align-items: center; gap: 10px; }
.action .go { color: var(--text-3); transition: transform 0.12s, color 0.12s; }
.owner { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.owner.chief { background: var(--brand-soft); color: var(--brand-ink); }

.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
.module {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
  color: inherit; text-decoration: none; transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.module:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; }
.module-h { display: flex; align-items: center; gap: 10px; }
.module-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.module-t { font-size: 14.5px; font-weight: 750; color: var(--text); }
.module-h .pill { margin-left: auto; }
.module-d { font-size: 12.5px; color: var(--text-3); line-height: 1.5; min-height: 38px; }
.module-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 11px; border-top: 1px solid var(--border); }
.module-stat b { display: block; font-size: 16px; font-weight: 750; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.module-stat span { font-size: 12px; color: var(--text-3); }

.feed { margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .ft { font-size: 13.5px; font-weight: 600; color: var(--text); }
.feed .fd { font-size: 12px; color: var(--text-3); }
.feed time { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.botlist { margin: 0; padding: 0; list-style: none; }
.botlist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.botlist li:last-child { border-bottom: 0; }
.bot-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.bot-name { font-size: 13.5px; font-weight: 700; }
.bot-name .id { margin-left: 6px; font-weight: 500; color: var(--text-3); }
.bot-desc { font-size: 12px; color: var(--text-3); }

.readiness .meter { margin: 4px 0 14px; }
.gate-items { margin: 0; padding: 0; list-style: none; }
.gate-items li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.gate-items li:first-child { border-top: 0; }
.gate-items .gi { width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.gate-items .gi .i { width: 12px; height: 12px; stroke-width: 3; }
.gate-items li.done .gi { background: var(--ok); color: #fff; }
.gate-items .gt { font-size: 13.5px; font-weight: 650; }
.gate-items .gd { font-size: 12px; color: var(--text-3); }

/* ---------------------------------------------------------------- ops · roles · finance blocks */
.site-card { display: grid; gap: 14px; }
.site-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.site-name { font-size: 15px; font-weight: 750; }
.skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.reasons { display: flex; flex-wrap: wrap; gap: 4px; }
.reason { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.reason b { color: var(--ok-ink); font-weight: 750; }
.reason.zero b { color: var(--text-3); }
.score { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.score .meter { flex: 1; }
.score b { min-width: 26px; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.inout { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.inout .i { width: 15px; height: 15px; }
.inout.yes { color: var(--ok-ink); }
.inout.no { color: var(--bad-ink); }

.perm { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.perm .i { width: 15px; height: 15px; }
.perm.yes { color: var(--ok-ink); }
.perm.no { color: var(--text-3); font-weight: 500; }
.grid td.me, .grid th.me { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.people { margin: 0; padding: 0; list-style: none; }
.people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.people li:last-child { border-bottom: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 750; flex: none; }
.avatar.dim { background: var(--surface-3); color: var(--text-3); }
.person-n { font-size: 13.5px; font-weight: 700; }
.person-d { font-size: 12px; color: var(--text-3); }

.scen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.scen { position: relative; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.scen.active { border-color: color-mix(in srgb, var(--series-1) 60%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--series-1) 60%, transparent), var(--shadow-1); }
.scen-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.scen-h .pill { margin-left: auto; }
.scen-v { margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.scen-v small { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.scen-sub { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.scen-sub span { display: block; font-size: 11.5px; color: var(--text-3); }
.scen-sub b { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.file {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1);
}
.file-ico { width: 40px; height: 48px; border-radius: 7px; display: grid; place-items: end center; padding-bottom: 7px; color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; position: relative; }
.file-ico::before { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; border-bottom-left-radius: 4px; background: rgba(255, 255, 255, 0.35); }
.file-ico.xlsx { background: #1e7a47; }
.file-ico.pptx { background: #c24e25; }
.file-n { font-size: 13.5px; font-weight: 700; word-break: break-all; }
.file-d { margin-top: 2px; font-size: 12.5px; color: var(--text-2); }
.file-m { margin-top: 6px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.file-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.export {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font-size: 13px; font-weight: 600;
  transition: border-color 0.12s, background 0.12s;
}
.export:hover { border-color: var(--border-strong); background: var(--surface-2); }
.export .i { color: var(--text-3); }
.export small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); font-family: var(--mono); }

/* ---------------------------------------------------------------- command palette */
.cmdk-backdrop {
  position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; align-items: flex-start;
  padding: 12vh 16px 16px; background: var(--overlay); animation: wu-fade 0.12s ease-out;
}
@keyframes wu-fade { from { opacity: 0; } }
.cmdk {
  width: min(620px, 100%); overflow: hidden; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-3); animation: wu-pop 0.14s ease-out;
}
@keyframes wu-pop { from { opacity: 0; transform: translateY(-6px) scale(0.99); } }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-in .i { color: var(--text-3); }
.cmdk-in input { flex: 1; min-width: 0; height: 54px; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; }
.cmdk-in input::placeholder { color: var(--text-3); }
.cmdk-list { max-height: min(430px, 58vh); overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.cmdk-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 650; color: var(--text-3); }
.cmdk-item {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 0 11px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer;
}
.cmdk-item .i { color: var(--text-3); }
.cmdk-item[aria-selected="true"] { background: var(--accent-soft); }
.cmdk-item[aria-selected="true"] .i { color: var(--accent); }
.cmdk-item .r { margin-left: auto; font-size: 12px; color: var(--text-3); }
.cmdk-empty { padding: 30px 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }
.cmdk-foot kbd { margin-right: 3px; }

/* ---------------------------------------------------------------- legacy vocabulary (older page markup) */
.hero-band { display: none; }
.lede { color: var(--text-2); }
.bignum-card {
  position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  padding: 18px 22px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.bignum-k { width: 100%; font-size: 13px; font-weight: 550; color: var(--text-2); }
.bignum-v { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.035em; color: var(--text); }
.bignum-u { font-size: 15px; font-weight: 650; color: var(--text-3); }
.bignum-card[class*="zone-"]::after {
  position: absolute; top: 16px; right: 18px; display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 650; border: 1px solid;
}
.bignum-card.zone-ok::after { content: "정상"; color: var(--ok-ink); background: var(--ok-soft); border-color: var(--ok-line); }
.bignum-card.zone-warn::after { content: "확인 필요"; color: var(--warn-ink); background: var(--warn-soft); border-color: var(--warn-line); }
.bignum-card.zone-bad::after { content: "조치 필요"; color: var(--bad-ink); background: var(--bad-soft); border-color: var(--bad-line); }
.bignum-card.zone-info::after { content: "진행 중"; color: var(--info-ink); background: var(--info-soft); border-color: var(--info-line); }
.bignum-card.zone-bad .bignum-v { color: var(--bad-ink); }
.bignum-card.zone-warn .bignum-v { color: var(--warn-ink); }
.role-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; align-items: start; }
.col {
  min-width: 0; padding: 16px 20px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.col-h {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border); font-size: 14.5px; font-weight: 750; color: var(--text); letter-spacing: -0.01em;
}
body[data-role="chief"] .col-chief:not(.card), body[data-role="exec"] .col-exec:not(.card) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
body[data-role="chief"] .col-chief > .col-h::after, body[data-role="exec"] .col-exec > .col-h::after {
  content: "내 역할"; margin-left: auto; padding: 3px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 750;
}
.col .grid th:first-child, .col .grid td:first-child { padding-left: 12px; }
.col .grid th:last-child, .col .grid td:last-child { padding-right: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { min-width: 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.stat-k { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.stat-v { font-size: 19px; font-weight: 750; letter-spacing: -0.015em; color: var(--text); }
.stat-v.warn { color: var(--warn-ink); }
.hint { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.section-h { margin: 32px 0 12px; font-size: 17px; font-weight: 750; letter-spacing: -0.015em; }
.gate-list { margin: 0; padding: 0; list-style: none; counter-reset: g; }
.gate-list li { counter-increment: g; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.gate-list li:last-child { border-bottom: 0; }
.gate-list li::before {
  content: counter(g); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 750;
}
.gate-list h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; }
.gate-list p { margin: 0; font-size: 12.5px; color: var(--text-3); }
.bot-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.bot strong { font-weight: 700; }
.bot span { font-size: 12.5px; color: var(--text-3); }
.bot-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.bot-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-1);
  text-decoration: none; color: var(--text);
}
.bot-card:hover { border-color: var(--border-strong); }
.bot-card.zone-ok { border-left-color: var(--ok-line); }
.bot-card.zone-warn { border-left-color: var(--warn-line); }
.bot-card.zone-bad { border-left-color: var(--bad-line); }
.bot-card.zone-info { border-left-color: var(--info-line); }
.bot-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bot-card-top strong { font-size: 15px; font-weight: 750; }
.bot-card-line { font-size: 13px; color: var(--text-2); }
.bot-card-meta { font-size: 12px; color: var(--text-3); }
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mini-k { display: block; font-size: 11.5px; color: var(--text-3); }
.mini-v { font-size: 16px; font-weight: 750; }
#sensor-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.pending-card { border-left: 4px solid var(--warn-line); }
.pending-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.pending-actions button { min-height: 44px; flex: 1; }

@media (max-width: 1280px) {
  .bot-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bot-strip { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .kpi-row.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .split, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  :root { --pad-x: 22px; }
  .site-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: 276px; height: 100%; z-index: 60;
    transform: translateX(-102%); transition: transform 0.22s ease; box-shadow: var(--shadow-3);
  }
  body.nav-open .rail { transform: none; }
  .rail-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.nav-open .rail-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .tb-search { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .tb-search span, .tb-search kbd { display: none; }
  .scen-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --pad-x: 16px; --topbar-h: 54px; }
  .site-grid > main, body > main { padding-top: 18px; }
  .cols-2, .split.even, .role-cols, .bot-list, .mini-row { grid-template-columns: minmax(0, 1fr); }
  .kpi-row, .kpi-row.five, .kpi-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 14px 13px; }
  .kpi-v { font-size: 22px; }
  .stat-row, .stat-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-step + .flow-step { border-left: 0; border-top: 1px solid var(--border); }
  .conn .conn-t { display: none; }
  .crumb-group, .crumbs > .i { display: none; }
  .seg button { padding: 0 9px; }
  .page-head, .hello { align-items: flex-start; }
  .hello .when { text-align: left; }
  .page-head h1, .hello h1 { font-size: 22px; }
  .banner { grid-template-columns: auto minmax(0, 1fr); }
  .banner-side { grid-column: 1 / -1; text-align: left; }
  .action { grid-template-columns: auto minmax(0, 1fr); }
  .action-meta { grid-column: 2; }
  .action .go { display: none; }
  .barlist li { grid-template-columns: minmax(0, 1fr) auto; }
  .barlist .bl-track { grid-column: 1 / -1; grid-row: 2; }
  .card-h, .toolbar { padding-left: 16px; padding-right: 16px; }
  .card-b { padding: 14px 16px 16px; }
  .grid th:first-child, .grid td:first-child { padding-left: 16px; }
  .grid th:last-child, .grid td:last-child { padding-right: 16px; }
  .toolbar .count { margin-left: 0; }
  .search { max-width: none; }
  .safe-strip .sep { display: none; }
}
@media (max-width: 420px) {
  .kpi-row, .kpi-row.five, .kpi-row.three { grid-template-columns: minmax(0, 1fr); }
  .seg { display: none; }
  .modules { grid-template-columns: minmax(0, 1fr); }
}

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

/* ---------------------------------------------------------------- print (결재용 한 장) */
@media print {
  html:root:root {
    color-scheme: light;
    --bg: #fff; --surface: #fff; --surface-2: #f5f5f5; --surface-3: #eee;
    --text: #000; --text-2: #222; --text-3: #555; --border: #bbb; --border-strong: #999;
    --shadow-1: none; --shadow-2: none; --shadow-3: none;
  }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .rail, .topbar, .rail-backdrop, .page-tools, .toolbar, .pager, .tabs, .no-print, .skip, .toast, .cmdk-backdrop, .viz-tip, .tb-search { display: none !important; }
  .site-grid { display: block; }
  .site-grid > main, body > main { max-width: none; padding: 0; }
  .card, .kpi, .flow, .banner, .alert, .col, .bignum-card, .stat, .module, .file, .scen, .callout { box-shadow: none !important; break-inside: avoid; }
  .table-wrap, .table-wrap.tall { max-height: none; overflow: visible; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
