/* Legal and seller sheets: long text set as ledger rows. Order: layout, type, colour, motion. */

/* ============ LAYOUT ============ */

.paper_sheet .intake_row[id] { scroll-margin-top: 0.5rem; }
.paper_sheet .intake_body > * + * { margin-top: 0.875rem; }
.paper_sheet .intake_body > .entry_head + .entry_text { margin-top: 0.625rem; }
.paper_sheet .entry_text + .entry_text { margin-top: 0.875rem; }

/* On reading sheets nothing with words on it is pinned to the window.
   The menu tab takes its own place in the flow, under the opening entry at the right edge;
   opened, it pushes the sheet down instead of lying on it. */
.paper_sheet .bookmark_strip { position: relative; top: auto; right: auto; align-self: flex-end;
  flex: none; margin-right: var(--measure-edge); }

/* The consent band keeps its own place in the flow as well, whatever else would pin it:
   a full-width band after the footer, never over the text of the sheet. */
.paper_sheet #storage { position: relative !important; inset: auto !important; transform: none !important;
  flex: none; width: auto; max-width: none; margin: 0; }

.sheet_contents { list-style: none; margin-top: 1rem; padding: 0; }
.sheet_contents li { break-inside: avoid; border-top: var(--measure-rule) solid; }
.sheet_contents a { display: flex; align-items: center; gap: 0.875rem; min-height: 2.75rem; padding-block: 0.25rem; }
.sheet_contents li { counter-increment: clause; }
.sheet_contents { counter-reset: clause; }
.sheet_contents a::before { content: counter(clause); min-width: 1.5rem; }
@container entry_column (min-width: 44rem) {
  .sheet_contents { columns: 2; column-gap: 2.5rem; }
}

.sheet_list { margin-top: 0.75rem; padding-left: 1.25rem; max-width: 64ch; }
.sheet_list li { padding-left: 0.25rem; }
.sheet_list li + li { margin-top: 0.5rem; }

.sheet_table { width: 100%; max-width: 64rem; border-collapse: collapse; margin-top: 0.875rem; }
.sheet_table th, .sheet_table td { text-align: left; vertical-align: top; padding: 0.625rem 0.875rem 0.625rem 0; border-top: var(--measure-rule) solid; }
.sheet_table td + td, .sheet_table th + th { padding-left: 0.875rem; }
.sheet_wrap { overflow-x: auto; max-width: 100%; }
.sheet_wrap .sheet_table { min-width: 36rem; }
.sheet_hand { margin-top: 1.25rem; }

/* ============ TYPE ============ */

.sheet_stamp { font-size: var(--step-small); font-weight: 600; line-height: 1.35; }
.sheet_contents a { font-size: 1rem; font-weight: 500; text-decoration: none; line-height: 1.25; }
.sheet_contents a::before { font-family: var(--face-slab); font-weight: 900; font-variant-numeric: tabular-nums; }
.sheet_table { font-size: 1rem; line-height: 1.45; }
.sheet_table th { font-weight: 600; font-size: var(--step-small); }
.sheet_code { font-family: ui-monospace, 'Courier New', monospace; font-size: 0.9375rem; overflow-wrap: anywhere; }
.paper_sheet .opening_line { font-weight: 500; }

/* ============ COLOUR ============ */

.sheet_contents a:hover { text-decoration: underline; }
.sheet_code { background: var(--tone-aubergine); color: var(--tone-paper); padding: 0.0625rem 0.375rem; }
.sheet_table th { color: var(--tone-aubergine); }

/* Pinned things stand on their own solid ground: the page passes beneath them.
   The ground is painted on the pinned box AND on each piece of text it carries,
   so no letter of the page shows through at any point of the scroll. */
.paper_sheet .call_tag { background-color: var(--tone-cyan); color: var(--tone-aubergine); }

.paper_sheet .bookmark_strip,
.paper_sheet .bookmark_pull,
.paper_sheet .bookmark_links,
.paper_sheet .bookmark_links a { background-color: var(--tone-cyan); color: var(--tone-aubergine); }

/* The consent panel sits on paper here, so it stands off the plum page as a ground of its own. */
.paper_sheet #storage { --tone-plate: var(--tone-paper); background-color: var(--tone-paper); color: var(--tone-aubergine); }
.paper_sheet #storage .consent_text,
.paper_sheet #storage .consent_text a,
.paper_sheet #storage .consent_choices { background-color: var(--tone-paper); color: var(--tone-aubergine); }

/* ============ MOTION ============ */

/* Reading pages stay still; links and buttons change state at once. */
@media (prefers-reduced-motion: reduce) {
  .paper_sheet * { animation: none !important; transition: none !important; }
}
