:root {
  --brand: #00b3a4;
  --brand-dark: #007d73;
  --brand-soft: #e6f7f6;
  --accent: #f26b4a;
  --ink: #16232b;
  --ink-2: #46565f;
  --ink-3: #7b8b93;
  --line: #e3eaec;
  --bg: #f7fafb;
  --card: #ffffff;
  --warn: #c2410c;
  --warn-soft: #fff3ed;
  --ok: #0f766e;
  --ok-soft: #e6f7f6;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 44, .06), 0 8px 24px rgba(16, 40, 44, .06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.65 "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 12px; }
h1 { font-size: 34px; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 19px; }
h3 { font-size: 15px; margin-top: 22px; }
p { margin: 0 0 10px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(120deg, #0b2b2b, #0d3f3a 60%, #10554c);
  color: #fff;
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 30px; height: 30px; }
.brand-text { display: flex; align-items: center; gap: 10px; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.badge {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #d8fbf6;
}
.nav { display: flex; gap: 18px; font-size: 13px; }
.nav a { color: #cfeae6; }
.nav a:hover { color: #fff; }

main { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; }
.landing main { max-width: 1060px; }

/* ---------- 首页 ---------- */
.hero { display: grid; grid-template-columns: 1.35fr .9fr; gap: 34px; align-items: start; padding: 26px 0 18px; }
.eyebrow { color: var(--brand-dark); font-weight: 700; letter-spacing: .06em; font-size: 12px; text-transform: uppercase; margin-bottom: 8px; }
.lede { color: var(--ink-2); font-size: 15px; max-width: 34em; }
.cta { display: flex; gap: 12px; margin: 22px 0 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { border-color: var(--line); color: var(--ink-2); background: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hero-card dl { margin: 6px 0 14px; }
.hero-card dl > div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.hero-card dl > div:last-child { border-bottom: 0; }
.hero-card dt { color: var(--ink-3); }
.hero-card dd { margin: 0; text-align: right; }
.copy { width: 100%; padding: 8px; border: 1px solid var(--line); background: var(--brand-soft); color: var(--brand-dark); border-radius: 8px; cursor: pointer; font-weight: 600; }
.copy:hover { background: #d6f2ef; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; }
.pill.soft { background: var(--brand-soft); color: var(--brand-dark); }

.block { padding: 22px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.card-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card-item .no { display: inline-block; font: 700 12px/1 ui-monospace, Consolas, monospace; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 4px 7px; margin-bottom: 10px; }
.card-item h3 { margin: 0 0 4px; font-size: 16px; }
.card-item .lead { color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.card-item p:last-child { margin-bottom: 0; font-size: 13px; }
.changelog { margin: 0 0 10px; padding-left: 18px; color: var(--ink-2); }
.changelog li { margin: 4px 0; }
.tag { display: inline-block; font-size: 11px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 4px; padding: 0 6px; margin-right: 6px; font-weight: 700; }
.notes { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; color: var(--ink-2); white-space: pre-wrap; }
.req { list-style: none; padding: 0; margin: 8px 0 0; }
.req li { padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.req b { display: inline-block; width: 88px; color: var(--ink); }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f2f7f8; font-weight: 700; color: var(--ink-2); font-size: 12px; }
.table tbody tr:hover { background: #f7fbfb; }
.table tr:last-child td { border-bottom: 0; }

.code {
  background: #0f2b2b; color: #d8fbf6; border-radius: 10px; padding: 14px 16px;
  font: 12.5px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.hash { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.foot { border-top: 1px solid var(--line); padding: 22px 24px 40px; text-align: center; color: var(--ink-2); font-size: 13px; }

/* ---------- 管理台 ---------- */
.console-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat span { display: block; color: var(--ink-3); font-size: 12px; }
.stat b { font-size: 22px; font-weight: 700; }
.stat b.small-v { font-size: 16px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.panel > summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.field textarea { min-height: 74px; resize: vertical; }
.hint { font-size: 12px; color: var(--ink-3); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.status { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.status.dev { background: #eef2f5; color: #46565f; }
.status.review { background: #fff4e5; color: #b45309; }
.status.published { background: var(--ok-soft); color: var(--ok); }
.status.offline { background: var(--danger-soft); color: var(--danger); }

.modal { position: fixed; inset: 0; background: rgba(10, 25, 28, .45); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal.open { display: flex; }
.modal-card { background: #fff; border-radius: 14px; width: min(720px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); }
.gate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gate:last-child { border-bottom: 0; }
.gate input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); }
.gate b { display: block; }
.gate .hint { display: block; }

.toast { position: fixed; right: 20px; bottom: 20px; background: #0f2b2b; color: #d8fbf6; padding: 10px 16px; border-radius: 10px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; z-index: 90; max-width: 460px; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: #7a1d12; color: #ffe4df; }

.login { max-width: 440px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  h1 { font-size: 27px; }
  main { padding: 20px 16px 60px; }
  .nav { gap: 12px; }
}
