:root {
  color-scheme: dark light;
  --bg: #0d1119;
  --surface: #151b27;
  --line: #263044;
  --text: #eef1f6;
  --muted: #a9b3c4;
  --accent: #9fcdb8;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcfcfa;
    --surface: #ffffff;
    --line: #e1e5ea;
    --text: #14191f;
    --muted: #4b5666;
    --accent: #316e5d;
  }
}

* { box-sizing: border-box; }

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

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 32px, 760px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--bg); padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; }

header.site {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding: 20px 0 12px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  color: var(--text); font-weight: 800; font-size: 19px; text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; }

nav.site { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 4px; }
nav.site a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--muted); text-decoration: none; border-radius: 10px; font-size: 15px;
}
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--text); }
nav.site a[aria-current="page"] { background: var(--surface); }
nav.site .lang { border: 1px solid var(--line); }

main { padding: 24px 0 48px; }

h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.25; margin: 8px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 21px; line-height: 1.35; margin: 36px 0 8px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 6px; }
.lead { font-size: 19px; color: var(--muted); max-width: 40em; }
.meta { color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 12px; margin: 24px 0; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 20px;
}
.card h2 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.note {
  border-left: 3px solid var(--line); padding: 4px 0 4px 14px; color: var(--muted);
  font-size: 15px; margin: 24px 0;
}

.cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--accent); border-radius: 14px; color: var(--accent);
  font-weight: 700; text-decoration: none; margin: 4px 8px 4px 0;
}
.cta:hover { background: var(--accent); color: var(--bg); }

details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 10px;
}
summary {
  cursor: pointer; padding: 14px 18px; min-height: 48px; font-weight: 700;
  list-style-position: inside;
}
details > :not(summary) { padding: 0 18px; }
details > p:last-child, details > ul:last-child { padding-bottom: 4px; margin-bottom: 14px; }

article h2 { border-top: 1px solid var(--line); padding-top: 24px; }
article h2:first-of-type { border-top: 0; padding-top: 0; }

footer.site {
  border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted);
  font-size: 14px; line-height: 1.8;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
