/* The home page, over style.css: the page is one Yardlet window on a desk, in today's window's colors, as tall as the
   screen. The sidebar's sections are tasks; their questions and answers run down the middle, and on the right is the
   panel the answer being read speaks of. */

:root {
  --desk: #14264a;
  --win: #fcfcfc;
  --side: #f4f5f7;
  --row-on: #e0e1e3;
  --row-hover: #e9eaed;
  --text: #1e1f22;
  --text-2: #4a4c52;
  --text-3: #6a6c73;
  --line: #e4e4e4;
  --bubble: #f2f3f5;
  --bubble-ring: #dbdcde;
  --card: #ffffff;
  --card-ring: #e0e1e3;
  --card-fill: #fcfcfc;
  --link: #0a5fc9;
  --btn: #0f203b;
  --btn-hover: #22375b;
  --quiet: #eeeff1;
  --quiet-hover: #e4e5e8;
  --bar-bg: rgb(252 252 252 / 0.86);
  --diff: #ffffff;
  --film: #fbfbfb;
  --unread: #007aff;
  --lime: #b9c21f;
  --ok: #1f7a37;
  --ok-fill: #e6f6ea;
  --float: 0 0 0 1px #dcdde0, 0 6px 22px rgb(15 25 45 / 0.1);

  --side-w: 256px;
  --desk-pad: clamp(14px, 2.2vmin, 26px);
  --win-w: 1680px;
  --r-win: 16px;
  /* As tall as the screen allows, up to where the recording would no longer fill the panel it is in. */
  --win-max: min(1000px, (min(100vw - 2 * var(--desk-pad), var(--win-w)) - var(--side-w)) / 2 * 1584 / 1118 + var(--bar-h));
  --py: max(var(--desk-pad), (100vh - var(--win-max)) / 2);
  --win-h: calc(100vh - 2 * var(--py));
  /* The recording's shape decides how wide the right-hand panel is. */
  --beside: clamp(380px, (var(--win-h) - var(--bar-h)) * 1118 / 1584, 50cqw);
  --dock-h: 88px;
  --gutter: 28px;
  --t-2: 34px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #0a1530;
    --win: #191a1c;
    --side: #202124;
    --row-on: #323336;
    --row-hover: #2a2b2e;
    --text: #f1f1f3;
    --text-2: #c3c4ca;
    --text-3: #9b9ca4;
    --line: #313234;
    --bubble: #23252a;
    --bubble-ring: #3a3c40;
    --card: #232427;
    --card-ring: #37383c;
    --card-fill: #1d1e20;
    --link: #6cb0ff;
    --btn: #f1f1f3;
    --btn-hover: #ffffff;
    --quiet: #2f3034;
    --quiet-hover: #393a3f;
    --bar-bg: rgb(25 26 28 / 0.86);
    --diff: #1e1e1e;
  --film: #171719;
    --unread: #3d9bff;
    --lime: #b9c21f;
    --ok: #57d077;
    --ok-fill: #1c2e23;
    --float: 0 0 0 1px #3d3e43, 0 8px 28px rgb(0 0 0 / 0.5);
  }
}

@media (max-width: 640px) {
  :root { --t-2: 28px; --desk-pad: 0px; --r-win: 0px; --desk: var(--win); --gutter: 18px; --dock-h: 84px; }
}

html { scroll-padding-top: calc(var(--py) + var(--bar-h) + 16px); }

/* The desk and the window's frame. The page scrolls behind a frame that carries the desk, so the window's edges and
   its four corners stay where they are. */
