/* =========================================================================
   Marker: the Mockstack design system.

   One red for the thing that matters, ink for everything else. Light first,
   with a designed dark mode. Rules and token meanings live in CLAUDE.md.
   Every page in the rebuild loads this file first; page and editor styles
   build on these tokens and never hard code a hex.
   ========================================================================= */

/* ---- Tokens: light ---------------------------------------------------- */
:root {
  color-scheme: light;

  --paper: #F6F6F3;
  --surface: #FFFFFF;
  --raised: #F0F0EC;
  --canvas: #ECECE8;
  --line: #E3E3DE;
  --control-border: #D5D5CF;
  --field-border: #8A8A84;
  --ink: #141414;
  --ink-2: #3D3D3A;
  --muted: #5E5E5A;
  --marker: #D63A12;
  --marker-hover: #A82C0C;
  --marker-tint: #FBE3DA;
  --on-marker: #FFFFFF;
  --highlight: #FFE14D;
  --selection: #2F6FED;
  --success: #1F7A45;
  --warning: #9A6200;
  --danger: #A11E1E;
  --danger-border: #E8C4C4;
  --disabled-bg: #ECECE8;
  --disabled-ink: #8F8F89;

  /* Text color for small red text on paper or marker-tint (CLAUDE.md). */
  --marker-text: var(--marker-hover);

  --toast-bg: #141414;
  --toast-ink: #FFFFFF;
  --toast-button: #2C2C2A;

  --shadow-raised: 0 1px 2px rgba(20, 20, 20, .08);
  --shadow-popover: 0 4px 16px rgba(20, 20, 20, .10);
  --shadow-dialog: 0 4px 16px rgba(20, 20, 20, .10), 0 24px 48px rgba(20, 20, 20, .12);
  --shadow-stage: 0 1px 2px rgba(20, 20, 20, .08), 0 18px 40px rgba(120, 40, 10, .18);
  --shadow-toast: 0 8px 24px rgba(0, 0, 0, .18);

  --font-head: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mark: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --r-chip: 6px;
  --r-control: 10px;
  --r-card: 14px;
  --r-stage: 18px;
  --r-pill: 999px;

  --page-max: 1680px;
  --gutter: 32px;
}

/* ---- Tokens: dark ----------------------------------------------------- */
/* Set twice: once for the system preference (unless the page forces light),
   once for a page that forces dark. Finished artwork never reads these. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #111111;
    --surface: #1A1A19;
    --raised: #232322;
    --canvas: #0A0A0A;
    --line: #2C2C2A;
    --control-border: #3A3A38;
    --field-border: #6E6E69;
    --ink: #F3F3EF;
    --ink-2: #C9C9C3;
    --muted: #A3A39D;
    --marker: #FF6A3D;
    --marker-hover: #FF8A63;
    --marker-tint: #2A1810;
    --on-marker: #141414;
    --marker-text: var(--marker);
    --success: #7FD1A1;
    --warning: #E0B050;
    --danger: #FF8A8A;
    --danger-border: #5A2626;
    --disabled-bg: #232322;
    --disabled-ink: #6E6E69;
    --toast-bg: #F3F3EF;
    --toast-ink: #141414;
    --toast-button: #D5D5CF;
    --shadow-raised: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-popover: 0 4px 16px rgba(0, 0, 0, .5);
    --shadow-dialog: 0 4px 16px rgba(0, 0, 0, .45), 0 24px 48px rgba(0, 0, 0, .5);
    --shadow-stage: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .55);
    --shadow-toast: 0 8px 24px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111111;
  --surface: #1A1A19;
  --raised: #232322;
  --canvas: #0A0A0A;
  --line: #2C2C2A;
  --control-border: #3A3A38;
  --field-border: #6E6E69;
  --ink: #F3F3EF;
  --ink-2: #C9C9C3;
  --muted: #A3A39D;
  --marker: #FF6A3D;
  --marker-hover: #FF8A63;
  --marker-tint: #2A1810;
  --on-marker: #141414;
  --marker-text: var(--marker);
  --success: #7FD1A1;
  --warning: #E0B050;
  --danger: #FF8A8A;
  --danger-border: #5A2626;
  --disabled-bg: #232322;
  --disabled-ink: #6E6E69;
  --toast-bg: #F3F3EF;
  --toast-ink: #141414;
  --toast-button: #D5D5CF;
  --shadow-raised: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-popover: 0 4px 16px rgba(0, 0, 0, .5);
  --shadow-dialog: 0 4px 16px rgba(0, 0, 0, .45), 0 24px 48px rgba(0, 0, 0, .5);
  --shadow-stage: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .55);
  --shadow-toast: 0 8px 24px rgba(0, 0, 0, .5);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/25px var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.on-paper { background: var(--paper); }

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--selection);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s4); top: -60px; z-index: 100;
  background: var(--ink); color: var(--surface);
  padding: var(--s2) var(--s4); border-radius: var(--r-control);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s4); }

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Type ------------------------------------------------------------- */
.display-xl, .display, .h1, .h2, .h3,
h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.display-xl { font-size: 76px; line-height: 74px; font-weight: 800; letter-spacing: -.035em; }
.display    { font-size: 56px; line-height: 56px; font-weight: 800; letter-spacing: -.035em; }
h1, .h1     { font-size: 44px; line-height: 1.0;  font-weight: 800; letter-spacing: -.03em; }
h2, .h2     { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; }
h3, .h3     { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: -.015em; }

