@font-face {
  font-family: Barlow;
  src: url(assets/fonts/barlow-regular.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(assets/fonts/barlow-medium.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url(assets/fonts/barlow-semibold.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url(assets/fonts/barlow-semicondensed-medium.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(assets/fonts/plex-mono.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --night: #0e1115;
  --panel: #161b21;
  --edge: #343b45;
  --white: #f0f3f6;
  --silver: #adb8c6;
  --signal: #80c9ff;
  --paper: #f3f4f3;
  --ink: #182027;
  --muted: #505d66;
  --line: #c8d0d2;
  --good: #205f49;
  --sans: Barlow, Arial, sans-serif;
  --display: "Barlow Semi Condensed", Barlow, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(22px, 5.6vw, 88px);
  --header: 66px;
  color: var(--ink);
  background: var(--paper);
  font: 400 100%/1.5 var(--sans);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body,
p,
h1,
h2,
h3,
ol,
ul,
dl,
dd,
fieldset {
  margin: 0;
}
body {
  min-width: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
summary,
input[type="range"],
select {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
button,
summary {
  cursor: pointer;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid #298fd9;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
button {
  border: 0;
}
.wrap {
  width: min(calc(100% - 2 * var(--gutter)), 1400px);
  margin-inline: auto;
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 10;
  background: white;
  color: var(--ink);
  padding: 10px;
}
header {
  height: var(--header);
  background: var(--night);
  color: var(--white);
  border-bottom: 1px solid #2b3037;
}
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}
.mark {
  width: 35px;
  height: 35px;
}
.nav nav,
.nav nav a {
  height: 100%;
  display: flex;
  align-items: center;
}
.nav nav {
  gap: clamp(16px, 2.4vw, 40px);
}
.nav nav a {
  position: relative;
  text-decoration: none;
  color: var(--silver);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav nav a:is(:hover, [aria-current]) {
  color: var(--white);
}
.nav nav [aria-current]:after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--signal);
}
.stage {
  background: var(--night);
  color: var(--white);
  height: calc(100svh - var(--header));
  position: relative;
  isolation: isolate;
}
.stage:focus {
  outline: none;
}
.workbench {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding-block: clamp(20px, 5.4vh, 70px) clamp(12px, 2vh, 26px);
}
.command {
  display: flex;
  align-items: flex-start;
  gap: clamp(8px, 1vw, 16px);
  margin-block: 0 clamp(18px, 4vh, 54px);
  min-width: 0;
}
.prompt-sign {
  font: 400 clamp(2.3rem, 4.9vw, 5.5rem) / 0.95 var(--mono);
  color: var(--signal);
}
.command h1 {
  font: 500 clamp(2.8rem, 4.6vw, 5.4rem) / 1.02 var(--display);
  letter-spacing: -0.037em;
  flex: auto;
  min-height: 2.04em;
  max-width: 22ch;
  text-wrap: pretty;
}
#request:after {
  content: "";
  display: inline-block;
  width: 0.11em;
  height: 0.72em;
  background: var(--signal);
  margin-left: 0.08em;
}
.stage:not([data-phase="request"]) #request:after {
  display: none;
}
#edit-request {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  background: transparent;
  color: var(--silver);
  margin: 6px 0 0 auto;
  padding: 6px 0 6px 8px;
  font-size: 0.95rem;
}
#edit-request span:first-child {
  font: 1.2rem/1 var(--sans);
}
#edit-request:hover {
  color: var(--signal);
}
.working-area {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 2.55fr) minmax(218px, 1fr);
  border: 1px solid var(--edge);
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel);
}
.workspace,
.browser-frame,
.browser-canvas,
.document-stage {
  min-width: 0;
  min-height: 0;
}
.workspace {
  display: grid;
}
.browser-frame {
  display: grid;
  grid-template-rows: 45px minmax(0, 1fr);
  height: 100%;
  background: #202934;
}
.document-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  color: #d2dce5;
  background: #1c2229;
  border-bottom: 1px solid #37414b;
  font: 400 0.8rem var(--mono);
}
.window-icon {
  width: 16px;
  height: 13px;
  flex: none;
  border: 1.5px solid #a3b5c4;
  border-radius: 2px;
  background: linear-gradient(#a3b5c4, #a3b5c4) 0 3px/100% 1px no-repeat;
}
#address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.history {
  display: flex;
  gap: 2px;
}
.history button {
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--white);
  font: 1.4rem/1 var(--sans);
  width: 30px;
  height: 32px;
  border-radius: 3px;
}
.history button:hover:enabled {
  background: #34414d;
}
.history button:disabled {
  color: #6f7c8a;
}
.browser-canvas {
  display: grid;
  place-items: center;
  padding: clamp(16px, 3.2vw, 52px);
  position: relative;
  isolation: isolate;
  background-color: #1a232e;
  background-image:
    radial-gradient(ellipse at 30% 5%, #344a6055, transparent 68%),
    radial-gradient(#62718360 0.8px, transparent 1px);
  background-size:
    auto,
    10px 10px;
}
.document-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 470px;
  display: grid;
  align-content: center;
}
.source-page {
  position: relative;
  overflow: hidden;
  color: #2b302d;
  background: #f4f1e8;
  box-shadow: 0 10px 30px #070d1744;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  width: 100%;
  align-self: stretch;
  border-radius: 3px;
  max-height: 410px;
}
.document-stage:has(.source-page) {
  grid-template-rows: minmax(0, 1fr);
}
.source-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 clamp(14px, 2vw, 28px);
  border-bottom: 1px solid #27322a33;
}
.source-mast strong {
  font:
    normal clamp(1.15rem, 1.8vw, 1.65rem) / 1.1 Georgia,
    serif;
  letter-spacing: -0.045em;
}
.source-mast span {
  font: 0.73rem/1.2 var(--mono);
}
.source-body {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 1fr);
  min-height: 0;
}
.source-photo {
  min-height: 0;
  background: url(assets/dining-room.webp) 52% 52% / cover;
}
.document-stage[data-venue="linden"] .source-photo {
  background-image: url(assets/linden-house.webp);
}
.page-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(6px, 1.15vh, 16px);
  padding: clamp(12px, 2.4vw, 38px);
  min-width: 0;
}
.page-kicker {
  font: 0.78rem/1.4 var(--mono);
  color: #515d55;
}
.page-title {
  font:
    normal clamp(2.05rem, 3.5vw, 4rem) / 1.03 Georgia,
    serif;
  letter-spacing: -0.057em;
}
.page-detail {
  font-size: clamp(0.98rem, 1.24vw, 1.16rem);
  line-height: 1.38;
}
.page-content :is(p, span, div):empty {
  display: none;
}
.document-stage[data-sheet="receipt"][data-outcome="eligible"] .page-title {
  font-size: clamp(3.1rem, 5.7vw, 6.7rem);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.document-stage[data-sheet="menu"][data-venue="linden"] .source-page {
  background: #f4f0de;
}
.document-stage[data-sheet="menu"][data-venue="maison"] .source-page {
  background: #203c31;
  color: #f5f0df;
}
.document-stage[data-sheet="menu"][data-venue="maison"] .page-kicker {
  color: #c5d4c4;
}
.document-stage[data-sheet="menu"][data-venue="maison"] .source-mast {
  border-color: #e1e2cb55;
}
.document-stage[data-sheet="review"] .source-mast strong {
  text-transform: uppercase;
  font: 600 clamp(1rem, 1.9vw, 1.7rem) / 1 var(--display);
  letter-spacing: 0.015em;
}
.document-stage[data-sheet="review"] .source-page {
  background: #f8f4ee;
  border-top: 4px solid #892c2f;
}
.document-stage[data-sheet="review"] .page-kicker {
  color: #843434;
}
.document-stage[data-sheet="inventory"] .page-title {
  color: #7b4136;
}
.document-stage:is([data-sheet="reference"], [data-sheet="cafe"]) .source-page {
  background: white;
  grid-template-rows: minmax(0, 1fr);
}
.document-stage:is([data-sheet="reference"], [data-sheet="cafe"])
  :is(.source-mast, .reading-surface, .source-photo) {
  display: none;
}
.document-stage:is([data-sheet="reference"], [data-sheet="cafe"]) .source-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.source-crop,
.source-crop picture,
.source-crop img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.source-crop img {
  object-fit: contain;
}
.document-stage[data-sheet="calculation"] .source-page,
.document-stage[data-sheet="receipt"][data-outcome="none"] .source-page {
  background: #171f28;
  color: var(--white);
}
.document-stage[data-sheet="calculation"] :is(.source-mast, .page-kicker),
.document-stage[data-sheet="receipt"][data-outcome="none"]
  :is(.source-mast, .page-kicker) {
  color: var(--silver);
  border-color: var(--edge);
}
.document-stage[data-sheet="calculation"] .source-mast strong,
.document-stage[data-sheet="receipt"][data-outcome="none"] .source-mast strong {
  font: 500 1.1rem var(--sans);
}
.document-stage[data-sheet="calculation"] .source-body,
.document-stage[data-sheet="receipt"][data-outcome="none"] .source-body {
  grid-template-columns: 1fr;
}
.document-stage[data-sheet="calculation"] .source-photo,
.document-stage[data-sheet="receipt"][data-outcome="none"] .source-photo {
  display: none;
}
.document-stage[data-sheet="calculation"] .page-title,
.document-stage[data-sheet="receipt"][data-outcome="none"] .page-title {
  font: 500 clamp(1.7rem, 3vw, 3.5rem) / 1 var(--display);
  letter-spacing: -0.025em;
}
.openings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  font: 400 0.77rem/1.4 var(--mono);
}
.openings > span {
  border: 1px solid #aeb6ad;
  border-radius: 3px;
  padding: 5px 8px;
}
.openings .eligible {
  border-color: #285740;
  background: #d7e3d6;
}
.document-stage[data-sheet="calculation"] .openings {
  gap: 0;
  margin-top: 5px;
}
.document-stage[data-sheet="calculation"] .openings > span {
  flex: 1;
  border-radius: 0;
  padding: 8px 5px;
  border: 0;
  border-top: 1px solid #566574;
  color: #c0cddb;
}
.document-stage[data-sheet="calculation"] .openings .eligible {
  background: transparent;
  color: var(--signal);
  border-color: var(--signal);
}
.openings b,
.openings small {
  display: block;
  margin-top: 4px;
}
.openings b {
  font-weight: 400;
}
.openings small {
  font: 400 0.8rem var(--sans);
}
.reserve-action,
.primary {
  padding: 9px 14px;
  border-radius: 3px;
  background: #254836;
  color: white;
  font: 500 1rem/1.2 var(--sans);
}
.document-stage[data-phase="click"] .reserve-action {
  background: #41674e;
  box-shadow: 0 0 0 3px #56835a44;
}
.agent-pointer {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transition:
    top 0.15s ease-out,
    left 0.15s ease-out;
  color: #152a3c;
}
.agent-pointer i {
  display: block;
  width: 17px;
  height: 22px;
  background: #83caff;
  clip-path: polygon(0 0, 97% 55%, 50% 63%, 31% 99%);
  filter: drop-shadow(0 1px 1px #192323);
}
.agent-pointer span {
  display: block;
  position: absolute;
  top: 15px;
  left: 11px;
  background: #83caff;
  padding: 2px 5px;
  border-radius: 2px;
  font: 600 0.7rem/1 var(--sans);
  box-shadow: 0 1px 4px #23344555;
}
.document-stage[data-sheet="brief"] .source-page,
.brief-page {
  display: none;
}
.document-stage[data-sheet="brief"] .brief-page {
  display: flex;
  align-self: center;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  width: min(100%, 530px);
  justify-self: center;
}

.parameters,
.parameters {
  gap: 12px;
}
.parameters > div {
  flex: 1;
  text-align: center;
  padding: 12px 4px;
  background: #1b2632;
  border: 1px solid #435665;
  border-radius: 4px;
}
.parameters small {
  display: block;
  color: var(--silver);
  font: 0.78rem var(--mono);
}
.parameters strong {
  display: block;
  font: 500 clamp(1.2rem, 2.2vw, 2.2rem) / 1.3 var(--display);
}

.sample-note {
  padding-left: clamp(10px, 1.5vw, 22px);
  border-left: 1px solid var(--edge);
}

/* Evidence, journal and benchmark records share the same margins as the workspace. */
.results,
.bench,
.records,
.article-grid {
  padding-block: clamp(42px, 6vw, 90px);
}
.section-head,
.masthead,
.related,
footer,
.article-links,
.sources,
.source-links,
.dialog-head {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
h2,
.story-title h1,
.masthead h1 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.section-head h2,
.records h2 {
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
}
.outline,
.article-links a {
  border: 1px solid #89969e;
  padding: 8px 14px;
  border-radius: 4px;
  background: transparent;
  font-size: 0.96rem;
  font-weight: 500;
  text-decoration: none;
}
.outline:hover,
.article-links a:hover {
  background: #e3e8e9;
}
.rationale,
.section-head + p,
.source-notes p,
.method p {
  max-width: 64ch;
  margin: 16px 0;
  color: var(--muted);
  font-size: 1.08rem;
}
.kicker {
  font: 0.8rem/1.45 var(--mono);
  color: var(--muted);
  margin-bottom: 7px;
}
.slot-analysis {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 3fr;
  gap: 22px;
  align-items: baseline;
  margin: 32px 0 18px;
  border-block: 1px solid var(--line);
  padding: 18px 0;
}
.slot-analysis ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: clamp(10px, 4vw, 80px);
}
.slot-analysis li {
  font-size: 0.9rem;
  color: var(--muted);
}
.slot-analysis strong {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
}
.slot-analysis .selected,
.slot-analysis .selected strong,
.pass {
  color: var(--good);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
thead th {
  font: 400 0.78rem var(--mono);
  color: var(--muted);
}
th,
td {
  padding: 16px 14px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.shortlist tbody th {
  font-weight: 600;
}
.shortlist small {
  display: block;
  font-weight: 400;
  color: var(--muted);
}
.pill {
  font-weight: 500;
}
.muted {
  color: var(--muted);
}
.source-notes,
.records details,
.method {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  font-weight: 500;
}
.source-links,
.article-links,
.sources {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.related {
  border-block: 1px solid var(--line);
  padding-block: 24px;
}
.related a {
  text-decoration: none;
  flex: 1;
  font: 500 clamp(1.2rem, 2vw, 2rem) / 1.2 var(--display);
}
.related small {
  display: block;
  margin-bottom: 6px;
  font: 400 0.8rem var(--mono);
  color: var(--muted);
}
footer {
  padding-block: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}
footer nav {
  display: flex;
  gap: 18px;
}
footer a {
  text-decoration: none;
}
dialog {
  background: var(--panel);
  color: var(--white);
  border: 1px solid #56606a;
  border-radius: 8px;
  padding: 24px;
  width: min(400px, 94vw);
  max-height: 90svh;
}
dialog::backdrop {
  background: #06090dc9;
}
.dialog-head {
  justify-content: flex-end;
  float: right;
}
.dialog-head button {
  font: 1.5rem/1 var(--sans);
  background: transparent;
  padding: 4px;
  color: var(--silver);
}
dialog h2 {
  font-size: 2.2rem;
  margin: 0 0 12px;
}
dialog form > p {
  color: var(--silver);
}
dialog label {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  font-weight: 500;
}
select {
  padding: 8px 12px;
  background: #222c36;
  border: 1px solid #687887;
  border-radius: 3px;
  color: var(--white);
}
.primary {
  margin-top: 23px;
  width: 100%;
  background: #a6d7f9;
  color: #102431;
}
.story-title,
.calibration {
  background: var(--night);
  color: var(--white);
}
.story-title {
  padding-block: clamp(44px, 8vw, 138px);
  border-bottom: 1px solid var(--edge);
}
.story-title .kicker,
.calibration .kicker {
  color: var(--signal);
}
.story-title h1,
.masthead h1 {
  font-size: clamp(3.3rem, 7.2vw, 7.2rem);
}
.story-title h1 {
  max-width: 15ch;
}
.story-title p:not(.kicker) {
  color: var(--silver);
  font-size: 1.2rem;
  margin-block: 18px;
}
.story-title a,
.calibration a {
  color: var(--signal);
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(230px, 66ch) 0.8fr;
  gap: clamp(20px, 3vw, 54px);
}
.article-grid nav {
  display: grid;
  align-self: start;
  justify-items: start;
  gap: 8px;
  color: var(--muted);
}
.article-grid nav p {
  font-weight: 600;
  color: var(--ink);
}
.article-grid h2 {
  font-size: 2.15rem;
  margin: 30px 0 12px;
}
.article-grid p {
  line-height: 1.58;
  font-size: 1.12rem;
}
.article-grid .lede {
  font-size: 1.43rem;
}
.article-links {
  margin-top: 25px;
}
.masthead {
  align-items: end;
  gap: 24px;
  padding-block: clamp(35px, 6vw, 90px) 30px;
}
.page-description {
  max-width: 32ch;
  color: var(--muted);
  font-size: 1.1rem;
}
.calibration {
  display: grid;
  grid-template-columns: auto minmax(0, 68ch);
  gap: clamp(24px, 6vw, 104px);
  align-items: center;
  padding: clamp(20px, 4vw, 60px);
  border-radius: 5px;
}
.calibration h2 {
  font-size: clamp(2rem, 3.2vw, 3.4rem);
}
.calibration p {
  color: var(--silver);
  margin: 12px 0;
}
.score {
  font: 500 clamp(5.5rem, 10vw, 11rem) / 0.94 var(--display);
  letter-spacing: -0.07em;
  color: var(--white);
  white-space: nowrap;
}
.score span {
  font-size: 0.55em;
  color: var(--silver);
}
.stage-filter {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 2px;
  margin: 4px 0 12px;
  gap: 2px;
  border-radius: 4px;
}
.stage-filter button {
  background: transparent;
  padding: 7px 14px;
  border-radius: 2px;
}
.stage-filter [aria-pressed="true"] {
  background: var(--night);
  color: var(--white);
}
.ledger td:first-child,
.ledger td:last-child,
.records dd {
  font-family: var(--mono);
  font-size: 0.9rem;
}
.records {
  padding-top: 0;
}
.records h2 {
  margin-bottom: 16px;
}
.records dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 18px;
  padding: 12px 0;
}
.records details:target {
  border-color: #387caa;
}

@media (max-width: 980px) {
  :root {
    --gutter: clamp(20px, 3.3vw, 38px);
  }
  .working-area {
    grid-template-columns: minmax(0, 1fr) 225px;
  }
  .browser-canvas {
    padding: 20px;
  }
  .command h1 {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
  }
  .page-content {
    padding: 16px;
  }
  .source-body {
    grid-template-columns: minmax(0, 28%) minmax(0, 1fr);
  }
  .article-grid {
    grid-template-columns: minmax(130px, 0.55fr) minmax(250px, 2fr);
  }
}
@media (max-width: 720px), (min-height: 850px) and (max-width: 850px) {
  :root {
    --header: 54px;
    --gutter: clamp(16px, 4.1vw, 28px);
  }
  .brand {
    gap: 7px;
    font-size: 1rem;
  }
  .mark {
    width: 29px;
    height: 29px;
  }
  .nav {
    gap: 8px;
  }
  .nav nav {
    gap: clamp(10px, 3vw, 18px);
  }
  .nav nav a {
    font-size: 0.88rem;
  }
  .workbench {
    padding-block: clamp(16px, 3.3svh, 34px) 10px;
  }
  .command {
    gap: 8px;
    margin: 0 0 clamp(14px, 3.2svh, 32px);
    position: relative;
    padding-right: 25px;
    min-height: 2em;
  }
  .prompt-sign {
    font-size: 2.2rem;
  }
  .command h1 {
    font-size: clamp(1.95rem, 7.9vw, 3.5rem);
    max-width: 24ch;
    min-height: 3.06em;
    letter-spacing: -0.035em;
  }
  #edit-request {
    position: absolute;
    right: -3px;
    top: 0;
    margin: 0;
    width: 32px;
    height: 34px;
    padding: 2px;
    justify-content: center;
  }
  #edit-request span:last-child {
    display: none;
  }
  .working-area {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    border-radius: 6px;
  }
  .browser-frame {
    grid-template-rows: 38px minmax(0, 1fr);
  }
  .document-bar {
    padding-inline: 10px;
    gap: 8px;
  }
  .browser-canvas {
    padding: clamp(12px, 3vw, 30px);
  }
  .document-stage {
    max-width: 620px;
    max-height: 520px;
  }
  .source-page {
    max-height: none;
    grid-template-rows: 42px minmax(0, 1fr);
  }
  .source-mast {
    padding-inline: 12px;
  }
  .source-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.82fr) minmax(min-content, 1fr);
  }
  .page-content {
    padding: clamp(12px, 4vw, 26px);
    gap: 7px;
  }
  .source-photo {
    background-position: center 55%;
  }
  .page-title {
    font-size: clamp(1.95rem, 7vw, 3.4rem);
  }
  .document-stage[data-sheet="receipt"][data-outcome="eligible"] .page-title {
    font-size: clamp(3rem, 12vw, 5rem);
  }
  .document-stage[data-sheet="calculation"] .source-body,
  .document-stage[data-sheet="receipt"][data-outcome="none"] .source-body {
    grid-template-rows: 1fr;
  }

  .sample-note {
    grid-column: 1/3;
    border: 0;
    padding: 4px 0;
    margin: 0;
  }

  .slot-analysis {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .slot-analysis ul {
    justify-content: space-between;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .article-grid nav {
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }
  .calibration {
    grid-template-columns: 1fr;
  }
  .masthead {
    display: grid;
  }
}
@media (max-width: 660px) {
  .ledger,
  .ledger tbody,
  .ledger tr,
  .shortlist,
  .shortlist tbody,
  .shortlist tr {
    display: block;
  }
  .ledger thead,
  .shortlist thead {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .ledger tr,
  .shortlist tr {
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .ledger td,
  .shortlist td,
  .shortlist tbody th {
    display: block;
    border: 0;
    padding: 2px 0;
  }
  .ledger td {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
  .ledger td:before {
    content: attr(data-label);
    font: 400 0.9rem var(--sans);
    color: var(--muted);
  }
  .shortlist tbody th {
    padding-bottom: 5px;
  }
  .section-head {
    align-items: end;
  }
  .outline {
    padding: 7px 10px;
  }
}
@media (max-width: 720px) and (max-height: 700px) {
  :root {
    --header: 48px;
    --gutter: 12px;
  }
  .command {
    margin-bottom: 10px;
  }
  .command h1 {
    font-size: 1.72rem;
    min-height: 2.08em;
  }
  .prompt-sign {
    font-size: 1.85rem;
  }
  .workbench {
    padding-block: 10px 6px;
  }
  .browser-canvas {
    padding: 9px;
  }
  .browser-frame {
    grid-template-rows: 31px minmax(0, 1fr);
  }
  .source-page {
    grid-template-rows: 32px minmax(0, 1fr);
  }
  .source-body {
    grid-template-rows: minmax(0, 0.45fr) minmax(min-content, 1fr);
  }
  .source-mast strong {
    font-size: 1.08rem;
  }
  .source-mast span {
    font-size: 0.71rem;
  }
  .page-content {
    padding: 9px 12px;
    gap: 4px;
  }
  .page-title {
    font-size: 1.65rem;
  }
  .page-detail {
    font-size: 0.93rem;
  }

  .brand {
    gap: 5px;
    font-size: 0.94rem;
  }
  .mark {
    width: 26px;
  }
}
@media (min-width: 721px) and (max-height: 610px) {
  :root {
    --header: 40px;
    --gutter: 24px;
  }
  .workbench {
    padding-block: 6px;
  }
  .command {
    margin-bottom: 6px;
    align-items: center;
  }
  .command h1 {
    font-size: clamp(1.45rem, 3vw, 2.7rem);
    min-height: 1.1em;
    max-width: none;
  }
  .prompt-sign {
    font-size: 1.7rem;
  }
  #edit-request {
    margin: 0;
    padding-block: 2px;
  }
  .working-area {
    grid-template-columns: minmax(0, 2.5fr) minmax(190px, 1fr);
  }
  .browser-frame {
    grid-template-rows: 31px minmax(0, 1fr);
  }
  .browser-canvas {
    padding: 9px 18px;
  }

  .source-page {
    grid-template-rows: 32px minmax(0, 1fr);
  }
  .source-mast strong {
    font-size: 1.2rem;
  }
  .page-content {
    padding: 8px 14px;
    gap: 3px;
  }
  .page-title {
    font-size: 1.9rem;
  }
  .page-detail {
    font-size: 0.9rem;
  }
  .reserve-action {
    padding: 6px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
/* Invisible full text reserves the actual request's line breaks while it types. */
.command h1 {
  display: grid;
  min-height: 0;
  align-content: start;
}
.command h1:before,
#request {
  grid-area: 1/1;
}
.command h1:before {
  content: attr(data-prompt);
  visibility: hidden;
  pointer-events: none;
}
.workspace,
.browser-frame,
.browser-canvas,
.document-stage,
.source-page {
  grid-template-columns: minmax(0, 1fr);
}
.browser-canvas {
  min-width: 0;
}
.reading-surface {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.page-content {
  height: 100%;
}
.menu-lead {
  display: none;
}
.document-stage[data-sheet="menu"] .menu-lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 83%;
  padding: clamp(12px, 2.4vw, 38px);
  gap: 8px;
}
.menu-lead small {
  font: 0.78rem var(--mono);
}
.menu-lead span {
  font:
    1.6rem/1.1 Georgia,
    serif;
  letter-spacing: -0.035em;
}
.parameters strong {
  transition:
    opacity 0.16s,
    transform 0.16s;
}
.parameters [data-ready="false"] strong {
  opacity: 0;
  transform: translateY(3px);
}
.document-stage[data-sheet="review"] .page-detail,
.document-stage[data-sheet="menu"] .page-title {
  text-decoration: underline;
  text-decoration-color: #79aed6;
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.13em;
  text-decoration-skip-ink: auto;
}
@media (max-width: 720px), (min-height: 850px) and (max-width: 850px) {
  .working-area {
    grid-template-columns: minmax(0, 1fr);
  }
  .source-body {
    grid-template-rows: minmax(0, 0.78fr) minmax(0, 1.22fr);
  }
  .document-stage[data-sheet="reservation"] .source-body {
    grid-template-rows: minmax(0, 0.6fr) minmax(0, 1.4fr);
  }
  .document-stage[data-sheet="calculation"] .source-body,
  .document-stage[data-sheet="receipt"][data-outcome="none"] .source-body {
    grid-template-rows: 1fr;
  }
}
@media (max-width: 720px) and (max-height: 700px) {
  .source-body,
  .document-stage[data-sheet="reservation"] .source-body {
    grid-template-rows: minmax(0, 0.45fr) minmax(0, 1.55fr);
  }
  .document-stage[data-sheet="calculation"] .source-body,
  .document-stage[data-sheet="receipt"][data-outcome="none"] .source-body {
    grid-template-rows: 1fr;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .document-stage[data-phase="click"][data-outcome="eligible"]
    .agent-pointer:before {
    content: "";
    position: absolute;
    left: -10px;
    top: -10px;
    width: 19px;
    height: 19px;
    border: 1px solid #64baff;
    border-radius: 50%;
    animation: click-ring 0.3s ease-out both;
  }
  @keyframes click-ring {
    from {
      transform: scale(0.25);
      opacity: 1;
    }
    to {
      transform: scale(1.6);
      opacity: 0;
    }
  }
}
/* One conversation holds the live team, the active page and the user's next turn. */
.session-page .workbench {
  padding-block: clamp(14px, 3.6vh, 50px) clamp(8px, 1.8vh, 20px);
}
.session-page .command {
  margin-bottom: clamp(14px, 2.8vh, 32px);
}
.session-page .command h1 {
  max-width: 32ch;
  font-size: clamp(2.55rem, 4.1vw, 4.8rem);
}
.session-page .working-area {
  grid-template-columns: minmax(242px, 0.95fr) minmax(0, 2fr);
  grid-template-rows: minmax(0, 1fr);
  border-color: #39434c;
  border-radius: 8px;
}
.agent-bay {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  border-right: 1px solid #3c444b;
}
.bay-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e6edf1;
  padding: 0 15px;
  background: #1c2229;
  border-bottom: 1px solid #37414b;
  font-weight: 500;
}
.fork-mark {
  font: 1.4rem var(--mono);
  color: #b8d2e7;
}
.session-page .browser-frame {
  grid-template-rows: 44px minmax(0, 1fr);
}
.browser-canvas {
  overflow: hidden;
  grid-template-areas: "page";
  background-color: #182029;
  background-image:
    radial-gradient(ellipse at 52% 55%, #4e60734f, transparent 69%),
    linear-gradient(140deg, #263440, #17212a);
}
.document-stage {
  grid-area: page;
  z-index: 1;
}
.departing-page {
  z-index: 0;
  pointer-events: none;
}
.thread-dock {
  padding-top: clamp(10px, 1.9vh, 24px);
  min-width: 0;
  position: relative;
}
.reply-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin-bottom: 9px;
}
.reply-row img {
  flex: none;
  width: 25px;
  height: 25px;
}
#reply {
  line-height: 1.32;
  font: 500 clamp(1.03rem, 1.45vw, 1.38rem) / 1.3 var(--sans);
  text-wrap: pretty;
}
#view-shortlist {
  margin-left: auto;
  flex: none;
  font-size: 0.94rem;
  color: var(--silver);
}
#view-shortlist:hover {
  color: var(--signal);
}
#composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 15px;
  min-width: 0;
  border: 1px solid #46535e;
  border-radius: 8px;
  background: #192029;
  transition: border-color 0.15s;
}
#composer:focus-within {
  border-color: #91c9f0;
  box-shadow: 0 0 0 1px #80c9ff28;
}
#composer input {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 7px 2px;
  color: var(--white);
  font: 400 1.03rem/1.25 var(--sans);
}
#composer input::placeholder {
  color: #a8b6c3;
  opacity: 1;
}
#task-control,
#send {
  flex: none;
  border-radius: 4px;
  padding: 7px 12px;
  font: 500 0.94rem/1.15 var(--sans);
}
#task-control {
  color: #dde5ec;
  background: #27313b;
}
#task-control:hover {
  background: #364450;
}
#send {
  background: #badcf3;
  color: #162733;
}
#send:disabled {
  background: #35404c;
  color: #c3cdd5;
  cursor: default;
}
.sample-note {
  display: block;
  font: 0.76rem/1.2 var(--mono);
  color: #a4b4c1;
  margin-top: 6px;
  text-align: right;
  padding: 0;
  border: 0;
}
#question-turn {
  font: 500 0.87rem/1.25 var(--sans);
  justify-self: end;
  margin-bottom: 3px;
  color: var(--signal);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}
