:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #5b6475;
  --line: #dde2ea;
  --accent: #1d5fd6;
  --accent-ink: #ffffff;
  --accent-soft: #e7effd;
  --good: #137a3f;
  --good-soft: #e6f4ec;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --sale: #b45309;
  --sale-soft: #fdf1e3;
  --head: #0f1a2e;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --panel: #151b24;
    --ink: #e6e9ef;
    --muted: #9aa4b5;
    --line: #283140;
    --accent: #4a8af0;
    --accent-soft: #17253d;
    --good: #4cc27a;
    --good-soft: #13281c;
    --bad: #f07a6e;
    --bad-soft: #2d1614;
    --sale: #f0a64a;
    --sale-soft: #2c1f10;
    --head: #0a0f17;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { background: var(--head); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { font-weight: 800; letter-spacing: .08em; font-size: 18px; color: #fff; text-decoration: none; }
.brand span { color: #8fb6ff; font-weight: 600; letter-spacing: .02em; margin-left: 8px; font-size: 14px; }
.ip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #c8d3e6; }
.ip code { background: rgba(255,255,255,.08); padding: 4px 8px; border-radius: var(--radius); color: #fff; }
.ip button { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; padding: 4px 10px; border-radius: var(--radius); cursor: pointer; font-size: 13px; }
.ip button:hover { border-color: #fff; }

/* intro */
.intro { padding: 36px 0 8px; }
.intro h1 { margin: 0 0 6px; font-size: 30px; }
.intro p { margin: 0; color: var(--muted); max-width: 640px; }

/* steps */
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.step h2 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.num { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.step.off { opacity: .45; pointer-events: none; }

.namebox { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.namebox input {
  flex: 1 1 240px; max-width: 360px; font: inherit; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.namebox input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.who { display: none; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; background: var(--good-soft); border-radius: var(--radius); color: var(--good); font-weight: 600; }
.who img { width: 32px; height: 32px; image-rendering: pixelated; border-radius: 4px; }
.who.show { display: flex; }
.err { color: var(--bad); margin-top: 10px; min-height: 1em; font-size: 14px; }

/* packages */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 920px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.pkg {
  position: relative; text-align: left; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; min-height: 140px;
}
.pkg:hover { border-color: var(--accent); }
.pkg.sel { border: 2px solid var(--accent); padding: 15px 13px 13px; background: var(--accent-soft); }
.pkg .cr { font-size: 26px; font-weight: 800; line-height: 1.1; }
.pkg .cr small { font-size: 13px; font-weight: 600; color: var(--muted); display: block; }
.pkg .price { margin-top: auto; font-size: 18px; font-weight: 700; }
.pkg .rate { font-size: 12px; color: var(--muted); }
.tag {
  position: absolute; top: -9px; right: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 4px; background: var(--accent); color: #fff;
}
.tag.sale { background: var(--sale); }

/* checkout */
.summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.summary b { font-size: 18px; }
#paypal { max-width: 420px; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

.done { display: none; background: var(--good-soft); border: 1px solid var(--good); color: var(--ink); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.done.show { display: block; }
.done h2 { margin: 0 0 6px; color: var(--good); }

.what { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 28px; }
@media (max-width: 720px) { .what { grid-template-columns: repeat(2, 1fr); } }
.what div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 14px; color: var(--muted); }
.what b { display: block; color: var(--ink); margin-bottom: 2px; font-size: 15px; }

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

/* legal pages */
.doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.doc h1 { margin-top: 0; font-size: 26px; }
.doc h2 { font-size: 17px; margin-top: 24px; }
.doc p, .doc li { color: var(--ink); }

@media (max-width: 560px) {
  .brand span { display: none; }
  .ip button { display: none; }
  .ip code { cursor: pointer; font-size: 13px; }
}
