/* The phone's layout, on a screen narrower than layout.js's DESK_FROM (html.phone): the stage at the screen's own
   px, a feature's words over the window (data-mode="tall") or beside it (data-mode="side"), and a window as narrow
   as the screen. The stage is laid out in the screen as it is while the browser's bars show (svh), and painted to
   the screen's foot once they are gone (lvh), so bars that come and go move nothing. */

html.phone.js .track { height: calc((var(--seats) - 1) * 100vh + 100vh); height: calc((var(--seats) - 1) * 100svh + 100lvh); }
html.phone.js .view { height: 100vh; height: 100lvh; }
html.phone.js .stage { left: 0; width: var(--stage); height: 100vh; height: 100svh; transform: none; box-shadow: none; overflow: visible; }
html.phone.js .sitebar { left: 0; width: var(--stage); height: 52px; padding: 0 18px; transform: none; background: var(--paper); }
html.phone .sitebar .logo img { height: 26px; }

/* The paper behind a feature's words, as tall as they are: the stage says how tall. */
html.phone .wordsback { display: block; position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 3; background: var(--paper); opacity: 0; pointer-events: none; }

/* ---- the window, as narrow as the screen. Nothing in it that is meant to be read is drawn under 11 px. ---- */
html.phone .cam { --win-w: var(--phone-win); --page-w: min(520px, calc(var(--phone-win) - 52px)); --page-x: calc((var(--phone-win) - var(--page-w)) / 2); --page-y: 72px; --panel-w: var(--phone-win); width: var(--win-w); height: var(--win-h); }
html.phone .win { box-shadow: 0 10px 30px -18px var(--deep); }
html.phone .winbar { padding-right: 10px; }
html.phone .winbar :is(.side, .project, .settings) { display: none; }
html.phone .winbar .lights { width: 54px; padding-left: 12px; gap: 6px; }
html.phone .winbar .lights i { width: 10px; height: 10px; }
html.phone .winbar .tab { flex: 0 1 auto; min-width: 0; padding: 0 12px; }
html.phone .doc .t { white-space: normal; font-size: 22px; }
html.phone .doc pre { overflow: hidden; }
html.phone .shape { padding: 6px 11px; }
html.phone .arrow { width: 26px; }
/* The reader's card stands just under its sentence, and its conversation is no taller than the room there. */
html.phone .card { left: calc(var(--page-w) - 278px); top: 10px; box-shadow: 0 10px 30px -12px var(--deep); }
html.phone .card :is(.v2, .v3) { max-height: var(--card-max, 430px); }
html.phone .pay { font-size: 11.5px; }
html.phone .pay .saved .from { font-size: 11px; }

/* ---- the project's page, as a narrow window would lay it: its parts two by two ---- */
html.phone .proj { padding: 22px 16px 0; font-size: 15px; }
html.phone .proj .ttl { font-size: 24px; line-height: 30px; }
html.phone .charts { grid-template-columns: 1.25fr 1fr; gap: 16px; margin-top: 16px; }
html.phone .proj .cap { font-size: 13px; line-height: 1.25; }
html.phone .plot { grid-template-columns: 24px 1fr; column-gap: 6px; }
html.phone .plot .axis { height: 90px; }
html.phone .plot .columns { height: 78px; background-size: 100% 26px; }
html.phone .plot .columns i { width: 12px; }
html.phone .plot .days .num { width: 12px; }
html.phone .proj .num { font-size: 12px; }
html.phone .funnel { gap: 10px; }
html.phone .funnel i { height: 18px; }
html.phone .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
html.phone .tiles .link { display: none; }
html.phone .tile { height: 88px; padding: 12px; gap: 8px; }
html.phone .tile .name { font-size: 15px; }
html.phone .tile .blk { width: 44px; }
/* The note stands under the part it marks, the third, which is the left of its row. */
html.phone .note { left: -1px; top: calc(100% + 12px); width: calc(200% + 12px); }
html.phone .more .two { grid-template-columns: 1fr; gap: 18px; }
html.phone .more .stats { gap: 8px; }
html.phone .more .stats > div { padding: 12px; }
html.phone .more .stats b { font-size: 17px; }
html.phone .waitline { padding: 16px 16px 0; }
html.phone .strip { gap: 6px; }
html.phone .answer .ttl { margin-top: 20px; }
html.phone .answer .say { font-size: 16px; }
/* the four moments stand down the page, each with what is shown at it beside it */
html.phone .time { --row: 76px; height: calc(var(--row) * 4 + 50px); margin-top: 24px; }
html.phone .passes::before { left: 5px; right: auto; top: 6px; width: 1.5px; height: calc(var(--row) * 3 + 10px); }
html.phone .passes::after { display: none; }
html.phone .point { height: var(--row); width: 100%; }
html.phone .point:is(.p1, .p2, .p3, .p4) { left: 0; }
html.phone .point.p2 { top: var(--row); }
html.phone .point.p3 { top: calc(var(--row) * 2); }
html.phone .point.p4 { top: calc(var(--row) * 3); }
html.phone .point::before { top: 3px; left: 0; }
html.phone .point .when { left: 22px; top: 1px; width: 120px; line-height: 1.3; white-space: normal; }
html.phone .time .tile { top: 0; height: 62px; left: 150px; width: calc(100% - 150px); }
html.phone .time .tile.shown:is(.p1, .p2) { left: 150px; width: calc(100% - 150px); }
html.phone .time .tile.shown.p2 { top: var(--row); }
html.phone .time .tile .name { font-size: 14px; }
html.phone .time .tile .head { gap: 8px; }
html.phone .time .said { top: calc(var(--row) * 4); left: 22px; width: calc(100% - 22px); white-space: normal; font-size: 15px; }
html.phone .carried { transform: translateY(calc(var(--carry, 0) * var(--row))); }
html.phone .grip { left: -27px; top: 18px; }
html.phone .carried .hand { left: -14px; top: 28px; }

