/*
  Index Backlinks: page CSS.
  The kit (assets/) lays out the page. Almost everything here sits inside a visual: the tool window in the
  hero, the drawn windows of the product, the sheet and the page source, the rate card, and the lit ground
  their frames stand on. The rest is marked where it stands: it fits the kit to this client's long name,
  this palette and the nine questions of the brief.
*/

/* ---------------------------------------------------------------- outside a visual: eight fits
   1. The hero's line in the ink. The centred hero sets it in the muted grey, which is 5.4:1 on this palette's
      ground; text people read is ink at 7:1 or more (system.md, Type). */
.hero--centred .hero__c > .hero__lead { color: var(--ink); }
/* 2. A phone's bar holds the name and the menu button. The name has 15 letters and the action 14, and the
      arrow look adds a glyph: together they run past the wrap at 390 and further at 320. The action stays in
      the hero, in the menu's sheet and in the close (the kit does the same on a page with a phone bar). */
@media (max-width: 639px) {
  .nav:not(.is-open) .nav__actions { display: none; }
  .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; }
}
/* 3. The name across the wrap (close-word, hand-set): its fifteen letters fill the wrap at this size. The
      line box is a touch taller than the kit's, so this face's capitals are not cut by it. */
.close--word { container-type: inline-size; }
.close--word > .close__word { font-size: 15cqw; line-height: .92; }
/* 4. Screen counts that differ at one width (layout-v4.md, the tablet): the nine questions take two
      screens where their three columns stack, and so does the checklist under 640 */
