/* Brightgable Window & Eaves: a concept by ALLOIC.
   One board of panes on a sky ground. Azure marks what a rule did; yellow marks what a person does. */

:root {
  --sky: #6bb4ee;        /* the ground: sky seen in clean glass */
  --sky-2: #8fc8f4;      /* a tile one step from the ground */
  --sky-3: #5aa5e0;      /* a tile one step the other way: not yet */
  --mist: #b5d9f8;
  --pale: #dcecfa;
  --white: #ffffff;
  --ink: #0e1822;
  --ink-soft: #1b3d5c;   /* secondary text on sky */
  --muted: #3d5266;      /* secondary text on white and pale */
  --azure: #1d5fbf;      /* what a rule did */
  --accent: #ffd60a;     /* what a person does */
  --accent-strong: #ffc400;
  --accent-ink: #0e1822;

  --gap: 8px;
  --margin: 16px;
  --pad: clamp(16px, 1.6vw, 24px);

  --font: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --step-small: 0.9375rem;                                   /* 15px */
  --step-body: clamp(1.125rem, 1.08rem + 0.2vw, 1.1875rem);  /* 18 to 19px */
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);    /* 22 to 28px */
  --step-head: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);         /* 36 to 64px */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 8px; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--font);
  letter-spacing: -0.005em;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; hyphens: none; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
::selection { background: var(--ink); color: var(--white); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { margin: var(--gap) var(--margin) 0; padding: var(--pad); background: var(--white); }

/* ---------------------------------------------------------------- the board */
.board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-inline: var(--margin);
  margin-top: var(--gap);
}
.board > * { grid-column: 1 / -1; min-width: 0; }
.tile { background: var(--white); padding: var(--pad); min-width: 0; }

.textbtn {
  background: none; border: 0; padding: 10px 0; min-height: 44px;
  font-weight: 500; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em;
}

/* ---------------------------------------------------------------- concept strip */
.first { display: grid; grid-template-rows: auto 1fr; padding-top: var(--margin); }
.strip {
  margin-inline: var(--margin);
  padding: 8px 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.875rem;
  line-height: 1.4;
}
.strip p { max-width: 41rem; }
.strip a { font-weight: 600; white-space: nowrap; }
.strip__nav { margin-top: 2px; }
.strip a:focus-visible { outline-color: var(--accent); }

/* ---------------------------------------------------------------- hero: name band and rails */
.hero { grid-template-rows: auto auto auto; }
.band { background: var(--sky-2); padding: clamp(8px, 0.7vw, 12px) var(--pad) clamp(12px, 1.1vw, 18px); overflow: hidden; }
.band__title {
  --fit-max: 240;
  font-size: clamp(3.25rem, 15.4vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
}
.band__title [data-fit-inner] { display: inline-block; }
.band__title .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; white-space: nowrap; }
.band__title [data-line] { display: block; }

.nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.nav a { text-decoration: none; }
.nav__mark {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  padding-block: 6px; min-height: 44px;
  background: var(--ink); color: var(--white);
  font-weight: 600; line-height: 1.15;
}
.nav__mark:focus-visible { outline-color: var(--accent); }
.gable { width: 28px; height: 28px; flex: none; fill: var(--accent); }
.nav__link {
  min-height: 44px;
  padding: 11px 6px;
  background: var(--sky-2);
  font-size: var(--step-small); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; white-space: nowrap;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.compose { display: flex; flex-direction: column; gap: 12px; }
.compose__title { font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.025em; }
.compose textarea {
  flex: 1;
  display: block; width: 100%; min-height: 108px;
  padding: 14px 16px;
  border: 0; border-radius: 0;
  background: var(--pale);
  font-size: var(--step-body); line-height: 1.45;
  resize: vertical;
}
.compose textarea::placeholder { color: var(--muted); opacity: 1; }
.compose__hint { font-size: var(--step-small); color: var(--muted); }
.compose__error { font-size: var(--step-small); font-weight: 600; }
.compose__error:not(:empty) { padding: 8px 12px; background: var(--ink); color: var(--white); }

.rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.rail button {
  border: 0; border-radius: 0; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.rail button:active { transform: scale(0.98); }
.rail__ex { padding: 10px; min-height: 62px; }
.rail__ex--a { background: var(--white); }
.rail__ex--b { background: var(--pale); }
.rail__ex--c { background: var(--mist); }
.rail__ex.is-picked { background: var(--ink); color: var(--white); }
.rail__name { font-size: var(--step-body); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
.rail__what { display: none; font-size: var(--step-small); line-height: 1.35; }
.rail__send { grid-column: 1 / -1; min-height: 66px; padding: 10px var(--pad); background: var(--accent); color: var(--accent-ink); }
.rail__send-label { font-size: var(--step-lead); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.rail__send-note { font-size: var(--step-small); font-weight: 500; }
.rail__send[aria-disabled="true"] { background: var(--pale); }

.state { background: var(--ink); color: var(--white); }
.state__text { font-size: var(--step-lead); font-weight: 500; line-height: 1.32; letter-spacing: -0.025em; max-width: 26ch; }

.hero > .pic { grid-column: span 6; padding: 0; background: var(--sky-2); overflow: clip; min-height: 240px; position: relative; }
.pic__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.pic__arm { transform-box: view-box; transform-origin: 276px 230px; }
.hero > .facts { grid-column: span 6; background: var(--pale); display: flex; align-items: flex-end; }
.facts__list { display: grid; gap: 6px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- section heads */
.head { background: var(--sky-2); display: grid; gap: 12px; align-items: end; }
.head h2, .count h2, .consent h2 { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.04em; margin-left: -0.03em; }
.head__side { display: grid; gap: 4px; max-width: 52ch; }

/* ---------------------------------------------------------------- the desk */
.stages { display: none; }
.stage {
  --fill: var(--white);
  position: relative; overflow: hidden;
  min-height: 92px; padding: 12px var(--pad);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--sky-3);
}
.stage::before {
  content: ""; position: absolute; inset: 0;
  background: var(--fill);
  transform: scaleX(0); transform-origin: left;
  transition: transform 600ms var(--ease-in-out);
}
.stage.is-live::before { transform: none; transition: transform var(--dur, 1100ms) linear; }
.stage.is-done::before { transform: none; }
.stage.is-done { background-color: var(--fill); transition: background-color 0s linear 620ms; }
.stage > * { position: relative; }
.stage__name { font-size: var(--step-lead); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.stage__time { font-size: var(--step-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.stage--check { --fill: var(--pale); }
.stage--price { --fill: var(--mist); }
.stage--draft { --fill: var(--azure); }
.stage--draft.is-done, .stage--draft.is-live { color: var(--white); transition: color 300ms ease 200ms; }
.stage--dana { --fill: var(--accent); }

.desk__rules { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-content: start; }
.pane, .record, .desk__dana { display: flex; flex-direction: column; gap: 14px; }
.pane__head {
  --band: var(--pale);
  display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap;
  margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0; padding: 12px var(--pad);
  background: var(--band);
}
.pane__head h3 { font-size: var(--step-lead); line-height: 1.05; letter-spacing: -0.03em; }
.pane__meta { font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.pane--check .pane__head { --band: var(--mist); }
.pane--price .pane__head { --band: var(--sky-2); }
.pane--draft .pane__head { --band: var(--azure); color: var(--white); }
.record { container-type: inline-size; }
.record .pane__head { --band: var(--ink); color: var(--white); }
.pane__head--dana { --band: var(--accent); }
.pane.is-pending { background: var(--pale); }
.pane.is-pending .pane__head { --band: var(--sky-3); color: var(--ink); }
.pane__body { position: relative; }
.pending { color: var(--ink-soft); max-width: 44ch; }

/* interface fragments: everything inside [data-ui] is the product's own screen */
[data-ui] { --line: #d3e2f0; --control: #7f97ae; --well: #eef5fc; font-size: 1rem; line-height: 1.45; letter-spacing: 0; }
[data-ui] .read { display: grid; gap: 18px; }
[data-ui] .read__text { font-size: var(--step-body); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-ui] .mk { background: var(--azure); color: var(--white); padding: 0.06em 0.28em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-ui] .mk--flag { background: var(--ink); }
[data-ui] .facts2 { display: grid; align-content: start; }
[data-ui] .fact { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--line); }
[data-ui] .fact dt { font-size: var(--step-small); color: var(--muted); }
[data-ui] .fact__v { font-weight: 600; }
[data-ui] .fact__src { font-size: var(--step-small); color: var(--muted); overflow-wrap: anywhere; }
[data-ui] .fact--none .fact__v { font-weight: 500; color: var(--muted); }
[data-ui] .fact--flag dd { font-size: var(--step-small); }

[data-ui] .checks { display: grid; gap: 10px; }
[data-ui] .ck { position: relative; padding-left: 22px; overflow-wrap: anywhere; }
[data-ui] .ck::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 10px; height: 10px; background: var(--azure); }
[data-ui] .ck--ask::before { background: none; border: 2px solid var(--ink); }
[data-ui] .ck--stop::before, [data-ui] .ck--flag::before { background: var(--ink); }
[data-ui] .cal { margin-top: 16px; }
[data-ui] .cal__row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
[data-ui] .cal__day { display: grid; justify-items: center; padding: 6px 0; background: var(--well); line-height: 1.25; }
[data-ui] .cal__wd { font-size: var(--step-small); }
[data-ui] .cal__d { font-weight: 600; font-variant-numeric: tabular-nums; }
[data-ui] .cal__day.is-full { background: none; color: var(--muted); }
[data-ui] .cal__day.is-full .cal__d { text-decoration: line-through; }
[data-ui] .cal__day.is-offered { background: var(--azure); color: var(--white); }
[data-ui] .cal__day.is-asked { outline: 2px solid var(--ink); outline-offset: -2px; }
[data-ui] .cal__key { margin-top: 8px; font-size: var(--step-small); color: var(--muted); }

[data-ui] .sum { display: grid; gap: 6px; }
[data-ui] .sum__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
[data-ui] .sum__row .num { white-space: nowrap; font-weight: 500; }
[data-ui] .sum__row--total { padding-top: 6px; border-top: 2px solid var(--ink); font-weight: 600; }
[data-ui] .sum__work { display: block; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
[data-ui] .sum__range { margin-top: 8px; font-size: var(--step-lead); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
[data-ui] .sum__lead { margin-bottom: 4px; }
[data-ui] .sum__note, [data-ui] .noprice + .sum__note { font-size: var(--step-small); color: var(--muted); }

[data-ui] .draft__text { white-space: pre-wrap; overflow-wrap: anywhere; }
[data-ui] .await { margin-top: 16px; padding: 9px 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
[data-ui] .await--sent { background: var(--ink); color: var(--white); }
[data-ui] .await--held { background: var(--well); color: var(--ink); }
[data-ui] .draft__go { margin-top: 10px; }

[data-ui] .uibtn {
  min-height: 44px; padding: 8px 16px;
  background: var(--white); border: 1px solid var(--control); border-radius: 0;
  font-size: 1rem; font-weight: 500; line-height: 1.2;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, border-color var(--t-hover) ease;
}
[data-ui] .uibtn:active { transform: scale(0.97); }
[data-ui] .uibtn--go { background: var(--accent); border-color: var(--accent); font-weight: 600; min-height: 48px; }
[data-ui] .uibtn--quiet { border-color: transparent; background: none; text-decoration: underline; text-underline-offset: 0.18em; padding-inline: 4px; }
[data-ui] .uibtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* the record */
[data-ui] .log__row { display: grid; grid-template-columns: 4.6em 5.4em minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
[data-ui] .log__t { font-size: var(--step-small); color: var(--muted); }
[data-ui] .log__who { font-size: var(--step-small); font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
[data-ui] .log__who::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--ink); }
[data-ui] .log__who--rule::before { background: var(--azure); }
[data-ui] .log__who--dana::before { background: var(--accent); border: 1px solid var(--ink); }
[data-ui] .log__what { overflow-wrap: anywhere; }
[data-ui] .diff { display: block; margin-top: 4px; font-size: var(--step-small); color: var(--muted); }
[data-ui] .diff__sum { font-weight: 600; color: var(--ink); }
[data-ui] .diff del { background: #ffe3de; color: #7a1b14; }
[data-ui] .diff ins { background: var(--pale); color: var(--ink); text-decoration: none; font-weight: 600; }
[data-ui] #log-more { margin-top: 6px; }
@container (max-width: 560px) {
  [data-ui] .log__row { grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; }
  [data-ui] .log__what { grid-column: 1 / -1; }
}

/* Dana's phone */
.desk__dana { background: var(--pale); padding: 0; gap: 0; }
.desk__dana .pane__head { margin: 0; }
.phone__screen { background: var(--white); }
[data-ui] .app__head { padding: 16px 16px 6px; }
[data-ui] .app__title { font-size: var(--step-lead); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
[data-ui] .app__sub { font-size: var(--step-small); color: var(--muted); }
[data-ui] .app__tabs { display: flex; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--line); }
[data-ui] .app__tab { min-height: 44px; padding: 0 8px; background: none; border: 0; border-bottom: 3px solid transparent; font-weight: 500; white-space: nowrap; }
[data-ui] .app__tab span { font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
[data-ui] .app__tab[aria-pressed="true"] { border-bottom-color: var(--ink); font-weight: 600; }
[data-ui] .app__toast { display: none; margin: 8px 8px 0; padding: 10px 12px; background: var(--ink); color: var(--white); font-size: var(--step-small); }
[data-ui] .app__toast.is-on { display: block; }
[data-ui] .queue { padding: 0 0 12px; }
[data-ui] .queue__empty { padding: 20px 16px; color: var(--muted); }
[data-ui] .q { border-bottom: 1px solid var(--line); }
[data-ui] .q.is-open { background: var(--well); }
[data-ui] .q__row {
  width: 100%; padding: 12px 16px; background: none; border: 0; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline;
}
[data-ui] .q__row:focus-visible { outline-offset: -3px; }
[data-ui] .q__who { font-weight: 600; }
[data-ui] .q__time { font-size: var(--step-small); color: var(--muted); white-space: nowrap; }
[data-ui] .q__sub { grid-column: 1 / -1; font-size: var(--step-small); }
[data-ui] .q__marks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
[data-ui] .pill { flex: none; white-space: nowrap; padding: 2px 8px; background: #e2ebf4; font-size: var(--step-small); font-weight: 500; line-height: 1.35; }
[data-ui] .pill--urgent { background: #ffe3de; color: #7a1b14; }
[data-ui] .pill--ready { background: var(--pale); }
[data-ui] .sig { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; font-size: var(--step-small); font-weight: 600; color: var(--azure); }
[data-ui] .sig::before { content: ""; width: 8px; height: 8px; background: currentColor; }
[data-ui] .sig--ink { color: var(--ink); }
[data-ui] .q__body { padding: 0 16px 16px; display: grid; gap: 6px; }
[data-ui] .q__label { margin-top: 8px; font-size: var(--step-small); color: var(--muted); display: block; }
[data-ui] .q__quote { padding: 10px 12px; background: var(--white); font-size: var(--step-small); overflow-wrap: anywhere; }
[data-ui] .q__quote--short { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 0; border-bottom: 10px solid var(--white); }
[data-ui] .q__draft { padding: 12px; background: var(--white); white-space: pre-wrap; overflow-wrap: anywhere; }
[data-ui] .q__edit { display: block; width: 100%; min-height: 216px; padding: 12px; border: 2px solid var(--ink); border-radius: 0; background: var(--white); font-size: 1rem; line-height: 1.45; resize: vertical; }
[data-ui] .q__changed, [data-ui] .q__edited, [data-ui] .q__note { font-size: var(--step-small); }
[data-ui] .q__edited { color: var(--muted); }
[data-ui] .q__actions { margin-top: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
[data-ui] .q__actions .uibtn { padding-inline: 6px; }
[data-ui] .q__actions .uibtn--go, [data-ui] .q__actions .uibtn--quiet, [data-ui] .q__actions [data-act="release"], [data-ui] .q__actions [data-act="replied"] { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- the rules */
.rules__left, .rules__right { display: flex; flex-direction: column; gap: var(--gap); }
.giant { background: var(--azure); color: var(--white); overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; flex: 1 0 auto; }
.rules__right > .panel:last-child { flex: 1 0 auto; align-content: start; }
.giant__word { --fit-max: 420; font-size: clamp(6rem, 37vw, 22rem); line-height: 0.8; letter-spacing: -0.055em; margin-left: -0.05em; padding-bottom: 0.06em; }
.giant__word [data-fit-inner] { display: inline-block; white-space: nowrap; overflow: hidden; padding: 0 0.06em 0.08em 0.05em; margin: 0 -0.06em -0.08em -0.05em; }
.giant__rise { display: block; }
.giant__note { max-width: 34ch; }
.bars { display: grid; gap: var(--gap); }
.bar { background: var(--white); }
.bar summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 6px var(--pad);
  font-size: var(--step-lead); font-weight: 600; line-height: 1.1; letter-spacing: -0.025em;
}
.bar summary::-webkit-details-marker { display: none; }
.bar summary::after { content: "+"; font-weight: 400; font-size: 1.9rem; line-height: 1; transition: transform 240ms var(--ease-out); }
.bar[open] summary::after { transform: rotate(45deg); }
.bar summary:focus-visible { outline-offset: -3px; }
.bar__panel { display: grid; gap: 10px; padding: 2px var(--pad) var(--pad); }
.bar__panel li { position: relative; padding-left: 20px; }
.bar__panel li::before { content: ""; position: absolute; left: 0; top: 0.58em; width: 8px; height: 8px; background: var(--azure); }

.panel { display: grid; gap: 14px; }
.panel__head { display: grid; gap: 4px; }
.panel__head h3, .arrive__title { font-size: var(--step-lead); line-height: 1.08; letter-spacing: -0.03em; }
.panel__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 20px; font-size: var(--step-small); color: var(--muted); }
.panel__foot .textbtn { color: var(--ink); font-size: 1rem; }
[data-ui].split { display: grid; grid-template-columns: minmax(0, 1fr); }
[data-ui] .split__demo { padding: 14px 16px; background: var(--well); container-type: inline-size; }
[data-ui] .split__controls { padding: 8px 16px 14px; background: var(--pale); }
[data-ui] .split__label { font-size: var(--step-small); font-weight: 600; margin-bottom: 6px; }
[data-ui] .dep { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 14px; padding: 9px 0; border-top: 1px solid var(--line); }
[data-ui] .dep__who { font-weight: 600; }
[data-ui] .dep__range { font-weight: 600; text-align: right; white-space: nowrap; grid-column: 2; grid-row: 1; }
[data-ui] .dep__what { font-size: var(--step-small); color: var(--muted); }
[data-ui] .dep__sum { font-size: var(--step-small); color: var(--muted); text-align: right; }
[data-ui] .dep__was { grid-column: 1 / -1; font-size: var(--step-small); margin-top: 2px; }
[data-ui] .dep.is-changed .dep__range { color: var(--azure); }
[data-ui] .dep--empty { display: block; color: var(--muted); }
@container (max-width: 440px) {
  [data-ui] .dep__what, [data-ui] .dep__sum { grid-column: 1 / -1; text-align: left; }
}
[data-ui] .ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; min-height: 52px; padding: 6px 0; border-top: 1px solid #c2d7ea; }
[data-ui] .ctl:first-child { border-top: 0; }
[data-ui] .ctl label { line-height: 1.25; }
[data-ui] .ctl__field { display: flex; align-items: center; gap: 4px; font-weight: 600; }
[data-ui] .ctl input { width: 5.4em; height: 40px; padding: 0 8px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--white); border: 1px solid var(--control); border-radius: 0; }
[data-ui] .ctl.is-changed input { border: 2px solid var(--azure); }
[data-ui] .ctl__was { grid-column: 1 / -1; font-size: var(--step-small); font-weight: 600; color: var(--azure); }
[data-ui] .ctl__was:empty { display: none; }

[data-ui] .split__demo--map { display: none; padding: 0; background: var(--azure); }
[data-ui] .map { display: block; width: 100%; height: auto; }
[data-ui] .map__lake { fill: var(--azure); }
[data-ui] .map__land { fill: var(--well); }
[data-ui] .map__road { fill: none; stroke: var(--white); stroke-width: 7; stroke-linecap: round; }
[data-ui] .map__dot { fill: var(--white); stroke: var(--ink); stroke-width: 3; }
[data-ui] .map__base { fill: var(--white); stroke: var(--ink); stroke-width: 3; stroke-linejoin: miter; }
[data-ui] .map__town.is-on .map__dot { fill: var(--ink); }
[data-ui] .map__town.is-on .map__base { fill: var(--accent); }
[data-ui] .map text { font-size: 15px; font-weight: 500; fill: var(--ink); }
[data-ui] .map__town.is-on text { font-weight: 600; }
[data-ui] .map__town.is-lake text, [data-ui] .map .map__lake-name { fill: var(--white); }
[data-ui] .map .map__lake-name { font-weight: 600; }
[data-ui] .map .map__note { fill: var(--muted); }
[data-ui] .map__added { font-size: var(--step-small); padding: 0 16px 14px; color: var(--white); font-weight: 500; }
[data-ui] .map__added:empty { display: none; }
[data-ui] .chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
[data-ui] .chip { min-height: 44px; padding: 0 14px; background: var(--white); border: 1px solid var(--control); border-radius: 0; font-weight: 500; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
[data-ui] .chip:active { transform: scale(0.96); }
[data-ui] .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
[data-ui] .addtown { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
[data-ui] .addtown label { font-size: var(--step-small); font-weight: 600; }
[data-ui] .addtown__row { display: flex; gap: 8px; }
[data-ui] .addtown input { flex: 1 1 0; width: 0; min-width: 0; height: 44px; padding: 0 10px; background: var(--white); border: 1px solid var(--control); border-radius: 0; }
[data-ui] .addtown__msg { font-size: var(--step-small); min-height: 1.4em; }

/* ---------------------------------------------------------------- the count: a total and its receipt */
.count__main { background: var(--sky-2); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.count__top { display: grid; gap: 12px; }
.count__top p { max-width: 44ch; }
.total { display: grid; gap: 6px; }
.total__n { font-size: clamp(9rem, 44vw, 18.75rem); font-weight: 600; line-height: 0.78; letter-spacing: -0.06em; margin-left: -0.05em; font-variant-numeric: tabular-nums; }
.total__cap { font-size: var(--step-lead); font-weight: 500; line-height: 1.32; letter-spacing: -0.02em; max-width: 30ch; }
.count__side { background: var(--ink); display: flex; justify-content: center; align-items: flex-start; }
.slip {
  width: 100%; max-width: 440px;
  padding: 22px 20px 36px;
  background: var(--white); color: var(--ink);
  font-size: 1rem; line-height: 1.4;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 96% 100%, 92% calc(100% - 12px), 88% 100%, 84% calc(100% - 12px), 80% 100%, 76% calc(100% - 12px), 72% 100%, 68% calc(100% - 12px), 64% 100%, 60% calc(100% - 12px), 56% 100%, 52% calc(100% - 12px), 48% 100%, 44% calc(100% - 12px), 40% 100%, 36% calc(100% - 12px), 32% 100%, 28% calc(100% - 12px), 24% 100%, 20% calc(100% - 12px), 16% 100%, 12% calc(100% - 12px), 8% 100%, 4% calc(100% - 12px), 0 100%);
}
.slip__title { font-size: var(--step-lead); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.slip__sub { font-size: var(--step-small); color: var(--muted); }
.slip__group { margin-top: 16px; margin-bottom: 2px; font-weight: 600; }
.slip__row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; }
.slip__dots { flex: 1; min-width: 12px; overflow: hidden; white-space: nowrap; color: #8aa0b5; }
.slip__dots::before { content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."; }
.slip__v { font-weight: 600; white-space: nowrap; }
.slip__row--total { margin: 8px -10px 0; padding: 8px 10px; background: var(--ink); color: var(--white); font-weight: 600; }
.slip__row--total .slip__dots { visibility: hidden; }
.slip__foot { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }

/* ---------------------------------------------------------------- consent */
.consent__head { background: var(--ink); color: var(--white); display: grid; gap: 14px; }
.consent__lead { font-size: var(--step-lead); font-weight: 500; line-height: 1.32; letter-spacing: -0.02em; max-width: 34ch; }
.arrive { background: var(--pale); display: grid; gap: 14px; align-content: start; }
[data-ui].letter { background: var(--white); padding: 18px; }
[data-ui] .letter__head { display: grid; gap: 4px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
[data-ui] .letter__head div { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 10px; }
[data-ui] .letter__head dt { font-size: var(--step-small); color: var(--muted); }
[data-ui] .letter__head dd { font-size: var(--step-small); overflow-wrap: anywhere; }
[data-ui] .letter__body { white-space: pre-wrap; overflow-wrap: anywhere; }
.arrive__note { padding: 18px 20px; background: var(--azure); color: var(--white); font-weight: 500; line-height: 1.4; }
.terms { display: flex; }
.terms__list { display: grid; gap: 22px; align-content: space-between; }
.terms li { font-size: var(--step-lead); font-weight: 600; line-height: 1.32; letter-spacing: -0.025em; max-width: 22ch; }

/* ---------------------------------------------------------------- footer: the name built as a gable */
.foot { padding-bottom: var(--margin); }
.mark { display: flex; align-items: flex-end; gap: 4px; height: clamp(150px, 30svh, 320px); }
.mark span {
  flex: 1 1 0; min-width: 0; height: calc(var(--h) * 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0.16em;
  background: var(--ink); color: var(--sky);
  font-size: clamp(1.9rem, 9.23vw, 9.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em;
  transform-origin: bottom;
}
.mark span:nth-child(6) { background: var(--accent); color: var(--ink); }
.foot__line p { font-size: var(--step-lead); font-weight: 500; line-height: 1.32; letter-spacing: -0.02em; max-width: 36ch; }
.foot__line a { font-weight: 600; }
.foot__more { background: var(--pale); display: grid; gap: 10px; align-content: space-between; }
.foot__more a { font-weight: 600; margin-right: 18px; display: inline-block; padding: 6px 0; }

/* ---------------------------------------------------------------- hover, where there is a pointer */
@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { background: var(--white); }
  .rail__ex:hover { background: var(--ink); color: var(--white); }
  .rail__send:not([aria-disabled="true"]):hover { background: var(--accent-strong); }
  .textbtn:hover, .strip a:hover, .foot a:hover { text-decoration-thickness: 0.14em; }
  .bar summary:hover { background: var(--pale); }
  [data-ui] .uibtn:hover { border-color: var(--ink); }
  [data-ui] .uibtn--go:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
  [data-ui] .q__row:hover .q__who { text-decoration: underline; text-underline-offset: 0.18em; }
  [data-ui] .chip:hover { border-color: var(--ink); }
  [data-ui] .app__tab:hover { border-bottom-color: var(--control); }
  [data-ui] .app__tab[aria-pressed="true"]:hover { border-bottom-color: var(--ink); }
}

/* ---------------------------------------------------------------- wider than a phone */
@media (min-width: 600px) {
  .nav { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .strip { padding: 10px var(--pad); font-size: var(--step-small); line-height: 1.45; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
  .strip__nav { margin-top: 0; }
  .nav__mark { grid-column: span 4; gap: 12px; }
  .gable { width: 34px; height: 34px; }
  .nav__link { grid-column: span 2; padding: 12px clamp(8px, 1.4vw, 24px); min-height: 60px; font-size: var(--step-body); letter-spacing: -0.01em; }
  .compose textarea { min-height: 148px; }
  .rail__send { min-height: 84px; padding: var(--pad); }
  .rail__what { display: block; }
  .rail__ex { min-height: 120px; padding: var(--pad); }
  .rail__name { font-size: var(--step-lead); }
  .band__title { font-size: clamp(3.25rem, 9.2vw, 15rem); }
  .band__title .line { display: inline-block; }
  .head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .consent__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .terms__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--pad); width: 100%; }
  .hero > .pic { min-height: 300px; }
  .giant__word { font-size: clamp(8rem, 28vw, 24rem); }
  .total__n { font-size: clamp(12rem, 30vw, 28rem); }
}
@media (min-width: 700px) {
  [data-ui] .read { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  [data-ui].split { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); }
  [data-ui] .split__demo--map { display: block; }
  .arrive { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); }
  .arrive__title { grid-column: 1 / -1; }
  .arrive__note { align-self: start; }
  .count__side { padding: clamp(20px, 3vw, 44px); }
}

/* ---------------------------------------------------------------- desktop: the whole board */
@media (min-width: 1100px) {
  .hero { grid-template-rows: auto auto minmax(280px, 1fr) auto; }
  .hero > .compose { grid-column: 4 / span 6; grid-row: 3; }
  .hero > .state { grid-column: 4 / span 6; grid-row: 4; }
  .hero > .rail { grid-column: 10 / -1; grid-row: 3 / span 2; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr 1fr 1.35fr; }
  .hero > .pic { grid-column: 1 / span 3; grid-row: 3; min-height: 0; }
  .hero > .facts { grid-column: 1 / span 3; grid-row: 4; }
  .rail__ex { min-height: 0; }

  .stages { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .stage { grid-column: span 2; }
  .stage--dana { grid-column: span 4; }
  .board > .desk__rules { grid-column: 1 / span 8; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pane--read, .pane--draft { grid-column: 1 / -1; }
  .pane .pane__head, .desk__dana .pane__head { margin: 0; padding: 0; background: none; }
  .pane--draft .pane__head, .pane.is-pending .pane__head { color: inherit; }
  .pane .pane__meta { color: var(--muted); }
  .pane.is-pending .pane__meta { color: var(--ink-soft); }
  .board > .desk__dana { grid-column: 9 / -1; grid-row: 3 / span 2; padding: var(--pad); gap: 14px; }
  .board > .record { grid-column: 1 / span 8; }
  .phone { flex: 1; position: relative; min-height: 640px; width: 100%; max-width: 440px; margin-inline: auto; background: var(--ink); border-radius: 38px; }
  .phone__screen { position: absolute; inset: 10px; border-radius: 28px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

  .board > .rules__left { grid-column: 1 / span 4; }
  .board > .rules__right { grid-column: 5 / -1; }
  .board > .count__main { grid-column: 1 / span 7; }
  .board > .count__side { grid-column: 8 / -1; }
  .board > .arrive { grid-column: 1 / span 8; }
  .board > .terms { grid-column: 9 / -1; }
  .terms__list { grid-template-columns: minmax(0, 1fr); }
  .board > .foot__line { grid-column: 1 / span 8; grid-row: 2; }
  .board > .foot__more { grid-column: 9 / -1; grid-row: 2; }
}
/* wide: rules, person and record side by side under one bar */
@media (min-width: 1360px) {
  .stages { grid-column: 1 / span 9; grid-template-columns: repeat(18, minmax(0, 1fr)); }
  .stage { grid-column: span 3; }
  .stage--dana { grid-column: span 6; }
  .board > .desk__rules { grid-column: 1 / span 6; grid-row: 3; }
  .board > .desk__dana { grid-column: 7 / span 3; grid-row: 3; padding: 14px 12px 12px; }
  .board > .record { grid-column: 10 / -1; grid-row: 2 / span 2; }
  .record .pane__head { min-height: 92px; flex-direction: column; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; }
  .record > .ui { flex: 1; position: relative; min-height: 420px; }
  .record .log { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 6px; }
  .record .log__row:first-child { border-top: 0; padding-top: 0; }
  .phone { border-radius: 34px; }
  .phone__screen { inset: 8px; border-radius: 26px; }
}
@media (min-width: 1100px) and (min-height: 700px) {
  .first { min-height: min(calc(100svh - 8px), 1040px); }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* load: the headline rises, the picture is wiped clear */
  .js:not(.is-showcase) .band__title [data-line] { transform: translateY(108%); animation: line-up 800ms var(--ease-expo) forwards; animation-delay: calc(80ms + var(--i) * 90ms); }
  .js:not(.is-showcase) .pic[data-open] { clip-path: inset(0 0 100% 0); animation: wipe 1000ms var(--ease-in-out) 200ms forwards; }
  .js:not(.is-showcase) .pic[data-open] .pic__svg { transform: scale(1.08); animation: settle 1200ms var(--ease-expo) 200ms forwards; }
  .js:not(.is-showcase) .rail__send { animation: rise 500ms var(--ease-out) 460ms both; }
  .pic.is-seen .pic__arm { animation: swing 2600ms var(--ease-in-out) 1400ms infinite alternate; }
  .is-showcase .pic .pic__arm { animation: none; }

  /* scroll: each part of a section arrives in its own way, once.
     .pre is set by the script just before a part comes into view, so anything not yet reached stays visible. */
  .pre[data-reveal] { transform: translateY(32px); }
  .pre.is-in[data-reveal] { transform: none; transition: transform 900ms var(--ease-expo) var(--d, 0ms); }
  .pre.bar[data-reveal] { transform: translateX(-28px); }
  .pre.is-in.bar[data-reveal] { transform: none; }
  .pre.giant[data-reveal], .pre.mark[data-reveal] { transform: none; }
  .pre.giant .giant__rise { transform: translateY(104%); }
  .pre.is-in.giant .giant__rise { transform: none; transition: transform 900ms var(--ease-expo) 80ms; }
  .pre.mark span { transform: scaleY(0.3); }
  .pre.is-in.mark span { transform: none; transition: transform 700ms var(--ease-expo); transition-delay: calc(var(--n, 0) * 45ms); }
  .mark span:nth-child(2) { --n: 1; } .mark span:nth-child(3) { --n: 2; } .mark span:nth-child(4) { --n: 3; } .mark span:nth-child(5) { --n: 4; }
  .mark span:nth-child(6) { --n: 5; } .mark span:nth-child(7) { --n: 6; } .mark span:nth-child(8) { --n: 7; } .mark span:nth-child(9) { --n: 8; }
  .mark span:nth-child(10) { --n: 9; } .mark span:nth-child(11) { --n: 10; }

  /* the squeegee: a pane is wiped clear, top to bottom, when its step runs */
  .pane.is-live .pane__body { overflow: hidden; }
  .pane.is-live .pane__body::after {
    content: ""; position: absolute; inset: 0 -1px;
    background: var(--white); border-top: 7px solid var(--azure);
    animation: squeegee 760ms var(--ease-in-out) both;
  }
  .pane.is-live .mk { animation: mark-in 320ms ease both; animation-delay: calc(760ms + var(--i) * 170ms); }
  .pane.is-live .fact { animation: rise 420ms var(--ease-out) both; animation-delay: calc(820ms + var(--i) * 150ms); }
  .pane.is-live .ck { animation: rise 420ms var(--ease-out) both; animation-delay: calc(500ms + var(--i) * 110ms); }
  [data-ui] .q.is-new { animation: arrive 700ms var(--ease-expo) both; }
  [data-ui] .log__row.is-new { animation: arrive 600ms var(--ease-expo) both; }
  .compose textarea.is-filled { animation: filled 500ms var(--ease-out); }
}
@keyframes line-up { to { transform: none; } }
@keyframes wipe { to { clip-path: inset(0); } }
@keyframes settle { to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes swing { from { transform: rotate(-6deg); } to { transform: rotate(9deg); } }
@keyframes squeegee { from { transform: translateY(0); } to { transform: translateY(101%); } }
@keyframes mark-in { from { background-color: transparent; color: inherit; } }
@keyframes arrive { from { opacity: 0; transform: translateY(-14px); background-color: var(--pale); } to { opacity: 1; transform: none; } }
@keyframes filled { from { background-color: var(--mist); } }

.is-showcase *, .is-showcase *::before, .is-showcase *::after { animation: none !important; transition: none !important; }
.is-showcase { scroll-behavior: auto !important; }
