/* ==========================================================================
   MOTORCYCLES ILLUMINATION — 视觉层
   配色与网格规范取自「二轮车灯设计能力展示/design.md」(S7)
   深藏青仅用于 nav / hero / footer；主体保持浅底深字
   ========================================================================== */

:root {
  --navy: #0B2545;
  --navy-2: #12335d;
  --primary: #1A5FB4;
  --accent: #E8730C;
  --text: #2B3440;
  --subtext: #5A6572;
  --bg: #F5F7FA;
  --line: #D9E1EA;
  --white: #FFFFFF;
  --lightblue: #EEF3FA;
  --lightorange: #FBF3E8;
  --lightteal: #E9F7F4;
  --teal: #0D9488;
  --red: #C0392B;
  --on-dark: #D7E3F4;
  --on-dark-muted: #9FB6D8;
  --shadow: 0 1px 3px rgba(11, 37, 69, .07), 0 8px 24px rgba(11, 37, 69, .05);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, .14);
  --radius: 12px;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Cascadia Code", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.topbar .bar {
  max-width: 1280px; margin: 0 auto; padding: 10px 28px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand .mark {
  width: 8px; height: 22px; border-radius: 2px; background: var(--accent);
  display: inline-block; transform: translateY(3px);
}
.brand b { font-size: 15px; letter-spacing: .06em; color: var(--navy); font-weight: 800; }
.brand span { font-size: 12px; color: var(--subtext); letter-spacing: .02em; }
.navlinks { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.navlinks a {
  font-size: 12px; color: var(--subtext); padding: 6px 7px;
  border-radius: 7px; font-weight: 600; white-space: nowrap;
}
.navlinks a:hover, .navlinks a.active { color: var(--navy); background: var(--lightblue); text-decoration: none; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; color: var(--navy); font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1100px 620px at 78% -12%, #1b406f 0%, var(--navy) 52%, #071a32 100%);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 80px);
  pointer-events: none;
}
.hero-inner {
  max-width: 1280px; margin: 0 auto; padding: 58px 28px 62px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 46px; align-items: center;
  position: relative; z-index: 1;
}
.eyebrow { font-size: 11.5px; letter-spacing: .26em; color: #F6B26B; font-weight: 800; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(30px, 3.9vw, 50px); line-height: 1.22; margin: 0 0 18px; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: #F6B26B; }
.hero .lede { color: var(--on-dark); font-size: 16px; line-height: 1.85; max-width: 50ch; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.chips span {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); color: var(--on-dark); background: rgba(255,255,255,.045);
}
.chips span.hot { border-color: rgba(232,115,12,.6); color: #FCD9A8; background: rgba(232,115,12,.12); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 9px;
  font-size: 13.5px; font-weight: 700; border: 1px solid transparent; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.hero-meta { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); color: var(--on-dark-muted); font-size: 12px; line-height: 1.9; }

/* Hero 交互屏 */
.beam-panel { background: rgba(4, 15, 32, .55); border: 1px solid rgba(159,182,216,.22); border-radius: 18px; padding: 18px; }
.beam-panel .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.beam-panel .panel-head .lbl { font-size: 11.5px; letter-spacing: .12em; color: var(--on-dark-muted); font-weight: 700; }
.seg { display: inline-flex; background: rgba(255,255,255,.07); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--on-dark); font-size: 12px;
  padding: 5px 11px; border-radius: 6px; font-weight: 600;
}
.seg button.on { background: var(--accent); color: #fff; }
#beamSvg { width: 100%; height: auto; display: block; }
.beam-note { color: var(--on-dark-muted); font-size: 12px; margin-top: 10px; line-height: 1.7; }
.beam-note b { color: #F6B26B; }

/* ---------- 通用容器 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px 90px; }
section { scroll-margin-top: 84px; }
.sec { margin-top: 66px; }
.sec-head { display: flex; align-items: baseline; gap: 15px; border-bottom: 2px solid var(--line); padding-bottom: 13px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-no {
  font-family: var(--mono); font-size: 12.5px; font-weight: 800; color: var(--accent);
  background: var(--lightorange); padding: 3px 10px; border-radius: 6px; letter-spacing: .05em;
}
.sec-head h2 { font-size: 26px; margin: 0; color: var(--navy); font-weight: 800; letter-spacing: -.015em; }
.sec-head .sub { color: var(--subtext); font-size: 13.5px; margin-left: auto; }
.lead { color: var(--subtext); font-size: 15px; max-width: 96ch; margin: 0 0 22px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.card.tight { padding: 18px 20px; }
.card h3 { font-size: 17px; color: var(--navy); margin: 0 0 12px; font-weight: 800; }
.card h3:not(:first-child) { margin-top: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
/* grid item 默认 min-width:auto 会被宽表格撑破，必须归零以保留内部横向滚动 */
.grid2 > *, .grid3 > *, .grid4 > *, .screen-grid > *, .calc > *, .quiz > * { min-width: 0; }
.spacer { height: 20px; }
/* spacer 与网格容器同时使用时只表达「上方留白」，不能锁死高度 */
.grid2.spacer, .grid3.spacer, .grid4.spacer { height: auto; margin-top: 20px; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 6px 0 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); border-top: 3px solid var(--primary); }
.kpi.orange { border-top-color: var(--accent); }
.kpi.teal { border-top-color: var(--teal); }
.kpi .v { font-size: 27px; font-weight: 900; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 14px; font-weight: 700; color: var(--subtext); }
.kpi .k { font-size: 13px; color: var(--subtext); margin-top: 7px; line-height: 1.65; }

/* Callout */
.callout { border-radius: 12px; padding: 16px 20px; margin: 18px 0; border-left: 4px solid var(--primary); background: var(--lightblue); font-size: 14px; }
.callout .ct { display: block; font-weight: 800; color: var(--navy); font-size: 13px; margin-bottom: 5px; letter-spacing: .02em; }
.callout.orange { background: var(--lightorange); border-left-color: var(--accent); }
.callout.orange .ct { color: #92400E; }
.callout.warn { background: #FDECEA; border-left-color: var(--red); }
.callout.warn .ct { color: var(--red); }
.callout.teal { background: var(--lightteal); border-left-color: var(--teal); }
.callout.teal .ct { color: #115E59; }

/* 表格 */
.tbl-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .03em; white-space: nowrap; }
tbody tr:nth-child(even) td { background: #F7FAFD; }
tbody tr:hover td { background: var(--lightblue); }
td:first-child { font-weight: 700; color: var(--navy); }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl-note { font-size: 12.5px; color: var(--subtext); margin: 10px 2px 0; line-height: 1.75; }
.tbl-head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tbl-head-row h3 { margin: 0; font-size: 17px; color: var(--navy); }
.tbl-head-row .src { font-size: 12px; color: var(--subtext); }
.src-tag { display: inline-block; font-size: 11px; font-family: var(--mono); color: var(--primary); background: var(--lightblue); border: 1px solid #CDDFF5; padding: 1px 7px; border-radius: 5px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  border: 1px solid var(--line); background: #fff; color: var(--subtext);
  padding: 8px 15px; border-radius: 8px; font-size: 13px; font-weight: 700;
}
.tabs button:hover { border-color: var(--primary); color: var(--primary); }
.tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* 计算器 */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--subtext); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); font-family: var(--mono); font-size: 15px;
}
.field input:focus, .field select:focus { outline: 2px solid rgba(26,95,180,.35); border-color: var(--primary); }
.result { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px 22px; }
.result .rl { font-size: 12px; color: var(--on-dark-muted); letter-spacing: .05em; }
.result .rv { font-size: 32px; font-weight: 900; color: #F6B26B; line-height: 1.3; font-variant-numeric: tabular-nums; }
.result .rx { font-size: 12.5px; color: var(--on-dark); line-height: 1.8; margin-top: 8px; }
.result .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.result .mini div { background: rgba(255,255,255,.07); border-radius: 8px; padding: 10px 12px; }
.result .mini b { display: block; font-size: 17px; color: #fff; font-variant-numeric: tabular-nums; }
.result .mini span { font-size: 11.5px; color: var(--on-dark-muted); }

/* 配光屏交互 */
.screen-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.screen-box { background: #0B1424; border-radius: var(--radius); padding: 14px; border: 1px solid #1C2740; }
#screenSvg { width: 100%; height: auto; display: block; }
.point-detail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-height: 240px; }
.point-detail .pd-id { font-family: var(--mono); font-size: 22px; font-weight: 900; color: var(--navy); }
.point-detail .pd-kind { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 5px; margin-left: 8px; vertical-align: 4px; }
.pd-kind.min { background: var(--lightteal); color: #115E59; }
.pd-kind.max { background: #FDECEA; color: var(--red); }
.pd-kind.both { background: var(--lightorange); color: #92400E; }
.pd-kind.ref { background: var(--lightblue); color: var(--primary); }
.point-detail .pd-val { font-family: var(--mono); font-size: 16px; font-weight: 800; color: var(--accent); margin: 14px 0 4px; }
.point-detail .pd-val2 { font-size: 13px; color: var(--primary); font-weight: 700; }
.point-detail .pd-desc { font-size: 13.5px; color: var(--subtext); line-height: 1.8; margin-top: 14px; }
.point-detail .pd-hint { font-size: 12px; color: #94A3B8; margin-top: 18px; }

/* 图卡 */
.figcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.figcard img { border-radius: 6px; width: 100%; }
.figcard .cap { font-size: 12.5px; color: var(--subtext); margin-top: 10px; line-height: 1.7; }
.figcard .cap b { color: var(--navy); }

/* 流程 */
.phase { margin-bottom: 22px; }
.phase-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.phase-head .pno { font-family: var(--mono); font-size: 12px; font-weight: 800; color: #fff; background: var(--navy); padding: 3px 10px; border-radius: 6px; }
.phase-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.phase-head .pline { flex: 1; height: 1px; background: var(--line); }
.flow-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.flow-step {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  text-align: left; position: relative; transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow);
}
.flow-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.flow-step.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,115,12,.18); }
.flow-step .fs-n { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 800; }
.flow-step .fs-t { font-size: 14px; font-weight: 800; color: var(--navy); margin: 4px 0 5px; }
.flow-step .fs-d { font-size: 11.5px; color: var(--subtext); line-height: 1.6; }
.flow-detail { background: var(--lightblue); border: 1px solid #CDDFF5; border-radius: 10px; padding: 14px 18px; margin-top: 12px; font-size: 13.5px; line-height: 1.8; }
.flow-detail b { color: var(--navy); }

/* 案例 / 坑 */
.pit { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.pit-h { padding: 13px 18px; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.pit-h .tag { font-size: 11px; color: #F6B26B; font-weight: 700; }
.pit-b { padding: 15px 18px; font-size: 13px; line-height: 1.8; }
.pit-b p { margin: 0 0 8px; }
.pit-b .lbl { display: inline-block; min-width: 42px; font-weight: 800; color: var(--primary); }

/* 冲突清单 */
.conflict { border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 10px; background: #fff; padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.conflict .ch { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 9px; }
.conflict .ch b { font-size: 15px; color: var(--navy); }
.conflict .lvl { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 5px; }
.lvl.高 { background: #FDECEA; color: var(--red); }
.lvl.中 { background: var(--lightorange); color: #92400E; }
.lvl.低 { background: var(--lightblue); color: var(--primary); }
.conflict .row { font-size: 13px; line-height: 1.8; padding: 5px 0; display: grid; grid-template-columns: 54px 1fr; gap: 8px; }
.conflict .row .k { font-weight: 800; color: var(--subtext); }
.conflict .act { margin-top: 8px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 13px; color: #115E59; font-weight: 700; }

/* 自测 */
.quiz { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qitem { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.qitem .qh { display: flex; gap: 9px; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.qitem .qh .qn { font-family: var(--mono); color: var(--accent); font-weight: 800; }
.opts { display: grid; gap: 6px; }
.opts button {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 7px 11px; font-size: 12.5px; color: var(--text);
}
.opts button:hover { border-color: var(--primary); background: var(--lightblue); }
.opts button.correct { background: var(--lightteal); border-color: var(--teal); color: #115E59; font-weight: 700; }
.opts button.wrong { background: #FDECEA; border-color: var(--red); color: var(--red); }
.qwhy { font-size: 12.5px; color: var(--subtext); line-height: 1.75; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); display: none; }
.qwhy.show { display: block; }
.quiz-score { position: sticky; bottom: 16px; margin-top: 18px; background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; flex-wrap: wrap; }
.quiz-score b { color: #F6B26B; font-size: 18px; }
.quiz-score button { background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; }

/* 来源 / 页脚 */
.src-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.src-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 12.5px; line-height: 1.75; }
.src-item .sid { font-family: var(--mono); font-weight: 800; color: var(--accent); margin-right: 6px; }
.src-item b { color: var(--navy); display: block; margin-bottom: 3px; }
.src-item span { color: var(--subtext); }
footer { background: var(--navy); color: var(--on-dark); padding: 34px 28px 40px; }
.foot-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 12.5px; line-height: 1.9; }
.foot-inner b { color: #fff; }
.foot-inner .muted { color: var(--on-dark-muted); }

/* 提示条 */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--lightorange); border: 1px solid #F3D5AC; border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 14px 18px; font-size: 13.5px; line-height: 1.8; margin-bottom: 20px;
}
.notice .ni { font-weight: 800; color: #92400E; white-space: nowrap; }

/* 响应式 */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .flow-row { grid-template-columns: repeat(3, 1fr); }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .src-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .topbar .bar { padding: 10px 16px; flex-wrap: wrap; }
  .brand b { font-size: 13px; letter-spacing: .02em; }
  .brand span { display: none; }
  .navlinks { display: none; width: 100%; margin-left: 0; }
  .navlinks.open { display: flex; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .wrap { padding: 0 16px 70px; }
  .hero-inner { padding: 40px 16px 46px; }
  .grid2, .grid3, .calc, .screen-grid, .quiz { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: repeat(2, 1fr); }
  .sec-head h2 { font-size: 22px; }
  .sec-head .sub { margin-left: 0; }
}
@media (max-width: 520px) {
  .grid4, .flow-row, .src-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
