:root {
  --bg: #080c11;
  --bg-soft: #0b1118;
  --panel: #101923;
  --panel-2: #141f2b;
  --panel-3: #0a1017;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef5;
  --muted: #8fa0b3;
  --muted-2: #65768a;
  --amber: #f4b942;
  --amber-2: #ffd479;
  --teal: #54d6c7;
  --green: #6ee7a0;
  --red: #ff7a7a;
  --blue: #7aa7ff;
  --purple: #b9a2ff;
  --radius: 18px;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background:
    radial-gradient(920px 540px at 78% -8%, rgba(244, 185, 66, 0.09), transparent 66%),
    radial-gradient(760px 440px at 6% 16%, rgba(84, 214, 199, 0.055), transparent 66%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
::selection { background: rgba(244, 185, 66, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.page-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  box-shadow: 0 0 14px rgba(244, 185, 66, 0.45);
}

.wrap {
  width: min(1180px, calc(100% - 56px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: rgba(8, 12, 17, 0.62);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 12, 17, 0.9);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1180px, calc(100% - 56px));
  height: 68px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 185, 66, 0.42);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(244, 185, 66, 0.16), rgba(244, 185, 66, 0.03));
  color: var(--amber);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark i {
  position: absolute;
  width: 3px;
  height: 5px;
  border-radius: 1px;
  background: rgba(244, 185, 66, 0.55);
}
.brand-mark i:nth-child(1) { left: -2px; top: 9px; }
.brand-mark i:nth-child(2) { left: -2px; bottom: 9px; }
.brand-mark i:nth-child(3) { right: -2px; top: 9px; }
.brand-mark i:nth-child(4) { right: -2px; bottom: 9px; }
.brand-mark b { position: relative; z-index: 1; font-weight: 700; }

.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 0.16em;
}
.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav a.is-active { color: var(--amber); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 185, 66, 0.55);
}

.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.series-badge {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: 10px/1 var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.menu-btn {
  display: none;
  width: 36px;
  height: 34px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.menu-btn span { display: block; width: 100%; height: 1px; background: var(--text); transition: transform 0.2s ease; }
.menu-btn span + span { margin-top: 5px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--amber);
  color: #171106;
  box-shadow: 0 8px 26px rgba(244, 185, 66, 0.16);
}
.btn-primary:hover { background: var(--amber-2); box-shadow: 0 10px 30px rgba(244, 185, 66, 0.23); }
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.05); }
.btn-small { min-height: 32px; padding: 8px 11px; font-size: 11px; }
.btn-arrow { font-size: 15px; line-height: 0.6; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 68px 0 82px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 10%;
  right: -20%;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(244, 185, 66, 0.06);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: 22%;
  right: -8%;
  width: 420px;
  height: 420px;
  border: 1px dashed rgba(84, 214, 199, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
  align-items: center;
  gap: 60px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--teal);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(84, 214, 199, 0.1), 0 0 14px rgba(84, 214, 199, 0.55);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero h1 {
  max-width: 620px;
  margin: 18px 0 23px;
  font-size: clamp(42px, 5.1vw, 68px);
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -0.055em;
}
.hero h1 em {
  position: relative;
  display: inline-block;
  color: var(--amber);
  font-style: normal;
  font-weight: 750;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 4px;
  bottom: 2px;
  z-index: -1;
  height: 12px;
  background: linear-gradient(90deg, rgba(244, 185, 66, 0.18), rgba(244, 185, 66, 0.01));
  transform: skewX(-14deg);
}

.lede {
  max-width: 535px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 29px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  max-width: 580px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column; gap: 3px; }
.hero-stats strong {
  color: var(--text);
  font: 650 20px/1 var(--mono);
  letter-spacing: -0.04em;
}
.hero-stats span { color: var(--muted-2); font-size: 10px; letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Hero bench card
   -------------------------------------------------------------------------- */
.bench-card {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), transparent 34%),
    linear-gradient(160deg, #15202b, #0d141c 72%);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.bench-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(84, 214, 199, 0.025);
}

.bench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}
.bench-title { display: flex; flex-direction: column; gap: 5px; }
.mono-label {
  color: var(--amber);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.bench-title strong { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }

.run-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.run-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px rgba(84, 214, 199, 0.8);
}
.run-state.is-paused { color: var(--muted-2); }
.run-state.is-paused i { background: var(--muted-2); box-shadow: none; }

.bench-body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px 19px 18px;
}

.mini-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 112px;
  height: 186px;
  flex: none;
  border: 1px solid #354352;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #283440 0%, #1a232d 48%, #111820 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -20px 34px rgba(0, 0, 0, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.28);
}
.mini-chip::before,
.mini-chip::after {
  content: "";
  position: absolute;
  top: 15px;
  bottom: 15px;
  width: 6px;
  border-radius: 2px;
  background: repeating-linear-gradient(to bottom, #aab6c3 0 5px, transparent 5px 17px);
  opacity: 0.7;
}
.mini-chip::before { left: -8px; }
.mini-chip::after { right: -8px; }
.mini-notch {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 30px;
  height: 15px;
  transform: translateX(-50%);
  border: 1px solid #354352;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--panel-2);
}
.mini-dot {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 185, 66, 0.6);
}
.mini-chip strong {
  color: #dfe8f1;
  font: 650 11px/1 var(--mono);
  letter-spacing: 0.06em;
}
.mini-chip small {
  color: #728294;
  font: 8px/1.55 var(--mono);
  letter-spacing: 0.13em;
  text-align: center;
}

.readout { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.seg-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 188px;
  padding: 10px 12px 8px;
  border: 1px solid #1c2a36;
  border-radius: 14px;
  background:
    radial-gradient(80% 60% at 50% 35%, rgba(84, 214, 199, 0.04), transparent 70%),
    #070b0f;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.72);
}
.seg-label {
  position: absolute;
  top: 8px;
  left: 10px;
  color: #435362;
  font: 8px/1 var(--mono);
  letter-spacing: 0.16em;
}
.seg-unit {
  color: #3d4b58;
  font: 8px/1 var(--mono);
  letter-spacing: 0.1em;
}

.seven-seg {
  width: 106px;
  height: 174px;
  overflow: visible;
}
.seven-seg .seg rect {
  fill: rgba(84, 214, 199, 0.075);
  transition: fill 0.1s ease, filter 0.1s ease;
}
.seven-seg .seg.on rect {
  fill: var(--teal);
  filter: drop-shadow(0 0 6px rgba(84, 214, 199, 0.65));
}
.seven-seg .seg-dot { fill: rgba(84, 214, 199, 0.14); }
.seven-seg .seg-dot.on { fill: var(--teal); filter: drop-shadow(0 0 6px rgba(84, 214, 199, 0.65)); }

.bit-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}
.bit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bit i {
  width: 7px;
  height: 7px;
  border: 1px solid #41505f;
  border-radius: 50%;
  background: #111a22;
  transition: background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.bit.on i {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 0 9px rgba(84, 214, 199, 0.75);
}
.bit span { color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.04em; }

.signal-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 19px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.11);
}
.sig-label { color: var(--muted-2); font: 9px/1 var(--mono); letter-spacing: 0.1em; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 22px; flex: 1; }
.wave span {
  width: 4px;
  height: var(--h, 10px);
  border-radius: 2px;
  background: rgba(244, 185, 66, 0.25);
  transition: height 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.wave span.hot {
  height: 20px !important;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(84, 214, 199, 0.7);
}
.rco-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-2);
  font: 9px/1 var(--mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.rco-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2b3742;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.rco-pill b { color: var(--muted); font-weight: 600; }
.rco-pill.on { color: var(--amber); }
.rco-pill.on i { background: var(--amber); box-shadow: 0 0 8px rgba(244, 185, 66, 0.8); }
.rco-pill.on b { color: var(--amber); }

.bench-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 19px 15px;
}
.bench-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 10px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.bench-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.ctrl-glyph { color: var(--amber); font: 600 10px/1 var(--mono); }
.bench-hint { margin-left: auto; color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Shared section chrome
   -------------------------------------------------------------------------- */
.section { position: relative; z-index: 1; padding: 96px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 34px;
}
.section-head > div { min-width: 0; }
.kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--amber);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 43px);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -0.045em;
}
.section-head > p {
  max-width: 420px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Course map
   -------------------------------------------------------------------------- */
.map-section { padding-top: 88px; }
.map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 21px 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 48%),
    rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), rgba(244, 185, 66, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 185, 66, 0.26);
  background:
    linear-gradient(160deg, rgba(244, 185, 66, 0.045), transparent 52%),
    rgba(255, 255, 255, 0.022);
}
.module-card:hover::before { opacity: 1; }
.module-card.is-live { border-color: rgba(84, 214, 199, 0.14); }

