/* Visual design review — shared tokens, document hierarchy and presentation layouts. */
:root {
  --navy: #101e2b;
  --paper: #f3f1eb;
  --surface: #fbfaf6;
  --gold: #b3935e;
  --ink: #192b39;
  --muted: #64717a;
  --line: #192b3926;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-heading: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --type-cover: 76px;
  --type-chapter: 44px;
  --type-subsection: 28px;
  --type-project: 24px;
  --type-topic: 20px;
  --type-label: 18px;
  --type-body: 16px;
  --type-caption: 12px;
  --type-index: 24px;
  --type-metric: 36px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--type-body)/1.85 var(--font-body); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; padding: 7px 16px; }
button:hover { background: var(--gold); color: var(--navy); }
button:disabled { opacity: .35; cursor: default; }
button:disabled:hover { background: transparent; color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: contain; }
figure, h1, h2, h3, h4, h5, h6, p { margin: 0; }
h1, h2, h3, h4, h5, h6 { font: inherit; }
figure { min-width: 0; overflow: hidden; }
[hidden] { display: none !important; }

/* Content type is declared once, independently of layout and tag names.
   Text inside an editable span inherits its declared container type.
   Inline font-size values applied by the editor remain authoritative. */
main [data-type="cover"] { font: 500 var(--type-cover)/1.2 var(--font-heading); letter-spacing: 4px; }
main [data-type="chapter"] { font: 600 var(--type-chapter)/1.35 var(--font-heading); letter-spacing: -.5px; }
main [data-type="subsection"] { font: 600 var(--type-subsection)/1.45 var(--font-heading); letter-spacing: -.2px; }
main [data-type="project"] { font: 600 var(--type-project)/1.5 var(--font-heading); letter-spacing: 0; }
main [data-type="topic"] { font: 500 var(--type-topic)/1.6 var(--font-body); letter-spacing: 0; }
main [data-type="label"] { font: 500 var(--type-label)/1.6 var(--font-body); letter-spacing: 0; }
main [data-type="body"] { font: 400 var(--type-body)/1.85 var(--font-body); letter-spacing: 0; }
main [data-type="caption"] { font: 400 var(--type-caption)/1.6 var(--font-body); letter-spacing: .3px; }
main [data-type="index"] { font: 500 var(--type-index)/1.3 Georgia, serif; letter-spacing: 0; }
main [data-type="metric"] { font: 500 var(--type-metric)/1.3 Georgia, serif; letter-spacing: -1px; }