.lead   { font-size: 19px; line-height: 30px; color: var(--ink-2); }
.body   { font-size: 16px; line-height: 25px; }
.helper { font-size: 13px; line-height: 18px; color: var(--muted); }
p { margin: 0; text-wrap: pretty; }

.highlight {
  background: var(--highlight);
  color: #141414;
  padding: 0 8px;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  /* Display type sets lines tighter than the highlight box, so each
     highlighted line would paint over the descenders of the line above.
     Keep the yellow behind every line's text. */
  position: relative;
  z-index: -1;
}
:has(> .highlight) { isolation: isolate; }

code, pre, kbd { font-family: var(--font-code); }

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .display-xl { font-size: 48px; line-height: 48px; }
  .display    { font-size: 40px; line-height: 42px; }
  h1, .h1     { font-size: 36px; }
}

/* ---- Wordmark --------------------------------------------------------- */
/* Live text, never an image. The period is marker red. */
.brand {
  font-family: var(--font-mark);
  font-weight: 800;
  letter-spacing: -.045em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand .dot { color: var(--marker); }

/* ---- Icons ------------------------------------------------------------ */
/* Phosphor Regular from icons.svg. They take the surrounding text color. */
.icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font: 600 14px/20px var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn-sm { height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 22px; border-radius: 12px; font-size: 16px; }

.btn-primary { background: var(--marker); color: var(--on-marker); }
.btn-primary:hover { background: var(--marker-hover); }

.btn-secondary { background: var(--ink); color: var(--surface); }
.btn-secondary:hover { background: var(--ink-2); }

.btn-outline { background: var(--surface); border-color: var(--control-border); }
.btn-outline:hover { border-color: var(--ink); }

.btn-ghost { padding: 0 14px; }
.btn-ghost:hover { background: var(--raised); }

.btn-danger { background: var(--surface); border-color: var(--danger-border); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }

.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--disabled-bg);
  border-color: transparent;
  color: var(--disabled-ink);
  cursor: not-allowed;
}

.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

/* Handoff chips ("Put in a Scene") are outline pills. A filled ink pill
   means a filter is on. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--control-border);
  background: var(--surface);
  color: var(--ink);
  font: 500 13px/18px var(--font-body);
  text-decoration: none;
  cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-chip);
  background: var(--marker-tint);
  color: var(--marker-text);
  font: 600 12px/16px var(--font-body);
}
.tag-quiet { background: var(--raised); color: var(--muted); font-weight: 500; }

/* ---- Fields ----------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; line-height: 18px; color: var(--muted); }

.input, .select, .textarea, .input-group {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-control);
  border: 1px solid var(--field-border);
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/20px var(--font-body);
}
.textarea { padding: 10px 12px; min-height: 88px; resize: vertical; }
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%235E5E5A'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
.input-group { display: flex; align-items: center; gap: var(--s2); }
.input-group input {
  flex: 1; min-width: 0; height: 42px;
  border: 0; outline: 0; background: transparent; padding: 0;
  font: 400 15px/20px var(--font-body);
}
.input-group .unit, .input-group .icon { color: var(--muted); font-size: 14px; }
.input-group:focus-within { outline: 2px solid var(--selection); outline-offset: 2px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline-offset: 2px; }

.field.is-error .input, .field.is-error .input-group { border: 1.5px solid var(--danger); }
.field-error { font-size: 13px; line-height: 18px; color: var(--danger); }

input[type="checkbox"], input[type="radio"] { accent-color: var(--marker); }
/* Sliders are ink: red stays for the main action and the highlighter. */
input[type="range"] { accent-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; }
input[type="range"] { width: 100%; }

