:root {
  --bg: #f8f9fc; --ink: #0d0d12; --text: #1b1b24; --muted: #5d6275; --dim: #9297a8;
  --line: #e9ebf2; --soft: #f1f2f8; --accent: #7c5cf0; --accent-soft: #efeaff; --accent-ink: #5b3fd6;
  --shadow: 0 1px 2px rgba(20,20,40,.04), 0 10px 30px -12px rgba(40,40,90,.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; left: 50%; top: -260px; width: 1200px; height: 600px; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(380px 240px at 40% 60%, rgba(162,190,255,.35), transparent 70%), radial-gradient(380px 240px at 60% 60%, rgba(196,176,255,.3), transparent 70%);
}
a { color: var(--accent-ink); }
.nav { position: sticky; top: 14px; z-index: 10; padding: 0 16px; }
.nav-in {
  max-width: 860px; margin: 0 auto; height: 60px; padding: 0 10px 0 18px; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.75); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.9); border-radius: 999px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.back { margin-left: auto; display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 99px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 500; }
main { max-width: 860px; margin: 0 auto; padding: 60px 16px 40px; }
.doc { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 48px 52px; }
h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.1; letter-spacing: -.03em; font-weight: 500; color: var(--ink); margin: 0 0 10px; }
.updated { color: var(--dim); font-size: 15px; margin: 0 0 30px; }
.summary { background: var(--accent-soft); border-radius: 18px; padding: 18px 22px; margin: 0 0 34px; color: #3d2f86; }
.summary b { color: var(--accent-ink); }
.summary ul { margin: 8px 0 0; padding-left: 20px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); margin: 38px 0 10px; }
h2 .n { color: var(--accent); margin-right: 6px; }
p, li { color: var(--muted); }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 22px; }
li { margin-bottom: 6px; }
li b, p b { color: var(--text); font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 600; background: var(--soft); }
th:first-child { border-radius: 10px 0 0 10px; } th:last-child { border-radius: 0 10px 10px 0; }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 500; }
.todo { background: #fff4d6; color: #8a5a00; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
footer { max-width: 860px; margin: 0 auto; padding: 10px 16px 50px; text-align: center; color: var(--dim); font-size: 14px; }
footer a { color: var(--muted); margin: 0 8px; }
@media (max-width: 600px) {
  .doc { padding: 30px 20px; border-radius: 22px; }
  main { padding-top: 36px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  td { border: 0; padding: 4px 0; }
}

/* theme toggle */
.theme-btn { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--soft); color: var(--ink); }
.theme-btn + .back { margin-left: 0; }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* dark theme */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b10; --ink: #f4f4f8; --text: #e4e5ee; --muted: #a3a6b8; --dim: #6f7287;
  --line: #2a2a38; --soft: #1e1e29; --accent: #9b85ff; --accent-soft: rgba(124,92,240,.2); --accent-ink: #bcaaff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
}
[data-theme="dark"] body::before { opacity: .3; }
[data-theme="dark"] .nav-in { background: rgba(21,21,29,.72); border-color: rgba(255,255,255,.07); }
[data-theme="dark"] .back { background: #f4f4f8; color: #0d0d12; }
[data-theme="dark"] .doc { background: #15151d; border: 1px solid rgba(255,255,255,.05); }
[data-theme="dark"] .summary { color: #d9d0ff; }
[data-theme="dark"] .todo { background: rgba(251,191,36,.15); color: #fcd34d; }