/* ---- the plan, and the build's panel as a sheet at the window's foot, so the rows are seen over what came back ---- */
html.phone .prow { white-space: normal; align-items: flex-start; line-height: 1.4; padding: 6px 0; min-height: 0; }
html.phone .prow > span:not(.word) { flex: 1; }
html.phone .prow .word { flex: none; padding-top: 4px; }
html.phone .planblock .detail { margin-left: 40px; }
html.phone .panel { z-index: 5; left: 0; width: auto; top: auto; bottom: calc(var(--win-h) - var(--foot, 900px) - 6px); padding: 0 18px 12px; border-left: 0; border-top: 1px solid var(--hairline); border-radius: 14px 14px 0 0; box-shadow: 0 -12px 28px -18px var(--deep); }
/* The sheet goes on under the foot of the screen, which shows more once the browser's bars have gone. */
html.phone .panel::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 200px; background: var(--panel); }
html.phone .panel .phd { margin: 0 -18px; padding: 9px 18px; }
html.phone .panel .stops { margin-top: 10px; }
html.phone .stop { padding-bottom: 9px; }
html.phone .panel :is(.says, .foldrow, .goes) { margin-top: 6px; }
html.phone .panel .acts { margin-top: 8px; }
/* Once the work is back the sheet keeps only what came back. */
html.phone .stage[data-state="plan-3"] .panel :is(.stop.past, .stop.working) { display: none; }
/* A short screen has no room for the written account: the sheet keeps the count, the report's two closed rows and
   the two answers. Beside the words, where the screen is lower still, the rows go too. */
html.phone.short .stage[data-state="plan-3"] .panel :is(.phd, .says, .goes) { display: none; }
html[data-mode="side"] .stage[data-state="plan-3"] .panel .foldrow { display: none; }
/* On a short upright screen the open row folds as the build starts, so that the signed rows stand clear of the sheet.
   It stays folded to the page's end, since the camera shows the plan on its way there. */
html.short[data-mode="tall"] .stage:is([data-state="plan-pressed"], [data-state="plan-3"], [data-state^="ending"]) .planblock .detail { display: none; }
html.short[data-mode="tall"] .stage:is([data-state="plan-pressed"], [data-state="plan-3"], [data-state^="ending"]) .foldx.open::before { content: "›"; }

