/* Health AI System Safety: the open call. Version 4, online at healthai.systems/safety/.
   One page, three parts: the call, with a picture of a hospital as a system; the statement and who it is for
   (the in-the-loop question, seven seats with the clinicians' seat first and widest, then one question already
   on the table); the first conversation, with a form that saves a seat. The host is one row beside the form,
   and the host's own story opens under it with one click.
   The look follows nitchakorn.com: the same colours and typefaces (fonts/fonts.css, served with the page). */
:root {
  --ground: #FBF2EE; --paper: #FFFBF8; --tint: #F6E1DF; --grid-dot: #F0DCD9;
  --ink: #4A1826; --ink-2: #7A4452; --ink-3: #8E5A66;
  --line: #E9CFCD; --line-strong: #D0A4AB; --wire: #A8687A;
  --accent: #9C2F4C; --on-accent: #FFFFFF; --ok: #2F6B4A;
  --shadow: rgba(74, 24, 38, 0.16);

  --font-display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-text: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-label: 'IBM Plex Mono', Consolas, 'Courier New', monospace;
  --font-hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --radius: 3px; --radius-btn: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #24121A; --paper: #2E1921; --tint: #3B202B; --grid-dot: #321C25;
    --ink: #F6E7E2; --ink-2: #DABBBD; --ink-3: #BC969D;
    --line: #4A2B35; --line-strong: #74495A; --wire: #B48493;
    --accent: #F2A7B8; --on-accent: #3A0F1C; --ok: #B4DCBB;
    --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0; min-height: 100%;
  display: flex; flex-direction: column;
  background-color: var(--ground);
  background-image: radial-gradient(circle at 1px 1px, var(--grid-dot) 1.1px, transparent 1.6px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-text); font-size: 1.125rem; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
}
[hidden] { display: none !important; }
a { color: inherit; }
::selection { background: var(--tint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 5; padding: 8px 14px; background: var(--ink); color: var(--ground); border-radius: var(--radius-btn); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap {
  width: 100%; max-width: 1240px; margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.label {
  font-family: var(--font-label); font-size: 0.72rem; line-height: 1.35; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- frame ---------- */
.site-head { flex: none; border-bottom: 1px solid var(--line); }
.site-head-in { display: flex; align-items: center; gap: 8px 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 0; text-decoration: none; }
/* a table with five seats; the hollow one is open */
.mark { width: 30px; height: 30px; flex: none; transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.5, 1); }
.mark circle { fill: var(--accent); }
.mark .mark-table { fill: none; stroke: var(--accent); stroke-width: 2.4; }
.mark .mark-open { fill: none; stroke: var(--accent); stroke-width: 1.7; }
.brand:hover .mark { transform: rotate(72deg); }
.brand-name { font-family: var(--font-display); font-size: clamp(1.08rem, 0.9rem + 0.9vw, 1.4rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(2px, 1.2vw, 16px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; text-decoration: none; color: var(--ink-2);
  font-family: var(--font-label); font-size: 0.72rem; line-height: 1.35; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
}
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-join { min-height: 36px; margin-left: 6px; padding: 0 14px; color: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-btn); }
.site-nav .nav-join:hover { background: var(--accent); color: var(--on-accent); }
@media (pointer: coarse) { .site-nav .nav-join { min-height: 44px; } }
main { flex: 1; min-width: 0; }
.site-foot { flex: none; border-top: 1px solid var(--line); }
.site-foot-in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding-block: 12px; font-size: 0.86rem; line-height: 1.4; color: var(--ink-3); }
.foot-end { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 24px; }
.foot-link { display: inline-flex; align-items: center; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.foot-link:hover { color: var(--accent); }
@media (pointer: coarse) { .foot-link { min-height: 44px; } }

/* ---------- shared pieces ---------- */
.btn {
  appearance: none; border: 1px solid var(--accent); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 48px; padding: 0 1.2em;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-text); font-size: 1.08rem; font-weight: 600; line-height: 1.2; text-decoration: none; border-radius: var(--radius-btn);
}
.btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.btn:hover { filter: brightness(1.08); }
.btn:hover svg { transform: translateX(3px); }
.text-link { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.text-link:hover { color: var(--accent); }
.text-link svg { width: 14px; height: 14px; flex: none; margin-left: 6px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seat-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--wire); }
.seat-dot--open { border-style: dashed; }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- 1. the call ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 72px); align-items: center;
  padding-top: clamp(24px, 5.5vh, 80px); padding-bottom: clamp(28px, 6vh, 80px);
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.2vh, 22px); min-width: 0; }
.hero-text p { margin: 0; }
.display {
  margin: 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.018em;
  font-size: clamp(2.25rem, min(1.2rem + 3.3vw, 9.4vh), 3.75rem); line-height: 1.04; text-wrap: balance;
}
.display em { font-style: italic; color: var(--accent); text-decoration: underline wavy var(--line-strong); text-decoration-thickness: 2px; text-underline-offset: 0.17em; }
.lede { max-width: 33em; color: var(--ink-2); font-size: clamp(1.08rem, 0.98rem + 0.4vw, 1.28rem); line-height: 1.5; text-wrap: pretty; }
/* the quick way in: one email and one button, on the first screen */
.quick { display: grid; gap: 8px; width: 100%; max-width: 33em; margin: 4px 0 0; }
.quick-row { display: flex; gap: 8px; }
.quick-row input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px;
  font-family: var(--font-text); font-size: 1.08rem; line-height: 1.35; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
}
.quick-row input::placeholder { color: var(--ink-3); opacity: 1; }
.quick-row input:hover { border-color: var(--wire); }
.quick-row input:focus-visible { outline-offset: 1px; }
.quick-row input[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.quick .btn { flex: none; white-space: nowrap; }
.quick-done { max-width: 33em; margin-top: 4px; padding: 12px 16px; background: var(--tint); border: 1px solid var(--line-strong); border-radius: var(--radius-btn); font-size: 1.06rem; line-height: 1.45; color: var(--ink); }
.quick-done:focus { outline: none; }
.quick-done strong { font-weight: 600; overflow-wrap: anywhere; }
/* once a seat is saved at the top, the optional details come up right under the confirmation */
.quick-more { width: 100%; max-width: 38em; margin-top: 2px; }
.hero--adding { align-items: start; }
.join-moved { margin: 0; padding: 14px 16px; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); }
.join-note { padding: 10px 14px; background: var(--tint); border: 1px solid var(--line-strong); border-radius: var(--radius-btn); font-size: 1rem; line-height: 1.4; }

