/* ScholarWorks 운영 — 제품의 네이비 띠 아래 흰 카드. 문제는 크게, 정상은 조용히 */
:root {
  /* ScholarWorks 사용자 화면 머리띠(#1e3c72 → #2a5298)에서 가져온 네이비 */
  --navy: #1e3c72;
  --navy-deep: #162e59;
  --navy-line: rgba(255, 255, 255, 0.16);
  --band-ink: #ffffff;
  /* 네이비 위 흐린 글자. 대비 7.0:1 */
  --band-muted: #c3d1ea;
  --link: #2a5298;

  --paper: #eef2f8;
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #5e6b7a;
  --rule: #d8e0ec;
  --ok: #1f7a5a;
  --ok-tint: #e3f0ea;
  --warn: #8a5a0b;
  --warn-tint: #fbefd5;
  --warn-edge: #e2a93b;
  --error: #c0362c;
  --error-ink: #ffffff;
  --down: #4a5462;
  /* 차트 전용. 검증 스크립트로 확인한 값(오류·접속 불가·주의 인접 CVD ΔE ≥ 19) */
  --mark-unreachable: #6b4fa3;
  /* IP 미허용. 주의·접속 불가·오류와 모든 쌍 검증 통과(접속 불가와 CVD ΔE 8.7 — 늘 글자와 함께 쓴다) */
  --denied: #0386b5;
  --mark-series: #3a64b0;
  --heat-ok: #cfe5da;
  --heat-none: #eef1f4;
  --grid: #e3e7ec;
  --axis: #c3cad3;
  --focus: #2459c9;

  --font: "Pretendard", "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  /* 1.25 배율 */
  --step--1: 0.8rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
}

* { box-sizing: border-box; }

html { font-size: 15px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

/* 머리 — 판정 문장이 첫 화면의 주인공 */
.masthead { padding: 2.5rem clamp(1rem, 4vw, 3rem) 1.5rem; max-width: 1280px; }
.product { margin: 0 0 0.75rem; font-size: var(--step-0); font-weight: 600; color: var(--muted); }
.product a { text-decoration: none; }
.product a:hover { text-decoration: underline; }

.verdict {
  margin: 0;
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 30ch;
  /* 한글 어절 안에서 줄을 나누지 않는다 */
  word-break: keep-all;
}
.verdict.is-alert { color: var(--error); }
.verdict.is-calm { color: var(--ok); }

.run { margin: 0.75rem 0 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: center; }
.sep { width: 1px; height: 0.9em; background: var(--rule); display: inline-block; }
.stale { color: var(--error); font-weight: 700; }

main { padding: 0 clamp(1rem, 4vw, 3rem) 4rem; max-width: 1280px; }

/* 매트릭스 */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }

.matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 880px; }
.matrix thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  text-align: left; font-size: var(--step--1); font-weight: 600; color: var(--muted);
  padding: 0.75rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.matrix tbody th, .matrix td { border-bottom: 1px solid var(--rule); vertical-align: top; }
.matrix tbody tr:last-child > * { border-bottom: 0; }

.inst-col { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 9rem; padding: 0.65rem 0.75rem; text-align: left; font-weight: 700; font-size: var(--step-1); border-left: 5px solid transparent; }
.inst-col a { text-decoration: none; }
.inst-col a:hover { text-decoration: underline; }
.inst-col.row-error, .inst-col.row-unreachable { border-left-color: var(--error); }
.inst-col.row-denied { border-left-color: var(--denied); }
.inst-col.row-warn { border-left-color: var(--warn-edge); }
.inst-col.row-known, .inst-col.row-pending { color: var(--muted); }

.time-col { width: 6rem; padding: 0.65rem 0.75rem; color: var(--muted); font-size: var(--step--1); white-space: nowrap; text-align: right; }

.cell { padding: 0.55rem 0.75rem; font-size: var(--step--1); max-width: 16rem; }
.cell.area-connection { white-space: nowrap; width: 7rem; }
.cell-state { display: block; font-weight: 700; font-size: var(--step--1); }
.cell-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}

