/* Annunciator: the city is the plant at night, the ledger is the wall of lamps. */

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/sketches/skins/annunciator/fonts/barlow-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/sketches/skins/annunciator/fonts/barlow-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/sketches/skins/annunciator/fonts/barlow-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/sketches/skins/annunciator/fonts/barlow-semi-condensed-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('/sketches/skins/annunciator/fonts/martian-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --room: #14171a;
  --room-rgb: 20, 23, 26;
  --room-raised: #191d21;
  --rule: #3d434a;
  --rule-soft: #262b30;
  --ivory: #e9e6de;
  --ash: #b4bbc2;
  --steel: #8b939b;
  --steel-dim: #5a626a;
  --lamp: #f0a030;
  --lamp-hi: #ffc061;
  --win: #b9782a;
  --win-hi: #ffb547;
  --win-sel: #fff1d6;
  --win-off: #2a2e33;
  --door: #0f1215;
  --shadow: #000000;
  --shadow-op: .42;
  --table-hi: #1b1f23;
  --table-lo: #0e1013;
  --pool: rgba(240, 160, 48, .08);
  color-scheme: dark;
  --font-text: 'Barlow', system-ui, sans-serif;
  --font-legend: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --col: 420px;
  --log-w: 400px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
/* Day: the same room with the lights up. Paper instead of graphite; amber still means "on". */
:root[data-theme="light"] {
  --room: #ecebe6;
  --room-rgb: 236, 235, 230;
  --room-raised: #f4f3ef;
  --rule: #b6b3ab;
  --rule-soft: #d8d5cd;
  --ivory: #17191c;
  --ash: #3b4046;
  --steel: #626970;
  --steel-dim: #9da3a9;
  --lamp: #d7820c;
  --lamp-hi: #f0a030;
  --win: #d9901e;
  --win-hi: #f0a030;
  --win-sel: #ffc95c;
  --win-off: #d3cec4;
  --door: #6b6259;
  --shadow: #17191c;
  --shadow-op: .12;
  --sheet-shadow: rgba(23, 25, 28, .18);
  --table-hi: #f3f1eb;
  --table-lo: #dcd9d1;
  --pool: rgba(255, 255, 255, .6);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--room);
  color: var(--ash);
  font: 400 15px/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
}
::selection { background: var(--lamp); color: var(--room); }
:focus-visible { outline: 1.5px solid var(--ivory); outline-offset: 3px; border-radius: 1px; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

/* ---------- room ---------- */
.room {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: var(--col) 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.room::before {
  content: '';
  grid-column: 1; grid-row: 1 / -1;
  width: calc(var(--col) + 160px);
  background: linear-gradient(90deg, rgba(var(--room-rgb), 1) 0 68%, rgba(var(--room-rgb), .72) 84%, rgba(var(--room-rgb), 0));
  pointer-events: none;
  z-index: 1;
}

/* ---------- plant (the city) ---------- */
/* The table: a pool of light where the lamp is (it follows the hand, and settles back), falling off to the room's edge. */
@property --mx { syntax: '<percentage>'; inherits: false; initial-value: 62%; }
@property --my { syntax: '<percentage>'; inherits: false; initial-value: 54%; }
.plant {
  grid-column: 1 / -1; grid-row: 1 / -1; position: relative; overflow: hidden; z-index: 0;
  background:
    radial-gradient(52% 60% at var(--mx) var(--my), var(--pool), transparent 72%),
    radial-gradient(88% 96% at 60% 54%, var(--table-hi), var(--table-lo));
  transition: --mx .7s var(--ease), --my .7s var(--ease);
}
.plant .base > polygon:first-child { stroke: none; }
.plant svg { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.plant svg.is-drag { cursor: grabbing; }
.plant .labels, .plant .lbl { display: none; }
.plant .district { transition: opacity .5s var(--ease); outline: none; }
.plant .district:focus-visible { outline: none; }
.plant.is-isolating .district:not(.is-on):not(.is-peek):not(.is-scan) { opacity: .26; }
:root[data-theme="light"] .plant.is-isolating .district:not(.is-on):not(.is-peek):not(.is-scan) { opacity: .4; }
.plant .city-window { fill: var(--win); transition: fill .5s var(--ease) var(--d, 0s); }
.plant.is-booting .city-window { fill: var(--win-off); }
.plant .district.is-on .city-window,
.plant .district.is-peek .city-window,
.plant .district.is-scan .city-window { fill: var(--win-hi); }
.plant .city-door { fill: var(--door); }
.plant .city-contact-shadow { fill: var(--shadow); opacity: var(--shadow-op); }
.plant .city-object-part { transition: opacity .35s var(--ease); }
.plant .district.is-on .city-object-part.is-hover .city-window,
.plant .district.is-on .city-object-part.is-selected .city-window { fill: var(--win-sel); }
.plant .district.is-on.has-selection .city-object-part:not(.is-selected):not(.is-hover) { opacity: .55; }
.plant .district.is-on.has-lit .city-object-part:not(.is-hover) { opacity: .45; } /* a pipeline step is lit in the log: its building keeps the light */

.tip {
  position: absolute; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; gap: 3px;
  padding: 6px 10px 7px;
  background: rgba(var(--room-rgb), .94);
  color: var(--ivory);
  border-top: 1px solid var(--rule);
  max-width: 260px;
}
.tip[hidden] { display: none; }
.tip-title { font: 500 13px/1.25 var(--font-text); color: var(--ivory); }
.tip-unit { font: 500 11px/1.2 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }

.hint {
  position: absolute; right: 28px; bottom: 18px; z-index: 2;
  margin: 0;
  font: 500 11px/1 var(--font-legend);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel);
  pointer-events: none;
}
.hint b { font-weight: 500; color: var(--ash); }
.hint-touch { display: none; }

/* ---------- wall (the column) ---------- */
.mast, .units, .legends { grid-column: 1; position: relative; z-index: 2; }
.mast { grid-row: 1; padding: 24px 36px 10px 40px; }
.units { grid-row: 2; padding: 0 36px 0 40px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule-soft) transparent; }
.legends { grid-row: 3; padding: 10px 36px 16px 40px; }

/* the badge: portrait | name + About on row 1; lens full width on row 2; bio full width on row 3. */
.badge { display: grid; grid-template-columns: 96px 18px auto minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: start; column-gap: 0; }
.badge .portrait { grid-column: 1; grid-row: 1; display: block; }
.badge .portrait img { width: 96px; height: 96px; object-fit: cover; display: block; filter: saturate(.8) contrast(1.04); border-bottom: 1px solid var(--rule); transition: filter .3s var(--ease), border-color .3s var(--ease); }
.badge .portrait:hover img, .badge .portrait:focus-visible img { filter: saturate(1) contrast(1.04); border-bottom-color: var(--ivory); }
.badge .name { grid-column: 3; grid-row: 1; margin: 0; padding-top: 2px; font: 600 28px/1.05 var(--font-text); letter-spacing: -.012em; color: var(--ivory); }
.badge .name a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .2s var(--ease); }
.badge .name a:hover, .badge .name a:focus-visible { text-decoration-color: var(--rule); }
.badge .more { grid-column: 4; grid-row: 1; justify-self: start; align-self: start; margin: 12px 0 0 12px; font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding-bottom: 2px; border-bottom: 1px solid transparent; text-decoration: none; transition: color .2s var(--ease), border-color .2s var(--ease); }
.badge .more:hover, .badge .more:focus-visible { color: var(--ivory); border-bottom-color: var(--rule); }
.lens { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 10px; }
.lens button { font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding: 5px 0 4px; border-bottom: 1px solid transparent; white-space: nowrap; transition: color .2s var(--ease), border-color .2s var(--ease); }
.lens button:hover { color: var(--ivory); border-bottom-color: var(--rule); }
.lens button[aria-pressed="true"] { color: var(--ivory); border-bottom-color: var(--lamp); }
.badge .bio { grid-column: 1 / -1; grid-row: 3; margin-top: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ash); max-width: 42ch; }

