/* Factory 1: the main site's tokens (design system §2) in its always-dark
   bands, the base, and the door, 404 and farewell. The lab's own rules are in
   lab.css, linked after it (DIGIF-DOOR-CSS-SPLIT-1118). */

:root {
  color-scheme: dark;

  /* Colour */
  --ground: #0E1013;
  --surface: #1A1715;
  --line: #3A302A;          /* decorative hairlines */
  --line-strong: #8C7B6E;   /* control boundaries: 4.4:1 on --surface */
  --fg: #F4F1EA;
  --fg-muted: #CDC9C0;
  --fg-subtle: #A39E95;     /* 6.7:1 on --surface */
  --accent: #D89A93;        /* links and focus ring, 7.6:1 on --surface */
  --copper: #D9935C;        /* labels and numerals, 7.0:1 on --surface */
  --codex: #6FBCE6;         /* a Codex floor in the tower: the copper's contrast on the stage's black, and on --surface */
  --flare-glow: rgb(217 147 92 / 0.35); /* a flaring row's --copper glow */
  --ember: #E39A62;         /* the primary action; --ground on it is 8.2:1 */
  --ember-hover: #EDAA74;
  --alert: #F2A49A;         /* 9.0:1 on --surface */

  /* Typography */
  --font-serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --size-00: 0.6875rem;
  --size-01: 0.75rem;
  --size-02: 0.875rem;
  --size-03: 1rem;
  --size-04: 1.125rem;
  --size-05: 1.35rem;
  --size-06: 1.62rem;
  --size-07: 1.94rem;
  --size-08: 2.33rem;
  --size-09: 2.8rem;
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;
  --tracking-tight: -0.01em;
  --tracking-mono: 0.02em;
  --tracking-wide: 0.06em;

  /* Spacing (4px base) */
  --space-0: 4px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Motion */
  --duration-micro: 160ms;
  --duration-content: 320ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --idle-period: 4.8s;

  --opacity-busy: 0.72;
  --z-top: 100;

  /* Ember light, as in the main site's landing hero */
  --ember-glow: rgb(255 170 96 / 0.2);
  --ember-glow-soft: rgb(232 112 44 / 0.07);

  /* A line's light, in the Claude line's copper (a Codex line's thing takes
     the Codex light). A see-through colour is channels: rgb(var(--ring) / 0.95). */
  --bulb: #FFC68E;                 /* a light at work */
  --bulb-glow: 255 170 96;         /* round it, and round an ember drifting off the floor */
  --bulb-idle: #9A7356;
  --bulb-off: #8A847D;             /* a stopped light's ring, round its dark middle */
  --bulb-off-core: #1C1A18;
  --ring: 255 180 102;             /* the ring of light round a robot at work */
  --ring-edge: 255 124 44;
  --ring-pool: 255 150 70;
  --station: 255 196 132;          /* the glow at its station, and the platform's beam */
  --station-edge: 255 150 76;
  --robot-spark: #FFEBD0;          /* a spark off its station */
  --robot-spark-glow: 255 186 112;
  --doze: #EDB98C;                 /* the "Z Z" over an idle robot */
  --lid: #080605;                  /* its eyelids, as it blinks */
  --cube: #FFE3C0;                 /* a block crossing an arc */
  --cube-glow: 255 182 110;
  --cube-glow-wide: 255 140 60;
  --arc: #FFBA7A;                  /* the arc, aglow while blocks cross it */
  --piece: 255 236 212;            /* a piece on the conveyor */
  --piece-edge: 255 178 104;
  --shimmer: 255 222 170;          /* the light at the conveyor's end */
  --shimmer-edge: 255 160 80;
  --floor-spark: #FFD9AE;          /* an ember drifting off the floor */
}

/* ==== Base ==== */

/* Font subsets, serif axis 400-700 (DIGIF-FONT-WEIGHT-1113). Per face, the
   preloaded core file has all the door draws; the extended one loads only for
   its glyphs (DIGIF-FONT-CORE-SPLIT-1118). The mono's semibold is synthesized. */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-core.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4-core.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-ext.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0300-036F, U+2070-209F, U+20A0-20AB, U+20AD-20CF, U+2100-214F, U+2200-22FF;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-core.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0300-036F, U+2070-209F, U+20A0-20AB, U+20AD-20CF, U+2100-214F, U+2200-22FF;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: var(--size-03);
  font-weight: var(--weight-regular);
  line-height: var(--lh-normal);
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@supports (min-block-size: 100svh) {
  body { min-block-size: 100svh; }
}

