:root {
  --night: #0b1014;
  --night-soft: #111a20;
  --paper: #f1f0e9;
  --paper-bright: #fbfbf7;
  --line: rgba(19, 29, 35, 0.16);
  --line-light: rgba(255, 255, 255, 0.16);
  --ink: #162027;
  --muted: #68727a;
  --lime: #c5f13a;
  --blue: #5f98ff;
  --orange: #ff835b;
  --shell: min(1420px, calc(100vw - 72px));
  --display: "Bahnschrift", "DIN Alternate", "Microsoft YaHei", sans-serif;
  --body: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.section-shell { width: var(--shell); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }

.project-topbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 76px; padding: 12px max(30px, calc((100vw - 1420px) / 2)); color: #fff; background: rgba(11, 16, 20, .95); border-bottom: 1px solid var(--line-light); backdrop-filter: blur(18px); }
.project-brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: var(--lime); font-family: var(--display); font-size: 22px; font-weight: 800; }
.project-brand strong, .project-brand small { display: block; }
.project-brand strong { font-family: var(--display); font-size: 14px; letter-spacing: .14em; }
.project-brand small { color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .06em; }
.project-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(255,255,255,.05); }
.project-nav a { padding: 7px 13px; border-radius: 999px; color: rgba(255,255,255,.58); font-size: 12px; transition: color .2s ease, background .2s ease; }
.project-nav a:hover, .project-nav a.active { color: var(--night); background: var(--lime); }
.academy-link { justify-self: end; color: rgba(255,255,255,.68); font-family: var(--display); font-size: 11px; letter-spacing: .08em; }
.academy-link span, .project-footer span { color: var(--lime); }

