/* Material and color roles are shared by both studio treatments. */
:root {
  color-scheme: light;
  --bg: #f5f6f4;
  --fg: #131510;
  --muted: #60665a;
  --surface: #fcfdfb;
  --surface-bottom: #f0f2eb;
  --edge: #2b351923;
  --subtle: #58634c0e;
  --desk: #e3e7dc;
  --field: #edf0e7;
  --shadow: #28381718;
  --soft-shadow: #2838170c;
  --accent: #ccff00;
  --quiet: #68725d;
  --scene-light: #ffffff;
  --accent-text: #4a5a00;
  --error-text: #b3261e;
  --text: var(--fg);
}
:root[data-theme="dark"] {
  /* Neutral graphite with a faint cool cast. The brand colours carry all the
     hue; the room itself stays colourless so lime never reads as olive. */
  color-scheme: dark;
  --bg: #0d0e11;
  --fg: #f4f5f8;
  --muted: #a8acb8;
  --surface: #1a1c22;
  --surface-bottom: #141519;
  --edge: #ffffff17;
  --subtle: #ffffff08;
  --desk: #16181d;
  --field: #0a0b0e;
  --shadow: #0008;
  --soft-shadow: #0004;
  --quiet: #9ea3b0;
  --scene-light: #262a36;
  --accent-text: #ccff00;
  --error-text: #ff929f;
}
body.landing-home {
  background: var(--bg);
  color: var(--fg);
}
.site-header {
  gap: 24px;
}
.site-header .brand {
  margin-right: auto;
  flex-shrink: 0;
}
.brand img {
  content: url("/assets/brand-lockup.svg");
}
[data-theme="light"] .brand img {
  content: url("/assets/brand-lockup-light.svg");
  filter: none;
}
.site-header nav {
  gap: 28px;
}
.theme-choice {
  display: flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--edge);
  border-radius: 30px;
  flex-shrink: 0;
}
.theme-choice button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  font-size: 11px;
  color: var(--muted);
  border: 0;
  border-radius: 30px;
  background: transparent;
  min-height: 32px;
}
.theme-choice button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}
.theme-choice button:hover:not([aria-pressed="true"]) {
  background: var(--subtle);
  color: var(--fg);
}
.theme-choice svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.site-header nav a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.nav-cta {
  border-color: var(--edge);
  background: var(--subtle);
}
.site-header nav .nav-cta:hover {
  text-decoration: none;
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.room-light {
  background:
    radial-gradient(ellipse at 74% -10%, var(--scene-light), transparent 65%),
    var(--bg);
}
.room-light:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/textures/studio-grain.webp");
  background-repeat: repeat;
  background-size: 256px;
  mix-blend-mode: multiply;
  opacity: 0.22;
  pointer-events: none;
}
.room-light:after {
  inset: 0;
  background: linear-gradient(
    116deg,
    transparent 56%,
    var(--subtle) 56.1%,
    transparent 78%
  );
  transform: translateX(var(--room-shift));
  mask-image: none;
}
.beat h1,
.beat h2 {
  color: var(--fg);
}
.beat p {
  color: var(--muted);
}
.button {
  color: #171d04;
  background: #ccff00;
  border-color: #ccff00;
  box-shadow:
    0 2px 1px #00000008,
    inset 0 1px #fff6;
}
.button:hover {
  background: #d9ff49;
  box-shadow: 0 5px 18px var(--shadow);
}
.text-link:hover {
  color: var(--fg);
}
.surface-backing {
  background: linear-gradient(135deg, var(--surface), var(--surface-bottom));
  border-color: var(--edge);
  box-shadow:
    0 25px 65px var(--shadow),
    0 3px 5px var(--soft-shadow),
    inset 0 1px #ffffff14;
}
.sheet {
  background: var(--surface);
  border-color: var(--edge);
  color: var(--fg);
}
.surface-heading {
  color: var(--fg);
  border-color: var(--edge);
}
.sample-label {
  color: var(--muted);
}
.workspace-symbol {
  color: var(--accent-text);
}
.person-avatar {
  background: var(--fg);
  color: var(--bg);
}
.ticket-author {
  color: var(--fg);
}
.ticket-recipient {
  color: var(--muted);
}
.brief-ticket h3 {
  color: var(--fg);
}
.brief-ticket p {
  color: var(--muted);
}
.scenario-controls button {
  color: var(--muted);
}
.scenario-controls button[aria-pressed="true"] {
  color: var(--fg);
  background: var(--subtle);
  border-color: var(--edge);
}
.scenario-controls button:hover {
  color: var(--fg);
  background: var(--subtle);
}
.handoff-row {
  border-color: var(--edge);
}
.handoff-row h4 {
  color: var(--fg);
}
.handoff-row p,
.handoff-state,
.connected-source,
.connected-source > span:last-child {
  color: var(--muted);
}
.result-context {
  color: var(--muted);
}
.result-content h3 {
  color: var(--fg);
}
.result-artifact li {
  border-color: var(--edge);
}
.result-artifact li > span:first-child,
.result-artifact li > span:last-child,
.result-content > p {
  color: var(--muted);
}
.routine-demo {
  border-color: var(--edge);
}
.routine-toggle {
  color: var(--fg);
}
.routine-toggle[aria-pressed="true"] {
  color: var(--accent-text);
}
.toggle-track,
.permission-switch {
  background: var(--edge);
  border-color: var(--edge);
}
.toggle-track:after,
.permission-switch:after {
  background: var(--muted);
}
.routine-toggle[aria-pressed="true"] .toggle-track:after,
.permission-switch[aria-checked="true"]:after {
  background: #263500;
}
.routine-preview {
  color: var(--fg);
}
.routine-preview > div.weekdays span {
  color: var(--accent-text);
  background: var(--subtle);
}
.routine-preview > div.weekdays span.off {
  color: var(--muted);
}
.permission-count {
  color: var(--muted);
}
.access-branches > div {
  border-color: var(--edge);
}
.sample-note {
  color: var(--muted);
}
.sheet-signup input[type="email"] {
  background: var(--field);
  border-color: var(--edge);
  color: var(--fg);
}
.sheet-signup input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.sheet-signup .consent,
.signup-footnote {
  color: var(--muted);
}
.form-status[data-state="success"] {
  color: var(--accent-text);
}
.form-status[data-state="error"] {
  color: var(--error-text);
}
.signup-links {
  border-color: var(--edge);
}
.signup-links a {
  color: var(--muted);
}
.signup-links a:hover {
  color: var(--fg);
}
.scene-footer,
.motion-control,
.scene-nav a,
.site-colophon {
  color: var(--muted);
}
.development-note:before {
  background: var(--accent-text);
}
.scene-nav a[aria-current="step"],
.scene-nav a:hover {
  color: var(--fg);
}
.scene-nav a[aria-current="step"] {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--accent-text);
}
.questions-panel {
  background: var(--bg);
}
.questions-inner h2 {
  color: var(--fg);
}
.faq-list details {
  border-color: var(--edge);
}
.faq-list summary {
  color: var(--fg);
}
.faq-list details p {
  color: var(--muted);
}
.questions-close {
  border-color: var(--edge);
  color: var(--fg);
}
.scene-enabled .questions-panel.is-open {
  background: var(--bg);
  backdrop-filter: none;
}
.scene-enabled .site-colophon {
  background: var(--bg);
  color: var(--muted);
}
.scene-label {
  color: var(--fg);
  background: var(--surface);
  border-color: var(--edge);
  backdrop-filter: none;
}
.scene-enabled .brief-ticket:before {
  background: linear-gradient(135deg, var(--surface), var(--surface-bottom));
  border-color: var(--edge);
  box-shadow: 0 8px 24px var(--shadow);
}
.scene-enabled .surface-backing {
  opacity: var(--docked, 0);
}
.scene-enabled .sheet-work > .surface-heading,
.scene-enabled .sheet-work .work-example {
  opacity: var(--docked, 0);
}
.scene-enabled .sheet-work > .surface-heading,
.scene-enabled .sheet-work .work-example {
  pointer-events: auto;
}
.scene-enabled .brief-ticket:before {
  opacity: calc(1 - var(--docked, 0));
}
.scene-enabled .brief-ticket {
  transform: none;
}
.scene-enabled .sheet {
  background: transparent;
}
.pointer-halo {
  border-color: var(--edge);
}
.pointer-halo.over-control {
  background: var(--subtle);
  border-color: var(--muted);
}
.mobile-cast:before {
  background: var(--desk);
  box-shadow: 0 12px var(--edge);
}
.mobile-cast span {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--edge);
  filter: none;
}
.mobile-cast [data-actor] {
  filter: none;
}
.mobile-cast img {
  filter: drop-shadow(0 10px 8px var(--shadow));
}
.mobile-cast [data-actor="bento"] span {
  bottom: 4%;
}
.static-cast {
  position: absolute;
  inset: 0;
}
.static-cast:before {
  content: "";
  position: absolute;
  left: -5%;
  top: 65%;
  width: 110%;
  height: 27%;
  background: var(--desk);
  border-radius: 50%;
}
.static-cast > div {
  position: absolute;
  transform: translate(-50%, -50%);
}
.static-cast img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 12px var(--shadow));
}
.static-cast span {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 70%);
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--edge);
  font-size: 11px;
  color: var(--fg);
}
.static-cast [data-actor="pill"] {
  left: 50%;
  top: 69%;
  width: 15%;
}
.static-cast [data-actor="drop"] {
  left: 55%;
  top: 52%;
  width: 15%;
}
.static-cast [data-actor="bento"] {
  left: 70%;
  top: 56%;
  width: 32%;
}
.static-cast [data-actor="pill"] span {
  bottom: 19%;
}
.world-render[data-state="ready"] .static-cast,
.world-render[data-state="sprites"] .static-cast {
  display: none;
}
html:not(.scene-enabled) body:not(.scene-enabled) .static-cast {
  display: block !important;
  transform: translateX(-18%) scale(1.3);
}
html:not(.scene-enabled) body:not(.scene-enabled) .static-cast:before {
  display: none;
}
html:not(.scene-enabled) body:not(.scene-enabled) .world-render canvas {
  display: none;
}
@media (max-width: 1100px) {
  .scene-enabled .brief-ticket {
    transform: translateY(calc((1 - var(--arrival, 0)) * -150px));
  }
  .site-header {
    gap: 18px;
  }
  .theme-choice span {
    display: none;
  }
  .theme-choice button {
    padding: 7px 9px;
  }
  .site-header nav {
    gap: 18px;
  }
}
@media (max-width: 760px) {
  .site-header {
    gap: 10px;
  }
  .site-header .brand img {
    width: 112px;
  }
  .theme-choice {
    padding: 2px;
    gap: 0;
  }
  .theme-choice button {
    padding: 6px;
    min-height: 29px;
  }
  .theme-choice svg {
    width: 14px;
    height: 14px;
  }
  .site-header nav {
    gap: 0;
  }
  .nav-cta {
    padding: 9px 11px;
    font-size: 10px;
  }
  .static-cast [data-actor="pill"] {
    left: 20%;
    top: 60%;
    width: 30vw;
  }
  .static-cast [data-actor="drop"] {
    left: 38%;
    top: 48%;
    width: 33vw;
  }
  .static-cast [data-actor="bento"] {
    left: 69%;
    top: 50%;
    width: 63vw;
  }
  .static-cast:before {
    width: 170%;
    height: 34%;
    left: -35%;
    top: 56%;
  }
  html:not(.scene-enabled) body:not(.scene-enabled) .static-cast {
    transform: none;
  }
  .scene-enabled .brief-ticket:before {
    inset: -14px -16px;
  }
  .theme-choice span {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .theme-choice button {
    transition:
      background 0.2s,
      color 0.2s;
  }
  .theme-choice svg {
    transition: transform 0.4s;
  }
  .theme-choice button:hover svg {
    transform: rotate(18deg);
  }
}
@media (max-width: 360px) {
  .site-header .brand img {
    width: 94px;
  }
  .site-header {
    gap: 7px;
  }
  .nav-cta {
    font-size: 9px;
    padding: 9px;
  }
  .theme-choice button {
    padding: 5px;
  }
}
.site-header nav a {
  color: var(--fg);
}
.scene-label strong {
  color: inherit;
}
.theme-choice button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--fg);
}
.room-light:before {
  opacity: 0.14;
}
:root[data-theme="dark"] {
  --scene-light: #232734;
  --desk: #16181d;
}
@media (max-width: 760px) {
  .theme-choice button {
    min-height: 36px;
    min-width: 32px;
    padding: 6px;
  }
  .theme-choice {
    padding: 2px;
  }
  .mobile-cast [data-actor="bento"] span {
    bottom: 4%;
  }
}
.world-render {
  overflow: hidden;
}
@media (max-width: 760px) {
  .static-cast [data-actor="bento"] {
    left: 67%;
  }
}