/* the picture: a hospital as a system, looked at as parts or as connections */
.picture {
  margin: 0; justify-self: end; width: 100%; max-width: 520px; min-width: 0; display: grid; gap: 10px;
  padding: clamp(12px, 1.6vw, 18px); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 18px 40px -28px var(--shadow);
}
.picture-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 36px; }
.picture-head p { margin: 0; }
.seg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  appearance: none; cursor: pointer; min-height: 36px; padding: 0 11px; background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  font-family: var(--font-label); font-size: 0.7rem; line-height: 1.2; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.seg-btn:hover { border-color: var(--accent); }
.seg-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
@media (pointer: coarse) { .seg-btn { min-height: 44px; } }
.picture-svg { display: block; width: 100%; height: auto; overflow: visible; }
/* beside the text, on a short window, the drawing gives up some height so the call still fits on the first screen */
@media (min-width: 901px) { .picture-svg { max-height: max(300px, 52vh); } }
.pic-edge { fill: none; stroke: var(--wire); stroke-width: 2; stroke-linecap: round; transition: stroke 0.3s ease, stroke-width 0.3s ease; }
.pic-flow { fill: none; stroke: var(--accent); stroke-width: 6.5; stroke-linecap: round; stroke-dasharray: 0.1 27.9; transition: opacity 0.3s ease; }
.pic-node { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1.5; }
.pic-node--ai { fill: var(--tint); stroke: var(--accent); }
.pic-node--patient { fill: var(--accent); stroke: var(--accent); }
.pic-glyph { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; }
.pic-spark { fill: var(--accent); }
.pic-label { font-family: var(--font-text); font-size: 14.5px; font-weight: 500; fill: var(--ink); }
.pic-label--in { font-size: 13.5px; font-weight: 600; fill: var(--on-accent); }
.pic-tick circle { fill: var(--ok); stroke: var(--paper); stroke-width: 1.5; }
.pic-tick path { fill: none; stroke: var(--paper); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pic-hand { font-family: var(--font-hand); font-size: 20px; font-weight: 600; fill: var(--accent); }
.pic-hand-arrow { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pic-ticks, .pic-hands { transition: opacity 0.3s ease; }
/* the connections: every line that has an AI agent at one end lights up, and the questions appear */
.picture[data-view="links"] .pic-edge--ai { stroke: var(--accent); stroke-width: 2.4; }
.picture[data-view="links"] .pic-ticks { opacity: 0; }
/* the parts: every node carries a tick, and the lines fade back */
.picture[data-view="parts"] .pic-edge { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 6; }
.picture[data-view="parts"] .pic-flow, .picture[data-view="parts"] .pic-hands { opacity: 0; }
@keyframes flow { to { stroke-dashoffset: -28; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .picture[data-view="links"] .pic-flow { animation: flow 2.2s linear infinite; }
}
.picture-cap { display: grid; gap: 8px; }
.picture-cap p { margin: 0; }
.cap { min-height: 2.84em; font-size: 1rem; line-height: 1.42; color: var(--ink-2); text-wrap: pretty; }
.picture[data-view="links"] .cap--parts, .picture[data-view="parts"] .cap--links { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--font-label); font-size: 0.7rem; line-height: 1.35; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend svg { width: 14px; height: 14px; flex: none; }

/* ---------- the three sections under the call ---------- */
.band { display: grid; gap: clamp(22px, 4vh, 40px); padding-block: clamp(36px, 7.5vh, 84px); border-top: 1px solid var(--line); scroll-margin-top: 8px; }
.band-head { display: grid; gap: 12px; align-content: start; min-width: 0; }
.band-head p { margin: 0; }
.band-title { margin: 0; max-width: 21em; font-family: var(--font-display); font-weight: 500; letter-spacing: -0.012em; font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.6rem); line-height: 1.1; text-wrap: balance; }
.band-lede { max-width: 43em; color: var(--ink-2); font-size: clamp(1.04rem, 0.97rem + 0.3vw, 1.18rem); line-height: 1.52; text-wrap: pretty; }
/* the question the whole call keeps coming back to, and a line that leads to the research idea */
.hook { display: grid; gap: 6px; max-width: 43em; margin-top: 8px; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); }
.hook-ask { font-family: var(--font-display); font-size: clamp(1.4rem, 1.15rem + 0.8vw, 1.8rem); line-height: 1.16; font-weight: 500; letter-spacing: -0.008em; text-wrap: balance; }
.hook-ask em { font-style: italic; color: var(--accent); }
.hook-say { color: var(--ink-2); font-size: 1.06rem; line-height: 1.5; text-wrap: pretty; }
.more { max-width: 43em; color: var(--ink-2); font-size: 1.02rem; line-height: 1.5; }
.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 72px); align-items: start; }
.split--join { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }

/* 2. who it is for: seven seats. The clinicians' seat is first and wide, then two rows of three */
.who { display: grid; gap: clamp(24px, 4.5vh, 40px); scroll-margin-top: 16px; }
.who-row { display: grid; gap: 12px; }
.who-row > p { margin: 0; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 2.6vw, 36px); }
.note { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line-strong); }
.note--open { border-top-style: dashed; }
.note p { margin: 0; }
.note h3 { margin: 0; font-family: var(--font-display); font-size: 1.42rem; line-height: 1.16; font-weight: 500; letter-spacing: -0.006em; text-wrap: balance; }
.note p:not(.label) { font-size: 1.02rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.who-seat { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); }
.who-seat .seat-dot { margin-top: 2px; }
/* the three cards in a row share their rows, so the questions and the words line up even when a name takes two lines */
@supports (grid-template-rows: subgrid) {
  .trio > .note { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 8px; }
}
/* the first seat, the clinicians': as wide as the three under it, with the question in the first column */
.note--lead { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px clamp(22px, 2.6vw, 36px); align-items: start; padding-top: 16px; border-top: 2px solid var(--accent); }
.note--lead .who-seat { grid-column: 1 / -1; color: var(--accent); }
.note--lead .seat-dot { border-color: var(--accent); }
.note--lead h3 { grid-column: 1; font-size: clamp(1.5rem, 1.2rem + 0.95vw, 1.9rem); line-height: 1.1; }
.lead-say { grid-column: 2 / -1; display: grid; gap: 8px; min-width: 0; padding-top: 0.2em; }
.note--lead .lead-say p { max-width: 36em; font-size: 1.1rem; }