main { flex: 1; }

img { display: block; max-inline-size: 100%; block-size: auto; }

/* The tower's h3s, "Factory now" and the floors' title, keep the look they had as h2s
   (DIGIF-TOWER-HEADINGS-1117); :where() adds no weight, so their classes still win. */
h1, h2, :where(h3.now__title, h3.crews__title) {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  line-height: var(--lh-snug);
  text-wrap: pretty;
}

p { margin: 0 0 var(--space-3); }

a { color: var(--accent); }

::selection { background: #3A2A20; color: var(--fg); }

:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: fixed;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  z-index: var(--z-top);
  padding: var(--space-2) var(--space-3);
  background: var(--ground);
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--size-02);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-3)));
}
.skip-link:focus-visible { transform: none; }

.container {
  inline-size: 100%;
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 48em) {
  .container { padding-inline: var(--space-5); }
}

.u-caps {
  font-family: var(--font-mono);
  font-size: var(--size-01);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* Link (§7.3): no underline at rest, a 1px rule drawn on hover and focus. */
.link {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 calc(100% - 1px);
  background-repeat: no-repeat;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }

/* Button (§7.4), in ember: the one action on each page. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-block-size: 48px;
  min-inline-size: 44px;
  padding: var(--space-2) var(--space-4);
  background: var(--ember);
  color: var(--ground);
  border: 1px solid var(--ember);
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: var(--size-03);
  font-weight: var(--weight-medium);
  line-height: var(--lh-snug);
  text-decoration: none;
  cursor: pointer;
}
/* `hidden` wins over the inline-flex above, which out-ranks the UA's [hidden] (DIGIF-HIDDEN-BUTTON-1117). */
.button[hidden] { display: none; }
.button:hover { background: var(--ember-hover); border-color: var(--ember-hover); }
.button:active { transform: translateY(1px); }
.button[aria-disabled="true"] { opacity: var(--opacity-busy); cursor: progress; }

@media (prefers-reduced-motion: no-preference) {
  .link { transition: background-size var(--duration-micro) var(--ease-out); }
  .button {
    transition: background-color var(--duration-micro) var(--ease-out),
                border-color var(--duration-micro) var(--ease-out),
                transform var(--duration-micro) var(--ease-out);
  }
}

/* ==== Masthead and colophon ==== */

.masthead { border-block-end: 1px solid var(--line); }
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-block-size: 64px;
}
.masthead__label { margin: 0; color: var(--copper); }

/* Wordmark (§11), as on wizuslabs.com in its dark theme. */
.wordmark {
  display: inline-block;
  font-size: var(--size-04);
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark__first {
  color: var(--fg);
  border-block-end: 1.5px solid var(--accent);
  padding-block-end: 2px;
}
.wordmark__second { color: var(--accent); }

.colophon {
  border-block-start: 1px solid var(--line);
  padding-block: var(--space-4);
}
.colophon__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}
.colophon__inner p { margin: 0; }
.colophon__mark { color: var(--fg-subtle); }
.colophon__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
}
/* 24px floor for text links (§9.9, WCAG 2.5.8). */
.colophon__links .link {
  display: inline-flex;
  align-items: center;
  min-block-size: 24px;
}
.colophon__links [hidden] { display: none; }

/* ==== The guide: framed art over ember light, idling ==== */

/* guide.webp is 640x960 on a transparent ground, its ember floor included. */
.guide {
  position: relative;
  isolation: isolate;
  margin: 0;
  inline-size: min(46vw, 180px);
}
.guide__img {
  inline-size: 100%;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}
/* Ember light behind the guide's chest. */
.guide::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -25% 10%;
  background: radial-gradient(closest-side, var(--ember-glow), var(--ember-glow-soft) 55%, transparent);
}
.guide--small { inline-size: 96px; }

/* Idle: the guide sways from its feet and its light breathes; still under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .guide__img {
    transform-origin: 50% 90%;
    animation: guide-sway var(--idle-period) ease-in-out infinite;
  }
  .guide::before { animation: guide-breathe var(--idle-period) ease-in-out infinite; }
}
@keyframes guide-sway {
  25% { rotate: -1.2deg; scale: 1.01; }
  75% { rotate: 1.2deg; scale: 1.01; }
}
@keyframes guide-breathe { 50% { opacity: 0.6; } }

/* ==== Speech bubble: what the guide says ==== */

