:root {
  --ink: #0c0f0f;
  --ink-2: #141918;
  --panel: #1b211f;
  --panel-2: #222a27;
  --paper: #f0f1eb;
  --muted: #a4ada8;
  --quiet: #909c96;
  --sage: #9db2a5;
  --sage-deep: #51675c;
  --amber: #c7a365;
  --warn: #c27f66;
  --line: rgba(240,241,235,.13);
  --line-strong: rgba(240,241,235,.25);
  --shadow: 0 28px 90px rgba(0,0,0,.38);
  --display: "Avenir Next Condensed", "DIN Condensed", "PingFang SC", sans-serif;
  --body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.grain { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .18; mix-blend-mode: soft-light; 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); }

.topbar { position: sticky; top: 0; z-index: 80; min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(12,15,15,.88); backdrop-filter: blur(18px); }
.identity { display: flex; align-items: center; gap: 14px; }
.identity-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: var(--sage); font: 800 14px var(--mono); letter-spacing: -.05em; clip-path: polygon(0 0,100% 0,100% 76%,76% 100%,0 100%); }
.identity b { display: block; font: 720 15px var(--display); letter-spacing: .15em; }
.identity small { display: block; margin-top: 2px; color: var(--muted); font: 9px var(--mono); letter-spacing: .12em; }
.topnav { display: flex; align-items: center; gap: 25px; font: 11px var(--mono); letter-spacing: .08em; }
.topnav a { color: var(--muted); transition: color .2s ease; }
.topnav a:hover { color: var(--paper); }

.offline-strip { position: sticky; top: 76px; z-index: 79; min-height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 4vw; border-bottom: 1px solid rgba(157,178,165,.18); color: var(--sage); background: rgba(14,20,18,.94); backdrop-filter: blur(18px); font: 9px var(--mono); letter-spacing: .1em; }
.offline-strip b { color: var(--paper); font-weight: 580; }
.offline-strip > span:last-child { margin-left: auto; color: var(--quiet); }
.offline-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(199,163,101,.4); animation: offlinePulse 1.8s ease-out infinite; }
.offline-strip.ready .offline-pulse { background: var(--sage); }
@keyframes offlinePulse { 60%,100% { box-shadow: 0 0 0 8px rgba(157,178,165,0); } }

