:root {
  /* Interface Sans** body: Nunito Sans 500/700 dashboard labels */
  --burgundy: #4A1021;
  --clay: #9B4A2E;
  --teal: #2F7F72;
  --tomato: #E84A3A;
  --oat: #F3D9A4;
  --mustard: #F7B733;
  --plum: #211018;
  --ink-shadow: 10px 10px 0 var(--clay);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--burgundy);
  font-family: "Nunito Sans", Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 18px 18px, rgba(74,16,33,.18) 2px, transparent 2.5px) 0 0/32px 32px,
    linear-gradient(135deg, var(--oat), #e9bd83 50%, var(--clay));
  overflow-x: hidden;
}

.font-compliance-sentinel { content: "Sans** San*"; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(90deg, rgba(74,16,33,.06), transparent 12%, rgba(247,183,51,.08) 48%, transparent 82%), radial-gradient(circle, transparent 55%, rgba(33,16,24,.16));
  mix-blend-mode: multiply;
}

.boot-curtain {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 24px;
  background: var(--burgundy);
  color: var(--mustard);
  transition: transform .9s cubic-bezier(.76,0,.24,1), opacity .9s;
}

.boot-curtain.is-done { transform: translateY(-105%); opacity: .96; }

.boot-label {
  font-family: "Bowlby One SC", "Fredoka", sans-serif;
  font-size: clamp(1.5rem, 5vw, 4rem);
  text-shadow: 5px 5px 0 var(--plum);
}

.boot-bar {
  width: min(72vw, 680px);
  height: 28px;
  border: 4px solid var(--mustard);
  border-radius: 999px;
  overflow: hidden;
  background: var(--plum);
}

.boot-bar span { display: block; height: 100%; width: 0; background: var(--tomato); animation: bootFill 1.4s both; }

@keyframes bootFill { to { width: 100%; } }

.observatory { position: relative; z-index: 2; }

.room {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
  display: grid;
  align-items: center;
  border-bottom: 6px solid var(--burgundy);
  position: relative;
}

.hero-room { background: linear-gradient(160deg, rgba(243,217,164,.88), rgba(155,74,46,.52)); }
.sandbox-room { background: linear-gradient(100deg, rgba(247,183,51,.16), rgba(243,217,164,.86)); }
.misread-room { background: linear-gradient(140deg, rgba(232,74,58,.26), rgba(243,217,164,.88)); }
.circuit-room { background: linear-gradient(130deg, rgba(47,127,114,.22), rgba(243,217,164,.9)); }
.crowd-room { background: linear-gradient(115deg, rgba(155,74,46,.25), rgba(247,183,51,.24)); }
.archive-room { background: linear-gradient(160deg, var(--plum), var(--burgundy)); color: var(--oat); }

.console-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 2vw, 24px);
  width: min(1460px, 100%);
  margin: 0 auto;
}

.dashboard-panel {
  position: relative;
  border: 5px solid var(--burgundy);
  border-radius: 28px;
  background: var(--oat);
  box-shadow: var(--ink-shadow);
  padding: clamp(18px, 2.2vw, 30px);
  transition: transform .28s cubic-bezier(.2,1.4,.4,1), box-shadow .28s, background .28s;
  overflow: hidden;
}

.dashboard-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .23;
  background: radial-gradient(circle at 12px 12px, var(--burgundy) 1.8px, transparent 2.4px) 0 0/22px 22px;
  pointer-events: none;
}

.dashboard-panel:hover, .dashboard-panel.is-active {
  transform: scale(1.035) rotate(-.4deg);
  box-shadow: 16px 16px 0 var(--clay);
  background: #f8dfad;
  z-index: 4;
}

.panel-kicker {
  display: inline-block;
  font-family: "Bowlby One SC", "Fredoka", sans-serif;
  letter-spacing: .04em;
  background: var(--mustard);
  border: 4px solid var(--burgundy);
  border-radius: 16px;
  padding: 5px 12px;
  transform: rotate(-2deg);
  margin-bottom: 14px;
}

