:root {
  --paper: #eee9dd;
  --sheet: #faf7ee;
  --ink: #1c1a17;
  --muted: #5d5b54;
  --rule: #a7a092;
  --red: #df3d31;
  --blue: #194583;
  --ochre: #e4a517;
  --signal: #b9e0d8;
  --display: Impact, "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
p { line-height: 1.5; }
::selection { color: var(--sheet); background: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.skip-link { position: absolute; top: -100px; left: 14px; z-index: 100; padding: 12px; background: var(--ochre); font-weight: bold; }
.skip-link:focus { top: 12px; }

/* Masthead */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 30px; min-height: 76px; padding: 10px clamp(22px, 4vw, 72px); color: var(--ink); background: var(--paper); border-bottom: 2px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-emblem { width: 46px; height: 46px; display: grid; place-items: center; position: relative; border-radius: 50%; background: var(--ink); overflow: hidden; }
.brand-emblem::before { content: ""; width: 37px; height: 17px; border: 3px solid var(--paper); border-radius: 50%; transform: rotate(-27deg); }
.brand-emblem::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
.brand-name { font-family: var(--display); font-size: 21px; line-height: 1; letter-spacing: .025em; }
.brand-name small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10px; font-weight: bold; letter-spacing: .08em; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 2.3vw, 38px); margin-left: auto; }
.site-header nav a { text-decoration: none; font-size: 12px; font-weight: bold; }
.site-header nav a:hover { color: var(--red); }
.header-action { display: inline-flex; gap: 18px; align-items: center; background: var(--red); color: white; border: 2px solid var(--ink); padding: 11px 13px; font: bold 11px var(--mono); text-decoration: none; white-space: nowrap; box-shadow: 4px 4px 0 var(--ink); }
.header-action:hover { background: var(--blue); }