.home { background: var(--desk) url(assets/desk.svg) center / cover fixed; }
.home .desk { padding: var(--py) max(var(--desk-pad), (100% - var(--win-w)) / 2); }
.home .desk::before {
  content: ""; position: fixed; z-index: 21; inset: var(--py) max(var(--desk-pad), (100% - var(--win-w)) / 2);
  height: auto; background: none; pointer-events: none; border-radius: var(--r-win);
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.5), 0 18px 60px rgb(4 10 24 / 0.5), inset 0 0 0 0.5px rgb(255 255 255 / 0.22);
}
.home .desk::after {
  content: ""; position: fixed; z-index: 20; inset: -60px; pointer-events: none;
  --px: max(var(--desk-pad), (100vw - var(--win-w)) / 2);
  padding: calc(var(--py) + 60px) calc(max(var(--desk-pad), (100% - var(--win-w)) / 2) + 60px);
  border-radius: calc(var(--px) + 60px + var(--r-win)) / calc(var(--py) + 60px + var(--r-win));
  background: var(--desk) url(assets/desk.svg) center / cover;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.home .win { max-width: var(--win-w); min-height: var(--win-h); border-radius: 0; box-shadow: none; }
.home .side, .home .bar { border-radius: 0; }
.home .side-inner { top: var(--py); height: var(--win-h); }

/* Sections as tasks */
.home .tasks ul { grid-template-columns: minmax(0, 1fr); }
.home .task { min-height: 31px; gap: 9px; font-size: 13.5px; }
.home .task.unread { font-weight: 600; }
.home .task.unread::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 2px 0 auto; border-radius: 50%; background: var(--unread); }

/* Title bar, over the answer's column */
.home .bar { top: var(--py); margin-right: var(--beside); border-bottom: 0; padding-left: var(--gutter); }
.home .bar-links { gap: 14px; }
.home .version a {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 9px; border-radius: 99px;
  background: var(--ok-fill); color: var(--ok); text-decoration: none; font: 600 13px/1 var(--font);
}
.home .version a::before {
  content: ""; width: 12px; height: 7px; margin: -4px 0 0 1px; border: solid currentColor; border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0.82); transform-origin: center;
}
.home .bar-title, .home .version { white-space: nowrap; }
.home .version { display: flex; }
@container (max-width: 1100px) { .home .version { display: none; } }

/* A section: the conversation, and beside it the panel. */
.view {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--beside); grid-template-rows: auto 1fr auto;
  min-height: calc(var(--win-h) - var(--bar-h)); padding-bottom: var(--dock-h); outline: 0;
}
.view + .view { border-top: 1px solid var(--line); }
.talk, .more, .home .foot { grid-column: 1; min-width: 0; padding-inline: max(var(--gutter), (100% - 580px) / 2); }
.talk { container-type: inline-size; padding-top: 14px; }
.home .ask { max-width: 100%; text-wrap: balance; padding: 9px 15px; border-radius: 13px; box-shadow: inset 0 0 0 1px var(--bubble-ring); font-size: 15px; }
/* Where the first question takes two lines, it breaks between its sentences, so its bubble hugs them. */
.home .ask br { display: none; }
@container (max-width: 545px) { .home .ask br { display: inline; } }
.home .reply { margin-top: 22px; }
.home .reply h1 { font: 700 clamp(36px, 9.5cqw, 58px)/1.02 var(--display); letter-spacing: -0.042em; max-width: none; text-wrap: nowrap; }
html:not(:lang(en)) .home .reply h1 { font-size: clamp(30px, 7.6cqw, 48px); line-height: 1.15; letter-spacing: -0.025em; text-wrap: balance; }
html:lang(ko) .home .reply h1, html:lang(ja) .home .reply h1, html:lang(zh-Hans) .home .reply h1, html:lang(zh-Hant) .home .reply h1 {
  font-size: clamp(28px, 7.2cqw, 44px); line-height: 1.22; letter-spacing: -0.02em;
}
.home .reply h2 { font: 700 clamp(28px, 6.6cqw, 36px)/1.1 var(--display); letter-spacing: -0.032em; }
html:lang(ko) .home .reply h2, html:lang(ja) .home .reply h2, html:lang(zh-Hans) .home .reply h2, html:lang(zh-Hant) .home .reply h2 {
  line-height: 1.25; letter-spacing: -0.02em;
}
.home .reply > p { margin-top: 14px; max-width: none; font-size: 16px; line-height: 1.6; }
.home .reply > .lead { margin-top: 16px; font-size: 17px; line-height: 1.5; }
.home .reply > .aside-line { margin-top: 18px; font-size: 14px; }
.home .sub { margin: 34px 0 0; font: 700 17px/1.35 var(--display); letter-spacing: -0.01em; color: var(--text); }
.home .sub + p { margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--text-2); }