/* 정상은 거의 드러나지 않는다 */
.cell-ok { color: var(--muted); }
.cell-ok .cell-text::before {
  content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.45em;
  border-radius: 50%; background: var(--ok); vertical-align: 0.1em;
}
.cell-warn { background: var(--warn-tint); color: var(--warn); box-shadow: inset 3px 0 0 var(--warn-edge); }
.cell-warn .cell-text { color: var(--ink); }
.cell-error { background: var(--error); color: var(--error-ink); }
.cell-denied { background: var(--denied); color: #ffffff; }
.cell-skip, .cell-known {
  color: var(--down);
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(74, 84, 98, 0.12) 6px 8px);
}
.cell-known .cell-state { color: var(--muted); }
.cell-unknown { color: var(--muted); font-style: italic; }
.is-known .cell-skip { opacity: 0.7; }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; align-items: center; margin: 1rem 0 0; font-size: var(--step--1); color: var(--muted); }
.legend-item { display: inline-flex; gap: 0.4rem; align-items: center; }
.swatch { width: 1rem; height: 1rem; border-radius: 2px; border: 1px solid var(--rule); display: inline-block; }
.swatch.cell-ok { background: var(--ok-tint); }
.legend-note { flex-basis: 100%; max-width: 80ch; }

/* 기관 상세 */
.detail-head .title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.inst-title { margin: 0; font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 3px; font-weight: 700; font-size: var(--step-0); }
.badge.row-ok { background: var(--ok-tint); color: var(--ok); }
.badge.row-warn { background: var(--warn-tint); color: var(--warn); }
.badge.row-error, .badge.row-unreachable { background: var(--error); color: var(--error-ink); }
.badge.row-denied { background: var(--denied); color: #ffffff; }
.badge.row-known, .badge.row-pending { background: var(--rule); color: var(--down); }

.actions { margin-top: 1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.refresh {
  font: inherit; font-weight: 600;
  padding: 0.45rem 0.9rem; border-radius: 4px;
  border: 1px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer;
}
.refresh:hover { background: var(--ink); color: var(--surface); }
.refresh:disabled { opacity: 0.6; cursor: progress; }
.refresh-msg { color: var(--muted); font-size: var(--step--1); }
.refresh-msg.is-error { color: var(--error); }

.note { margin: 1rem 0 0; max-width: 72ch; padding-left: 0.75rem; border-left: 3px solid var(--rule); color: var(--muted); }

.detail section { margin-top: 2.25rem; max-width: 1100px; }
.detail h2 { font-size: var(--step-2); font-weight: 800; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.detail h3 { font-size: var(--step-0); font-weight: 700; margin: 0; }

.heartbeat { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; height: 2.25rem; align-items: stretch; }
.beat { flex: 1 1 0; min-width: 2px; max-width: 10px; border-radius: 1px; }
.beat-ok { background: var(--ok); opacity: 0.35; }
.beat-warn { background: var(--warn-edge); }
.beat-error { background: var(--error); }
.beat-unreachable { background: var(--mark-unreachable); }
.beat-denied { background: var(--denied); }
.heartbeat-axis { display: flex; justify-content: space-between; margin: 0.25rem 0 0; font-size: var(--step--1); color: var(--muted); max-width: 100%; }

.all-clear { margin: 0; color: var(--ok); font-weight: 600; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; max-width: 80ch; }
.issue { display: grid; gap: 0.15rem; padding: 0.6rem 0.8rem; border-radius: 4px; overflow-wrap: anywhere; }
.issue-tag { font-size: var(--step--1); font-weight: 700; }
.issue-error { background: var(--error); color: var(--error-ink); }
.issue-warn { background: var(--warn-tint); box-shadow: inset 3px 0 0 var(--warn-edge); }
.issue-warn .issue-tag { color: var(--warn); }

.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem 2rem; }
.fact { border-top: 1px solid var(--rule); padding-top: 0.5rem; }
.fact dt { font-size: var(--step--1); color: var(--muted); }
.fact dd { margin: 0.15rem 0 0; overflow-wrap: anywhere; }

.live { margin-top: 1.5rem; }
.live-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.live-head label { font-size: var(--step--1); color: var(--muted); display: inline-flex; gap: 0.4rem; align-items: center; }
.live-head select { font: inherit; padding: 0.2rem 0.4rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); }
.live-error { color: var(--error); margin: 0; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; }
.data { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.data th, .data td { text-align: left; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.data thead th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.data tbody tr:last-child > * { border-bottom: 0; }
.data td { overflow-wrap: anywhere; max-width: 32rem; }
.data .num { white-space: nowrap; }
.data .row-bad { background: var(--warn-tint); }
.status-FAILED { color: var(--error); font-weight: 700; }
.status-IN_PROGRESS { color: var(--warn); font-weight: 700; }

pre.raw { margin: 0; padding: 0.75rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow-x: auto; font-size: var(--step--1); }

@media (max-width: 640px) {
  html { font-size: 14px; }
  .verdict, .inst-title { font-size: var(--step-3); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 로그인 */
.login { max-width: 26rem; padding: 4rem clamp(1rem, 4vw, 3rem); }
.login-title { margin: 0 0 0.5rem; font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; }
.login-form { display: grid; gap: 0.35rem; margin: 1.75rem 0 1.25rem; }
.login-form label { font-weight: 600; font-size: var(--step--1); margin-top: 0.6rem; }
.login-form input {
  font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--surface); color: var(--ink);
}
.login-form input:focus-visible { border-color: var(--focus); }
.login-form button {
  margin-top: 1.25rem; font: inherit; font-weight: 700; padding: 0.65rem; border-radius: 4px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--surface); cursor: pointer;
}
.login-error { margin: 0.75rem 0 0; padding: 0.6rem 0.8rem; border-radius: 4px; background: var(--error); color: var(--error-ink); }
.login code { font-size: 0.95em; background: var(--surface); padding: 0.1rem 0.3rem; border-radius: 3px; border: 1px solid var(--rule); }

/* 이슈와 변화 */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: end; margin: 0 0 1.25rem; font-size: var(--step--1); }
.filters label { display: grid; gap: 0.2rem; color: var(--muted); }
.filters label.check { display: flex; gap: 0.4rem; align-items: center; color: var(--ink); padding-bottom: 0.35rem; }
.filters select { font: inherit; padding: 0.3rem 0.45rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); min-width: 7rem; }
.filters button { font: inherit; font-weight: 600; padding: 0.35rem 0.9rem; border-radius: 4px; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); cursor: pointer; }
.filters a { padding-bottom: 0.35rem; }