.ghost-button, .primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 19px; border: 1px solid var(--line-strong); cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.ghost-button { color: var(--paper); background: transparent; font: 11px var(--mono); letter-spacing: .08em; }
.ghost-button b { margin-left: 9px; color: var(--sage); }
.primary-button { border-color: var(--sage); color: var(--ink); background: var(--sage); font-weight: 680; }
.secondary-button { background: rgba(255,255,255,.025); color: var(--paper); }
.ghost-button:hover, .primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button.danger { color: #e2b7aa; border-color: rgba(194,127,102,.44); }

main { overflow: clip; }
.hero { position: relative; min-height: 660px; display: grid; grid-template-columns: 130px minmax(0,1fr) 340px; gap: 5vw; align-items: center; padding: 9vh 5vw 8vh; border-bottom: 1px solid var(--line); background: radial-gradient(72% 95% at 58% 42%, rgba(81,103,92,.19), transparent 62%), linear-gradient(120deg,#0b0e0e,#131816 62%,#0b0e0e); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg,transparent,var(--sage),transparent); opacity: .55; }
.hero-index { align-self: stretch; padding-top: 44px; border-right: 1px solid var(--line); color: var(--quiet); font: 11px/2 var(--mono); letter-spacing: .15em; writing-mode: vertical-rl; }
.hero-index b { color: var(--sage); }
.eyebrow { margin: 0; color: var(--sage); font: 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 8px; height: 8px; margin-right: 12px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 16px rgba(157,178,165,.5); }
.hero h1 { margin: 30px 0 26px; max-width: 980px; font: 760 clamp(54px,6.3vw,104px)/.96 var(--display); letter-spacing: -.055em; }
.hero h1 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(240,241,235,.72); }
.hero-lead { max-width: 760px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.hero-lead strong { color: var(--paper); font-weight: 600; }
.hero-actions { display: flex; gap: 12px; margin-top: 38px; }
.hero-rule { align-self: end; padding: 27px 26px; border-top: 1px solid var(--sage); background: rgba(27,33,31,.72); box-shadow: var(--shadow); }
.hero-rule > span { color: var(--sage); font: 11px var(--mono); letter-spacing: .14em; }
.hero-rule ul { padding: 0; margin: 20px 0 0; list-style: none; }
.hero-rule li { position: relative; padding: 11px 0 11px 20px; border-top: 1px solid var(--line); color: #c8ceca; font-size: 13px; }
.hero-rule li::before { content: ""; position: absolute; left: 1px; top: 19px; width: 6px; height: 6px; background: var(--sage); transform: rotate(45deg); }

.workflow-section, .pack-section, .library-section { padding: 100px 5vw; }
.workflow-section { background: #101413; }
.pack-section { border-top: 1px solid var(--line); background: #0c0f0f; }
.library-section { border-top: 1px solid var(--line); background: #111514; }
.section-heading { display: grid; grid-template-columns: minmax(210px, .55fr) minmax(0,1.45fr); gap: 6vw; align-items: end; margin-bottom: 48px; }
.section-heading > div:first-child { display: flex; align-items: center; gap: 22px; }
.section-number { color: var(--amber); font: 800 52px/.8 var(--display); letter-spacing: -.05em; }
.section-heading h2 { margin: 0; font: 720 clamp(36px,4vw,62px)/1.05 var(--display); letter-spacing: -.035em; }
.section-heading > div:last-child p { max-width: 720px; margin: 13px 0 0; color: var(--muted); }

.workflow-rail { display: grid; grid-template-columns: repeat(6,1fr); gap: 1px; padding: 0; margin: 0; list-style: none; background: var(--line); border: 1px solid var(--line); }
.workflow-rail li { position: relative; min-height: 236px; padding: 25px 21px; background: var(--ink-2); overflow: hidden; }
.workflow-rail li::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: var(--sage); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.workflow-rail li:hover::after, .workflow-rail li.active::after { transform: scaleX(1); }
.workflow-rail li.active { background: var(--panel-2); }
.workflow-rail b { color: var(--quiet); font: 12px var(--mono); }
.workflow-rail span { display: block; margin-top: 55px; font: 680 22px var(--display); }
.workflow-rail p { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.workflow-rail li.active b, .workflow-rail li.active span { color: var(--sage); }
.workflow-note { display: grid; grid-template-columns: 180px 1fr; gap: 32px; margin-top: 28px; padding: 25px 29px; border-left: 3px solid var(--amber); background: rgba(199,163,101,.075); }
.workflow-note b { color: var(--amber); }
.workflow-note p { margin: 0; color: #c8ceca; }

.pack-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 18px; }
.pack-card { position: relative; min-height: 330px; padding: 28px; border: 1px solid var(--line); background: linear-gradient(145deg,var(--panel),#111514); overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.pack-card:nth-child(1), .pack-card:nth-child(4) { grid-column: span 7; }
.pack-card:nth-child(2), .pack-card:nth-child(3) { grid-column: span 5; }
.pack-card:hover { transform: translateY(-5px); border-color: rgba(157,178,165,.42); }
.pack-card::before { content: attr(data-number); position: absolute; right: -12px; top: -23px; color: rgba(240,241,235,.035); font: 900 150px var(--display); }
.pack-card .pack-kicker { color: var(--sage); font: 10px var(--mono); letter-spacing: .14em; }
.pack-card h3 { max-width: 520px; margin: 27px 0 12px; font: 700 34px/1.05 var(--display); }
.pack-card > p { max-width: 600px; margin: 0; color: var(--muted); }
.pack-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 26px 0; }
.pack-tags span { padding: 5px 9px; border: 1px solid var(--line); color: #bdc5c0; font: 10px var(--mono); }
.pack-actions { position: absolute; left: 28px; bottom: 26px; display: flex; gap: 10px; }
.pack-actions button { min-height: 38px; padding: 0 14px; }

.library-heading { margin-bottom: 34px; }
.library-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 36px; align-items: start; }
.filter-panel { position: sticky; top: 122px; max-height: calc(100vh - 146px); overflow: auto; padding: 24px 22px; border: 1px solid var(--line); background: rgba(20,25,24,.93); scrollbar-width: thin; }
.filter-block + .filter-block { margin-top: 27px; padding-top: 24px; border-top: 1px solid var(--line); }
.filter-block > label, .filter-label { display: block; margin-bottom: 11px; color: var(--quiet); font: 10px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.filter-block input[type="text"] { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); outline: 0; color: var(--paper); background: var(--ink); }
.filter-block input[type="text"]:focus { border-color: var(--sage); }
.field-note { display: block; margin-top: 8px; color: var(--quiet); font-size: 10px; line-height: 1.55; }
.filter-stack { display: grid; gap: 5px; }
.filter-stack button { width: 100%; display: flex; justify-content: space-between; padding: 9px 11px; border: 0; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.filter-stack button:hover, .filter-stack button.active { color: var(--paper); background: rgba(157,178,165,.10); }
.filter-stack button.active { box-shadow: inset 2px 0 var(--sage); }
.filter-stack button b { color: var(--quiet); font: 10px var(--mono); }
.filter-stack.compact { max-height: 275px; overflow: auto; }
.check-row { display: flex !important; align-items: center; gap: 10px; margin: 10px 0 !important; color: var(--muted) !important; font: 13px var(--body) !important; letter-spacing: 0 !important; text-transform: none !important; cursor: pointer; }
.check-row input { accent-color: var(--sage-deep); }
.upstream-link { display: block; margin-top: 27px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--sage); font-size: 12px; }

.library-controls { position: sticky; top: 110px; z-index: 20; display: flex; align-items: stretch; gap: 10px; padding: 12px 0; background: #111514; }
.search-box { flex: 1; height: 52px; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; border: 1px solid var(--line-strong); background: var(--ink); }
.search-box > span { padding-left: 18px; color: var(--sage); font: 10px var(--mono); letter-spacing: .12em; }
.search-box input { min-width: 0; height: 100%; border: 0; outline: 0; color: var(--paper); background: transparent; }
.search-box kbd { margin-right: 12px; padding: 4px 7px; border: 1px solid var(--line); color: var(--quiet); background: var(--panel); font: 10px var(--mono); }
.result-count { min-width: 115px; display: flex; flex-direction: column; justify-content: center; padding: 0 18px; border: 1px solid var(--line); background: var(--panel); }
.result-count b { color: var(--sage); font: 20px var(--mono); }
.result-count span { color: var(--quiet); font-size: 10px; }
.active-context { min-height: 36px; display: flex; align-items: center; gap: 8px; margin: 7px 0 18px; color: var(--muted); font-size: 12px; }
.context-pill { padding: 5px 9px; border: 1px solid rgba(157,178,165,.25); color: var(--sage); background: rgba(157,178,165,.06); }

.shot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.shot-card { position: relative; min-width: 0; border: 1px solid var(--line); background: #171c1a; transition: border-color .25s ease, transform .25s ease; overflow: hidden; }
.shot-card:hover { transform: translateY(-3px); border-color: rgba(157,178,165,.42); }
.shot-card.selected { border-color: var(--sage); box-shadow: inset 0 0 0 1px var(--sage); }
.shot-card.confirmed { border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(199,163,101,.65); }
.preview { position: relative; aspect-ratio: 16/9; overflow: hidden; background: radial-gradient(circle at 50% 45%,#2a3430,#0b0e0d 72%); }
.preview video { width: 100%; height: 100%; display: block; object-fit: cover; opacity: 0; transition: opacity .35s ease, transform .6s ease; }
.preview video.ready { opacity: .38; }
.preview video.playing { opacity: 1; }
.shot-card:hover .preview video { transform: scale(1.018); }
.preview-placeholder { position: absolute; z-index: 2; inset: 0; width: 100%; border: 0; display: grid; place-items: center; color: var(--quiet); background: transparent; cursor: pointer; font: 10px var(--mono); letter-spacing: .11em; }
.preview:has(video.playing) .preview-placeholder { opacity: 0; pointer-events: none; }
.preview-placeholder::before { content: ""; position: absolute; width: 54px; height: 54px; border: 1px solid rgba(157,178,165,.35); border-radius: 50%; }
.preview-placeholder::after { content: ""; width: 0; height: 0; margin-left: 4px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid var(--sage); }
.preview-placeholder:focus-visible { outline: 2px solid var(--sage); outline-offset: -4px; }
.preview-badge { position: absolute; z-index: 4; left: 13px; top: 13px; padding: 5px 8px; color: var(--ink); background: var(--sage); font: 9px var(--mono); letter-spacing: .08em; }
.preview-badge.caution { color: #1a1110; background: var(--warn); }
.preview-expand { position: absolute; z-index: 5; right: 12px; bottom: 12px; width: 36px; height: 36px; border: 1px solid var(--line-strong); color: var(--paper); background: rgba(8,10,9,.75); cursor: pointer; }
.card-body { padding: 21px 21px 19px; }
.card-head { display: flex; justify-content: space-between; gap: 14px; }
.card-head h3 { min-width: 0; margin: 0; font: 650 23px/1.1 var(--display); overflow-wrap: anywhere; }
.card-code { flex: 0 0 auto; color: var(--quiet); font: 9px var(--mono); }
.card-summary { min-height: 53px; margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0; background: var(--line); }
.card-facts div { min-width: 0; padding: 9px 10px; background: var(--ink-2); }
.card-facts small { display: block; color: var(--quiet); font: 8px var(--mono); letter-spacing: .1em; }
.card-facts span { display: block; margin-top: 3px; color: #c6cdc9; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--line); color: var(--paper); background: #101413; outline: none; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.select-shot { min-height: 39px; border: 1px solid var(--sage-deep); color: var(--sage); background: rgba(157,178,165,.04); cursor: pointer; }
.selected .select-shot { color: var(--ink); background: var(--sage); }
.source-shot { min-width: 42px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; font: 13px var(--mono); }
.source-shot:hover { border-color: var(--sage); color: var(--sage); }
.empty-state { padding: 80px 30px; border: 1px dashed var(--line-strong); text-align: center; }
.empty-state b { font: 600 28px var(--display); }
.empty-state p { color: var(--muted); }

.selection-bar { position: fixed; z-index: 70; left: 50%; bottom: 22px; width: min(1060px,calc(100vw - 40px)); min-height: 74px; display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 18px; padding: 11px 12px 11px 21px; border: 1px solid rgba(157,178,165,.4); background: rgba(14,18,17,.94); box-shadow: 0 26px 90px rgba(0,0,0,.62); backdrop-filter: blur(18px); }
.selection-bar[hidden] { display: none; }
.selection-bar small { display: block; color: var(--sage); font: 9px var(--mono); letter-spacing: .1em; }
.selection-bar b { display: block; margin-top: 2px; font-size: 14px; }
.selection-preview { display: flex; gap: 6px; overflow: hidden; }
.selection-preview span { max-width: 150px; padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

dialog { color: var(--paper); }
dialog::backdrop { background: rgba(5,7,6,.83); backdrop-filter: blur(8px); }
.selection-dialog { width: min(1040px,calc(100vw - 34px)); max-height: calc(100vh - 34px); padding: 0; border: 1px solid var(--line-strong); background: var(--ink-2); box-shadow: var(--shadow); }
.dialog-shell { margin: 0; }
.dialog-shell > header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; padding: 28px 32px 23px; border-bottom: 1px solid var(--line); background: rgba(20,25,24,.96); }
.dialog-shell header small { color: var(--sage); font: 10px var(--mono); letter-spacing: .12em; }
.dialog-shell h2 { margin: 7px 0 0; font: 700 38px var(--display); }
.dialog-close { width: 43px; height: 43px; border: 1px solid var(--line); color: var(--paper); background: transparent; font-size: 24px; cursor: pointer; }
.dialog-intro { padding: 21px 32px; color: var(--muted); background: rgba(157,178,165,.055); }
.dialog-intro p { margin: 0; }
.selection-list { padding: 10px 32px; }
.selection-row { display: grid; grid-template-columns: 36px minmax(0,1.25fr) minmax(150px,.65fr) 118px 40px; gap: 13px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.selection-row.confirmed { border-bottom-color: rgba(199,163,101,.4); }
.selection-row > b { color: var(--quiet); font: 10px var(--mono); }
.selection-row strong { display: block; overflow-wrap: anywhere; }
.selection-row small { color: var(--sage); font: 9px var(--mono); }
.selection-row select { width: 100%; height: 38px; padding: 0 8px; border: 1px solid var(--line); color: var(--paper); background: var(--ink); }
.confirm-selection { min-height: 38px; padding: 0 10px; border: 1px solid var(--sage-deep); color: var(--sage); background: rgba(157,178,165,.04); cursor: pointer; font-size: 11px; }
.confirm-selection:disabled { border-color: var(--line); color: var(--quiet); cursor: not-allowed; }
.selection-row.confirmed .confirm-selection { border-color: var(--amber); color: var(--ink); background: var(--amber); }
.remove-selection { width: 36px; height: 36px; border: 0; color: var(--warn); background: transparent; cursor: pointer; }
.export-label { display: block; padding: 18px 32px 7px; color: var(--quiet); font: 10px var(--mono); letter-spacing: .12em; }
#selectionExport { width: calc(100% - 64px); height: 240px; margin: 0 32px; padding: 17px; resize: vertical; border: 1px solid var(--line); outline: none; color: #cbd2ce; background: #090b0b; font: 12px/1.75 var(--mono); }
.dialog-shell > footer { display: flex; justify-content: space-between; padding: 20px 32px 28px; }

.preview-dialog { width: min(1180px,calc(100vw - 34px)); padding: 0; border: 1px solid var(--line-strong); background: var(--ink); }
.preview-shell { position: relative; display: grid; grid-template-columns: minmax(0,1.7fr) minmax(280px,.65fr); margin: 0; }
.preview-shell video { width: 100%; min-height: 520px; background: #050606; }
.preview-shell > div { padding: 70px 32px 32px; }
.preview-shell small { color: var(--sage); font: 10px var(--mono); letter-spacing: .11em; }
.preview-shell h2 { margin: 16px 0; font: 680 38px/1.05 var(--display); overflow-wrap: anywhere; }
.preview-shell p { color: var(--muted); }
.preview-close { position: absolute; z-index: 6; right: 16px; top: 16px; }

.deep-dialog { width: min(1500px,calc(100vw - 28px)); height: min(940px,calc(100vh - 28px)); max-width: none; max-height: none; padding: 0; border: 1px solid rgba(157,178,165,.38); color: var(--paper); background: #0c100f; box-shadow: 0 40px 130px rgba(0,0,0,.7); overflow: hidden; }
.deep-shell { height: 100%; display: grid; grid-template-columns: 310px minmax(0,1fr); grid-template-rows: 94px minmax(0,1fr); }
.deep-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(18,23,21,.98); }
.deep-header small { color: var(--sage); font: 9px var(--mono); letter-spacing: .12em; }
.deep-header h2 { margin: 5px 0 0; font: 680 32px/1 var(--display); overflow-wrap: anywhere; }
.deep-header-actions { display: flex; align-items: center; gap: 10px; }
.deep-header-actions .ghost-button { min-height: 42px; }
.deep-rail { min-width: 0; padding: 26px 22px; border-right: 1px solid var(--line); background: #111614; overflow-y: auto; }
.deep-rail > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.deep-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 22px 0; background: var(--line); }
.deep-stats div { padding: 13px; background: #0d1110; }
.deep-stats b { display: block; color: var(--sage); font: 18px var(--mono); }
.deep-stats small { color: var(--quiet); font: 8px var(--mono); letter-spacing: .08em; }
.deep-tabs { display: grid; gap: 6px; }
.deep-tabs button { min-height: 48px; display: grid; grid-template-columns: 30px 1fr; align-items: center; text-align: left; border: 1px solid transparent; color: var(--muted); background: transparent; cursor: pointer; }
.deep-tabs button span { color: var(--quiet); font: 9px var(--mono); }
.deep-tabs button.active { border-color: rgba(157,178,165,.3); color: var(--paper); background: rgba(157,178,165,.07); }
.deep-content { min-width: 0; overflow: auto; background: radial-gradient(circle at 90% 0,rgba(157,178,165,.055),transparent 35%),#0c100f; }
.deep-content > section { min-height: 100%; padding: 42px 50px 70px; }
.recipe-markdown { max-width: 900px; color: #c7cfca; font-size: 14px; line-height: 1.85; }
.recipe-markdown h2 { margin: 46px 0 15px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--paper); font: 650 29px var(--display); }
.recipe-markdown h2:first-child { margin-top: 0; }
.recipe-markdown h3 { margin: 30px 0 10px; color: var(--sage); font: 620 19px var(--display); }
.recipe-markdown p { margin: 0 0 14px; }
.recipe-markdown ul { margin: 0 0 20px; padding: 0; list-style: none; }
.recipe-markdown li { position: relative; margin: 9px 0; padding-left: 20px; }
.recipe-markdown li::before { content: ""; position: absolute; left: 1px; top: .78em; width: 7px; height: 1px; background: var(--sage); }
.recipe-markdown code { padding: 2px 5px; color: #d9c291; background: rgba(199,163,101,.08); font: 12px var(--mono); }
.recipe-markdown pre { overflow: auto; padding: 18px; border: 1px solid var(--line); color: #ccd4cf; background: #080b0a; }
.recipe-markdown pre code { padding: 0; color: inherit; background: none; }
.recipe-frontmatter { margin-bottom: 30px; padding: 18px 20px; border-left: 2px solid var(--sage); color: var(--muted); background: rgba(157,178,165,.045); font: 11px/1.8 var(--mono); white-space: pre-wrap; }
.parameter-table { width: 100%; border-collapse: collapse; color: #c9d0cc; font-size: 12px; }
.parameter-table caption { margin-bottom: 18px; color: var(--paper); text-align: left; font: 650 28px var(--display); }
.parameter-table th, .parameter-table td { padding: 15px 16px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.parameter-table th { color: var(--sage); background: #111614; font: 9px var(--mono); letter-spacing: .1em; }
.parameter-table td:first-child { width: 17%; color: var(--paper); font-weight: 650; }
.parameter-table td:nth-child(2) { width: 29%; color: #dcc89d; font: 11px/1.7 var(--mono); }
.code-workbench { height: calc(100vh - 220px); min-height: 560px; display: grid; grid-template-columns: 245px minmax(0,1fr); border: 1px solid var(--line); background: #080b0a; }
.code-workbench > aside { overflow-y: auto; border-right: 1px solid var(--line); background: #0f1412; }
.code-file { width: 100%; min-height: 56px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); background: transparent; text-align: left; cursor: pointer; font: 9px/1.5 var(--mono); overflow-wrap: anywhere; }
.code-file.active { color: var(--paper); background: rgba(157,178,165,.09); box-shadow: inset 2px 0 var(--sage); }
.code-pane { min-width: 0; display: grid; grid-template-rows: 44px minmax(0,1fr); }
.code-pane > header { display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid var(--line); color: var(--quiet); font: 9px var(--mono); }
.code-pane > header span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-pane > header button { flex: 0 0 auto; margin-left: 12px; border: 0; color: var(--sage); background: transparent; cursor: pointer; }
.code-pane pre { margin: 0; overflow: auto; padding: 20px 23px 50px; color: #cad3ce; font: 11px/1.72 var(--mono); tab-size: 2; }
.adapt-panel { max-width: 920px; }
.adapt-panel h3 { margin: 0 0 14px; font: 650 30px var(--display); }
.adapt-panel > p { color: var(--muted); }
.adapt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.adapt-card { min-height: 155px; padding: 19px; border: 1px solid var(--line); background: #111614; }
.adapt-card small { color: var(--sage); font: 9px var(--mono); letter-spacing: .1em; }
.adapt-card b { display: block; margin-top: 10px; font-size: 15px; }
.adapt-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.adapt-warning { padding: 18px 20px; border: 1px solid rgba(194,127,102,.35); color: #d9b2a3; background: rgba(194,127,102,.06); }

.page-footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-top: 1px solid var(--line); color: var(--quiet); background: #090b0b; font: 10px var(--mono); letter-spacing: .1em; }
.page-footer a { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 60px 1fr; }
  .hero-rule { grid-column: 2; }
  .workflow-rail { grid-template-columns: repeat(3,1fr); }
  .library-layout { grid-template-columns: 220px minmax(0,1fr); }
  .shot-grid { grid-template-columns: 1fr; }
  .pack-card { grid-column: span 6 !important; }
}

@media (max-width: 760px) {
  .topbar { padding: 0 18px; }
  .topnav a { display: none; }
  .identity small { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 70px 22px; }
  .hero-index { display: none; }
  .hero h1 { font-size: 56px; }
  .hero-rule { grid-column: 1; }
  .workflow-section, .pack-section, .library-section { padding: 70px 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .workflow-rail { grid-template-columns: 1fr 1fr; }
  .workflow-rail li { min-height: 190px; }
  .workflow-note { grid-template-columns: 1fr; }
  .pack-grid { display: block; }
  .pack-card { margin-bottom: 14px; }
  .library-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; max-height: none; }
  .library-controls { top: 110px; }
  .shot-grid { grid-template-columns: 1fr; }
  .selection-bar { grid-template-columns: 1fr auto; }
  .selection-preview { display: none; }
  .preview-shell { grid-template-columns: 1fr; }
  .preview-shell video { min-height: 0; }
  .selection-row { grid-template-columns: 28px 1fr 36px; }
  .selection-row select, .selection-row .confirm-selection { grid-column: 2; }
  .offline-strip { top: 76px; padding: 0 18px; }
  .offline-strip > span:last-child { display: none; }
  .deep-dialog { width: calc(100vw - 12px); height: calc(100vh - 12px); }
  .deep-shell { display: block; overflow: auto; }
  .deep-header { position: sticky; top: 0; z-index: 5; min-height: 82px; padding: 0 16px; }
  .deep-header h2 { font-size: 22px; }
  .deep-header-actions .ghost-button { display: none; }
  .deep-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .deep-tabs { grid-template-columns: 1fr 1fr; }
  .deep-content { overflow: visible; }
  .deep-content > section { padding: 30px 18px 60px; }
  .code-workbench { height: auto; min-height: 650px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .code-workbench > aside { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .adapt-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
