/* BRIDGE page preview. Colors sampled from the Amsterdam town painting:
   canal water, quay brick, the paving, lamp and window light, leaves. */
@font-face { font-family: "Rubik"; src: url(fonts/rubik-latin-var.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
  --mist: #edf2ef;      /* morning light on the canal, the page */
  --mist-2: #e1e9e5;
  --ink: #1c2d29;       /* deep canal shadow */
  --ink-soft: #4a5c57;
  --canal: #3d7276;
  --canal-light: #a9c9c6;
  --brick: #9b573c;
  --quay: #e8b89d;
  --lamp: #efb43c;
  --leaf: #5c8745;
  --outline: #2a2522;   /* the sprites' own outline color */
  --paper: #fbf8f2;

  --f-text: "Rubik", system-ui, sans-serif;
  --f-pixel: "Rubik", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --gutter: clamp(16px, 4.4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* T-082: the page never moves sideways on a phone. Nothing is wider than the screen (the page tests measure it at
   360/390/430), the root clips anything that would be, and a sideways drag on a scene or pinned stage only scrolls the
   page up and down (the cast line takes its own sideways swipes). */
html { overflow-x: hidden; overscroll-behavior-x: none; }
@media (max-width: 760px) {
  .scene, .scene .panel, .hstage, .pin, .pstage, .mx .stage, .b1, .b2, .b3, .b4, .tline, .acts, .vig { touch-action: pan-y pinch-zoom; }
}
img { display: block; max-width: none; }
a { color: inherit; }
/* buttons and fields take the page's typeface (a button's own default is Arial) */
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }

/* the two small marks at the top */
.top {
  position: fixed; z-index: 40; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.top a { pointer-events: auto; text-decoration: none; }
.mark {
  font-family: var(--f-pixel); font-size: 15px; font-weight: 700; letter-spacing: .02em; min-height: 44px; display: inline-flex; align-items: center;
  background: var(--mist); padding: 9px 12px 8px; border-radius: 10px;
  box-shadow: inset 0 0 0 2px var(--outline);
}
.mark h1, .mark span { font: inherit; margin: 0; }
.who {
  font-size: 15px; font-weight: 500; background: var(--mist);
  padding: 7px 15px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
  box-shadow: inset 0 0 0 2px var(--outline);   /* the same ring as BRIDGE, so it reads as a button over the text that scrolls under it */
}
.who:hover { background: var(--mist-2); }
/* the logomark (mark.js) in place of the word, on the same mist chip and ring */
.mark { padding: 8px 12px; }
.mark .bridge-mark { display: block; width: 40px; height: 24px; }
/* the status bar (status.js): where Omar is and his time, what the town is doing, the town's sound. One slim bar */
.bstatus {
  position: relative; pointer-events: auto; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; max-width: calc(100vw - 2 * var(--gutter) - 84px - var(--btab-w, 0px));
  padding: 0 4px 0 14px; border-radius: 999px; background: var(--mist); box-shadow: inset 0 0 0 2px var(--outline);
  font-size: 14px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bstatus a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; color: inherit; }
.bstatus .st-dot { width: 8px; height: 8px; border-radius: 50%; background: #23a04a; box-shadow: 0 0 0 3px rgba(35, 160, 74, .2); flex: none; }
.bstatus .st-time:not(:empty)::before, .bstatus .st-town:not(:empty)::before { content: "\00b7"; margin: 0 7px 0 3px; opacity: .55; }
.bstatus .st-time { margin-left: 0; }
.bstatus .st-town { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bstatus .st-sound { flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; cursor: pointer; transition: background-color .14s cubic-bezier(.2, .8, .2, 1); }
.bstatus .st-sound:hover { background: var(--mist-2); }
.bstatus .st-sound[aria-pressed="true"] { color: #0433ff; }
.bstatus .st-sound svg { width: 20px; height: 20px; }
@media (max-width: 520px) { .bstatus .st-rest, .bstatus .st-omar { display: none; } .bstatus { font-size: 13px; padding-left: 12px; } }

/* city picker near the city line: a compact pill strip, not a dropdown slab */
.st-where-wrap { position: static; display: inline-flex; align-items: center; }
.st-city-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 2px 0 0;
  margin: 0; background: none; border: 0; border-radius: 999px; color: inherit; font: inherit;
  cursor: pointer; text-decoration: none;
}
.st-city-btn:hover .st-cname { text-decoration: underline; text-underline-offset: 3px; }
.st-city-btn:focus { outline: none; }
.st-city-btn:focus-visible { outline: 2px solid #0433ff; outline-offset: 2px; }
.st-caret { width: 10px; height: 6px; opacity: .65; margin-left: 1px; flex: none; overflow: visible; }
.st-city-btn[aria-expanded="true"] .st-caret { transform: rotate(180deg); opacity: .9; }

.st-city-picker {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
  padding: 4px; border-radius: 999px; background: var(--mist);
  box-shadow: inset 0 0 0 2px var(--outline), 0 12px 28px -10px rgba(28, 45, 41, .4);
}
.st-city-picker[hidden] { display: none; }
.st-cp-row { display: inline-flex; align-items: center; gap: 3px; }
.st-cp-item {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 5px 12px; border-radius: 999px; border: 0;
  background: none; font: 500 13.5px/1.1 var(--f-text); color: var(--ink);
  white-space: nowrap; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.st-cp-item:hover:not(.is-soon):not(.is-active) { background: var(--mist-2); }
.st-cp-item.is-active { background: var(--ink); color: var(--paper); font-weight: 600; }
.st-cp-item:focus { outline: none; }
.st-cp-item:focus-visible { outline: 2px solid #0433ff; outline-offset: 1px; }
/* the chosen city is already the dark pill; a focus ring on top of it crowds the menu (opening the menu focuses it) */
.st-cp-item.is-active:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 2px var(--ink); }
.st-cp-item .st-dot { width: 6px; height: 6px; box-shadow: none; }
.st-cp-item.is-soon { opacity: .62; cursor: default; padding: 5px 10px; gap: 5px; }
.st-soon-badge {
  font-size: 11px; font-weight: 400; color: var(--ink-soft);
}
.st-soon-badge::before { content: "\00b7 "; opacity: .7; }
@media (max-width: 520px) {
  .st-city-picker { border-radius: 20px; padding: 7px; right: 0; left: auto; max-width: calc(100vw - 24px); }
  .st-cp-row { display: grid; grid-template-columns: repeat(2, auto); gap: 5px 8px; }
  .st-cp-item { min-height: 30px; padding: 5px 10px; font-size: 13px; }
  .bstatus .st-away { display: none; }
}

/* paintings: pixel art stays pixel art. Drawn larger than its pixels it is nearest neighbour, drawn smaller it is smooth */
.plate > img, .plate .fp, .plate img.fx { image-rendering: pixelated; }
.plate.soft > img, .plate.soft .fp, .plate.soft img.fx { image-rendering: auto; }
.plate .fp { position: absolute; pointer-events: none; max-width: none; }
.held { position: absolute; left: 0; top: 0; width: 9px; height: 7px; transform-origin: 0 0; pointer-events: none; image-rendering: pixelated;
  background: no-repeat center / 100% 100%; }
.held-paper { width: 9px; height: 8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Crect width='9' height='8' fill='%232a2522'/%3E%3Crect x='1' y='1' width='7' height='6' fill='%23fbf8f2'/%3E%3Crect x='2' y='2' width='5' height='1' fill='%232a2522'/%3E%3Crect x='2' y='4' width='2' height='2' fill='%239b573c'/%3E%3Crect x='5' y='4' width='2' height='1' fill='%23a9a29a'/%3E%3C/svg%3E"); }
.held-letters { width: 9px; height: 7px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 7' shape-rendering='crispEdges'%3E%3Crect width='9' height='7' fill='%232a2522'/%3E%3Crect x='1' y='1' width='7' height='5' fill='%23fbf8f2'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%235c8745'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%235c8745'/%3E%3Crect x='3' y='3' width='3' height='1' fill='%235c8745'/%3E%3Crect x='6' y='2' width='1' height='1' fill='%235c8745'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%235c8745'/%3E%3C/svg%3E"); }

/* sprites: the town's own sheets (stand 8 x 3, walk 4 x 4), feet at the bottom centre */
.spr {
  position: absolute;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.soft .spr { image-rendering: auto; }

.tag {
  font-family: var(--f-pixel); font-size: 12px; font-weight: 500; line-height: 1;
  color: var(--paper); background: var(--outline);
  padding: 5px 6px 4px; border-radius: 4px; white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 17px/1 var(--f-text); color: var(--paper);
  background: var(--ink); border: 0; border-radius: 999px;
  padding: 16px 22px; cursor: pointer; text-decoration: none;
  transition: transform .4s var(--ease), background .3s var(--ease);
}
.btn:hover { background: #24403b; }
.btn:active { transform: scale(.97); }
.btn .door {
  width: 14px; height: 18px; flex: none;
  background: var(--lamp); border-radius: 7px 7px 1px 1px;
  box-shadow: inset 0 0 0 2px var(--outline);
}

/* the thin footer under the town */
.foot {
  padding: 56px var(--gutter) 40px;
  background: var(--mist);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.foot nav a, .foot nav span {
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -.01em;
  text-decoration: none; padding: 6px 0; display: inline-block;
  background-image: linear-gradient(var(--brick), var(--brick));
  background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .5s var(--ease);
}
.foot nav a:hover { background-size: 100% 2px; }
.foot nav span { color: var(--ink-soft); opacity: .55; cursor: default; }
.foot nav a[aria-current] { color: var(--ink-soft); }
.foot .teams { margin: 28px 0 0; color: var(--ink-soft); font-size: 17px; }
.foot .teams a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.foot .sig { margin: 36px 0 0; font-size: 13px; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* lightboxes */
dialog.box {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: 22px;
  background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(28, 45, 41, .55); overflow: auto; overscroll-behavior: contain;
}
dialog.box::backdrop { background: rgba(28, 45, 41, .42); backdrop-filter: blur(3px); }
dialog.box .x {
  position: sticky; top: 0; float: right; margin: 12px 12px 0 0; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--mist); color: var(--ink); font: 500 22px/1 var(--f-text); cursor: pointer;
}
dialog.box .x:hover { background: var(--mist-2); }
dialog.box .in { padding: 30px clamp(20px, 4vw, 44px) 36px; }
body:has(dialog[open]) { overflow: hidden; }

/* scroll scenes: a painted room or street, pinned while its captions play */
.scene { position: relative; height: var(--len, 230vh); margin-top: 30px; }
.scene .sstage { position: sticky; top: max(64px, 7vh); height: calc(100svh - max(64px, 7vh) - 3vh); }
.scene .panel { position: relative; overflow: hidden; height: 100%; border-radius: 22px; background: var(--mist-2); }
.scene .plate { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* no CSS transition on a painting (T-082): a running transition makes WebKit hand the image to the GPU as its own layer,
   which scales it smoothly and ignores image-rendering, so the painting goes soft on an iPhone; the scroll already eases */
.scene .plate > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .plate > img.ph { opacity: 0; }
.scene .plate .fx { position: absolute; pointer-events: none; }
/* T-082: a name tag that would sit on somebody else waits (mobile.js hideTagsOnOthers), at every width */
.tags .tag.m-wait { opacity: 0 !important; }
.tags .tag.m-hid { opacity: 0 !important; }   /* its person is hidden behind scenery */
.scene .tags { position: absolute; inset: 0; pointer-events: none; z-index: 2; }   /* above the room (.inner, 1), below the caption and clock (3): in the door scenes the name tags sat under the room */
.scene .tags .tag { position: absolute; transform: translate(-50%, -100%); opacity: 0; transition: opacity .4s var(--ease); }
.scene .tags .tag.on { opacity: 1; }
.scene .tag small { font-size: 11px; opacity: .72; margin-left: 5px; font-weight: 400; }
.scene .cap { position: absolute; z-index: 3; left: 16px; bottom: 16px; width: min(440px, calc(100% - 32px)); margin: 0; padding: 0; list-style: none; display: grid; }
.scene .cap li { grid-area: 1 / 1; align-self: end; background: var(--paper); border-radius: 16px; padding: 14px 18px 15px; font-size: 17px; line-height: 1.45;
  box-shadow: 0 18px 40px -26px rgba(28, 45, 41, .7); opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .5s var(--ease); }
.scene .cap li.on { opacity: 1; transform: none; }
.scene .cap li time { display: block; font-size: 13px; font-weight: 600; color: var(--brick); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.scene .cap li.send { box-shadow: inset 4px 0 0 #b8473b, 0 18px 40px -26px rgba(28, 45, 41, .7); }
.scene .cap li.tell { box-shadow: inset 4px 0 0 #3a63b8, 0 18px 40px -26px rgba(28, 45, 41, .7); }
.scene .cap li.fix { box-shadow: inset 4px 0 0 #3f8a49, 0 18px 40px -26px rgba(28, 45, 41, .7); }
.scene .clockchip { position: absolute; z-index: 3; right: 14px; top: 14px; font-size: 14px; font-weight: 600; color: var(--paper); background: var(--outline); padding: 8px 11px 7px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.scene .redtab { position: absolute; width: 16px; height: 12px; background: #deb86e; border: 1px solid #6b4a12; border-radius: 1px 2px 2px 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); pointer-events: none; display: none; }
.scene .redtab::after { content: ''; position: absolute; top: -4px; right: 2px; width: 5px; height: 4px; background: #c0423a; border: 1px solid #6b4a12; border-bottom: none; border-radius: 1px 1px 0 0; }
/* T-082: the red tab on a sent-back paper, pinned to the top edge of the paper the carry frame draws in the hands */
.scene .ptab { position: absolute; left: 0; top: 0; width: 6px; height: 5px; background: #c0423a; border: 1px solid #6b4a12; border-bottom: none; border-radius: 1px 1px 0 0; transform-origin: 0 0; pointer-events: none; display: none; }

@media (max-width: 760px) {
  .scene .sstage { top: 56px; height: calc(100svh - 70px); }
  .scene .panel { border-radius: 18px; }
  .scene .cap { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .scene .cap li { font-size: 15.5px; padding: 12px 14px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene .sstage { position: relative; top: 0; height: auto; }
  .scene .panel { height: 64svh; }
  .scene .cap { position: static; width: auto; gap: 8px; margin-top: 10px; }
  .scene .cap li { grid-area: auto; opacity: 1; transform: none; }
}

/* the way into a room: the town outside, then a circle opening from the door */
.scene .inner { position: absolute; inset: 0; z-index: 1; }
.scene .outside { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.scene .outside .plate > img { transition: none; }
.scene .sign { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--ink); background: var(--paper); padding: 9px 13px 8px; border-radius: 10px; box-shadow: 0 0 0 2px var(--outline), 0 12px 24px -14px rgba(28,45,41,.7);
  opacity: 0; transition: opacity .35s var(--ease); }
.scene .sign::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--outline); border-bottom: 0; }
.scene .sign.on { opacity: 1; }
/* a scene can run edge to edge, and its captions can sit on the right */
.scene.bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.scene.bleed .sstage { top: 0; height: 100vh; height: 100svh; }
.scene.bleed .panel { border-radius: 0; }
.scene.bleed .cap { left: var(--gutter); bottom: max(24px, 4vh); }
.scene .cap.r { left: auto; right: 16px; }
@media (min-width: 761px) { .scene .cap.t { bottom: auto; top: 16px; } }   /* a caption at the top, where the people walk along the bottom of the room */
.scene.bleed .cap.r { left: auto; right: var(--gutter); }
@media (max-width: 760px) {
  .scene.bleed .cap, .scene .cap.r, .scene.bleed .cap.r { left: 10px; right: 10px; bottom: 10px; }
  .scene .sign { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene.bleed { margin-left: 0; margin-right: 0; }
  .scene.bleed .panel { border-radius: 22px; }
  .scene .outside, .scene .sign { display: none; }
}

/* the paper's day: five small windows on the town at the hours the paper is made, joined by the day's sky */
.tline { margin: 34px 0 0; padding: 0; list-style: none; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tline::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #efb43c 0%, #d9774a 14%, #3a4a78 30%, #1d2a44 46%, #3a4a78 56%, #e9a06a 66%, #f3d38a 76%, #a9c9c6 88%, #cfe3df 100%);
  box-shadow: inset 0 0 0 2px rgba(42, 37, 34, .2); }
.tline li { position: relative; display: flex; flex-direction: column; }
.tline li::before { content: ""; position: absolute; left: 22px; top: -23px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px var(--outline); }
.tline .vig { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--mist-2); box-shadow: 0 1px 0 rgba(42,37,34,.06); }
.tline .vig .plate { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tline .vig .plate > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tline time { position: absolute; z-index: 3; left: 10px; top: 10px; font-size: 14px; font-weight: 600; color: var(--paper); background: var(--outline); padding: 7px 10px 6px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.tline h3 { margin: 14px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.tline p { margin: 6px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.tline .who2 { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
@media (max-width: 980px) and (min-width: 761px) { .tline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; } .tline::before { display: none; } .tline li::before { display: none; } }
@media (max-width: 760px) {
  .tline { grid-template-columns: 1fr; gap: 18px; padding-left: 26px; }
  .tline::before { left: 0; right: auto; top: 6px; bottom: 6px; width: 8px; height: auto;
    background: linear-gradient(180deg, #efb43c 0%, #d9774a 14%, #3a4a78 30%, #1d2a44 46%, #3a4a78 56%, #e9a06a 66%, #f3d38a 76%, #a9c9c6 88%, #cfe3df 100%); }
  .tline li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0 14px; align-items: start; }
  .tline li::before { left: -29px; top: 14px; }
  .tline .vig { grid-row: 1 / span 3; aspect-ratio: 1; border-radius: 14px; }
  .tline time { left: 6px; top: 6px; font-size: 12px; padding: 5px 7px 4px; }
  .tline h3 { margin-top: 2px; font-size: 17px; }
  .tline p { font-size: 15px; }
}

/* T-156: the Board tab, next to the mark on every page. The same mist chip and ring as the mark, in the headline face;
   the board page itself shows it filled in cobalt. It follows the mark when the phone tucks the chips away (mobile.css). */
.top:has(.btab) { --btab-w: 104px; }
.top .btab {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 auto 0 8px; padding: 0 14px 0 12px;
  background: var(--mist); color: var(--ink); border-radius: 10px; box-shadow: inset 0 0 0 2px var(--outline);
  font-family: "BRIDGE Pixel", var(--f-text); font-weight: 600; font-size: 16px; letter-spacing: .01em; line-height: 1; white-space: nowrap;
}
.top .btab:hover { background: var(--mist-2); }
.top .btab[aria-current="page"] { background: #0433ff; color: #fff; }
.btab-ic { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.btab-ic i { display: block; width: 4px; background: #0433ff; }
.btab-ic i:nth-child(1) { height: 14px; } .btab-ic i:nth-child(2) { height: 9px; } .btab-ic i:nth-child(3) { height: 12px; }
.btab[aria-current="page"] .btab-ic i { background: #fff; }