.check {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; font-size: 14px; cursor: pointer;
}

/* Switch: <button class="switch" role="switch" aria-checked="true"> */
.switch {
  width: 44px; height: 26px;
  padding: 3px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--field-border);
  display: inline-flex;
  justify-content: flex-start;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform .15s ease;
}
.switch[aria-checked="true"] { background: var(--marker); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* Segmented control: raised track, white selected segment. */
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-control);
  background: var(--raised);
}
.segmented button {
  flex: 1;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 500 13px/18px var(--font-body);
  cursor: pointer;
}
.segmented button[aria-pressed="true"], .segmented button[aria-checked="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

/* Swatches for annotation colors and backgrounds. */
.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  padding: 0;
  cursor: pointer;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
/* A swatch close to the panel's own color (white or yellow on light, ink
   on dark) gets a field border, 3:1 against the panel (image-core.js
   marks them with data-edge). */
.swatch[data-edge~="l"] { border-color: var(--field-border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .swatch[data-edge~="l"] { border-color: color-mix(in srgb, var(--ink) 20%, transparent); }
  :root:not([data-theme="light"]) .swatch[data-edge~="d"] { border-color: var(--field-border); }
}
:root[data-theme="dark"] .swatch[data-edge~="l"] { border-color: color-mix(in srgb, var(--ink) 20%, transparent); }
:root[data-theme="dark"] .swatch[data-edge~="d"] { border-color: var(--field-border); }

/* ---- Surfaces --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.panel {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-raised);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.panel-title { font: 700 17px/22px var(--font-head); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.stage {
  border-radius: var(--r-stage);
  box-shadow: var(--shadow-stage);
  overflow: hidden;
}

/* ---- Empty state ------------------------------------------------------ */
.empty {
  border: 1.5px dashed var(--control-border);
  border-radius: var(--r-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.empty-title { font: 700 20px/26px var(--font-head); letter-spacing: -.02em; }
.empty-text { font-size: 14px; line-height: 21px; color: var(--muted); max-width: 340px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }

/* ---- Dialogs ---------------------------------------------------------- */
dialog.dialog {
  border: 0;
  padding: 20px;
  width: min(440px, calc(100vw - 32px));
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-dialog);
}
dialog.dialog::backdrop { background: rgba(10, 10, 10, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.dialog-title { font: 700 20px/26px var(--font-head); letter-spacing: -.02em; margin: 0; }

/* ---- File drops on landing pages (pages.js) --------------------------- */
/* The same dashed marker frame the editors show under dragged files. */
.own-drop {
  position: fixed;
  inset: 12px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--marker);
  border-radius: var(--r-stage);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  pointer-events: none;
}
.own-drop[hidden] { display: none; }
.own-drop p {
  font: 700 20px/26px var(--font-head);
  letter-spacing: -.02em;
  color: var(--ink);
  background: var(--surface);
  padding: 14px 20px;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-popover);
}
[data-own-drop].is-drop { border-color: var(--marker) !important; color: var(--ink) !important; }

/* ---- Toasts ----------------------------------------------------------- */
/* Ink with white text, bottom center, Undo where it applies. */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 14px;
  line-height: 20px;
  box-shadow: var(--shadow-toast);
  animation: toast-in .18s ease-out;
}
.toast .icon { color: var(--highlight); }
.toast button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--toast-button);
  color: var(--toast-ink);
  font: 600 13px/18px var(--font-body);
  cursor: pointer;
}
.toast.is-error { background: var(--surface); color: var(--danger); border: 1px solid var(--danger-border); }
.toast.is-error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Site nav --------------------------------------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 84px;
}
.site-nav .brand { font-size: 26px; line-height: 1; padding: 8px 0; }
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav-links a { text-decoration: none; }
.site-nav-links a:not(.btn):hover { color: var(--marker-text); }
.site-nav-links a[aria-current="page"]:not(.btn) { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.site-nav-links .btn[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.site-nav-links .btn { height: 40px; padding: 0 16px; }
.site-nav-toggle { display: none; }
.site-nav-end { display: flex; align-items: center; gap: var(--s3); }
.theme-toggle { color: var(--muted); }
.theme-toggle:hover { color: var(--ink); }

@media (max-width: 760px) {
  .site-nav { min-height: 64px; position: relative; }
  .site-nav .brand { font-size: 24px; }
  .site-nav-toggle { display: inline-flex; }
  .site-nav-end { gap: var(--s1); margin-right: -10px; }
  .site-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s2) var(--gutter) var(--s4);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-popover);
  }
  .site-nav.is-open .site-nav-links { display: flex; }
  .site-nav-links a:not(.btn) { min-height: 48px; display: flex; align-items: center; font-size: 17px; }
  .site-nav-links .btn { margin-top: var(--s2); height: 44px; }
}

