:root {
  --bg: #f3eee3;
  --bg-soft: #ebe4d6;
  --card: #fbf7ee;
  --card-strong: #fffaf2;
  --ink: #2d2924;
  --muted: #7a7368;
  --accent: #7b8871;
  --accent-strong: #65725e;
  --accent-soft: #e5eadf;
  --negative: #a45f52;
  --negative-soft: #f4e4df;
  --border: #d9cfbe;
  --shadow: 0 18px 40px rgba(83, 67, 45, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(123, 136, 113, 0.14) 0, transparent 30%),
    radial-gradient(circle at bottom left, rgba(196, 151, 92, 0.12) 0, transparent 26%),
    linear-gradient(180deg, #faf6ee 0%, var(--bg) 100%);
  font-family: "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(45, 41, 36, 0.08);
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: baseline;
}

.brand {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gnb {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.gnb a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 16px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.gnb a:hover {
  color: var(--ink);
  background: rgba(229, 234, 223, 0.4);
}

.gnb-link-active {
  color: var(--ink) !important;
  font-weight: 600;
  border-bottom-color: var(--accent-strong) !important;
  background: rgba(229, 234, 223, 0.7);
  box-shadow: inset 0 -1px 0 rgba(101, 114, 94, 0.25);
}

.page-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 28px 40px;
}

.hero,
.page-head,
.chart-grid,
.overview-grid {
  margin-bottom: 24px;
}

.hero,
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(245, 239, 227, 0.9)),
    var(--card-strong);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.lead,
.chart-range,
.footer-note {
  color: var(--muted);
}

.lead {
  margin: 8px 0 0;
  line-height: 1.6;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

h1,
h2 {
  margin: 0;
}

.card {
  padding: 18px;
}

.section-title,
.chart-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}

.overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-grid-dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-card h2 {
  margin-top: 8px;
}

.summary-badges,
.research-status-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.compact-note {
  color: var(--muted);
  line-height: 1.6;
}

.summary-badges {
  margin-top: 14px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 136, 113, 0.18);
  background: rgba(255, 250, 242, 0.78);
  font-size: 0.88rem;
}

.table-shell {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(29, 38, 31, 0.08);
  text-align: left;
  font-size: 0.92rem;
  vertical-align: middle;
}

.data-table thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
  background: rgba(123, 136, 113, 0.1);
}

.row-selected {
  background: rgba(229, 234, 223, 0.45);
}

.align-right {
  text-align: right !important;
}

.stacked-cell {
  min-width: 180px;
}

.stacked-cell strong,
.stacked-cell span {
  display: block;
}

.stacked-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-tip {
  cursor: help;
  text-decoration: underline dotted rgba(123, 136, 113, 0.72);
  text-underline-offset: 0.18em;
}

.metric-tooltip-layer {
  position: fixed;
  z-index: 1200;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(45, 41, 36, 0.96);
  color: var(--card);
  font-size: 0.76rem;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  box-shadow: 0 10px 24px rgba(45, 41, 36, 0.18);
}

.metric-tooltip-layer[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-pass {
  color: #2f6b3d;
  background: #e3f0e1;
  border-color: rgba(47, 107, 61, 0.22);
}

.status-fail {
  color: #8b3d30;
  background: #f7e3de;
  border-color: rgba(139, 61, 48, 0.22);
}

.status-running {
  color: #2d5f8a;
  background: #dde8f5;
  border-color: #b5cde5;
}

.status-pending,
.status-neutral {
  color: var(--muted);
  background: rgba(229, 234, 223, 0.45);
  border-color: rgba(123, 136, 113, 0.14);
}

.chart-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.disclosure-card summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.disclosure-card summary::-webkit-details-marker {
  display: none;
}

.disclosure-card[open] summary {
  margin-bottom: 14px;
}

.disclosure-body {
  padding-top: 4px;
}

.chart-svg-wrap {
  position: relative;
}

.chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  z-index: 100;
  display: none;
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.98);
  box-shadow: 0 10px 24px rgba(45, 41, 36, 0.18);
  color: var(--ink);
  font-size: 0.76rem;
  white-space: nowrap;
}

.axis-line {
  stroke: rgba(45, 41, 36, 0.22);
  stroke-width: 1;
}

.axis-grid {
  stroke: rgba(45, 41, 36, 0.08);
  stroke-width: 1;
}

.axis-label,
.y-axis-label,
.chart-base-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-line {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 2.4;
}

.chart-point {
  fill: var(--card-strong);
  stroke: var(--accent-strong);
  stroke-width: 2;
}

.chart-bar {
  fill: rgba(123, 136, 113, 0.8);
}

.chart-crosshair {
  stroke: rgba(45, 41, 36, 0.3);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.site-footer {
  padding: 0 28px 28px;
}

.footer-grid {
  display: flex;
  justify-content: flex-end;
}

.footer-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

@media (max-width: 860px) {
  .site-header,
  .page-head,
  .chart-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .overview-grid,
  .overview-grid-dual {
    grid-template-columns: 1fr;
  }

  .page-shell {
    padding: 20px 16px 28px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}
