:root {
  --bg: #0a0e13;
  --bg-2: #0f151d;
  --card: #121a24;
  --card-2: #16202c;
  --line: #1f2b3a;
  --txt: #dbe4ef;
  --txt-dim: #8fa3ba;
  --txt-mute: #64758c;
  --accent: #4ea1ff;
  --accent-2: #7ee787;
  --warn: #f0b861;
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 12% -8%, #16324d 0%, transparent 60%),
    radial-gradient(900px 500px at 92% 4%, #1b2b1f 0%, transparent 55%),
    var(--bg);
  color: var(--txt);
  font: 16px/1.75 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 19, .82);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(126, 231, 135, .14);
}
.brand small { display: block; font-weight: 400; color: var(--txt-mute); font-size: 12px; letter-spacing: 0; }
nav.top-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.top-nav a {
  color: var(--txt-dim); text-decoration: none; font-size: 14px;
  padding: 6px 11px; border-radius: 8px; transition: .15s;
}
nav.top-nav a:hover { color: var(--txt); background: var(--card-2); }

/* ---------- hero ---------- */
.hero { padding: 66px 0 40px; }
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.2; margin: 0 0 14px;
  letter-spacing: -.5px;
}
.hero h1 span {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--txt-dim); font-size: 17px; max-width: 720px; margin: 0 0 26px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; color: var(--txt-dim);
}
.badge b { color: var(--txt); font-weight: 600; }
.badge .k { color: var(--accent-2); font-family: var(--mono); font-size: 12.5px; }

/* ---------- sections ---------- */
section { padding: 46px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
h2 {
  font-size: 24px; margin: 0 0 6px; letter-spacing: -.2px;
  display: flex; align-items: center; gap: 10px;
}
h2 .idx {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  border: 1px solid rgba(78, 161, 255, .35); background: rgba(78, 161, 255, .08);
  padding: 2px 7px; border-radius: 6px; letter-spacing: .5px;
}
.sub { color: var(--txt-mute); font-size: 14.5px; margin: 0 0 24px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card h3 .tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: .4px;
  color: var(--accent); background: rgba(78, 161, 255, .1);
  border: 1px solid rgba(78, 161, 255, .25); border-radius: 5px; padding: 1px 6px;
}
.card p { margin: 0 0 12px; color: var(--txt-dim); font-size: 14.5px; }
.card ul { margin: 0; padding-left: 18px; color: var(--txt-dim); font-size: 14px; }
.card li { margin: 3px 0; }
.card li b { color: var(--txt); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 540px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--card-2); color: var(--txt-dim); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); }
.hl { color: var(--accent-2); font-weight: 600; }
.mute { color: var(--txt-mute); }

/* ---------- code ---------- */
code, pre { font-family: var(--mono); }
code {
  background: rgba(78, 161, 255, .1); border: 1px solid rgba(78, 161, 255, .16);
  border-radius: 5px; padding: 1px 6px; font-size: 13.2px; color: #a9d4ff;
}
pre {
  background: #0a121b; border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; overflow-x: auto; font-size: 13.2px; line-height: 1.65; color: #c3d4e6;
}
pre .c { color: var(--txt-mute); }
pre .k { color: var(--warn); }
pre .s { color: var(--accent-2); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
figure.shot {
  margin: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: .18s;
}
figure.shot:hover { border-color: rgba(78, 161, 255, .45); transform: translateY(-2px); }
figure.shot img { display: block; width: 100%; height: auto; background: #060a0e; cursor: zoom-in; }
figure.shot figcaption { padding: 10px 12px 12px; font-size: 13px; color: var(--txt-mute); line-height: 1.55; }
figure.shot figcaption b { display: block; color: var(--txt); font-size: 13.5px; margin-bottom: 2px; }

/* lightbox */
#lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(4, 7, 10, .93); padding: 24px;
  align-items: center; justify-content: center; flex-direction: column; gap: 12px;
}
#lb.on { display: flex; }
#lb img { max-width: min(92vw, 900px); max-height: 82vh; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.7); }
#lb .cap { color: var(--txt-dim); font-size: 13.5px; text-align: center; }
#lb .x {
  position: absolute; top: 16px; right: 20px; font-size: 26px; color: var(--txt-dim);
  cursor: pointer; line-height: 1; user-select: none;
}

/* ---------- misc ---------- */
.note {
  border-left: 3px solid var(--warn); background: rgba(240, 184, 97, .07);
  padding: 13px 16px; border-radius: 0 10px 10px 0; font-size: 14.3px; color: #e8d6b6;
  margin: 16px 0;
}
.note b { color: var(--warn); }
.ok { border-left-color: var(--accent-2); background: rgba(126, 231, 135, .06); color: #cdead1; }
.ok b { color: var(--accent-2); }

details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin: 9px 0;
}
details summary { cursor: pointer; font-weight: 600; font-size: 14.6px; }
details summary::marker { color: var(--accent); }
details p { color: var(--txt-dim); font-size: 14.2px; margin: 10px 0 2px; }

footer {
  border-top: 1px solid var(--line); padding: 30px 0 44px;
  color: var(--txt-mute); font-size: 13.5px;
}
footer a { color: var(--txt-dim); text-decoration: none; border-bottom: 1px dashed var(--line); }
footer a:hover { color: var(--accent); }
footer .meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-family: var(--mono); font-size: 12.5px; }

@media (max-width: 640px) {
  .hero { padding: 44px 0 26px; }
  section { padding: 34px 0; }
  nav.top-nav { width: 100%; margin-left: 0; overflow-x: auto; }
}