/* The install request: what is asked, the command, and the answer. */
.home .approve-box { margin-top: 24px; }
.home .approve { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 14px; padding: 14px; border-radius: 14px; box-shadow: var(--float); }
.home .approve h2, .home .approve h3 { font: 600 16px/1.35 var(--font); letter-spacing: -0.005em; }
.home .approve-head { gap: 11px; padding-left: 2px; }
.home .approve-head p { margin-top: 1px; font-size: 13px; line-height: 1.42; }
.home .approve-actions { grid-column: 2; grid-row: 1; padding: 0; margin: 0; align-self: start; }
.home .approve-actions .btn { height: 44px; padding: 0 20px; border-radius: 11px; font-size: 15px; }
.home .approve-cmd { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; height: 38px;
  border-radius: 9px; background: var(--quiet); overflow: hidden; }
.home .approve-cmd code { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 0; background: none; font-size: 12.5px; white-space: nowrap; }
.home .approve-cmd .copy { flex: none; height: 30px; margin: 0; padding: 0 10px; border-radius: 7px; background: none; }
.home .approve-cmd .copy:hover { background: var(--card); }

/* The panel beside the answer, with its own title bar */
.beside {
  grid-column: 2; grid-row: 1 / span 3; position: sticky; top: var(--py); align-self: start;
  height: var(--win-h); margin-top: calc(-1 * var(--bar-h)); margin-bottom: calc(-1 * var(--dock-h));
}
.beside-in { display: grid; grid-template-rows: var(--bar-h) minmax(0, 1fr); height: 100%; border-left: 1px solid var(--line); background: var(--win); }
.views > .foot { margin-right: var(--beside); }

/* With home.js the answers run down one column, and the panels share the other: each spans the whole page, out of
   sight until its answer is the one being read. */
.flow .views { position: relative; padding-right: var(--beside); }
/* An answer reached from the composer fills the window above it, so the next question comes out of the composer. */
.flow .view { display: block; min-height: calc(var(--win-h) - var(--bar-h) - var(--dock-h) + 24px); padding-bottom: 96px; }
.flow .view + .view { border-top: 0; }
.flow .beside { position: absolute; top: calc(-1 * var(--bar-h)); right: 0; bottom: 0; width: var(--beside); height: auto; margin: 0;
  align-self: stretch; opacity: 0; pointer-events: none; }