/* the title plate: the claim and its proof sit on the table beside the model, and clear away while a log is open */
.plate { grid-column: 2; grid-row: 1 / -1; align-self: start; justify-self: start; position: relative; z-index: 2; margin: 34px 0 0 40px; max-width: 460px; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.room.has-log .plate { opacity: 0; transform: translateY(-6px); pointer-events: none; }
/* viewing angle and room switch, top right of the plant */
.plant-tools {
  position: absolute; right: 28px; top: 34px; z-index: 2;
  display: flex; align-items: center; gap: 16px;
}
.lights, .angle {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel); padding: 6px 0 5px; border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lights::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--steel-dim); background: var(--lamp); box-shadow: inset 0 0 0 1.5px var(--room); transition: background .3s var(--ease); }
:root[data-theme="light"] .lights::before { background: transparent; }
.lights:hover, .angle:hover { color: var(--ivory); border-bottom-color: var(--rule); }

.sc-egg { cursor: pointer; pointer-events: auto; }
.sc-poster-text {
  font: 600 9px/1 var(--font-legend);
  letter-spacing: .12em;
  fill: var(--ivory);
  pointer-events: none;
}
.sc-bee { animation: sc-bee 7.2s ease-in-out infinite; }
.sc-bee-2 { animation-delay: -2.4s; }
.sc-bee-3 { animation-delay: -4.8s; }
@keyframes sc-bee {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -5px); }
}

