/* Signed-out homepage */
main.landing {
  width: 100%;
  max-width: none;
  padding: 0;
}

.landing-wrap,
body:has(main.landing) :is(.topbar .container, .footer) {
  width: min(1176px, calc(100% - 112px));
  max-width: none;
  margin-inline: auto;
}

body:has(main.landing) .footer {
  min-height: 74px;
  font-size: 14px;
}

body:has(main.landing) .footer svg { display: none; }

.landing :is(h1, h2, figure, dl, dd) { margin: 0; }
.landing :is(h1, h2) { font-stretch: normal; }
.landing a { text-underline-offset: 4px; }
.landing [tabindex="-1"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  padding-block: clamp(42px, 4.5vw, 68px) clamp(54px, 6vw, 84px);
}

.landing-hero > *, .landing-split > * { min-width: 0; }

.landing-intro h1 {
  max-width: 16ch;
  font-size: clamp(56px, 5.25vw, 77px);
  font-weight: 660;
  line-height: .99;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.landing-intro h1 span { color: var(--accent); }

.landing-lede {
  max-width: 44ch;
  margin-top: 24px;
  color: var(--copy);
  font-size: clamp(18px, 1.65vw, 22px);
  line-height: 1.48;
}

.landing-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 23px;
  margin-top: 25px;
}

.landing-primary, .landing-jump {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 640;
}

.landing-primary {
  justify-content: center;
  min-height: 47px;
  padding: 10px 19px;
  border-radius: 6px;
  background: var(--action);
  color: var(--on-action);
  text-decoration: none;
}

.landing-primary:hover { background: var(--action-hover); }
.landing-jump { gap: 7px; }

.landing-setup {
  max-width: 49ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.44;
}

.landing-example { background: var(--panel); }
.landing-explain p { max-width: 36ch; margin-top: 14px; font-size: clamp(16px, 1.5vw, 20px); color: var(--copy); }
.landing-explain .landing-jump { margin-top: 7px; }
.landing-explain .landing-jump .icon { width: 16px; }
.agreed-time { white-space: nowrap; color: var(--success); }
.landing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(30px, 7vw, 100px);
  padding-block: clamp(43px, 5.5vw, 78px);
}

