:root {
  --bg: #070a10;
  --panel: rgba(13, 18, 28, .86);
  --panel-strong: #0d131e;
  --line: rgba(140, 164, 190, .16);
  --line-strong: rgba(102, 225, 222, .36);
  --text: #f2f3ef;
  --muted: #99a4b2;
  --dim: #667282;
  --cyan: #66e1de;
  --green: #72d7a5;
  --amber: #efb55f;
  --red: #e67478;
  --sidebar: 244px;
  --topbar: 72px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }

body::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background: radial-gradient(circle at 15% 0, rgba(125, 35, 52, .15), transparent 31%), radial-gradient(circle at 88% 22%, rgba(26, 117, 122, .12), transparent 30%), linear-gradient(180deg, #090c13, #06090f 72%);
}
.ambient-grid { position: fixed; inset: 0; z-index: -2; opacity: .32; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(#000, transparent 88%); }
.rain { position: fixed; inset: 0; z-index: -1; opacity: .11; pointer-events: none; overflow: hidden; }
.rain::before { content: ""; position: absolute; inset: -40% 0; transform: skewX(-9deg); background: repeating-linear-gradient(90deg, transparent 0 40px, rgba(125, 219, 229, .38) 41px, transparent 42px 85px); mask-image: repeating-linear-gradient(180deg, transparent 0 90px, #000 92px 154px, transparent 158px 240px); animation: rain 20s linear infinite; }
@keyframes rain { to { translate: 0 360px; } }

.page-progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--red), var(--amber), var(--cyan)); box-shadow: 0 0 14px var(--cyan); }
.topbar { position: fixed; inset: 0 0 auto; height: var(--topbar); z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7, 10, 16, .86); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { width: 21px; height: 21px; border: 1px solid var(--cyan); transform: rotate(45deg); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; background: var(--cyan); box-shadow: 0 0 13px var(--cyan); }
.brand span:last-child { display: grid; gap: 2px; }
.brand b { font-size: 13px; letter-spacing: .18em; }
.brand small { color: var(--dim); font: 8px ui-monospace, monospace; letter-spacing: .12em; }
.top-nav { display: flex; gap: 8px; }
.top-nav a { padding: 9px 13px; color: var(--muted); text-decoration: none; font-size: 12px; border: 1px solid transparent; }
.top-nav a:hover, .top-nav a.active { color: var(--cyan); border-color: var(--line-strong); background: rgba(69, 172, 176, .08); }
.nav-toggle { display: none; color: var(--text); border: 1px solid var(--line); background: var(--panel); padding: 8px 11px; }

.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; padding-top: var(--topbar); }
.sidebar { position: fixed; inset: var(--topbar) auto 0 0; width: var(--sidebar); padding: 30px 18px; border-right: 1px solid var(--line); background: rgba(8, 12, 19, .78); overflow-y: auto; }
.sidebar section { display: grid; gap: 5px; margin-bottom: 26px; }
.side-label { color: var(--dim); font: 700 9px ui-monospace, monospace; letter-spacing: .18em; padding: 0 9px 9px; text-transform: uppercase; }
.sidebar a, .side-pending { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; min-height: 43px; padding: 8px 9px; color: #8e99a7; text-decoration: none; border-left: 2px solid transparent; }
.sidebar a:hover, .sidebar a.active { color: #edf5f3; background: rgba(71, 174, 177, .08); border-left-color: var(--cyan); }
.sidebar b { color: var(--dim); font: 700 10px ui-monospace, monospace; }
.sidebar span { font-size: 11px; }
.sidebar em { color: var(--dim); font: 700 8px ui-monospace, monospace; font-style: normal; }
.side-pending { opacity: .44; }
.side-note { margin: 40px 8px 0; padding: 16px; border: 1px solid var(--line); background: rgba(14, 19, 29, .72); }
.side-note span, .side-note strong, .side-note small { display: block; }
.side-note span { color: var(--dim); font: 8px ui-monospace, monospace; letter-spacing: .14em; }
.side-note strong { margin: 10px 0 4px; font-size: 12px; }
.side-note small { color: var(--muted); font-size: 9px; }

main { grid-column: 2; width: min(1380px, 100%); min-width: 0; padding: 0 clamp(24px, 4vw, 66px) 100px; outline: none; }
.loading-panel, .error-panel { margin-top: 80px; padding: 28px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.error-panel strong { color: var(--red); }
.page-hero { min-height: 430px; padding: 92px 0 58px; display: flex; flex-direction: column; justify-content: flex-end; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--cyan); font: 800 10px ui-monospace, monospace; letter-spacing: .2em; }
.page-hero h1 { max-width: 980px; margin: 14px 0 24px; font-size: clamp(44px, 6vw, 82px); line-height: .98; letter-spacing: -.06em; background: linear-gradient(90deg, #f2f3ef 15%, #edbd76 60%, #68d9d7); color: transparent; background-clip: text; -webkit-background-clip: text; }
.page-hero p { max-width: 860px; margin: 0; color: #a2adba; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); color: #c4ccd4; background: rgba(13, 19, 29, .78); text-decoration: none; font-size: 12px; }
.button:hover { border-color: var(--line-strong); color: var(--cyan); }
.button.primary { color: #071012; border-color: var(--cyan); background: var(--cyan); font-weight: 750; }

.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin: 24px 0 0; }
.metrics article { min-height: 108px; padding: 17px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(18, 25, 37, .94), rgba(10, 15, 23, .76)); }
.metrics span { display: block; color: var(--dim); font: 8px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.metrics strong { display: block; margin: 13px 0 6px; font: 760 clamp(18px, 2vw, 26px) ui-monospace, monospace; letter-spacing: -.05em; }
.metrics small { color: #788392; font-size: 9px; line-height: 1.5; }

.content-section { padding-top: 92px; }
.section-heading { display: grid; grid-template-columns: minmax(360px, .8fr) 1fr; gap: 45px; align-items: end; margin-bottom: 30px; }
.section-heading > div { display: flex; gap: 14px; align-items: center; }
.section-heading > div > span { color: var(--cyan); border: 1px solid var(--line-strong); padding: 7px 9px; font: 700 10px ui-monospace, monospace; }
.section-heading h2 { margin: 0; font-size: clamp(29px, 3.5vw, 46px); letter-spacing: -.045em; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 13px; }

.version-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.version-card { min-height: 310px; padding: 22px; border: 1px solid var(--line); background: rgba(11, 16, 24, .82); text-decoration: none; transition: transform .22s, border-color .22s; }
.version-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.version-card > b { display: block; color: rgba(255,255,255,.1); font: 800 38px ui-monospace, monospace; }
.version-card > span { display: block; margin-top: 35px; color: var(--cyan); font: 700 8px ui-monospace, monospace; letter-spacing: .13em; }
.version-card h3 { margin: 10px 0; font-size: 18px; }
.version-card p { min-height: 100px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.version-card em { color: var(--amber); font-size: 10px; font-style: normal; }

.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.showcase-card { position: relative; min-height: 360px; border: 1px solid var(--line); background: #090e16; overflow: hidden; }
.showcase-card.wide { grid-column: span 2; min-height: min(560px, 44vw); }
.image-button { position: relative; display: block; width: 100%; padding: 0; color: inherit; border: 0; background: #080c13; cursor: zoom-in; overflow: hidden; }
.image-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-button > span { position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; background: rgba(5, 8, 13, .84); border: 1px solid var(--line); color: #cbd4dc; font-size: 8px; }
.showcase-image { position: absolute; inset: 0; height: 100%; }
.showcase-image img { object-fit: cover; filter: saturate(.9) brightness(.78); transition: transform .45s, filter .45s; }
.showcase-card:hover .showcase-image img { transform: scale(1.018); filter: saturate(1) brightness(.92); }
.showcase-copy { position: absolute; inset: auto 0 0; padding: 75px 22px 22px; pointer-events: none; background: linear-gradient(transparent, rgba(5, 8, 13, .96)); }
.showcase-copy span { color: var(--cyan); font: 700 9px ui-monospace, monospace; letter-spacing: .12em; }
.showcase-copy h3 { margin: 7px 0 5px; font-size: 19px; }
.showcase-copy p { margin: 0; color: var(--muted); font-size: 11px; }

.pipeline-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 13px; margin-top: 80px; padding: 26px; border: 1px solid var(--line); background: var(--panel); }
.pipeline-strip div { display: flex; gap: 8px; align-items: center; }
.pipeline-strip b { color: var(--cyan); font: 700 10px ui-monospace, monospace; }
.pipeline-strip span { font-size: 11px; color: #bdc6cf; }
.pipeline-strip i { color: #414c59; font-style: normal; }

.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.note-grid article { min-height: 150px; padding: 22px; border: 1px solid var(--line); background: var(--panel); }
.note-grid b { color: var(--cyan); font: 700 11px ui-monospace, monospace; }
.note-grid p { margin: 25px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.asset-toolbar { position: sticky; top: calc(var(--topbar) + 10px); z-index: 20; display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 10px; align-items: end; margin: 22px 0; padding: 14px; border: 1px solid var(--line); background: rgba(10, 15, 23, .92); backdrop-filter: blur(15px); }
.search-box { display: grid; gap: 6px; }
.search-box span { color: var(--dim); font: 8px ui-monospace, monospace; letter-spacing: .12em; }
.search-box input { width: 100%; height: 37px; padding: 0 11px; color: var(--text); border: 1px solid var(--line); outline: none; background: #080c13; }
.search-box input:focus { border-color: var(--cyan); }
.filter-group { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-group button { min-height: 37px; padding: 0 10px; color: var(--muted); border: 1px solid var(--line); background: #0b1018; cursor: pointer; font-size: 9px; }
.filter-group button:hover, .filter-group button.active { color: var(--cyan); border-color: var(--line-strong); background: rgba(49, 135, 139, .12); }
.result-line { display: flex; justify-content: space-between; margin: 22px 0 12px; color: var(--muted); font-size: 11px; }
.result-line small { color: var(--dim); font: 8px ui-monospace, monospace; letter-spacing: .12em; }
.asset-list, .spec-list { display: grid; gap: 14px; }
.asset-card, .spec-card { border: 1px solid var(--line); background: rgba(11, 16, 24, .9); overflow: hidden; }
.asset-card > header, .spec-card > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px 22px; }
.asset-id, .spec-card header span { color: var(--cyan); font: 700 8px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.asset-card h3, .spec-card h3 { margin: 7px 0 0; font-size: 21px; }
.status, .spec-card header em { padding: 5px 8px; border: 1px solid rgba(114, 215, 165, .3); color: var(--green); font: 700 8px ui-monospace, monospace; font-style: normal; }
.status.alternate { color: var(--amber); border-color: rgba(239, 181, 95, .3); }
.asset-visuals { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 240px; border-block: 1px solid var(--line); }
.asset-visuals .image-button { height: 100%; min-height: 240px; border-right: 1px solid var(--line); }
.asset-visuals .image-button:last-child { border-right: 0; }
.asset-visuals img { object-fit: contain; padding: 10px; background: radial-gradient(circle, rgba(35, 51, 66, .5), #080c13 72%); }
.asset-visuals .raw img { object-fit: cover; padding: 0; }
.asset-meta { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 22px; }
.asset-meta span { padding: 5px 8px; color: #8995a3; background: rgba(255,255,255,.025); border: 1px solid var(--line); font: 8px ui-monospace, monospace; }
.prompt-panel { border-top: 1px solid var(--line); }
.prompt-panel summary { padding: 15px 22px; color: #c0c9d2; cursor: pointer; font-size: 11px; list-style: none; }
.prompt-panel summary::after { content: "+"; float: right; color: var(--cyan); }
.prompt-panel[open] summary::after { content: "−"; }
.prompt-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.prompt-columns section { min-width: 0; padding: 22px; background: #0a0f17; }
.prompt-columns section > span { color: var(--cyan); font: 700 8px ui-monospace, monospace; letter-spacing: .14em; }
.prompt-columns pre, .prompt-columns p { margin: 14px 0 0; color: #a8b2be; font: 11px/1.75 ui-monospace, "Microsoft YaHei", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-columns p { font-family: inherit; font-size: 12px; line-height: 1.85; }
.prompt-panel footer, .spec-card footer { display: flex; justify-content: space-between; gap: 20px; padding: 12px 22px; color: var(--dim); border-top: 1px solid var(--line); }
.prompt-panel code, .spec-card code { font-size: 8px; overflow-wrap: anywhere; }
.prompt-panel small, .spec-card small { font-size: 9px; text-align: right; }
.compact-assets .asset-card:nth-child(n+7) .prompt-panel:not([open]) { display: block; }
.spec-card { margin-bottom: 12px; }
.empty-state { padding: 50px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }

.evidence-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.evidence-card { min-height: 220px; padding: 23px; border: 1px solid var(--line); background: var(--panel); }
.evidence-card span { color: var(--cyan); font: 700 8px ui-monospace, monospace; letter-spacing: .13em; }
.evidence-card strong { display: block; margin: 35px 0 18px; font: 800 27px ui-monospace, monospace; color: var(--green); }
.evidence-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }

.lightbox { width: min(1180px, calc(100vw - 30px)); max-width: none; height: min(92vh, 900px); padding: 0; color: var(--text); border: 1px solid var(--line-strong); background: #06090e; }
.lightbox::backdrop { background: rgba(0, 0, 0, .86); backdrop-filter: blur(8px); }
.lightbox-stage { height: calc(100% - 76px); display: grid; place-items: center; overflow: auto; }
.lightbox-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; color: var(--text); border: 1px solid var(--line); background: rgba(4, 7, 11, .86); cursor: pointer; font-size: 22px; }
.lightbox footer { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border-top: 1px solid var(--line); }
.lightbox footer div { display: grid; gap: 4px; }
.lightbox footer strong { font-size: 12px; }
.lightbox footer small { color: var(--muted); font-size: 9px; }
.lightbox footer a { padding: 9px 12px; color: var(--cyan); border: 1px solid var(--line-strong); text-decoration: none; font-size: 10px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .version-grid { grid-template-columns: repeat(3, 1fr); }
  .asset-toolbar { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --sidebar: 0px; }
  .topbar { padding: 0 15px; }
  .nav-toggle { display: block; }
  .top-nav { display: none; position: absolute; top: calc(var(--topbar) - 1px); right: 14px; width: 170px; padding: 7px; border: 1px solid var(--line); background: #0a0f17; }
  .top-nav.open { display: grid; }
  .sidebar { display: none; }
  .layout { grid-template-columns: 1fr; }
  main { grid-column: 1; width: 100%; padding-inline: 15px; }
  .page-hero { min-height: 390px; padding-top: 70px; }
  .section-heading { grid-template-columns: 1fr; gap: 15px; }
  .version-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-card.wide { grid-column: auto; min-height: 390px; }
  .asset-visuals { grid-template-columns: 1fr; }
  .asset-visuals .image-button { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .prompt-columns { grid-template-columns: 1fr; }
  .note-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .brand small { display: none; }
  .metrics, .version-grid, .evidence-grid { grid-template-columns: 1fr 1fr; }
  .metrics article { min-height: 94px; }
  .version-card { min-height: 270px; }
  .version-card p { min-height: 80px; }
  .showcase-card, .showcase-card.wide { min-height: 300px; }
  .pipeline-strip { justify-content: flex-start; }
  .pipeline-strip i { display: none; }
  .pipeline-strip div { width: calc(50% - 8px); }
  .prompt-panel footer, .spec-card footer, .lightbox footer { align-items: flex-start; flex-direction: column; }
  .prompt-panel small, .spec-card small { text-align: left; }
  .lightbox footer { min-height: 110px; }
  .lightbox-stage { height: calc(100% - 110px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