.module-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.module-num {
  color: var(--amber);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.1em;
}
.module-time { color: var(--muted-2); font: 9px/1 var(--mono); }
.module-card h3 { margin: 0 0 7px; font-size: 19px; font-weight: 650; letter-spacing: -0.025em; }
.module-card p { min-height: 42px; margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row span {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 4px;
  color: var(--muted-2);
  font: 8px/1.2 var(--mono);
  letter-spacing: 0.03em;
}
.module-card details { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.module-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s ease;
}
.module-card summary::-webkit-details-marker { display: none; }
.module-card summary span { color: var(--muted-2); font: 8px/1 var(--mono); }
.module-card summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font: 11px/1 var(--mono);
}
.module-card details[open] summary { color: var(--amber); }
.module-card details[open] summary::after { content: "−"; color: var(--amber); border-color: rgba(244, 185, 66, 0.25); }
.module-card ol {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}
.module-card li {
  display: flex;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  counter-increment: item;
}
.module-card li:last-child { border-bottom: 0; }
.module-card li::before {
  content: counter(item, decimal-leading-zero);
  flex: none;
  padding-top: 1px;
  color: var(--amber);
  font: 8px/1.4 var(--mono);
}
.module-status {
  align-self: flex-start;
  margin-top: 13px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.09em;
}
.module-status.is-live { color: var(--teal); border-color: rgba(84, 214, 199, 0.22); background: rgba(84, 214, 199, 0.04); }
.map-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}
.map-note span { color: var(--amber); font: 9px/1 var(--mono); letter-spacing: 0.08em; }

/* --------------------------------------------------------------------------
   Chip library
   -------------------------------------------------------------------------- */
.chip-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}
.chip-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.16);
}
.chip-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.2s ease, background 0.2s ease;
}
.chip-tab small { color: var(--muted-2); font: 8px/1 var(--sans); }
.chip-tab:hover { color: var(--text); }
.chip-tab.is-active { background: rgba(244, 185, 66, 0.11); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.16); }
.chip-tab.is-active small { color: rgba(244, 185, 66, 0.65); }