/* Cover */
.hero { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); min-height: 625px; border-bottom: 2px solid var(--ink); }
.hero-copy { display: flex; flex-direction: column; padding: 58px clamp(22px, 5vw, 86px) 26px; border-right: 2px solid var(--ink); }
.hero-kicker, .hero-index, .section-label, .section-topline, .eyebrow, .section-number, .poster figcaption, .poster-wall-tag { font: bold 11px var(--mono); letter-spacing: .065em; }
.hero-kicker { display: flex; align-items: center; gap: 10px; }
.signal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); margin-right: 5px; }
.hero h1 { display: flex; flex-direction: column; font: 400 clamp(105px, 12vw, 208px)/.76 var(--display); letter-spacing: -.045em; margin: 46px 0 28px; }
.hero h1 span:nth-child(2) { color: var(--red); }
.year-stop { color: var(--ink); }
.hero-lead { max-width: 650px; margin: 0 0 12px; font: 400 clamp(24px, 2.8vw, 42px)/1.08 var(--display); letter-spacing: -.015em; }
.hero-body { max-width: 540px; margin: 0; color: #3f3c36; font-size: 15px; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 23px; margin-top: 31px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border: 2px solid var(--ink); text-decoration: none; font-size: 12px; font-weight: bold; min-height: 45px; }
.button-ink { background: var(--ink); color: var(--sheet); }
.button-ink:hover { background: var(--red); }
.button-line { color: var(--ink); background: transparent; }
.button-line:hover { background: var(--ochre); }
.hero-secondary { font-size: 12px; font-weight: bold; text-underline-offset: 4px; }
.hero-index { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 42px; color: var(--muted); font-size: 9px; }
.poster-wall { position: relative; display: flex; align-items: center; justify-content: center; min-height: 625px; overflow: hidden; background: var(--ink); padding: 54px 25px 64px; isolation: isolate; }
.poster-wall::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .3; background: repeating-linear-gradient(0deg, transparent 0 42px, #868074 43px, transparent 44px), repeating-linear-gradient(90deg, transparent 0 42px, #868074 43px, transparent 44px); }
.poster { width: 29%; max-width: 235px; margin: 0 -4px; position: relative; box-shadow: 10px 14px 0 rgba(0,0,0,.33); transition: transform .25s; }
.poster img { width: 100%; aspect-ratio: 600 / 780; object-fit: cover; border: 5px solid var(--sheet); }
.poster figcaption { position: absolute; left: 0; right: 0; bottom: -27px; color: var(--paper); font-size: 9px; }
.poster-one { transform: rotate(-11deg) translate(5px, 13px); z-index: 1; }
.poster-two { transform: rotate(4deg) translateY(-22px); z-index: 3; }
.poster-three { transform: rotate(12deg) translate(-5px, 14px); z-index: 2; }
.poster-one:hover { transform: rotate(-7deg) translateY(-9px); }
.poster-two:hover { transform: rotate(2deg) translateY(-42px); }
.poster-three:hover { transform: rotate(8deg) translateY(-9px); }
.poster-wall-tag { position: absolute; bottom: 16px; right: 22px; color: var(--signal); font-size: 9px; }

/* Shared section grammar */
.section-pad { padding: 70px clamp(22px, 4vw, 72px) 84px; scroll-margin-top: 86px; }
.section-topline, .section-label { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 370px); align-items: end; gap: 50px; padding: 45px 0 32px; }
.eyebrow { margin: 0 0 17px; color: var(--red); }
.section-heading h2, .method-heading h2 { font: 400 clamp(49px, 5.3vw, 88px)/.93 var(--display); letter-spacing: -.027em; margin: 0; }
.section-heading h2 em { font-style: normal; color: var(--red); }
.section-heading > p { max-width: 370px; margin: 0; color: #46433d; font-size: 14px; line-height: 1.55; }

/* Method */
.method { padding: 20px clamp(22px, 4vw, 72px) 62px; color: var(--sheet); background: var(--blue); scroll-margin-top: 76px; }
.method .section-label { border-color: var(--sheet); }
.method-heading { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(260px, 360px); align-items: end; gap: 20px; padding: 49px 0 42px; }
.method-heading h2 { font-size: clamp(48px, 5.1vw, 81px); }
.method-heading p:last-child { margin: 0; color: #e6e1d7; font-size: 14px; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #ded9c9; }
.method-grid article { display: grid; grid-template-columns: 50px 1fr; gap: 12px; min-height: 167px; padding: 25px 20px; }
.method-grid article + article { border-left: 1px solid #ded9c9; }
.method-index { font: 42px/.9 var(--display); color: var(--ochre); }
.method-grid h3 { margin: 0 0 12px; font: 30px/1 var(--display); }
.method-grid p { margin: 0; font-size: 13px; color: #e5e3dd; }

/* Prompt archive */
.library { background: var(--paper); }
.library-toolbar { display: grid; grid-template-columns: minmax(250px, 1fr) 250px 215px; gap: 12px; padding: 14px; background: var(--ink); color: var(--sheet); }
.library-toolbar label { display: flex; flex-direction: column; gap: 7px; font: bold 10px var(--mono); letter-spacing: .03em; }
.library-toolbar input, .library-toolbar select { width: 100%; min-width: 0; height: 43px; padding: 9px 11px; border: 2px solid var(--paper); border-radius: 0; color: var(--ink); background: var(--sheet); font: 13px var(--body); }
.library-layout { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); height: 620px; border: 2px solid var(--ink); border-top: 0; background: var(--sheet); }
.record-list { min-width: 0; overflow: auto; background: #ded9cd; border-right: 2px solid var(--ink); }
.record-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 11px; width: 100%; padding: 13px 12px; border: 0; border-bottom: 1px solid #aaa396; background: transparent; text-align: left; color: var(--ink); }
.record-item:hover { background: #f2dec1; }
.record-item[aria-current="true"] { background: var(--ochre); box-shadow: inset 7px 0 var(--red); }
.record-thumb { width: 76px; height: 59px; object-fit: cover; border: 1px solid var(--ink); background: var(--ink); }
.record-summary { min-width: 0; }
.record-item-top { display: block; color: #383630; font: bold 10px var(--mono); }
.record-item strong { display: block; margin: 6px 0 5px; font: 21px/1 var(--display); overflow-wrap: anywhere; }
.record-item small { color: #4c4942; font-size: 11px; }
.record-selection { display: block; margin-top: 6px; color: #73331e; font: bold 9px var(--mono); text-transform: uppercase; font-style: normal; }
.record-detail { min-width: 0; overflow: auto; padding: 25px clamp(22px, 3vw, 43px); }
.detail-header { display: flex; justify-content: space-between; gap: 18px; }
.detail-header h3 { margin: 5px 0 7px; font: 40px/1 var(--display); }
.detail-header p { margin: 0; font-size: 12px; color: var(--muted); }
.detail-header .eyebrow { color: var(--red); font: bold 11px var(--mono); }
.detail-selection { display: inline-block; margin-top: 11px; padding: 5px 7px; color: var(--sheet); background: var(--blue); font: bold 10px var(--mono); text-transform: uppercase; }
.detail-media { margin: 22px 0 0; }
.detail-media-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-media figure { min-width: 0; margin: 0; border: 2px solid var(--ink); background: #e5e0d5; }
.detail-media img, .detail-media video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink); }
.detail-media figcaption { padding: 8px 10px; border-top: 1px solid var(--ink); font: bold 10px var(--mono); }
.detail-video-link { display: block; padding: 0 10px 9px; color: var(--blue); font: bold 10px var(--mono); }
.detail-section { padding-top: 15px; margin-top: 16px; border-top: 1px solid var(--rule); }
.detail-section h4 { margin: 0 0 9px; font: bold 11px var(--mono); }
.detail-section pre, .output-block pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.58 var(--mono); }
.detail-section p { margin: 0; font-size: 12px; color: #4c4942; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 13px; padding: 14px 0 6px; }
.detail-actions button, .detail-actions a { padding: 0; border: 0; background: none; color: var(--blue); text-decoration: underline; font: bold 11px var(--mono); }
.placeholder { font-size: 14px; color: var(--muted); }
.library-count { margin: 10px 0 0; text-align: right; font: bold 10px var(--mono); }

/* Real production references */
.reference { color: var(--sheet); background: var(--ink); }
.reference .section-topline { border-color: var(--sheet); }
.reference .section-heading > p { color: #e4dfd3; }
.reference .eyebrow { color: var(--ochre); }
.reference .section-heading h2 em { color: var(--ochre); }
.reference-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.reference-card { min-width: 0; padding: 0; border: 2px solid var(--sheet); text-align: left; color: var(--ink); background: var(--sheet); transition: transform .2s, box-shadow .2s; }
.reference-card:hover, .reference-card:focus-visible { transform: translateY(-5px); box-shadow: 6px 6px 0 var(--red); }
.reference-image { display: block; aspect-ratio: 4/3; overflow: hidden; background: #b9b3a9; }
.reference-image img { width: 100%; height: 100%; object-fit: cover; }
.reference-meta { display: flex; flex-direction: column; min-height: 177px; padding: 15px; }
.reference-meta b { font: bold 10px var(--mono); }
.reference-meta strong { margin: 14px 0 6px; font: 27px/1 var(--display); }
.reference-meta span { font-size: 12px; line-height: 1.4; }
.reference-meta i { margin-top: auto; padding-top: 17px; font: bold 10px var(--mono); color: var(--blue); font-style: normal; }
.field-note { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 20px 0 0; margin-top: 29px; border-top: 1px solid var(--sheet); }
.field-note span { font: bold 11px var(--mono); color: var(--ochre); }
.field-note p { margin: 0; max-width: 860px; font-size: 14px; }

/* Workbench */
.work { background: #dce6df; }
.work .section-heading > p { color: #34443e; }
.starter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.starter-bar span { margin-right: 11px; font: bold 10px var(--mono); }
.starter-bar button { border: 2px solid var(--ink); border-radius: 0; background: transparent; padding: 8px 11px; font: bold 11px var(--mono); }
.starter-bar button:hover { background: var(--ochre); }
.source-strip { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; padding: 12px 15px; margin-bottom: 14px; border: 2px solid var(--ink); color: var(--sheet); background: var(--blue); font-size: 12px; }
.source-strip span { font: bold 10px var(--mono); color: var(--signal); }
.source-strip strong { font-weight: bold; }
.source-strip a { margin-left: auto; font: bold 11px var(--mono); color: var(--sheet); text-underline-offset: 3px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(370px, .95fr); gap: 15px; align-items: start; }
#builder-form, .output-panel { min-width: 0; border: 2px solid var(--ink); background: var(--sheet); }
#builder-form { padding: clamp(17px, 2.4vw, 32px); }
fieldset { min-width: 0; margin: 0 0 22px; padding: 24px 0 0; border: 0; border-top: 2px solid var(--ink); }
fieldset:first-child { border-top: 0; padding-top: 0; }
legend { padding: 0 0 10px; font: 31px/1 var(--display); }
legend span { margin-right: 12px; color: var(--red); }
.field-help { margin: -3px 0 17px; font-size: 12px; color: var(--muted); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#builder-form label { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; font: bold 11px var(--mono); }
#builder-form input, #builder-form textarea { width: 100%; min-width: 0; padding: 11px; border: 1px solid #8e897d; border-radius: 0; outline: none; background: white; color: var(--ink); font: 13px/1.4 var(--body); }
#builder-form input:focus, #builder-form textarea:focus { border: 2px solid var(--blue); padding: 10px; box-shadow: 4px 4px 0 var(--signal); }
#builder-form textarea { resize: vertical; min-height: 67px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.form-actions .button { padding: 9px 12px; min-height: 41px; font: bold 11px var(--mono); }
#form-status { width: 100%; font: bold 11px var(--mono); color: var(--blue); }
.output-panel { position: sticky; top: 90px; }
.output-top { padding: 26px; color: var(--sheet); background: var(--red); }
.output-kicker { font: bold 10px var(--mono); }
.output-top h3 { margin: 13px 0; font: 55px/.9 var(--display); }
.output-top p { max-width: 440px; margin: 0; font-size: 13px; }
.output-block { padding: 19px 24px; border-bottom: 2px solid var(--ink); }
.output-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.output-label h4 { margin: 0; font: bold 11px var(--mono); }
.output-label button { padding: 6px 8px; color: var(--sheet); background: var(--ink); border: 1px solid var(--ink); font: bold 10px var(--mono); white-space: nowrap; }
.output-label button:hover { color: var(--ink); background: var(--ochre); }
.output-block pre { max-height: 175px; overflow: auto; }
.output-block pre.is-empty { color: #767269; font-style: italic; }
.output-foot { padding: 17px 24px 19px; background: #e7ddc8; }
.output-foot b { font: bold 11px var(--mono); }
.output-foot p { margin: 6px 0 0; font-size: 12px; }
footer { display: grid; grid-template-columns: auto minmax(260px, 1fr) auto; gap: 25px; align-items: start; padding: 30px clamp(22px, 4vw, 72px); color: var(--paper); background: var(--ink); font: 10px/1.5 var(--mono); }
footer a { color: var(--ochre); white-space: nowrap; }

@media (max-width: 1080px) {
  .site-header { gap: 20px; }
  .site-header nav { gap: 13px; }
  .hero { min-height: 550px; }
  .hero-copy { padding-left: 34px; padding-right: 28px; }
  .poster-wall { min-height: 550px; }
  .method-heading { grid-template-columns: 110px 1fr 300px; }
  .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .builder-grid { grid-template-columns: 1fr; }
  .output-panel { position: static; }
}
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; min-height: 66px; padding: 10px 18px; gap: 8px; }
  .brand-emblem { width: 36px; height: 36px; }
  .brand-name { font-size: 17px; }
  .brand-name small { font-size: 8px; }
  .header-action { margin-left: auto; padding: 8px 9px; font-size: 9px; box-shadow: none; }
  .site-header nav { order: 3; width: 100%; justify-content: space-between; margin: 0; overflow: auto; gap: 16px; padding-top: 7px; }
  .site-header nav a { white-space: nowrap; font-size: 11px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 44px 22px 26px; border-right: 0; }
  .hero h1 { font-size: clamp(99px, 21vw, 174px); margin-top: 37px; }
  .hero-lead { font-size: 31px; }
  .hero-index { margin-top: 10px; }
  .poster-wall { min-height: 415px; padding: 38px 20px 51px; }
  .poster { width: 29%; }
  .poster figcaption { font-size: 7px; }
  .poster-wall-tag { font-size: 7px; }
  .method { padding: 20px 22px 45px; }
  .method-heading { display: block; padding: 34px 0 27px; }
  .method-heading h2 { font-size: 61px; margin: 13px 0; }
  .method-heading p:last-child { max-width: 480px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article { min-height: 0; }
  .method-grid article + article { border-left: 0; border-top: 1px solid var(--sheet); }
  .section-pad { padding: 52px 22px 60px; scroll-margin-top: 116px; }
  .section-heading { display: block; padding: 33px 0 27px; }
  .section-heading h2 { font-size: clamp(50px, 12vw, 74px); }
  .section-heading > p { margin-top: 18px; }
  .section-topline, .section-label { font-size: 9px; }
  .library-toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .library-layout { display: block; height: auto; }
  .record-list { max-height: 265px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .record-detail { max-height: 660px; padding: 20px; }
  .detail-media-pair { grid-template-columns: 1fr; }
  .field-note { display: block; }
  .field-note p { margin-top: 10px; }
  footer { grid-template-columns: 1fr; gap: 13px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 23vw; }
  .hero-actions { flex-wrap: wrap; gap: 16px; }
  .poster-wall { min-height: 340px; }
  .poster { width: 33%; }
  .poster-wall-tag { bottom: 9px; }
  .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .reference-meta { min-height: 190px; padding: 10px; }
  .reference-meta strong { font-size: 22px; }
  .reference-meta b, .reference-meta i { font-size: 8px; }
  .reference-meta span { font-size: 11px; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .source-strip a { margin-left: 0; }
  .output-top h3 { font-size: 47px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster, .reference-card { transition: none; }
}
@media print {
  .site-header, .poster-wall, .hero-actions, .library, .starter-bar, .form-actions, .output-label button, footer { display: none !important; }
  .hero { display: block; min-height: 0; }
  .hero-copy, .section-pad, .method { padding: 20px; }
  .hero h1 { font-size: 75px; }
  .method, .reference { color: var(--ink); background: white; }
  .method-heading p:last-child, .method-grid p, .reference .section-heading > p { color: var(--ink); }
  .builder-grid { display: block; }
  .output-panel { break-before: page; }
  .output-block pre { max-height: none; }
}