/* one question already on the table: a tinted panel, the same table as the one in the form */
.ask {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px clamp(22px, 2.6vw, 36px); align-items: start;
  padding: clamp(18px, 2.4vw, 28px); background: var(--tint); border: 1px solid var(--line-strong); border-radius: 18px; scroll-margin-top: 16px;
}
.ask p { margin: 0; }
.ask-q { display: grid; gap: 8px; min-width: 0; }
.ask-q .label { color: var(--ink-2); }
.ask h3 { margin: 0; font-family: var(--font-display); font-size: 1.42rem; line-height: 1.16; font-weight: 500; letter-spacing: -0.006em; text-wrap: balance; }
.ask-a { grid-column: 2 / -1; display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ask-a p { max-width: 36em; font-size: 1.06rem; line-height: 1.5; text-wrap: pretty; }

/* a line with five stops: where the host has sat (shown inside the story that opens beside the form) */
.path { list-style: none; margin: 0; padding: 0 0 0 30px; display: grid; gap: 16px; }
.path li { position: relative; display: grid; gap: 2px; }
.path li::before { content: ""; position: absolute; left: -30px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--wire); }
.path li:not(:last-child)::after { content: ""; position: absolute; left: -23px; top: 18px; bottom: -18px; border-left: 2px solid var(--wire); }
.path li:nth-last-child(2)::after { border-left-style: dashed; }
.path-what { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.25; font-weight: 500; text-wrap: balance; }
.path .is-next::before { background: var(--accent); border-color: var(--accent); }
.path .is-next .label, .path .is-next .path-what { color: var(--accent); }