h1, h2, h3 { font-family: "Fredoka", Lato, system-ui, sans-serif; line-height: .92; margin: 0; }
h1 { font-size: clamp(4.4rem, 11vw, 11rem); letter-spacing: .02em; text-shadow: 7px 7px 0 var(--mustard), 12px 12px 0 var(--tomato); }
h2 { font-size: clamp(3rem, 7vw, 7rem); }
h3 { font-size: clamp(2rem, 4vw, 4.2rem); }
p { font-size: clamp(1rem, 1.4vw, 1.3rem); line-height: 1.35; font-weight: 700; position: relative; }

.masthead { grid-column: 1 / 8; grid-row: 1; align-self: start; transform: rotate(-1deg); animation: mastDrop .8s .9s both; }
.specimen-window { grid-column: 4 / 10; grid-row: 2 / 5; min-height: 490px; animation: stampIn .7s 1.2s both; }
.meter-panel { grid-column: 10 / 13; grid-row: 1 / 3; }
.soil-panel { grid-column: 1 / 4; grid-row: 2 / 4; }
.queue-panel { grid-column: 10 / 13; grid-row: 3 / 5; }
.leak-panel { grid-column: 1 / 4; grid-row: 4 / 5; }

@keyframes mastDrop { from { transform: translateY(-80px) rotate(-6deg); opacity: 0; } }
@keyframes stampIn { from { transform: scale(1.35) rotate(8deg); opacity: 0; } }

.photo-card {
  height: 100%;
  min-height: 430px;
  border: 5px solid var(--burgundy);
  border-radius: 22px;
  background: var(--mustard);
  position: relative;
  overflow: hidden;
}

.robot-scene {
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(74,16,33,.28) 0 3px, transparent 4px) 0 0/28px 28px,
    linear-gradient(120deg, var(--mustard), var(--tomato));
  filter: saturate(.95) contrast(1.05);
}

.crop-marks::before, .crop-marks::after { content: ""; position: absolute; width: 74px; height: 74px; border-color: var(--burgundy); z-index: 2; }
.crop-marks::before { top: 10px; left: 10px; border-top: 5px solid; border-left: 5px solid; }
.crop-marks::after { right: 10px; bottom: 10px; border-right: 5px solid; border-bottom: 5px solid; }

.bot { position: absolute; left: 17%; bottom: 18%; width: 180px; height: 245px; }
.bot .antenna { position: absolute; left: 80px; top: -42px; width: 15px; height: 58px; background: var(--burgundy); border-radius: 10px; transform: rotate(-12deg); }
.bot .head { position: absolute; top: 0; width: 170px; height: 120px; border: 6px solid var(--burgundy); border-radius: 34px; background: var(--oat); box-shadow: 8px 8px 0 var(--teal); }
.bot .head i { position: absolute; top: 42px; width: 24px; height: 24px; border-radius: 50%; background: var(--burgundy); }
.bot .head i:first-child { left: 42px; } .bot .head i:last-child { right: 42px; }
.bot .body { position: absolute; left: 35px; top: 122px; width: 100px; height: 88px; border: 6px solid var(--burgundy); border-radius: 24px; background: var(--teal); }
.bot .legs { position: absolute; left: 18px; bottom: 0; width: 135px; height: 42px; border-left: 16px solid var(--burgundy); border-right: 16px solid var(--burgundy); }
.wrong-object { position: absolute; right: 11%; bottom: 23%; padding: 25px; border: 6px solid var(--burgundy); border-radius: 20px; background: var(--oat); font-family: "Bowlby One SC"; font-size: 1.7rem; transform: rotate(7deg); }
.speech { position: absolute; right: 6%; top: 12%; max-width: 290px; padding: 22px; border: 5px solid var(--burgundy); border-radius: 38px 38px 38px 8px; background: var(--oat); font-family: "Fredoka"; font-size: 1.6rem; }
.sunburst { position: absolute; left: 35%; top: 11%; width: 140px; height: 140px; display: grid; place-items: center; background: var(--tomato); color: var(--oat); font-family: "Bowlby One SC"; clip-path: polygon(50% 0,61% 29%,92% 12%,77% 42%,100% 50%,75% 60%,91% 90%,60% 74%,50% 100%,39% 72%,8% 90%,23% 58%,0 50%,25% 39%,9% 10%,40% 28%); }
.stamp { position: absolute; right: 26px; bottom: 28px; border: 5px solid var(--tomato); color: var(--tomato); padding: 8px 14px; border-radius: 12px; font-family: "Bowlby One SC"; font-size: 1.4rem; transform: rotate(-8deg); }

