:root {
  color-scheme: light;
  --hq-canvas: #f4f6f5;
  --hq-surface: #fff;
  --hq-surface-soft: #edf3f1;
  --hq-ink: #162825;
  --hq-muted: #5b6d69;
  --hq-line: #d7e1de;
  --hq-line-strong: #aab9b5;
  --hq-primary: #0b6c61;
  --hq-primary-dark: #07544b;
  --hq-primary-soft: #e0f1ed;
  --hq-sidebar: #132f2c;
  --hq-sidebar-soft: #1c3d39;
  --hq-sidebar-text: #eaf2f0;
  --hq-sidebar-muted: #9fb7b2;
  --hq-positive: #21633d;
  --hq-attention: #805500;
  --hq-critical: #9d332e;
  --hq-radius-sm: 8px;
  --hq-radius: 12px;
  --hq-radius-lg: 18px;
  --hq-sidebar-width: 252px;
  --hq-content: 1320px;
}

* { box-sizing: border-box; }

html { background: var(--hq-canvas); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--hq-ink);
  background: var(--hq-canvas);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
  word-break: keep-all;
}

button, input, select { color: inherit; font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
button { border: 0; background: transparent; }

:focus-visible { outline: 3px solid #10a28f; outline-offset: 3px; box-shadow: 0 0 0 5px #fff; }
::selection { color: #fff; background: var(--hq-primary); }

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

.hq-skip-link {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--hq-primary-dark);
  border-radius: var(--hq-radius-sm);
  transform: translateY(-160%);
}

.hq-skip-link:focus { transform: translateY(0); }
.hq-icon { width: 20px; height: 20px; flex: 0 0 auto; }

.hq-fallback { display: grid; min-height: 100vh; padding: 32px; place-content: center; text-align: center; }
.hq-fallback img { width: 118px; margin: 0 auto 24px; }
.hq-fallback h1 { font-size: 28px; }
.hq-fallback p { margin-top: 8px; color: var(--hq-muted); }

.hq-shell { display: grid; min-height: 100vh; grid-template-columns: var(--hq-sidebar-width) minmax(0, 1fr); }
.hq-sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; display: flex; width: var(--hq-sidebar-width); color: var(--hq-sidebar-text); background: var(--hq-sidebar); flex-direction: column; }
.hq-sidebar__head { display: flex; min-height: 80px; padding: 20px 20px 18px; align-items: center; border-bottom: 1px solid rgb(255 255 255 / 9%); }
.hq-brand { display: flex; min-width: 0; align-items: center; gap: 12px; }
.hq-brand img { width: 105px; filter: brightness(0) invert(1); }
.hq-brand > span { display: grid; padding-left: 12px; border-left: 1px solid rgb(255 255 255 / 28%); line-height: 1.2; }
.hq-brand strong { font-size: 11px; letter-spacing: .14em; }
.hq-brand small { margin-top: 3px; color: var(--hq-sidebar-muted); font-size: 10px; white-space: nowrap; }
.hq-sidebar__close { display: none; margin-left: auto; padding: 8px; color: #fff; border-radius: 8px; }
.hq-navigation { padding: 18px 12px 24px; overflow-y: auto; }
.hq-nav-group + .hq-nav-group { margin-top: 18px; }
.hq-nav-group h2 { margin: 0 12px 6px; color: var(--hq-sidebar-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.hq-nav-group ul { display: grid; gap: 3px; padding: 0; list-style: none; }
.hq-nav-link { display: flex; min-height: 42px; padding: 10px 12px; align-items: center; gap: 12px; color: #c8d8d5; border-radius: 9px; font-weight: 650; }
.hq-nav-link:hover { color: #fff; background: rgb(255 255 255 / 7%); }
.hq-nav-link.is-active { color: #fff; background: var(--hq-primary); box-shadow: inset 3px 0 #58d0bf; }
.hq-nav-link .hq-icon { width: 18px; height: 18px; }
.hq-nav-count { min-width: 24px; margin-left: auto; padding: 2px 7px; color: #fff; background: #a13631; border-radius: 999px; font-size: 11px; text-align: center; }
.hq-account { display: flex; margin-top: auto; padding: 18px 20px; align-items: center; gap: 11px; border-top: 1px solid rgb(255 255 255 / 9%); }
.hq-account__avatar { display: grid; width: 34px; height: 34px; color: #12312d; background: #cae5df; border-radius: 50%; font-size: 13px; font-weight: 800; place-content: center; }
.hq-account > span:last-child { display: grid; min-width: 0; }
.hq-account strong { font-size: 13px; }
.hq-account small { overflow: hidden; color: var(--hq-sidebar-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.hq-sidebar-backdrop { display: none; }
.hq-workspace { min-width: 0; grid-column: 2; }
.hq-topbar { position: sticky; z-index: 50; top: 0; display: flex; height: 64px; padding: 0 32px; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--hq-line); }
.hq-menu-button { display: none; padding: 9px; border-radius: 9px; }
.hq-topbar__path { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.hq-topbar__path span { color: var(--hq-muted); }
.hq-topbar__right { display: flex; align-items: center; gap: 10px; }
.hq-freshness { display: flex; align-items: center; gap: 7px; color: var(--hq-muted); font-size: 12px; }
.hq-freshness > span { width: 7px; height: 7px; background: #2d8050; border-radius: 50%; }
.hq-icon-button { display: grid; width: 38px; height: 38px; color: var(--hq-muted); border: 1px solid var(--hq-line); border-radius: 9px; place-content: center; }
.hq-icon-button:hover { color: var(--hq-primary); background: var(--hq-surface-soft); }

.hq-main { width: min(100%, calc(var(--hq-content) + 64px)); min-height: calc(100vh - 64px); margin: 0 auto; padding: 42px 32px 72px; }
.hq-main:focus { outline: none; }
.hq-page-header { display: flex; margin-bottom: 28px; align-items: flex-end; justify-content: space-between; gap: 28px; }
.hq-page-header > div { min-width: 0; }
.hq-page-header h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.15; letter-spacing: -.035em; }
.hq-page-header h1 + p { max-width: 680px; margin-top: 10px; color: var(--hq-muted); font-size: 15px; }
.hq-button { display: inline-flex; min-height: 42px; padding: 10px 16px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 9px; font-weight: 750; white-space: nowrap; }
.hq-button--primary { color: #fff; background: var(--hq-primary); }
.hq-button--primary:hover { background: var(--hq-primary-dark); }
.hq-button--secondary { color: var(--hq-primary-dark); background: #fff; border-color: var(--hq-line-strong); }
.hq-button--secondary:hover { background: var(--hq-primary-soft); border-color: var(--hq-primary); }

.hq-summary { display: grid; margin-bottom: 38px; overflow: hidden; color: #fff; background: #143d38; border-radius: var(--hq-radius); grid-template-columns: 1.15fr .85fr; }
.hq-summary > div, .hq-summary > a { min-height: 154px; padding: 30px 34px; }
.hq-summary > div { display: grid; align-content: center; }
.hq-summary > div p { color: #bcd8d3; font-size: 13px; font-weight: 700; }
.hq-summary > div strong { margin-top: 2px; font-size: 42px; line-height: 1.1; }
.hq-summary small { margin-left: 4px; font-size: 15px; }
.hq-summary > div > span { margin-top: 8px; color: #bcd8d3; font-size: 12px; }
.hq-summary > a { display: flex; padding-left: 38px; align-items: center; flex-wrap: wrap; align-content: center; border-left: 1px solid rgb(255 255 255 / 20%); }
.hq-summary > a span { width: 100%; color: #bcd8d3; font-size: 12px; }
.hq-summary > a strong { margin-right: 12px; font-size: 21px; }
.hq-summary > a .hq-icon { transition: transform .15s ease; }
.hq-summary > a:hover .hq-icon { transform: translateX(4px); }

.hq-section + .hq-section { margin-top: 42px; }
.hq-section__head { display: flex; margin-bottom: 17px; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hq-section__head h2 { font-size: 22px; letter-spacing: -.02em; }
.hq-section__head > p, .hq-as-of { color: var(--hq-muted); font-size: 12px; }
.hq-inline-link { color: var(--hq-primary); font-size: 13px; font-weight: 750; }
.hq-inline-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hq-work-grid { display: grid; overflow: hidden; background: var(--hq-surface); border: 1px solid var(--hq-line); border-radius: var(--hq-radius); }
.hq-work-card { display: grid; min-width: 0; padding: 18px 20px; align-items: center; gap: 18px; border-bottom: 1px solid var(--hq-line); grid-template-columns: 128px minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(190px, .9fr) auto; }
.hq-work-card:last-child { border-bottom: 0; }
.hq-work-card__top { display: grid; align-items: start; justify-items: start; gap: 5px; }
.hq-domain { color: var(--hq-muted); font-size: 12px; font-weight: 700; }
.hq-work-card h3 { font-size: 15px; line-height: 1.45; }
.hq-reason { color: #425651; font-size: 12px; }
.hq-reason span { display: block; margin-bottom: 3px; color: var(--hq-muted); font-size: 11px; font-weight: 700; }
.hq-work-meta { display: grid; gap: 4px; }
.hq-work-meta div { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.hq-work-meta dt { color: var(--hq-muted); }
.hq-work-meta dd { font-weight: 650; text-align: right; }
.hq-text-link { display: flex; align-items: center; gap: 6px; color: var(--hq-primary); font-size: 13px; font-weight: 750; white-space: nowrap; }
.hq-text-link .hq-icon { width: 17px; height: 17px; }

.hq-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.hq-status > span { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.hq-status--positive { color: var(--hq-positive); }
.hq-status--attention { color: var(--hq-attention); }
.hq-status--critical { color: var(--hq-critical); }
.hq-status--neutral { color: #596966; }

.hq-domain-grid { display: grid; overflow: hidden; background: #fff; border: 1px solid var(--hq-line); border-radius: var(--hq-radius); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hq-domain-summary { display: flex; min-height: 74px; padding: 18px 20px; align-items: center; justify-content: space-between; border-right: 1px solid var(--hq-line); border-bottom: 1px solid var(--hq-line); }
.hq-domain-summary:nth-child(4n) { border-right: 0; }
.hq-domain-summary:nth-last-child(-n + 4) { border-bottom: 0; }
.hq-domain-summary span { color: var(--hq-muted); font-size: 13px; }
.hq-domain-summary strong { font-size: 24px; }
.hq-domain-summary small { margin-left: 2px; color: var(--hq-muted); font-size: 11px; }

.hq-queue-toolbar { display: grid; margin-bottom: 20px; padding: 18px; align-items: end; gap: 12px; background: #fff; border: 1px solid var(--hq-line); border-radius: var(--hq-radius); grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(130px, auto); }
.hq-filter { display: grid; gap: 6px; color: var(--hq-muted); font-size: 12px; font-weight: 700; }
.hq-filter select { width: 100%; height: 42px; padding: 0 38px 0 12px; color: var(--hq-ink); background: #fff; border: 1px solid var(--hq-line-strong); border-radius: 8px; }
.hq-queue-result { display: grid; justify-items: end; }
.hq-queue-result span { font-size: 20px; font-weight: 800; }
.hq-queue-result small { color: var(--hq-muted); font-size: 11px; }
.hq-queue-list { display: grid; overflow: hidden; background: #fff; border: 1px solid var(--hq-line); border-radius: var(--hq-radius); }
.hq-queue-row { display: grid; padding: 20px; align-items: center; gap: 20px; border-bottom: 1px solid var(--hq-line); grid-template-columns: minmax(200px, 1.2fr) minmax(180px, 1fr) minmax(250px, 1.25fr) auto; }
.hq-queue-row:last-child { border-bottom: 0; }
.hq-queue-row[hidden] { display: none; }
.hq-queue-row__subject > div { display: flex; margin-bottom: 8px; align-items: center; gap: 8px; }
.hq-queue-row__subject h2 { font-size: 15px; }
.hq-queue-row__subject p { margin-top: 4px; color: var(--hq-muted); font-size: 11px; }
.hq-queue-row__reason > span { color: var(--hq-muted); font-size: 11px; font-weight: 700; }
.hq-queue-row__reason p { margin-top: 5px; color: #425651; font-size: 12px; }
.hq-queue-row__meta { display: grid; gap: 4px; grid-template-columns: 1fr 1fr; }
.hq-queue-row__meta div { display: flex; min-width: 0; justify-content: space-between; gap: 8px; font-size: 11px; }
.hq-queue-row__meta dt { color: var(--hq-muted); }
.hq-queue-row__meta dd { overflow: hidden; font-weight: 650; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.hq-empty { padding: 72px 24px; text-align: center; }
.hq-empty h2 { font-size: 20px; }
.hq-empty p { margin-top: 7px; color: var(--hq-muted); }

.hq-table-wrap { overflow-x: auto; border: 1px solid var(--hq-line); border-radius: 9px; }
.hq-table { width: 100%; border-spacing: 0; border-collapse: separate; text-align: left; }
.hq-table th { padding: 12px 16px; color: var(--hq-muted); background: var(--hq-surface-soft); border-bottom: 1px solid var(--hq-line); font-size: 11px; font-weight: 750; white-space: nowrap; }
.hq-table td { padding: 16px; border-bottom: 1px solid var(--hq-line); font-size: 13px; vertical-align: middle; }
.hq-table tbody tr:last-child td { border-bottom: 0; }
.hq-table tbody tr:hover { background: #fafcfb; }
.hq-row-link { display: inline-flex; align-items: center; gap: 4px; color: var(--hq-primary); font-size: 12px; font-weight: 750; white-space: nowrap; }
.hq-row-link .hq-icon { width: 15px; height: 15px; }
.hq-boundary-note { display: flex; margin-top: 16px; padding-top: 14px; align-items: flex-start; gap: 22px; color: #3f5551; border-top: 1px solid var(--hq-line); }
.hq-boundary-note strong { flex: 0 0 auto; font-size: 13px; }
.hq-boundary-note p { font-size: 13px; }

@media (max-width: 1180px) {
  .hq-work-card { grid-template-columns: 110px minmax(160px, 1fr) minmax(150px, 1fr) auto; }
  .hq-work-card__top { grid-column: 1; grid-row: 1 / 3; }
  .hq-work-card h3 { grid-column: 2; grid-row: 1; }
  .hq-work-card .hq-reason { grid-column: 3; grid-row: 1; }
  .hq-work-card .hq-work-meta { grid-column: 2 / 4; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-work-card .hq-text-link { grid-column: 4; grid-row: 1 / 3; }
  .hq-domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hq-domain-summary:nth-child(4n) { border-right: 1px solid var(--hq-line); }
  .hq-domain-summary:nth-last-child(-n + 4) { border-bottom: 1px solid var(--hq-line); }
  .hq-domain-summary:nth-child(2n) { border-right: 0; }
  .hq-domain-summary:nth-last-child(-n + 2) { border-bottom: 0; }
  .hq-queue-row { grid-template-columns: 1fr 1fr auto; }
  .hq-queue-row__meta { grid-column: 1 / 3; grid-row: 2; }
}

@media (max-width: 900px) {
  .hq-shell { display: block; }
  .hq-workspace { min-height: 100vh; }
  .hq-sidebar { width: min(320px, 88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 14px 0 40px rgb(8 26 23 / 28%); }
  .hq-sidebar__close { display: grid; place-content: center; }
  .hq-sidebar-backdrop { position: fixed; z-index: 90; inset: 0; display: block; visibility: hidden; background: rgb(8 24 21 / 48%); opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
  .hq-shell.is-menu-open .hq-sidebar { transform: translateX(0); }
  .hq-shell.is-menu-open .hq-sidebar-backdrop { visibility: visible; opacity: 1; }
  .hq-menu-button { display: grid; margin-left: -8px; place-content: center; }
  .hq-topbar { padding: 0 24px; }
  .hq-topbar__path { margin-right: auto; margin-left: 10px; }
  .hq-main { padding: 34px 24px 64px; }
  .hq-queue-toolbar { grid-template-columns: repeat(3, 1fr); }
  .hq-queue-result { grid-column: 1 / -1; justify-items: start; }
}

@media (max-width: 680px) {
  .hq-topbar { height: 58px; padding: 0 16px; }
  .hq-freshness { display: none; }
  .hq-main { min-height: calc(100vh - 58px); padding: 28px 16px 52px; }
  .hq-page-header { align-items: stretch; flex-direction: column; gap: 18px; }
  .hq-page-header h1 { font-size: 30px; }
  .hq-page-header .hq-button { width: 100%; }
  .hq-summary { grid-template-columns: 1fr; }
  .hq-summary > div, .hq-summary > a { min-height: 120px; padding: 24px; }
  .hq-summary > a { border-top: 1px solid rgb(255 255 255 / 20%); border-left: 0; }
  .hq-work-card { padding: 18px; gap: 10px; grid-template-columns: 1fr; }
  .hq-work-card__top, .hq-work-card h3, .hq-work-card .hq-reason, .hq-work-card .hq-work-meta, .hq-work-card .hq-text-link { grid-column: 1; grid-row: auto; }
  .hq-work-card__top { display: flex; align-items: center; justify-content: space-between; }
  .hq-work-card .hq-work-meta { grid-template-columns: 1fr; }
  .hq-work-card .hq-text-link { margin-top: 4px; padding-top: 12px; justify-content: space-between; border-top: 1px solid var(--hq-line); }
  .hq-domain-grid { grid-template-columns: 1fr; }
  .hq-domain-summary, .hq-domain-summary:nth-child(4n), .hq-domain-summary:nth-child(2n) { border-right: 0; }
  .hq-domain-summary:nth-last-child(-n + 4), .hq-domain-summary:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hq-line); }
  .hq-domain-summary:last-child { border-bottom: 0; }
  .hq-section__head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .hq-queue-toolbar { grid-template-columns: 1fr; }
  .hq-queue-result { grid-column: auto; }
  .hq-queue-row { grid-template-columns: 1fr; }
  .hq-queue-row__meta { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .hq-queue-row .hq-button { width: 100%; }
  .hq-boundary-note { flex-direction: column; gap: 5px; }
}

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