/* Sculpted ivory surround, recessed gold screen, sharp pierced foreground.
   Colors and proportions follow the supplied shadow-box video. */
:root {
  --ink: #454139;
  --muted: #777167;
  --red: #6a5130;
  --paper: #e2dfd5;
  --line: #77706335;
  --room: #d5d3cb;
  --room-light: #e6e4db;
  --room-text: #4f4b42;
  --room-muted: #787266;
}
body { background: var(--room); transition: background-color .6s; }
.research-shell, .app-shell { color: var(--room-text); }
.research-topbar, .topbar {
  background: transparent;
  color: var(--room-text);
  border-bottom: 1px solid #827b6826;
  height: 89px;
  padding: 19px 5%;
}
.brand-seal {
  background: #cfcdc4;
  color: #666056;
  border-color: #f2f0e785;
  border-radius: 0;
  box-shadow: 2px 3px 4px #3c37292b, inset 1px 1px 1px #f6f4e9;
  text-shadow: 1px 1px 1px #fff9e8;
  transform: none;
}
.brand { flex-shrink: 0; }
.brand-name { font-size: 23px; letter-spacing: 5px; }
.brand-name small, .topbar-note, .research-topbar-note { color: var(--room-muted); }
.research-topbar-note { font-size: 10px; letter-spacing: 4px; }
.research-topbar-actions { display: flex; align-items: center; gap: 34px; }
.shadow-room-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 11px var(--serif);
  letter-spacing: 1px;
  color: var(--room-text);
  padding: 12px 0;
  white-space: nowrap;
}
.shadow-room-toggle > span { font: 19px Georgia, serif; }
.shadow-room-toggle:hover { color: #9b6e28; }
.research-stage-link, .culture-link { font-size: 11px; }
.research-stage-link span, .culture-link span { color: var(--room-text); }
.theatre-research-links > a { color: var(--room-muted); }
.research-topbar a:focus-visible, .research-pagination a:focus-visible { outline-color: #9a773d; }
.research-shell .research-paper {
  padding: 47px max(5%, calc((100% - 1280px) / 2)) 89px;
  background: radial-gradient(ellipse at 45% 20%, var(--room-light), transparent 78%), var(--room);
  box-shadow: none;
}
.research-paper::before, .research-paper::after, .research-margin-note { display: none; }
.research-shell .research-page { animation: shadowbox-arrive .7s ease both; }
.research-shell .research-opening { padding-top: 0; }
.research-heading, .research-opening .research-heading { margin: 0 0 32px; }
.research-kicker { font-size: 9px; color: var(--room-muted); gap: 13px; letter-spacing: 2.5px; margin-bottom: 13px; }
.research-kicker > span { color: var(--room-muted); font-size: 15px; }
.research-kicker i { background: #7a74623d; }
.research-heading h1, .research-opening h1 {
  font-size: clamp(29px, 3vw, 43px);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--room-text);
  text-shadow: 1px 2px 1px #ffffed5c;
}
.research-hint { color: var(--room-muted); margin-top: 12px; font-size: 11px; letter-spacing: 1px; }
.chapter-banner { display: block; margin-bottom: 28px; }
.chapter-scene { margin: 0 0 35px; }
.shadowbox-frame {
  display: block;
  position: relative;
  isolation: isolate;
  border: solid clamp(15px, 2.15vw, 30px);
  border-color: #aaa89f #c2c0b7 #f1eee4 #c8c5bc;
  background: #8c753e;
  box-shadow: 0 1px 1px #ffffefc9, 0 -1px 2px #6c665b35,
    0 14px 23px -17px #3d37284d, inset 0 0 18px #1d150a;
}
.shadowbox-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 7px 12px #150d0a80, inset 1px 0 4px #150d0a8a;
  border: 1px solid #4b3b2455;
}
.shadowbox-frame::after {
  content: "";
  position: absolute;
  inset: calc(clamp(15px, 2.15vw, 30px) * -1 - 3px);
  pointer-events: none;
  border: 1px solid #bcb9ae66;
  box-shadow: inset 0 1px 1px #f9f6e76b;
}
.shadowbox-frame canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1078 / 375;
  height: auto;
}
.chapter-scene figcaption {
  display: flex;
  align-items: baseline;
  gap: 21px;
  padding: 17px 1px 0;
  font: 10px/1.7 var(--serif);
  letter-spacing: 1.6px;
  color: var(--room-muted);
}
.chapter-scene figcaption > span:first-child { font-size: 16px; letter-spacing: 5px; color: var(--room-text); }
.chapter-scene .scene-edition { margin-left: auto; font: 8px var(--sans); letter-spacing: 2px; }
.research-prose { color: var(--room-text); }
.research-introduction { max-width: none; padding-left: 25px; border-left: 1px solid #9c927b80; }
.research-introduction p, .research-introduction p:first-child {
  font-size: 16px;
  line-height: 2.1;
  color: var(--room-text);
  letter-spacing: .7px;
}
.research-colophon { color: var(--room-muted); margin-top: 30px; max-width: none; }
.small-seal { color: var(--room-muted); border-color: #8a7e6559; }
.research-colophon i { background: var(--line); }
.research-grid { gap: 18px; }
.research-shell .research-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, #eae7dd4d, #b5afa01a);
  border: 1px solid #96908255;
  box-shadow: inset 1px 1px 0 #fffbee6b, 2px 4px 8px #4e48340a;
  padding: 20px 22px;
  min-height: 205px;
  transition: background .3s, box-shadow .3s, transform .3s;
}
.research-shell .research-card:hover, .research-shell .research-card:focus-visible {
  transform: translateY(-3px);
  background: #f8f3e299;
  border-color: #8c7c5d;
  box-shadow: inset 1px 1px 1px #fff7df, 0 10px 18px #4b412413;
}
.research-card-top { color: var(--room-muted); font-size: 10px; margin-bottom: 17px; }
.research-card strong { color: var(--room-text); font-size: 24px; }
.research-card-title { color: var(--room-muted); font-size: 12px; line-height: 1.8; margin-block: 9px 21px; }
.research-card-action { color: var(--room-muted); font-size: 9px; }
.research-card-era { font: 10px Georgia, var(--serif); color: #8b7857; letter-spacing: 1px; margin-bottom: 7px; }
.research-card-ornament { position: absolute; right: 18px; top: 20px; width: 45px; height: 40px; opacity: .20; color: #71664d; pointer-events: none; transition: transform .5s; }
.research-card-ornament svg { width: 100%; height: 100%; stroke-width: .9; }
.research-card:hover .research-card-ornament { transform: rotate(-8deg); }
.research-card-top > span:last-child { visibility: hidden; }
.research-grid-six .research-card { padding-block: 23px; min-height: 180px; }
.research-grid-six .research-card-title { font-size: 14px; }
.research-grid-six .card-technology { border-top: 2px solid #85735499; }
.research-grid-six .research-card:nth-child(n+4) { border-top: 2px solid #9b948780; }
.research-shell .research-feature {
  display: flex;
  padding: 0;
  min-height: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.research-shell .research-feature:hover { background: transparent; box-shadow: none; }
.research-feature .research-card-top { width: 100%; order: 1; margin: 0 0 18px; }
.research-feature .feature-scene { width: 100%; order: 2; margin: 0 0 25px; border-width: 19px; }
.research-feature .feature-scene::after { inset: -22px; }
.feature-scene canvas { aspect-ratio: 1.8; }
.research-feature strong { order: 3; font-size: 29px; }
.research-feature-copy { order: 4; color: var(--room-muted); font-size: 14px; margin: 14px 0 25px; min-height: 56px; }
.research-feature .research-card-action { order: 5; font-size: 10px; }
.research-feature .research-line-motif { display: none; }
.research-explanation { max-width: none; columns: 2; column-gap: 50px; }
.research-explanation p { font-size: 15px; line-height: 2.1; letter-spacing: .5px; break-inside: avoid; margin-bottom: 20px; }
.research-explanation p:last-child { padding: 20px 22px; background: #b6ab9021; border-left: 1px solid #827253; }
.research-references { max-width: none; columns: 2; column-gap: 50px; }
.research-references li { color: var(--room-text); font-size: 13px; padding-block: 15px; break-inside: avoid; border-color: var(--line); }
.research-references li::before { color: var(--room-muted); top: 15px; font-size: 12px; }
.research-visual-sources { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 24px; }
.research-visual-sources h2 { font: 400 18px var(--serif); letter-spacing: 2px; margin: 0 0 12px; }
.research-visual-sources p { font: 11px/1.9 var(--serif); color: var(--room-muted); margin: 0 0 20px; }
.research-visual-sources > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; }
.research-visual-sources a { display: flex; flex-direction: column; gap: 6px; font: 12px/1.7 var(--serif); border-left: 1px solid var(--line); padding-left: 13px; }
.research-visual-sources a span { font-size: 10px; color: var(--room-muted); }
.research-visual-sources a:hover { text-decoration: underline; }
.research-pagination, .footer { background: transparent; color: var(--room-muted); border-top: 1px solid #827b6833; padding-inline: 5%; }
.research-chapters a, .research-chapters a span, .steps b, .footer > p { color: var(--room-muted); }
.research-chapters a[aria-current], .research-chapters a[aria-current] span, .research-chapters a:hover { color: var(--room-text); }
.research-chapters a[aria-current] { border-color: #978259; }
.research-next { background: #6b5b3f; border-color: #6b5b3f; color: #f3ead7 !important; }
.research-next:hover { background: #50452f; }
.shadow-atmosphere { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; opacity: .34; }
.shadow-atmosphere-controls { position: absolute; right: 5%; bottom: 26px; display: flex; align-items: center; gap: 23px; color: var(--room-muted); }
.shadow-light-note { font: 10px var(--serif); letter-spacing: 2px; }
.shadow-motion-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); font: 10px var(--serif); letter-spacing: 1px; }
.shadow-motion-toggle:hover { background: #f0e9d550; }
.shadow-motion-toggle > span:first-child { width: 12px; font: 12px var(--sans); text-align: center; }
.shadow-lamp-cursor { position: fixed; top: 0; left: 0; width: 18px; height: 18px; z-index: 30; border: 1px solid #ffedbb8f; border-radius: 50%; background: radial-gradient(circle, #fff5d8b0, #ffe7ac22 40%, transparent 70%); box-shadow: 0 0 22px 6px #ffe0a855; opacity: 0; pointer-events: none; transition: opacity .2s; will-change: transform; }
.shadow-lamp-cursor.is-visible { opacity: 1; }
.shadow-light-surface { --lamp-x: 50%; --lamp-y: 38%; }
.stage-lamp-wash { position: absolute; inset: 0; pointer-events: none; }
.theatre.is-lamp-lit .stage-lamp-wash { background: radial-gradient(circle 380px at var(--lamp-x) var(--lamp-y), #fff1b350, #ffe0a11c 45%, transparent 100%); }
.research-dialog.shadow-light-surface, .drawer { background: #e3dfd2; border-color: #958971; }
.research-dialog.is-lamp-lit, .drawer.is-lamp-lit { background: radial-gradient(circle 360px at var(--lamp-x) var(--lamp-y), #fff4d1b3, transparent), #e3dfd2; }
.research-dialog h2 { color: #494338; }
.research-dialog .research-kicker, .research-dialog .research-prose, .research-detail-article h3 { color: #655a47; }
.research-dialog-footer, .drawer-footer { background: #c6bda929; color: #7c7059; }
.research-dialog::backdrop { background: #16130db0; backdrop-filter: blur(7px); }
.research-dialog-close { background: #f7f1df70; }
.research-lineage li { border-color: #94846466; background: #ece4d2; }
.research-lineage strong { color: #635135; }
/* The original theatre uses the same deep frame, with its controls in front. */
.theatre {
  margin: 20px 4% 27px;
  border: 24px solid;
  border-color: #aaa89f #c2c0b7 #eeeae0 #c8c5bc;
  box-shadow: 0 2px 1px #fffbeab0, 0 16px 23px -18px #352c2170;
  min-height: 670px;
  background: #a3894a;
}
.theatre::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 7px 14px #120e0c55; pointer-events: none; z-index: 2; }
.theatre .frame-corner, .theatre .vertical-note { display: none; }
.welcome { padding-top: 70px; padding-bottom: 110px; }
.welcome h1 { font-size: 68px; color: #3d3019; letter-spacing: 11px; text-shadow: 0 1px 15px #fff0b655; }
.welcome .hero-copy, .privacy-note, .demo-button { color: #574628; }
.primary-button { background: #4d3a21; box-shadow: inset 0 0 0 1px #b49963, 0 6px 17px #46311344; }
.primary-button:hover { background: #352717; }
.welcome .eyebrow { color: #d7c08b; text-shadow: 0 1px 3px #322615; }
.welcome-caption { left: 50%; right: auto; bottom: 30px; transform: translateX(-50%); padding: 10px 14px; background: #efdeb99c; color: #5c4930; white-space: nowrap; }
.stage-topline { margin: 26px 30px; }
.stage-heading { top: 24px; padding: 8px 16px; background: #f1dfaecc; color: #554124; }
.theatre .settings-trigger, .theatre .library-trigger { background: #eee0b9dd; color: #4e3c24; }
.topbar .shadow-room-toggle { margin-left: auto; margin-right: 30px; }
.topbar-note { position: absolute; left: 43%; font-size: 11px; }
/* Dark-room mode replicates the second lighting state in the reference. */
body.shadow-room-dark { --room: #171712; --room-light: #24221b; --room-text: #d4cbb4; --room-muted: #a09883; }
.shadow-room-dark .shadowbox-frame, .shadow-room-dark .theatre {
  border-color: #141411 #22221c #38352a #24231d;
  box-shadow: 0 1px 1px #524b3433, 0 0 40px #efd17f0b;
}
.shadow-room-dark .shadowbox-frame::after { border-color: #0f100d; box-shadow: none; }
.shadow-room-dark .research-heading h1 { text-shadow: 1px 2px 1px #000; }
.shadow-room-dark .brand-seal { background: #28271f; color: #b5ad97; border-color: #3a382b; text-shadow: none; box-shadow: inset 1px 1px 2px #706a3e33, 2px 3px 5px #0004; }
.shadow-room-dark .research-card { background: #b09a6310; border-color: #b1a06f30; box-shadow: inset 1px 1px 0 #e2d7aa08; }
.shadow-room-dark .research-card:hover { background: #d5bb791b; border-color: #a7976866; box-shadow: none; }
.shadow-room-dark .research-feature, .shadow-room-dark .research-feature:hover { background: transparent; border: 0; }
.shadow-room-dark .research-card-ornament { color: #d9bd7b; opacity: .24; }
.shadow-room-dark .research-card-era { color: #b4a07a; }
.shadow-room-dark .research-explanation p:last-child { background: #d1b05e0d; }
.shadow-room-dark .research-dialog, .shadow-room-dark .drawer { --room-text: #4f4b42; --room-muted: #787266; }
@keyframes shadowbox-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.research-shell[data-motion="still"] .research-page { animation: none; }
.research-shell[data-motion="still"] .research-card { transition: none; }
@media (max-width: 1100px) {
  .research-shell .research-paper { padding-top: 36px; }
  .research-topbar-note { display: none; }
  .research-grid { gap: 13px; }
  .research-shell .research-card { padding: 17px; }
  .research-card strong { font-size: 23px; }
  .research-card-ornament { right: 10px; }
  .research-feature .feature-scene { border-width: 15px; }
  .research-feature .feature-scene::after { inset: -18px; }
  .research-visual-sources > div { grid-template-columns: repeat(2, 1fr); }
  .research-explanation, .research-references { column-gap: 30px; }
  .topbar-note { display: none; }
  .theatre { border-width: 18px; min-height: 625px; }
  .stage-heading { top: 83px; }
  .theatre .camera-preview { left: 20px; width: 150px; }
}
@media (max-width: 800px) {
  .research-heading h1, .research-opening h1 { font-size: 33px; }
  .research-references, .research-explanation { columns: 1; }
  .theatre { margin-inline: 3%; }
  .welcome h1 { font-size: 60px; }
}
@media (max-width: 650px) {
  .research-topbar, .topbar { min-height: 76px; height: 76px; padding: 17px 22px; gap: 15px; }
  .brand-name { font-size: 20px; }
  .research-topbar-actions { gap: 17px; }
  .shadow-room-toggle { font-size: 10px; gap: 6px; letter-spacing: 0; }
  .shadow-room-toggle > span { font-size: 16px; }
  .research-stage-link { gap: 7px; font-size: 10px; letter-spacing: 0; }
  .research-shell .research-paper { padding: 30px 24px 76px; }
  .research-kicker { font-size: 8px; letter-spacing: 1px; gap: 10px; margin-bottom: 15px; }
  .research-heading, .research-opening .research-heading { margin-bottom: 23px; }
  .research-heading h1, .research-opening h1 { font-size: 28px; letter-spacing: 1px; line-height: 1.55; }
  .research-hint { font-size: 10px; letter-spacing: .5px; line-height: 1.9; }
  .chapter-scene { margin: 0 -5px 25px; }
  .shadowbox-frame { border-width: 12px; }
  .shadowbox-frame::after { inset: -15px; }
  .shadowbox-frame canvas { aspect-ratio: 1.65; }
  .chapter-scene figcaption { gap: 12px; padding: 13px 5px 0; font-size: 9px; letter-spacing: .5px; }
  .chapter-scene figcaption > span:first-child { font-size: 13px; letter-spacing: 2px; white-space: nowrap; }
  .chapter-scene .scene-edition { display: none; }
  .research-introduction { padding-left: 16px; }
  .research-introduction p { font-size: 15px; line-height: 2.1; }
  .research-shell .research-grid-ten .research-card { min-height: 207px; padding: 16px 14px; }
  .research-grid-six .research-card { min-height: 167px; }
  .research-grid-six .research-card-title { max-width: 95%; }
  .research-grid-two { gap: 33px; }
  .research-shell .research-feature { padding: 0; }
  .research-feature .feature-scene { border-width: 12px; margin-bottom: 21px; }
  .research-feature .feature-scene::after { inset: -15px; }
  .research-feature strong { font-size: 26px; }
  .research-feature-copy { min-height: 0; margin-bottom: 20px; font-size: 13px; }
  .research-explanation p { font-size: 15px; }
  .research-references li { font-size: 13px; padding-block: 13px; }
  .research-references li::before { top: 13px; }
  .research-visual-sources > div { grid-template-columns: 1fr; gap: 17px; }
  .research-visual-sources h2 { font-size: 17px; }
  .shadow-atmosphere-controls { right: 24px; bottom: 22px; }
  .shadow-light-note { display: none; }
  .research-pagination { padding-inline: 24px; }
  .theatre { border-width: 11px; margin: 10px 14px 16px; min-height: 660px; }
  .welcome { width: 100%; padding: 80px 12px 165px; }
  .welcome h1 { font-size: 50px; letter-spacing: 6px; padding-left: 6px; }
  .hero-copy { letter-spacing: 1px; }
  .topbar .shadow-room-toggle { margin-right: 0; }
  .topbar .shadow-room-toggle span { display: none; }
  .theatre-research-links { gap: 13px; }
  .theatre-research-links .culture-link { gap: 4px; font-size: 10px; letter-spacing: 0; white-space: nowrap; }
  .theatre .camera-preview { width: 125px; left: 14px; bottom: 20px; }
  .stage-topline { margin: 23px 15px; }
  .stage-heading { width: 205px; max-width: 80%; }
  .theatre .settings-trigger { right: 14px; bottom: 22px; }
  .theatre .library-trigger { right: 66px; bottom: 23px; }
  .welcome-caption { left: 18px; bottom: 90px; transform: none; }
  .finger-dock { width: calc(100% - 28px); bottom: 184px; }
}
@media (max-width: 370px) {
  .research-topbar, .topbar { padding-inline: 17px; gap: 10px; }
  .research-topbar-actions { gap: 10px; }
  .research-stage-link > span { display: none; }
  .research-shell .research-paper { padding-inline: 22px; }
  .research-opening h1 { font-size: 25px; }
  .research-grid-ten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .research-shell .research-grid-ten .research-card { padding: 15px 11px; }
  .research-card-title { font-size: 11px; }
  .research-card strong { font-size: 22px; }
  .theatre-research-links { gap: 8px; }
  .topbar .shadow-room-toggle { font-size: 9px; }
  .topbar .brand { gap: 8px; }
  .topbar .brand-name { font-size: 18px; }
  .topbar .brand-name small { font-size: 5px; letter-spacing: 1.4px; }
  .welcome h1 { font-size: 44px; }
  .primary-button { min-width: 205px; }
  .theatre .camera-preview { width: 111px; }
}
@media (max-height: 550px) and (orientation: landscape) {
  .theatre { min-height: 430px; margin-top: 10px; }
  .welcome { padding-block: 38px 50px; }
  .welcome h1 { font-size: 42px; }
  .app-shell.performing .theatre { min-height: 410px; }
  .stage-heading { top: 33px; }
  .finger-dock { bottom: 17px; }
  .theatre .camera-preview { width: 125px; }
}
@media (hover: none), (pointer: coarse) { .shadow-lamp-cursor, .shadow-light-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .research-shell .research-page { animation: none; } }
