:root {
  --ink: #241c14;
  --ink-soft: #5c5146;
  --paper: #f6f1e8;
  --paper-2: #fffdf8;
  --line: #e4d8c8;
  --wood: #8d6844;
  --wood-deep: #5c3e28;
  --wood-light: #d7b48a;
  --amber: #c9842a;
  --glow: #f3c56b;
  --ok: #1f6b45;
  --ok-bg: #e5f4eb;
  --wait: #1e4f86;
  --wait-bg: #e7f0fa;
  --watch: #8a4b12;
  --watch-bg: #f8ecd9;
  --hold: #6b3b2a;
  --hold-bg: #f6e6df;
  --screen: #f3f7fc;
  --screen-line: #d3e0ee;
  --shadow: 0 24px 50px rgba(72, 42, 18, 0.16);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.5;
  background:
    radial-gradient(ellipse at 10% -10%, #fff 0%, transparent 42%),
    linear-gradient(180deg, #fbf7f1 0%, #efe6da 100%);
}

a { color: var(--wood-deep); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
}

.skip:focus { top: 1rem; }

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.lede {
  max-width: 38rem;
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
}

.home {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  text-decoration: none;
  font-weight: 600;
}

.home:hover { border-color: var(--wood); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.metric {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.8);
}

.metric b {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.metric span { color: var(--ink-soft); font-size: 0.92rem; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.tray {
  position: relative;
  padding: 1.15rem;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), transparent 30%),
    linear-gradient(160deg, #f4efe6, #e6dccb 55%, #ddd1c0);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  border: 12px solid #9a734c;
  outline: 3px solid #c9a57a;
  outline-offset: -16px;
}

.floor {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem 1.6rem;
  padding: 0.35rem;
}

.floor::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 4%;
  bottom: 4%;
  width: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(#f3c56b, #e7b15a);
  box-shadow: 0 0 16px rgba(243, 197, 107, 0.85);
  pointer-events: none;
}

.paths { display: none; }

.room {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 0.15rem;
  min-height: 214px;
  padding: 0.7rem 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.22)),
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(255, 255, 255, 0.18) 19px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    inset 0 0 0 8px rgba(255, 255, 255, 0.18);
  text-align: center;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.room:hover,
.room:focus-visible,
.room.is-shown {
  border-color: rgba(201, 132, 42, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 0 0 3px rgba(243, 197, 107, 0.55);
}

.room:focus-visible { outline: 3px solid var(--wood-deep); outline-offset: 3px; }

.unit {
  justify-self: stretch;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.person {
  position: relative;
  width: 74px;
  height: 92px;
  margin-top: 0.2rem;
}

.person svg { display: block; width: 74px; height: 92px; }

.bubble {
  position: absolute;
  top: -2px;
  z-index: 2;
  max-width: 9.5rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 6px 14px rgba(70, 40, 20, 0.12);
  opacity: 0;
}

.talk-right .bubble { right: -8px; }
.talk-left .bubble { left: -8px; }

.talk-right { animation: lean-right 7s ease-in-out infinite; }
.talk-left { animation: lean-left 7s ease-in-out infinite; }
.talk-right .bubble, .talk-left .bubble { animation: say 7s ease-in-out infinite; }

.room:nth-child(3) .person,
.room:nth-child(4) .person,
.room:nth-child(3) .bubble,
.room:nth-child(4) .bubble { animation-delay: 2.3s; }

.room:nth-child(5) .person,
.room:nth-child(6) .person,
.room:nth-child(5) .bubble,
.room:nth-child(6) .bubble { animation-delay: 4.6s; }

.desk {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 46px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(#e7d3b4, #c9aa7e);
  box-shadow: 0 6px 0 #b89268;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.name {
  display: block;
  margin: 0;
  font-family: var(--display);
  font-size: 0.98rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.lamp {
  position: absolute;
  right: 12px;
  bottom: 64px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 12px 4px rgba(255, 206, 110, 0.75);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.st-done { color: var(--ok); background: var(--ok-bg); }
.st-wait { color: var(--wait); background: var(--wait-bg); }
.st-watch { color: var(--watch); background: var(--watch-bg); }
.st-hold { color: var(--hold); background: var(--hold-bg); }

.plant {
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.dossier {
  position: sticky;
  top: 1rem;
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-2);
  box-shadow: 0 16px 40px rgba(72, 42, 18, 0.08);
}

.dossier h2 {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kicker {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.when { margin: 0.2rem 0 0.8rem; color: var(--ink-soft); }

.dossier .summary { margin: 0 0 0.8rem; }

.points { margin: 0; padding: 0; list-style: none; }

.points li {
  position: relative;
  margin: 0;
  padding: 0.55rem 0 0.55rem 1.1rem;
  border-top: 1px solid var(--line);
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.stamp {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.list-fallback { margin-top: 1.5rem; }

.list-fallback article {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .layout, .metrics { grid-template-columns: 1fr 1fr; }
  .dossier { position: static; }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 1.25rem, 1180px); }
  .top, .metrics, .layout, .floor { grid-template-columns: 1fr; display: grid; }
  .top { align-items: start; }
  .tray { border-width: 8px; padding: 0.75rem; }
  .floor::before { display: none; }
  .room { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .person, .bubble { animation: none; }
  .bubble { opacity: 1; }
}

@keyframes lean-right {
  0%, 38%, 100% { transform: translateX(0); }
  52%, 78% { transform: translateX(12px); }
}

@keyframes lean-left {
  0%, 38%, 100% { transform: translateX(0); }
  52%, 78% { transform: translateX(-12px); }
}

@keyframes say {
  0%, 36%, 86%, 100% { opacity: 0; }
  48%, 76% { opacity: 1; }
}