/* 3. the first conversation */
.event { display: grid; max-width: 43em; margin-top: 6px; min-width: 0; }
.facts { margin: 0; display: grid; border-bottom: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 5.4em minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { padding-top: 0.36em; }
.facts dd { margin: 0; font-size: 1.04rem; line-height: 1.45; color: var(--ink-2); }
.facts dd time { color: var(--ink); font-weight: 600; }
.host-links { white-space: nowrap; }
.inline-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.inline-link:hover { color: var(--accent); }
/* the host's own story: closed until someone asks for it, one more row under the facts */
.why { border-bottom: 1px solid var(--line); }
.why summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; list-style: none;
  font-family: var(--font-label); font-size: 0.72rem; line-height: 1.35; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2);
}
.why summary::-webkit-details-marker { display: none; }
.why summary:hover { color: var(--accent); }
.why summary svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform 0.2s ease; }
.why[open] summary svg { transform: rotate(45deg); }
.why-body { display: grid; gap: 14px; padding: 6px 0 24px; }
.why-body p { margin: 0; font-size: 1.04rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.why-body .why-lead { font-family: var(--font-display); font-size: 1.34rem; line-height: 1.2; font-weight: 500; letter-spacing: -0.006em; color: var(--ink); text-wrap: balance; }
.why-body .path { margin-top: 8px; }
.join-card { min-width: 0; padding: clamp(16px, 2.4vw, 28px); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 18px 40px -28px var(--shadow); }
.join-form, .join-done { display: grid; gap: 18px; }
.join-form p, .join-done p { margin: 0; }
.join-done:focus { outline: none; }
.join-done strong { font-weight: 600; overflow-wrap: anywhere; }
.join-title { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; font-weight: 500; letter-spacing: -0.008em; text-wrap: balance; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fields--one { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field input, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font-family: var(--font-text); font-size: 1.05rem; line-height: 1.35; color: var(--ink);
  background: var(--ground); border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.field textarea { min-height: 5.4em; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--wire); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field-error { font-size: 0.94rem; line-height: 1.35; font-style: italic; color: var(--accent); }
.opt { font-weight: 400; letter-spacing: 0.04em; text-transform: none; white-space: nowrap; }

/* where do you sit: a table with three seats on each side, and the open seat across the end */
.seats { margin: 0; padding: 0; border: 0; min-width: 0; }
.seats legend { padding: 0; margin-bottom: 15px; }
.table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.table-top {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 2px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background-color: var(--tint);
  background-image: radial-gradient(circle at 1px 1px, var(--line-strong) 0.9px, transparent 1.4px); background-size: 12px 12px;
}
.table-top span { padding: 0 10px; border-radius: 8px; background: var(--tint); font-family: var(--font-hand); font-size: 1.45rem; line-height: 1.1; font-weight: 600; color: var(--accent); transform: rotate(-2deg); }
.seat { position: relative; display: block; min-width: 0; }
.seat input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seat-body {
  height: 100%; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  background: var(--ground); border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  font-size: 0.98rem; line-height: 1.2; transition: background-color 0.15s ease, border-color 0.15s ease;
}
.seat-name { text-wrap: balance; }
.seat--wide { grid-column: 1 / -1; }
.seat--wide .seat-body { justify-content: center; }
.seat:hover .seat-body { border-color: var(--accent); }
.seat input:checked + .seat-body { background: var(--tint); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.seat input:checked + .seat-body .seat-dot { background: var(--accent); border-color: var(--accent); border-style: solid; }
.seat input:focus-visible + .seat-body { outline: 2px solid var(--accent); outline-offset: 3px; }
.seat input:checked + .seat-body::after {
  content: "you"; position: absolute; z-index: 1; top: -12px; right: -5px; padding: 0 6px;
  font-family: var(--font-hand); font-size: 1.35rem; line-height: 1.05; font-weight: 600; color: var(--accent);
  background: var(--paper); border-radius: 6px; transform: rotate(-5deg); pointer-events: none;
}
.join-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.join-foot .fine { flex: 1 1 14em; }
.fine { font-size: 0.9rem; line-height: 1.4; color: var(--ink-3); }
/* a box people never see; only a form-filling robot fills it in */
.trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.send-error { font-size: 0.98rem; line-height: 1.4; font-style: italic; color: var(--accent); }

/* the page for an address that does not exist */
.lost { display: grid; gap: 18px; justify-items: start; padding-block: clamp(48px, 16vh, 160px); }
.lost p { margin: 0; }

/* ---------- narrower screens ---------- */
@media (max-width: 900px) {
  .hero, .split, .split--join { grid-template-columns: minmax(0, 1fr); }
  .picture { justify-self: start; }
}
@media (max-width: 760px) {
  .trio, .note--lead, .ask { grid-template-columns: minmax(0, 1fr); }
  .lead-say, .ask-a { grid-column: 1; }
  .lead-say { padding-top: 0; }
}
@media (max-width: 720px) {
  .site-head-in { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .site-nav { width: 100%; margin-left: -6px; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .quick-row { flex-direction: column; }
  .quick .btn { width: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-top { order: -1; }
  .facts > div { grid-template-columns: minmax(0, 1fr); }
  .facts dt { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mark, .btn svg, .pic-edge, .pic-flow, .pic-ticks, .pic-hands, .seat-body, .why summary svg { transition: none; }
}
