:root {
  color-scheme: light;
  --paper: #f7f3ec;
  --surface: #fffdf8;
  --ink: #261d1b;
  --muted: #695b54;
  --accent: #963f33;
  --line: #e1d6ca;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
button, summary { font: inherit; cursor: pointer; }
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 2px solid #b85d49; outline-offset: 4px; }
[hidden] { display: none !important; }
p, h1, h2, h3, h4 { margin: 0; }
.wrap { width: min(1320px, 100% - 88px); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.2; }
.brand small { display: block; margin-top: 4px; font-size: .68rem; font-weight: 500; color: var(--muted); }
.monogram { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #bd9e90; border-radius: 50%; font: 1.18rem var(--serif); color: var(--accent); }
.back { font-size: .83rem; font-weight: 700; text-decoration: none; }
.back:hover, .brand:hover { color: var(--accent); text-decoration: underline; }
.intro { padding-block: 49px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); align-items: end; gap: 30px; }
.eyebrow { color: var(--accent); font-size: .71rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: .99; }
h1 { margin-block: 9px 10px; font-size: clamp(4.45rem, 7.1vw, 7.8rem); letter-spacing: -.033em; }
h1 em { color: var(--accent); font-weight: 400; }
.intro-text { color: var(--muted); font-size: clamp(.9rem, 1.4vw, 1.08rem); }
.intro-aside { border-left: 1px solid #bf9d90; padding-left: 19px; margin-bottom: 3px; color: var(--muted); font-size: .91rem; max-width: 26ch; }
.library-head { border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-block: 17px 11px; }
.library-head h2 { font-size: 2.35rem; }
.library-head p { color: var(--muted); font-size: .79rem; }
.workspace { display: grid; grid-template-columns: minmax(185px, 246px) minmax(0, 1fr); gap: 18px; align-items: start; }
.catalog { max-height: 610px; overflow-y: auto; padding: 3px; scrollbar-width: thin; scrollbar-color: #cbb5a9 transparent; }
.catalog a { display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 49px; padding: 8px 12px; text-decoration: none; color: var(--ink); border-radius: 8px; border-bottom: 1px solid var(--line); font-size: .84rem; }
.catalog a span:first-child { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; }
.catalog a:hover { background: #f0e4da; }
.catalog a[aria-current="true"] { color: #702e24; background: #efdfd4; border-color: transparent; font-weight: 700; }
.catalog a[aria-current="true"] span:first-child { color: #702e24; }
.review { min-width: 0; display: grid; grid-template-columns: minmax(250px, .95fr) minmax(0, 1.2fr); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--surface); }
.stage { display: flex; flex-direction: column; align-items: center; gap: 15px; min-width: 0; padding: 18px 18px 14px; color: #f9f0e8; background: radial-gradient(ellipse at 50% 14%, #49332e, #2b211f 75%); }
.stage-label { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #e2c6b6; font-size: .69rem; font-weight: 600; text-transform: uppercase; letter-spacing: .105em; }
.media { width: min(100%, 270px); min-width: 0; aspect-ratio: 9 / 16; border-radius: 9px; overflow: hidden; background: #181211; box-shadow: 0 13px 34px #150d0c65; }
.media video, .media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.controls { display: flex; gap: 14px; align-items: center; justify-content: center; font-size: .77rem; font-variant-numeric: tabular-nums; }
.controls button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #97796d; background: transparent; color: #fff6ef; font-size: 1.05rem; }
.controls button:disabled { opacity: .35; cursor: default; }
.controls button:not(:disabled):hover { background: #62433a; }
.notes { min-width: 0; align-self: start; padding: clamp(20px, 3vw, 42px); }
.notes h3 { font-size: clamp(2.55rem, 4.35vw, 4.15rem); letter-spacing: -.025em; margin: 7px 0 9px; }
.summary { color: var(--muted); font-size: .94rem; }
.proposal { margin: 23px 0 16px; background: #f5eae2; padding: 18px 19px; border-radius: 10px; border: 1px solid #e9d6c8; }
.proposal h4 { margin-top: 6px; font-size: 1.9rem; }
.proposal p:not(.eyebrow) { font-size: .875rem; }
.proposal .suggested-hook { color: #78382b; font-weight: 700; margin-block: 7px 6px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 10px 0; color: var(--ink); font-weight: 700; font-size: .84rem; }
summary::marker { color: var(--accent); }
dl, .caption, #caveats, #source { font-size: .84rem; }
dl { display: grid; gap: 4px 10px; grid-template-columns: max-content minmax(0, 1fr); margin: 0 0 14px; }
dt { font-weight: 700; }
dd { margin: 0; }
#caveats { color: var(--muted); padding-left: 1.05rem; margin: 0 0 14px; }
#caveats li + li { margin-top: 4px; }
.caption { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 14px; }
#source { display: inline-block; margin-bottom: 14px; }
.pilots { display: grid; grid-template-columns: 1.08fr 1fr 1fr; gap: 16px; margin-block: 56px 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.pilots-heading { padding: 6px 16px 6px 0; }
.pilots h2 { margin-block: 6px 10px; font-size: 2.65rem; }
.pilots h3 { margin-block: 7px 9px; font-size: 2.03rem; }
.pilots p:not(.eyebrow) { color: var(--muted); font-size: .9rem; }
.pilot { padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pilot a { display: inline-block; margin-top: 11px; font-size: .83rem; font-weight: 700; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 17px 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: .74rem; }

@media (max-width: 1080px) {
  .wrap { width: min(1320px, 100% - 48px); }
  .workspace { grid-template-columns: 175px minmax(0, 1fr); gap: 11px; }
}
@media (max-width: 855px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .catalog { overflow-x: auto; padding: 5px; }
  .catalog nav { display: flex; gap: 6px; width: max-content; }
  .catalog a { display: flex; min-height: 42px; border: 1px solid var(--line); white-space: nowrap; }
  .intro { padding-top: 33px; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .intro-aside { max-width: none; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .topbar-inner { min-height: 62px; }
  .intro { padding-block: 30px 24px; }
  h1 { font-size: clamp(3.55rem, 11.2vw, 4.8rem); }
  .intro-aside { font-size: .85rem; }
  .review { grid-template-columns: minmax(0, 1fr); }
  .media { width: min(68%, 255px); }
  .stage { padding: 12px 15px; gap: 10px; }
  .pilots { grid-template-columns: minmax(0, 1fr); margin-block: 34px 28px; }
  .footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