/* ---- the hero: the headline on two lines, then the words that choose a domain, then the window ---- */
html.phone.js .heads { top: 52px; width: var(--stage); padding-top: var(--spare-top, 0px); --hand: min(50px, calc((var(--stage) - 30px) / var(--ink-ems))); }
html.phone.js .heads > * { position: static; width: auto; margin: 0 auto; }
html.phone.js .heads .line { position: relative; height: calc(var(--hand) * 2.62); }
html.phone.js .handwriting { left: 0; top: 0; width: 100%; height: 100%; font-size: var(--hand); }
html.phone.js .handwriting .hand:is(.ink, .upright) { left: 50%; transform: translateX(-50%); }
html.phone.js .handwriting .hand.ink { top: calc(var(--hand) * -.15); }
/* In the upright hand's em, which is 1.31 of the ink hand's. */
html.phone.js .handwriting .hand.upright { top: calc(var(--hand) * .79); }
html.phone.js .heads .under { max-width: 460px; margin-top: 2px; padding: 0 24px; font-size: 15px; line-height: 22px; }
html.phone.js .heads > .kinds { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 0; margin-top: var(--spare-mid, 0px); font-size: 14px; line-height: 20px; }
html.phone .kinds .lead { margin-right: 4px; }
html.phone .kinds button { height: 44px; padding: 0 7px; }
html.phone .kinds i { margin-right: 4px; }
@media (max-width: 379px) { html.phone .kinds .lead { display: none; } }
html.short[data-mode="tall"].js .heads { --hand: min(41px, calc((var(--stage) - 30px) / var(--ink-ems))); }
html.short[data-mode="tall"].js .heads .under { font-size: 14px; line-height: 20px; }
html[data-mode="side"].js .heads { display: flex; flex-direction: column; justify-content: center; width: var(--side-words); height: calc(100% - 52px); --hand: min(38px, calc((var(--side-words) - 24px) / var(--ink-ems))); }
html[data-mode="side"] .kinds .lead { display: none; }

/* ---- a feature's words: whole as the screen is come to, then folded to the title and its dashes (--fold) ---- */
html.phone.js .words[data-side] { display: block; left: 0; width: var(--stage); top: 52px; height: auto; padding: 10px 22px 4px; }
html.phone .words > * { max-width: 560px; margin-left: auto; margin-right: auto; }
html.phone .words .line { font-size: calc(26px - 6px * var(--fold, 0)); line-height: 1.22; }
html.phone .words br { display: none; }
html.phone .words .desc { margin-top: calc(8px * (1 - var(--fold, 0))); font-size: 15px; line-height: 1.55; max-height: calc((1 - var(--fold, 0)) * var(--desc-h, 400px)); overflow: hidden; }
html.phone .words .desc.part { opacity: calc(clamp(0, var(--come, 1) * 1.9 - .6, 1) * clamp(0, 1 - var(--fold, 0) * 1.8, 1)); }
html.phone .ticks { margin-top: 2px; }
html.phone .ticks button { height: 44px; }
html.phone .ticks [data-go]::before, html.phone .ticks [data-go]::after { top: 20.75px; }
html.phone .ticks .next { line-height: 44px; }
html[data-mode="side"].js .words[data-side] { display: flex; width: var(--side-words); height: calc(100% - 52px); padding: 0 24px; }
html[data-mode="side"] .words .line { font-size: 24px; }

/* ---- the ending ---- */
html.phone.js .endhead { top: clamp(84px, 16svh, 220px); width: var(--stage); padding: 0 24px; }
html.phone .endhead .line { font-size: 30px; }
html.phone .endhead .second { display: block; }
html.phone .endhead .under { font-size: 15px; line-height: 1.6; }
html.phone .emailfield { margin-top: 28px; }
html.phone .emailfield input { font-size: 18px; }
html.phone .fieldsays { margin-top: 8px; font-size: 15px; }
html.phone.js .foot { bottom: 20px; width: var(--stage); padding: 0 24px; }
/* Closer on a short screen, to stay clear of the privacy line with the field's longest answer over it. */
html.short[data-mode="tall"] .foot small { margin-top: 6px; }
/* On the narrowest and lowest upright screens that is not enough, the words wrapping onto more lines: under 334px
   wide the ending and the foot take more of the width, and where they would still meet, the ending stands higher.
   The sizes are where they met with the longest answer showing. */
@media (max-width: 333px) and (max-height: 650px) {
  html.short[data-mode="tall"].js :is(.endhead, .foot) { padding-inline: 16px; }
}
@media (max-width: 333px) and (max-height: 605px), (max-width: 368px) and (max-height: 596px), (max-width: 373px) and (max-height: 572px) {
  html.short[data-mode="tall"].js .endhead { top: 68px; }
  html.short[data-mode="tall"].js .emailfield { margin-top: 18px; }
}
/* Lower still, the field itself closes up and the foot stands nearer the screen's foot. */
@media (max-width: 374px) and (max-height: 567px), (max-height: 547px) {
  html.short[data-mode="tall"].js .endhead .under { margin-top: 8px; }
  html.short[data-mode="tall"].js .emailfield { height: 48px; margin-top: 8px; }
  html.short[data-mode="tall"].js .foot { bottom: 8px; }
}
html[data-mode="side"].js .endhead { top: 62px; }
html[data-mode="side"] .endhead .line { font-size: 24px; }
html[data-mode="side"] .endhead .second { display: inline; }
html[data-mode="side"] .emailfield { height: 46px; margin-top: 10px; }
html[data-mode="side"] .foot { display: none; }