.flow .beside-in { position: sticky; top: var(--py); height: var(--win-h); }
.flow .current .beside { z-index: 1; opacity: 1; pointer-events: auto; }
/* The panel coming in and the one going out cross; any passed on the way are gone at once. */
.flow .current .beside, .flow .leaving .beside { transition: opacity 0.3s ease; }
.flow .views > .foot { margin-right: 0; padding-bottom: calc(var(--dock-h) + 8px); }
.beside-bar { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px; }
.pill, .tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border-radius: 9px; font: 600 14px/1 var(--font); color: var(--text); }
.pill { box-shadow: 0 0 0 1px var(--card-ring); }
.pill svg { width: 16px; height: 16px; color: var(--text-2); }
.beside-meta { margin-left: auto; padding-right: 6px; font-size: 13px; color: var(--text-3); }
.tab { flex: 0 1 auto; min-width: 0; border: 0; background: none; color: var(--text-3); cursor: pointer; font-weight: 500; }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--card-ring); }
.tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.tab img { flex: none; border-radius: 5px; }
.tab .state { flex: none; display: none; width: 11px; height: 11px; border-radius: 50%; }
.tab[data-state="running"] .state { display: block; border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); border-top-color: currentColor; opacity: 0.75; animation: turn 0.9s linear infinite; }
.tab[data-state="done"]:not([aria-pressed="true"]) .state { display: block; width: 8px; height: 8px; background: var(--unread); }
@keyframes turn { to { transform: rotate(1turn); } }
.tabs .pause { margin-left: auto; width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 8px; background: none; color: var(--text-3); }
.tabs .pause[hidden] { display: none; }
.tabs .pause:hover { background: var(--row-hover); color: var(--text); }
.tabs .pause svg { width: 15px; height: 15px; stroke: none; }
.tabs .pause .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.beside-body { min-height: 0; overflow: hidden; position: relative; }
/* The recording's own shade of the window, for its title bar too. */
.first .beside-in { background: var(--film); }
.home .strip-box { aspect-ratio: auto; max-height: none; border-radius: 0; background: none; box-shadow: none; margin: 0; }
.strip { position: absolute; left: 0; top: 0; width: 200%; aspect-ratio: 2236 / 1584; transition: transform 0.42s cubic-bezier(0.3, 0.75, 0.2, 1); }
.strip[data-show="1"] { transform: translateX(calc(-50% - 1px)); }
.page img { width: 100%; }
.fades img { mask: linear-gradient(#000 calc(100% - 110px), transparent calc(100% - 14px)); }
.diff { background: var(--diff); }
.diff > img, .diff > picture > img { width: 100%; }
.pr { position: absolute; right: 18px; bottom: 18px; width: min(48%, 265px); overflow: hidden; border-radius: 12px; box-shadow: 0 10px 34px rgb(15 25 45 / 0.16); }
.pr img { width: 100%; }
.shelf { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; height: 100%; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.shelf li { display: grid; align-content: center; justify-items: center; gap: 12px; background: var(--win); font: 500 15px/1 var(--font); }
.shelf img { width: 44px; height: 44px; border-radius: 10px; }

/* Panels of text: the steps of an exchange, and cards of facts as the app's rail has them. */
.rail { padding: 6px 18px 18px; overflow-y: auto; display: grid; align-content: start; gap: 20px; }
.rail > .step:first-child, .rail > .card:first-child { margin-top: 6px; }
.step h3 { font: 600 13px/1.4 var(--font); color: var(--text-3); margin-bottom: 8px; }
.paper { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--card-ring);
  font: 13px/1.6 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.paper code { font: inherit; background: none; padding: 0; }
.paper .t { color: var(--text-3); }
.paper .q { display: inline-block; margin-top: 2px; padding-left: 12px; border-left: 3px solid var(--lime); }
.paper mark { background: color-mix(in srgb, var(--lime) 30%, transparent); color: inherit; border-radius: 3px; padding: 1px 2px; margin: 0 -2px; }
.card { border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--card-ring); padding: 4px 16px; }
.card > div { padding: 12px 0; }
.card > div + div { border-top: 1px solid var(--line); }
.card dt { font: 600 14px/1.4 var(--font); color: var(--text); }
.card dd { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.step-note { font-size: 13px; line-height: 1.5; color: var(--text-3); }
.step .step-note { margin-top: 10px; }
.card.tools { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; padding: 6px 16px; }
.card.tools > div { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding: 0; }
.card.tools dt, .card.tools dd { margin: 0; padding: 7px 0; font-size: 13px; line-height: 1.45; }
.card.tools code { background: none; padding: 0; font-size: 12.5px; }
.routes { display: grid; grid-auto-rows: 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.route { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 22px 26px; background: var(--win); }
.route h3 { font: 600 14px/1.4 var(--font); }
.route > p { font-size: 14px; line-height: 1.5; color: var(--text-2); max-width: 32em; }
.hops { align-self: center; display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; }
.node { flex: none; display: grid; justify-items: center; gap: 10px; min-width: 76px; }
.node b { font: 500 13px/1 var(--font); color: var(--text-2); white-space: nowrap; }
.node svg { width: 64px; height: 64px; padding: 15px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--card-ring), 0 4px 14px rgb(15 25 45 / 0.06); color: var(--text); stroke-width: 1; }
.node.blind svg { background: none; box-shadow: none; outline: 1.5px dashed var(--bubble-ring); outline-offset: -1px; color: var(--text-3); }
.wire { flex: 1; height: 2px; margin-top: 31px; border-radius: 2px; background: #34a853; }

/* Below the first answer */
.more { padding-top: 30px; }
.measured { border-radius: 14px; box-shadow: 0 0 0 1px var(--card-ring); }
.measured dl { display: grid; grid-template-columns: repeat(3, 1fr); }
.measured dl > div { padding: 16px 16px 14px; }
.measured dl > div + div { border-left: 1px solid var(--line); }
.measured dt { font: 700 26px/1 var(--display); letter-spacing: -0.03em; color: var(--text); white-space: nowrap; }
html:not(:lang(en)) .measured dt { font-size: clamp(20px, 4.4cqw, 25px); }
.measured dt small { margin-left: 4px; font: 600 13px/1 var(--display); letter-spacing: 0; color: var(--text-3); }
.measured dd { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.measured .note { padding: 10px 16px 11px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.about { margin-top: 22px; font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Work a task folds: what an answer rests on, one line until it is opened. */
.work { margin-top: 18px; }
.work summary {
  display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 10px; margin-left: -10px; border-radius: 8px;
  cursor: pointer; list-style: none; font: 500 14px/1.4 var(--font); color: var(--text-3);
}
.work summary::-webkit-details-marker { display: none; }
.work summary:hover { background: var(--row-hover); color: var(--text); }
.work summary svg { flex: none; width: 16px; height: 16px; }
.work summary .chev { width: 13px; height: 13px; stroke-width: 1.7; transition: transform 0.15s; }
.work[open] summary .chev { transform: rotate(90deg); }
.work-body { margin-top: 6px; padding: 2px 16px; border-radius: 12px; box-shadow: 0 0 0 1px var(--card-ring); background: var(--card); }
.work-body .rows > :first-child { border-top: 0; }
.work-body .rows > * { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.work-body .fold-note { margin: 0; padding-bottom: 12px; }
.rail .work { margin: -8px 0; }
.home .rows.apart { margin-top: 22px; }
.home .rows.apart > div { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 12px 0; font-size: 15px; line-height: 1.5; }
.google .aside-line { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--text-3); }
.home .phone-get { margin-top: 18px; }
.home .reply > .approve-alt { font-size: 14px; color: var(--text-3); }

/* The composer */
.dock { position: sticky; bottom: var(--py); z-index: 9; height: var(--dock-h); margin: calc(-1 * var(--dock-h)) var(--beside) 0 0;
  display: flex; align-items: flex-end; padding: 0 max(var(--gutter), (100% - var(--beside) - 580px) / 2) 16px; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--win) 48%); }
.dock[hidden] { display: none; }
.composer {
  pointer-events: auto; flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 17px; border-radius: 15px; background: var(--card); box-shadow: var(--float);
  color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.draft { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft::after { content: ""; display: inline-block; width: 1.5px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em; background: var(--unread); }
.send { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--btn); color: var(--btn-text); transition: background-color 0.15s; }
.send svg { width: 17px; height: 17px; stroke-width: 1.8; }
.composer:hover .send { background: var(--btn-hover); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .flow .current .beside-body { animation: answered 0.42s ease-out both; }
  .draft::after { animation: caret 1.1s steps(1) infinite; }
  @keyframes caret { 50% { opacity: 0; } }
  .sent .ask { animation: sent 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
  .sent .reply, .sent .more { animation: answered 0.42s 0.2s ease-out both; }
  @keyframes sent { from { opacity: 0; transform: translateY(26px) scale(0.97); } }
  @keyframes answered { from { opacity: 0; transform: translateY(6px); } }
}

.home .foot { margin-top: 44px; padding-top: 0; padding-bottom: 8px; border-top: 0; font-size: 13px; line-height: 1.55; align-self: end; }
.home .foot::before { content: ""; display: block; height: 1px; margin-bottom: 20px; background: var(--line); }
.home .foot-links { gap: 6px 18px; margin-bottom: 14px; }
.home .foot-badge { margin-bottom: 14px; }

/* Without room for three columns the sidebar goes first, and its sections move to the title. */
@media (max-width: 1140px) {
  :root { --side-w: 0px; }
  .home .win { grid-template-columns: minmax(0, 1fr); }
  .home .side { display: none; }
  .home .bar-title { display: none; }
  .home .jump { display: block; min-width: 0; flex: 0 1 auto; }
  .jump summary { display: flex; align-items: center; gap: 6px; min-width: 0; cursor: pointer; list-style: none; font: 600 var(--t-4)/1 var(--font); padding: var(--s-2) 0; }
  .jump summary::-webkit-details-marker { display: none; }
  .jump-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .jump-mark { flex: none; margin-right: 4px; border-radius: 6px; }
  .chev { flex: none; width: 14px; height: 14px; color: var(--text-3); stroke-width: 1.6; }
  .jump ul { position: absolute; left: -8px; top: calc(100% + 6px); min-width: 260px; max-height: calc(100vh - var(--bar-h) - 24px);
    overflow-y: auto; padding: 6px; background: var(--card); border-radius: 12px; box-shadow: 0 0 0 1px var(--card-ring), 0 12px 32px rgb(0 0 0 / 0.18); }
  .jump li.sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
  .jump a { display: block; padding: var(--s-2) var(--s-3); border-radius: 8px; color: var(--text); text-decoration: none; font-size: var(--t-4); }
  .jump a:hover { background: var(--row-hover); }
}

/* Then the panel moves under the answer. */
@media (max-width: 860px), (max-aspect-ratio: 1/1), (max-height: 520px) {
  :root { --win-max: 100vh; }
  .home .bar { margin-right: 0; }
  .views, .flow .views { padding-right: 0; }
  .view, .flow .view { display: block; min-height: 0; padding-bottom: 0; }
  .view + .view { margin-top: 64px; border-top: 0; }
  .views > .foot { margin-right: 0; }
  .talk, .more, .home .foot { padding-inline: max(var(--gutter), (100% - 640px) / 2); }
  .home .reply h1 { font-size: clamp(36px, 10.4cqw, 60px); }
  .beside, .flow .beside { position: static; width: auto; height: auto; margin: 32px 0 0; opacity: 1; pointer-events: auto; transition: none; }
  .beside-in, .flow .beside-in { position: static; height: auto; grid-template-rows: var(--bar-h) auto; border: solid var(--line); border-width: 1px 0; }
  .home .strip-box { aspect-ratio: 2236 / 1584; }
  .strip { width: 100%; }
  .strip[data-show] { transform: none; }
  .beside-bar.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
  .tabs .tab, .tabs .tab[aria-pressed="true"] { padding: 0 18px; color: var(--text); font-weight: 600; box-shadow: none; pointer-events: none; }
  .tabs .tab + .tab { border-left: 1px solid var(--line); border-radius: 0; height: 100%; }
  .tabs .pause { position: absolute; right: 12px; }
  .shelf li { padding: 18px 8px; gap: 10px; }
  .shelf img { width: 36px; height: 36px; border-radius: 8px; }
  .rail { padding: 6px max(var(--gutter), (100% - 640px) / 2) 22px; overflow: visible; }
  .page { padding: 0 max(0px, (100% - 640px) / 2); }
  .diff { padding-bottom: 24px; }
  .pr { position: static; margin: 18px 18px 0 auto; width: 265px; }
  .dock { margin-right: 0; padding-inline: max(var(--gutter), (100% - 640px) / 2); }
}
@media (max-width: 640px) {
  .home { background: var(--win); }
  .home .desk::before, .home .desk::after { display: none; }
  .home .desk { padding: 0; }
  .home .bar { top: 0; padding-inline: var(--gutter); gap: 8px; }
  .home .bar-links { gap: 8px; }
  .talk { padding-top: 18px; }
  .home .approve { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .home .approve-cmd { display: none; }
  .home .approve-actions { grid-column: 1; grid-row: auto; }
  .home .approve-actions .btn { height: 48px; }
  /* One agent's pane at a time, at a size that can be read. */
  .home .strip-box { aspect-ratio: 1118 / 1584; }
  .strip { width: 200%; }
  .strip[data-show="1"] { transform: translateX(calc(-50% - 1px)); }
  .beside-bar.tabs { display: flex; gap: 6px; padding: 0 12px; }
  .tabs .tab { flex: none; height: 32px; padding: 0 12px 0 10px; color: var(--text-3); font-weight: 500; pointer-events: auto; }
  .tabs .tab + .tab { border: 0; border-radius: 9px; height: 32px; }
  .tabs .tab[aria-pressed="true"] { padding: 0 12px 0 10px; box-shadow: 0 0 0 1px var(--card-ring); }
  .tabs .pause { position: static; }
  .measured dl { grid-template-columns: 1fr 1fr; }
  .measured dl > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .dock { bottom: 0; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); }
}
