@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&display=swap');

:root {
  --bg: #0d1117;
  --panel: #151b23;
  --panel-soft: rgba(255, 255, 255, 0.02);
  --text: #f3f7fb;
  --muted: #b1bcc8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #00f5c4;
  --accent-soft: rgba(0, 245, 196, 0.08);
}

body.light,
html.light body {
  --bg: #f6f2eb;
  --panel: #ffffff;
  --panel-soft: rgba(15, 23, 42, 0.03);
  --text: #18212b;
  --muted: #5f6a75;
  --line: rgba(15, 23, 42, 0.12);
  --accent: #0088ff;
  --accent-soft: rgba(0, 136, 255, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(0, 245, 196, 0.10), transparent 35%),
    radial-gradient(circle at bottom right, rgba(0, 136, 255, 0.10), transparent 30%),
    var(--bg);
  padding: calc(32px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.lang-ko [data-lang="ko"],
html.lang-ko body [data-lang="ko"] {
  display: block;
}

body.lang-en [data-lang="en"],
html.lang-en body [data-lang="en"] {
  display: block;
}

[data-lang] {
  display: none;
}

body.lang-ko .lang-inline[data-lang="ko"],
html.lang-ko body .lang-inline[data-lang="ko"],
body.lang-en .lang-inline[data-lang="en"],
html.lang-en body .lang-inline[data-lang="en"] {
  display: inline;
}

body.lang-ko .lang-inline[data-lang="en"],
html.lang-ko body .lang-inline[data-lang="en"],
body.lang-en .lang-inline[data-lang="ko"],
html.lang-en body .lang-inline[data-lang="ko"] {
  display: none;
}

.shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.topbar {
  display: grid;
  gap: 14px;
  margin: 0 auto 18px;
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.title-block {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.title-block h1,
.hero-copy h1 {
  margin: 0 0 12px;
  line-height: 1.25;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-card {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.topbar-card:hover {
  border-color: rgba(0, 245, 196, 0.32);
}

.topbar-card:active {
  transform: scale(0.98);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-nav a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.article-shell {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.85fr);
  gap: 18px;
}

.hero-copy p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-meta,
.article-body {
  display: grid;
  gap: 18px;
}

.meta-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.meta-card h2,
.meta-card h3,
.article-body h2,
.article-body h3 {
  margin: 0;
  line-height: 1.3;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 800;
}

.meta-list,
.reference-list,
.article-list,
.article-body ul,
.article-body ol {
  margin: 12px 0 0;
  padding-left: 18px;
}

.meta-card p,
.meta-card li,
.article-body p,
.article-body li {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.article-body > section {
  display: grid;
  gap: 12px;
}

.article-body > section + section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 196, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.link-card {
  display: grid;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  background: var(--panel-soft);
}

.link-card:hover {
  border-color: rgba(0, 245, 196, 0.22);
  text-decoration: none;
}

.link-card strong {
  font-size: 20px;
  line-height: 1.25;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.article-callout {
  padding: 16px 18px;
  border: 1px solid rgba(0, 245, 196, 0.18);
  border-left: 3px solid var(--accent);
  border-radius: 16px;
  background: var(--accent-soft);
}

.article-callout p {
  margin: 0;
}

.metric-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.metric-table th,
.metric-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.metric-table tr:last-child td {
  border-bottom: 0;
}

.metric-table th {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.metric-table td {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-note a {
  color: inherit;
}

@media (max-width: 760px) {
  body {
    padding: calc(24px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(44px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  }

  .topbar-row {
    flex-direction: column;
  }

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

  .topbar-actions {
    width: 100%;
  }

  .topbar-card {
    flex: 1 1 150px;
  }

  .panel {
    padding: 20px 18px;
  }
}