.dial { width: 190px; aspect-ratio: 1; border: 12px solid var(--burgundy); border-radius: 50%; margin: 12px auto; background: conic-gradient(var(--tomato), var(--mustard), var(--teal), var(--tomato)); position: relative; }
.dial::after { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: var(--oat); border: 5px solid var(--burgundy); }
.dial span { position: absolute; left: 50%; top: 50%; width: 8px; height: 78px; background: var(--burgundy); transform-origin: 50% 100%; transform: translate(-50%, -100%) rotate(52deg); z-index: 1; animation: wobble 2.4s infinite; }
@keyframes wobble { 50% { transform: translate(-50%, -100%) rotate(72deg); } }
.gauge strong { font-family: "Bowlby One SC"; font-size: 3rem; display: block; text-align: center; }
.soil-core { border: 5px solid var(--burgundy); border-radius: 18px; overflow: hidden; }
.soil-core span { display: block; height: 44px; } .soil-core span:nth-child(1){background:var(--oat)} .soil-core span:nth-child(2){background:var(--mustard)} .soil-core span:nth-child(3){background:var(--clay)} .soil-core span:nth-child(4){background:var(--teal)}
.queue-panel ol { position: relative; margin: 0; padding-left: 24px; font-weight: 900; font-size: 1.2rem; line-height: 1.8; }
.leak { height: 132px; display: flex; justify-content: center; gap: 18px; align-items: flex-start; }
.leak b { width: 22px; height: 54px; background: var(--burgundy); border-radius: 0 0 16px 16px; animation: drip 1.8s infinite; } .leak b:nth-child(2){animation-delay:.3s} .leak b:nth-child(3){animation-delay:.6s}
@keyframes drip { 50% { height: 112px; background: var(--tomato); } }

.section-title { width: min(1460px, 100%); margin: 0 auto 28px; display: flex; align-items: center; gap: 20px; }
.section-title span { font-family: "Bowlby One SC"; font-size: 2rem; background: var(--tomato); color: var(--oat); border: 5px solid var(--burgundy); border-radius: 50%; width: 92px; height: 92px; display: grid; place-items: center; box-shadow: 8px 8px 0 var(--clay); }
.archive-room .section-title span, .archive-room .dashboard-panel { border-color: var(--oat); }

