:root {
  --bg: #f7f8f6; --surface: #ffffff; --surface-2: #eef2ef; --ink: #17201c; --ink-2: #47524c; --muted: #6b766f;
  --line: #d9e0db; --brand: #0f6b5c; --brand-ink: #ffffff; --brand-soft: #dcefe9; --accent: #b4561f;
  --good: #1d7a3e; --good-soft: #e1f3e6; --warn: #8a5a00; --warn-soft: #fbf0d9; --bad: #a3271f; --bad-soft: #fbe4e1;
  --radius: 14px; --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 6px 24px rgba(20, 30, 25, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1412; --surface: #161d1a; --surface-2: #1d2622; --ink: #e8eee9; --ink-2: #b9c4bd; --muted: #8d9a92;
    --line: #2b3631; --brand: #4fc3a8; --brand-ink: #062019; --brand-soft: #173a32; --accent: #f0a46b;
    --good: #6fd38f; --good-soft: #17301f; --warn: #f0c56b; --warn-soft: #33290f; --bad: #ff8f84; --bad-soft: #3a1b18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1412; --surface: #161d1a; --surface-2: #1d2622; --ink: #e8eee9; --ink-2: #b9c4bd; --muted: #8d9a92;
  --line: #2b3631; --brand: #4fc3a8; --brand-ink: #062019; --brand-soft: #173a32; --accent: #f0a46b;
  --good: #6fd38f; --good-soft: #17301f; --warn: #f0c56b; --warn-soft: #33290f; --bad: #ff8f84; --bad-soft: #3a1b18;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--brand); }
code, pre { font-family: var(--mono); font-size: .88em; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { font-weight: 750; font-size: 1.15rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; }
.brand .mark { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-size: .9rem; }
nav.main { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
nav.main a:hover, nav.main a.on { background: var(--surface-2); color: var(--ink); }
main { padding: 28px 0 64px; min-height: 70vh; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: .2em 0 .35em; }
h2 { font-size: 1.55rem; margin: 2.2em 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .4em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 760px; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.hero { padding: 28px 0 8px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 99px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.good { background: var(--good); color: #fff; border-color: var(--good); }
.btn.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.sm { padding: 6px 11px; font-size: .9rem; }
.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, 1fr); } .g2 { grid-template-columns: repeat(2, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .g3, .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .g3, .g2, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.step-n { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 750; display: grid; place-items: center; margin-bottom: 10px; }
.stat { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { color: var(--ink-2); font-size: .92rem; margin-top: 6px; }
.notice { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); margin: 14px 0; }
.notice.good { background: var(--good-soft); border-color: transparent; }
.notice.warn { background: var(--warn-soft); border-color: transparent; }
.notice.bad { background: var(--bad-soft); border-color: transparent; }
ul.clean { padding-left: 1.1em; margin: .4em 0; } ul.clean li { margin: .3em 0; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 18px; }
.stepper a { text-decoration: none; font-size: .9rem; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.stepper a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stepper a.done { border-color: var(--brand); color: var(--brand); }
.screen { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .screen { grid-template-columns: 1fr; } }
.record h3 { font-size: 1.15rem; }
.record .abstract { white-space: pre-wrap; color: var(--ink-2); max-height: 52vh; overflow: auto; }
.decide { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.kbd { font-family: var(--mono); font-size: .78rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; margin-left: 4px; opacity: .8; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .2s; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .95rem; }
.kv b { font-variant-numeric: tabular-nums; }
table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t td, table.t th { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: left; }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 650; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.muted { background: var(--surface-2); color: var(--muted); }
.list-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
footer.foot { border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: .9rem; }
footer.foot .wrap { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.hidden { display: none !important; }
.spark { width: 100%; height: 70px; display: block; }
.spark .ln { fill: none; stroke: var(--brand); stroke-width: 2; }
.spark .th { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; }
.spark .ax { stroke: var(--line); stroke-width: 1; }
@media (max-width: 640px) {
  header.top .wrap { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; gap: 4px; }
  nav.main { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  nav.main a { white-space: nowrap; padding: 5px 8px; }
  h1 { font-size: 1.9rem; }
}