/* ---- Site footer ------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  margin-top: var(--s8);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}
.site-footer-about { display: flex; flex-direction: column; gap: 10px; max-width: 320px; }
.site-footer .brand { font-size: 24px; line-height: 1; display: inline-flex; align-items: baseline; }
.site-footer-blurb { font-size: 14px; line-height: 21px; color: var(--muted); }
.site-footer-cols { display: flex; flex-wrap: wrap; gap: 64px; font-size: 14px; }
.site-footer-col { display: flex; flex-direction: column; gap: 10px; }
/* Column labels are plain text, so each page's heading outline holds only its own topics. */
.site-footer-head { font: 600 14px/20px var(--font-body); letter-spacing: 0; color: var(--ink); }
.site-footer-col a { color: var(--muted); text-decoration: none; }
.site-footer-col a:hover { color: var(--ink); text-decoration: underline; }
.site-footer-legal { margin-top: 40px; font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
  .site-footer-cols { gap: 32px 48px; }
  /* 44 px touch targets on phones; desktop keeps the tight list. */
  .site-footer-col { gap: 0; }
  .site-footer-head { margin-bottom: 4px; }
  .site-footer-col a { display: flex; align-items: center; min-height: 44px; }
}

/* ---- The door --------------------------------------------------------- */
/* The footer period is a real button that looks like a period. */
.door {
  font: inherit;
  color: var(--marker);
  background: transparent;
  border: 0;
  padding: 0 2px;
  margin: 0 -2px;
  line-height: 1;
  cursor: text;
  position: relative;
  border-radius: 4px;
}
.door:hover { cursor: pointer; text-shadow: 0 0 10px rgba(255, 106, 61, .7); }
.door-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: var(--r-chip);
  background: #1A1A19;
  color: #FFB59A;
  font: 600 12px/16px var(--font-body);
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.door.is-open:hover .door-label,
.door.is-open:focus-visible .door-label { opacity: 1; }

/* The door dialog is always Marker dark, whatever the page theme. */
dialog.door-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: #F3F3EF;
  overflow: visible;
  max-width: calc(100vw - 32px);
}
dialog.door-dialog::backdrop { background: rgba(10, 10, 10, .72); }
.door-panel {
  width: 380px;
  max-width: 100%;
  min-height: 560px;
  margin: 0 auto;
  background: #1A1A19;
  border-radius: 190px 190px 14px 14px;
  box-shadow: 0 0 0 10px #232322, 0 40px 80px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 110px 40px 28px;
}
.door-slot {
  width: 260px; max-width: 100%;
  height: 76px;
  border-radius: 8px;
  background: #0A0A0A;
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}
.door-eye {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #F3F3EF;
  box-shadow: inset -4px -3px 0 #141414;
  transition: transform .2s ease;
}
.door-slot.is-looking .door-eye { transform: translateX(-4px); }
.door-panel h2 { color: #F3F3EF; font-size: 34px; line-height: 38px; font-weight: 800; letter-spacing: -.04em; text-align: center; }
.door-sub { margin-top: -8px; font-size: 15px; line-height: 22px; color: #A3A39D; text-align: center; }
.door-form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.door-form label { font-size: 13px; color: #A3A39D; }
.door-form input {
  height: 52px;
  padding: 0 14px;
  border-radius: var(--r-control);
  border: 1.5px solid #6E6E69;
  background: #111111;
  color: #F3F3EF;
  font: 500 18px var(--font-body);
  letter-spacing: .04em;
}
.door-form input:focus { border-color: #FF6A3D; outline: none; }
.door-form .door-knock {
  height: 52px;
  border: 0;
  border-radius: var(--r-control);
  background: #FF6A3D;
  color: #141414;
  font: 700 16px var(--font-body);
  cursor: pointer;
}
.door-form .door-knock:hover { background: #FF8A63; }
.door-msg { min-height: 20px; font-size: 14px; color: #FFB59A; text-align: center; }
.door-never {
  margin-top: auto;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #A3A39D;
  font: 500 14px var(--font-body);
  cursor: pointer;
}
.door-never:hover { color: #F3F3EF; }
.door-panel.is-wrong { animation: door-shake .35s ease; }
@keyframes door-shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
dialog.door-dialog :focus-visible { outline-color: #FF6A3D; }

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