:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1d2321;
  --muted: #5d6763;
  --line: #e2e0d9;
  --accent: #2f7d5b;
  --accent-soft: #e3f0e9;
  --warn: #c98a1b;
  --code-bg: #f0eee8;
  --max: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1a201e;
    --text: #e7ebe9;
    --muted: #9aa5a0;
    --line: #2a3330;
    --accent: #5fbf8f;
    --accent-soft: #1f2f28;
    --warn: #e0a947;
    --code-bg: #202725;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  border-radius: 6px;
}
code { padding: 0.1em 0.35em; }
pre { padding: 16px 18px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--text); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
h1 { font-size: 44px; line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.02em; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 15px; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }

/* dashboard mock */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.panel-head strong { color: var(--text); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 650; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; }
.chart .area { fill: var(--accent-soft); }
.chart .lbl { fill: var(--muted); font-size: 10px; }

/* sections */
section { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-size: 30px; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); max-width: 680px; margin: 0 0 32px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.icon svg { width: 20px; height: 20px; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.step { position: relative; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14.5px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* notes */
.post { padding: 32px 0; border-top: 1px solid var(--line); }
.post:first-of-type { border-top: none; }
.post time { color: var(--muted); font-size: 14px; }
.post h2 { font-size: 24px; margin: 4px 0 12px; }
.post p, .post li { color: var(--text); }
.post ul { padding-left: 22px; }
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: 38px; }

.notfound { padding: 120px 0; text-align: center; }
.notfound .code { font-size: 80px; font-weight: 700; color: var(--accent); line-height: 1; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 32px; }
  h1 { font-size: 34px; }
  .grid3, .two { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .nav { gap: 14px; font-size: 14px; }
  .flow { grid-template-columns: 1fr; }
  .stats .v { font-size: 18px; }
}