#question-turn:before {
  content: "You · ";
  color: var(--silver);
}
.brief-sheets {
  width: min(90%, 430px);
  height: clamp(84px, 17vh, 150px);
  position: relative;
  margin-bottom: 14px;
}
.brief-sheet {
  position: absolute;
  top: 3%;
  width: 52%;
  height: 91%;
  overflow: hidden;
  background: #ede8db;
  color: #302b23;
  box-shadow: 0 6px 15px #0004;
  border-radius: 3px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  letter-spacing: -0.03em;
  font:
    clamp(0.9rem, 1.45vw, 1.4rem) / 1.2 Georgia,
    serif;
}
.brief-sheet i {
  background: url(assets/linden-house.webp) center/cover;
}
.brief-sheet span {
  padding: 5px 9px;
}
.brief-linden {
  left: 2%;
  transform: rotate(-5deg) translateY(3px);
}
.brief-maison {
  right: 2%;
  transform: rotate(4deg);
}
.brief-maison i {
  background-image: url(assets/dining-room.webp);
}
.parameters {
  max-width: 470px;
}
.document-stage[data-sheet="brief"] .brief-page {
  width: 100%;
  height: 100%;
  justify-content: center;
}
@media (min-width: 721px) and (min-height: 611px) and (max-width: 980px) {
  .session-page .working-area {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.85fr);
  }
}
@media (max-width: 720px), (min-height: 850px) and (max-width: 850px) {
  .session-page .workbench {
    padding-block: clamp(10px, 2vh, 24px) 8px;
  }
  .session-page .command {
    margin-bottom: clamp(10px, 1.8vh, 20px);
  }
  .session-page .command h1 {
    font-size: clamp(1.85rem, 7.3vw, 3.5rem);
  }
  .session-page .working-area {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(72px, 12vh, 112px) minmax(0, 1fr);
  }
  .agent-bay {
    grid-template-rows: minmax(0, 1fr);
    border: 0;
    border-bottom: 1px solid #4a545d;
  }
  .bay-title {
    display: none;
  }
  .session-page .browser-frame {
    grid-template-rows: 34px minmax(0, 1fr);
  }
  .thread-dock {
    padding-top: 9px;
  }
  .reply-row {
    gap: 6px;
    align-items: flex-start;
    margin-bottom: 7px;
  }
  .reply-row img {
    width: 18px;
    height: 21px;
  }
  #reply {
    font-size: 0.98rem;
  }
  #view-shortlist {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 0.79rem;
  }
  #composer {
    padding: 4px 4px 4px 9px;
    gap: 5px;
  }
  #composer input {
    font-size: 1rem;
  }
  #send,
  #task-control {
    padding: 7px 9px;
    font-size: 0.85rem;
  }
  .sample-note {
    font-size: 0.7rem;
    margin-top: 6px;
    line-height: 1.4;
  }
}
@media (max-width: 720px) and (max-height: 700px) {
  .session-page .working-area {
    grid-template-rows: 68px minmax(0, 1fr);
  }
  .session-page .workbench {
    padding-block: 5px 4px;
  }
  .session-page .command h1 {
    font-size: 1.48rem;
  }
  .session-page .command {
    margin-bottom: 5px;
  }
  .session-page .browser-frame {
    grid-template-rows: 27px minmax(0, 1fr);
  }
  .thread-dock {
    padding-top: 4px;
  }
  .reply-row {
    margin-bottom: 4px;
  }
  #reply {
    font-size: 0.92rem;
    line-height: 1.15;
  }
  #composer input {
    padding-block: 5px;
  }
  .brief-sheets {
    height: 69px;
    margin-bottom: 7px;
  }
  .parameters > div {
    padding: 4px 0;
  }
  .agent-pointer span {
    font-size: 0.6rem;
  }
}
@media (min-width: 721px) and (max-height: 610px) {
  .session-page .workbench {
    padding-block: 4px;
  }
  .session-page .command {
    margin-bottom: 4px;
  }
  .session-page .command h1 {
    font-size: 1.65rem;
    max-width: none;
  }
  .session-page .working-area {
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 2fr);
  }
  .agent-bay {
    grid-template-rows: minmax(0, 1fr);
  }
  .bay-title {
    display: none;
  }
  .session-page .browser-frame {
    grid-template-rows: 27px minmax(0, 1fr);
  }
  .thread-dock {
    padding-top: 3px;
  }
  .reply-row {
    margin-bottom: 3px;
  }
  #reply {
    font-size: 1rem;
  }
  .reply-row img {
    width: 18px;
    height: 18px;
  }
  #composer {
    padding-block: 2px;
  }
  #composer input,
  #send,
  #task-control {
    padding-block: 5px;
  }
  .sample-note {
    margin-top: 3px;
    font-size: 0.68rem;
  }
  .brief-sheets {
    height: 66px;
    margin-bottom: 6px;
  }
  .parameters > div {
    padding: 3px 0;
  }
}
.browser-canvas {
  background-size: auto;
  background-repeat: no-repeat;
}
.parameters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}
@media (max-width: 720px), (min-height: 850px) and (max-width: 850px) {
  .reply-row {
    min-height: 2.66rem;
  }
}
@media (max-width: 720px) and (max-height: 700px) {
  .reply-row {
    min-height: 2.12rem;
  }
}
@media (min-width: 560px) and (max-width: 720px) and (max-height: 480px) and (orientation: landscape) {
  :root {
    --header: 38px;
    --gutter: 15px;
  }
  .session-page .workbench {
    padding-block: 4px;
  }
  .session-page .command {
    margin: 0 0 5px;
    align-items: center;
  }
  .session-page .command h1 {
    font-size: 1.35rem;
    max-width: none;
  }
  .session-page .prompt-sign {
    font-size: 1.45rem;
  }
  .session-page .working-area {
    grid-template-columns: minmax(145px, 0.75fr) minmax(0, 1.8fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .agent-bay {
    border-bottom: 0;
    border-right: 1px solid var(--edge);
  }
  .session-page .browser-frame {
    grid-template-rows: 26px minmax(0, 1fr);
  }
  .browser-canvas {
    padding: 5px 8px;
  }
  .document-stage .source-body {
    grid-template-columns: 24% minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .document-stage:is(
      [data-sheet="calculation"],
      [data-outcome="none"][data-sheet="receipt"],
      [data-sheet="cafe"],
      [data-sheet="reference"]
    )
    .source-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .document-stage[data-sheet="reservation"] .source-body {
    grid-template-rows: minmax(0, 1fr);
  }
  .source-page {
    grid-template-rows: 28px minmax(0, 1fr);
  }
  .page-content {
    padding: 6px 9px;
    gap: 3px;
  }
  .document-stage .page-title {
    font-size: 1.5rem;
  }
  .document-stage[data-sheet="receipt"][data-outcome="eligible"] .page-title {
    font-size: 2.45rem;
  }
  .document-stage[data-sheet="calculation"] .page-title {
    font-size: 1.5rem;
  }
  .openings > span {
    padding: 2px 4px;
  }
  .thread-dock {
    padding-top: 3px;
  }
  .reply-row {
    min-height: 0;
    align-items: center;
    margin-bottom: 3px;
  }
  #view-shortlist {
    position: static;
    margin-left: auto;
  }
  #composer {
    padding: 2px 5px 2px 10px;
  }
  #composer input,
  #send,
  #task-control {
    padding-block: 4px;
  }
  .sample-note {
    margin-top: 2px;
  }
}
@media (max-width: 559px) and (max-height: 535px) {
  .document-stage[data-sheet="reservation"] .source-photo {
    display: none;
  }
  .document-stage[data-sheet="reservation"] .source-body {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
  }
  .document-stage[data-sheet="calculation"] .page-content,
  .document-stage[data-sheet="reservation"] .page-content {
    padding: 5px 8px;
    gap: 2px;
  }
  .document-stage[data-sheet="calculation"] .page-title {
    font-size: 1.22rem;
  }
  .document-stage[data-sheet="calculation"] .openings {
    margin: 0;
  }
  .document-stage[data-sheet="calculation"] .openings > span {
    padding: 4px;
  }
  .openings small,
  .openings b {
    margin-top: 1px;
  }
}
