:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #15202b;
  --muted: #475569;
  --line: #d6dee6;
  --brand: #0f766e;
  --brand-soft: #d7f3ef;
  --shadow: 0 10px 24px rgba(10, 30, 48, 0.08);
}

body.dark {
  --bg: #111a24;
  --surface: #182434;
  --text: #edf2f7;
  --muted: #c4d1df;
  --line: #2a3a4d;
  --brand: #5fd4c8;
  --brand-soft: #153743;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 100% -15%, #deefe8 0%, transparent 60%),
    radial-gradient(700px 300px at 0 -10%, #f0e2d6 0%, transparent 60%),
    var(--bg);
  line-height: 1.72;
  font-size: 16px;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

.container {
  width: min(1040px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-left: auto;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.96rem;
  color: var(--text);
  opacity: 0.9;
}

.main-nav a:hover {
  opacity: 1;
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
}

.hero {
  padding: 4.4rem 0 2.4rem;
}

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

h1 {
  margin: 0.6rem 0 0;
  line-height: 1.25;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.lead {
  color: var(--muted);
  max-width: 70ch;
}

.section {
  padding: 1rem 0 2.7rem;
}

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

.card,
.feature-box,
.article-wrap,
.panel,
.tool-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.card {
  padding: 1.2rem;
}

.card h3 {
  margin-top: 0;
}

.feature-box {
  padding: 1.5rem;
}

.button,
button.button {
  display: inline-block;
  text-decoration: none;
  color: #ffffff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  padding: 0.72rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.site-footer {
  margin-top: 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.article-wrap,
.panel,
.tool-wrap {
  margin: 2rem auto;
  padding: 1.5rem;
}

.article-wrap {
  width: min(840px, calc(100% - 2rem));
}

.article-wrap h1 {
  font-size: clamp(1.4rem, 4vw, 2.15rem);
}

.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-wrap {
  width: min(760px, calc(100% - 2rem));
}

#numbers-container {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.number-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  font-weight: 800;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0.68rem 0.78rem;
  font-size: 1rem;
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 1px;
}

.inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: end;
}

.stats-wrap {
  margin-top: 1.2rem;
}

.latest-wrap {
  margin-top: 1.2rem;
}

.latest-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
}

.latest-card p {
  margin: 0.25rem 0;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.72rem;
  display: grid;
  gap: 0.2rem;
}

.chip strong {
  font-size: 0.96rem;
}

.chip span {
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  margin-top: 1.3rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.68rem 0.62rem;
  text-align: left;
  font-size: 0.96rem;
}

thead th {
  background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface));
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
}

tbody tr:hover {
  background: color-mix(in srgb, var(--brand-soft) 30%, var(--surface));
}

.pagination {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.pagination .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 880px) {
  .site-header .container {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    margin-left: 0;
    width: 100%;
    gap: 0.7rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .pagination {
    flex-wrap: wrap;
  }

  .tool-wrap,
  .article-wrap,
  .panel {
    padding: 1.1rem;
    border-radius: 14px;
  }
}
