/* ============================================================
   리셋 · 타이포 · 앱 셸
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-app);
  color: var(--fg);
  font-family: var(--ff-sans);
  font-size: var(--fs-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  /* 한글은 어절 단위로 끊는다 — 낱글자가 다음 줄로 넘어가지 않게 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}

.num { font-family: var(--ff-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.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;
}

/* --- 앱 셸 ------------------------------------------------- */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  height: 52px; padding: 0 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: baseline; gap: 8px;
  padding-right: 20px; margin-right: -6px;
  border-right: 1px solid var(--line);
  height: 26px;
}
.brand__mark {
  font-size: var(--fs-md); font-weight: 700; letter-spacing: -0.02em;
  color: var(--fg);
}
.brand__site { font-size: var(--fs-sm); color: var(--fg-faint); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px;
  border-radius: var(--r-ctl);
  font-size: var(--fs-tbl); font-weight: 500;
  color: var(--fg-faint);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.nav__item:hover { background: var(--bg-raised); color: var(--fg); }
.nav__item[aria-current="page"] {
  background: var(--accent-weak);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.nav__item .icon { opacity: .85; }

.topbar__spacer { flex: 1 1 auto; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

/* 샘플 데이터 배지 — 상시 노출 */
.sample-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-inset);
  font-size: var(--fs-xs); color: var(--fg-faint);
  white-space: nowrap;
}
.sample-badge .icon { width: 12px; height: 12px; }

.clock {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.15; white-space: nowrap;
}
.clock__t { font-family: var(--ff-mono); font-size: var(--fs-tbl); color: var(--fg-muted); }
.clock__d { font-size: var(--fs-2xs); color: var(--fg-faint); }

/* --- 페이지 ------------------------------------------------ */
.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 20px 40px;
  display: flex; flex-direction: column;
  gap: var(--gap-section);
}
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagehead__titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pagehead h1 {
  font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2;
}
.pagehead__sub { font-size: var(--fs-sm); color: var(--fg-faint); }
.pagehead__spacer { flex: 1 1 auto; }

.crumb { display: flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--fg-faint); }
.crumb a:hover { color: var(--accent); }
.crumb .icon { width: 13px; height: 13px; opacity: .6; }

footer.foot {
  border-top: 1px solid var(--line);
  padding: 14px 20px 28px;
  font-size: var(--fs-xs); color: var(--fg-faint);
  display: flex; gap: 18px; flex-wrap: wrap;
  max-width: 1560px; margin: 0 auto; width: 100%;
}