/* Consent belongs to the footer, leaving the workspace and cast unobstructed. */
.landing-home .cookie-panel {
  position: relative;
  inset: auto;
  z-index: auto;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 28px max(24px, 5.5vw) 36px;
  border: 0;
  border-top: 1px solid var(--edge);
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
  color: var(--fg);
}
.landing-home .cookie-panel h2 {
  color: var(--fg);
  font-size: 18px;
}
.landing-home .cookie-panel p {
  color: var(--muted);
  max-width: 62ch;
}
.landing-home .cookie-actions button {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--edge);
  min-height: 44px;
}
.landing-home .cookie-actions .accept {
  background: var(--accent);
  color: #131510;
}
.landing-home .cookie-actions button:hover {
  border-color: var(--fg);
}

/* See the touch-target note in workspace.css. The appearance switch and the
   scenario tabs keep their pill and underline exactly as drawn; only the area
   that answers a finger grows. The tabs carry an underline indicator on the
   border edge, so the box itself must not change. */
@media (pointer: coarse) {
  .theme-choice button {
    position: relative;
  }
  .theme-choice button:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 48px;
    transform: translateY(-50%);
  }
  /* The scenario tabs sit directly above the sheet body, so an overlay reaching
     downwards would take taps meant for the content. They gain real height
     instead; the row has space on a phone and the underline stays on its edge. */
  .scenario-controls button {
    min-height: 44px;
  }
}
