@font-face {
  font-family: "Roboto Mono";
  src: url("RobotoMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("RobotoMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --surface: #f8f7f4;
  --panel: #f8f7f4;
  --tile: #fbfaf7;
  --edge: #d8d2c8;
  --text: #31302d;
  --muted: #6f675d;
  --header-height: 81px;
  --picture-width: 1260px;
  --console-width: 300px;
  --type-small: .6875rem;
  --type-body: .75rem;
  --type-control: .8125rem;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text); font: 14px "Roboto Mono", monospace; }
main { max-width: 1621px; margin: auto; padding: clamp(12px, 1.35vw, 24px); }
header {
  position: sticky; top: 0; z-index: 3; background: var(--surface);
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 14px;
  height: var(--header-height); margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--edge);
}
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-logo { display: block; width: clamp(136px, 12vw, 174px); height: auto; mix-blend-mode: multiply; }
nav { display: flex; gap: 6px; }
.project { margin: 0 0 5px; font-size: var(--type-small); letter-spacing: .10em; text-transform: uppercase; color: var(--muted); }
.consultant { margin: 4px 0 0; font-size: var(--type-small); line-height: 1.35; color: var(--muted); }
h1 { margin: 0; font-size: clamp(20px, 2.25vw, 30px); line-height: 1.15; font-weight: 700; text-transform: uppercase; }
h2 { margin: 0 0 7px; font-size: var(--type-control); font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
h3 { margin: 0 0 5px; color: var(--muted); font-size: var(--type-body); font-weight: 400; }
button {
  min-height: 44px; border: 1px solid var(--edge); border-radius: 2px;
  padding: 7px 11px; background: var(--tile); color: var(--text);
  font: inherit; line-height: 1.15; cursor: pointer; touch-action: manipulation;
}
button:hover { border-color: #8b775d; }
button:focus-visible { outline: 2px solid #806746; outline-offset: 3px; }
button[aria-pressed="true"], button.accent { background: #ede4d4; color: #251a12; border-color: #b8a78b; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
.layout { display: grid; gap: 13px; align-items: start; }
.layout:not(.interactive) .viewer { width: min(100%, var(--picture-width)); margin-inline: auto; }
.layout.interactive { grid-template-columns: minmax(0,var(--picture-width)) clamp(270px, 19vw, var(--console-width)); max-width: calc(var(--picture-width) + var(--console-width) + 13px); margin-inline: auto; }
.viewer { min-width: 0; }
.frame { position: relative; aspect-ratio: 16/9; background: var(--surface); border: 1px solid var(--edge); overflow: hidden; }
.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.image, .scene .film { visibility: hidden; }
.scene .image { visibility: visible; }
.finished .film { visibility: hidden; }
.sound-start { position: absolute; top: 12px; right: 12px; }
.film-end {
  position: absolute; inset: auto 0 4%; display: flex; justify-content: center;
  flex-wrap: wrap; gap: 8px; padding-inline: 5px;
}
.viewer-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; margin-top: 8px; }
.film-links { display: flex; justify-content: flex-end; gap: 6px; }
.controls { padding: 0 0 0 11px; background: var(--panel); border-left: 1px solid var(--edge); }
.choices { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 5px; }
.choices button { padding-inline: 2px; font-size: var(--type-body); }
.environment-track { grid-column: 1 / -1; position: relative; padding-top: 16px; }
#environment-mood { position: absolute; top: 0; left: clamp(28px, var(--thumb-position, 0%), calc(100% - 28px)); transform: translateX(-50%); font-size: var(--type-small); color: var(--muted); white-space: nowrap; }
#environment { appearance: none; display: block; background: transparent; }
#environment::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg,#899095,#ddd7c5 28%,#f0e5c6 50%,#bca78d 76%,#899095); }
#environment::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -5.5px; background: #8b775d; border: 2px solid var(--panel); border-radius: 50%; }
#environment::-moz-range-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg,#899095,#ddd7c5 28%,#f0e5c6 50%,#bca78d 76%,#899095); }
#environment::-moz-range-thumb { width: 12px; height: 12px; background: #8b775d; border: 2px solid var(--panel); border-radius: 50%; }
#environment:focus-visible { outline: 2px solid #806746; outline-offset: 3px; }
.control-head { margin-bottom: 5px; }
.control-head h2 { margin: 0; }
.control-head button { padding-block: 1px; }
.tiles { display: grid; grid-template-columns: minmax(0,1fr); gap: 4px; }
.tile { display: grid; grid-template-columns: minmax(0,1fr) 44px; border: 1px solid var(--edge); border-radius: 2px; background: var(--tile); }
.tile:has(.select[aria-pressed="true"]) { border-color: #b8a78b; background: #ede4d4; }
.select, .select[aria-pressed="true"] {
  border: 0; background: transparent; text-align: left; color: var(--text);
  display: flex; align-items: center; gap: 6px; padding-inline: 7px 3px; font-size: var(--type-control);
}
.symbol { color: #6e5437; display: inline-grid; place-items: center; width: 22px; flex: 0 0 22px; font-size: 1.2rem; }
.power { height: 100%; border: 0; border-left: 1px solid var(--edge); border-radius: 0; padding: 0; font-size: 1.15rem; }
.power[aria-pressed="true"] { background: #d9c5a5; color: #3d2d19; }
.power[aria-pressed="false"] { background: #f4f2ee; color: #665e54; }
.detail { grid-column: 1 / -1; border-top: 1px solid #d3c3aa; padding: 10px 8px 7px; background: #f7f2e9; }
.fixture-level { margin-left: auto; font-size: var(--type-small); color: var(--muted); }
.fixture-label { flex: 1; }
.power { align-self: start; }
.atmospheres { border-top: 1px solid var(--edge); padding-top: 12px; margin-top: 12px; }
.atmospheres p { font-size: var(--type-body); line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.atmospheres .choices { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-flow: row; }
.atmospheres button { font-size: var(--type-small); }
.fixture-spec summary { cursor: pointer; padding-block: 9px; color: var(--muted); font-size: var(--type-small); }
.fixture-spec[open] summary { margin-bottom: 3px; }
.detail > div + div { margin-top: 6px; }
#colour button { padding-inline: 1px; font-size: var(--type-small); white-space: nowrap; }
.fixture-spec { margin-bottom: 7px; font-size: var(--type-body); line-height: 1.4; }
.fixture-spec p { margin: 0 0 4px; }
#fixture-type { font-weight: 700; }
#fixture-note { color: var(--muted); }
.colour-sample { display: block; margin: 0 auto 3px; width: 13px; height: 8px; border-radius: 6px; background: var(--sample); border: 1px solid #755f4c; }
#message { color: #6e5437; }
.view-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin-right: auto; }
.view-tools p { color: var(--muted); font-size: var(--type-control); margin: 0 auto 0 0; }
.light-levels { display: grid; gap: 9px; margin-bottom: 10px; }
.level-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; }
.level-control label { font-size: var(--type-control); font-weight: 700; }
.level-control output { font-size: var(--type-control); color: var(--muted); }
.level-control input { grid-column: 1 / -1; margin: 0; }
.level-control input { width: 100%; min-height: 28px; accent-color: #8b775d; cursor: pointer; }
@media (min-width: 1051px) and (pointer: fine), (min-width: 821px) and (orientation: landscape) and (pointer: fine) {
  .controls button { min-height: 32px; }
}
@media (max-width: 820px), (max-width: 1050px) and (orientation: portrait) {
  .layout.interactive { grid-template-columns: minmax(0,1fr); }
  .layout.interactive .viewer { position: sticky; top: var(--header-height); z-index: 2; background: var(--surface); padding-bottom: 7px; }
  .controls { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--edge); }
  .tiles { grid-template-columns: minmax(0,1fr); }
}
@media (min-width: 650px) and (max-width: 1050px) and (orientation: portrait) {
  .controls {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
    gap: 0 18px;
  }
  .scene-options { grid-column: 1 / -1; }
  .control-head, .tiles { grid-column: 1; }
  .controls .atmospheres {
    grid-column: 2;
    grid-row: 2 / span 2;
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
  }
}
@media (max-width: 560px) {
  :root { --header-height: 103px; }
  header { grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 30px 44px; gap: 4px 9px; padding-top: 5px; }
  header > div { grid-row: 1 / span 2; }
  header nav { grid-column: 2; grid-row: 2; justify-self: end; }
  .project-logo { grid-column: 2; grid-row: 1; justify-self: end; width: 113px; }
}
