/* Air. The text pages were packed: notes touched the table above and the button below, the catalog row stacked five lines at 4 px,
   the price cards put 11 px labels on top of each other. Loaded after pages.css; the phone gets the larger values. */

/* Small text is still text: 15 px on a phone, a calmer colour, a measure that does not squeeze it into a strip. */
@media (max-width: 860px) { :root { --fs-small: 15px; } }
.note { line-height: 1.6; color: var(--bone-dim); max-width: 62ch; }
:where(.wrap, .panel, .document, .prose) > .note { margin-top: 18px; }
:where(.wrap, .panel) > * + .btn { margin-top: 26px; }
:where(.wrap, .panel) > .note + .btn { margin-top: 28px; }
.wrap > .btn:last-child, .wrap > .note:last-child { margin-bottom: clamp(8px, 3vw, 24px); }

/* Prose pages (about, documents): the sections are told apart by air, not only by a heading. */
.prose { gap: 20px; }
.prose h2 { margin-top: clamp(36px, 8vw, 60px); }
.prose h2:first-child { margin-top: 0; }
.prose ol { gap: 16px; }
.prose li, .prose p { line-height: 1.7; }
.split { row-gap: clamp(36px, 9vw, 56px); }

/* The facts of a reading (service page, prices). */
.facts dt { color: var(--bone-dim); }
.price-table td::before { color: var(--bone-dim); }

@media (max-width: 860px) {
  /* Catalog row: the title, the line under it, then one row for kind, price and state, with room around. */
  .row a { gap: 0 20px; padding: 30px 0; }
  .row-title { font-size: clamp(27px, 1.2rem + 1.6vw, 34px); line-height: 1.15; }
  .row-lead { margin-top: 10px; }
  .row a > .row-meta { grid-column: 1; margin-top: 16px; }
  .row-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
  .row-group { order: 3; }
  .row-price { order: 1; font-size: 20px; }
  .row-state { order: 2; }

  /* Price cards: label, value, a gap, the next label. */
  .price-table tr { padding: 30px 0; }
  .price-table th[scope=row] { margin-bottom: 12px; }
  .price-table td { margin-top: 18px; line-height: 1.55; }
  .price-table td::before { margin-bottom: 4px; font-size: 13px; }

  .facts > div { padding: 22px 0; gap: 8px; }
  .facts dd { line-height: 1.6; }

  /* Rows of a list and blocks of a page: a little more of everything. */
  .how-steps ol, .steps { gap: 4px; }
  .steps li { padding-block: 26px; }
  .callout { padding-block: 32px; }
  .site-footer { margin-top: 24px; }
}

@media (max-width: 860px) {
  .row a { align-items: start; }
  .row a .row-thumb { align-self: start; margin-top: 2px; }
  /* Footer links that wrap to two lines keep a gap between them. */
  .site-footer nav .link, .footer-legal .link { padding-block: 7px; line-height: 1.35; }
}

/* Folds inside a panel: a row with its own chevron, a finger-sized target, a rule between the rows. */
.fold > summary, .panel details > summary { position: relative; display: flex; align-items: center; min-height: 48px; padding-right: 32px; list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker, .panel details > summary::-webkit-details-marker { display: none; }
.fold > summary::after, .panel details > summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--bone-dim); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform var(--dur-ui) var(--ease-out); }
.fold[open] > summary::after, .panel details[open] > summary::after { margin-top: -1px; transform: rotate(225deg); }
.fold { padding: 4px 0; }

@media (max-width: 960px) {
  .account-main { gap: 56px; }
  .account-side { gap: 28px; }
  .account-section > h2 { margin-bottom: 24px; }
  .panel { padding: 28px 24px; gap: 18px; }
  #logout { display: inline-flex; align-items: center; min-height: 48px; margin-top: 12px; }
  main > .wrap:last-child { padding-bottom: clamp(24px, 8vw, 56px); }
}

.payment-state .row-actions:has(.order-checkout) { display: grid; justify-items: start; gap: 1rem; }
.order-checkout { display: grid; gap: 1rem; width: min(100%, 32rem); }
.order-checkout fieldset { display: grid; gap: .5rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.order-checkout legend { margin-bottom: .5rem; }
.order-checkout .checkout-option { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .85rem 1rem; border: 1px solid var(--line, currentColor); border-radius: var(--radius, 8px); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.order-checkout .checkout-option input { width: 1rem; height: 1rem; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: currentColor; }
.order-checkout .checkout-option:has(:checked) { border-color: var(--accent, currentColor); background: rgba(255, 255, 255, .09); }
.order-checkout [hidden], .order-checkout .form-error:empty { display: none; }