.wide-card { grid-column: 1 / 8; min-height: 430px; }
.toggle-bank { grid-column: 8 / 13; }
.note-card { grid-column: 9 / 13; transform: rotate(2deg); background: var(--mustard); }
.sticky::after { content: ""; position: absolute; top: -14px; left: 42%; width: 88px; height: 34px; background: rgba(47,127,114,.8); border: 3px solid var(--burgundy); transform: rotate(-3deg); }
.control-row { display: flex; flex-wrap: wrap; gap: 18px; position: relative; }
.control-button { border: 5px solid var(--burgundy); border-radius: 22px; background: var(--teal); color: var(--oat); padding: 16px 24px; font-family: "Bowlby One SC"; font-size: 1rem; box-shadow: 7px 7px 0 var(--clay); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.control-button:hover, .control-button.is-pressed { transform: translate(5px, 5px) scale(1.04); box-shadow: 2px 2px 0 var(--clay); background: var(--mustard); color: var(--burgundy); }
.control-button.tomato { background: var(--tomato); }
.control-button.mustard { background: var(--mustard); color: var(--burgundy); }
.control-button.big { width: 100%; margin-bottom: 18px; font-size: 1.5rem; }
.switches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.switches i { height: 140px; border: 5px solid var(--burgundy); border-radius: 999px; background: var(--clay); position: relative; }
.switches i::after { content: ""; position: absolute; left: 50%; top: 14px; width: 54px; height: 54px; transform: translateX(-50%); border: 5px solid var(--burgundy); border-radius: 50%; background: var(--mustard); animation: switchThunk 3s infinite; }
.switches i:nth-child(2)::after { animation-delay: .4s; } .switches i:nth-child(3)::after { animation-delay: .8s; } .switches i:nth-child(4)::after { animation-delay: 1.2s; }
@keyframes switchThunk { 50% { top: 66px; background: var(--teal); } }

.photo-evidence { grid-column: 1 / 7; min-height: 540px; }
.speech-panel { grid-column: 7 / 13; }
.burst-card { grid-column: 8 / 13; min-height: 220px; display: grid; place-items: center; background: var(--mustard); }
.burst-card span { font-family: "Bowlby One SC"; font-size: clamp(2rem, 5vw, 5rem); color: var(--oat); background: var(--tomato); padding: 50px; clip-path: polygon(50% 0,58% 28%,85% 8%,75% 38%,100% 50%,74% 61%,86% 91%,58% 74%,50% 100%,42% 73%,13% 92%,26% 60%,0 50%,27% 39%,14% 7%,42% 28%); text-align: center; }
.evidence-image { min-height: 300px; border: 5px solid var(--burgundy); border-radius: 20px; background: radial-gradient(circle at 10px 10px, rgba(74,16,33,.25) 2px, transparent 3px) 0 0/24px 24px, linear-gradient(135deg, var(--tomato), var(--oat)); position: relative; overflow: hidden; }
.toy-car::before { content: ""; position: absolute; left: 16%; right: 16%; bottom: 70px; height: 86px; border: 8px solid var(--burgundy); border-radius: 70px 70px 22px 22px; background: var(--mustard); box-shadow: 12px 12px 0 var(--teal); }
.toy-car::after { content: ""; position: absolute; left: 24%; bottom: 42px; width: 56%; height: 58px; background: radial-gradient(circle at 18% 50%, var(--burgundy) 0 24px, transparent 25px), radial-gradient(circle at 82% 50%, var(--burgundy) 0 24px, transparent 25px); }
.toy-car span { position: absolute; right: 30px; top: 22px; font-family: "Bowlby One SC"; color: var(--tomato); border: 5px solid var(--tomato); padding: 8px 16px; transform: rotate(10deg); font-size: 2rem; }
.bubble { border: 5px solid var(--burgundy); background: var(--oat); border-radius: 48px 48px 10px 48px; padding: 34px; font-family: "Fredoka"; font-size: clamp(2rem, 4vw, 4rem); margin: 26px 0; transform-origin: bottom left; animation: bubblePop 2.6s infinite; }
@keyframes bubblePop { 50% { transform: scale(1.04) rotate(1deg); } }

.circuit-tangle { grid-column: 1 / 8; min-height: 500px; }
.icon-card { grid-column: 8 / 13; display: grid; place-items: center; text-align: center; min-height: 235px; }
.icon-card.teal { background: #c4d9b5; }
.mini-circuit { height: 210px; position: relative; border: 5px dashed var(--teal); border-radius: 24px; margin: 20px 0; }
.mini-circuit i { position: absolute; background: var(--teal); border: 4px solid var(--burgundy); }
.mini-circuit i:nth-child(1){left:8%;top:46%;width:70%;height:14px}.mini-circuit i:nth-child(2){left:28%;top:18%;width:14px;height:65%}.mini-circuit i:nth-child(3){right:12%;top:24%;width:70px;height:70px;border-radius:50%;background:var(--mustard)}.mini-circuit i:nth-child(4){left:12%;bottom:18%;width:86px;height:38px;border-radius:20px;background:var(--tomato)}.mini-circuit i:nth-child(5){right:25%;bottom:12%;width:14px;height:90px}
.icon-rake { width: 150px; height: 150px; border: 6px solid var(--burgundy); border-radius: 34px; background: var(--tomato); color: var(--oat); display: grid; place-items: center; font-size: 8rem; transform: rotate(-8deg); }
.maze-icon { width: 170px; height: 130px; border: 8px solid var(--burgundy); background: linear-gradient(90deg, transparent 30%, var(--burgundy) 31% 36%, transparent 37% 62%, var(--burgundy) 63% 68%, transparent 69%), linear-gradient(0deg, transparent 42%, var(--burgundy) 43% 50%, transparent 51%); }

.annotation-board { grid-column: 1 / 8; min-height: 480px; }
.knob-panel { grid-column: 8 / 13; align-self: stretch; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.notes p { min-height: 190px; padding: 22px; border: 4px solid var(--burgundy); border-radius: 18px; background: var(--mustard); transform: rotate(-3deg); }
.notes p:nth-child(2) { background: #c4d9b5; transform: rotate(2deg); } .notes p:nth-child(3) { background: #f2a091; transform: rotate(-1deg); }
.final-card { grid-column: 1 / 8; background: var(--oat); color: var(--burgundy); min-height: 430px; }
.archive-stack { grid-column: 8 / 13; min-height: 430px; background: var(--clay); }
.folder { height: 116px; border: 5px solid var(--oat); border-radius: 18px; margin: 18px; display: grid; place-items: center; font-family: "Bowlby One SC"; font-size: 2.5rem; color: var(--burgundy); box-shadow: 8px 8px 0 var(--plum); }
.f1 { background: var(--mustard); transform: rotate(-3deg); } .f2 { background: var(--tomato); transform: rotate(2deg); } .f3 { background: var(--teal); color: var(--oat); transform: rotate(-1deg); }
footer { width: min(1460px, 100%); margin: 36px auto 0; font-weight: 900; color: var(--oat); text-align: center; }

.circuit-root { position: absolute; top: 0; left: 50%; width: 120px; height: 100%; transform: translateX(-50%); z-index: 1; pointer-events: none; opacity: .86; }
.circuit-root svg { width: 100%; height: 100%; overflow: visible; }
.circuit-root path { fill: none; stroke: var(--teal); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 3400; stroke-dashoffset: 3400; }
.circuit-root .root-branch { stroke-width: 5; stroke: var(--burgundy); }
.circuit-root.is-drawn path { animation: drawRoot 4s ease-out forwards; }
@keyframes drawRoot { to { stroke-dashoffset: 0; } }

.hover-annotation {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  max-width: 280px;
  padding: 12px 16px;
  border: 4px solid var(--burgundy);
  border-radius: 18px;
  background: var(--mustard);
  color: var(--burgundy);
  font-weight: 900;
  transform: translate(-50%, -130%) scale(.8);
  opacity: 0;
  pointer-events: none;
  box-shadow: 6px 6px 0 var(--clay);
  transition: opacity .18s, transform .18s;
}
.hover-annotation.is-visible { opacity: 1; transform: translate(-50%, -130%) scale(1); }

.reveal { opacity: 0; transform: translateY(38px) rotate(-1deg); transition: opacity .7s, transform .7s; }
.reveal.is-visible { opacity: 1; transform: translateY(0) rotate(0); }

@media (max-width: 980px) {
  .console-grid { grid-template-columns: 1fr; }
  .masthead, .specimen-window, .meter-panel, .soil-panel, .queue-panel, .leak-panel, .wide-card, .toggle-bank, .note-card, .photo-evidence, .speech-panel, .burst-card, .circuit-tangle, .icon-card, .annotation-board, .knob-panel, .final-card, .archive-stack { grid-column: 1; grid-row: auto; }
  .notes { grid-template-columns: 1fr; }
  .circuit-root { left: 22px; opacity: .45; }
  h1 { font-size: clamp(3.6rem, 16vw, 7rem); }
}
