:root {
  --bg: #070b14;
  --bg-glow: radial-gradient(1200px 500px at 10% -10%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(900px 420px at 90% 0%, rgba(167, 139, 250, 0.1), transparent 50%),
    #070b14;
  --surface: #0f1624;
  --surface2: #141d2e;
  --border: #243044;
  --border2: #334155;
  --text: #e6edf7;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-2: #a78bfa;
  --warn-bg: rgba(251, 191, 36, 0.1);
  --warn-border: rgba(251, 191, 36, 0.45);
  --warn-text: #fcd34d;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 10px;
  --shadow: 0 0 0 1px rgba(34, 211, 238, 0.06), 0 8px 28px rgba(0, 0, 0, 0.35);
  --max: 1080px;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100%;
  color: var(--text); background: var(--bg-glow);
  line-height: 1.65; font-size: 15px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

/* Top nav */
.site-header {
  background: rgba(11, 16, 28, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
}
.site-header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: .65rem 1rem;
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.brand-link {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text); text-decoration: none; font-weight: 700;
}
.brand-link:hover { text-decoration: none; color: var(--accent); }
.logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #061018;
  display: grid; place-items: center; font-size: .9rem; font-weight: 800;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}
.nav-tools {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem;
}
.nav-dd { position: relative; }
.nav-dd-btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .7rem; border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface2); color: var(--text);
  font: inherit; font-size: .86rem; font-weight: 600;
  white-space: nowrap;
}
.nav-dd-btn:hover, .nav-dd.open .nav-dd-btn {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.25);
}
.nav-dd-btn .caret { opacity: .75; font-size: .75rem; }
.nav-current {
  font-size: .78rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 10rem;
}
.nav-current strong { color: var(--accent); font-weight: 650; }
.nav-dd-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: min(92vw, 280px);
  max-height: min(70vh, 420px); overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: .35rem;
  z-index: 50;
}
.nav-dd.open .nav-dd-menu { display: grid !important; grid-template-columns: 1fr 1fr; gap: .15rem; }
.nav-dd-menu a {
  display: block; padding: .45rem .55rem; border-radius: 7px;
  color: var(--muted); font-size: .82rem; text-decoration: none;
}
.nav-dd-menu a:hover {
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
}
.nav-dd-menu a.active {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
}
@media (max-width: 520px) {
  .nav-current { display: none; }
  .nav-dd-menu { left: 0; right: auto; width: min(92vw, 300px); }
  .nav-dd.open .nav-dd-menu { grid-template-columns: 1fr 1fr; }
}
.header-actions { display: flex; gap: .4rem; margin-left: auto; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem 2.5rem; }
.breadcrumb {
  font-size: .85rem; color: var(--muted); margin: 0 0 .75rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 .35rem; color: #64748b; }

.page-hero { margin-bottom: 1rem; }
.page-hero h1 {
  margin: 0 0 .4rem; font-size: 1.55rem; line-height: 1.35;
  color: #f8fafc; font-weight: 700;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.18);
}
.page-hero .lead {
  margin: 0; color: var(--muted); font-size: .95rem; max-width: 52rem;
}

.panel {
  background: linear-gradient(180deg, rgba(20, 29, 46, 0.95), rgba(15, 22, 36, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.disclaimer {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.disclaimer p { margin: 0; color: var(--warn-text); font-size: .9rem; }

.grid-2 {
  display: grid; grid-template-columns: 1fr 140px; gap: .85rem;
}
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
label > .lbl {
  display: block; font-size: .8rem; color: var(--muted); margin-bottom: .3rem;
}
select, input[type="number"], input[type="text"] {
  width: 100%; padding: .55rem .7rem; border-radius: 6px;
  border: 1px solid var(--border2); background: #0a101c; color: var(--text);
  font: inherit;
}
select:focus, input:focus {
  outline: 2px solid rgba(34, 211, 238, .28); border-color: var(--accent);
}
select option { background: #0f1624; color: var(--text); }
.checks { display: flex; flex-wrap: wrap; gap: .65rem 1.1rem; margin: .85rem 0; }
.check {
  display: flex; align-items: center; gap: .4rem;
  font-size: .9rem; color: var(--muted); cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.btn {
  appearance: none; border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); border-radius: 6px; padding: .5rem .9rem;
  font: inherit; cursor: pointer; transition: .12s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  border-color: transparent;
  color: #041018; font-weight: 700;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
}
.btn.primary:hover { filter: brightness(1.08); color: #041018; }
.btn.ghost { background: transparent; }
.btn.sm { padding: .25rem .5rem; font-size: .78rem; }

.section-title {
  margin: 0 0 .75rem; font-size: 1.05rem; font-weight: 650; color: #f1f5f9;
}
.empty { color: var(--muted); margin: .25rem 0; }

.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem; background: var(--surface2); margin-bottom: .7rem;
}
.card-head {
  display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; flex-wrap: wrap;
}
.pill {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 999px;
  padding: .1rem .55rem; font-size: .75rem; font-weight: 700;
}
.muted { color: var(--muted); font-size: .85rem; }
.fields { display: grid; gap: .4rem; }
.field-meta { display: flex; align-items: center; gap: .45rem; }
.label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.field-row { display: flex; gap: .45rem; align-items: center; }
.value {
  flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem; background: #0a101c; border: 1px solid var(--border);
  border-radius: 6px; padding: .4rem .55rem; overflow-wrap: anywhere; color: #dbeafe;
}
.badge {
  font-size: .68rem; color: var(--danger); background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35); border-radius: 999px; padding: .05rem .4rem;
}

/* Saved */
.saved-list { display: grid; gap: .5rem; }
.saved-item {
  display: flex; gap: .5rem; align-items: flex-start;
  padding: .55rem .65rem; border: 1px solid var(--border); border-radius: 6px;
  background: #0a101c; font-size: .88rem;
}
.saved-item code { flex: 1; white-space: pre-wrap; font-size: .82rem; color: #cbd5e1; }

/* FAQ */
.faq h2 { margin: 0 0 .75rem; font-size: 1.2rem; color: #f1f5f9; }
.faq details {
  border: 1px solid var(--border); border-radius: 6px;
  padding: .7rem .9rem; margin-bottom: .55rem; background: var(--surface2);
}
.faq summary {
  cursor: pointer; font-weight: 650; color: #f8fafc; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "▸ "; color: var(--accent); font-weight: 700;
}
.faq details[open] summary::before { content: "▾ "; }
.faq details p, .faq details ul {
  margin: .55rem 0 0; color: #cbd5e1; font-size: .92rem;
}
.faq details li { margin: .25rem 0; }

/* Footer */
.site-footer {
  background: #050814; color: #94a3b8;
  padding: 2rem 1rem 2.5rem; margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: #67e8f9; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .35rem .75rem; margin: 1rem 0 1.25rem;
  font-size: .85rem;
}
.footer-meta { font-size: .82rem; border-top: 1px solid #1e293b; padding-top: 1rem; }
.footer-meta p { margin: .35rem 0; }
.footer-title { color: #e2e8f0; font-weight: 650; margin: 0 0 .5rem; font-size: .95rem; }

/* Compact hub — aligned with 5201616 properties */
.site-hub {
  font: 12px/1.55 system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  text-align: center;
  padding: 10px 12px 14px;
  margin: 1.1rem auto 0;
  max-width: 720px;
  opacity: .92;
  pointer-events: auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(34, 211, 238, 0.12);
}
.site-hub__title {
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0 0 6px;
  font-size: 12px;
  opacity: .85;
}
.site-hub__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-hub__list a,
.site-hub__list .is-current {
  color: inherit;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.site-hub__list a:hover { text-decoration: underline; }
.site-hub__list .is-current {
  font-weight: 700;
  opacity: 1;
  cursor: default;
  border-color: currentColor;
}
.site-hub.theme-dark { color: #9ec9e8; }
.site-hub.theme-dark a { color: #4ecdc4; }

.toast {
  position: fixed; left: 50%; bottom: 1.4rem;
  transform: translateX(-50%) translateY(16px);
  background: #0a1220; border: 1px solid var(--ok); color: #6ee7b7;
  padding: .5rem .95rem; border-radius: 999px; opacity: 0;
  pointer-events: none; transition: .18s ease; z-index: 50; font-size: .88rem;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.stub-body { max-width: 40rem; color: #cbd5e1; }
.stub-body h2 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; color: #f1f5f9; }
.mac-formats { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.mac-formats label { font-size: .85rem; color: var(--muted); }

.sample-note {
  font-size: .8rem; color: var(--muted); margin: .4rem 0 0;
}