.chip-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 14px;
  margin-top: 20px;
}
.chip-panel,
.pin-detail,
.table-panel,
.truth-panel,
.cheat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 40%),
    rgba(255, 255, 255, 0.016);
}
.chip-panel { padding: 20px 22px 16px; }
.chip-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.chip-panel-head > div { display: flex; flex-direction: column; gap: 5px; }
.chip-panel-head strong { font: 650 17px/1 var(--mono); letter-spacing: 0.02em; }
.chip-type {
  padding: 5px 7px;
  border: 1px solid rgba(84, 214, 199, 0.2);
  border-radius: 4px;
  color: var(--teal);
  font: 8px/1 var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.chip-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(68px, 1fr) 148px minmax(68px, 1fr);
  grid-template-rows: repeat(8, minmax(40px, 1fr));
  width: 100%;
  max-width: 610px;
  min-height: 390px;
  margin: 12px auto 0;
}
.chip-body {
  grid-column: 2;
  grid-row: 1 / span 8;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 6px 0;
  border: 1px solid #3b4957;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #2a3541 0%, #1b242e 50%, #111820 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -24px 38px rgba(0, 0, 0, 0.22),
    0 22px 44px rgba(0, 0, 0, 0.3);
}
.chip-body::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 34px;
  height: 17px;
  transform: translateX(-50%);
  border: 1px solid #3b4957;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--panel);
}
.chip-body::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 185, 66, 0.65);
}
.chip-body strong { color: #e1eaf3; font: 650 14px/1 var(--mono); letter-spacing: 0.05em; }
.chip-body small { color: #718294; font: 7px/1.55 var(--mono); letter-spacing: 0.16em; text-align: center; }
.chip-body .chip-body-foot { color: #566675; font: 6.5px/1 var(--mono); letter-spacing: 0.1em; }

.pins { display: grid; grid-template-rows: repeat(8, minmax(40px, 1fr)); min-width: 0; }
.pins-left { grid-column: 1; grid-row: 1 / span 8; }
.pins-right { grid-column: 3; grid-row: 1 / span 8; }
.pin {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 100%;
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}
.pin-left { justify-content: flex-end; }
.pin-right { justify-content: flex-start; }
.pin-label {
  min-width: 34px;
  color: var(--muted);
  font: 9.5px/1 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pin-left .pin-label { text-align: right; }
.pin-right .pin-label { text-align: left; }
.pin-label.is-low { text-decoration: overline; text-decoration-thickness: 1px; }
.pin-num { width: 13px; flex: none; color: var(--muted-2); font: 7.5px/1 var(--mono); text-align: center; }
.pin-lead { width: 15px; height: 2px; flex: none; border-radius: 2px; background: #536171; transition: background 0.16s ease, box-shadow 0.16s ease; }
.pin-left .pin-label { order: 1; }
.pin-left .pin-num { order: 2; }
.pin-left .pin-lead { order: 3; }
.pin-right .pin-lead { order: 1; }
.pin-right .pin-num { order: 2; }
.pin-right .pin-label { order: 3; }
.pin:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.pin:hover .pin-lead { background: var(--amber); }
.pin.is-active { color: var(--text); background: rgba(244, 185, 66, 0.085); box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.19); }
.pin.is-active .pin-lead { background: var(--amber); box-shadow: 0 0 7px rgba(244, 185, 66, 0.65); }
.pin.is-active .pin-num { color: var(--amber); }
.pin[data-kind="power"] .pin-lead { background: var(--red); }
.pin[data-kind="output"] .pin-lead { background: var(--green); }
.pin[data-kind="clock"] .pin-lead { background: var(--amber); }
.pin[data-kind="control"] .pin-lead { background: var(--purple); }
.pin[data-kind="input"] .pin-lead { background: var(--blue); }
.pin[data-kind="power"] .pin-label { color: #d99494; }
.pin[data-kind="output"] .pin-label { color: #8fcfa7; }
.pin[data-kind="clock"] .pin-label { color: #d6b877; }
.pin[data-kind="control"] .pin-label { color: #b6a8e3; }
.pin[data-kind="input"] .pin-label { color: #93b0e5; }

.pin-legend { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.pin-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font: 8px/1 var(--mono); }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot.power { background: var(--red); }
.dot.input { background: var(--blue); }
.dot.output { background: var(--green); }
.dot.clock { background: var(--amber); }
.dot.control { background: var(--purple); }

.pin-detail { align-self: start; padding: 23px 22px 20px; }
.pin-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pin-index { color: var(--amber); font: 650 26px/1 var(--mono); letter-spacing: -0.06em; }
.pin-kind {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font: 7.5px/1 var(--mono);
  letter-spacing: 0.1em;
}
.pin-kind[data-kind="output"] { color: var(--green); border-color: rgba(110, 231, 160, 0.22); }
.pin-kind[data-kind="power"] { color: var(--red); border-color: rgba(255, 122, 122, 0.22); }
.pin-kind[data-kind="clock"] { color: var(--amber); border-color: rgba(244, 185, 66, 0.22); }
.pin-kind[data-kind="control"] { color: var(--purple); border-color: rgba(185, 162, 255, 0.22); }
.pin-kind[data-kind="input"] { color: var(--blue); border-color: rgba(122, 167, 255, 0.22); }
.pin-detail h3 { margin: 15px 0 8px; font: 650 23px/1.15 var(--mono); letter-spacing: -0.03em; }
.pin-detail h3 span { color: var(--muted); font: 400 11px/1.3 var(--sans); letter-spacing: 0; }
.pin-detail > p { min-height: 52px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.pin-meta { margin: 17px 0 0; padding: 0; }
.pin-meta > div { padding: 10px 0; border-top: 1px solid var(--line); }
.pin-meta dt { margin-bottom: 3px; color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.08em; }
.pin-meta dd { margin: 0; color: #c3cfdb; font-size: 10.5px; line-height: 1.6; }
.pin-note {
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid rgba(244, 185, 66, 0.13);
  border-left: 2px solid rgba(244, 185, 66, 0.55);
  border-radius: 0 6px 6px 0;
  background: rgba(244, 185, 66, 0.035);
}
.pin-note strong { color: var(--amber); font: 8px/1 var(--mono); letter-spacing: 0.1em; }
.pin-note p { margin: 5px 0 0; color: #a9946e; font-size: 10px; line-height: 1.65; }
.pin-hint { margin-top: 14px; color: var(--muted-2); font-size: 9px; }

.table-panel { margin-top: 14px; padding: 20px 22px 17px; }
.table-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.table-head h3 { margin: 5px 0 0; font-size: 15px; font-weight: 600; }
.table-head > span { color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.05em; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll::-webkit-scrollbar { height: 6px; }
.table-scroll::-webkit-scrollbar-thumb { background: #2b3845; border-radius: 4px; }

.fn-table { width: 100%; min-width: 580px; border-collapse: collapse; }
.fn-table th,
.fn-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font: 10px/1.4 var(--mono);
}
.fn-table th { color: var(--muted-2); font-weight: 600; letter-spacing: 0.04em; background: rgba(0, 0, 0, 0.12); }
.fn-table td { color: #bfccd8; }
.fn-table td:last-child { color: var(--text); font-family: var(--sans); font-size: 11px; }
.fn-table tr:last-child td { border-bottom: 0; }
.fn-table tr:hover td { background: rgba(255, 255, 255, 0.018); }
.over { text-decoration: overline; text-decoration-thickness: 1px; }

/* --------------------------------------------------------------------------
   Lab
   -------------------------------------------------------------------------- */
.bench-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 380px at 86% 35%, rgba(84, 214, 199, 0.04), transparent 70%),
    rgba(255, 255, 255, 0.012);
}
.lab-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 38%),
    #0f1821;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}
.lab-controls { padding: 23px 24px 20px; }
.lab-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.lab-live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.1em; }
.lab-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px rgba(84, 214, 199, 0.6); }
.lab-chip-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 2px 0 8px; }
.lab-chip-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, 0.015); color: var(--muted); text-align: left; transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease; }
.lab-chip-tab b { font: 600 10px/1 var(--mono); letter-spacing: 0.02em; }
.lab-chip-tab small { color: var(--muted-2); font: 8px/1.2 var(--sans); }
.lab-chip-tab:hover { border-color: rgba(244, 185, 66, 0.35); color: var(--text); }
.lab-chip-tab.is-active { border-color: rgba(244, 185, 66, 0.55); background: rgba(244, 185, 66, 0.08); color: var(--amber); }
.lab-chip-tab.is-active small { color: rgba(244, 185, 66, 0.7); }
.lab-chip-note { min-height: 27px; margin: 0 0 12px; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.control-list { border-top: 1px solid var(--line); }
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.control-row > div { display: flex; flex-direction: column; gap: 2px; }
.control-row strong { color: var(--text); font: 600 11px/1.2 var(--mono); letter-spacing: 0.04em; }
.control-row strong .over {
  margin-left: 3px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted-2);
  font: 7px/1 var(--sans);
  text-decoration: none;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}
.control-row small { color: var(--muted-2); font-size: 9px; }

.logic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 58px;
  height: 29px;
  flex: none;
  border: 1px solid rgba(244, 185, 66, 0.25);
  border-radius: 7px;
  background: rgba(244, 185, 66, 0.06);
  color: var(--amber);
  font: 600 11px/1 var(--mono);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.logic-btn i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px rgba(244, 185, 66, 0.7); }
.logic-btn:hover { background: rgba(244, 185, 66, 0.1); }
.logic-btn.is-low {
  border-color: rgba(255, 122, 122, 0.3);
  background: rgba(255, 122, 122, 0.07);
  color: var(--red);
}
.logic-btn.is-low i { background: var(--red); box-shadow: 0 0 7px rgba(255, 122, 122, 0.7); }

.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.data-row > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.data-row strong { color: var(--text); font: 600 11px/1.2 var(--mono); letter-spacing: 0.04em; }
.data-row small { color: var(--muted-2); font-size: 9px; }
.data-control { display: flex; align-items: center; gap: 10px; }
.data-control output { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(244, 185, 66, 0.22); border-radius: 6px; color: var(--amber); font: 600 11px/1 var(--mono); }
input[type="range"] {
  width: 116px;
  height: 3px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber) 33%, #28333e 33%, #28333e 100%);
  accent-color: var(--amber);
}
input[type="range"]::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  appearance: none;
  border: 2px solid #101820;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 1px rgba(244, 185, 66, 0.5), 0 0 10px rgba(244, 185, 66, 0.35);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 2px solid #101820;
  border-radius: 50%;
  background: var(--amber);
  cursor: pointer;
}

.clock-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.clock-row .btn { min-height: 36px; padding: 9px 12px; font-size: 11px; }
.lab-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font: 9.5px/1.4 var(--mono);
}
.lab-status i { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--teal); box-shadow: 0 0 7px rgba(84, 214, 199, 0.55); }
.lab-status.is-hold i { background: var(--amber); box-shadow: 0 0 7px rgba(244, 185, 66, 0.55); }
.lab-status.is-clear i { background: var(--red); box-shadow: 0 0 7px rgba(255, 122, 122, 0.55); }

.lab-output {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  padding: 22px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(rgba(84, 214, 199, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 214, 199, 0.025) 1px, transparent 1px),
    radial-gradient(70% 55% at 50% 38%, rgba(84, 214, 199, 0.07), transparent 72%),
    #080d12;
  background-size: 26px 26px, 26px 26px, auto, auto;
}
.lab-output-head {
  position: absolute;
  top: 15px;
  left: 17px;
  right: 17px;
  display: flex;
  justify-content: space-between;
  color: #3f4e5c;
  font: 8px/1 var(--mono);
  letter-spacing: 0.12em;
}
.seven-seg-large { width: 152px; height: 250px; }
.bit-row-large { gap: 13px; margin-top: 18px; padding: 10px 13px; }
.bit-row-large .bit i { width: 8px; height: 8px; }
.bit-row-large .bit span { font-size: 8px; }
.rco-line { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: var(--muted-2); font: 9px/1 var(--mono); letter-spacing: 0.05em; }
.rco-line b { color: var(--muted); font-weight: 600; }
.rco-line i { width: 6px; height: 6px; border-radius: 50%; background: #28333e; transition: background 0.15s ease, box-shadow 0.15s ease; }
.rco-line i.on { background: var(--amber); box-shadow: 0 0 9px rgba(244, 185, 66, 0.8); }
.lab-output-note { max-width: 280px; margin: 13px 18px 0; color: var(--muted-2); font-size: 8.5px; line-height: 1.6; text-align: center; }
[hidden] { display: none !important; }
.lab-footnote { margin: 12px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.7; }

.lab-shell.is-pulsing { animation: shellPulse 0.34s ease; }
@keyframes shellPulse {
  0% { box-shadow: 0 0 0 0 rgba(84, 214, 199, 0.18); }
  100% { box-shadow: 0 0 0 12px rgba(84, 214, 199, 0); }
}

/* --------------------------------------------------------------------------
   Truth table
   -------------------------------------------------------------------------- */
.truth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 14px;
}
.truth-panel { padding: 22px 22px 18px; }
.truth-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.truth-head h3 { margin: 5px 0 0; font-size: 16px; font-weight: 600; }
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 7px 9px;
  border: 1px solid rgba(84, 214, 199, 0.18);
  border-radius: 6px;
  background: rgba(84, 214, 199, 0.04);
  color: var(--teal);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.05em;
}
.truth-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.truth-table th,
.truth-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font: 10px/1.3 var(--mono);
}
.truth-table th { color: var(--muted-2); font-weight: 600; font-size: 9px; letter-spacing: 0.04em; background: rgba(0, 0, 0, 0.12); }
.truth-table td { color: #c3cfdb; }
.truth-table tr:last-child td { border-bottom: 0; }
.truth-table tr:hover td { background: rgba(255, 255, 255, 0.015); }
.action-cell { min-width: 155px; }
.truth-table select {
  width: 100%;
  min-width: 112px;
  padding: 7px 25px 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 12px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 8px) 50% / 5px 5px no-repeat,
    #0b1219;
  color: var(--text);
  font: 10px/1 var(--sans);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.truth-table select:hover { border-color: rgba(255, 255, 255, 0.24); }
.truth-table select.correct { border-color: rgba(110, 231, 160, 0.48); background-color: rgba(110, 231, 160, 0.06); color: var(--green); }
.truth-table select.wrong { border-color: rgba(255, 122, 122, 0.48); background-color: rgba(255, 122, 122, 0.06); color: var(--red); }
.answer-hint { display: block; margin-top: 4px; color: var(--red); font-size: 8px; line-height: 1.4; text-align: center; }
.truth-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.truth-actions .btn { min-height: 35px; padding: 9px 12px; font-size: 11px; }
.truth-msg { color: var(--muted); font-size: 10px; line-height: 1.4; }

.cheat-card {
  position: relative;
  padding: 23px 22px;
  border-color: rgba(244, 185, 66, 0.16);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(244, 185, 66, 0.06), transparent 60%),
    rgba(244, 185, 66, 0.018);
}
.cheat-card h3 { margin: 7px 0 18px; font-size: 20px; font-weight: 650; letter-spacing: -0.03em; }
.rule-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rule-list li { display: flex; gap: 11px; padding: 13px 0; border-top: 1px solid rgba(244, 185, 66, 0.11); }
.rule-list b { flex: none; padding-top: 2px; color: var(--amber); font: 600 9px/1 var(--mono); letter-spacing: 0.06em; }
.rule-list span { color: var(--muted); font-size: 11px; line-height: 1.7; }
.rule-list em { color: #d8c196; font-style: normal; font-family: var(--mono); font-size: 10px; }
.mini-note {
  margin-top: 15px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.13);
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.project-section { padding-bottom: 100px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.project-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.18); }
.project-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 126px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #0b1118;
  background-size: 22px 22px;
  overflow: hidden;
}
.project-visual small { position: absolute; right: 12px; bottom: 9px; color: #3e4d5b; font: 7px/1 var(--mono); letter-spacing: 0.1em; }
.visual-counter { gap: 7px; }
.visual-counter span {
  display: grid;
  place-items: center;
  width: 55px;
  height: 72px;
  border: 1px solid #293744;
  border-radius: 7px;
  background: #070b0f;
  color: var(--teal);
  font: 600 30px/1 var(--mono);
  text-shadow: 0 0 16px rgba(84, 214, 199, 0.33);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.6);
}
.visual-counter i { color: var(--amber); font: 600 18px/1 var(--mono); font-style: normal; }
.visual-clock .clock-face {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 15px 17px;
  border: 1px solid #293744;
  border-radius: 10px;
  background: #070b0f;
  color: var(--amber);
  font: 600 25px/1 var(--mono);
  text-shadow: 0 0 16px rgba(244, 185, 66, 0.3);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.6);
}
.visual-clock .clock-face small { position: static; color: #637383; font: 600 14px/1 var(--mono); }
.visual-clock > small { right: 12px; bottom: 9px; }
.visual-traffic { gap: 11px; }
.visual-traffic i { width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50%; background: #101820; }
.visual-traffic i.red { background: #ff6d6d; box-shadow: 0 0 22px rgba(255, 109, 109, 0.35); }
.visual-traffic i.amber { background: #3a3020; }
.visual-traffic i.green { background: #2c4136; }
.project-body { padding: 17px 18px 18px; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.03em; }
.project-meta .level { color: var(--amber); letter-spacing: 0.12em; }
.project-body h3 { margin: 0 0 7px; font-size: 17px; font-weight: 650; letter-spacing: -0.025em; }
.project-body p { margin: 0 0 13px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.project-state { display: inline-block; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted-2); font: 7.5px/1 var(--mono); letter-spacing: 0.06em; }

.next-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 0.7fr));
  gap: 0;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(120deg, rgba(244, 185, 66, 0.035), transparent 35%),
    rgba(255, 255, 255, 0.014);
  overflow: hidden;
}
.next-intro { padding: 20px 22px; border-right: 1px solid var(--line); }
.next-intro h3 { margin: 5px 0 4px; font-size: 17px; font-weight: 650; letter-spacing: -0.03em; }
.next-intro p { margin: 0; color: var(--muted-2); font-size: 10px; }
.next-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 17px 16px;
  border-right: 1px solid var(--line);
  transition: background 0.2s ease;
}
.next-item:last-child { border-right: 0; }
.next-item:hover { background: rgba(255, 255, 255, 0.035); }
.next-item > span { color: var(--amber); font: 8px/1 var(--mono); }
.next-item strong { color: var(--text); font-size: 11px; font-weight: 600; }
.next-item small { color: var(--muted-2); font-size: 8px; line-height: 1.5; }
.next-item.is-planned { opacity: 0.5; cursor: default; }
.next-item.is-planned:hover { background: transparent; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(120px, 0.55fr));
  gap: 38px;
  padding: 46px 0 38px;
}
.footer-brand p { max-width: 330px; margin: 15px 0 0; color: var(--muted-2); font-size: 10.5px; line-height: 1.8; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col > span { margin-bottom: 4px; color: var(--amber); font: 8px/1 var(--mono); letter-spacing: 0.1em; }
.footer-col a { color: var(--muted); font-size: 10.5px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-meta p { margin: 0; color: var(--muted-2); font-size: 10px; line-height: 1.8; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 18px;
  border-top: 1px solid var(--line);
  color: #4d5c6a;
  font: 8px/1 var(--mono);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
body.js-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
.hero .bench-card.reveal { transition-delay: 0.08s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  body.js-ready .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr); gap: 34px; }
  .hero-stats { gap: 20px; }
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip-workbench { grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); }
  .next-panel { grid-template-columns: 1.3fr repeat(3, minmax(0, 0.7fr)); }
}

