:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", Arial, sans-serif;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
}

.refresh-button {
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.grid {
  display: grid;
  gap: 16px;
}

.cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.score-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.content-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-card.accent {
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.row-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 10px;
  font-weight: 800;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.error-box {
  margin-bottom: 16px;
  border: 1px solid #fecdca;
  border-radius: 16px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 14px 16px;
  font-weight: 800;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .cards-grid,
  .score-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 28px, 1180px);
    padding: 24px 0;
  }

  .hero {
    flex-direction: column;
  }

  .cards-grid,
  .score-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 104px;
  }
}
