:root {
  --paper: #ffffff;
  --surface: #f9fafb;
  --surface-2: #f3f4f6;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --signal: #0ea5e9;
  --signal-dark: #0284c7;
  --risk: #ef4444;
  --verified: #10b981;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Archivo', sans-serif;
  --display: 'Archivo', sans-serif;
  --editorial: 'Newsreader', Georgia, serif;
  --max: 1280px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -1px rgba(0,0,0,.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.06), 0 4px 6px -2px rgba(0,0,0,.03);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
input, select, textarea { border-radius: 0; }
canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { margin-bottom: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: 64px; }
h2 { font-size: 40px; }
h3 { letter-spacing: 0; font-weight: 600; }
main { min-height: 72vh; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: #bae6fd; color: var(--ink); }

.site-header { position: sticky; top: 0; z-index: 30; max-width: var(--max); height: 76px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; white-space: nowrap; font-size: 17px; }
.brand > small { color: var(--muted); font-family: var(--sans); font-size: 11px; font-weight: 500; }
.brand-chip { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--signal); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.main-nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.main-nav a { min-height: 44px; padding: 13px 0 10px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .15s; }
.main-nav a:hover, .main-nav a.is-active { color: var(--signal); }
.main-nav .mobile-search-link { display: none; }
.header-search { min-width: 120px; min-height: 40px; padding: 8px 12px; border-radius: 20px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; gap: 10px; transition: background .15s; }
.header-search:hover { background: var(--surface-2); color: var(--ink); }
.header-search kbd { padding: 2px 6px; border-radius: 6px; background: var(--paper); font-family: var(--mono); font-size: 10px; }
.nav-toggle { display: none; }
.icon-button { width: 42px; height: 42px; border: 0; background: transparent; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--ink); border-radius: 1px; transition: transform .16s; }

.home-shell, .page-shell, .detail-shell, .article-shell, .topic-shell, .tool-shell, .search-shell { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section-kicker, .blueprint-label { display: block; color: var(--signal); font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.signal-tag { display: inline-flex; padding: 7px 11px; border-radius: 20px; background: #e0f2fe; color: var(--signal-dark); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.text-link, .source-link, .text-action { color: var(--signal); font-size: 13px; font-weight: 600; }
.text-link:hover, .source-link:hover, .text-action:hover { color: var(--signal-dark); }
.lede { max-width: 740px; color: var(--muted); font-size: 21px; line-height: 1.5; }
.button { min-height: 48px; padding: 12px 20px; border: 0; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; transition: transform .12s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover { background: #374151; }
.button-light { background: var(--surface-2); color: var(--ink); }
.button-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.button-outline:hover { border-color: var(--signal); color: var(--signal); }
.button-signal { background: var(--signal); color: #fff; box-shadow: 0 4px 14px rgba(14,165,233,.35); }
.button-signal:hover { background: var(--signal-dark); box-shadow: 0 6px 18px rgba(14,165,233,.4); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.is-copied { border-color: var(--verified) !important; background: var(--verified) !important; color: #fff !important; }

/* Run Planner */
.run-planner { min-height: 700px; display: grid; grid-template-columns: minmax(0, .86fr) minmax(540px, 1.14fr); gap: 48px; padding: 48px 0 64px; }
.run-planner.is-home { min-height: calc(100vh - 76px); align-items: center; }
.planner-controls { display: flex; flex-direction: column; justify-content: center; }
.planner-title { margin-bottom: 36px; }
.planner-title h1 { max-width: 700px; margin: 20px 0 22px; font-size: 58px; }
.planner-title p { max-width: 610px; margin: 0; color: var(--muted); font-size: 18px; }
.planner-step { padding: 22px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 36px 1fr; gap: 16px; }
.planner-step > div, .planner-step fieldset { min-width: 0; }
.step-index { color: var(--signal); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.planner-step strong, .planner-step legend { margin: 0 0 12px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { cursor: pointer; }
.segmented input, .input-option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 42px; padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--line); display: block; color: var(--muted); font-size: 13px; font-weight: 500; transition: all .15s; }
.segmented input:checked + span { border-color: var(--signal); background: #e0f2fe; color: var(--signal-dark); }
.planner-step fieldset { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.planner-step legend { grid-column: 1 / -1; }
.input-option { min-height: 56px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; }
.input-option:hover { background: var(--surface); }
.input-option:has(input:checked) { border-color: var(--signal); background: #f0f9ff; box-shadow: 0 0 0 1px var(--signal); }
.input-option b, .input-option small { display: block; }
.input-option b { font-size: 13px; font-weight: 600; }
.input-option small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.setting-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.setting-row label, .builder-fields label, .calculator-fields label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.setting-row select { width: 100%; margin-top: 8px; padding: 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.planner-output { padding: 32px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: center; }
.shot-monitor { border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.monitor-bar, .monitor-caption { min-height: 40px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.monitor-bar { border-bottom: 1px solid var(--line); }
.monitor-caption { border-top: 1px solid var(--line); }
.monitor-bar time { color: var(--signal); font-weight: 600; }
.shot-monitor canvas { width: 100%; aspect-ratio: 16 / 9; background: #f3f4f6 url('/assets/imagegen/h3-monitor-product-v2.webp') center / cover no-repeat; border-radius: 0; }
.shot-monitor canvas.is-loading { opacity: .8; }
.mode-result { margin-top: 28px; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: end; }
.mode-result > span, .mode-result > small { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.mode-result > span { grid-column: 1 / -1; }
.mode-result > strong { color: var(--signal); font-size: 28px; line-height: 1.1; }
.planner-output > p { margin: 12px 0 22px; color: #4b5563; font-size: 14px; }
.shot-timeline { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.time-ruler, .shot-timeline > div { min-height: 28px; display: grid; grid-template-columns: 64px 1fr; align-items: center; }
.shot-timeline .time-ruler { grid-template-columns: repeat(4, 1fr); padding-left: 64px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.shot-timeline b { color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 500; }
.shot-timeline i { height: 5px; background: var(--line); position: relative; border-radius: 3px; }
.shot-timeline i:before { content: ''; position: absolute; left: 10%; top: -2px; width: 38%; height: 9px; border-radius: 3px; background: var(--signal); }
.shot-timeline > div:nth-child(3) i:before { left: 25%; width: 55%; background: #94a3b8; }
.shot-timeline > div:nth-child(4) i:before { left: 5%; width: 82%; background: #cbd5e1; }
.shot-timeline .is-reference:before { left: 4%; width: 78%; }
.input-rules { margin: 20px 0; padding: 16px; border-radius: var(--radius); background: #fff; display: grid; grid-template-columns: 100px 1fr; gap: 14px; }
.input-rules span { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.input-rules p { margin: 0; color: var(--muted); font-size: 12px; }
.planner-actions { display: flex; align-items: center; gap: 20px; }

/* Home flow */
.pipeline-section, .home-recipes, .home-examples { padding: 100px 0; }
.section-heading { margin-bottom: 36px; display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.section-heading h2 { margin-top: 14px; }
.section-heading p { max-width: 620px; margin: 14px 0 0; color: var(--muted); }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool-card { min-height: 260px; padding: 28px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; transition: transform .18s, box-shadow .18s; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tool-number, .tool-copy small { color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 500; }
.tool-copy strong { display: block; margin: 28px 0 12px; font-size: 20px; line-height: 1.2; }
.tool-copy p { color: var(--muted); font-size: 14px; }
.tool-action { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--signal); }
.tool-card:hover .tool-action { color: var(--signal-dark); }
.tool-index { margin-bottom: 100px; }
.failure-atlas { margin: 0 calc((var(--max) - 100vw) / 2); padding: 80px max(32px, calc((100vw - var(--max)) / 2)); background: linear-gradient(135deg, #eff6ff, #f0f9ff); color: var(--ink); display: grid; grid-template-columns: .72fr 1.28fr; gap: 70px; }
.failure-atlas .section-kicker { color: var(--signal-dark); }
.atlas-heading h2 { margin: 14px 0 18px; }
.atlas-heading p { max-width: 440px; color: #4b5563; }
.failure-atlas .button-signal { background: var(--ink); color: #fff; box-shadow: none; }
.failure-atlas .button-signal:hover { background: #374151; }
.atlas-list { border-top: 1px solid var(--line); }
.atlas-list a { min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 35px 1fr auto; gap: 14px; align-items: center; transition: padding .16s, background .16s; }
.atlas-list a:hover { padding-left: 10px; padding-right: 10px; background: rgba(255,255,255,.6); border-radius: 8px; }
.atlas-list span, .atlas-list small { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.atlas-list strong { font-size: 14px; }
.shot-list { display: grid; gap: 16px; }
.shot-row { min-height: 130px; padding: 18px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: grid; grid-template-columns: 42px 118px 200px 1fr 110px; gap: 20px; align-items: center; transition: transform .16s, box-shadow .16s; }
.shot-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shot-number { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.shot-visual { width: 118px; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--surface-2); }
.shot-visual.is-empty { background: var(--surface-2); }
.shot-visual img { width: 100%; height: 100%; display: block; object-fit: cover; }
.mini-timeline { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.mini-timeline i { height: 1px; background: var(--line-strong); }
.mini-timeline b { padding: 8px; border-radius: 6px; background: #e0f2fe; color: var(--signal-dark); font-family: var(--mono); font-size: 9px; }
.shot-row-copy small { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.shot-row-copy h2 { margin: 8px 0 6px; font-family: var(--sans); font-size: 18px; }
.shot-row-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.shot-row-meta { display: grid; gap: 5px; justify-items: end; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.shot-row-meta b { margin-top: 8px; color: var(--signal); }
.trust-strip { margin-bottom: 100px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--muted); }
.trust-strip span:before { content: '✓'; margin-right: 8px; color: var(--verified); font-weight: 700; }

/* Prompt-result examples */
.example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.example-card { min-width: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.example-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.example-meta { min-height: 46px; padding: 12px 16px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.example-meta span { color: var(--signal); font-weight: 600; }
.example-stage { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.example-cover { position: relative; width: 100%; height: 100%; }
.example-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.example-cover-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.4)); }
.example-play-button { position: absolute; left: 22px; bottom: 22px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-md); transition: transform .12s; }
.example-play-button span:first-child { font-size: 12px; line-height: 1; }
.example-play-button:hover { transform: scale(1.03); }
.example-duration { position: absolute; right: 14px; bottom: 14px; padding: 7px 9px; border-radius: 6px; background: rgba(0,0,0,.7); color: #fff; font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.example-copy { min-height: 260px; padding: 24px; }
.example-copy > small { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.example-copy h3 { margin: 14px 0 12px; font-size: 23px; }
.example-excerpt { margin: 0 0 14px; color: var(--ink) !important; font-family: var(--editorial); font-size: 18px !important; line-height: 1.3; }
.example-copy > p { color: var(--muted); font-size: 14px; }
.example-copy dl { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.example-copy dt { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.example-copy dd { margin: 0; font-size: 13px; }
.example-source { min-height: 54px; padding: 12px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.example-source span { color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; }
.example-source a { flex: 0 0 auto; color: var(--signal); font-size: 11px; font-weight: 600; }
.example-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.home-examples-featured { border-bottom: 1px solid var(--line); }
.examples-page { padding-bottom: 100px; }
.example-policy { margin: -4px 0 38px; padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 28px; }
.example-policy span { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.example-policy p { max-width: 800px; margin: 0; color: var(--muted); font-size: 13px; }
.example-method { margin-top: 80px; padding: 48px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.example-method h2 { margin-top: 14px; }
.example-method p { color: var(--muted); font-size: 15px; }
.example-method .button { margin-top: 10px; }

/* Indexes */
.page-intro { padding: 80px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 32px; display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.page-intro h1 { margin: 14px 0 16px; }
.page-intro p { max-width: 720px; margin: 0; color: var(--muted); font-size: 19px; }
.page-count { padding-bottom: 7px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.filter-bar { margin: 24px 0 32px; display: flex; gap: 14px; align-items: end; }
.filter-bar label { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-bar select { min-width: 180px; margin-top: 8px; padding: 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.filter-bar > span { margin-left: auto; padding-bottom: 10px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.filter-empty { padding: 38px 0 80px; color: var(--muted); display: flex; align-items: center; gap: 18px; }
.filter-empty button { min-height: 42px; padding: 9px 14px; border: 0; border-radius: var(--radius); background: var(--signal); color: #fff; font-size: 12px; font-weight: 600; }
.cluster-nav { padding: 12px 0 38px; display: flex; flex-wrap: wrap; gap: 8px; }
.cluster-nav a { min-height: 38px; padding: 9px 12px; border-radius: 20px; border: 1px solid var(--line); font-size: 12px; font-weight: 500; transition: all .15s; }
.cluster-nav a:hover { border-color: var(--signal); color: var(--signal); background: #f0f9ff; }
.topic-cluster { padding: 32px 0 64px; border-top: 1px solid var(--line); scroll-margin-top: 20px; }
.cluster-heading { margin-bottom: 18px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); }
.cluster-heading small { color: var(--muted); }
.topic-grid { display: grid; gap: 12px; }
.topic-card { min-height: 96px; padding: 18px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: grid; grid-template-columns: 150px 280px 1fr 110px; gap: 18px; align-items: center; transition: transform .16s, box-shadow .16s; }
.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.topic-card small { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.topic-card h2 { font-family: var(--sans); font-size: 16px; line-height: 1.3; }
.topic-card p { margin: 0; color: var(--muted); font-size: 13px; }
.topic-card > span { justify-self: end; color: var(--signal); font-size: 11px; font-weight: 600; }
.content-list { display: grid; gap: 12px; margin-bottom: 100px; }
.content-row { min-height: 96px; padding: 14px 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: grid; grid-template-columns: 38px 1fr auto 32px; gap: 18px; align-items: center; transition: transform .16s, box-shadow .16s; }
.content-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.row-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.row-copy strong, .row-copy small { display: block; }
.row-copy strong { font-size: 15px; }
.row-copy small { max-width: 760px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.row-label, .row-arrow { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }

/* Briefs and reference pages */
.back-link { display: inline-flex; min-height: 44px; padding-top: 28px; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.back-link:hover { color: var(--signal); }
.detail-top { padding: 60px 0 40px; display: flex; justify-content: space-between; gap: 40px; align-items: end; }
.detail-top h1 { max-width: 880px; margin: 14px 0 18px; }
.evidence-stamp { flex: 0 0 auto; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.evidence-stamp small { display: block; margin-top: 5px; font-size: 10px; text-transform: none; }
.recipe-blueprint { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.blueprint-main { padding-top: 32px; }
.shot-track { margin-top: 14px; padding: 24px; border-radius: var(--radius); background: var(--surface); }
.track-ruler { padding-left: 78px; display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.shot-track > div:not(.track-ruler) { min-height: 46px; display: grid; grid-template-columns: 68px 1fr 38px; gap: 10px; align-items: center; }
.shot-track b, .shot-track em { color: var(--muted); font-family: var(--mono); font-size: 9px; font-style: normal; }
.shot-track i { height: 6px; background: var(--line); position: relative; border-radius: 3px; }
.shot-track i:before { content: ''; position: absolute; top: -3px; height: 12px; border-radius: 3px; background: var(--signal); }
.track-input:before { left: 0; width: 38%; }.track-action:before { left: 15%; width: 62%; }.track-camera:before { left: 35%; width: 45%; background: var(--ink) !important; }.track-audio:before { left: 5%; width: 90%; background: var(--line-strong) !important; }
.observation-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.observation-grid > div { padding-top: 12px; border-top: 2px solid var(--verified); }
.observation-grid > div:last-child { border-color: var(--risk); }
.observation-grid span { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.observation-grid p { margin: 8px 0 0; font-size: 14px; }
.evidence-rail { padding: 32px 0 0 28px; border-left: 1px solid var(--line); }
.evidence-rail dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.evidence-rail dt, .evidence-rail dd { margin: 0; font-size: 12px; }
.evidence-rail dt { color: var(--muted); }.evidence-rail dd { font-family: var(--mono); font-size: 10px; text-align: right; }
.tag-cloud { padding: 18px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud span { padding: 5px 8px; border-radius: 6px; background: var(--surface); color: var(--muted); font-family: var(--mono); font-size: 10px; }
.prompt-workspace { margin: 72px 0 44px; padding: 32px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.prompt-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.prompt-heading h2 { margin-top: 10px; }
.prompt-workspace pre { margin: 24px 0 15px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #374151; white-space: pre-wrap; font-family: var(--mono); font-size: 13px; line-height: 1.8; }
.prompt-workspace > p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-next { padding: 0 0 90px; display: flex; gap: 12px; }
.detail-next a { flex: 1; min-height: 56px; padding: 17px; border-radius: var(--radius); background: var(--surface); color: var(--signal); font-size: 13px; font-weight: 600; transition: all .15s; }
.detail-next a:hover { background: var(--signal); color: #fff; }
.article-heading { padding: 60px 0 40px; border-bottom: 1px solid var(--line); }
.article-heading h1 { max-width: 940px; margin: 14px 0 20px; }
.article-body { max-width: 880px; margin: 0 auto; padding: 28px 0 48px; }
.article-section { padding: 32px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 250px 1fr; gap: 44px; }
.article-section h2 { font-family: var(--sans); font-size: 20px; line-height: 1.3; }
.article-section p { margin: 0; color: var(--muted); font-size: 16px; }
.article-source { max-width: 880px; margin: 0 auto; padding-bottom: 90px; }

/* Topic */
.topic-heading { padding: 56px 0 40px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: end; }
.topic-heading h1 { margin-top: 14px; font-family: var(--editorial); font-size: 54px; line-height: 1.05; }
.answer-block { padding: 22px 0 22px 25px; border-left: 3px solid var(--signal); }
.answer-block span { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.answer-block p { margin: 10px 0 0; color: #374151; font-size: 17px; }
.topic-procedure { padding: 56px 0; display: grid; grid-template-columns: 1fr 330px; gap: 65px; }
.topic-procedure ol { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: steps; }
.topic-procedure li { min-height: 76px; padding: 18px 0 18px 52px; border-top: 1px solid var(--line); position: relative; counter-increment: steps; }
.topic-procedure li:before { content: '0' counter(steps); position: absolute; left: 0; color: var(--signal); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.topic-procedure aside { padding: 24px; border-radius: var(--radius); background: var(--surface); align-self: start; }
.topic-procedure aside label { min-height: 52px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; font-size: 13px; }
.topic-procedure aside input { width: 18px; height: 18px; accent-color: var(--signal); }
.topic-actions { padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 22px; align-items: center; }
.topic-actions small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.related-topics { padding: 72px 0 90px; }
.related-topics > .section-kicker { margin-bottom: 20px; }

/* Tools */
.tool-heading { max-width: 850px; padding: 48px 0 36px; }
.tool-heading h1 { margin: 14px 0 16px; }
.tool-heading p { max-width: 680px; color: var(--muted); font-size: 19px; }
.tool-heading small { color: var(--verified); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.tool-shell > .run-planner, .builder, .calculator, .diagnostic { margin-bottom: 100px; border-top: 1px solid var(--line); }
.tool-shell > .run-planner { min-height: 670px; }
.tool-shell > .run-planner .planner-title { display: none; }
.tool-shell > .run-planner .planner-output { margin-right: 0; }
.preset-strip { min-height: 62px; padding: 10px 0; display: flex; gap: 8px; align-items: center; }
.preset-strip > span { margin-right: 12px; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.preset-strip button, .output-tabs button { min-height: 38px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; transition: all .15s; }
.preset-strip button:hover, .preset-strip button.is-active, .output-tabs button.is-active { border-color: var(--signal); color: var(--signal); background: #f0f9ff; }
.mobile-preview { display: none; }
.builder { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.builder-fields { padding: 36px 44px 36px 0; display: grid; gap: 18px; }
.builder textarea, .builder select, .calculator input, .calculator select { width: 100%; margin-top: 8px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-family: var(--sans); font-size: 14px; text-transform: none; }
.builder textarea { min-height: 80px; resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-trio { display: grid; grid-template-columns: 1.5fr .7fr .7fr; gap: 12px; }
.builder-output { position: sticky; top: 90px; min-height: 680px; padding: 32px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.output-tabs { display: flex; align-items: center; gap: 7px; }
.output-tabs span { margin-left: auto; color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.builder-output pre { flex: 1; min-height: 340px; margin: 24px 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: #374151; font-family: var(--mono); font-size: 13px; line-height: 1.75; }
.builder-output pre[hidden] { display: none; }
.builder-warnings { margin-bottom: 20px; display: grid; gap: 6px; }
.builder-warnings span { padding-left: 16px; color: #b91c1c; font-size: 11px; position: relative; }
.builder-warnings span:before { content: '!'; position: absolute; left: 0; color: var(--risk); font-family: var(--mono); font-weight: 700; }
.builder-warnings .is-ready { color: #047857; }
.builder-warnings .is-ready:before { content: 'OK'; color: var(--verified); }
.builder-output .button { align-self: flex-start; }
.calculator { display: grid; grid-template-columns: 1fr .9fr; }
.calculator-fields { padding: 36px 44px 36px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calculator-fields label { min-height: 116px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.calculator-fields label > span { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); }
.calculator input, .calculator select { border-width: 0 0 1px; border-radius: 0; padding-left: 0; padding-right: 0; background: transparent; font-family: var(--mono); font-size: 18px; }
.cost-readout { padding: 36px; border-radius: 16px; background: linear-gradient(135deg, #e0f2fe, #f0f9ff); color: var(--ink); }
.cost-readout > span { font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--signal-dark); }
.cost-readout > strong { display: block; margin: 16px 0 30px; font-family: var(--mono); font-size: 56px; line-height: 1; }
.cost-readout > div { border-top: 1px solid rgba(14,165,233,.2); }
.cost-readout p { margin: 0; padding: 12px 0; border-bottom: 1px solid rgba(14,165,233,.2); display: flex; justify-content: space-between; font-size: 13px; }
.cost-readout p b { font-family: var(--mono); }
.cost-readout > small { display: block; margin: 22px 0; color: #0369a1; font-size: 11px; }
.cost-readout .source-link { color: var(--signal-dark); }
.diagnostic { min-height: 520px; display: grid; grid-template-columns: .72fr 1.28fr; }
.diagnostic-choices { padding: 36px 44px 36px 0; }
.diagnostic-choices > .section-kicker { margin-bottom: 16px; }
.choice { min-height: 68px; border-top: 1px solid var(--line); display: flex; align-items: center; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { padding-left: 30px; position: relative; }
.choice span:before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); }
.choice input:checked + span:before { border-color: var(--signal); background: var(--signal); box-shadow: inset 0 0 0 3px #fff; }
.choice b { font-size: 14px; }
.diagnostic-readout { padding: 36px 44px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.readout-top { padding-bottom: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; }
.readout-top span:last-child { color: var(--signal); }
.diagnostic-readout h2 { max-width: 620px; margin: 32px 0 16px; color: var(--signal); font-size: 42px; }
.diagnostic-readout > p { color: #4b5563; }
.diagnostic-readout ol { margin: 28px 0; padding: 0; list-style: none; counter-reset: fix; }
.diagnostic-readout li { padding: 14px 0 14px 42px; border-top: 1px solid var(--line); position: relative; counter-increment: fix; font-size: 13px; }
.diagnostic-readout li:before { content: '0' counter(fix); position: absolute; left: 0; color: var(--risk); font-family: var(--mono); font-size: 10px; font-weight: 600; }
.diagnostic-readout > a { color: var(--signal); font-size: 13px; font-weight: 600; }

/* Search, updates, footer */
.search-heading { max-width: 930px; padding: 76px 0 46px; }
.search-heading h1 { margin: 14px 0 30px; }
.site-search { display: flex; border-bottom: 2px solid var(--line); transition: border-color .15s; }
.site-search:focus-within { border-color: var(--signal); }
.site-search input { min-width: 0; flex: 1; padding: 16px 0; border: 0; outline: 0; background: transparent; font-size: 20px; }
.site-search button { min-width: 110px; border: 0; border-radius: 8px; background: var(--signal); color: #fff; font-size: 13px; font-weight: 600; }
.search-results { margin-bottom: 100px; border-top: 1px solid var(--line); }
.search-result { min-height: 104px; padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 140px 1fr 45px; gap: 18px; align-items: center; transition: padding .16s, background .16s; }
.search-result:hover { padding-left: 10px; padding-right: 10px; background: var(--surface); border-radius: 8px; }
.search-result small { color: var(--signal); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.search-result h2 { margin: 0 0 5px; font-family: var(--sans); font-size: 16px; }
.search-result p { margin: 0; color: var(--muted); font-size: 13px; }
.search-result > b { color: var(--signal); font-size: 11px; }
.empty-state { padding: 38px 0; color: var(--muted); }
.update-entry { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 28px; }
.update-entry time { color: var(--muted); font-family: var(--mono); font-size: 10px; }.update-entry h2 { margin-bottom: 8px; font-family: var(--sans); font-size: 19px; }.update-entry p { color: var(--muted); font-size: 14px; }
.not-found { max-width: 860px; min-height: 70vh; margin: 0 auto; padding: 110px 32px; }
.not-found h1 { margin: 18px 0; }.not-found p { color: var(--muted); }.not-found > div { display: flex; gap: 10px; }
.site-footer { max-width: var(--max); margin: 0 auto; padding: 60px 32px 28px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, .7fr); gap: 42px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.footer-grid p { max-width: 380px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.footer-grid a:not(.brand) { min-height: 40px; padding: 10px 0; color: var(--muted); font-size: 14px; transition: color .15s; }
.footer-grid a:hover { color: var(--signal); }
.footer-label { margin-bottom: 6px; color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.footer-bottom { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-family: var(--mono); font-size: 10px; }

@media (max-width: 1050px) {
  h1 { font-size: 52px; }
  .main-nav { gap: 16px; }
  .run-planner, .run-planner.is-home { min-height: auto; grid-template-columns: 1fr; }
  .planner-controls { padding: 60px 0; }
  .planner-output { margin: 0; padding: 28px; }
  .tool-shell > .run-planner .planner-output { margin: 0; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .tool-card:nth-child(2) { border-right: 0; }
  .tool-card:nth-child(-n+2) { margin-bottom: 0; }
  .topic-card { grid-template-columns: 130px 230px 1fr; }
  .topic-card > span { display: none; }
  .builder, .calculator, .diagnostic { grid-template-columns: 1fr; }
  .builder-fields, .calculator-fields, .diagnostic-choices { padding-right: 0; }
  .builder-output { position: relative; min-height: 560px; border: 1px solid var(--line); }
  .cost-readout, .diagnostic-readout { border-left: 0; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .site-header { height: 64px; padding: 0 20px; }
  .brand > small, .header-search { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .main-nav { display: none; position: absolute; z-index: 40; left: 20px; right: 20px; top: 63px; padding: 14px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); }
  .main-nav.is-open { display: grid; }
  .main-nav a { min-height: 48px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .main-nav .mobile-search-link { display: block; color: var(--signal); }
  body.nav-open:after { content: ''; position: fixed; z-index: 20; inset: 64px 0 0; background: rgba(0,0,0,.25); }
  .home-shell, .page-shell, .detail-shell, .article-shell, .topic-shell, .tool-shell, .search-shell { padding: 0 20px; }
  .planner-controls { padding: 48px 0; }
  .planner-title h1 { font-size: 42px; }
  .planner-step fieldset { grid-template-columns: 1fr; }
  .setting-row { grid-template-columns: 1fr 1fr 1fr; }
  .planner-output { padding: 24px 20px; }
  .mode-result { grid-template-columns: 1fr; }
  .mode-result > strong { font-size: 25px; }
  .input-rules { grid-template-columns: 1fr; gap: 5px; }
  .planner-actions { align-items: stretch; flex-direction: column; }
  .pipeline-section, .home-recipes, .home-examples { padding: 72px 0; }
  .pipeline { grid-template-columns: 1fr; }
  .tool-card { min-height: 200px; }
  .failure-atlas { margin: 0 -20px; padding: 60px 20px; grid-template-columns: 1fr; gap: 38px; }
  .atlas-list a { grid-template-columns: 30px 1fr; }
  .atlas-list small { grid-column: 2; }
  .section-heading { align-items: start; flex-direction: column; }
  .shot-row { grid-template-columns: 34px 1fr; gap: 10px; }
  .shot-visual { grid-column: 2; width: 88px; }
  .mini-timeline { grid-column: 2; width: 180px; }
  .shot-row-copy { grid-column: 2; }
  .shot-row-meta { grid-column: 2; display: flex; justify-items: start; gap: 12px; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .example-stage { aspect-ratio: 4 / 3; }
  .example-copy { min-height: 0; }
  .example-policy, .example-method { grid-template-columns: 1fr; gap: 15px; }
  .example-method { margin-top: 55px; }
  .example-source { align-items: flex-start; flex-direction: column; }
  .page-intro { padding: 56px 0 36px; align-items: start; flex-direction: column; gap: 12px; }
  .page-intro h1 { font-size: 42px; }
  .filter-bar { align-items: stretch; flex-direction: column; }.filter-bar label, .filter-bar select { width: 100%; }.filter-bar > span { margin-left: 0; }
  .topic-card { grid-template-columns: 1fr; gap: 7px; }.topic-card p { font-size: 13px; }.topic-card h2 { font-size: 17px; }
  .row-label { display: none; }.content-row { grid-template-columns: 34px 1fr 25px; gap: 10px; }
  .detail-top { padding: 48px 0 32px; align-items: start; flex-direction: column; }.detail-top h1 { font-size: 42px; }
  .recipe-blueprint { grid-template-columns: 1fr; }.evidence-rail { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }.observation-grid { grid-template-columns: 1fr; }
  .prompt-workspace { padding: 22px 18px; }.prompt-heading { align-items: start; flex-direction: column; }.detail-next { flex-direction: column; }
  .article-heading h1, .tool-heading h1 { font-size: 42px; }.article-section { grid-template-columns: 1fr; gap: 11px; }
  .topic-heading { grid-template-columns: 1fr; gap: 25px; }.topic-heading h1 { font-size: 40px; }.answer-block { padding-left: 18px; }.topic-procedure { grid-template-columns: 1fr; }.topic-actions { align-items: start; flex-direction: column; }.topic-actions small { margin-left: 0; }
  .preset-strip { overflow-x: auto; }.preset-strip > span { display: none; }.preset-strip button { flex: 0 0 auto; }
  .field-trio, .field-pair, .calculator-fields { grid-template-columns: 1fr; }
  .mobile-preview { position: fixed; z-index: 18; left: 20px; right: 20px; bottom: 16px; min-height: 52px; padding: 12px 16px; border: 0; border-radius: 26px; background: var(--signal); color: #fff; display: flex; justify-content: space-between; font-weight: 600; box-shadow: var(--shadow-lg); }
  .builder-output { display: none; position: fixed; z-index: 50; inset: 64px 0 0; min-height: 0; padding: 24px 20px 84px; border: 0; border-radius: 0; overflow: auto; }
  .mobile-preview { z-index: 60; }
  .builder-output.is-mobile-open { display: flex; }
  .builder-output pre { min-height: 260px; }.output-tabs { flex-wrap: wrap; }.output-tabs span { width: 100%; margin: 8px 0 0; }
  .cost-readout > strong { font-size: 44px; }.diagnostic-readout { padding: 28px 20px; }.diagnostic-readout h2 { font-size: 34px; }
  .search-heading h1 { font-size: 42px; }.search-result { grid-template-columns: 1fr auto; }.search-result small { grid-column: 1 / -1; }
  .update-entry { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }.footer-grid > div:first-child { grid-column: 1 / -1; }.footer-bottom { flex-direction: column; }
}

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