:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2030;
  --muted: #5d6475;
  --primary: #2b59c3;
  --border: #e3e6ee;
  --radius: 14px;
  --tabbar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141b;
    --surface: #1c1f29;
    --text: #e9ecf3;
    --muted: #9aa2b4;
    --primary: #6f93ff;
    --border: #2b2f3c;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.15rem; }
.topnav { display: none; gap: 24px; }
.topnav a { color: var(--muted); font-weight: 500; }
.topnav a.active, .topnav a:hover { color: var(--primary); }

/* Content */
.hero { padding: 40px 0 24px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 6vw, 2.8rem); }
.hero p { margin: 0; color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.15rem); }

.grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding-bottom: 32px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.eyebrow { margin: 0 0 6px !important; color: var(--primary) !important; font-weight: 700; font-size: 0.85rem !important; }
.hero h1 { line-height: 1.3; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.cta {
  display: flex; align-items: center; justify-content: center; height: 54px; padding: 0 22px;
  border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.cta.ghost { background: var(--surface); color: var(--primary); border: 1px solid var(--primary); font-size: 0.98rem; }
.section-title { font-size: 1.15rem; margin: 8px 0 12px; scroll-margin-top: 72px; }
.card.link { display: block; transition: border-color 0.15s, transform 0.15s; }
.card.link:hover { border-color: var(--primary); transform: translateY(-1px); }
.steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li {
  counter-increment: s; position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px 14px 52px; color: var(--muted); font-size: 0.95rem;
}
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 0.85rem;
}
.steps li b:first-child { display: block; color: var(--text); }
.disclaimer { font-size: 0.82rem; color: var(--muted); margin: 0 0 32px; }
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; }
  .br-m { display: none; }
}

/* Bottom tab bar (mobile) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--muted); gap: 2px;
}
.tabbar a span { font-size: 1.25rem; line-height: 1; }
.tabbar a.active { color: var(--primary); font-weight: 600; }

/* Tablet */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
/* Desktop: top nav instead of bottom tabs */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .hero { padding: 64px 0 32px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { padding: 24px; }
}
