:root {
  --bg: #ffffff;
  --fg: #1a1d21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --soft: #f9fafb;
  --radius: 10px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--fg); }
.brand:hover { text-decoration: none; color: var(--fg); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  padding: 8px 13px; border-radius: 7px;
}
.nav a:hover { color: var(--fg); background: var(--soft); text-decoration: none; }
.nav a.active { color: var(--fg); background: var(--soft); }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--fg); }

.hero { padding: 84px 0 68px; border-bottom: 1px solid var(--line); }
.hero h1 {
  font-size: clamp(32px, 5vw, 52px); line-height: 1.12;
  letter-spacing: -.02em; font-weight: 800; max-width: 16ch;
}
.hero p.lede {
  margin-top: 20px; font-size: clamp(16px, 2vw, 19px);
  color: var(--muted); max-width: 60ch;
}
.hero .actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 8px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { background: var(--soft); text-decoration: none; color: var(--fg); }

section { padding: 68px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -.015em; font-weight: 750; }
.section-head p { margin-top: 12px; color: var(--muted); max-width: 62ch; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .09em; font-size: 12px;
  font-weight: 700; color: var(--accent); margin-bottom: 10px;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; background: #fff; transition: .18s;
}
.card:hover { border-color: #d1d5db; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.card h3 { font-size: 17px; font-weight: 650; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .icon {
  width: 38px; height: 38px; border-radius: 9px; background: var(--soft);
  display: grid; place-items: center; margin-bottom: 16px; font-size: 18px;
  border: 1px solid var(--line);
}

.stat { text-align: center; padding: 22px 12px; }
.stat .num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--fg); }
.stat .lbl { color: var(--muted); font-size: 13.5px; margin-top: 5px; }

.prose { max-width: 74ch; }
.prose h2 { font-size: 26px; margin: 40px 0 14px; letter-spacing: -.015em; }
.prose h3 { font-size: 19px; margin: 30px 0 10px; }
.prose p { margin-bottom: 16px; color: #374151; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: #374151; }
.prose li { margin-bottom: 7px; }
.prose code {
  background: var(--soft); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 5px; font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prose pre {
  background: #0f172a; color: #e2e8f0; padding: 18px 20px;
  border-radius: var(--radius); overflow-x: auto; margin-bottom: 20px;
  font-size: 13.5px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 18px;
  color: var(--muted); margin: 0 0 18px;
}

.post-item {
  display: block; padding: 22px 0; border-bottom: 1px solid var(--line);
  color: inherit;
}
.post-item:hover { text-decoration: none; }
.post-item:last-child { border-bottom: 0; }
.post-item h3 { font-size: 19px; font-weight: 650; margin-bottom: 7px; }
.post-item:hover h3 { color: var(--accent); }
.post-item .meta { color: var(--muted); font-size: 13px; margin-bottom: 9px; }
.post-item p { color: var(--muted); font-size: 15px; }

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--fg);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-row textarea { min-height: 132px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

.site-footer {
  border-top: 1px solid var(--line); background: var(--soft);
  padding: 48px 0 34px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg); margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--muted); font-size: 14px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .about { color: var(--muted); font-size: 14px; max-width: 38ch; margin-top: 12px; }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 13.5px;
}

.notice {
  background: var(--soft); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 16px 18px; margin-bottom: 24px; font-size: 14.5px; color: #374151;
}
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--soft); border: 1px solid var(--line);
  color: var(--muted); margin-right: 6px;
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-header .wrap { height: 60px; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 46px; }
  section { padding: 48px 0; }
}