.claim {
  font: 600 34px/1.08 var(--font-text);
  letter-spacing: -.012em;
  color: var(--ivory);
  text-wrap: balance;
  max-width: 15ch;
}
.proof { margin-top: 12px; font-size: 14.5px; line-height: 1.5; color: var(--ash); max-width: 44ch; }
.proof[hidden] { display: none; }
.proof-lens b { display: block; margin-bottom: 4px; font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.proof a { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.proof a:hover { text-decoration-color: var(--ivory); }

/* units: the annunciator rows */
.units li { border-top: 1px solid var(--rule-soft); }
.units li:last-child { border-bottom: 1px solid var(--rule-soft); }
.unit {
  display: grid; grid-template-columns: 16px 1fr; column-gap: 14px; align-items: start;
  width: 100%; padding: 5px 0;
  color: var(--ivory);
}
.unit .lamp { width: 16px; height: 16px; margin-top: 1px; overflow: visible; }
.lamp .ring { fill: none; stroke: var(--steel-dim); stroke-width: 1.25; transition: stroke .3s var(--ease); }
.lamp .core { fill: var(--lamp); opacity: 0; transform-origin: 8px 8px; transform: scale(.6); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.lamp .inner { fill: none; stroke: var(--lamp-hi); stroke-width: .9; opacity: 0; transition: opacity .3s var(--ease); }
.lamp .strike { stroke: var(--steel-dim); stroke-width: 1.1; opacity: 0; }
.unit .u-title { display: block; font: 500 14.5px/1.25 var(--font-text); letter-spacing: 0; transition: letter-spacing .25s var(--ease), color .25s var(--ease); }
.unit .u-meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 2px; font: 400 10px/1.4 var(--font-mono); color: var(--steel); }
.unit .u-meta > span, .log-meta > span { white-space: nowrap; }
.unit .u-meta .u-state { text-transform: uppercase; letter-spacing: .06em; }
.unit .u-meta > span + span::before { content: '·'; margin-right: 8px; color: var(--steel-dim); }

.unit:hover .lamp .ring, .unit:focus-visible .lamp .ring, .unit.is-peek .lamp .ring, .unit.is-scan .lamp .ring { stroke: var(--ash); }
.unit.is-live .lamp .core { opacity: 1; transform: scale(1); }
.unit.is-on .lamp .core { opacity: 1; transform: scale(1); }
/* Lamp test on power-up: rows come up staggered with every lamp lit, then settle to their true state. */
.units li { transition: opacity .45s var(--ease), transform .45s var(--ease); }
.units.is-booting li { opacity: 0; transform: translateY(5px); }
.units.is-test .lamp .core { opacity: 1; transform: scale(1); }
.unit.is-on .lamp .inner { opacity: 1; }
.unit.is-on .lamp .ring { stroke: var(--lamp-hi); }
.unit.is-seen:not(.is-on) .lamp .strike { opacity: 1; }
.unit:hover .u-title, .unit:focus-visible .u-title, .unit.is-on .u-title, .unit.is-peek .u-title { letter-spacing: .014em; color: var(--ivory); }
.units.has-active .unit:not(.is-on):not(:hover):not(.is-peek) .u-title { color: var(--ash); }

/* legends: the controls */
.legends { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legend, .legends a, .legends button {
  font: 500 11px/1 var(--font-legend);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel); text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.legends a:hover, .legends button:hover { color: var(--ivory); border-bottom-color: var(--rule); }
.legends .primary { color: var(--ivory); border-bottom-color: var(--ivory); }
.legends .primary:hover { border-bottom-color: var(--lamp); }

/* ---------- log (prints beside the plant on selection) ---------- */
.wash {
  position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--log-w) + 220px);
  background: linear-gradient(90deg, rgba(var(--room-rgb), 0), rgba(var(--room-rgb), .6) 34%, rgba(var(--room-rgb), .94) 62%);
  opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; z-index: 1;
}
.room.has-log .wash { opacity: 1; }
.log {
  position: absolute; right: 48px; top: 84px; bottom: 72px; width: var(--log-w);
  z-index: 3; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
  padding-right: 4px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
  pointer-events: none;
}
.room.has-log .log { opacity: 1; transform: none; pointer-events: auto; }
.log:focus { outline: none; }
.log-title { font: 600 22px/1.2 var(--font-text); letter-spacing: -.008em; color: var(--ivory); text-wrap: balance; }
.log-meta { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 8px; font: 400 10.5px/1.6 var(--font-mono); color: var(--steel); }
.log-meta .u-state { text-transform: uppercase; letter-spacing: .06em; }
.log-meta span + span::before { content: '·'; margin-right: 8px; color: var(--steel-dim); }
.log-body { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule-soft); }
.log-body p { font-size: 14.5px; line-height: 1.5; color: var(--ash); }
.log-body p + p { margin-top: 10px; }
.log-body .lanes li, .log-stack li { font-size: 13.5px; line-height: 1.45; color: var(--ash); padding: 6px 0; border-top: 1px solid var(--rule-soft); }
.log-body .lanes { margin-top: 14px; }
.log-body .lanes li b, .log-stack li b { font-weight: 500; color: var(--ivory); }
.log-stack li b::after { content: ' '; }
.log-stack li:last-child { border-bottom: 1px solid var(--rule-soft); }
.log-stack[hidden] { display: none; }
.log h3 { margin: 22px 0 6px; font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.log-also li { border-top: 1px solid var(--rule-soft); }
.log-also li:last-child { border-bottom: 1px solid var(--rule-soft); }
.log-also button { display: block; width: 100%; padding: 8px 0; font-size: 14px; line-height: 1.35; color: var(--ivory); }
.log-also button:hover { letter-spacing: .01em; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.log-also button::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 10px 1px 0; border: 1px solid var(--steel); vertical-align: middle; }
.log-also button:hover::before { border-color: var(--ivory); }
.log-also[hidden], .log-links[hidden] { display: none; }
.log-links a, .log-links span { display: block; padding: 7px 0; font-size: 14px; line-height: 1.35; color: var(--ivory); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; border-top: 1px solid var(--rule-soft); }
.log-links a:hover { text-decoration-color: var(--ivory); }
.log-links span { color: var(--steel); text-decoration: none; }
.log-links a:last-child, .log-links span:last-child { border-bottom: 1px solid var(--rule-soft); }
.log-nav { display: flex; gap: 22px; margin-bottom: 18px; }
.log-nav button { font: 500 12px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding: 6px 0; border-bottom: 1px solid transparent; }
.log-nav button:hover:not(:disabled) { color: var(--ivory); border-bottom-color: var(--rule); }
.log-nav button:disabled { color: var(--steel-dim); cursor: default; }
.log-nav button[hidden] { display: none; }
.log-nav #close { margin-left: auto; }
/* the shipped homepage's own words, printed in the log: the problem, the pipeline (hover a step and the building it
   names lights up), one line per role, and the full story behind a disclosure */
.log-body .log-problem { font-size: 16px; line-height: 1.45; font-weight: 500; color: var(--ivory); }
.log-body .log-problem + p { margin-top: 12px; }
.log-pipe li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); column-gap: 12px; padding: 6px 0; border-top: 1px solid var(--rule-soft); font-size: 13.5px; line-height: 1.45; color: var(--ash); transition: color .2s var(--ease); }
.log-pipe li:last-child { border-bottom: 1px solid var(--rule-soft); }
.log-pipe li b { font-weight: 500; color: var(--ivory); transition: color .2s var(--ease); }
.log-pipe li[data-key] { cursor: pointer; }
.log-pipe li[data-key]:hover, .log-pipe li[data-key]:focus-visible, .log-pipe li.is-lit { color: var(--ivory); }
.log-pipe li[data-key]:hover b, .log-pipe li[data-key]:focus-visible b, .log-pipe li.is-lit b { color: var(--lamp-hi); }
.log-lens p { padding: 6px 0; border-top: 1px solid var(--rule-soft); font-size: 13.5px; line-height: 1.45; color: var(--ash); }
.log-lens p:last-child { border-bottom: 1px solid var(--rule-soft); }
.log-lens p b { display: block; margin-bottom: 2px; font: 500 10.5px/1.3 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
:root[data-lens="arch"] .log-lens:not(.log-roles) p:not([data-role="arch"]), :root[data-lens="data"] .log-lens:not(.log-roles) p:not([data-role="data"]), :root[data-lens="swe"] .log-lens:not(.log-roles) p:not([data-role="swe"]) { display: none; }
:root[data-lens] .log-lens:not(.log-roles) p { border-top: 0; padding-top: 0; font-size: 14.5px; color: var(--ivory); }
:root[data-lens] .log-lens:not(.log-roles) p b { color: var(--lamp); }
/* About prints all three roles whatever the lens; the chosen one is the lit line */
:root[data-lens="arch"] .log-roles p[data-role="arch"], :root[data-lens="data"] .log-roles p[data-role="data"], :root[data-lens="swe"] .log-roles p[data-role="swe"] { color: var(--ivory); }
:root[data-lens="arch"] .log-roles p[data-role="arch"] b, :root[data-lens="data"] .log-roles p[data-role="data"] b, :root[data-lens="swe"] .log-roles p[data-role="swe"] b { color: var(--lamp); }
.log-story { margin-top: 22px; }
.log-story summary { list-style: none; cursor: pointer; display: inline-block; font: 500 11px/1 var(--font-legend); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); padding: 6px 0 5px; border-bottom: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); }
.log-story summary::-webkit-details-marker { display: none; }
.log-story summary::after { content: ' +'; }
.log-story[open] summary::after { content: ' −'; }
.log-story summary:hover { color: var(--ivory); border-bottom-color: var(--rule); }
.log-story .story-body { margin-top: 10px; }
.log-story .story-body p { font-size: 13.5px; line-height: 1.5; color: var(--ash); }
.log-story .story-body p + p { margin-top: 8px; }
/* the wall under a lens: rows the lens has little to say about step back */
:root[data-lens] .units li[data-w="1"] .unit .u-title { color: var(--steel); }
:root[data-lens] .units li[data-w="1"] .unit .lamp .ring { stroke: var(--rule); }