/* Global page chrome and chapter boundaries. */
header { height: 80px; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; gap: 22px; position: fixed; inset: 0 0 auto; z-index: 50; background: #101e2bf5; color: var(--paper); border-bottom: 1px solid #ffffff20; backdrop-filter: blur(15px); }
.brand { display: flex; align-items: center; gap: 17px; font: 30px/1 Georgia, serif; letter-spacing: -2px; }
.brand span { max-width: 80px; font: 9px/1.5 var(--font-body); letter-spacing: 2px; }
header nav { display: flex; gap: 25px; font-size: 12px; color: #c6cace; }
header nav a { position: relative; white-space: nowrap; }
header nav a.active::after { content: ""; height: 2px; background: var(--gold); position: absolute; bottom: -12px; left: 0; right: 0; }
.tools { display: flex; gap: 7px; }
.tools button { font-size: 11px; border-color: #ffffff40; padding: 5px 12px; white-space: nowrap; }
.tools button:last-child { background: var(--gold); color: var(--navy); border-color: var(--gold); }
#progress { position: fixed; inset: 0 auto auto 0; height: 3px; background: var(--gold); z-index: 70; width: 0; }
main > section, main > .project-collection { padding: 85px max(7vw, 24px); }
.report-chapter { position: relative; border-top: 1px solid var(--line); }
.report-chapter + .report-chapter { margin-top: 0; }
.report-subsection { padding: 0; margin: 54px 0 0; border: 0; scroll-margin-top: 105px; }
.report-subsection:first-of-type { margin-top: 0; }
.chapter-header { padding-bottom: 36px; }
.chapter-header .chapter-heading { margin-bottom: 0; }
.chapter-heading { display: flex; align-items: baseline; gap: 22px; margin: 28px 0 42px; }
.chapter-number { color: var(--gold); font-family: Georgia, serif; }
.subsection-header { margin-bottom: 25px; }
.subsection-heading { margin: 0 0 25px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-head .eyebrow { color: var(--gold); }
.eyebrow { letter-spacing: 1.5px; }
.gold { color: var(--gold); }
.paper { background: var(--paper); }
.dark { background: var(--navy); color: var(--paper); --muted: #b2bec6; --line: #ffffff26; }
.dark p, .dark figcaption { color: var(--muted); }
.dark .chapter-heading, .dark .subsection-heading { color: var(--paper); }
.subheading { margin-top: 35px; margin-bottom: 22px; }
.split-title { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8%; align-items: start; margin-bottom: 34px; }
.split-title > p { color: var(--muted); }
.original-block { margin: 30px 0 45px; padding: 28px 0; border-top: 1px solid var(--line); }
.original-block > p { margin-top: 18px; color: var(--muted); white-space: pre-line; }
.subsection-lead { margin: 0 0 26px; color: var(--muted); }
.results-lead { margin-bottom: 25px; }
.profile-description { margin-top: 25px; color: var(--muted); }

/* Garden cover. */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100svh; overflow: hidden; padding-top: 112px; padding-bottom: 28px; background: #032c3d; }
.hero-top { display: flex; justify-content: space-between; gap: 25px; color: #aab9be; letter-spacing: 1.8px; }
.hero-grid { display: block; text-align: center; min-height: 600px; }
.hero-copy { padding-top: 38px; }
.hero-copy h1 { margin: 18px 0 20px; text-shadow: 0 4px 30px #00203599; }
.hero-copy .eyebrow { color: #e6d5b2; }
.hero-desc { color: #e1e4df; }
.hero-credit { color: #c8d2d1; margin-top: 18px; }
.round-link { display: inline-flex; align-items: center; gap: 24px; margin-top: 25px; }
.round-link b { width: 45px; height: 45px; border: 1px solid #c3a26b70; border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-size: 22px; font-weight: 400; transition: transform .3s, background .3s; }
.round-link:hover b { transform: rotate(45deg); background: var(--gold); color: var(--navy); }
.hero-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #ffffff40; padding-top: 22px; position: relative; color: #e0dfd0; text-shadow: 0 1px 12px #000; }
.hero-footer strong { color: var(--paper); margin-right: 22px; font-weight: 500; }
#motion-toggle { font-size: 11px; color: #e4ddc8; border-color: #ffffff50; padding: 6px 13px; backdrop-filter: blur(12px); background: #06273880; }
.garden-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.garden-backdrop { position: absolute; inset: -18px; background: url('assets/garden-hero.webp') center 60%/cover no-repeat; transform: translate3d(var(--garden-x,0px),var(--garden-y,0px),0) scale(1.025); transition: transform 1s ease-out; animation: garden-breathe 14s ease-in-out infinite; }
.garden-vignette { position: absolute; inset: 0; background: linear-gradient(180deg,#041e2b80 0%,#04263615 44%,transparent 65%,#041b2b80 100%); }
#garden-stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.screen-aura { position: absolute; left: 53%; top: 66%; width: 18%; height: 17%; background: radial-gradient(ellipse,#ffcf6f26,transparent 70%); mix-blend-mode: screen; animation: screen-breathe 4s ease-in-out infinite; }
.garden-flowers { position: absolute; bottom: -7px; width: 100%; height: 27%; opacity: .85; filter: drop-shadow(0 0 7px #d8b86d26); }
.garden-flower { position: absolute; bottom: 0; transform-origin: 50% 100%; animation: flower-sway var(--sway,7s) ease-in-out infinite; animation-delay: var(--delay,0s); height: var(--height,140px); width: 60px; opacity: var(--opacity,.8); }
.garden-flower svg { height: 100%; width: 100%; overflow: visible; }
.motion-paused .garden-backdrop, .motion-paused .garden-flower, .motion-paused .screen-aura { animation-play-state: paused; }
@keyframes flower-sway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg); } }
@keyframes garden-breathe { 0%,100% { scale: 1; } 50% { scale: 1.018; } }
@keyframes screen-breathe { 50% { opacity: .4; transform: scale(.95); } }

/* Contents and self assessment. */
.contents-page { min-height: calc(100svh - 80px); }
.contents-intro { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin: 28px 0 30px; }
.contents-intro > span { color: var(--muted); }
.contents-list { margin-top: 10px; }
.contents-row { display: grid; grid-template-columns: 65px 1fr auto 24px; align-items: center; gap: 25px; padding: 25px 8px; border-bottom: 1px solid var(--line); transition: background .3s,padding .3s; }
.contents-row:hover { background: #e9e4d8; padding-left: 18px; padding-right: 18px; }
.contents-number, .contents-arrow { color: var(--gold); }
.contents-row p { margin-top: 5px; color: var(--muted); }
.contents-time { color: var(--muted); white-space: nowrap; }
.contents-arrow { font-size: 23px; }
.profile-original { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; padding-bottom: 35px; border-bottom: 1px solid var(--line); }
.profile-original h3, .profile-original h4 { margin-bottom: 22px; }
.profile-original p { color: var(--muted); white-space: pre-line; }
.reflection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 35px; margin-top: 28px; }
.subsection-lead + .reflection-grid { margin-top: 0; }
.reflection-grid article { border-top: 1px solid var(--line); padding-top: 22px; }
.reflection-grid article > span { color: var(--gold); }
.reflection-grid h3, .reflection-grid h4, .reflection-grid h5 { margin: 12px 0 18px; }
.reflection-grid p { color: var(--muted); white-space: pre-line; }

/* Work overview. */
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 38px 0; }
.stats > div { border-left: 1px solid var(--line); padding: 0 28px; }
.stats > div:first-child { border: 0; padding-left: 0; }
.stats strong { display: block; }
.stats p { margin: 12px 0 9px; }
.stats small { color: var(--muted); }
.work-wall { background: white; padding: 22px; }
.work-wall img { max-height: 570px; cursor: zoom-in; }
.work-wall figcaption { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 15px; color: var(--muted); }

/* Stacked project cards are inside the work-results subsection. */
.project-collection { position: relative; padding: 0; background: transparent; scroll-margin-top: 100px; }
.collection-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin: 24px 0 35px; }
.collection-heading p { color: var(--muted); }
.project-stack { position: relative; isolation: isolate; }
.project-card { position: sticky; top: calc(102px + var(--card-index,0)*22px); padding: 25px 32px 28px; margin: 0 0 36px; border: 1px solid #192b3921; border-radius: 24px; background: var(--surface); box-shadow: 0 15px 48px -24px #142b3a55; transform-origin: 50% 0; will-change: transform; transition: filter .45s,box-shadow .45s; overflow: clip; scroll-margin-top: 100px; }
.project-card:last-child { margin-bottom: 0; }
.project-card:nth-child(2) { background: #edf1f2; }
.project-card:nth-child(3) { background: #ece9df; }
.project-card.is-covered { filter: brightness(.965) saturate(.94); box-shadow: 0 8px 22px -18px #142b3a55; }
.project-card-rim { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--gold); }
.project-card-rim > span:last-child { color: var(--muted); }
.project-card-summary { display: grid; grid-template-columns: 1.05fr 1fr; gap: 7%; align-items: center; min-height: 390px; padding: 20px 0; }
.card-copy { min-width: 0; }
.card-number { color: var(--gold); }
.card-tags { color: var(--gold); margin: 15px 0 12px; }
.card-description { color: var(--muted); margin-top: 20px; max-width: 460px; }
.card-visual { position: relative; padding: 10px 12px 34px; background: #e7e6e14d; border-radius: 15px; }
.card-visual img { width: 100%; height: 300px; filter: drop-shadow(8px 15px 15px #142b3a15); cursor: zoom-in; transition: transform .7s; }
.card-visual:hover img { transform: translateY(-5px) rotate(-1deg); }
.card-visual-label { position: absolute; bottom: 10px; right: 18px; color: var(--muted); }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.card-actions > span { color: var(--muted); }
.project-toggle { display: flex; align-items: center; gap: 25px; border-color: #192b3950; padding: 9px 17px; border-radius: 24px; font-size: 12px; }
.project-toggle b { font-size: 20px; line-height: 1; font-weight: 400; }
.project-toggle[aria-expanded="true"] { background: var(--navy); color: var(--paper); }
.project-detail { border-top: 1px solid var(--line); margin-top: 25px; animation: project-unfold .5s ease both; }
.project-detail > section { padding: 30px 0 0; background: transparent; border: 0; }
.project-detail .section-head { margin-bottom: 25px; }
.project-detail-footer { display: flex; justify-content: center; padding: 30px 0 5px; }
.project-detail-footer button { border-radius: 24px; font-size: 12px; padding: 9px 25px; }
.project-stack.has-open > .project-card { position: relative; top: auto; transform: none !important; filter: none; }
.project-card.is-expanded .project-card-summary { min-height: 300px; }
.project-card.is-expanded .card-visual img { height: 240px; }
@keyframes project-unfold { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Editable 960×540 source-page compositions. Only this canvas has a local type scale. */
.pdf-page { position: relative; width: 100%; background: #f7f7f7; margin: 20px 0 42px; color: var(--ink); overflow: visible; --type-project: 24px; --type-topic: 22px; --type-label: 16px; --type-body: 14px; --type-caption: 12px; }
.pdf-sheet { position: absolute; width: 960px; height: 540px; left: 0; top: 0; transform: scale(var(--sheet-fit,1)); transform-origin: 0 0; background: #f7f7f7; }
.pdf-image { position: absolute; max-width: none; max-height: none; margin: 0; cursor: zoom-in; }
.pdf-text { position: absolute; white-space: pre; z-index: 2; min-height: 1em; padding: 0; margin: 0; text-align: left; }
.pdf-text:focus { background: #fffefaee; z-index: 4; }
.pdf-rules { position: absolute; inset: 0; width: 960px; height: 540px; pointer-events: none; z-index: 1; }
.pdf-paragraph { position: absolute; z-index: 2; }
.pdf-paragraph-line { position: static; display: inline; white-space: normal; min-width: 0 !important; max-width: none; }

/* Project studies and workflow. */
.mood-board { padding: 30px 0 40px; margin-bottom: 35px; border-bottom: 1px solid var(--line); scroll-margin-top: 100px; }
.mood-heading > h3, .mood-heading > h4, .mood-heading > h5 { margin: 14px 0 18px; }
.mood-heading > p { max-width: 900px; color: var(--muted); }
.mood-pair { display: grid; grid-template-columns: 1fr 1.5fr; gap: 25px; margin-top: 28px; align-items: center; }
.mood-pair img { aspect-ratio: 1.15; background: #eeedeb; }
figcaption { color: var(--muted); margin-top: 12px; }
.editorial-gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.editorial-gallery .wide { grid-row: span 2; }
.editorial-gallery img { height: 250px; object-fit: cover; }
.editorial-gallery .wide img { height: calc(100% - 35px); min-height: 480px; }
.manual-details { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 30px; padding: 25px; background: #eae8e1; }
.manual-details img { height: 340px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin: 35px 0 20px; }
.gallery-heading > span, .exploration-note { color: var(--muted); }
.exploration-note { margin-bottom: 25px; }
.explorations { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.explorations img { aspect-ratio: 1; }
.workflow-widget { margin-bottom: 35px; }
.workflow-tabs { display: flex; gap: 15px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.workflow-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 14px 18px; color: var(--muted); font-size: 13px; }
.workflow-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); }
.flow-images { display: flex; gap: 20px; align-items: center; min-height: 350px; }
.flow-images figure { flex: 1; min-width: 0; }
.flow-images img { height: 360px; background: #eae9e5; }
.flow-images.single img { height: auto; max-height: 430px; }
.flow-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; padding: 24px 0; }
.flow-caption p { color: var(--muted); }
.efficiency { display: flex; justify-content: space-between; gap: 35px; align-items: center; background: #e8e5db; padding: 35px; margin-top: 35px; }
.efficiency h3, .efficiency h4, .efficiency h5 { margin: 14px 0; }
.efficiency p { color: var(--muted); }
.eff-number strong { white-space: nowrap; }
.problem-columns { display: grid; grid-template-columns: 1fr 1.3fr; gap: 7%; margin-top: 25px; }
.problem-columns h3, .problem-columns h4, .problem-columns h5 { margin-bottom: 15px; }
.problem-columns p { color: var(--muted); white-space: pre-line; }

/* Plans, suggestions and closing. */
.timeline { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 35px; }
.timeline article { position: relative; border-top: 1px solid #c3a26b70; padding: 30px 30px 0 0; }
.timeline article::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--gold); border-radius: 50%; }
.timeline article > span { color: var(--gold); }
.timeline h3, .timeline h4, .timeline h5 { margin: 16px 0; }
.timeline p { color: var(--muted); }
.suggestions { margin-top: 30px; }
.suggestions details { border-bottom: 1px solid var(--line); }
.suggestions summary { cursor: pointer; display: flex; align-items: baseline; gap: 25px; list-style: none; padding: 24px 0; }
.suggestions summary::-webkit-details-marker { display: none; }
.suggestions summary > span:first-child { color: var(--gold); font-family: Georgia,serif; }
.suggestions summary b { font: 400 22px/1 var(--font-body); margin-left: auto; }
.suggestions details[open] summary b { transform: rotate(45deg); }
.suggestions details > p { padding: 0 50px 28px; color: var(--muted); max-width: 1000px; }
.closing { min-height: 600px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; padding-bottom: 30px; }
.closing h2 { margin: 30px 0; }
.closing > p { white-space: pre-line; }
.closing footer { width: 100%; display: flex; justify-content: space-between; gap: 25px; border-top: 1px solid var(--line); margin-top: 60px; padding-top: 25px; color: var(--muted); }

/* Module editor. The selected content owns its font, never its screen location. */
.editor-module { position: relative; width: 100%; min-width: 0; overflow: visible; }
.module-body { display: flow-root; width: 100%; min-width: 0; transform-origin: 50% 0; }
.module-body > .report-subsection { margin-top: 0; }
.hero > .editor-module:has(.hero-grid) { flex: 1; }
.closing > .editor-module { flex-shrink: 0; }
#editbar { position: fixed; top: 80px; left: 0; right: 0; z-index: 60; background: #e7decd; color: var(--navy); padding: 10px 3%; box-shadow: 0 4px 20px #0002; max-height: 170px; overflow: auto; font-size: 11px; }
.editbar-main, .editbar-properties { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.editbar-main > span { margin-right: auto; }
.editbar-properties { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.editbar-properties > label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#selection-label { width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#editbar button { font-size: 11px; padding: 3px 10px; }
#font-size { width: 55px; padding: 3px 5px; border: 1px solid #192b3950; background: #fff9; font: 12px var(--font-body); }
#module-scale { width: 100px; accent-color: var(--ink); }
#scale-output { min-width: 38px; }
#save { background: var(--ink); color: var(--paper); }
#delete { color: #a53b34; }
#save-status { margin-left: auto; color: #697363; font-size: 10px; }
body.editing main { padding-top: 105px; }
body.editing .editor-module { outline: 1px dashed #b69c6a50; outline-offset: 3px; cursor: pointer; }
body.editing .editor-module.module-selected { outline: 2px solid var(--gold); outline-offset: 4px; }
body.editing [data-copy] { outline: 0; cursor: text; min-width: 4px; }
body.editing [data-copy]:hover { outline: 1px dashed var(--gold); outline-offset: 3px; }
body.editing [data-copy].text-selected { outline: 1px solid var(--gold); background: #c3a26b18; }
body.editing .pdf-text.text-selected { background: #fffefa; }
body.editing .reveal { opacity: 1; transform: none; }
body.editing .project-card { position: relative; top: auto; transform: none !important; filter: none; overflow: visible; }
body.editing .project-detail { animation: none; }
body.editing .card-visual img { transform: none; }
body.editing .garden-backdrop, body.editing .garden-flower, body.editing .screen-aura { animation-play-state: paused; }
body.editing [data-image] { cursor: pointer; }
body.editing .page-controls { display: none; }

/* Presentation controls and image inspection. */
.page-controls { position: fixed; bottom: 22px; right: 18px; display: flex; align-items: center; background: var(--navy); color: var(--paper); z-index: 40; border: 1px solid #ffffff30; box-shadow: 0 5px 25px #0002; }
.page-controls button { border: 0; padding: 7px 11px; }
.page-controls span { font-size: 10px; letter-spacing: 1px; }
#lightbox { border: 0; background: var(--paper); width: min(1100px,94vw); max-height: 94svh; padding: 40px 22px 18px; color: var(--ink); }
#lightbox::backdrop { background: #07111de8; backdrop-filter: blur(12px); }
#lightbox img { max-height: 78svh; }
#lightbox p { text-align: center; font-size: 12px; margin-top: 12px; }
#lightbox .close { position: absolute; right: 8px; top: 0; border: 0; font-size: 28px; padding: 0 12px; }
#toast { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: var(--navy); color: var(--paper); padding: 10px 24px; font-size: 12px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; border: 1px solid var(--gold); max-width: min(90vw,700px); }
#toast.show { opacity: 1; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s,transform .7s; }
.reveal.visible { opacity: 1; transform: none; }
body.ready .hero-copy { animation: cover-in 1s both; }
body.presenting header nav, body.presenting #edit { display: none; }
@keyframes cover-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) {
  main > section, main > .project-collection { padding-left: calc((100vw - 1300px)/2); padding-right: calc((100vw - 1300px)/2); }
}
@media (max-width: 860px) {
  :root { --type-cover: 56px; --type-chapter: 36px; --type-subsection: 26px; --type-project: 23px; --type-topic: 19px; --type-label: 17px; --type-body: 16px; --type-caption: 12px; --type-index: 23px; --type-metric: 32px; }
  header { height: 66px; padding: 0 5%; gap: 15px; }
  .brand span { display: none; }
  header nav { gap: 14px; }
  .tools button { padding: 4px 8px; }
  main > section, main > .project-collection { padding: 65px 6%; }
  .chapter-heading { gap: 15px; margin-bottom: 34px; }
  .chapter-header { padding-bottom: 28px; }
  .report-subsection { margin-top: 40px; }
  .split-title { grid-template-columns: 1fr; gap: 20px; }
  .section-head { gap: 15px; }
  .hero { min-height: 900px; padding-top: 95px; padding-bottom: 25px; }
  .hero-grid { min-height: 680px; }
  .garden-backdrop { background-position: 55% center; }
  .hero-copy { padding-top: 35px; }
  .hero-footer > span { display: none; }
  .hero-footer div > span { display: block; }
  .garden-flowers { height: 20%; }
  .contents-intro { flex-direction: column; align-items: start; gap: 15px; }
  .contents-row { grid-template-columns: 45px 1fr auto 15px; gap: 12px; padding: 23px 0; }
  .profile-original { grid-template-columns: 1fr; gap: 25px; }
  .reflection-grid { grid-template-columns: 1fr; gap: 25px; }
  .stats > div { padding: 0 14px; }
  .project-card { position: relative; top: auto; padding: 22px; border-radius: 20px; margin-bottom: 25px; transform: none !important; filter: none; will-change: auto; }
  .project-card-summary { min-height: 0; gap: 22px; }
  .card-visual img, .project-card.is-expanded .card-visual img { height: 230px; }
  .collection-heading { align-items: start; }
  .collection-heading p { max-width: 190px; }
  .project-card.is-expanded .project-card-summary { min-height: 0; }
  .mood-pair { grid-template-columns: 1fr; }
  .mood-pair img { aspect-ratio: auto; max-height: 500px; }
  .editorial-gallery { grid-template-columns: 1fr 1fr; gap: 15px; }
  .editorial-gallery .wide { grid-column: span 2; grid-row: auto; }
  .editorial-gallery .wide img { min-height: 0; height: auto; }
  .editorial-gallery img { height: 200px; }
  .manual-details { padding: 18px; gap: 18px; }
  .manual-details img { height: 240px; }
  .explorations { grid-template-columns: 1fr 1fr; gap: 20px 15px; }
  .workflow-tabs { gap: 0; }
  .workflow-tabs button { flex: 1; padding: 13px 10px; }
  .flow-images { min-height: 200px; gap: 10px; }
  .flow-images img { height: 220px; }
  .flow-caption { grid-template-columns: 1fr; gap: 15px; }
  .efficiency { padding: 25px; flex-direction: column; align-items: start; }
  .problem-columns { grid-template-columns: 1fr; gap: 25px; }
  .timeline { grid-template-columns: 1fr; gap: 30px; }
  .timeline article { padding: 24px 0 0; }
  .closing { min-height: 550px; }
  #editbar { top: 66px; max-height: 210px; }
  .editbar-main > span { flex-basis: 100%; }
  #selection-label { width: 100%; }
  body.editing main { padding-top: 170px; }
}
@media (max-width: 560px) {
  header nav a { display: none; }
  header nav a:first-child, header nav a:nth-child(3) { display: block; }
  .project-card-summary { grid-template-columns: 1fr; }
  .card-visual { order: -1; padding-bottom: 32px; }
  .card-visual img, .project-card.is-expanded .card-visual img { height: 245px; }
  .card-copy { padding: 6px 0 15px; }
  .card-number { display: none; }
  .card-actions { gap: 12px; }
  .project-toggle { gap: 12px; padding: 8px 13px; flex-shrink: 0; }
  .project-card { padding: 18px; }
  .collection-heading { flex-direction: column; gap: 12px; }
  .collection-heading p { max-width: none; }
  .contents-arrow { display: none; }
  .contents-row { grid-template-columns: 32px 1fr auto; gap: 9px; }
  .manual-details { grid-template-columns: 1fr; }
  .manual-details img { height: 330px; }
  .suggestions summary { gap: 15px; }
  .suggestions details > p { padding: 0 30px 25px; }
  .gallery-heading > span { display: none; }
}
@media (max-width: 480px) {
  :root { --type-cover: 48px; --type-chapter: 32px; --type-subsection: 24px; --type-project: 22px; --type-topic: 18px; --type-label: 16px; --type-body: 15px; --type-caption: 12px; --type-index: 22px; --type-metric: 30px; }
  .brand { font-size: 26px; }
  .tools { gap: 3px; }
  .tools button { font-size: 10px; padding: 4px 6px; }
  .hero { min-height: 850px; }
  .hero-grid { min-height: 630px; }
  .contents-row { grid-template-columns: 32px minmax(0,1fr); gap: 8px 12px; }
  .contents-time { grid-column: 2; }
  .flow-images img { height: 170px; }
  .closing footer { flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .garden-backdrop { transform: none; }
  #garden-stars { display: none; }
  .project-card { position: relative; top: auto; transform: none !important; filter: none; will-change: auto; }
}
@media print {
  header, .page-controls, #editbar, #toast, .round-link, .project-toggle, .project-detail-footer { display: none !important; }
  .garden-scene { display: none; }
  main > section { padding: 30px; break-before: page; }
  .dark, .hero { background: white; color: var(--ink); --muted: #64717a; --line: #192b3926; }
  .hero { min-height: 0; }
  .hero-grid { min-height: 450px; }
  .hero-copy .eyebrow, .hero-desc, .hero-credit { color: var(--ink); }
  .editor-module { height: auto !important; break-inside: avoid; }
  .module-body { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
  .project-card { position: relative; top: auto; transform: none !important; filter: none; box-shadow: none; break-before: page; }
  .project-detail[hidden] { display: block !important; }
  .project-card-summary { min-height: 0; }
  .card-visual img { height: 200px; }
  .pdf-page, .mood-board { break-inside: avoid; }
  .contents-page { min-height: 0; }
}

/* The shelf cover is isolated from report typography and editing controls. */
main > .spine-cover-home { padding:80px 0 0; background:#f7f2e5; min-height:100svh; scroll-margin-top:0; }
.spine-cover-frame { display:block; width:100%; height:900px; border:0; background:#f7f2e5; }
.spine-cover-home .editor-module { width:100%; }
body.editing .spine-cover-home { padding-top:80px; }
@media(max-width:860px) { main > .spine-cover-home,body.editing .spine-cover-home { padding-top:66px; } }
/* Dark self assessment and independent problem text/image modules. */
#reflection{background:linear-gradient(135deg,#101e2b,#172c3a);color:#f3f1eb;--muted:#c1cbd2;--line:#ffffff2b}
#reflection .profile-original,#reflection .reflection-grid article{border-color:var(--line)}
#reflection .profile-description,#reflection .subsection-lead{color:var(--muted)}
.problems-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:40px;align-items:start}
.problem-copy>h4{margin-bottom:28px}.problem-issue,.problem-action{padding:22px 0;border-top:1px solid var(--line)}
.problem-issue>p:first-child{color:#b65057}.problem-action>p:first-child{color:#377b58}
.problem-copy h5{margin:10px 0 15px}.problem-copy p[data-type=body]{color:var(--muted)}
.problem-image-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.problem-document{width:100%;height:auto;object-fit:contain}.problem-image-grid figure{overflow:visible}
.problem-replace{display:none;margin:15px 0 0;font-size:12px}body.editing .problem-replace{display:inline-block}
/* Blend only outer white mats on light surfaces; retain original source pixels. */
.work-wall,.mood-pair img,.flow-images img,.card-visual,.pdf-page,.pdf-sheet{background:transparent}
main img[data-background=blend],.flow-images img{mix-blend-mode:multiply}
.dark img[data-background=blend]{mix-blend-mode:normal}
.pdf-rules>rect[width="960.00"][height="540.00"]{display:none}
.problem-document,img[data-background=paper]{mix-blend-mode:normal}
@media(max-width:860px){.problems-layout{grid-template-columns:1fr;gap:25px}.problem-image-grid{gap:18px}}
@media(max-width:480px){.problem-image-grid{grid-template-columns:1fr}}