.issues-table th[scope="row"] { font-size: var(--step-0); white-space: nowrap; }
.issues-table th[scope="row"] a { text-decoration: none; }
.issues-table tr.is-known { color: var(--muted); }
.level { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 3px; font-weight: 700; white-space: nowrap; }
.level-error { background: var(--error); color: var(--error-ink); }
.level-warn { background: var(--warn-tint); color: var(--warn); box-shadow: inset 3px 0 0 var(--warn-edge); }

.changes { margin-top: 3rem; max-width: 900px; }
.changes h2 { font-size: var(--step-2); font-weight: 800; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.timeline { list-style: none; margin: 1rem 0 0; padding: 0; border-left: 2px solid var(--rule); }
.change { position: relative; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: baseline; padding: 0.45rem 0 0.45rem 1.1rem; }
.change::before {
  content: ""; position: absolute; left: -6px; top: 0.85rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted);
}
.change.to-ok::before { border-color: var(--ok); background: var(--ok); }
.change.to-warn::before { border-color: var(--warn-edge); background: var(--warn-edge); }
.change.to-error::before { border-color: var(--error); background: var(--error); }
.change.to-unreachable::before { border-color: var(--mark-unreachable); background: var(--mark-unreachable); }
.change.to-denied::before { border-color: var(--denied); background: var(--denied); }
.change time { color: var(--muted); font-size: var(--step--1); min-width: 6.5rem; }
.change-inst { font-weight: 700; text-decoration: none; min-width: 5rem; }


