/* STAAI Core: one responsive stylesheet, original artwork and gold identity. */
:root {
  --gold: #D4A017;
  --gold-dark: #805D00;
  --gold-light: #F2D67A;
  --bg: #0b1015;
  --panel: #162023;
  --surface: #f7f8f5;
  --ink: #172025;
  --muted: #aebbbd;
  --line: #3b484a;
  --wrap: 1280px;
  --header-height: 80px;
  --hero-banner-height: 88px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark light;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--bg); color: #f4f5ef; font: 16px/1.65 Inter, Aptos, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; opacity: .6; }
:where(a, button, select, input, summary):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, h4, p { margin: 0 0 16px; }
h1, h2, h3, h4, em { letter-spacing: 0; }
h1, h2 { font-weight: 750; line-height: 1.12; text-wrap: balance; }
h2 { font-size: 48px; }
h3 { font-size: 24px; line-height: 1.25; }
em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.container, .wrap { width: calc(100% - 80px); max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.section, .section-block { padding-block: 72px; }
section[id] { scroll-margin-top: 0; }
.section-kicker { display: flex; gap: 14px; align-items: center; color: #53605c; font-size: 12px; font-weight: 750; line-height: 1.5; margin-bottom: 28px; }
.kicker-num { width: 30px; height: 30px; flex: none; border: 1px solid #7d8780; border-radius: 50%; display: grid; place-items: center; }
.kicker-line { flex: 1; border-top: 1px solid #ccd1ca; }
.section-kicker-dark { color: #bfcac8; }
.section-kicker-dark .kicker-line { border-color: var(--line); }
.eyebrow { font-size: 12px; font-weight: 750; }
.quiet { color: #58635e; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 800; line-height: 1.4; transition: background .2s, border-color .2s; }
.btn-gold { background: var(--gold); color: #141d20; }
.btn-gold:hover { background: var(--gold-light); }
.btn-ghost { border-color: #667274; color: #f4f5ef; }
.btn-ghost:hover { border-color: var(--gold-light); }
.top-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.skip-link { position: fixed; left: 16px; top: -90px; z-index: 300; padding: 12px 18px; background: var(--gold); color: #10181b; }
.skip-link:focus { top: 12px; }
.progress-bar { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 210; background: var(--gold); pointer-events: none; }
.anchor-alias { position: absolute; left: 0; top: 0; }

/* Sticky navigation and compact storefront band. */
.site-header { position: sticky; top: 0; z-index: 150; height: 80px; background: #fff; color: var(--ink); border-bottom: 1px solid #d5d9d3; }
.site-header.is-scrolled { box-shadow: 0 4px 15px #0b10150d; }
.header-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; height: 100%; align-items: center; }
.identity { display: inline-flex; align-items: center; gap: 10px; width: max-content; }
.identity img { width: 36px; height: 44px; object-fit: contain; }
.identity-copy { display: grid; gap: 3px; }
.identity-copy strong { font-size: 18px; font-weight: 850; line-height: 1.1; }
.identity-copy small { font-size: 9px; color: #52605b; font-weight: 650; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { display: flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 650; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { color: var(--gold-dark); border-bottom-color: var(--gold); }
.header-action { justify-self: end; display: inline-flex; align-items: center; gap: 16px; min-height: 44px; border: 1px solid var(--gold); color: var(--gold-dark); padding: 10px 16px; font-size: 12px; font-weight: 800; }
.header-action:hover { background: var(--gold); color: var(--ink); }
.menu-toggle { display: none; width: 44px; min-height: 44px; border: 1px solid #939e99; background: #fff; gap: 5px; align-items: center; justify-content: center; flex-direction: column; }
.menu-toggle span { width: 20px; height: 2px; background: var(--ink); }
.book-sales-banner { background: #101719; border-bottom: 1px solid #5c522d; }
.book-sales-banner-inner { display: flex; align-items: center; gap: 18px; min-height: 88px; padding-block: 10px; }
.book-sales-banner-cover { width: 40px; flex: none; }
.book-sales-banner-cover img { width: 40px; height: 60px; object-fit: contain; }
.book-sales-banner-message { display: grid; gap: 2px; min-width: 0; flex: 1; }
.book-sales-banner-eyebrow { color: var(--gold-light); font-size: 11px; font-weight: 750; }
.book-sales-banner-message strong { font-size: 18px; line-height: 1.3; }
.book-sales-banner-subtitle { color: #b6c0bc; font-size: 12px; }
.book-sales-banner-shop { flex: none; }
.book-sales-banner-links { display: flex; gap: 8px; }
.book-sales-banner-links a { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 16px; border: 1px solid #56605c; border-radius: 3px; font-size: 12px; font-weight: 700; }
.book-sales-banner-links a:hover { border-color: var(--gold-light); }
.book-sales-banner-links .book-sales-banner-primary { background: var(--gold); border-color: var(--gold); color: #141d20; }

/* The book stays clear and inspectable inside the original 3D scene. */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0b1015; min-height: calc(100vh - var(--header-height) - var(--hero-banner-height)); min-height: calc(100svh - var(--header-height) - var(--hero-banner-height)); }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .32; background-image: linear-gradient(#a0b5b00e 1px, transparent 1px), linear-gradient(90deg,#a0b5b00e 1px,transparent 1px); background-size: 78px 78px; pointer-events: none; }
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .6; pointer-events: none; }
.hero-glow { display: none; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding-block: 44px 24px; }
.hero-content { min-width: 0; }
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--gold-light); margin-bottom: 22px; }
.eyebrow-trail { color: #a0afac; }
.signal-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.hero h1 { font-size: 64px; line-height: 1.06; margin-bottom: 24px; }
.hero h1 em { color: var(--gold-light); }
.hero-deck { font-size: 20px; line-height: 1.5; color: #c1cbc7; }
.hero-deck strong { color: #fff; }
.hero-body { max-width: 55ch; color: #b1bebc; font-size: 16px; line-height: 1.7; margin-bottom: 26px; }
.hero-actions { margin-bottom: 8px; }
.hero-sample { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; color: var(--gold-light); }
.hero-sample:hover { text-decoration: underline; }
.hero-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding-top: 20px; margin-top: 12px; border-top: 1px solid var(--line); }
.hero-metrics div { display: grid; gap: 6px; }
.hero-metrics b { font-size: 28px; line-height: 1.2; font-weight: 650; }
.hero-metrics span { color: #b4c1bb; font-size: 11px; line-height: 1.4; font-weight: 650; }
.hero-art { position: relative; height: 530px; min-width: 0; perspective: 1100px; --art-x: 0deg; --art-y: 0deg; }
.art-stage { position: absolute; inset: 0; transform: rotateY(var(--art-x)) rotateX(var(--art-y)); transition: transform .25s ease-out; transform-style: preserve-3d; }
.orbit { position: absolute; width: 74%; height: 74%; left: 14%; top: 11%; border: 1px solid #d4a01763; border-radius: 50%; transform-style: preserve-3d; }
.orbit:after { content: ""; position: absolute; left: 20%; top: 5%; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.orbit-one { transform: rotate(-19deg) rotateX(65deg); animation: orbitOne 13s linear infinite; }
.orbit-two { width: 87%; height: 87%; top: 4.5%; left: 7.5%; border-color: #92a8a74d; transform: rotate(46deg) rotateY(67deg); animation: orbitTwo 19s linear infinite; }
.orbit-three { width: 59%; height: 59%; top: 18%; left: 22%; transform: rotate(80deg) rotateX(70deg); animation: orbitThree 11s linear infinite; }
.art-crosshair { position: absolute; width: 13px; height: 13px; border: 1px solid #d7b365; transform: rotate(45deg); }
.xh-one { top: 20%; left: 16%; }
.xh-two { bottom: 15%; right: 9%; }
.constellation span { width: 3px; height: 3px; background: #d2ded8; position: absolute; }
.constellation span:nth-child(1) { left: 20%; top: 43%; }
.constellation span:nth-child(2) { left: 83%; top: 22%; }
.constellation span:nth-child(3) { left: 73%; top: 68%; }
.constellation span:nth-child(4) { left: 42%; top: 14%; }
.constellation span:nth-child(5) { left: 7%; top: 74%; }
.book-platform { position: absolute; left: 25%; top: 76%; width: 58%; height: 12%; border-radius: 50%; background: #d4a01718; transform: rotate(-12deg); }
.book-object { position: absolute; width: 260px; aspect-ratio: 2/3; left: 50%; top: 47%; transform-style: preserve-3d; transform: translate(-47%,-52%) rotateY(-22deg) rotateX(6deg) rotateZ(-4deg); filter: drop-shadow(20px 28px 22px #0009); animation: bookFloat 4.8s ease-in-out infinite; }
.front-cover { width: 100%; height: 100%; position: relative; z-index: 3; object-fit: cover; }
.book-side { position: absolute; inset: 0; left: -18px; width: 22px; background: linear-gradient(90deg,#7b8185,#e4e5e3,#a8abb0); transform: rotateY(-90deg); transform-origin: right center; z-index: 2; }
.book-edge { position: absolute; inset: 0; background: #d7d9d5; transform: translateZ(-13px) translateX(12px); }
.floating-label { position: absolute; min-width: 118px; border: 1px solid #847343; background: #0e1419ed; padding: 11px 12px; display: grid; gap: 4px; transform: translateZ(70px); animation: floatBadge 5.5s ease-in-out infinite; }
.fl-index { color: #c7bc9c; font-size: 10px; font-weight: 650; }
.floating-label strong { font-size: 13px; font-weight: 750; }
.fl-dot { position: absolute; width: 4px; height: 4px; background: var(--gold); right: 9px; top: 10px; border-radius: 50%; }
.fl-top { top: 9%; left: 0; animation-delay: -2s; }
.fl-right { right: 0; top: 38%; animation-delay: -4s; }
.fl-bottom { left: 2%; bottom: 8%; }
.art-label { position: absolute; right: 4%; bottom: 0; font-size: 10px; color: var(--gold-light); }
.art-label span { color: #adb8b1; }
.hero-foot { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: #c0cbc6; font-size: 11px; font-weight: 650; }
.hero-foot a { color: var(--gold-light); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.motion-toggle { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: #c0cbc6; font-size: 11px; font-weight: 750; }
.motion-icon { font-size: 17px; color: var(--gold-light); }
@keyframes orbitOne { to { transform: rotate(341deg) rotateX(65deg); } }
@keyframes orbitTwo { to { transform: rotate(406deg) rotateY(67deg); } }
@keyframes orbitThree { to { transform: rotate(440deg) rotateX(70deg); } }
@keyframes bookFloat {
  0%, 100% { transform: translate(-47%,-52%) rotateY(-22deg) rotateX(6deg) rotateZ(-4deg); }
  50% { transform: translate(-47%,-58%) rotateY(-10deg) rotateX(9deg) rotateZ(-1deg); }
}
@keyframes floatBadge {
  0%, 100% { transform: translate3d(0,3px,70px); }
  50% { transform: translate3d(0,-13px,70px); }
}
.ribbon { height: 48px; overflow: hidden; background: var(--gold); color: #152021; display: flex; align-items: center; }
.ribbon-track { display: flex; gap: 28px; align-items: center; width: max-content; white-space: nowrap; animation: marquee 34s linear infinite; }
.ribbon span { font-size: 15px; font-weight: 750; }
.ribbon i { font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }
.journey-nav { background: #111a1d; border-bottom: 1px solid var(--line); }
.journey-inner { display: grid; grid-template-columns: 220px minmax(0,1fr); align-items: stretch; gap: 20px; }
.journey-heading { display: flex; gap: 12px; align-items: center; color: #c0ccc4; font-size: 11px; }
.journey-heading strong { color: var(--gold-light); font-size: 11px; }
.journey-asterisk { color: var(--gold); font-size: 28px; }
.journey-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.journey-links a { display: grid; align-content: center; gap: 6px; border-left: 1px solid var(--line); padding: 20px 16px; min-height: 96px; }
.journey-links a:hover { background: #1e2a27; }
.journey-step { color: var(--gold-light); font-size: 11px; }
.journey-links strong { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; line-height: 1.4; }
.journey-links strong span { color: var(--gold-light); }

/* Philosophy and architecture. */
.perspective-section, .book-section, .about-section { background: var(--surface); color: var(--ink); }
.perspective-heading, .stable-heading { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.perspective-heading h2 { margin-bottom: 0; }
.perspective-heading h2 em, .book-information h2 em { color: var(--gold-dark); }
.outline-word { color: #58625d; -webkit-text-stroke: 0; }
.perspective-description { border-left: 1px solid #a6b0a6; padding-left: 24px; }
.perspective-description p { font-size: 16px; }
.perspective-description .quiet { font-size: 14px; margin-bottom: 0; }
.small-asterisk { color: var(--gold-dark); font-size: 24px; display: block; margin-bottom: 10px; }
.principle-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.principle-card { min-width: 0; padding: 24px; border: 1px solid #c7d0c5; border-radius: 4px; display: flex; flex-direction: column; }
.pc-top { display: flex; justify-content: space-between; margin-bottom: 20px; color: #53625a; font-size: 12px; }
.pc-top svg { width: 48px; height: 48px; fill: none; stroke: var(--gold-dark); stroke-width: 1.3; }
.principle-card h3 { font-size: 23px; }
.principle-card h3 span { color: var(--gold-dark); }
.principle-card p { font-size: 15px; color: #4f5b55; }
.pc-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid #c7d0c5; font-size: 11px; color: #516058; font-weight: 750; }
.architecture-section { background: #141b1e; }
#architecture .eyebrow-light { color: #d8cba7; }
.section-number { color: var(--gold-light); }
.architecture-head { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); gap: 32px; align-items: end; margin: 16px 0 32px; }
.architecture-head h2 { margin-bottom: 0; }
.architecture-head h2 em { color: var(--gold-light); }
.architecture-head p { color: #bcc6bb; font-size: 16px; margin-bottom: 0; max-width: 36ch; justify-self: end; }
.architecture-ui { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 20px; }
.architecture-layers { display: flex; flex-direction: column; gap: 6px; }
.layer-item { display: grid; grid-template-columns: 30px minmax(0,1fr) 18px; gap: 10px; align-items: center; width: 100%; min-height: 56px; padding: 12px 16px; border: 1px solid #44524d; background: #202a28; color: #ecf0e7; font-size: 14px; font-weight: 650; text-align: left; border-radius: 3px; }
.layer-item:hover { border-color: var(--gold-light); }
.layer-item.active { color: #152020; background: var(--gold); border-color: var(--gold); }
.layer-num { font-size: 12px; }
.layer-arrow { justify-self: end; }
.architecture-panel { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid #44524d; background: #202a28; }
.panel-overline { font-size: 11px; color: #d9cfb0; margin-bottom: 8px; }
.panel-overline span { color: #bec7b8; }
.architecture-visual { position: relative; min-height: 210px; display: grid; place-items: center; perspective: 900px; overflow: hidden; }
.visual-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.visual-rings span { position: absolute; width: 310px; height: 180px; border: 1px solid #858e6770; border-radius: 50%; transform: rotate(-28deg); }
.visual-rings span:nth-child(2) { width: 250px; height: 210px; transform: rotate(33deg); border-style: dashed; }
.visual-rings span:nth-child(3) { width: 170px; height: 150px; transform: rotate(75deg); border-color: #dbad4e70; }
.architecture-stack { position: absolute; transform: rotateX(57deg) rotateZ(-29deg); transform-style: preserve-3d; display: flex; flex-direction: column; gap: 6px; }
.architecture-stack i { display: block; width: 175px; height: 20px; border: 1px solid #d4a01777; background: #455a4e; box-shadow: 8px 8px 8px #0005; transform: translateZ(5px); transition: background .25s; }
.architecture-stack i.active { background: var(--gold); }
.visual-core { position: absolute; right: 12%; top: 35%; border: 1px solid #d4a0177f; background: #232d2ce6; padding: 12px; display: grid; gap: 2px; }
.visual-core span { font-size: 30px; font-weight: 750; color: var(--gold-light); line-height: 1; }
.visual-core small { font-size: 11px; color: #d5dbcb; }
.visual-dot { display: none; }
.layer-detail .eyebrow { color: var(--gold-light); margin-bottom: 8px; }
.layer-detail h3 { font-size: 26px; margin-bottom: 10px; }
.layer-detail > p:not(.eyebrow) { color: #c4cdc4; font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
.layer-detail .practice-label { color: var(--gold-light) !important; font-size: 11px !important; font-weight: 750; margin-bottom: 4px !important; }
.layer-lab-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold-light); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.architecture-mantra { border-top: 1px solid #586455; padding-top: 14px; margin-top: 12px; font-size: 12px; color: #c6cec1; }
.architecture-mantra strong { color: var(--gold-light); }
.architecture-mobile-selector { display: none; }

/* Live Lab: one bounded workspace; actions and outcome stay in view. */
.lab-section.section { padding-block: 48px; background: var(--surface); color: var(--ink); }
.lab-section .section-kicker { margin-bottom: 14px; }
.lab-top { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); gap: 32px; align-items: center; margin-bottom: 20px; }
.lab-top h2 { margin: 0; font-size: 40px; }
.lab-top h2 em { color: var(--gold-dark); }
.lab-intro p { color: #4c5b55; font-size: 14px; line-height: 1.55; margin-bottom: 10px; max-width: 44ch; }
.lab-hint { display: flex; gap: 9px; align-items: center; font-size: 10px; font-weight: 750; color: #526059; }
.lab-fallback { padding: 20px 0; }
.lab-fallback a { color: var(--gold-dark); text-decoration: underline; }
html.lab-ready .lab-fallback { display: none; }
.sim-shell { display: none; height: min(620px,calc(100svh - var(--header-height) - 230px)); min-height: 340px; grid-template-rows: 42px minmax(0,1fr) 72px; overflow: hidden; background: #10191d; color: #ecf2e8; border: 1px solid #43524d; border-radius: 8px; box-shadow: 0 12px 40px #17202512; color-scheme: dark; }
html.lab-ready .sim-shell { display: grid; }
.sim-titlebar { display: flex; align-items: center; gap: 14px; min-width: 0; padding-inline: 20px; border-bottom: 1px solid var(--line); font-size: 10px; line-height: 1.3; letter-spacing: .05em; }
.sim-window-dots { display: flex; gap: 5px; }
.sim-window-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c39070; }
.sim-window-dots i:nth-child(2) { background: var(--gold); }
.sim-window-dots i:nth-child(3) { background: #78ad90; }
.sim-brand b { color: var(--gold-light); margin-inline: 8px; }
.sim-online { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: #b7cfbc; white-space: nowrap; }
.sim-online > span { width: 5px; height: 5px; background: #a0d4b1; border-radius: 50%; }
.sim-inner { display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: 0; overflow: hidden; }
.sim-settings { min-width: 0; min-height: 0; overflow: auto; background: #15201f; border-right: 1px solid var(--line); }
.sim-settings > summary { display: none; }
.sim-settings-body { display: grid; gap: 18px; padding: 20px; }
.sim-control-field { min-width: 0; }
.sim-control-field > label, .sim-field-label { display: block; color: #c2cdbf; font-size: 10px; font-weight: 750; line-height: 1.4; margin-bottom: 8px; letter-spacing: .04em; }
.sim-control-field select { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #697868; border-radius: 4px; background: #10191d; color: #f1f5e8; font-size: 14px; }
.architecture-mobile-selector select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #697868; border-radius: 3px; background: #17211d; color: #f1f5e8; font-size: 14px; }
.sim-scenario-note { color: #b7c8bf; font-size: 13px; line-height: 1.5; margin: 10px 0 8px; }
.sim-boundary { color: var(--gold-light); font-size: 10px; font-weight: 750; }
.sim-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; }
.sim-controls > .sim-control-field:first-child { grid-column: 1 / -1; }
.sim-switch-label { display: flex !important; align-items: center; gap: 8px; position: relative; min-height: 44px; margin: 0 !important; color: #f1f5e8 !important; font-size: 13px !important; cursor: pointer; }
.sim-switch-label input { width: 18px; height: 18px; accent-color: var(--gold); margin: 0; flex: none; }
.sim-mission-brief { border-top: 1px solid var(--line); }
.sim-mission-brief > summary { color: #c7d6cb; font-size: 13px; }
.sim-mission-brief p { font-size: 13px; line-height: 1.55; margin: 4px 0 10px; }
.sim-mission-brief > span { display: block; color: #b7c8bf; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.sim-results-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sim-results-overview { flex: 0 1 auto; min-height: 0; padding: 16px 20px 0; overflow: auto; background: #10191d; }
.sim-live-feedback { display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 12px; align-items: center; margin-bottom: 12px; }
.sim-live-body { min-width: 0; }
.sim-live-overline, .sim-eyebrow { color: var(--gold-light); font-size: 10px; line-height: 1.4; font-weight: 750; letter-spacing: .04em; }
.sim-screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sim-live-meter { display: flex; gap: 10px; align-items: center; }
.sim-live-meter-value { font: 650 12px/1.4 Consolas, monospace; white-space: nowrap; color: #c6d7ce; }
.sim-live-meter-track { display: block; flex: 1; height: 4px; background: #46554a; overflow: hidden; border-radius: 2px; }
.sim-live-meter-track > span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
.sim-verdict { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 14px; padding: 16px; border: 1px solid #576951; border-radius: 5px; background: #1c2821; }
.sim-verdict-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #9b9254; border-radius: 50%; color: var(--gold-light); font-size: 20px; }
.sim-verdict-meta { display: flex; gap: 6px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 7px; }
.sim-verdict-tag { font-size: 10px; line-height: 1.4; font-weight: 750; color: #c2cfbd; }
.sim-verdict h3 { font-size: 22px; line-height: 1.25; margin: 0 0 8px; text-wrap: balance; }
.sim-verdict p { color: #c9d6c0; font-size: 14px; line-height: 1.55; margin: 0; }
.sim-verdict[data-state="blocked"], .sim-verdict[data-state="unsafe"] { background: #302824; border-color: #ad8472; }
.sim-verdict[data-state="blocked"] .sim-verdict-icon, .sim-verdict[data-state="unsafe"] .sim-verdict-icon { color: #f3c1ad; border-color: #ad8472; }
.sim-verdict[data-state="verified"] { background: #1c3026; border-color: #90b598; }
.sim-verdict[data-state="verified"] .sim-verdict-icon { color: #c7ebd0; border-color: #90b598; }
.sim-verdict[data-state="rolledback"], .sim-verdict[data-state="escalated"] { background: #2c3022; border-color: #b69e59; }
.sim-results-scroll { flex: 1 0 44px; min-height: 44px; min-width: 0; overflow: auto; padding: 8px 20px 16px; }
.sim-settings, .sim-results-overview, .sim-results-scroll { overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #697868 transparent; }
.sim-detail-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.sim-trace-jump { display: inline-flex; align-items: center; justify-content: end; min-height: 44px; border: 0; background: transparent; padding: 0 4px; color: var(--gold-light); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.sim-path { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 6px; }
.sim-node { display: grid; justify-items: center; gap: 4px; min-width: 0; min-height: 70px; padding: 8px 3px; border: 1px solid #4b5d50; border-radius: 4px; background: #17231e; color: #d8e2cf; line-height: 1.4; }
.sim-node-num { font: 650 12px/1.3 Consolas, monospace; color: #a4b6a4; }
.sim-node small { font-size: 9px; font-weight: 650; }
.sim-node strong { font-size: 10px; font-weight: 750; }
.sim-node.is-current { box-shadow: inset 0 3px var(--gold); }
.sim-node.is-inspected { border-color: var(--gold-light); background: #2c3723; }
.sim-node[data-status="ok"] { color: #c7ebd0; }
.sim-node[data-status="blocked"], .sim-node[data-status="failed"] { color: #f3c1ad; border-color: #996f5e; }
.sim-node[data-status="warn"] { color: var(--gold-light); }
.sim-node[data-status="skipped"] { color: #aab8ad; border-style: dashed; }
.sim-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding-block: 14px; }
.sim-stats > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sim-stats span { font-size: 9px; line-height: 1.4; color: #bfd0b6; }
.sim-stats b { font: 650 22px/1.3 Consolas, monospace; color: var(--gold-light); }
details { min-width: 0; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-size: 14px; font-weight: 650; }
.sim-evidence { border-top: 1px solid var(--line); }
.sim-evidence > summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding-block: 12px; list-style: none; font-size: 13px; }
.sim-evidence > summary::-webkit-details-marker, .sim-settings > summary::-webkit-details-marker { display: none; }
.sim-evidence > summary::after { content: "+"; color: var(--gold-light); font-size: 20px; margin-left: auto; }
.sim-evidence[open] > summary::after { content: "−"; }
.sim-pane-state { color: var(--gold-light); font-size: 10px; font-weight: 650; }
.sim-workbench { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.sim-inspector, .sim-ledger { min-width: 0; }
.sim-inspector-titleline { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.sim-inspector-titleline > span { color: var(--gold-light); font-size: 11px; flex: none; }
.sim-inspector-titleline h4 { font-size: 18px; line-height: 1.4; margin: 0; }
.sim-inspector > p { color: #c2cfbd; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.sim-contract, #simTraceDetails { border-block: 1px solid var(--line); }
.sim-contract summary, #simTraceDetails summary { font-size: 13px; }
.sim-code-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10px; color: #c2d1ba; padding: 6px 0; }
.sim-code-heading button { min-height: 44px; background: transparent; border: 1px solid #69785e; color: var(--gold-light); padding: 8px 12px; border-radius: 3px; font-size: 11px; font-weight: 750; }
.sim-code { margin: 0 0 14px; padding: 12px; background: #090f12; color: #d0e6cb; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 Consolas, monospace; }
.sim-lesson { padding-top: 12px; }
.sim-lesson > span { color: var(--gold-light); font-size: 10px; font-weight: 750; }
.sim-lesson p { color: #c4d0be; font-size: 13px; line-height: 1.6; margin: 4px 0 0; }
#simTraceCount { color: #c8d6c2; font-size: 10px; margin-left: 12px; }
.sim-ledger-empty { padding: 16px 0; color: #c1cbb5; font-size: 13px; }
.sim-trace-row { display: grid; grid-template-columns: 18px minmax(0,1fr) 32px; gap: 8px; width: 100%; min-height: 52px; border: 0; border-top: 1px solid var(--line); background: transparent; color: #cbd9c2; padding: 10px 4px; text-align: left; }
.sim-trace-row.is-active { background: #253323; }
.sim-trace-marker { color: var(--gold-light); }
.sim-trace-msg { font-size: 12px; line-height: 1.5; }
.sim-trace-time { font-size: 10px; align-self: center; }
.sim-dock { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; border-top: 1px solid #6e643e; background: #18231f; }
.sim-dock-note { display: grid; gap: 2px; }
.sim-dock-note > span { color: var(--gold-light); font-size: 10px; font-weight: 750; }
.sim-dock-note small { color: #b7c8bf; font-size: 11px; }
.sim-actions { display: flex; align-items: center; gap: 8px; }
.sim-run, .sim-step-btn, .sim-reset { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; padding: 10px 16px; border: 1px solid #b59a48; border-radius: 4px; font-size: 12px; line-height: 1.4; font-weight: 750; white-space: nowrap; }
.sim-run { background: var(--gold); color: #101a1b; min-width: 160px; }
.sim-step-btn, .sim-reset { background: #10191d; color: var(--gold-light); }
.sim-reset { width: 44px; padding: 0; font-size: 20px; }
.sim-run:hover { background: var(--gold-light); }
.sim-step-btn:hover, .sim-reset:hover { background: #293629; }
.lab-caption { margin: 14px 0 0; font-size: 10px; color: #546050; line-height: 1.5; }
.lab-caption strong { color: #253527; font-weight: 650; }

@media (max-width: 1100px) {
  .sim-inner { grid-template-columns: 252px minmax(0,1fr); }
  .sim-workbench { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 900px) {
  .sim-inner { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .sim-settings { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .sim-settings > summary { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 20px; min-height: 48px; list-style: none; font-size: 13px; }
  .sim-settings > summary::after { content: "+"; color: var(--gold-light); font-size: 20px; }
  .sim-settings[open] > summary::after { content: "−"; }
  #simMissionName { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold-light); font-size: 11px; }
  .sim-settings-body { max-height: min(180px,28svh); overflow: auto; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; padding: 16px 20px; overscroll-behavior-y: contain; }
  .sim-controls { gap: 10px 12px; }
  .sim-mission-brief { grid-column: 1 / -1; }
  .sim-workbench { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
}
@media (max-width: 700px) {
  .lab-section.section { padding-block: 32px; }
  .lab-section .section-kicker > span:last-child { display: none; }
  .lab-top { grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
  .lab-top h2 { font-size: 32px; }
  .lab-intro p { margin: 0; font-size: 13px; max-width: 48ch; }
  .lab-hint { display: none; }
  .sim-shell { height: min(580px,calc(100svh - var(--header-height) - 240px)); min-height: 350px; grid-template-rows: 38px minmax(0,1fr) 64px; }
  .sim-titlebar { padding-inline: 12px; gap: 10px; font-size: 9px; }
  .sim-window-dots { display: none; }
  .sim-brand b { margin-inline: 5px; }
  .sim-settings > summary { padding-inline: 12px; }
  .sim-settings-body { grid-template-columns: 1fr; padding: 12px; gap: 14px; }
  .sim-results-overview { padding: 12px 12px 0; }
  .sim-results-scroll { padding: 6px 12px 12px; }
  .sim-live-feedback { grid-template-columns: minmax(0,1fr) 78px; gap: 8px; margin-bottom: 10px; }
  .sim-live-overline { font-size: 9px; }
  .sim-live-meter { gap: 7px; }
  .sim-verdict { grid-template-columns: 28px minmax(0,1fr); gap: 10px; padding: 12px; }
  .sim-verdict-icon { width: 28px; height: 28px; font-size: 18px; }
  .sim-verdict-meta { gap: 4px 10px; }
  .sim-verdict h3 { font-size: 19px; }
  .sim-verdict p { font-size: 13px; line-height: 1.5; }
  .sim-path { gap: 4px; }
  .sim-node { min-height: 48px; padding: 6px 1px; gap: 3px; }
  .sim-node strong { font-size: 8px; }
  .sim-node small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sim-stats { gap: 8px; padding-block: 12px; }
  .sim-stats > div { gap: 6px; }
  .sim-stats b { font-size: 20px; }
  .sim-stats span { font-size: 8px; }
  .sim-evidence > summary { font-size: 12px; gap: 10px; }
  .sim-evidence > summary .sim-pane-state { font-size: 9px; }
  .sim-workbench { grid-template-columns: 1fr; gap: 16px; }
  .sim-dock { padding: 10px 12px; gap: 0; }
  .sim-dock-note { display: none; }
  .sim-actions { width: 100%; gap: 6px; }
  .sim-run { flex: 1; min-width: 0; }
  .sim-run, .sim-step-btn { padding-inline: 10px; font-size: 11px; gap: 8px; }
}
@media (max-height: 720px) {
  .sim-results-overview { padding-top: 12px; }
  .sim-verdict { padding: 12px; }
  .sim-verdict h3 { font-size: 18px; }
  .sim-verdict p { font-size: 13px; }
  .sim-node { min-height: 44px; gap: 2px; padding-block: 6px; }
  .sim-node small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Book decisions come before secondary detail. */
.book-section { position: relative; }
.book-section-grid { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 48px; align-items: center; }
.book-display { position: relative; height: 520px; background: #172124; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 24px; color: #d6c58f; }
.book-display-grid { position: absolute; inset: 0; background-image: linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px); background-size: 60px 60px; }
.book-display-kicker, .book-display-caption { position: relative; font-size: 11px; }
.book-showcase { position: absolute; inset: 65px 0; display: grid; place-items: center; perspective: 1000px; }
.book-3d { width: 220px; aspect-ratio: 2/3; position: relative; transform: rotateY(-18deg) rotateZ(-3deg); transform-style: preserve-3d; filter: drop-shadow(16px 24px 20px #0008); }
.book-3d img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.book-3d-spine { position: absolute; inset: 0; background: #b8bdb7; transform: translateZ(-10px) translateX(-8px); }
.book-3d-pages { position: absolute; inset: 0; background: #ebeee4; transform: translateZ(-6px) translateX(8px); }
.book-information { min-width: 0; }
.book-kicker { margin-bottom: 16px; }
.book-available { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #506047; margin-bottom: 12px; }
.book-available > span { width: 6px; height: 6px; background: var(--gold-dark); border-radius: 50%; }
.book-information h2 { font-size: 40px; margin-bottom: 16px; }
.book-subhead { font-size: 19px; font-weight: 650; line-height: 1.45; margin-bottom: 12px; }
.book-paragraph { font-size: 15px; color: #4f5e51; }
.book-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 8px; }
.book-ctas > a { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border: 1px solid #869780; border-radius: 3px; padding: 10px 16px; font-size: 12px; font-weight: 750; }
.book-ctas > .btn-gold { border-color: var(--gold); }
.book-ctas > a:hover { border-color: var(--gold-dark); }
.book-sample-actions { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
.book-sample-actions a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--gold-dark); font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.book-audience { color: #4b5d4d; font-size: 14px; margin-bottom: 12px; }
.book-audience strong { color: var(--ink); }
.book-edition-note { color: #586b53; font-size: 12px; margin-bottom: 12px; }
.book-contents { border-top: 1px solid #aab8a0; }
.book-contents summary span { color: #53684b; font-size: 12px; margin-left: 10px; }
.book-contents ol { padding-left: 24px; font-size: 14px; color: #485c40; }
.book-contents li { margin-bottom: 6px; }

/* Practical principles, author, and contact. */
.stable-section { background: #101a1b; }
.stable-heading h2 em { color: var(--gold-light); }
.stable-heading p { color: #bdc9b9; margin-bottom: 0; }
.stable-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 28px; }
.stable-tile { border-top: 1px solid #4a5b47; display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 2px 12px; padding: 20px 0; min-width: 0; }
.stable-tile > span { grid-column: 2; font-size: 11px; color: var(--gold-light); }
.stable-tile b { grid-row: 1 / 4; font-size: 36px; font-weight: 650; line-height: 1.3; color: var(--gold-light); }
.stable-tile strong { font-size: 14px; }
.stable-tile small { font-size: 13px; color: #c3cfba; }
.stable-tile p { grid-column: 2; font-size: 14px; line-height: 1.55; margin: 10px 0 4px; color: #c0cdb4; }
.stable-tile a { grid-column: 2; color: var(--gold-light); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.about-grid { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 64px; align-items: center; }
.about-mark { display: grid; justify-items: center; gap: 14px; }
.mark-frame { width: 260px; aspect-ratio: 1; display: grid; place-items: center; }
.mark-frame img { width: 220px; max-height: 250px; object-fit: contain; }
.about-mark > span { color: #546847; font-size: 11px; text-align: center; }
.about-overline { color: var(--gold-dark); font-size: 12px; font-weight: 750; }
.about-content h2 { font-size: 48px; }
.about-content h2 span { color: var(--gold-dark); }
.about-content > p:not(.about-overline) { font-size: 17px; line-height: 1.7; color: #3c5140; }
.about-content .about-experience { font-size: 15px !important; }
.about-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.about-links a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid #859877; font-size: 12px; font-weight: 750; }
.contact-section { background: #101819; padding-block: 64px; }
.contact-section h2 { font-size: 48px; }
.contact-section h2 em { color: var(--gold-light); }
.contact-section > .container > p { color: #c0ccb6; font-size: 16px; max-width: 70ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px 36px; align-items: center; }
.contact-mail { display: inline-flex; align-items: center; gap: 16px; min-height: 48px; font-size: 23px; color: var(--gold-light); border-bottom: 1px solid #aa913e; overflow-wrap: anywhere; }
.newsletter-link { color: #f0f5e7; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; text-decoration: underline; text-underline-offset: 4px; }
.contact-section .contact-mantra { font-size: 14px !important; margin: 24px 0 0; }
.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 110; width: 48px; height: 48px; display: grid; place-content: center; gap: 0; background: var(--gold); color: #141c18; border-radius: 3px; opacity: 0; visibility: hidden; pointer-events: none; }
.back-to-top.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.back-to-top-label { font-size: 11px; font-weight: 750; }
body.footer-in-view .back-to-top { opacity: 0; visibility: hidden; pointer-events: none; }
.site-footer { background: #101819; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 750; }
.footer-logo img { width: 36px; height: 42px; object-fit: contain; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #f4f6f0; }
.socials a:hover { background: var(--gold-light); }
.socials img { width: 18px; height: 18px; object-fit: contain; }
.socials a::after { content: attr(aria-label); position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; background: #fff; color: #172025; font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 3px; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
.socials a:hover::after, .socials a:focus-visible::after { opacity: 1; visibility: visible; }
.socials a:nth-child(n+6)::after { left: auto; right: 0; translate: 0; }
.footer-bottom { display: flex; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.footer-bottom p, .footer-bottom a { font-size: 12px; color: #b5c4ab; margin: 0; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
body.hero-offscreen .hero *, body.hero-offscreen .hero *::before, body.hero-offscreen .hero *::after { animation-play-state: paused !important; }

/* One breakpoint per layout change; small screens keep functional text readable. */
@media (max-width: 1120px) {
  .container, .wrap { width: calc(100% - 56px); }
  .site-nav { gap: 14px; }
  .hero h1 { font-size: 56px; }
  .book-object { width: 235px; }
  .architecture-ui { grid-template-columns: 285px minmax(0,1fr); }
}
@media (max-width: 980px) {
  :root { --header-height: 72px; }
  .site-header { height: 72px; }
  .header-grid { grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; }
  .identity-copy strong { font-size: 17px; }
  .identity-copy small { font-size: 8px; }
  .site-nav { position: absolute; left: 0; right: 0; top: 72px; display: flex; flex-wrap: wrap; padding: 12px 24px; background: #fff; border-bottom: 1px solid #b7c0b3; gap: 8px 24px; }
  html.has-js .site-nav { display: none; flex-direction: column; flex-wrap: nowrap; max-height: calc(100dvh - 72px); overflow-y: auto; gap: 0; }
  html.has-js .site-nav.open { display: flex; }
  .site-nav a { min-height: 48px; }
  html.has-js .menu-toggle { display: flex; }
  .header-action { font-size: 11px; padding-inline: 12px; }
  .no-js .site-header { height: auto; min-height: 72px; }
  .no-js .header-grid { padding-block: 12px 76px; }
  .book-sales-banner-inner { gap: 12px; flex-wrap: wrap; }
  .book-sales-banner-shop { width: 100%; }
  .book-sales-banner-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .book-sales-banner-message strong { font-size: 17px; }
  .hero h1 { font-size: 48px; }
  .hero-art { height: 420px; }
  .book-object { width: 205px; }
  .floating-label { min-width: 100px; padding: 9px; }
  .fl-index { font-size: 9px; }
  .floating-label strong { font-size: 11px; }
  .hero-foot-center { display: none; }
  .journey-inner { grid-template-columns: 1fr; gap: 0; }
  .journey-heading { padding-top: 16px; }
  .journey-links a:first-child { border-left: 0; }
  .perspective-heading, .stable-heading, .architecture-head { grid-template-columns: 1fr; gap: 20px; }
  .architecture-head p { justify-self: start; max-width: 60ch; }
  .perspective-description { max-width: 65ch; }
  .architecture-ui { grid-template-columns: 1fr; }
  .architecture-layers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .book-section-grid { gap: 28px; }
  .book-display { height: 460px; }
  .book-3d { width: 185px; }
  .book-information h2 { font-size: 36px; }
  .stable-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .about-grid { grid-template-columns: 230px minmax(0,1fr); gap: 32px; }
  .mark-frame { width: 220px; }
  .mark-frame img { width: 185px; }
  .footer-top { align-items: start; }
}
@media (max-width: 700px) {
  .container, .wrap { width: calc(100% - 36px); }
  .section, .section-block { padding-block: 48px; }
  h2 { font-size: 36px; }
  .section-kicker { gap: 10px; margin-bottom: 22px; }
  .section-kicker > span:last-child:not(.kicker-num) { font-size: 11px; }
  .kicker-line, .section-kicker > .kicker-line + span { display: none; }
  .identity img { width: 30px; height: 38px; }
  .identity-copy strong { font-size: 15px; }
  .identity-copy small { display: none; }
  .header-action { gap: 8px; padding: 8px 10px; }
  .book-sales-banner-eyebrow { font-size: 10px; }
  .book-sales-banner-subtitle { display: none; }
  .book-sales-banner-inner { gap: 10px; min-height: 0; }
  .book-sales-banner-links a { font-size: 12px; padding-inline: 8px; gap: 6px; }
  .hero-layout { grid-template-columns: 1fr; gap: 16px; padding-block: 24px; }
  .hero-art { order: -1; height: 285px; }
  .hero-art .floating-label { display: none; }
  .book-object { width: 170px; }
  .fl-top { top: 7%; }
  .fl-right { top: 34%; }
  .fl-bottom { bottom: 2%; }
  .art-label { display: none; }
  .hero h1 { font-size: 42px; }
  .hero-eyebrow { font-size: 11px; margin-bottom: 14px; }
  .eyebrow-trail { display: none; }
  .hero-deck { font-size: 18px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1; padding-inline: 12px; }
  .hero-metrics { gap: 12px; }
  .hero-metrics span { font-size: 11px; }
  .hero-foot { font-size: 11px; }
  .ribbon { height: 42px; }
  .journey-heading { display: none; }
  .journey-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .journey-links a { min-height: 78px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
  .journey-links a:nth-child(3) { border-left: 0; }
  .journey-step { font-size: 11px; }
  .perspective-heading, .stable-heading { gap: 18px; margin-bottom: 24px; }
  .perspective-description { padding-left: 16px; }
  .principle-cards { grid-template-columns: 1fr; gap: 12px; }
  .principle-card { padding: 20px; }
  .pc-top { margin-bottom: 12px; }
  .principle-card h3 { font-size: 24px; }
  .architecture-head { margin-bottom: 22px; }
  html.has-js .architecture-layers { display: none; }
  html.has-js .architecture-mobile-selector { display: grid; gap: 8px; margin-bottom: 14px; font-size: 14px; }
  .architecture-mobile-selector select { min-height: 48px; }
  .architecture-panel { padding: 18px; }
  .visual-core { right: 3%; padding: 10px; }
  .visual-core small { font-size: 10px; }
  .architecture-layers { grid-template-columns: 1fr; }
  .book-section-grid { grid-template-columns: 1fr; gap: 28px; }
  .book-display { height: 365px; padding: 18px; }
  .book-3d { width: 155px; }
  .book-showcase { inset-block: 44px; }
  .book-information h2 { font-size: 34px; }
  .book-ctas { gap: 8px; }
  .book-ctas > a { flex: 1; padding: 10px; font-size: 11px; }
  .book-sample-actions { gap: 4px 16px; }
  .stable-grid { grid-template-columns: 1fr; }
  .stable-tile { grid-template-columns: 36px minmax(0,1fr); padding-block: 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-mark { justify-items: start; }
  .mark-frame { width: 170px; height: 170px; }
  .mark-frame img { width: 145px; max-height: 168px; }
  .about-content h2 { font-size: 38px; }
  .contact-section { padding-block: 48px; }
  .contact-section h2 { font-size: 36px; }
  .contact-mail { font-size: 18px; gap: 10px; }
  .contact-actions { gap: 12px; }
  .footer-top { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-wrap: wrap; justify-content: start; gap: 6px 20px; }
  .footer-bottom p:nth-child(2) { display: none; }
  .socials a::after { white-space: normal; width: max-content; max-width: 140px; }
  .back-to-top { right: 12px; bottom: 12px; }
}
@media (max-width: 380px) {
  .header-grid { gap: 8px; }
  .identity { gap: 6px; }
  .identity-copy strong { font-size: 14px; }
  .header-action { font-size: 10px; gap: 6px; padding-inline: 8px; }
  .hero h1 { font-size: 36px; }
  .hero-actions .btn { font-size: 11px; gap: 8px; padding-inline: 10px; }
  .floating-label { min-width: 88px; }
  .floating-label strong { font-size: 10px; }
  .book-sales-banner-message strong { font-size: 16px; }
  .contact-mail { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #starfield { display: none; }
  /* Only the book scene is allowed to animate automatically. The rest of the
     site's reduced-motion behavior stays exactly as it was. */
  body:not(.motion-paused) .hero .orbit-one { animation: orbitOne 13s linear infinite !important; }
  body:not(.motion-paused) .hero .orbit-two { animation: orbitTwo 19s linear infinite !important; }
  body:not(.motion-paused) .hero .orbit-three { animation: orbitThree 11s linear infinite !important; }
  body:not(.motion-paused) .hero .book-object { animation: bookFloat 4.8s ease-in-out infinite !important; }
  body:not(.motion-paused) .hero .floating-label { animation: floatBadge 5.5s ease-in-out infinite !important; }
  body:not(.motion-paused) #starfield { display: block; }
}

/* LIVE LAB 2.0 — compact, always-visible controls / pipeline / outcome workspace. */
.lab-section.section { padding-block: 38px 46px; background: radial-gradient(ellipse 55% 90% at 90% 12%, #e8e8df 0%, transparent 70%), #f7f8f5; }
.lab-section .section-kicker { margin-bottom: 11px; }
.lab-top { margin-bottom: 19px; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); }
.lab-top h2 { font-size: clamp(30px,3.15vw,43px); }
.lab-intro p { font-size: 14px; max-width: 51ch; }
.sim-shell { height: clamp(495px, calc(100svh - var(--header-height) - 207px), 690px); min-height: 0; grid-template-rows: 43px minmax(0,1fr) 73px; border: 1px solid #45534b; border-radius: 15px; box-shadow: 0 20px 54px #16271b24, 0 4px 13px #0e201011; background: #111b1b; isolation: isolate; }
.sim-titlebar { background: #151d1e; border-bottom: 1px solid #35443f; padding-inline: 18px; }
.sim-brand { font-size: 10px; font-weight: 750; letter-spacing: .085em; color: #e5e9dd; }
.sim-brand b { color: #e4b843; }
.sim-online { color: #b9d6c5; font-size: 10px; }
.sim-online > span { width: 7px; height: 7px; background: #79d6a5; box-shadow: 0 0 0 4px #79d6a512; }
.sim-inner { grid-template-columns: 250px minmax(0,1fr); overflow: hidden; }
.sim-settings { background: linear-gradient(160deg,#1a2825,#131f20 65%); border-right: 1px solid #35443d; }
.sim-settings-body { padding: 18px 16px 20px; gap: 19px; }
.sim-side-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid #39483f; }
.sim-sidebar-index { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid #6e6749; border-radius: 9px; font: 750 12px Consolas, monospace; color: #f2d67a; }
.sim-side-heading > div { display: grid; gap: 2px; }
.sim-side-heading strong { font-size: 14px; line-height: 1.2; }
.sim-side-heading small { color: #aabbb1; font-size: 10px; line-height: 1.4; }
.sim-control-field > label, .sim-field-label { color: #b9c6c0; font-size: 10px; letter-spacing: .09em; font-weight: 750; }
.sim-control-field select { min-height: 43px; border: 1px solid #576c61; background: #0f1b1c; border-radius: 8px; padding-inline: 11px; color: #f4f4eb; font-size: 12px; cursor: pointer; }
.sim-control-field select:focus-visible { outline-offset: 2px; }
.sim-scenario-note { font-size: 12px; line-height: 1.48; margin: 9px 0; color: #c4d2ca; }
.sim-boundary { display: inline-flex; align-items: center; padding: 6px 9px; border: 1px solid #6c603b; border-radius: 5px; background: #d4a01713; color: #f2d67a; letter-spacing: .04em; font-size: 9px; }
.sim-controls { grid-template-columns: 1fr 1fr; gap: 15px 9px; }
.sim-controls > .sim-control-field:first-child { grid-column: 1/-1; }
.sim-switch-field { min-width: 0; }
.sim-switch-label { min-height: 39px; padding: 5px 8px; border: 1px solid #43574d; background: #101e1d; border-radius: 7px; gap: 7px; }
.sim-switch-label input { width: 17px; height: 17px; }
.sim-switch-label span { font-size: 11px; line-height: 1.3; }
.sim-mission-brief { padding-top: 5px; }
.sim-mission-brief > summary { font-size: 12px; color: #e5e9de; }
.sim-tip { display: flex; gap: 10px; padding: 11px; border: 1px solid #575032; border-radius: 9px; background: #d4a0170e; }
.sim-tip-icon { color: #efc85c; line-height: 1.25; }
.sim-tip p { margin: 0; color: #bfcabe; font-size: 11px; line-height: 1.55; }
.sim-tip strong { color: #f2d67a; }
.sim-results-panel { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(292px,.93fr); background: #111b1e; overflow: hidden; min-height: 0; }
.sim-flow-pane { min-width: 0; min-height: 0; padding: 19px 17px 23px; overflow: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #667b71 transparent; }
.sim-detail-heading { align-items: start; }
.sim-detail-heading h3 { font-size: 18px; color: #f1f4e9; line-height: 1.26; margin: 4px 0 0; }
.sim-flow-badge { color: #d1d8cf; background: #24302e; border: 1px solid #4b6058; border-radius: 5px; padding: 5px 7px; font-size: 9px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.sim-flow-guidance { margin: 10px 0 16px; color: #aebfb7; font-size: 12px; line-height: 1.5; }
.sim-path { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.sim-node { position: relative; align-content: center; justify-items: start; min-width: 0; min-height: 79px; padding: 11px 12px; border: 1px solid #42564f; border-radius: 9px; background: #1a2929; color: #e0e9df; text-align: left; transition: border-color .2s, background .2s, transform .2s; }
.sim-node:hover { border-color: #baae78; background: #27352e; transform: translateY(-1px); }
.sim-node-num { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #9db0a8; }
.sim-node-symbol { color: #94a69d; font-size: 16px; line-height: 1; }
.sim-node strong { font-size: 11px; letter-spacing: .05em; }
.sim-node small { color: #94aaa0; font-size: 9px; letter-spacing: .05em; }
.sim-node.is-current { box-shadow: inset 0 3px #d4a017, 0 0 0 1px #d4a01788; background: #2c3023; }
.sim-node.is-inspected { border-color: #e1ba4c; background: #302f23; }
.sim-node.is-done { background: #1c312c; }
.sim-node[data-status="blocked"], .sim-node[data-status="failed"] { background: #352725; border-color: #bb7f68; }
.sim-node[data-status="warn"] { background: #332d22; border-color: #9b8047; }
.sim-node[data-status="skipped"] { background: #22292a; }
.sim-node.is-done[data-status="ok"] .sim-node-symbol { color: #7ee5b1; }
.sim-evidence { background: #182527; border: 1px solid #40544d; border-radius: 10px; margin-top: 15px; overflow: hidden; }
.sim-evidence > summary { padding: 9px 13px; min-height: 39px; flex-wrap: nowrap; border-bottom: 1px solid transparent; background: #202f30; font-size: 10px; letter-spacing: .07em; font-weight: 750; color: #e6ebdf; }
.sim-evidence[open] > summary { border-bottom-color: #3d4f4b; }
.sim-evidence > summary::after { font-size: 16px; }
.sim-pane-state { padding: 4px 7px; border-radius: 5px; background: #d4a01712; color: #f2d67a; font-size: 9px; margin-left: auto; white-space: nowrap; }
.sim-inspector { padding: 15px; }
.sim-inspector-titleline { align-items: center; gap: 11px; margin-bottom: 8px; }
.sim-inspector-titleline > span { display: inline-flex; flex: 0 0 auto; padding: 6px 8px; border: 1px solid #766845; border-radius: 5px; font-size: 10px; }
.sim-inspector-titleline h4 { color: #f2f4e9; font-size: 16px; line-height: 1.35; }
.sim-inspector > p { color: #c7d7cf; font-size: 12px; line-height: 1.58; margin-bottom: 12px; }
.sim-lesson { border-radius: 8px; background: #23322c; padding: 12px 13px; border-left: 3px solid #d4a017; }
.sim-lesson > span { letter-spacing: .06em; font-size: 9px; }
.sim-lesson p { font-size: 12px; line-height: 1.56; margin-top: 6px; }
.sim-contract { margin-top: 12px; border-top: 1px solid #40554c; border-bottom: 0; }
.sim-contract > summary { min-height: 38px; font-size: 11px; color: #e2d09b; }
.sim-contract > summary span { color: #d4a017; }
.sim-code { max-height: 220px; border-radius: 6px; padding: 13px; font-size: 11px; }
.sim-monitor-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid #3b4b47; background: linear-gradient(175deg,#172321,#111d20 82%); overflow: hidden; }
.sim-results-overview { flex: 0 0 auto; padding: 18px 15px 0; overflow: visible; background: none; }
.sim-live-feedback { grid-template-columns: minmax(0,1fr) minmax(88px,110px); gap: 8px; margin-bottom: 11px; }
.sim-live-overline { font-size: 10px; color: #e8c668; }
.sim-live-meter { gap: 8px; }
.sim-live-meter-track { height: 5px; }
.sim-verdict { display: block; padding: 15px; background: #263027; border: 1px solid #586453; border-radius: 10px; position: relative; }
.sim-verdict-icon { float: right; margin-left: 8px; margin-bottom: 4px; height: 31px; width: 31px; font-size: 18px; }
.sim-verdict-meta { justify-content: flex-start; align-items: start; flex-direction: column; gap: 6px; margin-bottom: 9px; }
.sim-verdict-tag { font-size: 9px; color: #f2d67a; }
.sim-verdict h3 { font-size: 19px; line-height: 1.25; margin: 0 0 8px; color: #f8faf2; }
.sim-verdict p { font-size: 12px; line-height: 1.55; color: #c8d6ca; }
.sim-verdict[data-state="verified"] { background: #20372e; border-color: #75b78f; }
.sim-verdict[data-state="unsafe"], .sim-verdict[data-state="blocked"] { background: #392923; border-color: #bf8773; }
.sim-verdict[data-state="escalated"], .sim-verdict[data-state="rolledback"] { background: #353022; border-color: #bb9c5e; }
.sim-stats { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 12px 15px 14px; }
.sim-stats > div { display: grid; gap: 2px; align-content: start; padding: 8px 7px; border-radius: 7px; background: #24312f; border: 1px solid #374b43; }
.sim-stats b { font-size: 19px; line-height: 1.25; }
.sim-stats span { font-size: 9px; color: #adbfaf; line-height: 1.3; letter-spacing: .035em; }
.sim-ledger { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-top: 1px solid #364942; padding: 0 15px 13px; flex: 1 1 0; }
#simTraceDetails { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; border: 0; }
#simTraceDetails > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; min-height: 37px; font-size: 10px; font-weight: 800; letter-spacing: .06em; list-style-position: inside; color: #e4eae1; }
#simTraceDetails > summary::marker { color: #d4a017; }
#simTraceCount { flex: 0 0 auto; margin-left: auto; font-size: 9px; }
.sim-event-list { flex: 1 1 auto; min-height: 70px; max-height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #58715e transparent; border-radius: 6px; background: #101a1d; border: 1px solid #344640; padding: 4px 8px; }
.sim-ledger-empty { display: grid; justify-items: center; gap: 5px; padding: 22px 6px; text-align: center; }
.sim-ledger-empty > span { font-size: 28px; color: #cda738; }
.sim-ledger-empty p { font-size: 12px; line-height: 1.5; }
.sim-trace-row { grid-template-columns: 18px minmax(0,1fr) 33px; padding: 8px 3px; min-height: 46px; gap: 7px; align-items: start; }
.sim-trace-row:first-child { border-top: none; }
.sim-trace-row.is-active { border-radius: 4px; background: #28372c; }
.sim-trace-row:hover { background: #26352f; }
.sim-trace-msg { font-size: 11px; }
.sim-trace-time { font-size: 9px; color: #a4b6a6; }
.sim-trace-failed .sim-trace-marker, .sim-trace-blocked .sim-trace-marker { color: #f5af98; }
.sim-trace-ok .sim-trace-marker { color: #91d9a5; }
.sim-trace-jump { min-height: 32px; padding: 4px 0; justify-content: start; font-size: 10px; margin-top: 3px; }
.sim-dock { background: #1c2826; border-top: 1px solid #6d6443; padding: 12px 18px; }
.sim-dock-note > span { font-size: 11px; letter-spacing: .08em; }
.sim-dock-note small { font-size: 11px; }
.sim-actions { gap: 9px; }
.sim-run, .sim-step-btn, .sim-reset { border-radius: 8px; min-height: 46px; }
.sim-run { min-width: 162px; color: #121d19; box-shadow: 0 2px 0 #8c680e; }
.sim-run > span:last-child { font-size: 14px; }
.sim-step-btn { min-width: 96px; }
.sim-reset { width: 46px; font-size: 22px; }
.sim-run:disabled, .sim-step-btn:disabled { opacity: .5; }
.lab-caption { font-size: 10px; margin-top: 12px; }

@media (max-width: 1200px) {
  .sim-inner { grid-template-columns: 225px minmax(0,1fr); }
  .sim-results-panel { grid-template-columns: minmax(0,1.15fr) minmax(265px,.85fr); }
  .sim-settings-body { padding-inline: 13px; }
  .sim-flow-pane { padding-inline: 13px; }
  .sim-node { padding-inline: 9px; }
}
@media (max-width: 900px) {
  .sim-shell { height: clamp(540px,calc(100svh - var(--header-height) - 188px),670px); grid-template-rows: 43px minmax(0,1fr) 72px; }
  .sim-inner { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .sim-settings { border-right: 0; border-bottom: 1px solid #40564c; }
  .sim-settings > summary { display: flex; min-height: 46px; padding: 8px 15px; }
  .sim-settings-body { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); padding: 14px 16px; max-height: min(230px,33svh); }
  .sim-side-heading, .sim-tip { display: none; }
  .sim-mission-brief { grid-column: 1/-1; }
  .sim-results-panel { grid-template-columns: minmax(0,1.1fr) minmax(280px,.9fr); }
  .sim-flow-pane { padding-top: 14px; }
  .sim-node { min-height: 68px; }
  .sim-flow-guidance { margin-bottom: 10px; }
  .sim-results-overview { padding-top: 14px; }
}
@media (max-width: 700px) {
  .lab-section.section { padding-block: 28px 38px; }
  .lab-top { grid-template-columns: 1fr; gap: 8px; margin-bottom: 16px; }
  .lab-top h2 { font-size: 32px; }
  .lab-intro p { font-size: 13px; }
  .sim-shell { display: grid; height: auto; min-height: 0; grid-template-rows: 41px auto auto; overflow: visible; border-radius: 12px; }
  .sim-titlebar { grid-row: 1; padding-inline: 12px; font-size: 9px; border-radius: 12px 12px 0 0; }
  .sim-brand { font-size: 9px; letter-spacing: .03em; }
  .sim-online { font-size: 9px; }
  .sim-dock { grid-row: 2; position: sticky; top: var(--header-height); z-index: 25; padding: 9px 11px; box-shadow: 0 5px 12px #0716146a; }
  .sim-dock-note { display: none; }
  .sim-actions { width: 100%; }
  .sim-run { flex: 1; min-width: 0; }
  .sim-step-btn { min-width: 85px; }
  .sim-inner { grid-row: 3; display: flex; flex-direction: column; overflow: visible; }
  .sim-settings { overflow: visible; }
  .sim-settings > summary { padding-inline: 12px; }
  .sim-settings-body { display: grid; grid-template-columns: 1fr; max-height: none; overflow: visible; padding: 16px; gap: 13px; }
  .sim-mission-brief { grid-column: auto; }
  .sim-results-panel { display: flex; flex-direction: column; overflow: visible; }
  .sim-monitor-pane { order: 0; min-height: 0; overflow: visible; border-left: 0; border-bottom: 1px solid #3d4d47; }
  .sim-results-overview { padding: 16px 13px 0; }
  .sim-verdict { padding: 14px; }
  .sim-verdict h3 { font-size: 19px; }
  .sim-verdict p { font-size: 12px; }
  .sim-stats { padding-inline: 13px; }
  .sim-stats > div { display: flex; align-items: center; gap: 8px; }
  .sim-ledger { flex: none; padding-inline: 13px; }
  #simTraceDetails { flex: none; }
  .sim-event-list { flex: none; max-height: 126px; min-height: 65px; overflow-y: auto; }
  .sim-flow-pane { order: 1; overflow: visible; padding: 18px 13px 20px; }
  .sim-detail-heading h3 { font-size: 17px; }
  .sim-path { gap: 7px; }
  .sim-node { min-height: 70px; padding: 8px 9px; }
  .sim-node strong { font-size: 10px; }
  .sim-node small { position: static; width: auto; height: auto; clip-path: none; overflow: visible; font-size: 8px; }
  .sim-inspector { padding: 13px; }
  .sim-evidence { margin-top: 12px; }
  .lab-caption { line-height: 1.7; }
}
@media (max-width: 410px) {
  .sim-brand { font-size: 8px; }
  .sim-online { font-size: 8px; }
  .sim-flow-badge { font-size: 8px; }
  .sim-node { padding-inline: 7px; }
  .sim-node strong { font-size: 9px; }
  .sim-reset { flex: 0 0 43px; width: 43px; }
  .sim-step-btn { min-width: 73px; }
  .sim-run, .sim-step-btn { padding-inline: 8px; font-size: 10px; }
}

/* Keep the trace within its own column instead of stretching below the action dock. */
.sim-flow-actions { display: flex; align-items: center; gap: 10px; }
.sim-flow-actions .sim-trace-jump { min-height: 30px; margin: 0; padding: 0; flex: none; }
.sim-ledger { min-height: 0; }
#simTraceDetails[open] { display: block; height: 100%; min-height: 0; overflow: hidden; }
#simTraceDetails[open] > .sim-event-list { height: calc(100% - 42px); min-height: 0; max-height: none; overflow-y: auto; }
@media(max-width:700px) {
  .sim-flow-actions { display: grid; justify-items: end; gap: 0; }
  .sim-flow-actions .sim-trace-jump { min-height: 28px; }
  #simTraceDetails[open] { height: auto; overflow: visible; }
  #simTraceDetails[open] > .sim-event-list { height: auto; max-height: 126px; min-height: 65px; }
}
@media (min-width: 701px) {
  #simTraceDetails[open] > .sim-event-list {
    flex: none;
    height: calc(100% - 45px);
    max-height: calc(100% - 45px);
  }
}
@media (min-width: 701px) {
  #simTraceDetails[open] > .sim-event-list {
    flex: none !important;
    height: calc(100% - 45px) !important;
    max-height: calc(100% - 45px) !important;
  }
}

/* Short laptop screens: preserve space for the event stream and live controls. */
@media (min-width: 701px) and (max-height: 840px) {
  .sim-results-overview { padding-top: 9px; }
  .sim-live-feedback { margin-bottom: 6px; }
  .sim-verdict { padding: 10px 12px; }
  .sim-verdict-meta { margin-bottom: 5px; gap: 4px; }
  .sim-verdict h3 { font-size: 17px; margin-bottom: 5px; }
  .sim-verdict p { font-size: 11px; line-height: 1.45; }
  .sim-stats { padding: 8px 12px; gap: 5px; }
  .sim-stats > div { padding: 5px 7px; }
  .sim-stats b { font-size: 17px; }
  .sim-stats span { font-size: 8px; }
}
@media (max-width: 380px) {
  .sim-shell, .sim-inner, .sim-results-panel { min-width: 0; max-width: 100%; }
  .sim-titlebar { gap: 6px; }
  .sim-brand { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sim-titlebar .sim-online { display: none; }
}