.bubble {
  position: relative;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
@media (min-width: 30em) {
  .bubble { padding: var(--space-4); }
}
/* The tail points up at the guide on phones and left from 64em. */
.bubble::before {
  content: "";
  position: absolute;
  inset-block-start: -9px;
  inset-inline-start: calc(50% - 8px);
  inline-size: 16px;
  block-size: 16px;
  background: var(--surface);
  border-block-start: 1px solid var(--line);
  border-inline-start: 1px solid var(--line);
  rotate: 45deg;
}
.bubble__eyebrow { margin-block-end: var(--space-2); color: var(--copper); }
.bubble__title {
  margin-block-end: var(--space-3);
  font-size: var(--size-07);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
.bubble p:last-child { margin-block-end: 0; }
.bubble__text { color: var(--fg-muted); }

/* The tour, one line per step, numbered 01-03 in copper mono. */
.steps {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-inline-start: 2.75em;
  list-style: decimal-leading-zero;
  color: var(--fg-muted);
}
.steps li { padding-inline-start: var(--space-0); }
.steps li::marker {
  color: var(--copper);
  font-family: var(--font-mono);
  font-size: var(--size-02);
  letter-spacing: var(--tracking-mono);
}
.steps strong { color: var(--fg); font-weight: var(--weight-medium); }

/* ==== Front door ==== */

/* Two bubbles, then the ticket. Phones put the greeting beside the guide, so
   the ticket comes up sooner; from 64em the guide stands left of it all. */
.door { padding-block: var(--space-4) var(--space-6); }
.door__inner {
  display: grid;
  grid-template-columns: clamp(88px, 30%, 128px) minmax(0, 1fr);
  grid-template-areas:
    "guide hello"
    "tour tour"
    "ticket ticket";
  align-items: center;
  gap: var(--space-2);
  max-inline-size: 40rem;
}
.door .guide { grid-area: guide; inline-size: 100%; }
.door__hello { grid-area: hello; }
.door__tour { grid-area: tour; }
.door__ticket { grid-area: ticket; }
.door .steps { gap: var(--space-1); }
/* 21.6px on a 320px phone, 25.9px from 405px. */
.door .bubble__title { font-size: clamp(var(--size-05), 6.4vw, var(--size-06)); }
.door__hello .bubble__title { margin-block-end: 0; }
/* One tail, pointing left at the guide: from the greeting on phones, from the
   tour (level with the guide's mouth) from 64em. */
.door__hello::before,
.door__tour::before {
  inset-block-start: calc(50% - 8px);
  inset-inline-start: -9px;
  rotate: -45deg;
}
.door__tour::before { display: none; }

@media (min-width: 30em) {
  .door__inner { grid-template-columns: 136px minmax(0, 1fr); }
  .door .bubble__title { font-size: var(--size-07); }
}
@media (min-width: 48em) {
  .door { padding-block: var(--space-7) var(--space-8); }
  .door__inner { grid-template-columns: 180px minmax(0, 1fr); gap: var(--space-3) var(--space-4); }
  .door .steps { gap: var(--space-2); }
}
@media (min-width: 64em) {
  .door__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas:
      "guide hello"
      "guide tour"
      "guide ticket";
    column-gap: var(--space-7);
    max-inline-size: 1200px;
  }
  .door .guide { inline-size: min(100%, 340px); justify-self: end; }
  .door__hello,
  .door__tour,
  .door__ticket { max-inline-size: 36rem; }
  .door .bubble__title { font-size: var(--size-08); }
  .door__hello::before { display: none; }
  .door__tour::before { display: block; }
}

/* The ticket: a stub with a perforation, then the form. */
.ticket {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
@media (min-width: 30em) {
  .ticket { padding: var(--space-4); }
}
.ticket__stub {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin: 0 0 var(--space-3);
  padding-block-end: var(--space-2);
  border-block-end: 1px dashed var(--line-strong);
  color: var(--copper);
}
/* The owner's way in: Google's own dark-theme "Sign in with Google" button,
   so it reads as Google's, outlined beside the ember action. */
.ticket__owner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
}
.ticket__owner[hidden] { display: none; }
.google-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-block-size: 44px;
  padding: 0 12px;
  background: #131314;
  color: #E3E3E3;
  border: 1px solid #8E918F;
  border-radius: var(--radius-sm);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
  text-decoration: none;
  white-space: nowrap;
}
/* Google's state layers: its text colour at 8% on hover, 12% pressed. */
.google-button:hover { background: #242425; }
.google-button:active { background: #2C2C2D; }
.google-button__mark { flex: none; inline-size: 20px; block-size: 20px; }
.ticket__owner-note { margin: 0; color: var(--fg-subtle); font-size: var(--size-02); }
/* "or enter a ticket code", between two hairlines. */
.ticket__or {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  color: var(--fg-subtle);
  font-size: var(--size-02);
}
.ticket__or::before,
.ticket__or::after {
  content: "";
  flex: 1;
  border-block-start: 1px solid var(--line);
}

.ticket__label {
  display: block;
  margin-block-end: var(--space-1);
  font-size: var(--size-04);
  font-weight: var(--weight-medium);
}
/* One feedback line under the label: the hint, or whatever replaces it. */
.ticket__hint,
.ticket__status,
.ticket__back,
.ticket__fallback {
  margin: 0 0 var(--space-2);
  font-size: var(--size-02);
}
.ticket__hint { color: var(--fg-subtle); }
.ticket__status { color: var(--fg-muted); }
.ticket__status:empty { margin: 0; }
.ticket__status[data-tone="error"],
.ticket__fallback { color: var(--alert); }
/* No-JS fallbacks: a failed plain post lands on /?error=…#<id>. */
.ticket__fallback { display: none; scroll-margin-block-start: 10rem; }
.ticket__fallback:target:not([data-dismissed]) { display: block; }
.ticket__status:not(:empty) ~ .ticket__hint,
.ticket__fallback:target:not([data-dismissed]) ~ .ticket__hint { display: none; }

.ticket__row {
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 30em) {
  .ticket__row { grid-template-columns: minmax(0, 1fr) auto; }
}
.ticket__input {
  inline-size: 100%;
  min-block-size: 48px;
  margin: 0;
  padding: 0 var(--space-3);
  background: var(--ground);
  color: var(--fg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--size-04); /* 18px: no zoom-on-focus on iOS */
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticket__input:focus-visible { border-color: var(--ember); outline-offset: 2px; }
.ticket__input[aria-invalid="true"] { border-color: var(--alert); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* The door at night (DIGIF-CINEMA-DOOR-1120m): a beam on the guide, its ember
   pool, drifting embers; gradients only. Text keeps its opaque bubbles. */
.door { --x: 20%; --y: 160px; --r: 150px 170px; position: relative; isolation: isolate; overflow: clip; }
.door::before,
.door::after,
.door__ticket::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.door::before {
  inset: 0;
  background:
    radial-gradient(var(--r) at var(--x) var(--y), rgb(var(--ring-pool) / 0.2), transparent),
    conic-gradient(from 166deg at var(--x) -160px, transparent, rgb(var(--station) / 0.06) 9deg 19deg, transparent 28deg),
    radial-gradient(70% 45% at 50% 0, rgb(111 188 230 / 0.06), transparent);
}
.door::after {
  inset: 0 0 -240px;
  background:
    radial-gradient(rgb(var(--shimmer) / 0.9) 1px, transparent 2px) 0 0 / 263px 240px,
    radial-gradient(rgb(var(--shimmer) / 0.7) 1px, transparent 2px) 90px 70px / 211px 240px,
    radial-gradient(rgb(var(--bulb-glow) / 0.8) 1px, transparent 2px) 40px 150px / 173px 240px,
    radial-gradient(rgb(var(--bulb-glow) / 0.6) 0.6px, transparent 1.4px) 120px 30px / 131px 120px,
    radial-gradient(rgb(var(--shimmer) / 0.5) 0.6px, transparent 1.4px) 10px 200px / 307px 240px;
  opacity: 0.55;
}
.door .bubble,
.door .ticket { box-shadow: inset 0 1px rgb(255 255 255 / 0.04), 0 32px 64px -32px #000; }
.door .bubble__eyebrow { display: flex; align-items: center; gap: var(--space-2); }
.door .bubble__eyebrow::before { content: ""; inline-size: var(--space-4); border-block-start: 1px solid; }
@media (min-width: 64em) {
  .door { --x: 30%; --y: 52%; --r: 560px 300px; }
  .door .bubble__title { font-size: var(--size-09); }
}
/* The ticket glows in hand, and is stamped once accepted. */
.door__ticket { position: relative; background: linear-gradient(rgb(var(--ring-pool) / 0.05), transparent 45%) var(--surface); }
.door__ticket::after {
  z-index: 0;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgb(var(--ring-edge) / 0.4), 0 0 56px -12px rgb(var(--ring) / 0.4);
  opacity: 0;
}
.door .button { box-shadow: 0 12px 32px -14px rgb(var(--ring-edge) / 0.8); }
.door .button:active { scale: 0.97; }
.ticket__punch {
  position: absolute;
  inset: var(--space-6) var(--space-4) auto auto;
  padding: 0 var(--space-1);
  border: 2px solid;
  border-radius: var(--radius-sm);
  color: var(--ember);
  background: var(--surface);
  rotate: -8deg;
  opacity: 0;
}
.door__ticket:focus-within::after,
.door--admitted .door__ticket::after,
.door--admitted .ticket__punch { opacity: 1; }

/* The establishing shot: the light comes up, the guide steps in, then speaks.
   The guide, the largest paint (LCP), only slides: no fade, no rescale. On a
   phone the light scrolls slower than the page. */
@media (prefers-reduced-motion: no-preference) {
  .door::before { animation: door-light 1.4s var(--ease-out) both; }
  .door::after { animation: door-embers 36s linear infinite; }
  .door .guide { animation: door-arrive 1.1s var(--ease-out) both; }
  .door__hello,
  .door__tour,
  .door__ticket { animation: rise 0.7s var(--ease-out) 0.2s both; }
  .door__tour { animation-delay: 0.35s; }
  .door__ticket { animation-delay: 0.5s; }
  .door__ticket::after { transition: opacity var(--duration-content); }
  .door .button { transition-property: background-color, border-color, transform, scale; }
  .door--admitted .guide::before { animation: door-flare 0.9s var(--ease-out) both; }
  .door--admitted .guide__img { animation: door-hop 0.6s var(--ease-out); }
  .door--admitted .ticket__punch { animation: door-stamp 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (max-width: 63.99em) {
    .door::before { animation: door-depth linear both, door-light 1.4s var(--ease-out) both; animation-timeline: scroll(), auto; }
  }
}
@keyframes door-light { from { opacity: 0; scale: 1.08; } }
@keyframes door-embers { to { translate: 0 -240px; } }
@keyframes door-arrive { from { translate: 0 32px; } }
@keyframes door-depth { to { translate: 0 30vh; } }
@keyframes door-flare { to { opacity: 1; scale: 1.4; } }
@keyframes door-hop { 40% { translate: 0 -14px; } }
@keyframes door-stamp { from { opacity: 0; scale: 1.8; } }

/* ==== The lab's farewell, in the door's parts (the rest is in lab.css) ==== */

.farewell { padding-block: var(--space-6) var(--space-7); }
.farewell__inner {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  max-inline-size: 44rem;
  margin-inline: auto;
}
.farewell .bubble { inline-size: 100%; }
.farewell .bubble__title { font-size: var(--size-06); }
@media (min-width: 40em) {
  .farewell__inner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-5);
  }
  .farewell .bubble::before {
    inset-block-start: calc(50% - 8px);
    inset-inline-start: -9px;
    rotate: -45deg;
  }
}
.farewell__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 0;
}
.farewell__links .link {
  display: inline-flex;
  align-items: center;
  min-block-size: 24px;
}

/* Room under a docked hello (DIGIF-HELLO-COVERS-FOOT-1115): hello-room.js sets
   --hello-room on the root, or a floor view's body, to the bubble's height plus
   a gap, so the last links and a Tab target clear it (WCAG 2.4.11). Instant. */
html { scroll-padding-block-end: var(--hello-room, 0px); }
body { padding-block-end: var(--hello-room, 0px); }

/* ==== 404 ==== */

.lost { padding-block: var(--space-7) var(--space-8); }
.lost__inner { display: grid; justify-items: center; gap: var(--space-4); }
.lost .bubble { max-inline-size: 32rem; }
.lost .bubble__title { font-size: var(--size-06); }