.project-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); min-height: 590px; color: #fff; background: var(--night); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; width: min(650px, calc(100% - 72px)); margin-left: max(36px, calc((100vw - 1420px) / 2)); padding-block: 78px; }
.hero-copy .eyebrow { color: var(--lime); }
.hero-copy h1 { margin: 18px 0 20px; font-family: var(--display); font-size: clamp(48px, 6vw, 92px); font-weight: 700; line-height: .98; letter-spacing: -.03em; }
.hero-copy h1 em { color: var(--lime); font-style: normal; }
.hero-lead { max-width: 560px; margin: 0; color: rgba(255,255,255,.68); font-size: 17px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-tags span { padding: 5px 10px; border: 1px solid rgba(255,255,255,.22); color: rgba(255,255,255,.75); font-family: var(--display); font-size: 10px; letter-spacing: .08em; }
.hero-action { display: inline-flex; align-items: center; gap: 14px; width: fit-content; margin-top: 38px; padding: 12px 15px; border: 1px solid rgba(197,241,58,.6); color: var(--lime); font-family: var(--display); font-size: 11px; letter-spacing: .1em; transition: background .2s ease, color .2s ease; }
.hero-action:hover { color: var(--night); background: var(--lime); }
.hero-visual { position: relative; min-height: 590px; overflow: hidden; border-left: 1px solid rgba(255,255,255,.13); }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: rgba(9, 19, 25, .18); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.82) contrast(1.03); }
.visual-caption { position: absolute; right: 34px; bottom: 30px; z-index: 1; display: grid; gap: 4px; color: #fff; text-align: right; }
.visual-caption span { color: var(--lime); font-family: var(--display); font-size: 10px; letter-spacing: .14em; }
.visual-caption strong { font-size: 20px; font-weight: 500; }
.visual-stamp { position: absolute; top: 34px; right: 34px; z-index: 1; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); color: #fff; font-family: var(--display); font-size: 24px; font-weight: 800; line-height: .72; text-align: center; transform: rotate(8deg); }
.visual-stamp small { font-size: 10px; letter-spacing: .16em; }

.runtime-strip { display: grid; grid-template-columns: minmax(230px, .78fr) 1.8fr; gap: 40px; padding-block: 52px; }
.runtime-intro h2, .section-head h2 { margin: 9px 0 7px; font-family: var(--display); font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.02em; }
.runtime-intro p, .section-head > p { margin: 0; color: var(--muted); font-size: 14px; }
.runtime-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.runtime-cell { display: grid; align-content: center; min-height: 140px; padding: 20px 16px; border-right: 1px solid var(--line); }
.runtime-cell:last-child { border-right: 0; }
.cell-label, .arch-kicker, .detail-label { color: var(--muted); font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.runtime-cell strong { margin-top: 9px; font-family: var(--display); font-size: 25px; letter-spacing: .02em; }
.runtime-cell em { width: fit-content; margin-top: 4px; padding: 1px 6px; font-family: var(--display); font-size: 9px; font-style: normal; letter-spacing: .08em; }
.state-up { color: #2e6b16; background: rgba(197,241,58,.55); }
.state-warn { color: #8a3e28; background: rgba(255,131,91,.3); }
.runtime-cell small { margin-top: 8px; color: var(--muted); font-size: 11px; }
.runtime-cell-muted { background: rgba(255,131,91,.06); }

.architecture-section, .handoff-section { padding-block: 82px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 30px; }
.section-head > p { max-width: 390px; }
.architecture-board { display: grid; grid-template-columns: 1fr auto 1fr auto 1.15fr auto 1fr; align-items: stretch; gap: 14px; padding: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.42); }
.arch-column { display: grid; align-content: start; min-height: 168px; padding: 22px; border-top: 4px solid var(--ink); background: var(--paper-bright); box-shadow: 0 12px 26px rgba(28,36,40,.07); }
.arch-api { border-top-color: var(--blue); }
.arch-domain { border-top-color: var(--orange); }
.arch-data { border-top-color: var(--lime); }
.arch-column strong { margin-top: 13px; font-family: var(--display); font-size: 20px; line-height: 1.15; }
.arch-column small { margin-top: 10px; color: var(--muted); font-size: 12px; }
.arch-arrow { display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-size: 26px; }
.request-path { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 16px; padding: 15px 18px; color: rgba(255,255,255,.75); background: var(--night); font-family: var(--display); font-size: 11px; letter-spacing: .04em; }
.request-path span { color: var(--lime); }
.request-path i { color: rgba(255,255,255,.36); font-style: normal; }

.modules-section, .incidents-section { padding-block: 82px; color: #fff; background: var(--night-soft); }
.section-head-light h2 { color: #fff; }
.section-head-light > p { color: rgba(255,255,255,.58); }
.section-head-light .eyebrow { color: var(--lime); }
.module-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.module-filter { padding: 8px 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: rgba(255,255,255,.64); background: transparent; cursor: pointer; font-size: 12px; }
.module-filter:hover, .module-filter.active { color: var(--night); background: var(--lime); border-color: var(--lime); }
.module-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 18px; }
.module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.13); }
.module-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; min-height: 128px; padding: 20px; border: 0; color: #fff; background: #141f26; text-align: left; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.module-item:hover, .module-item.active { background: #1b2b34; transform: translateY(-2px); }
.module-item strong { font-family: var(--display); font-size: 20px; }
.module-item small { grid-column: 1 / -1; color: rgba(255,255,255,.55); font-size: 12px; }
.module-item em { align-self: start; padding: 2px 7px; color: var(--lime); border: 1px solid rgba(197,241,58,.4); font-family: var(--display); font-size: 10px; font-style: normal; }
.module-detail { min-height: 100%; padding: 28px; border: 1px solid rgba(197,241,58,.45); background: rgba(197,241,58,.06); }
.module-detail .detail-label { color: var(--lime); }
.module-detail h3 { margin: 14px 0 8px; color: #fff; font-family: var(--display); font-size: 30px; line-height: 1; }
.module-detail p { margin: 0; color: rgba(255,255,255,.68); font-size: 14px; }
.detail-path { display: block; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.16); color: var(--lime); font-family: var(--display); font-size: 11px; }
.detail-list { display: grid; gap: 7px; margin: 16px 0 0; padding: 0; list-style: none; }
.detail-list li { position: relative; padding-left: 16px; color: rgba(255,255,255,.72); font-size: 13px; }
.detail-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 2px; background: var(--orange); }

.handoff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.handoff-card { min-height: 250px; padding: 24px; border-right: 1px solid var(--line); }
.handoff-card:last-child { border-right: 0; }
.phase-index { color: var(--blue); font-family: var(--display); font-size: 12px; letter-spacing: .16em; }
.handoff-card h3 { margin: 18px 0 8px; font-family: var(--display); font-size: 24px; line-height: 1.05; }
.handoff-card p { min-height: 50px; margin: 0; color: var(--muted); font-size: 13px; }
.handoff-checks { display: grid; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.handoff-check { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 12px; cursor: pointer; }
.handoff-check input { accent-color: var(--blue); margin-top: 4px; }
.handoff-check.done span { color: var(--muted); text-decoration: line-through; }

.incident-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); }
.incident-card { min-height: 216px; padding: 24px; background: #141f26; }
.incident-card .incident-type { color: var(--orange); font-family: var(--display); font-size: 10px; letter-spacing: .14em; }
.incident-card h3 { margin: 13px 0 8px; color: #fff; font-size: 18px; line-height: 1.2; }
.incident-card p { margin: 0; color: rgba(255,255,255,.6); font-size: 13px; }
.incident-card strong { display: block; margin-top: 18px; color: var(--lime); font-size: 12px; }
.project-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 36px; }
.project-footer strong, .project-footer span { display: block; }
.project-footer strong { font-family: var(--display); font-size: 13px; letter-spacing: .12em; }
.project-footer span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.project-footer > a { color: var(--blue); font-family: var(--display); font-size: 12px; }

@media (max-width: 1100px) {
  .project-topbar { grid-template-columns: 1fr auto; }
  .project-nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; overflow-x: auto; max-width: 100%; }
  .academy-link { grid-column: 2; grid-row: 1; }
  .project-hero { grid-template-columns: 1fr; }
  .hero-copy { width: var(--shell); margin-inline: auto; }
  .hero-visual { min-height: 390px; border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
  .runtime-strip { grid-template-columns: 1fr; }
  .runtime-grid { grid-template-columns: repeat(3, 1fr); }
  .runtime-cell:nth-child(3) { border-right: 0; }
  .architecture-board { grid-template-columns: repeat(2, 1fr); }
  .arch-arrow { display: none; }
  .handoff-grid { grid-template-columns: repeat(2, 1fr); }
  .handoff-card:nth-child(2) { border-right: 0; }
  .handoff-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  :root { --shell: min(100% - 32px, 680px); }
  .project-topbar { padding-inline: 16px; }
  .project-brand strong { font-size: 12px; }
  .project-brand small { font-size: 9px; }
  .academy-link { font-size: 0; }
  .academy-link span { font-size: 18px; }
  .project-nav a { white-space: nowrap; padding-inline: 11px; }
  .hero-copy { padding-block: 62px; }
  .hero-copy h1 { font-size: clamp(42px, 14vw, 68px); }
  .hero-lead { font-size: 15px; }
  .hero-visual { min-height: 270px; }
  .visual-caption { right: 18px; bottom: 18px; }
  .visual-caption strong { font-size: 15px; }
  .visual-stamp { top: 18px; right: 18px; width: 58px; height: 58px; font-size: 17px; }
  .runtime-grid { grid-template-columns: repeat(2, 1fr); }
  .runtime-cell:nth-child(3) { border-right: 1px solid var(--line); }
  .runtime-cell:nth-child(even) { border-right: 0; }
  .runtime-cell:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .section-head { display: block; }
  .section-head > p { margin-top: 16px; }
  .architecture-board { grid-template-columns: 1fr; padding: 14px; }
  .arch-column { min-height: 130px; }
  .module-layout { grid-template-columns: 1fr; }
  .module-list { grid-template-columns: 1fr; }
  .handoff-grid { grid-template-columns: 1fr; }
  .handoff-card, .handoff-card:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .handoff-card:last-child { border-bottom: 0; }
  .incident-grid { grid-template-columns: 1fr; }
  .project-footer { display: block; }
  .project-footer > a { display: inline-block; margin-top: 18px; }
}