/* 추세 */
.range-nav { display: flex; gap: 0.25rem; margin: 0 0 1.5rem; }
.range-nav a {
  padding: 0.35rem 0.85rem; border: 1px solid var(--rule); border-radius: 4px;
  background: var(--surface); text-decoration: none; font-size: var(--step--1); font-weight: 600;
}
.range-nav a:hover { border-color: var(--ink); }
.range-nav a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.chart { margin: 0 0 2.5rem; max-width: 1100px; }
.chart figcaption h3 { margin: 0; font-size: var(--step-1); font-weight: 800; }
.chart-sub { margin: 0.2rem 0 0.6rem; color: var(--muted); font-size: var(--step--1); max-width: 80ch; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0 0 0.6rem; padding: 0; font-size: var(--step--1); }
.chart-legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.key { display: inline-block; flex: none; }
.key-rect { width: 0.75rem; height: 0.75rem; border-radius: 2px; }
.key-line { width: 1rem; height: 2px; border-radius: 1px; }
.chart-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 0.5rem 0.25rem 0; }
.chart svg { display: block; width: 100%; min-width: 640px; height: auto; font-family: var(--font); }
.chart svg text { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart svg .unit { font-size: 11px; }
.chart svg .value-label { fill: var(--ink); font-weight: 700; }
.chart svg .row-label { fill: var(--ink); font-weight: 600; }
.chart svg a:hover .row-label, .chart svg a:focus .row-label { text-decoration: underline; }
.chart svg .heat-row.is-muted .row-label { fill: var(--muted); font-weight: 400; }
.grid line { stroke: var(--grid); stroke-width: 1; }
.axis .baseline { stroke: var(--axis); stroke-width: 1; }
.no-data { fill: var(--heat-none); opacity: 0.6; }

/* 표시 색. 키(범례)·칸·막대가 같은 이름을 쓴다 */
.mark-error, .key-error, .heat-error, .key-heat-error, .mark-index-failed, .key-index-failed { fill: var(--error); background: var(--error); }
.mark-unreachable, .key-unreachable, .heat-unreachable, .key-heat-unreachable { fill: var(--mark-unreachable); background: var(--mark-unreachable); }
.mark-denied, .key-denied, .heat-denied, .key-heat-denied { fill: var(--denied); background: var(--denied); }
.mark-warn, .key-warn, .heat-warn, .key-heat-warn { fill: var(--warn-edge); background: var(--warn-edge); }
.heat-ok, .key-heat-ok { fill: var(--heat-ok); background: var(--heat-ok); }
.heat-none, .key-heat-none { fill: var(--heat-none); background: var(--heat-none); }
.key-heat-none { box-shadow: inset 0 0 0 1px var(--rule); }
.mark-index-ok, .key-index-ok { fill: var(--mark-series); background: var(--mark-series); }
.heat-row.is-muted .cell { opacity: 0.45; }

.line { fill: none; stroke: var(--mark-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dot { fill: var(--mark-series); stroke: var(--surface); stroke-width: 2; }
.crosshair { stroke: var(--muted); stroke-width: 1; visibility: hidden; pointer-events: none; }
.chart svg.is-hovering .crosshair { visibility: visible; }

/* 막대·선 차트의 투명 히트 영역. 격자 칸은 칸 자체가 히트 영역이라 색을 지킨다 */
.hit:not(.cell) { fill: transparent; cursor: default; }
.hit:focus { outline: none; }
.hit:focus-visible { fill: rgba(36, 89, 201, 0.08); stroke: var(--focus); stroke-width: 2; }
.col.is-active .mark { filter: brightness(1.12); }
.cell.hit:hover, .cell.is-active { stroke: var(--ink); stroke-width: 1.5; }

.table-view { margin-top: 0.5rem; font-size: var(--step--1); }
.table-view summary { cursor: pointer; color: var(--muted); width: fit-content; }
.table-view summary:hover { color: var(--ink); }
.table-view .table-wrap { margin-top: 0.5rem; max-height: 24rem; overflow: auto; }

.chart-tip {
  position: fixed; z-index: 10; pointer-events: none;
  min-width: 9rem; max-width: 18rem; padding: 0.5rem 0.65rem;
  background: var(--ink); color: var(--surface); border-radius: 4px;
  font-size: var(--step--1); line-height: 1.4; box-shadow: 0 4px 14px rgba(23, 32, 43, 0.18);
}
.chart-tip[hidden] { display: none; }
.chart-tip .tip-title { color: #b9c3cf; margin-bottom: 0.25rem; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 0.5rem; }
.chart-tip .tip-row strong { font-weight: 700; margin-left: auto; padding-left: 0.75rem; font-variant-numeric: tabular-nums; }

@media (forced-colors: active) {
  .mark, .cell, .key { forced-color-adjust: none; }
}

/* ── 네이비 띠 ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 0.75rem 2rem; flex-wrap: wrap;
  padding: 0.7rem clamp(1rem, 4vw, 3rem);
  background: var(--navy-deep); color: var(--band-muted);
  font-size: var(--step--1);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--band-ink); text-decoration: none; font-weight: 800; font-size: var(--step-0); letter-spacing: -0.01em; }
.brand-sub { font-weight: 500; color: var(--band-muted); }
.brand-mark { width: 1.1rem; height: 1.1rem; border-radius: 4px; background: linear-gradient(135deg, #2a5298, #4f7fd1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
.topbar nav { display: flex; gap: 0.25rem; }
.topbar nav a { color: var(--band-muted); text-decoration: none; padding: 0.35rem 0.7rem; border-radius: 5px; }
.topbar nav a:hover { color: var(--band-ink); background: rgba(255, 255, 255, 0.08); }
.topbar nav a[aria-current="page"] { color: var(--band-ink); font-weight: 700; background: rgba(255, 255, 255, 0.14); }
.topbar .user { margin-left: auto; display: flex; gap: 0.75rem; align-items: center; }
.topbar .user button {
  font: inherit; color: var(--band-ink); background: none; border: 1px solid var(--navy-line);
  border-radius: 5px; padding: 0.25rem 0.65rem; cursor: pointer;
}
.topbar .user button:hover { background: rgba(255, 255, 255, 0.1); }
.topbar :focus-visible, .has-topbar .masthead :focus-visible { outline-color: #ffffff; }

/* 띠 아래쪽: 화면마다의 판정 문장 */
.has-topbar .masthead {
  max-width: none; background: var(--navy); color: var(--band-ink);
  padding: 1.75rem clamp(1rem, 4vw, 3rem) 1.6rem;
  border-top: 1px solid var(--navy-line);
}
.has-topbar .masthead .product { display: none; }
.has-topbar .verdict, .has-topbar .verdict.is-alert, .has-topbar .verdict.is-calm { color: var(--band-ink); font-size: var(--step-3); max-width: 40ch; }
.has-topbar .run { color: var(--band-muted); }
.has-topbar .run a { color: var(--band-ink); }
.has-topbar .sep { background: var(--navy-line); }
.has-topbar .stale { color: #ffd6d2; }
.has-topbar .masthead .note { color: var(--band-muted); border-left-color: var(--navy-line); }
.has-topbar .masthead .refresh { background: transparent; color: var(--band-ink); border-color: rgba(255, 255, 255, 0.55); }
.has-topbar .masthead .refresh:hover { background: var(--band-ink); color: var(--navy); }
.has-topbar .masthead .refresh-msg { color: var(--band-muted); }
.has-topbar .masthead .refresh-msg.is-error { color: #ffd6d2; }
.has-topbar main { padding-top: 1.75rem; }
.inst-title-id { font-size: var(--step-1); font-weight: 500; color: var(--band-muted); letter-spacing: 0; }

/* 판정 점. 네이비 위에서는 흰 테두리로 바탕과 갈라 둔다(색만으로 뜻을 전하지 않는다 — 문장이 함께 있다) */
.verdict { display: flex; align-items: center; gap: 0.6em; }
.verdict-dot { flex: none; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; box-shadow: 0 0 0 0.12em #ffffff; }
.verdict-dot.tone-ok { background: #3fb884; }
.verdict-dot.tone-warn { background: #f0b445; }
.verdict-dot.tone-error { background: #e5544b; }

/* ── 대시보드 ──────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.matrix-card { overflow: hidden; }
.matrix-card .matrix-wrap { border: 0; border-radius: 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; margin: 0 0 1rem; }
.search input {
  font: inherit; width: min(22rem, 100%); padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--surface); color: var(--ink);
}
.search input:focus-visible { border-color: var(--link); outline-offset: 0; }
.state-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.state-chip {
  font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer;
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
}
.state-chip .n { color: var(--muted); font-weight: 500; margin-left: 0.15rem; }
.state-chip:hover { border-color: var(--link); }
.state-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.state-chip[aria-pressed="true"] .n { color: var(--band-muted); }
.toggle-all { margin-left: auto; font-size: var(--step--1); color: var(--link); }

.matrix thead th { background: #f6f8fc; vertical-align: bottom; }
.area-sum { display: flex; gap: 0.35rem; margin-top: 0.25rem; font-weight: 700; }
.sum-error { color: var(--error); }
.sum-warn { color: var(--warn); }

.inst-col { width: 14rem; }
.inst-name { display: block; font-size: var(--step-0); font-weight: 800; line-height: 1.3; word-break: keep-all; }
.inst-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; align-items: center; margin-top: 0.15rem; font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.inst-id { color: var(--muted); font-weight: 500; font-size: var(--step--1); }
.lasting { color: var(--ink); font-weight: 600; }
.just {
  display: inline-block; padding: 0 0.4rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: #e6edfa; color: var(--link); white-space: nowrap;
}
.mini-strip { display: flex; gap: 1px; margin-top: 0.45rem; height: 0.55rem; max-width: 11rem; }
.mini-strip i { flex: 1 1 0; border-radius: 1px; }
.mini-strip .beat-ok { background: var(--ok); opacity: 0.28; }
.mini-strip .beat-warn { background: var(--warn-edge); }
.mini-strip .beat-error { background: var(--error); }
.mini-strip .beat-unreachable { background: var(--mark-unreachable); }
.mini-strip .beat-denied { background: var(--denied); }

.all-clear-banner { margin: 0; padding: 1.4rem 1.25rem; display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--ok); }

.healthy { margin-top: 1.75rem; }
.healthy h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; font-size: var(--step-1); font-weight: 800; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: 0.4rem; padding: 0.4rem 0.75rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: var(--step--1);
}
.chip:hover { border-color: var(--link); color: var(--link); }
.chip-id { color: var(--muted); font-weight: 500; font-size: 0.72rem; }

.quiet { margin-top: 1.5rem; font-size: var(--step--1); color: var(--muted); }
.quiet p { margin: 0.25rem 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.quiet strong { color: var(--ink); font-weight: 600; }
.quiet a { color: var(--muted); }

.legend-box { margin-top: 1.75rem; font-size: var(--step--1); }
.legend-box summary { cursor: pointer; color: var(--muted); width: fit-content; }
.legend-box summary:hover { color: var(--ink); }

/* 검색·거르기로 숨긴 행 */
[data-row][hidden] { display: none; }
.filter-empty { margin: 0; padding: 1.25rem; color: var(--muted); }

/* 새로고침 중 이전 화면을 흐리게 유지(깜빡임 없이) */
main.is-refreshing { opacity: 0.6; transition: opacity 0.2s; }

@media (max-width: 640px) {
  .topbar .user { margin-left: 0; }
  .toggle-all { margin-left: 0; }
  .has-topbar .masthead { padding-top: 1.25rem; }
}
