/* Shared tokens + chrome for /dashboard and /guide */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --track: #cde2fb;
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --link: #256abf;
  --code-bg: #f3f2ee;
  --shadow: 0 8px 24px rgba(11, 11, 11, 0.12);
  --sans: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "D2Coding", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232322;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --series-1: #3987e5;
    --series-2: #d95926;
    --track: #0d366b;
    --good-text: #0ca30c;
    --link: #6da7ec;
    --code-bg: #141413;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #232322;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --series-1: #3987e5;
  --series-2: #d95926;
  --track: #0d366b;
  --good-text: #0ca30c;
  --link: #6da7ec;
  --code-bg: #141413;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 14px/1.55 var(--sans);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 52px;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; }
.nav a {
  padding: 6px 10px; border-radius: 8px; color: var(--text-2); white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 600; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }

.btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 7px 14px; cursor: pointer; font-weight: 550;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--series-1); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.input {
  border: 1px solid var(--border); background: var(--page); border-radius: 8px;
  padding: 7px 10px; min-width: 0;
}
.input:focus, .btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--series-1); outline-offset: 1px; }

/* status: color always paired with an icon + label */
.status-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.status-icon {
  width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center;
  color: #fff; font-size: 10px; font-weight: 800; line-height: 1; flex: none;
}
.st-good .status-icon { background: var(--good); }
.st-warning .status-icon { background: var(--warning); color: #0b0b0b; }
.st-serious .status-icon { background: var(--serious); color: #0b0b0b; }
.st-critical .status-icon { background: var(--critical); }
.st-idle .status-icon { background: var(--muted); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border); border-left: 3px solid var(--warning);
  background: var(--surface); border-radius: 8px; padding: 10px 14px; color: var(--text-2);
}
.notice b { color: var(--text); }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 550; font-size: 12px; position: sticky; top: 0; background: var(--surface); }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow: auto; }

@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 12px; }
  .brand span { display: none; }
  .wrap { padding: 16px; }
}