/* shorter desktops: keep all twelve lamps on the wall. Compact row padding before the portrait.
   96px holds through a 1440×815 laptop; 80px only under 780px; 64px at 760. */
@media (min-width: 961px) and (max-height: 820px) {
  .mast { padding: 20px 36px 8px 40px; }
  .badge .bio { margin-top: 6px; }
  .claim { font-size: 30px; }
  .proof { margin-top: 8px; line-height: 1.45; }
  .unit { padding: 4px 0; }
  .legends { padding: 10px 36px 12px 40px; }
}
@media (min-width: 961px) and (max-height: 780px) {
  .badge { grid-template-columns: 80px 16px auto minmax(0, 1fr); }
  .badge .portrait img { width: 80px; height: 80px; }
  .badge .name { font-size: 25px; }
  .badge .more { margin-top: 10px; }
  .lens { margin-top: 8px; }
  .badge .bio { margin-top: 6px; font-size: 13px; }
}
@media (min-width: 961px) and (max-height: 720px) {
  .mast { padding: 14px 36px 6px 40px; }
  .badge { grid-template-columns: 64px 14px auto minmax(0, 1fr); }
  .badge .portrait img { width: 64px; height: 64px; }
  .badge .name { font-size: 22px; }
  .badge .more { margin: 8px 0 0 10px; }
  .lens { margin-top: 6px; }
  .badge .bio { margin-top: 4px; font-size: 12.5px; line-height: 1.35; }
  .plate { margin-top: 22px; }
  .claim { font-size: 26px; }
  .proof { font-size: 13.5px; }
  .unit { padding: 4px 0; }
  .unit .u-title { font-size: 14px; line-height: 1.2; }
  .unit .u-meta { font-size: 9.5px; line-height: 1.3; }
  .legends { padding: 6px 36px 8px 40px; }
}
/* shorter than that the ledger scrolls; the fade says so */
.units.is-scroll { mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }

/* ---------- the model is alive ----------
   Scenery (scenery.js) and the renderer's own effect hooks. Chimneys smoke, beacons pulse, the lighthouse turns
   at night, the strait ripples, lanterns breathe, and now and then a lit window blinks. Boats and birds stay off.
   Cloud shadows drift by day. Traffic on the ring is a slow crawl. Nothing flashes. */
.plant .anim-boat,
.plant .anim-bird,
.plant .fx-wake { animation: none; display: none; }
.plant .anim-lantern { animation: sc-lantern 9s ease-in-out infinite; }
.plant .city-effect { opacity: 1; }
.plant .fx-smoke > * { animation: sc-smoke 8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.plant .fx-smoke > :nth-child(2) { animation-delay: -2.6s; }
.plant .fx-smoke > :nth-child(3) { animation-delay: -5.2s; }
.plant .fx-ring { animation: sc-beacon 8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.plant .fx-ring-2 { animation-delay: -4s; }
.plant .fx-beam { animation: sc-sweep 22s ease-in-out infinite alternate; transform-box: view-box; transform-origin: var(--beam-origin, center); }
:root[data-theme="light"] .plant .fx-beam { display: none; }
:root:not([data-theme="light"]) .plant .sc-cloud { display: none; }
:root[data-theme="light"] .plant .sc-cloud { animation: sc-cloud 160s linear infinite; }
.plant .sc-ripple { animation: sc-ripple 12s ease-in-out infinite alternate; }
.plant .sc-ripple-2 { animation-delay: -4s; }
.plant .sc-ripple-3 { animation-delay: -8s; }
:root[data-theme="light"] .plant .sc-lamp { display: none; }
.plant .city-window.is-flicker { fill: var(--win-off); transition: none; }
.plant.is-isolating .scenery { opacity: .55; transition: opacity .5s var(--ease); }
.plant .scenery { transition: opacity .5s var(--ease); }
@keyframes sc-drift { from { transform: translateX(-3px); } to { transform: translateX(3px); } }
@keyframes sc-fly { 0% { transform: translate(-44px, 8px); opacity: 0; } 8% { opacity: .9; } 90% { opacity: .9; } 100% { transform: translate(72px, -14px); opacity: 0; } }
@keyframes sc-lantern { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes sc-smoke { 0% { translate: 0 1px; opacity: 0; } 22% { opacity: .42; } 100% { translate: 2px -9px; opacity: 0; } }
@keyframes sc-beacon { 0% { transform: scale(.55); opacity: .75; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes sc-sweep { from { transform: rotate(-30deg); } to { transform: rotate(30deg); } }
@keyframes sc-wake { 0% { translate: 0 0; opacity: 0; } 25% { opacity: .38; } 100% { translate: -4px 1.5px; opacity: 0; } }
@keyframes sc-ripple { from { transform: translateX(-2px); opacity: .3; } to { transform: translateX(2px); opacity: .75; } }
@keyframes sc-cloud { from { transform: translate(-170px, 52px); } to { transform: translate(190px, -64px); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .plant .sc-cloud, .plant .fx-beam { display: none; }
}

/* ---------- narrow: the wall becomes the page, the plant a band, the log a sheet ---------- */
@media (max-width: 960px) {
  body { overflow: auto; }
  .room { position: static; display: flex; flex-direction: column; min-height: 100dvh; }
  .room::before { display: none; }
  .mast { order: 1; padding: 24px 20px 0; }
  .badge { grid-template-columns: 84px 16px auto minmax(0, 1fr); }
  .badge .portrait img { width: 84px; height: 84px; }
  .badge .name { font-size: 26px; }
  .plate { order: 2; margin: 22px 0 0; padding: 0 20px 20px; max-width: none; }
  .room.has-log .plate { opacity: 1; transform: none; pointer-events: auto; }
  /* The plant pins to the top of the screen while the wall scrolls under it, so a tap on a row zooms a city you can see. */
  .plant { order: 3; position: sticky; top: 0; z-index: 3; height: min(46vh, 440px); min-height: 300px; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
  .plant svg { touch-action: pan-y; }              /* full view: one finger scrolls the page, a tap picks a district */
  .room.has-active .plant svg { touch-action: none; } /* zoomed in: one finger pans the plant, two fingers pinch */
  .units { order: 4; padding: 8px 20px 0; overflow: visible; }
  .unit { scroll-margin-top: calc(min(46vh, 440px) + 8px); } /* keyboard focus lands below the pinned plant, not under it */
  .legends { order: 5; padding: 22px 20px 34px; }
  .claim { font-size: 30px; max-width: 14ch; }
  .proof { font-size: 14.5px; }
  .hint { display: none; }
  .hint-touch { display: block; right: 16px; bottom: 12px; }
  .plant-tools { right: 16px; top: 12px; }
  .wash { display: none; }
  .log {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 50vh; z-index: 6;
    padding: 16px 20px 32px; background: var(--room-raised); border-top: 1px solid var(--rule);
    box-shadow: 0 -32px 64px var(--sheet-shadow, rgba(0, 0, 0, .55));
    transform: translateY(102%); opacity: 1;
    transition: transform .28s var(--ease);
  }
  .room.has-log .log { transform: none; }
}