@media (max-width: 860px) {
  .wrap,
  .topbar-inner { width: min(100% - 36px, 700px); }
  .topbar-inner { gap: 14px; }
  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 12, 17, 0.98);
    backdrop-filter: blur(18px);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 10px; font-size: 13px; }
  .nav a.is-active::after { left: 10px; right: auto; width: 18px; bottom: 7px; }
  .menu-btn { display: block; }
  .top-actions { margin-left: auto; }
  .series-badge { display: none; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 640px; }
  .bench-card { justify-self: start; max-width: 560px; }
  .section { padding: 74px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
  .section-head > p { max-width: 590px; }
  .chip-workbench { grid-template-columns: 1fr; }
  .pin-detail { min-height: 0; }
  .lab-shell { grid-template-columns: 1fr; }
  .lab-output { min-height: 370px; border-top: 1px solid var(--line); border-left: 0; }
  .seven-seg-large { width: 128px; height: 210px; }
  .truth-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .project-visual { height: 140px; }
  .next-panel { grid-template-columns: 1fr 1fr; }
  .next-intro { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .next-item:nth-child(4) { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .wrap,
  .topbar-inner { width: calc(100% - 32px); }
  .topbar-inner { height: 62px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 9px; }
  .top-actions .btn { display: none; }
  .nav { top: 62px; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(38px, 12vw, 54px); }
  .lede { font-size: 13.5px; }
  .hero-stats { gap: 16px 24px; }
  .hero-stats strong { font-size: 17px; }
  .hero-stats span { font-size: 9px; }
  .bench-body { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 16px 14px; }
  .mini-chip { width: 88px; height: 156px; }
  .mini-chip strong { font-size: 9px; }
  .mini-chip small { font-size: 6.5px; }
  .seven-seg { width: 88px; height: 145px; }
  .seg-panel { padding: 8px 8px 6px; }
  .bench-controls { flex-wrap: wrap; padding: 11px 14px 13px; }
  .bench-hint { width: 100%; margin: 2px 0 0; }
  .section { padding: 62px 0; }
  .map-grid { grid-template-columns: 1fr; }
  .module-card { padding: 20px 18px 18px; }
  .module-card p { min-height: 0; }
  .chip-panel { padding: 16px 12px 14px; }
  .chip-panel-head { padding-inline: 5px; }
  .chip-board { grid-template-columns: minmax(48px, 1fr) 104px minmax(48px, 1fr); min-height: 350px; }
  .chip-body { margin: 4px 0; }
  .chip-body strong { font-size: 10px; }
  .chip-body small { font-size: 6px; }
  .chip-body .chip-body-foot { display: none; }
  .pin { gap: 2px; padding: 1px 2px; }
  .pin-label { min-width: 26px; font-size: 8px; }
  .pin-num { width: 9px; font-size: 6.5px; }
  .pin-lead { width: 8px; }
  .pin-legend { gap: 9px; }
  .pin-detail { padding: 19px 17px 17px; }
  .lab-controls { padding: 18px 16px 16px; }
  .data-control input { width: 88px; }
  .lab-output { min-height: 340px; }
  .seven-seg-large { width: 112px; height: 184px; }
  .truth-panel { padding: 18px 14px 16px; }
  .truth-actions { flex-wrap: wrap; }
  .truth-msg { width: 100%; }
  .cheat-card { padding: 20px 18px; }
  .next-panel { grid-template-columns: 1fr; }
  .next-intro { border-bottom: 1px solid var(--line); }
  .next-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .next-item:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 34px 0 28px; }
  .footer-meta { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

/* --------------------------------------------------------------------------
   Wiring lab
   -------------------------------------------------------------------------- */
.wiring-section {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(720px 380px at 18% 22%, rgba(244, 185, 66, 0.045), transparent 70%),
    rgba(255, 255, 255, 0.008);
}
.wiring-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  align-items: start;
}
.wiring-panel {
  min-width: 0;
  padding: 20px 22px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 38%),
    #0f1821;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}
.wiring-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.wiring-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wiring-title h3,
.wiring-guide h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.wiring-progress {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex: none;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}
.wiring-progress span { color: var(--muted-2); font: 8px/1 var(--mono); letter-spacing: 0.08em; }
.wiring-progress strong { color: var(--amber); font: 650 14px/1 var(--mono); letter-spacing: -0.02em; }

.wiring-scroll {
  margin-top: 6px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #2c3a47 transparent;
  scrollbar-width: thin;
}
.wiring-scroll::-webkit-scrollbar { height: 6px; }
.wiring-scroll::-webkit-scrollbar-track { background: transparent; }
.wiring-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: #2c3a47; }

.wiring-board {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(280px, 1fr) 220px;
  gap: 20px;
  align-items: center;
  min-width: 730px;
  padding: 18px 8px 20px;
}
.wiring-wires {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.wiring-wires .wire {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  opacity: 0.9;
  pointer-events: stroke;
  cursor: pointer;
  transition: stroke-width 0.15s ease, opacity 0.15s ease;
}
.wiring-wires .wire:hover { stroke-width: 3.4; opacity: 1; }

.wiring-sources,
.wiring-targets {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.wiring-sources { align-self: center; }
.wiring-targets { align-self: center; }
.wiring-col-label {
  margin-bottom: 2px;
  color: var(--muted-2);
  font: 600 8px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wire-terminal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.wire-terminal:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}
.wire-terminal.is-active {
  border-color: rgba(244, 185, 66, 0.65);
  background: rgba(244, 185, 66, 0.085);
  box-shadow: 0 0 0 2px rgba(244, 185, 66, 0.13), 0 0 22px rgba(244, 185, 66, 0.12);
}
.terminal-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-2);
}
.wire-terminal[data-terminal="vcc"] .terminal-dot,
.wire-terminal[data-terminal="vccR"] .terminal-dot {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 185, 66, 0.7);
}
.wire-terminal[data-terminal="gnd"] .terminal-dot { background: #8b99a9; box-shadow: 0 0 8px rgba(139, 153, 169, 0.45); }
.wire-terminal[data-terminal="clk"] .terminal-dot { background: var(--teal); box-shadow: 0 0 8px rgba(84, 214, 199, 0.65); }
.wire-terminal[data-terminal="rco"] .terminal-dot { background: var(--purple); box-shadow: 0 0 8px rgba(185, 162, 255, 0.55); }
.terminal-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.terminal-copy strong { font: 650 11px/1 var(--mono); letter-spacing: 0.04em; }
.terminal-copy small { color: var(--muted-2); font-size: 8.5px; line-height: 1.25; white-space: nowrap; }
.terminal-port {
  width: 11px;
  height: 11px;
  flex: none;
  margin-left: auto;
  border: 2px solid #4e5d6b;
  border-radius: 50%;
  background: #0a1118;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.wire-terminal[data-terminal="vcc"] .terminal-port,
.wire-terminal[data-terminal="vccR"] .terminal-port { border-color: var(--amber); }
.wire-terminal[data-terminal="gnd"] .terminal-port { border-color: #8b99a9; }
.wire-terminal[data-terminal="clk"] .terminal-port { border-color: var(--teal); }
.wire-terminal[data-terminal="rco"] .terminal-port { border-color: var(--purple); }
.wire-terminal.is-active .terminal-port {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.14), 0 0 12px rgba(244, 185, 66, 0.65);
}
.wiring-targets .terminal-port { order: -1; margin-left: 0; }

.wiring-key { display: flex; flex-wrap: wrap; gap: 8px; padding: 3px 2px 0; }
.wiring-key span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); font: 7.5px/1 var(--mono); }
.wiring-key .dot { width: 4px; height: 4px; }

.wiring-chip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: stretch;
  min-height: 392px;
}
.wiring-pins {
  display: grid;
  grid-template-rows: repeat(8, minmax(42px, 1fr));
  gap: 2px;
  min-width: 0;
}
.wire-pin {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 100%;
  padding: 2px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.wire-pin-left { justify-content: flex-end; }
.wire-pin-right { justify-content: flex-start; }
.wire-pin .pin-name { min-width: 34px; color: var(--muted); font: 9px/1 var(--mono); white-space: nowrap; }
.wire-pin-left .pin-name { order: 1; text-align: right; }
.wire-pin-left .pin-no { order: 2; }
.wire-pin-left .terminal-port { order: 3; }
.wire-pin-right .terminal-port { order: 1; }
.wire-pin-right .pin-no { order: 2; }
.wire-pin-right .pin-name { order: 3; text-align: left; }
.wire-pin .pin-no { width: 13px; flex: none; color: var(--muted-2); font: 7.5px/1 var(--mono); text-align: center; }
.wire-pin .terminal-port { width: 10px; height: 10px; margin: 0; }
.wire-pin[data-kind="power"] .pin-name { color: #d99494; }
.wire-pin[data-kind="output"] .pin-name { color: #8fcfa7; }
.wire-pin[data-kind="clock"] .pin-name { color: #d6b877; }
.wire-pin[data-kind="control"] .pin-name { color: #b6a8e3; }
.wire-pin[data-kind="input"] .pin-name { color: #93b0e5; }
.wire-pin[data-kind="power"] .terminal-port { border-color: var(--red); }
.wire-pin[data-kind="output"] .terminal-port { border-color: var(--green); }
.wire-pin[data-kind="clock"] .terminal-port { border-color: var(--amber); }
.wire-pin[data-kind="control"] .terminal-port { border-color: var(--purple); }
.wire-pin[data-kind="input"] .terminal-port { border-color: var(--blue); }
.wire-pin:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.wire-pin.is-unused { opacity: 0.42; }
.wire-pin.is-connected { background: rgba(244, 185, 66, 0.075); }
.wire-pin.is-connected .terminal-port {
  background: #111a22;
  box-shadow: 0 0 0 2px rgba(244, 185, 66, 0.18), 0 0 9px rgba(244, 185, 66, 0.35);
}
.wire-pin.is-missing {
  background: rgba(255, 122, 122, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 122, 0.28);
}
.wire-pin.is-missing .terminal-port { border-color: var(--red); }
.wire-pin.is-optional .pin-name { color: #b9a2ff; }

.wiring-chip-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px 0;
  border: 1px solid #3b4957;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #2a3541 0%, #1b242e 50%, #111820 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -24px 38px rgba(0, 0, 0, 0.22),
    0 22px 44px rgba(0, 0, 0, 0.3);
}
.chip-notch {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 34px;
  height: 17px;
  transform: translateX(-50%);
  border: 1px solid #3b4957;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--panel);
}
.wiring-chip-body::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 185, 66, 0.65);
}
.wiring-chip-body strong { color: #e1eaf3; font: 650 14px/1 var(--mono); letter-spacing: 0.05em; }
.wiring-chip-body small { color: #718294; font: 7px/1.55 var(--mono); letter-spacing: 0.16em; text-align: center; }
.wiring-chip-body .chip-foot { color: #566675; font: 6.5px/1 var(--mono); letter-spacing: 0.1em; }

.wiring-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
}
.wiring-readout-label { align-self: flex-start; color: #3f4e5c; font: 8px/1 var(--mono); letter-spacing: 0.12em; }
.wiring-seven { width: 96px; height: 160px; }
.wiring-bits { gap: 8px; padding: 6px 8px; }
.wiring-bits .bit i { width: 6px; height: 6px; }
.wiring-bits .bit span { font-size: 7px; }
.wiring-rco { margin-top: 0; }
.wiring-rco.is-off { opacity: 0.5; }
.wiring-rco.is-on b { color: var(--amber); }

.wiring-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.wiring-actions .btn { min-height: 36px; padding: 9px 13px; font-size: 11px; }
.wiring-actions .btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.wiring-tip { margin-left: auto; color: var(--muted-2); font: 8px/1.5 var(--mono); }

.wiring-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 37px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font: 9.5px/1.45 var(--mono);
}
.wiring-status i {
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 7px rgba(84, 214, 199, 0.55);
}
.wiring-status.is-warn i { background: var(--amber); box-shadow: 0 0 7px rgba(244, 185, 66, 0.55); }
.wiring-status.is-error i { background: var(--red); box-shadow: 0 0 7px rgba(255, 122, 122, 0.55); }
.wiring-status.is-ok i { background: var(--green); box-shadow: 0 0 7px rgba(110, 231, 160, 0.55); }

.wiring-guide {
  min-width: 0;
  padding: 21px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 40%),
    rgba(255, 255, 255, 0.016);
}
.wiring-guide h3 { margin: 6px 0 13px; }
.wiring-guide ol { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.wiring-guide li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.wiring-guide li > span { color: var(--amber); font: 600 9px/1.45 var(--mono); }
.wiring-guide li strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 10.5px; font-weight: 650; }
.wiring-guide li p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.wiring-guide-note {
  margin: 12px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(244, 185, 66, 0.16);
  border-radius: 7px;
  background: rgba(244, 185, 66, 0.04);
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.7;
}

@media (max-width: 1040px) {
  .wiring-layout { grid-template-columns: 1fr; }
  .wiring-guide ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .wiring-guide li:nth-child(1),
  .wiring-guide li:nth-child(2) { border-top: 0; }
}
@media (max-width: 860px) {
  .wiring-panel { padding: 17px 16px 15px; }
  .wiring-board { min-width: 760px; }
  .wiring-tip { width: 100%; margin-left: 0; }
}
@media (max-width: 620px) {
  .wiring-panel { padding: 14px 10px 12px; }
  .wiring-top { gap: 9px; }
  .wiring-title h3 { font-size: 13px; }
  .wiring-progress { padding: 6px 7px; }
  .wiring-progress strong { font-size: 12px; }
  .wiring-board { min-width: 740px; padding-inline: 4px; }
  .wiring-actions .btn { flex: 1 1 auto; }
  .wiring-guide { padding: 18px 16px 15px; }
  .wiring-guide ol { grid-template-columns: 1fr; }
  .wiring-guide li:nth-child(2) { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .wire-terminal,
  .wire-pin,
  .wire-terminal .terminal-port,
  .wiring-wires .wire { transition: none; }
}

/* ---------- timing diagram ---------- */
.timing-panel {
  min-width: 0;
  margin-top: 24px;
  padding: 22px 22px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(84, 214, 199, 0.045), transparent 42%),
    rgba(16, 25, 35, 0.72);
}
.timing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.timing-head > div:first-child { min-width: 0; }
.timing-head h3 {
  margin: 7px 0 6px;
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.25;
}
.timing-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.timing-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
}
.timing-actions .btn {
  min-height: 36px;
  padding: 9px 13px;
  font-size: 11px;
}
.timing-stage {
  min-width: 0;
  max-width: 100%;
  margin-top: 17px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 8, 12, 0.48);
  scrollbar-width: thin;
}
#timingSvg {
  width: 100%;
  min-width: 760px;
  height: auto;
}
.timing-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  color: var(--muted);
  font: 10px/1.6 var(--mono);
}
.timing-legend {
  display: flex;
  flex: none;
  align-items: center;
  color: var(--muted-2);
  font: 9px/1.5 var(--mono);
  letter-spacing: 0.05em;
}
.timing-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin: 0 6px 0 12px;
}
.timing-legend i:first-child { margin-left: 0; }
.timing-legend .lg-clk { background: var(--teal); }
.timing-legend .lg-bit { background: var(--amber); }
.timing-legend .lg-rco { background: var(--purple); }