.landing h2 {
  max-width: 15ch;
  font-size: clamp(36px, 4vw, 55px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -.038em;
  text-wrap: balance;
}

.landing-stage {
  --emblem-size: clamp(64px, 7.4vw, 106px);
  position: relative;
  isolation: isolate;
  overflow: clip;
  border: 1px solid var(--rule);
  background: radial-gradient(ellipse at 16% 0%, #292121, transparent 33%), radial-gradient(ellipse at 86% 0%, #29253a, transparent 34%), var(--header);
  border-radius: 16px;
  padding: clamp(12px, 1.6vw, 24px);
}
.landing .agent-map {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(10px, 1fr) auto minmax(10px, 1fr) auto;
  align-items: start;
  width: min(100%, 470px);
  margin: 0 auto 20px;
  color: var(--text);
}
.agent-map::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px -140px -14px;
  pointer-events: none;
  background: radial-gradient(circle, #5b6367 .75px, transparent 1px) center / 12px 12px;
}
.participant, .agent-room {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  font-size: 15px;
}
.participant img { display: block; object-fit: contain; }
.agent-map .participant img { width: var(--emblem-size); height: var(--emblem-size); }
.agent-map .participant b { font-weight: 580; }
.agent-wire {
  position: relative;
  height: 1px;
  margin: calc(var(--emblem-size) / 2) 5px 0;
  color: var(--copper);
  background: currentColor;
}
.agent-wire::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.agent-wire-back { color: var(--violet); transform: rotate(180deg); }
.agent-room {
  align-content: center;
  gap: 3px;
  height: 48px;
  min-width: 70px;
  margin-top: calc((var(--emblem-size) - 48px) / 2);
  border: 1px solid var(--control-line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 570;
}
.agent-room .icon { width: 18px; height: 18px; }

.landing .availability { table-layout: fixed; }
.availability :is(th, td) { padding: 10px 8px; border-bottom: 1px solid var(--rule); font-size: 16px; color: inherit; text-align: center; }
.availability th:first-child { width: 54%; text-align: left; }
.availability thead th { font-size: 14px; vertical-align: bottom; padding-top: 0; }
.availability tbody th { font-weight: 540; }
.availability td .icon { width: 20px; height: 20px; color: var(--muted); }
.availability .matrix-dash { color: var(--muted); }
.availability .agreed { color: var(--success); background: var(--success-surface); }
.availability .agreed th { font-weight: 660; }
.availability .agreed td .icon { color: var(--success); }
.availability .agreed th span { font-size: 12px; margin-inline-start: 4px; }

.landing-notes { padding-block: clamp(26px, 4vw, 52px); }
.landing-chapter { padding-bottom: 22px; }
.landing .landing-chapter h2 {
  z-index: 1;
  max-width: none;
  padding-block: 16px;
  background: var(--canvas);
  border-bottom: 1px solid var(--rule);
  font-size: clamp(23px, 2.25vw, 34px);
  letter-spacing: -.025em;
}
/* The answers pass under their heading until the following chapter takes its place. */
@media (min-height: 400px) and (prefers-reduced-motion: no-preference) {
  .landing-chapter h2 { position: sticky; top: 0; }
}
.landing-compatibility, .privacy-boundaries > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 8px clamp(24px, 5vw, 60px);
  padding-block: 16px;
}
.landing-notes :is(p, dd) { font-size: 16px; color: var(--copy); line-height: 1.55; max-width: 64ch; }
.privacy-boundaries > div + div { border-top: 1px solid var(--rule); }
.privacy-boundaries dt { font-size: 17px; font-weight: 640; }
.landing-chapter a { scroll-margin-block: 5rem; }
@media (max-width: 680px) {
  .landing-compatibility, .privacy-boundaries > div { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
  .landing-wrap, body:has(main.landing) :is(.topbar .container, .footer) { width: calc(100% - 64px); }
  .landing-intro h1 { font-size: clamp(53px, 6.9vw, 68px); }
  .landing-actions { gap: 2px 16px; }
}

@media (max-width: 780px) {
  .landing-wrap, body:has(main.landing) :is(.topbar .container, .footer) { width: calc(100% - 40px); }
  .landing-hero, .landing-split { grid-template-columns: 1fr; }
  .landing-hero { padding: 39px 0 37px; gap: 29px; }
  .landing-intro h1 { max-width: 14ch; font-size: clamp(46px, 11.5vw, 65px); }
  .landing-lede { margin-top: 16px; font-size: 18px; line-height: 1.45; }
  .landing-actions { margin-top: 18px; }
  .landing-split { padding-block: 36px; gap: 24px; }
  .landing h2 { font-size: 35px; }
  .availability :is(th, td) { padding-inline: 4px; font-size: 15px; }
  .availability .agreed th span { display: block; margin-inline-start: 0; }
  .landing-stage { width: 100%; max-width: 560px; justify-self: center; }
}

@media (max-width: 350px) {
  .landing-wrap, body:has(main.landing) :is(.topbar .container, .footer) { width: calc(100% - 32px); }
  .landing-hero { padding-top: 29px; }
  .landing-intro h1 { font-size: 42px; }
  .landing-actions { gap: 1px 13px; }
  .landing-primary, .landing-jump { font-size: 14px; }
}

/* A paper enclosure for the conversation and a separate, inspectable receipt. */
.sandbox-example {
  display: grid;
  container-type: inline-size;
  min-width: 0;
  width: 100%;
  padding: 3px clamp(10px, 1vw, 16px) 11px;
  background: var(--raised);
  border-radius: 11px;
  color: var(--text);
}
/* Inactive views reserve their height so switching stages keeps the controls in reach. */
.sandbox-example [data-panel][hidden] { display: block !important; visibility: hidden; }
.sandbox-switch { grid-area: 1 / 1; display: flex; border-bottom: 1px solid var(--rule); }
.sandbox-switch button, .sandbox-controls button {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 620;
}
.sandbox-switch button {
  position: relative;
  padding: 9px 11px;
  color: var(--muted);
}
.sandbox-switch button[aria-pressed="true"] { color: var(--accent); }
.sandbox-switch button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  background: var(--accent);
}
.sandbox-switch button:hover, .sandbox-controls button:hover { background: var(--hover); }
.sandbox-example [data-panel] { grid-area: 2 / 1; padding: 19px 0 0; }
.sandbox-bound {
  border: 1px dashed var(--control-line);
  border-radius: 13px;
  background: var(--panel);
  padding: 0 clamp(14px, 2vw, 25px) 16px;
  display: flow-root;
}
.sandbox-legend, .sandbox-closed {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  font-weight: 620;
  font-size: 13px;
  letter-spacing: .004em;
}
.sandbox-legend { margin: 0 0 7px; padding-top: 5px; }
.sandbox-legend .icon, .sandbox-closed .icon { width: 15px; height: 15px; }
.sandbox-dialogue { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.sandbox-dialogue li { width: fit-content; max-width: 86%; }
.sandbox-dialogue li:nth-child(even) { justify-self: end; text-align: right; }
.sandbox-dialogue li > span { display: flex; align-items: center; gap: 5px; margin: 0 0 3px; font-size: 12px; line-height: 1.25; font-weight: 600; color: var(--muted); }
.sandbox-dialogue li:nth-child(even) > span { flex-direction: row-reverse; }
.sandbox-dialogue li em { font-size: 11px; font-weight: 560; font-style: normal; color: var(--warning); padding-left: 4px; border-left: 1px solid var(--warning); }
.sandbox-dialogue li p { background: var(--copper-surface); border-radius: 2px 11px 11px 11px; padding: 7px 12px; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.35; }
.sandbox-dialogue li:nth-child(even) p { background: var(--violet-surface); border-radius: 11px 2px 11px 11px; }
.sandbox-dialogue .sandbox-mistake p { color: var(--warning); background: var(--warning-surface); border-inline-start: 2px solid var(--warning); }
.sandbox-dialogue li[data-waiting] { visibility: hidden; }
.sandbox-controls { grid-area: 3 / 1; display: grid; grid-template-columns: minmax(0, 182px) minmax(0, 132px); align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.sandbox-controls button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 11px; border-radius: 6px; }
.sandbox-controls [data-next] { gap: 5px; padding-inline: 5px; }
.sandbox-controls [data-play] { color: var(--accent); background: var(--hover); border: 1px solid var(--control-line); }
.sandbox-controls [data-play]:hover { color: var(--on-action); background: var(--action); }
.sandbox-controls .icon { width: 15px; height: 15px; }
.sandbox-output { min-height: 351px; }
.sandbox-closed { color: var(--muted); }
.sandbox-receipt { color: var(--violet); border: 1px dashed #756888; position: relative; isolation: isolate; overflow: hidden; background: var(--receipt); border-radius: 4px; }
.sandbox-receipt > span, .sandbox-receipt > strong { display: block; position: relative; padding-inline: clamp(17px, 2.3vw, 30px); }
.sandbox-receipt > span { padding-top: 20px; font-size: 14px; font-weight: 610; }
.sandbox-receipt > strong { margin: 18px 0 22px; font-size: clamp(36px, 4.6vw, 61px); line-height: .98; letter-spacing: -.037em; font-weight: 670; }
.sandbox-receipt em { display: block; font-size: .66em; font-weight: 510; font-style: normal; margin-top: 4px; }
.sandbox-receipt img { position: absolute; z-index: -1; right: -3%; top: 55px; width: 43%; height: auto; transform: rotate(-20deg); pointer-events: none; }
.receipt-branches { padding: 4px 0 0 27px; }
.receipt-branches details { position: relative; border-bottom: 1px solid var(--rule); }
.receipt-branches details::before { content: ""; position: absolute; top: -5px; left: -16px; width: 14px; height: 30px; border: solid var(--control-line); border-width: 0 0 1px 1px; }
.receipt-branches details:first-child::after { content: ""; position: absolute; left: -16px; top: 26px; bottom: -1px; border-left: 1px solid var(--control-line); }
.receipt-branches summary { cursor: pointer; min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 15px; font-weight: 600; list-style: none; }
.receipt-branches summary::-webkit-details-marker { display: none; }
.receipt-branches summary .icon { width: 16px; margin-left: auto; }
.receipt-branches details[open] summary .icon { transform: rotate(180deg); }
.receipt-branches dl { padding: 0 4px 10px; }
.receipt-branches dl > div { display: grid; grid-template-columns: 8em minmax(0,1fr); gap: 6px; padding: 3px 0; border-top: 1px solid var(--rule); font-size: 13px; }
.receipt-branches dd { overflow-wrap: anywhere; }
.sandbox-time { margin: 12px 0 0; display: flex; align-items: baseline; gap: 6px; font-size: 15px; }
.sandbox-time .icon { width: 16px; height: 16px; align-self: flex-start; margin-top: 2px; }

@keyframes sandbox-speech {
  from { opacity: .25; transform: translateX(var(--from, -11px)); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes sandbox-release {
  from { clip-path: inset(0 0 87%); transform: translateY(-7px); }
  to { clip-path: inset(0); transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  /* Both delegates enter together. Later replies are animated inside the room. */
  .landing-stage:has(.sandbox-dialogue li:first-child[data-speaking]) .agent-wire::before {
    content: "";
    position: absolute;
    top: -2px;
    height: 5px;
    width: 5px;
    border-radius: 50%;
    background: currentColor;
    animation: delegate-signal .55s ease-out both;
  }
  .sandbox-dialogue li[data-speaking] { animation: sandbox-speech .4s cubic-bezier(.16,1,.3,1) both; }
  .sandbox-dialogue li:nth-child(even) { --from: 11px; }
  .sandbox-output[data-released] .sandbox-receipt { animation: sandbox-release .52s cubic-bezier(.16,1,.3,1) both; }
}
@keyframes delegate-signal {
  from { left: 0; opacity: 0; }
  25% { opacity: 1; }
  to { left: calc(100% - 5px); opacity: 0; }
}
@media (max-width: 680px) {
  .sandbox-switch button { padding-inline: 7px; }
  .sandbox-switch { justify-content: space-between; }
  .receipt-branches dl > div { grid-template-columns: minmax(72px, .7fr) minmax(0,1.4fr); }
}
@media (max-width: 370px) {
  .landing-stage { padding: 10px 6px 6px; }
  .agent-map .participant b { font-size: 13px; }
  .agent-room { min-width: 58px; }
  .agent-wire { margin-inline: 3px; }
  .sandbox-example { padding-inline: 7px; }
  .sandbox-switch button { padding-inline: 4px; max-width: 55%; }
  .sandbox-dialogue li { max-width: 93%; }
}
@media (max-width: 350px) {
  .sandbox-dialogue .sandbox-mistake > span { display: grid; grid-template-columns: 24px 1fr; gap: 0 5px; }
  .sandbox-mistake > span img { grid-row: span 2; }
  .sandbox-mistake > span em { grid-column: 2; border: 0; padding: 0; }
}

.fresh-seats { display: flex; justify-content: space-around; align-items: center; gap: 6px; padding: 24px 0 32px; }
.fresh-seats .participant { min-width: 0; font-size: 13px; }
.empty-speech { display: grid; justify-items: center; border: 1px dashed var(--control-line); background: var(--canvas); padding: 13px 15px; border-radius: 14px 14px 14px 2px; }
.empty-speech strong { font-size: clamp(36px, 5vw, 56px); font-weight: 625; line-height: 1; }
.empty-speech span { font-size: 13px; }
