:root {
  --brand-red: #E60012;
  --brand-red-light: #E85D75;
  --brand-red-dark: #FF5A5F;
  --brand-gold: #C9A962;
  --brand-gold-light: #D4B978;
  --bg-navy: #0A1628;
  --bg-navy-light: #1A2A42;
  --bg-dark: #0A1628;
  --bg-white: #FFFFFF;
  --bg-gray: #F8F8F8;
  --border-light: #E8E8E8;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --ok: #10B981;
  --warn: #F5A623;
  --stop: #E60012;
  --info: #2F6FED;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  color: var(--text-primary);
  background: var(--bg-gray);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

.site-header {
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: white; min-width: 0; }
.brand img { height: 40px; width: auto; flex: 0 0 auto; object-fit: contain; }
.brand strong { font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 100px;
}
.nav a.active, .nav a:hover { color: white; background: rgba(255,255,255,0.08); }

.stats {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 14px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.86);
  font-size: 13px;
}
.stats b { color: white; font-weight: 600; }

.banner, .modal-card p.lead { margin: 0; }
.banner {
  background: #fff6f6;
  color: var(--stop);
  border-bottom: 1px solid #ffd5d8;
  padding: 10px 24px;
  font-size: 14px;
}
.banner.warn { background: #fff8ec; color: #8a5a00; border-color: #ffe1ad; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { margin-bottom: 22px; }
.eyebrow {
  color: var(--brand-red);
  letter-spacing: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 8px;
}
h1 { font-weight: 300; font-size: 40px; letter-spacing: -0.03em; margin: 0; line-height: 1.2; }
h1 b { font-weight: 700; }
.sub { color: var(--text-secondary); margin: 8px 0 0; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
.card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.04);
  padding: 20px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
input, select, textarea {
  font: inherit;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
  background: white;
}
textarea { width: 100%; min-height: 110px; resize: vertical; }
.btn {
  border: 0;
  border-radius: 100px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand-red);
  color: white;
}
.btn:hover { background: #a01830; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(230,0,18,0.28); }
.btn:disabled { background: #ccc; transform: none; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-light); box-shadow: none; }
.btn.ghost:hover { transform: none; background: var(--bg-gray); }
.btn.ok { background: var(--ok); }
.btn.stop { background: var(--text-primary); }

.progress { margin-top: 16px; color: var(--text-secondary); }
.progress strong { color: var(--text-primary); }
.hit { border-left: 3px solid var(--stop); padding: 8px 12px; margin: 8px 0; background: #fff; border-radius: 8px; }
.hit.高危 { border-color: #e67e22; }
.hit.谨慎 { border-color: var(--warn); }
.hit.红线 { border-color: var(--stop); }
.mark { background: #ffe1e4; border-radius: 4px; }
.mark.高危 { background: #ffe8cc; }
.mark.谨慎 { background: #fff3d6; }
.score-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; padding: 4px 10px; font-size: 13px; background: var(--bg-gray); }
.score-pill.good { color: var(--ok); }
.score-pill.bad { color: var(--stop); }
.score-pill.mid { color: #8a5a00; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { text-decoration: none; border-radius: 100px; padding: 8px 14px; background: white; border: 1px solid var(--border-light); font-size: 14px; }
.tabs a.on { background: var(--bg-navy); color: white; border-color: var(--bg-navy); }
.review-card { margin-bottom: 16px; }
.review-card .lead { font-size: 20px; font-weight: 500; margin: 8px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.muted { color: var(--text-secondary); font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
.modal {
  position: fixed; inset: 0; background: rgba(10, 22, 40, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 30;
}
.modal-card { max-width: 460px; }
.side-stat { font-size: 42px; font-weight: 300; margin: 0; }
.side-stat b { font-weight: 700; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; }
.keys { font-size: 13px; color: var(--text-tertiary); }

.login-body { background: var(--bg-gray); }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 28px; }
.login-card img.logo-mark {
  width: 72px;
  height: 72px;
  align-self: flex-start;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 16px;
}
.login-card input { width: 100%; font-size: 16px; min-height: 48px; }
.login-card .btn { width: 100%; min-height: 48px; }
.login-card .banner { border-radius: 12px; }

.today-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.week-inline { margin: 0; color: var(--text-secondary); }
.week-inline b { color: var(--text-primary); font-size: 28px; }
.go-btn { min-height: 52px; padding: 14px 28px; font-size: 18px; }
.product-line { cursor: pointer; }
.script-card { margin-top: 14px; }
.script-card header { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.script-title { font-weight: 600; margin-bottom: 6px; }
.script-body { white-space: pre-wrap; margin-top: 0; }
.weak { display: inline-flex; margin-left: 8px; padding: 2px 8px; border-radius: 100px; background: #fff3d6; color: #8a5a00; font-size: 12px; font-weight: 600; }
.script-card.gone { opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease; }
.discard-fold { margin-top: 12px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.problem { margin: 6px 0; }
.advanced summary, details summary { cursor: pointer; font-weight: 600; }
.advanced .tabs { margin-top: 12px; }
.advanced .tabs a.on { background: var(--bg-navy); color: white; }

@media (max-width: 900px) {
  h1 { font-size: 30px; }
  .layout, .grid-2, .split { grid-template-columns: 1fr; }
  .nav { width: 100%; margin-left: 0; }
  .site-header .bar { flex-wrap: wrap; padding: 12px 16px; }
  .wrap { padding: 20px 16px 48px; }
  .stats { padding: 0 16px 12px; }
  input, select, textarea { font-size: 16px; }
  table { display: block; overflow-x: auto; }
  .today-head, .compare { display: block; }
  .go-btn, .script-card .actions .btn, .card .actions .btn { width: 100%; }
  .brand strong { display: none; }
  .nav { flex-wrap: nowrap; width: auto; margin-left: auto; gap: 0; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .login-wrap { align-items: flex-start; padding-top: 24px; }
  .login-card input:focus { scroll-margin-top: 24px; scroll-margin-bottom: 40vh; }
}

@media (max-width: 420px) {
  .site-header .bar { flex-wrap: nowrap; gap: 8px; }
  .brand img { height: 22px; }
  .nav { flex-wrap: nowrap; }
  .nav a { padding: 6px 7px; font-size: 13px; }
}