.t-grid { stroke: rgba(255, 255, 255, 0.045); stroke-width: 1; }
.t-rowline { stroke: rgba(255, 255, 255, 0.035); stroke-width: 1; }
.t-axis { stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.t-edge { stroke: rgba(244, 185, 66, 0.14); stroke-width: 1; stroke-dasharray: 3 6; }
.t-edge-label {
  fill: var(--muted-2);
  font: 9px var(--mono);
  letter-spacing: 0.06em;
  text-anchor: middle;
}
.t-edge-label.is-active { fill: var(--amber); font-weight: 700; }
.t-label {
  fill: var(--muted);
  font: 10px var(--mono);
  letter-spacing: 0.08em;
}
.t-clk { fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linejoin: round; }
.t-bit { fill: none; stroke: var(--amber); stroke-width: 1.4; stroke-linejoin: round; opacity: 0.9; }
.t-rco { fill: none; stroke: var(--purple); stroke-width: 1.8; stroke-linejoin: round; }
.t-playhead { stroke: var(--amber); stroke-width: 1.2; opacity: 0.75; }
.t-playhead-dot { fill: var(--amber); }

@media (max-width: 860px) {
  .timing-panel { padding: 17px 16px 14px; }
  .timing-head { display: block; }
  .timing-actions { margin-top: 12px; }
  #timingSvg { min-width: 720px; }
}
@media (max-width: 620px) {
  .timing-panel { padding: 14px 10px 12px; }
  .timing-head h3 { font-size: 17px; }
  .timing-head p { font-size: 11px; }
  .timing-actions .btn { flex: 1 1 auto; }
  .timing-foot { display: block; }
  .timing-legend { margin-top: 7px; }
}

/* --------------------------------------------------------------------------
   Interactive primer
   -------------------------------------------------------------------------- */
.demo-kicker {
  display: block;
  margin: 0 0 6px;
  color: var(--amber);
  font: 9px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.primer-panel {
  position: relative;
  margin-top: 18px;
  padding: 22px;
  scroll-margin-top: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(520px 200px at 8% 0%, rgba(244, 185, 66, 0.055), transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.028), transparent 44%),
    #0c141c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.primer-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(244, 185, 66, 0.7), rgba(84, 214, 199, 0.18), transparent 72%);
}
.primer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 0 2px 17px;
  border-bottom: 1px solid var(--line);
}
.primer-head h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.primer-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}
.primer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.primer-card {
  position: relative;
  min-width: 0;
  padding: 17px 17px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.017);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.primer-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.023);
}
.primer-card.is-pulse { animation: primerPulse 0.5s ease; }
@keyframes primerPulse {
  0% { box-shadow: 0 0 0 0 rgba(84, 214, 199, 0.22); }
  100% { box-shadow: 0 0 0 14px rgba(84, 214, 199, 0); }
}
.primer-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.primer-card-head span {
  color: var(--muted-2);
  font: 8.5px/1 var(--mono);
  letter-spacing: 0.09em;
}
.primer-card-head strong { font-size: 15px; font-weight: 600; }
.dff-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 22px 0 17px;
}
.dff-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  max-width: 118px;
  height: 90px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 60%),
    #0a1219;
}
.dff-node small { color: var(--muted-2); font: 9px/1 var(--mono); letter-spacing: 0.1em; }
.dff-node b { margin-top: 7px; color: var(--amber); font: 33px/1 var(--mono); }
.dff-node.dff-q { border-color: rgba(84, 214, 199, 0.26); }
.dff-node.dff-q b { color: var(--teal); }
.dff-arrow { color: var(--amber); font-size: 20px; line-height: 1; }
.demo-led {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27333e;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.demo-led.is-on {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(244, 185, 66, 0.9);
}
.primer-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.primer-controls .btn { flex: 0 1 auto; }
.primer-hint {
  min-height: 43px;
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.mod-track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 25px 0 17px;
}
.mod-node {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font: 11px/1 var(--mono);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.mod-node.is-on {
  border-color: var(--teal);
  background: var(--teal);
  color: #07110f;
  box-shadow: 0 0 24px rgba(84, 214, 199, 0.35);
}
.mod-track i { color: #45535f; font: 10px/1 var(--mono); font-style: normal; }
.mod-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
}
.mod-readout > div { display: flex; align-items: baseline; gap: 8px; }
.mod-readout b { color: var(--teal); font: 27px/1 var(--mono); }
.mod-readout small { color: var(--muted-2); font-size: 9px; }

/* --------------------------------------------------------------------------
   Cascaded project lab
   -------------------------------------------------------------------------- */
.project-lab {
  position: relative;
  margin-bottom: 16px;
  padding: 22px;
  scroll-margin-top: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(620px 240px at 50% 0%, rgba(84, 214, 199, 0.035), transparent 72%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.028), transparent 46%),
    #0c141c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.project-lab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 15px;
  border-bottom: 1px solid var(--line);
}
.project-lab-head h3 {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.project-lab-head p { max-width: 650px; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.project-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 4px 7px;
  border: 1px solid rgba(84, 214, 199, 0.2);
  border-radius: 4px;
  color: var(--teal);
  font: 8px/1 var(--mono);
  letter-spacing: 0.1em;
}
.project-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(84, 214, 199, 0.8);
}
.project-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px 8px 16px;
  border-radius: 14px;
  background: radial-gradient(58% 120% at 50% 22%, rgba(84, 214, 199, 0.04), transparent 72%);
  transition: background 0.25s ease;
}
.stage-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 14px 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.028), transparent 55%),
    #091119;
}
.stage-chip-label { color: var(--muted-2); font: 8.5px/1 var(--mono); letter-spacing: 0.08em; }
.stage-chip small { color: var(--muted-2); font: 8.5px/1.4 var(--mono); text-align: center; }
.project-seven { width: 118px; height: 197px; flex: none; }
.stage-carry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted-2);
  font: 8px/1 var(--mono);
  letter-spacing: 0.06em;
}
.stage-carry b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font: 12px/1 var(--mono);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stage-carry i {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.stage-carry small { max-width: 64px; text-align: center; font-size: 7.5px; line-height: 1.4; }
.stage-carry.is-hot b {
  border-color: var(--amber);
  background: var(--amber);
  color: #08110f;
  box-shadow: 0 0 22px rgba(244, 185, 66, 0.42);
}
.stage-carry.is-hot i {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(244, 185, 66, 0.55);
}
.project-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.project-status {
  flex: 1 1 280px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.project-status.is-alert { color: var(--amber); }
.project-recipe {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}
.project-recipe .demo-kicker { flex: none; margin: 1px 0 0; }
.project-recipe ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  margin: 0;
  padding-left: 15px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.55;
}
.project-lab.is-overflow .project-stage { animation: projectOverflow 0.6s ease; }
@keyframes projectOverflow {
  0%, 100% { background-color: transparent; }
  45% { background-color: rgba(244, 185, 66, 0.09); }
}

/* --------------------------------------------------------------------------
   Checkpoint quiz
   -------------------------------------------------------------------------- */
.quiz-panel {
  position: relative;
  margin-top: 16px;
  padding: 22px;
  scroll-margin-top: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(520px 220px at 92% 0%, rgba(244, 185, 66, 0.04), transparent 72%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.025), transparent 46%),
    #0c141c;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}
.quiz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px 15px;
  border-bottom: 1px solid var(--line);
}
.quiz-head h3 {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.quiz-head p { max-width: 660px; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.quiz-head .score-pill { border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.quiz-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.quiz-item {
  min-width: 0;
  margin: 0;
  padding: 14px 15px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.014);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.quiz-item:nth-child(5) { grid-column: 1 / -1; }
.quiz-item legend {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.quiz-num { flex: none; padding-top: 2px; color: var(--amber); font: 9px/1 var(--mono); letter-spacing: 0.06em; }
.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.quiz-option:hover { border-color: rgba(255, 255, 255, 0.18); color: var(--text); }
.quiz-option:has(input:checked) {
  border-color: rgba(244, 185, 66, 0.45);
  background: rgba(244, 185, 66, 0.055);
  color: var(--text);
}
.quiz-option input { flex: none; margin: 2px 0 0; accent-color: var(--amber); }
.quiz-option span { min-width: 0; }
.quiz-item.is-correct { border-color: rgba(84, 214, 199, 0.36); }
.quiz-item.is-wrong { border-color: rgba(240, 120, 120, 0.32); }
.quiz-item.is-revealed .quiz-option.is-answer {
  border-color: rgba(84, 214, 199, 0.42);
  background: rgba(84, 214, 199, 0.055);
  color: var(--text);
}
.quiz-item.is-revealed .quiz-option.is-picked-wrong {
  border-color: rgba(240, 120, 120, 0.4);
  background: rgba(240, 120, 120, 0.055);
}
.quiz-explain {
  display: none;
  margin: 10px 0 0;
  padding: 9px 11px;
  border-left: 2px solid var(--teal);
  background: rgba(84, 214, 199, 0.045);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.quiz-item.is-revealed .quiz-explain { display: block; }
.quiz-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.quiz-msg { color: var(--muted-2); font-size: 10.5px; line-height: 1.5; }

a.module-status { text-decoration: none; transition: color 0.2s ease, border-color 0.2s ease; }
a.module-status:hover { color: var(--amber); border-color: rgba(244, 185, 66, 0.3); }

@media (max-width: 860px) {
  .primer-panel, .project-lab, .quiz-panel { padding: 18px; }
  .primer-head, .project-lab-head, .quiz-head { flex-direction: column; align-items: flex-start; gap: 9px; }
  .primer-head > p, .project-lab-head p, .quiz-head p { max-width: none; }
  .primer-grid { grid-template-columns: 1fr; }
  .quiz-list { grid-template-columns: 1fr; }
  .quiz-item:nth-child(5) { grid-column: auto; }
  .project-stage { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 620px) {
  .primer-panel, .project-lab, .quiz-panel { padding: 15px 13px; border-radius: 14px; }
  .primer-head h3, .project-lab-head h3, .quiz-head h3 { font-size: 19px; }
  .primer-head { padding-bottom: 13px; }
  .primer-card { padding: 14px 12px 12px; }
  .dff-stage { gap: 9px; padding: 19px 0 14px; }
  .dff-node { height: 78px; border-radius: 10px; }
  .dff-node b { font-size: 28px; }
  .dff-arrow { font-size: 16px; }
  .primer-controls .btn { flex: 1 1 auto; }
  .mod-track { gap: 3px; padding: 21px 0 15px; }
  .mod-node { width: 33px; height: 33px; font-size: 10px; }
  .mod-track i { font-size: 9px; }
  .mod-readout b { font-size: 23px; }
  .project-lab-head { padding-bottom: 13px; }
  .project-live { display: none; }
  .project-stage { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 5px; padding: 16px 0 12px; }
  .stage-chip { gap: 5px; padding: 9px 4px 8px; border-radius: 10px; }
  .stage-chip-label { font-size: 7.5px; letter-spacing: 0.03em; }
  .stage-chip small { font-size: 7.5px; }
  .project-seven { width: 70px; height: 117px; }
  .stage-carry { gap: 4px; }
  .stage-carry b { width: 28px; height: 28px; font-size: 10px; }
  .stage-carry i { height: 14px; }
  .stage-carry small { max-width: 48px; font-size: 7px; }
  .project-controls .btn { flex: 1 1 auto; }
  .project-status { flex-basis: 100%; }
  .project-recipe { flex-direction: column; gap: 7px; padding: 10px 11px; }
  .project-recipe ol { flex-direction: column; gap: 4px; padding-left: 14px; }
  .quiz-head .score-pill { align-self: flex-start; }
  .quiz-item { padding: 12px 11px; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-actions { flex-wrap: wrap; }
  .quiz-msg { flex-basis: 100%; }
}

/* --------------------------------------------------------------------------
   v1.1: micro lessons, mod-N designer, sync/async, progress notebook
   -------------------------------------------------------------------------- */
.lesson-deck {
  margin-top: 16px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.lesson-deck-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.lesson-deck-head h4 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.025em;
}
.lesson-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lesson-tab {
  min-width: 82px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.lesson-tab:hover { color: var(--text); border-color: var(--line-strong); }
.lesson-tab.is-active {
  border-color: rgba(244, 185, 66, 0.42);
  background: rgba(244, 185, 66, 0.075);
  color: var(--amber-2);
}
.lesson-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  gap: 24px;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 21, 0.56);
}
.lesson-panel[hidden] { display: none; }
.lesson-index {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font: 9px var(--mono);
  letter-spacing: 0.14em;
}
.lesson-copy h5 {
  margin: 0 0 7px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.lesson-copy p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
}
.lesson-points {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lesson-points li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.lesson-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}
.lesson-points b { color: var(--text); font-weight: 600; }
.lesson-aside {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.lesson-formula {
  padding: 12px 13px;
  border: 1px solid rgba(244, 185, 66, 0.24);
  border-radius: 10px;
  background: rgba(244, 185, 66, 0.05);
}
.lesson-formula span {
  display: block;
  color: var(--amber);
  font: 8.5px var(--mono);
  letter-spacing: 0.12em;
}
.lesson-formula strong {
  display: block;
  margin: 3px 0 2px;
  color: var(--text);
  font: 600 19px/1.35 var(--sans);
}
.lesson-formula small { color: var(--muted-2); font-size: 9.5px; }
.lesson-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.lesson-table th,
.lesson-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.lesson-table th {
  color: var(--muted-2);
  font: 8.5px var(--mono);
  letter-spacing: 0.08em;
}
.lesson-table td { color: var(--muted); }
.lesson-table td:last-child { color: var(--teal); }
.state-loop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.state-loop span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(84, 214, 199, 0.3);
  border-radius: 50%;
  color: var(--teal);
  font: 10px var(--mono);
}
.state-loop span:first-child {
  background: rgba(84, 214, 199, 0.16);
  color: #d9fffa;
}
.state-loop i { color: var(--muted-2); font-style: normal; font-size: 9px; }
.edge-diagram {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font: 9px var(--mono);
}
.edge-diagram i {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), rgba(84, 214, 199, 0.15));
}
.edge-diagram i::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  border-left: 6px solid var(--teal);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}
.edge-diagram b { color: var(--amber); font-size: 15px; }
.edge-diagram small { grid-column: 1 / -1; color: var(--muted-2); font-size: 9px; }
.lesson-caution {
  margin: 0;
  padding: 9px 10px;
  border-left: 2px solid rgba(255, 122, 122, 0.55);
  background: rgba(255, 122, 122, 0.045);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.designer-panel {
  margin-top: 18px;
  padding: 22px;
  scroll-margin-top: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(640px 260px at 92% 0%, rgba(84, 214, 199, 0.06), transparent 70%),
    rgba(16, 25, 35, 0.76);
}
.designer-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.designer-head h3 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}
.designer-head > p {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.designer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-top: 17px;
}
.designer-control,
.designer-readout {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 21, 0.45);
}
.designer-control label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font: 8.5px var(--mono);
  letter-spacing: 0.1em;
}
.designer-control select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0b131c;
  color: var(--text);
  font: 11px var(--mono);
}
.designer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.designer-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.designer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.designer-top span {
  display: block;
  color: var(--muted-2);
  font: 8.5px var(--mono);
  letter-spacing: 0.08em;
}
.designer-top b {
  display: inline-block;
  margin-top: 2px;
  color: var(--amber);
  font: 600 30px/1.05 var(--mono);
}
.designer-top code {
  padding: 5px 8px;
  border: 1px solid rgba(84, 214, 199, 0.22);
  border-radius: 7px;
  color: var(--teal);
  font: 13px var(--mono);
  letter-spacing: 0.12em;
}
.designer-seq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 13px 0 14px;
}
.designer-seq .designer-node {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: 9px var(--mono);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.designer-seq .designer-node.is-on {
  border-color: rgba(244, 185, 66, 0.55);
  background: rgba(244, 185, 66, 0.16);
  color: var(--amber-2);
  box-shadow: 0 0 16px rgba(244, 185, 66, 0.12);
}
.designer-seq i { color: var(--muted-2); font-style: normal; font-size: 8px; }
.designer-taps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.designer-taps span {
  color: var(--muted-2);
  font: 8.5px var(--mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.designer-taps code {
  color: var(--teal);
  font: 9.5px var(--mono);
  text-align: right;
}

.compare-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.compare-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.compare-head h4 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.compare-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.compare-rows { display: grid; gap: 7px; }
.compare-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}
.compare-label strong { display: block; color: var(--text); font-size: 11px; }
.compare-label small { color: var(--muted-2); font: 8px var(--mono); }
.compare-bits { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cmp-bit {
  position: relative;
  display: grid;
  grid-template-columns: auto 20px;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0a1119;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cmp-bit small { color: var(--muted-2); font: 8px var(--mono); }
.cmp-bit b { color: var(--muted); font: 12px var(--mono); text-align: center; }
.cmp-bit i {
  position: absolute;
  right: 6px;
  bottom: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}
.cmp-bit.is-hot { border-color: rgba(84, 214, 199, 0.32); background: rgba(84, 214, 199, 0.055); }
.cmp-bit.is-hot b { color: var(--teal); }
.cmp-bit.is-hot i { background: var(--teal); box-shadow: 0 0 7px var(--teal); }
.cmp-bit.is-live { border-color: var(--amber); box-shadow: 0 0 12px rgba(244, 185, 66, 0.17); }
.compare-row em {
  color: var(--muted-2);
  font: 8.5px var(--mono);
  font-style: normal;
  text-align: right;
}
.compare-note { margin: 8px 0 0; color: var(--muted-2); font-size: 9.5px; line-height: 1.6; }

.progress-panel {
  margin-top: 18px;
  padding: 22px;
  scroll-margin-top: 92px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(520px 240px at 10% 0%, rgba(244, 185, 66, 0.055), transparent 70%),
    rgba(16, 25, 35, 0.72);
}
.progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.progress-head h3 { margin: 0; font-size: 25px; letter-spacing: -0.035em; }
.progress-head > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.progress-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  margin-top: 17px;
}
.progress-summary,
.wrong-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 14, 21, 0.42);
}
.progress-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.progress-ring {
  --p: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--p), rgba(255, 255, 255, 0.065) 0);
}
.progress-ring::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0b131c;
}
.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--text);
  font: 600 23px var(--mono);
  letter-spacing: -0.03em;
}
.progress-count { display: flex; align-items: baseline; gap: 7px; margin: 9px 0 12px; }
.progress-count strong { color: var(--amber); font: 600 18px var(--mono); }
.progress-count span { color: var(--muted-2); font-size: 9.5px; }
.progress-steps { display: grid; width: 100%; grid-template-columns: 1fr 1fr; gap: 5px; }
.progress-steps a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.3;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.progress-steps a:hover { color: var(--text); border-color: var(--line-strong); }
.progress-steps a i {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border: 1px solid var(--muted-2);
  border-radius: 50%;
}
.progress-steps a em { margin-left: auto; color: var(--teal); font-style: normal; }
.progress-steps a.is-done { border-color: rgba(84, 214, 199, 0.26); background: rgba(84, 214, 199, 0.045); color: var(--text); }
.progress-steps a.is-done i { border-color: var(--teal); background: var(--teal); box-shadow: 0 0 6px rgba(84, 214, 199, 0.5); }
.progress-steps a.is-done em::after { content: '✓'; }
.progress-summary > .btn { margin-top: 10px; }
.wrong-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wrong-head h4 { margin: 2px 0 0; font-size: 16px; }
.wrong-head h4 b { color: var(--amber); font: 10px var(--mono); vertical-align: middle; }
.wrong-list { display: grid; gap: 6px; max-height: 238px; overflow: auto; margin-top: 10px; padding-right: 3px; }
.wrong-list::-webkit-scrollbar { width: 5px; }
.wrong-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 5px; }
.wrong-empty { margin: 0; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted-2); font-size: 10px; line-height: 1.7; text-align: center; }
.wrong-item { padding: 9px 10px; border: 1px solid rgba(255, 122, 122, 0.16); border-radius: 8px; background: rgba(255, 122, 122, 0.035); }
.wrong-item-top { display: flex; align-items: flex-start; gap: 7px; }
.wrong-item-top span { flex: 0 0 auto; padding: 1px 5px; border-radius: 4px; background: rgba(255, 122, 122, 0.12); color: #ffb0b0; font: 7.5px var(--mono); }
.wrong-item-top strong { color: var(--text); font-size: 10px; font-weight: 500; line-height: 1.45; }
.wrong-item p { display: flex; flex-wrap: wrap; gap: 8px; margin: 5px 0 2px; color: var(--muted); font-size: 9px; }
.wrong-item p b { color: #ffb0b0; font-weight: 500; }
.wrong-item p em { color: var(--teal); font-style: normal; }
.wrong-item small { display: block; color: var(--muted-2); font-size: 8.5px; line-height: 1.55; }

@media (max-width: 860px) {
  .lesson-deck-head,
  .designer-head,
  .progress-head { flex-direction: column; align-items: flex-start; gap: 9px; }
  .lesson-panel { grid-template-columns: 1fr; gap: 14px; }
  .designer-head > p,
  .progress-head > p { max-width: none; }
  .designer-grid,
  .progress-grid { grid-template-columns: 1fr; }
  .designer-panel,
  .progress-panel { padding: 18px; }
  .compare-row { grid-template-columns: 82px minmax(0, 1fr) 70px; }
}
@media (max-width: 620px) {
  .designer-panel,
  .progress-panel { padding: 15px 13px; border-radius: 14px; }
  .designer-head h3,
  .progress-head h3 { font-size: 19px; }
  .lesson-deck-head h4 { font-size: 18px; }
  .lesson-tabs { width: 100%; }
  .lesson-tab { flex: 1 1 0; min-width: 0; padding: 7px 6px; }
  .lesson-panel { padding: 14px 12px; }
  .lesson-copy h5 { font-size: 16px; }
  .lesson-copy p { font-size: 11px; }
  .compare-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .compare-row { grid-template-columns: 64px minmax(0, 1fr); gap: 7px; }
  .compare-row em { grid-column: 2; text-align: left; }
  .compare-bits { gap: 4px; }
  .cmp-bit { gap: 3px; padding: 3px 5px; }
  .cmp-bit small { font-size: 7px; }
  .cmp-bit b { font-size: 10px; }
  .designer-top b { font-size: 26px; }
  .designer-seq .designer-node { width: 24px; height: 24px; font-size: 8px; }
  .designer-taps { align-items: flex-start; flex-direction: column; gap: 4px; }
  .designer-taps code { text-align: left; }
  .progress-steps { grid-template-columns: 1fr; }
  .progress-ring { width: 92px; height: 92px; }
  .progress-ring span { font-size: 20px; }
  .wrong-list { max-height: 280px; }
}

/* --------------------------------------------------------------------------
   Readability pass: instructional text, hints and status controls
   -------------------------------------------------------------------------- */
:root {
  --muted: #98aabd;
  --muted-2: #7d90a4;
}

/* Course map: make the “可体验” entry a real button, not micro type */
.module-time { font-size: 10.5px; }
.module-card p { min-height: 44px; font-size: 13px; line-height: 1.7; }
.tag-row span { padding: 4px 7px; font-size: 10px; line-height: 1.25; }
.module-card summary { font-size: 12px; }
.module-card summary span { font-size: 10px; }
.module-card summary::after { width: 18px; height: 18px; font-size: 12px; }
.module-card li { font-size: 12px; line-height: 1.55; }
.module-card li::before { font-size: 9.5px; }
.module-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1;
  letter-spacing: 0.03em;
}
.map-note { font-size: 12px; }
.map-note span { font-size: 10px; }

/* Feedback strips and hints */
.bench-hint { font-size: 10px; }
.hero-stats span { font-size: 11px; }
.lab-status,
.wiring-status { font-size: 11.5px; line-height: 1.5; }
.lab-chip-note { min-height: 0; font-size: 11px; line-height: 1.55; }
.lab-output-note { max-width: 300px; font-size: 10.5px; }
.lab-footnote { font-size: 11.5px; }
.pin-hint { font-size: 11px; }
.pin-note p { font-size: 11px; }
.pin-meta dd { font-size: 12px; }
.pin-detail > p { font-size: 13px; }
.fn-table td:last-child { font-size: 12px; }
.control-row small,
.data-row small { font-size: 10.5px; }
.truth-msg { font-size: 12px; }
.answer-hint { font-size: 10px; }
.truth-table select { font-size: 11.5px; }
.rule-list span { font-size: 12px; }
.rule-list em { font-size: 11px; }
.mini-note { font-size: 11px; }
.wiring-tip { font-size: 10.5px; }
.wiring-guide li strong { font-size: 12px; }
.wiring-guide li p { font-size: 11.5px; }
.wiring-guide-note { font-size: 11px; }
.project-body p { font-size: 12.5px; }
.project-meta { font-size: 9.5px; }
.project-state { padding: 5px 9px; border-radius: 999px; font-size: 10.5px; }
.next-intro p { font-size: 11.5px; }
.next-item strong { font-size: 12px; }
.next-item small { font-size: 10px; }
.primer-hint { font-size: 12px; }
.clock-row .btn,
.truth-actions .btn,
.wiring-actions .btn,
.project-controls .btn { font-size: 12px; }
.btn-small { font-size: 12px; }
.logic-btn { font-size: 12px; }
.timing-head p { font-size: 12px; }

/* Micro lessons, designer and comparison */
.lesson-tab { min-width: 88px; padding: 8px 12px; font-size: 11.5px; }
.lesson-index { font-size: 10px; }
.lesson-copy p { font-size: 12.5px; }
.lesson-points li { font-size: 12px; }
.lesson-formula span { font-size: 10px; }
.lesson-formula small { font-size: 11px; }
.lesson-table { font-size: 11.5px; }
.lesson-table th { font-size: 10px; }
.lesson-caution { font-size: 11px; }
.designer-head > p { font-size: 12px; }
.designer-note { font-size: 11.5px; }
.designer-seq .designer-node { font-size: 10px; }
.designer-seq i { font-size: 9px; }
.compare-note { font-size: 11px; }
.compare-row em { font-size: 10px; }
.cmp-bit small { font-size: 9px; }
.cmp-bit b { font-size: 12px; }

/* Project, quiz and progress */
.project-lab-head p,
.quiz-head p { font-size: 12.5px; }
.quiz-item legend { font-size: 13px; }
.quiz-option { font-size: 12px; line-height: 1.55; }
.quiz-msg { font-size: 12px; }
.progress-head > p { font-size: 12px; }
.progress-count span { font-size: 10.5px; }
.progress-steps a { font-size: 10.5px; }
.wrong-empty { font-size: 11.5px; }
.wrong-item-top span { font-size: 9px; }
.wrong-item-top strong { font-size: 11.5px; }
.wrong-item p { font-size: 11px; }
.wrong-item small { font-size: 10.5px; }


/* v1.2 · 模 8 专题入口 */
.mod8-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
  padding: 25px 28px;
  overflow: hidden;
  border: 1px solid rgba(244, 185, 66, 0.24);
  border-radius: 17px;
  background: linear-gradient(105deg, rgba(244, 185, 66, 0.11), rgba(16, 25, 35, 0.95) 42%, rgba(84, 214, 199, 0.07));
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.mod8-entry::before {
  content: "";
  position: absolute;
  inset: -40% auto auto 30%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 185, 66, 0.13), transparent 68%);
  pointer-events: none;
}
.mod8-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 185, 66, 0.48);
  box-shadow: 0 20px 50px -34px rgba(0, 0, 0, 0.9);
}
.mod8-entry-copy { position: relative; z-index: 1; }
.mod8-entry-copy .mono-label { display: block; margin-bottom: 9px; color: var(--amber); font-size: 9px; letter-spacing: 0.14em; }
.mod8-entry h3 { margin: 0 0 6px; font-size: 23px; font-weight: 650; letter-spacing: -0.03em; }
.mod8-entry p { max-width: 62ch; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.mod8-entry-bits { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.mod8-entry-bits i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(8, 12, 17, 0.45);
  color: var(--muted);
  font: 600 10px/1 var(--mono);
  font-style: normal;
}
.mod8-entry-bits i:nth-child(8) { color: var(--amber); border-color: rgba(244, 185, 66, 0.38); background: rgba(244, 185, 66, 0.1); }
.mod8-entry-go {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--amber);
  font: 600 11px/1 var(--mono);
  white-space: nowrap;
}
.mod8-entry-go b { font-size: 15px; transition: transform 0.2s; }
.mod8-entry:hover .mod8-entry-go b { transform: translateX(4px); }
@media (max-width: 900px) {
  .mod8-entry { grid-template-columns: 1fr auto; gap: 16px; }
  .mod8-entry-bits { display: none; }
}
@media (max-width: 560px) {
  .mod8-entry { grid-template-columns: 1fr; gap: 13px; padding: 20px 18px; }
  .mod8-entry h3 { font-size: 20px; }
  .mod8-entry-go { justify-self: start; }
}