@media (max-width: 1023px) { #faq { --h: 2; } }
@media (max-width: 639px) { #faq, #checklist { --hm: 2; } }
/* 5. A short window. The kit draws every section for a 900px-tall screen and, from 1280px wide, holds it at
      exactly its screens. A laptop window is often 650 to 800px tall under the browser's bars: there the nine
      questions, the five checks and the close need more than a screen, and a held section runs under the
      next one (at 1366x650 the fifth check went under the footer). So in a window under 900px tall a section
      keeps at least its screens and grows with its words, the kit's own rule from 640 to 1279px; from 900px
      tall nothing changes. The hero does the same under 760px tall (the kit lets it grow on a phone only). */
@media (min-width: 1280px) and (max-height: 899px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
}
@media (min-width: 640px) and (max-height: 759px) {
  main > :is(.hero, .section--hero) { height: auto; min-height: 100vh; min-height: 100svh; }
  main > :is(.hero, .section--hero):has(> :is(.wrap, .container)) { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; grid-auto-rows: auto; }
  main > :is(.hero, .section--hero) > :is(.wrap, .container) { height: auto; }
}
/* 6. The support address in the footer: where its column is narrow it breaks after the @, never inside the
      domain (it broke at the hyphen on a phone and a tablet). Where even the domain is wider than the column,
      it wraps as any text does. */
.footer__domain { white-space: nowrap; }
@media (max-width: 359px), (min-width: 640px) and (max-width: 727px) { .footer__domain { white-space: normal; } }
/* 7. The menu button answers the pointer as the secondary button does, whose look it takes (the kit gives the
      button no hover of its own). */
.nav__toggle { transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.nav__toggle:hover { background: color-mix(in oklab, var(--bg) 94%, var(--ink)); border-color: color-mix(in oklab, var(--ink) 35%, transparent); }
/* 8. A phone: the link that closes the why and the how section is wider than half the wrap, so it runs the
      wrap's whole width as a row, its arrow on the right line (a lined thing that wide runs from line to line). */
@media (max-width: 639px) {
  #why .link, #how .mo-pc__text > p > .link { display: flex; justify-content: space-between; }
}

/* ---------------------------------------------------------------- the lit ground behind every drawn window
   the kit's own panel ground (assets/ui/cards.css .panel on a software page): the page's lit tone, sand,
   as a soft mesh of its own colours. No grain, no pattern. */
.frame--ground,
[data-moment="pinned-chapters"] .mo-pc__visual.mo-pc__visual--lit {
  border-color: transparent;
  background-color: var(--ground-bg);
  background-image:
    radial-gradient(70% 90% at 12% 0%, color-mix(in oklab, var(--ground-surface) 92%, white), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, color-mix(in oklab, var(--ground-accent) 34%, var(--ground-bg)), transparent 72%),
    radial-gradient(50% 60% at 85% 10%, color-mix(in oklab, var(--ground-surface) 60%, transparent), transparent 70%);
}

/* ---------------------------------------------------------------- every drawn window
   White UI in the page's ink; the accent is kept for the one row in hand. The face's tabular figures set a
   full digit's width round every full stop and comma ("$0 . 11"), so the windows take its plain figures.
   A line that can reach a frame's fade is ink or the dark grey, never the muted grey: it stays readable
   as it fades. A status is a word in a chip, with no dot. */
.win {
  --fx-bg: #ffffff; --fx-surface: var(--p-surface); --fx-ink: var(--p-ink); --fx-muted: var(--p-muted);
  --fx-accent: var(--p-accent); --fx-accent-ink: var(--p-accent-ink);
  --ui-font: var(--font-text); --ui-mono: var(--font-mono); --ui-radius: 12px;
  font-feature-settings: normal;
}
.win > .ui-head { flex: none; background: var(--u-fill); border-radius: calc(var(--u-r) - 1px) calc(var(--u-r) - 1px) 0 0; }
.win .ui-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.win .ui-chip { font-style: normal; color: var(--u-ink); }
.win .ui-chip--accent { color: var(--u-accent-text); }

/* ---------------------------------------------------------------- hero: the tool
   layout.css places .ly-piece in the lit frame (32px down, centred). The window runs past the frame's foot,
   so its list fades with the frame; the count, the price and the button stand at its top, above the fade. */
.hero--centred .hero__window > .tool { bottom: -28px; display: flex; flex-direction: column; overflow: hidden; container: tool / inline-size; }
/* room at the frame's right for the pause button of the moving ground */
@media (min-width: 640px) { .hero--centred .hero__window > .tool { width: min(880px, calc(100% - 112px)); } }
.tool__body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.tool__side { display: grid; align-content: start; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--u-line); background: var(--u-fill); }
.tool__side-h { padding: 2px 8px 8px; color: var(--u-muted); }
.tool__sub { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px; border-radius: 8px; }
.tool__sub b { font-weight: 500; white-space: nowrap; }
.tool__sub i { grid-column: 1 / -1; font-style: normal; color: var(--u-text-2); white-space: nowrap; }
.tool__sub.is-on { background: var(--u-bg); box-shadow: inset 0 0 0 1px var(--u-line-2); }
.tool__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 14px 16px 0; }
.tool__row { display: flex; align-items: center; gap: 12px; }
.tool__sum { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.tool .tool__go { height: 36px; padding: 0 14px; cursor: pointer; }
.tool .tool__go:hover { background: color-mix(in oklab, var(--u-ink) 86%, var(--u-bg)); }
.tool .tool__go:active { transform: scale(0.97); }
.tool__note { margin: 6px 0 0; min-height: 20px; color: var(--u-muted); }
.tool__note.is-told { color: var(--u-ink); }
.tool__note a { color: var(--u-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--u-line-2); text-underline-offset: 3px; }
.tool__note a:hover { text-decoration-color: currentColor; }
.tool__label { display: block; margin-top: 14px; color: var(--u-muted); }
/* the box: one URL a line; a URL longer than the box wraps inside it, so nothing scrolls sideways */
.tool__urls {
  flex: 1 1 auto; min-height: 96px; width: 100%; margin: 6px 0 0; padding: 10px 12px 88px; resize: none;
  border: 1px solid var(--u-line-2); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--u-fill);
  color: var(--u-ink); font: 400 13px/22px var(--ui-mono); font-variant-ligatures: none;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: hidden; overflow-y: auto; tab-size: 2;
}
.tool__urls:focus-visible { outline-offset: 0; border-color: transparent; }
/* a narrow window (a tablet, a phone): the form alone; the list of submissions is context */
@container tool (max-width: 620px) {
  .tool__body { grid-template-columns: minmax(0, 1fr); }
  .tool__side { display: none; }
}
@container tool (max-width: 460px) {
  .tool__limit { display: none; }
  .tool__row { flex-direction: column; align-items: stretch; gap: 8px; }
  .tool .tool__go { height: 44px; font-size: 15px; }
}
/* a phone: 16px in the box, so the browser never zooms the page when it takes the focus */
@media (max-width: 639px) { .tool__urls { font-size: 16px; line-height: 24px; padding-bottom: 48px; } }

/* ---------------------------------------------------------------- why: the buyer's own sheet of link pages
   one window across the frame; its empty rows run on under the data, down past the frame's foot. The row
   numbers are drawn from data-n, as the kit's code lines are. */
.frame--ground.fill { margin-top: var(--s-7); }
#why .frame--ground { min-height: 200px; }
#why .stage > .at-rise { --fit-max: 1184px; --ax: 48px; --ay: 40px; --ay-sm: 16px; }
.sheet { display: flex; flex-direction: column; --sheet-row: 36px; --sheet-n: 44px; --sheet-b: 148px; --sheet-c: 96px; --sheet-d: 132px; }
.sheet__grid {
  flex: 1 1 auto; min-height: 0; font-size: 13px; line-height: 20px;
  background:
    linear-gradient(var(--u-line), var(--u-line)) var(--sheet-n) 0 / 1px 100% no-repeat,
    linear-gradient(var(--u-line), var(--u-line)) right var(--sheet-d) top / 1px 100% no-repeat,
    linear-gradient(var(--u-line), var(--u-line)) right calc(var(--sheet-d) + var(--sheet-c)) top / 1px 100% no-repeat,
    linear-gradient(var(--u-line), var(--u-line)) right calc(var(--sheet-d) + var(--sheet-c) + var(--sheet-b)) top / 1px 100% no-repeat,
    linear-gradient(to right, var(--u-fill) var(--sheet-n), transparent var(--sheet-n)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--sheet-row) - 1px), var(--u-line) calc(var(--sheet-row) - 1px) var(--sheet-row)) 0 28px;
}
.sheet__row { display: grid; grid-template-columns: var(--sheet-n) minmax(0, 1fr) var(--sheet-b) var(--sheet-c) var(--sheet-d); height: var(--sheet-row); }
.sheet__row::before { content: attr(data-n); padding-top: 8px; text-align: center; color: var(--u-muted); }
.sheet__row > span { display: block; min-width: 0; padding: 8px 12px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet__row--letters { height: 28px; background: var(--u-fill); box-shadow: inset 0 -1px 0 var(--u-line); color: var(--u-muted); }
.sheet__row--letters > span { padding-top: 4px; text-align: center; }
.sheet__row--head > span { font-weight: 500; }
.sheet__url { font-family: var(--ui-mono); font-variant-ligatures: none; color: var(--u-text-2); }
.sheet__no { font-weight: 500; }
.sheet__yes { color: var(--u-text-2); }
/* the cell in hand: the sheet's one touch of the accent */
.sheet__row > .is-cell { box-shadow: inset 0 0 0 2px var(--u-accent); }
@media (max-width: 899px) {
  .sheet { --sheet-b: 0px; --sheet-c: 0px; --sheet-n: 36px; --sheet-d: 112px; }
  .sheet__row { grid-template-columns: var(--sheet-n) minmax(0, 1fr) var(--sheet-d); }
  .sheet__row > span:nth-of-type(2), .sheet__row > span:nth-of-type(3) { display: none; }
  .sheet .ui-meta { display: none; }
}

/* ---------------------------------------------------------------- how: the three windows of the steps
   The moment's stage stands like every other section of the page: its h2 --padt under the top and its frame
   down to the bottom padding, so the air round it matches the sections beside it. Each step's window sits
   on the kit's stage in its visual, a margin in, and leaves through the visual's foot. */
main [data-moment="pinned-chapters"][data-moment].is-live > .mo-pc__grid { align-content: start; padding-top: var(--padt); padding-bottom: var(--padb); flex: none; }
/* (flex: none) from 640 to 1279 the kit lets a section's .wrap grow to the section's whole height; a live stage
   that grew to its two screens could not stick, and its second screen stood empty at 1024 to 1279 */
[data-moment="pinned-chapters"].is-live .mo-pc__visuals { aspect-ratio: auto; height: calc(100svh - var(--padt) - var(--padb)); max-height: none; }
[data-moment="pinned-chapters"].is-live .mo-pc__visual.mo-pc__visual--lit { aspect-ratio: auto; }
[data-moment="pinned-chapters"]:not(.is-live) .mo-pc__visual.mo-pc__visual--lit { position: relative; }
.mo-pc__visual--lit > .stage > .at-rise { --ax: clamp(16px, 4vw, 40px); --ay: clamp(16px, 4vw, 40px); --ax-sm: 16px; --ay-sm: 16px; }
.shot { display: flex; flex-direction: column; container: shot / inline-size; }
.shot__pad { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 14px 16px 0; }
.shot__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.shot__sum { min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* every row keeps its line (22px): in a short visual the list runs out through the frame's foot, it is never squeezed */
.shot__urls {
  flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 22px; align-content: start; margin-top: 12px; padding: 10px 0;
  border: 1px solid var(--u-line-2); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--u-fill);
  font: 400 13px/22px var(--ui-mono); font-variant-ligatures: none; color: var(--u-text-2);
}
.shot__urls > span { display: block; min-width: 0; padding-left: 48px; padding-right: 12px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot__urls > span::before { content: attr(data-n); position: absolute; left: 0; width: 34px; text-align: right; color: var(--u-muted); }
.shot__list { flex: 1 1 auto; min-height: 0; }
.shot__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; align-content: center; height: 56px; padding: 0 16px; box-shadow: inset 0 -1px 0 var(--u-line); }
.shot__item b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot__item span { grid-column: 1; color: var(--u-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot__item .ui-chip { grid-column: 2; grid-row: 1 / 3; }
/* a small visual (the rows at rest on a tablet, a phone): the window's own words give way before its rows do */
@container shot (max-width: 400px) {
  .shot .ui-head .ui-meta, .shot__row .ui-btn, .shot__row .ui-meta { display: none; }
  .shot__urls > span { padding-left: 40px; }
  .shot__urls > span::before { width: 28px; }
}
/* at rest from 640px the kit sets each step's text beside its visual: the three rows share one screen */
@media (min-width: 640px) and (max-width: 1023px) {
  [data-moment="pinned-chapters"]:not(.is-live) .mo-pc__visual.mo-pc__visual--lit { aspect-ratio: auto; height: calc((100svh - 486px) / 3); }
}
/* a phone stacks the three steps, each with its window under its lines: two screens */
@media (max-width: 639px) {
  main > #how[data-moment="pinned-chapters"]:not(.is-live) { min-height: 200vh; min-height: 200lvh; }
  [data-moment="pinned-chapters"]:not(.is-live) .mo-pc__visual.mo-pc__visual--lit { aspect-ratio: auto; height: calc((200lvh - 853px) / 3); min-height: 200px; }
}

/* ---------------------------------------------------------------- pricing: the rate card on the lit band
   The four rates take what the screen leaves between the head and the terms, one even row each, the price
   on the page's split line. The figures are the face's plain ones (its tabular full stop would set
   "$0 . 009"). */
#pricing .rates { display: grid; grid-auto-rows: minmax(min-content, 1fr); min-height: min-content; margin-top: var(--s-6); }
/* the card's group holds words, so it is never smaller than them (a .fill may shrink to nothing): a short window */
#pricing .group.fill { min-height: min-content; }
/* the price column starts on the page's split line (k = 6) at every width: half the wrap less half of 24px */
.rates > li { grid-template-columns: minmax(0, 1fr) calc((100% - 24px) / 2); column-gap: 24px; align-items: center; padding-block: var(--s-4); }
.rates > li:first-child { padding-top: var(--s-4); }
.rates .rows__name { font-weight: var(--display-weight); }
.rates .t-stat { font-variant-numeric: normal; }
.terms { margin: var(--s-7) 0 0; row-gap: var(--s-5); }
.terms dt { margin-bottom: var(--s-2); }
.terms dd { margin: 0; max-width: 44ch; }
/* the policy link stands on a line of its own at every width (inline, it made its line taller than the rest) */
.terms dd > .link { display: flex; width: fit-content; margin-top: var(--s-1); }
/* a tablet: the four terms two-up, as the kit sets its span-3 text cards there */
@media (min-width: 640px) and (max-width: 1023px) { .terms > div { grid-column: auto / span 6; } }
@media (max-width: 639px) { .terms { margin-top: 0; } }

/* ---------------------------------------------------------------- questions: nine answers, three columns
   The nine answers stand on the rows of one grid (the three column blocks are subgrids of it), and what the
   screen leaves is shared evenly between the rows, the last one on the bottom padding. Side by side (from
   1024px) that is three rows: a row's three questions start on one line and close on one rule. Stacked, it
   is nine even rows, and the first answer of the second and third block takes the top padding the kit drops
   from a block's first. */
#faq .grid.fill { min-height: min-content; grid-template-rows: repeat(9, auto); row-gap: 0; align-content: space-between; }
#faq .faq { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
#faq .faq__item { align-content: start; }
#faq .faq + .faq > .faq__item:first-child { padding-top: var(--s-5); }
@media (max-width: 639px) { #faq .faq + .faq > .faq__item:first-child { padding-top: var(--s-4); } }
@media (min-width: 1024px) {
  #faq .grid.fill { grid-template-rows: repeat(3, auto); }
  #faq .faq { grid-row: 1 / span 3; }
  #faq .faq + .faq > .faq__item:first-child { padding-top: 0; }
}

/* ---------------------------------------------------------------- checklist: a page source, one line marked
   The split never ends above its words: from 1024 to 1279 the section grows with them (the kit lets it).
   The source wraps a long line as a browser's view-source does, so no line is cut by the window. */
#checklist .grid.fill { min-height: min-content; }
#checklist .stage > .at-rise { --ay: 48px; --ay-sm: 16px; }
@media (max-width: 1023px) { #checklist .stage { --fade-h: 40px; } #checklist .stage > .at-rise { --ay: 24px; } }
.src.ui-code { width: 100%; }
/* a tab's label never wraps; on a phone the second file's tab gives way to the one that is open */
.src .ui-code__tab { flex: none; white-space: nowrap; }
@media (max-width: 639px) { .src .ui-code__tab:not(.is-on) { display: none; } }
.src .ui-code__pre { padding-bottom: 96px; font-variant-ligatures: none; color: var(--u-text-2); }
.src .ui-code__ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.src .ui-code__ln::before { color: var(--u-muted); }
.src__note {
  display: block; margin: 6px 16px 8px 48px; padding: 7px 10px; border-radius: 8px; white-space: normal;
  font: 500 13px/18px var(--ui-font); color: var(--u-ink); background: var(--u-fill-2);
}
.src__note--mark { color: var(--u-accent-text); background: var(--u-tint); }

/* ---------------------------------------------------------------- pictograms (the site's own: src/lib/icons.ts)
   A pictogram hangs at the left of the words it belongs to, and the words wrap beside it, never under it.
   Each one is as tall as a line of those words, so a title keeps its height and no section grows. */
/* a step's title; while the steps play, a step that is not open is all in the quiet tone, its accent piece too.
   The pictogram is a little taller than the title's line, so it gives that up above and below: the title, and
   with it the section (which is held to exactly two screens), stays as tall as it was. */
[data-moment="pinned-chapters"] .mo-pc__step h3 { display: flex; align-items: flex-start; gap: var(--s-3); }
[data-moment="pinned-chapters"] .mo-pc__step h3 > .icon { margin-block: -3px; }
[data-moment="pinned-chapters"].is-live .mo-pc__step:not(.is-on) .icon__a { color: inherit; }
/* a pricing term: the pictogram stands above its title, on the term's own left edge */
.terms dt > .icon { display: block; margin-bottom: var(--s-3); }
/* a line of the promise, and a check's name */
.statement .rows .t-lead, #checklist .rows__name { display: flex; align-items: flex-start; gap: var(--s-3); }
.statement .rows .t-lead > .icon { margin-top: 0.25em; }
#checklist .rows__name > .icon { margin-top: 0.1em; }
/* what a check asks for starts under its name, clear of the pictogram */
#checklist .rows > li > p { padding-left: calc(20px + var(--s-3)); }
