:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #0f766e;
  --accent-hover: #0d5e58;
  --accent-soft: #ecfdf5;
  --ct: #047857;
  --ct-soft: #ecfdf5;
  --ov: #b45309;
  --ov-soft: #fffbeb;
  --ro: #1d4ed8;
  --ro-soft: #eff6ff;
  --warn-bg: #fef2f2;
  --warn-border: #fecaca;
  --warn-ink: #b91c1c;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-alt);
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
}

.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-pill:hover { background: var(--surface-alt); text-decoration: none; }

.progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #a7f3d0;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 18px;
  color: var(--ink-muted);
  max-width: 78ch;
  font-size: 0.98rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.mini-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.mini-card h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.mini-card p, .mini-card ul {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.mini-card ul { padding-left: 18px; margin-top: 4px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--surface-alt); text-decoration: none; }
.btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn.primary:hover { background: #1e293b; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 0.78rem; }

.app-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 26px;
  scroll-margin-top: 74px;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.app-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.app-badge.ct { background: var(--ct-soft); color: var(--ct); border: 1px solid #a7f3d0; }
.app-badge.ov { background: var(--ov-soft); color: var(--ov); border: 1px solid #fde68a; }
.app-badge.ro { background: var(--ro-soft); color: var(--ro); border: 1px solid #bfdbfe; }

.app-header h2 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}

.app-sub {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
}
.box.alt { background: var(--surface-alt); }
.box h3 { margin: 0 0 8px; font-size: 0.98rem; }
.box p { margin: 0 0 8px; font-size: 0.9rem; color: var(--ink-muted); }
.box p:last-child { margin-bottom: 0; }
.box ul, .box ol { margin: 6px 0 0; padding-left: 18px; font-size: 0.88rem; color: var(--ink-muted); }
.box li { margin-bottom: 5px; }

.subsection-title {
  margin: 22px 0 10px;
  font-size: 1.04rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

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

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.check-item:hover { background: #fafafa; }
.check-item.done { background: #f8fafc; opacity: 0.78; }
.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.check-title { font-weight: 700; font-size: 0.88rem; display: block; }
.check-desc { font-size: 0.83rem; color: var(--ink-muted); display: block; margin-top: 2px; }

.callout-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.86rem;
  margin: 12px 0;
}

.note-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.86rem;
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  z-index: 60;
}
.toast[hidden] { display: none; }

footer.guide-footer {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  padding: 16px 20px 36px;
}
