:root {
  color-scheme: light;
  --canvas: #f5f7f8;
  --paper: #fff;
  --ink: #242d38;
  --muted: #566475;
  --line: #dce3e9;
  --accent: #1655ad;
  --accent-soft: #ebf3ff;
  --navy: #152e4f;
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.65; }
a { color: var(--accent); text-underline-offset: .25em; }
:focus-visible { outline: 2px solid #2567c3; outline-offset: 4px; }
[id] { scroll-margin-top: 88px; }
.skip { position: fixed; z-index: 5; left: 12px; top: 12px; padding: 10px 15px; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }

.top { position: sticky; z-index: 2; top: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1180px; margin: auto; min-height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-divider { width: 1px; height: 16px; background: var(--line); }
.brand-sub { color: var(--muted); font-size: 14px; font-weight: 500; }
.mark { width: 30px; height: 30px; background: var(--navy); border-radius: 7px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; padding: 7px; }
.mark i { background: #fff; border-radius: 1px; }
.mark i:nth-child(2) { background: #7eb5ff; }
.top-link { font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }

.page { max-width: 1180px; margin: auto; padding: 32px 28px 0; }
.hero {
  position: relative;
  overflow: hidden;
  min-height: 208px;
  isolation: isolate;
  display: flex;
  align-items: center;
  background: var(--navy);
  padding: 34px clamp(25px, 5vw, 60px);
  border-radius: 16px;
  color: #fff;
}
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.24; letter-spacing: -.035em; }
.hero p { margin: 16px 0 0; color: #dce9fb; font-size: clamp(14px, 2vw, 17px); }
.blueprint {
  position: absolute;
  inset: 0 0 0 auto;
  width: 44%;
  z-index: -1;
  opacity: .83;
  background-image: linear-gradient(#6784a631 1px, transparent 1px), linear-gradient(90deg, #6784a631 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to right, transparent, #000 32%);
}
.node, .wire { position: absolute; display: block; }
.node { width: 18%; height: 23%; border: 1px solid #9bc7ff; border-radius: 6px; background: #244877; }
.node-a { top: 23%; left: 27%; }
.node-b { top: 23%; left: 64%; }
.node-c { top: 67%; left: 64%; background: #305e94; }
.wire { border-color: #8abbfb; border-style: solid; }
.wire-a { top: 34%; left: 45%; width: 19%; border-width: 1px 0 0; }
.wire-b { top: 46%; left: 73%; height: 21%; border-width: 0 0 0 1px; }
.wire-c { top: 46%; left: 36%; width: 28%; height: 32%; border-width: 0 0 1px 1px; border-radius: 0 0 0 9px; }

.resources { margin: 24px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.resources h2 { font-size: 16px; margin: 0 0 10px; }
.resource-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.resource-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f6f9fd; border: 1px solid #e2eaf4; border-radius: 7px; padding: 9px 12px; font-size: 14px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.resource-links a:hover { border-color: #a6bfe1; background: var(--accent-soft); }

.workspace { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 88px; display: grid; gap: 14px; }
.progress-panel, .section-nav, .stage { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.progress-panel { padding: 17px; }
.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-heading h2 { margin: 0; font-size: 15px; }
#progress-count, .section-count { font-variant-numeric: tabular-nums; }
#progress-count { color: var(--accent); font-size: 15px; font-weight: 750; }
#progress { appearance: none; width: 100%; height: 7px; margin: 10px 0 0; border: 0; border-radius: 8px; overflow: hidden; background: #e4ebf3; accent-color: var(--accent); }
#progress::-webkit-progress-bar { background: #e4ebf3; }
#progress::-webkit-progress-value { background: var(--accent); }
#progress::-moz-progress-bar { background: var(--accent); }
#save-status { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.section-nav { padding: 7px; }
.section-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 5px; color: var(--ink); font-size: 14px; text-decoration: none; }
.section-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.section-count { font-size: 12px; color: var(--muted); }

.checklist { display: grid; gap: 17px; min-width: 0; }
.stage { padding: 0 clamp(16px, 3vw, 28px); }
.stage-heading { padding: 19px 0 12px; border-bottom: 1px solid var(--line); }
.stage-heading h2 { margin: 0; font-size: 21px; line-height: 1.5; }
.task { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 13px; padding: 17px 0; }
.task + .task { border-top: 1px solid #e9edf1; }
.task input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); cursor: pointer; }
.task h3 { margin: 0; font-size: 16px; line-height: 1.5; }
.task label { cursor: pointer; }
.task input:checked + div h3 { color: var(--accent); }
.task p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.task .example { background: var(--accent-soft); color: #264466; margin-top: 10px; border-radius: 6px; padding: 8px 10px; }
.example strong { margin-right: 4px; }
.board { background: #edf4f3; border: 1px solid #dbeae6; border-radius: 7px; color: #214744; margin: 12px 0 0; padding: 13px 15px; font-size: 13px; }
.board h4 { margin: 0 0 6px; font-size: 14px; }
.board-row { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.reference a { font-size: 13px; }

.phrases { border-top: 1px solid var(--line); padding: 17px 0 20px; }
.phrase-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.phrase-heading h3 { margin: 0; font-size: 16px; }
button { font: inherit; }
.phrase-heading button { background: var(--paper); color: var(--accent); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; font-size: 13px; cursor: pointer; }
.phrase-heading button:hover { background: var(--accent-soft); }
.phrases details { border-bottom: 1px solid #e7edf4; }
.phrases details:first-of-type { border-top: 1px solid #e7edf4; }
.phrases summary { cursor: pointer; padding: 12px 8px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.phrases summary:hover { background: #f7faff; }
.phrases details[open] summary { color: var(--accent); }
.transcript { padding: 0 14px 12px 24px; }
.transcript p { margin: 5px 0; font-size: 14px; line-height: 1.8; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 0; font-size: 13px; color: var(--muted); }
footer a { text-decoration: none; }

@media (max-width: 800px) {
  .workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 15px; }
  .resource-links { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .top-inner { min-height: 58px; padding: 0 14px; gap: 8px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand-sub, .top-link { font-size: 12px; }
  .page { padding: 16px 12px 0; }
  .hero { min-height: 162px; }
  .blueprint { opacity: .27; width: 65%; }
  .resources { margin: 15px 0; padding: 13px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; gap: 8px; }
  .section-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-nav a { padding: 7px; }
  .task { gap: 9px; }
}
