:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #5b6673;
  --line: #e4ded3;
  --brand: #16324f;
  --accent: #c8372d;
  --accent-soft: #fbe9e6;
  --say-bg: #fff6d9;
  --say-line: #ecd48a;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121820;
    --surface: #1a222c;
    --ink: #e8ecf0;
    --muted: #a3adb8;
    --line: #2c3743;
    --brand: #9cc3ea;
    --accent: #ff7b6e;
    --accent-soft: #3a2422;
    --say-bg: #2e2914;
    --say-line: #5c5124;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Emergency strip */
.sos-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: center;
  align-items: center;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}
.sos-bar a { color: #fff; text-decoration: none; white-space: nowrap; }
.sos-bar a:hover { text-decoration: underline; color: #fff; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--brand);
  text-decoration: none;
}
.brand-mark { margin-right: 6px; }
.site-header nav { display: flex; gap: 18px; font-size: 15px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-header nav a:hover { color: var(--accent); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* Home */
.hero { padding: 32px 0 24px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lede { margin: 0; font-size: 19px; color: var(--muted); max-width: 36em; }

.category { margin-top: 36px; }
.category h2 { margin: 0 0 4px; font-size: 24px; }
.category-blurb { margin: 0 0 16px; color: var(--muted); }
.soon { opacity: 0.85; }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.card-emoji { font-size: 26px; }
.card-title { font-weight: 700; font-size: 18px; line-height: 1.3; }
.card-desc { color: var(--muted); font-size: 15px; }

/* Articles */
.article { max-width: 720px; }
.crumbs { margin: 16px 0 4px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article h1 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 5.5vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.checked { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.article h2 { margin: 36px 0 8px; font-size: 24px; line-height: 1.25; }
.article h3 { margin: 24px 0 6px; font-size: 19px; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: 4px 0; }

.now {
  margin: 8px 0 8px;
  padding: 18px 20px;
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.now h2 { margin: 0 0 6px; font-size: 20px; }
.now ol { margin: 0; }

.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 16px; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 700; }
td a { white-space: nowrap; }

.say {
  margin: 14px 0;
  padding: 16px 18px;
  background: var(--say-bg);
  border: 1px solid var(--say-line);
  border-radius: var(--radius);
}
.say-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.say-ko { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.4; }
.say-en { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.note {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
}

.still-stuck {
  margin-top: 40px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.still-stuck h2 { margin: 0 0 6px; font-size: 20px; }
.still-stuck p { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 16px 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 4px auto; max-width: 40em; }
.footer-brand { font-weight: 800; color: var(--brand); font-size: 16px; }
.footer-note { margin-top: 12px !important; }
.site-footer nav { display: flex; gap: 16px; justify-content: center; margin: 12px 0; }
.site-footer nav a { color: var(--muted); }
.copy { font-size: 13px; }
