:root {
  --bg: #fbfbfc;
  --band: #f2f4f7;
  --surface: #ffffff;
  --border: #e1e5ea;
  --text: #121519;
  --muted: #59626e;
  --accent: #2f5bd3;
  --accent-hover: #2449b0;
  --accent-soft: #e8eefc;
  --write: #b54708;
  --write-soft: #fdf0e3;
  --danger: #c4320a;
  --danger-soft: #fdebe6;
  --add: #116329;
  --add-bg: #e7f6ea;
  --del: #a40e26;
  --del-bg: #fcebec;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 8px 24px rgb(16 24 40 / 6%);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1014;
    --band: #13171d;
    --surface: #181d24;
    --border: #2a313b;
    --text: #e8ebef;
    --muted: #9aa3b0;
    --accent: #7c9cf5;
    --accent-hover: #9bb3f8;
    --accent-soft: #1e2944;
    --write: #f5a35b;
    --write-soft: #3a2614;
    --danger: #ff8a6a;
    --danger-soft: #3d1c14;
    --add: #7ee2a0;
    --add-bg: #12301c;
    --del: #ff9aa6;
    --del-bg: #3a1419;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
code, pre { font-family: var(--mono); font-size: 0.86em; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.6rem); font-weight: 720; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 680; margin-bottom: 16px; }
h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 8px; }
p { margin: 0 0 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.section { padding: 88px 24px; }
.band { background: var(--band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* --- nav ------------------------------------------------------------------ */

.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 680; text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--text); }

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block; padding: 11px 18px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0d1014; } }
.btn-small { padding: 7px 14px; font-size: 14px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- hero --------------------------------------------------------------------- */

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 96px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; margin-bottom: 14px; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 20px 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; }

.trail-demo {
  margin: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 18px; font-size: 14px;
}
.trail-demo figcaption { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.trail-demo figcaption b { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22a35a; flex: none; }
.step { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.step.prompt { background: var(--accent-soft); border-color: transparent; }
.step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-head code { color: var(--accent); overflow-wrap: anywhere; }
.why { color: var(--muted); margin: 6px 0 0; }
.why b { color: var(--text); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface); color: var(--muted); margin-right: 6px; }
.tag.write { background: var(--write-soft); color: var(--write); margin-right: 0; }
.tag.failed { background: var(--danger-soft); color: var(--danger); margin-right: 0; }
.diff { margin: 8px 0 0; padding: 6px 0; border-radius: 7px; border: 1px solid var(--border); overflow-x: auto; }
.diff span { display: block; padding: 0 10px; }
.diff .add { background: var(--add-bg); color: var(--add); }
.diff .del { background: var(--del-bg); color: var(--del); }

/* --- sections ------------------------------------------------------------------ */

.problem { padding: 72px 24px; max-width: 820px; text-align: center; }
.problem p { color: var(--muted); font-size: 1.1rem; }

.cards { display: grid; gap: 18px; margin-top: 36px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.card p { color: var(--muted); margin: 0; }
.soon { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 99px; vertical-align: middle; margin-left: 6px; }

.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split p { color: var(--muted); font-size: 1.05rem; }

.targets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.targets li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.targets code { overflow-wrap: anywhere; }
.sys { flex: none; width: 64px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { position: relative; padding-left: 32px; color: var(--muted); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 6px var(--accent-soft), inset 0 0 0 10px var(--accent);
}
.checks b { color: var(--text); font-weight: 600; }

.install { max-width: 760px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 36px 0 20px; display: flex; flex-direction: column; gap: 22px; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
}
@media (prefers-color-scheme: dark) { .steps li::before { color: #0d1014; } }
.steps pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0; line-height: 1.7; }

.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); }

.notfound { padding-top: 18vh; text-align: center; }

/* --- responsive --------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding-top: 40px; padding-bottom: 64px; }
  .cards.three { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 24px; }
}

@media (max-width: 620px) {
  .wrap, .section, .problem { padding-left: 16px; padding-right: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .cards.two { grid-template-columns: minmax(0, 1fr); }
  .cta .btn { flex: 1 1 auto; text-align: center; }
  .sys { width: 56px; }
}
