/* ══════════════════════════════════════════════════════════════════════════
   READING PAGES — the ÁSZF, the privacy and cookie notices, withdrawal,
   shipping, contact: text a shopper reads, rendered by index.php's loop.

   Made of the shell's own language, nothing new: the shell's container and
   gutter, one Titan line for the title, Rubik for reading, type for lists,
   hairlines between sections. What a shopper DOES on these pages (withdraw,
   unsubscribe, set cookie preferences) sits on paper, the way big surfaces do
   in the shell, and the way forward is the printed cocoa button. Amber stays
   with buying.

   Prose holds a reading measure; a block that brings its own layout (the
   contact page's cards) keeps the container's width.
   ══════════════════════════════════════════════════════════════════════════ */

.rv-read {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--s8) var(--gutter) var(--s10);
  color: var(--ink);
  font: 400 var(--fs-md)/1.6 var(--font-ui);
}
.rv-read__title {
  max-width: 22ch;
  margin: 0 0 var(--s7);
  font: 400 clamp(1.875rem, 1.25rem + 2.2vw, 3.25rem)/var(--lh-tight) var(--font-display);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: manual;
}

/* ── prose ─────────────────────────────────────────────────────────────── */
.rv-read__body :where(p, li, dt, dd, summary, blockquote, h1, h2, h3, h4, h5, h6, pre) { max-width: 72ch; }
.rv-read__body :where(p, ul, ol, dl, blockquote, pre, figure) { margin: 0 0 var(--s4); }
.rv-read__body :where(h1, h2, h3, h4, h5, h6) { margin: var(--s8) 0 var(--s3); font-family: var(--font-ui); font-weight: 700; line-height: var(--lh-snug); text-wrap: balance; }
/* A heading the page's own text opens with is a heading, not a second title. */
.rv-read__body h1 { margin-top: 0; font-size: var(--fs-2xl); }
.rv-read__body h2 { font-size: var(--fs-2xl); }
.rv-read__body h3 { font-size: var(--fs-xl); margin-top: var(--s7); }
.rv-read__body :where(h4, h5, h6) { font-size: var(--fs-lg); margin-top: var(--s6); }
.rv-read__body > :first-child, .rv-read__body > :first-child > :first-child { margin-top: 0; }
.rv-read__body :where(ul, ol) { padding-left: 1.25em; }
.rv-read__body li { margin: 0 0 var(--s2); }
.rv-read__body li::marker { color: var(--ink-3); }
.rv-read__body :where(strong, b) { font-weight: 700; }
.rv-read__body hr { max-width: 72ch; height: 0; margin: var(--s8) 0 0; border: 0; border-top: 1.5px solid var(--rule); }
.rv-read__body hr + :where(h2, h3) { margin-top: var(--s5); }
.rv-read__body a:not(.rv-btn) {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em;
  overflow-wrap: anywhere;
}
@media (hover: hover) { .rv-read__body a:not(.rv-btn):hover { text-decoration-thickness: 2.5px; } }
.rv-read__body blockquote { padding-left: var(--s4); border-left: 3px solid var(--rule-2); color: var(--ink-2); }
.rv-read__body details { max-width: 72ch; border-bottom: 1.5px solid var(--rule); }
.rv-read__body details > summary { display: flex; align-items: center; min-height: var(--tap); padding: var(--s2) 0; cursor: pointer; font-weight: 700; }
.rv-read__body details[open] > summary { margin-bottom: var(--s2); }

/* ── tables: type for lists ───────────────────────────────────────────── */
.rv-read__body table { width: 100%; max-width: 960px; margin: 0 0 var(--s6); border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.45; }
.rv-read__body :where(th, td) { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1.5px solid var(--rule); text-align: left; vertical-align: top; }
.rv-read__body th { color: var(--ink-2); font-weight: 600; }
.rv-read__body td code, .rv-read__body th code { font: 600 var(--fs-sm)/1.4 var(--font-ui); color: var(--ink); overflow-wrap: anywhere; }
.rv-pv-list { max-width: 72ch; }
.rv-pv-list h3 { margin-top: var(--s7); }
.rv-pv-list .rv-pv__techs { margin-top: var(--s3); }
/* On the page's cream the sheet's sand wells would vanish: here they are paper. */
.rv-pv-list .rv-pv__tech { background: var(--paper); }
.rv-pv-list h3 + p { color: var(--ink-2); }

/* ── a task on a reading page: paper, the way forward printed ─────────── */
.rv-read-task {
  max-width: 720px;
  margin: var(--s8) 0;
  padding: var(--s7);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: var(--lift-sm);
}
.rv-read-task > h2 { margin: 0 0 var(--s3); font-size: var(--fs-2xl); }
.rv-read-task > p:last-child, .rv-read-task form > p:last-child { margin-bottom: 0; }
.rv-read-task .rv-btn { margin-top: var(--s2); }
.rv-read-task__statement {
  margin: var(--s4) 0 0; padding: var(--s4);
  border-radius: var(--r-md); background: var(--sand);
  font: 400 var(--fs-sm)/1.55 var(--font-ui); white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The cookie page's settings are the sheet's: its title line with the mark,
   then the same form on paper. */
.rv-read-task.rv-pv-page { max-width: 560px; }
.rv-read__body .rv-pv-page__h { display: flex; align-items: center; gap: var(--s3); max-width: none; margin: 0 0 var(--s3); font: 400 var(--fs-d3)/1 var(--font-display); letter-spacing: var(--track-display); text-transform: uppercase; }
.rv-pv-page__h .rv-cookie { width: 36px; height: 36px; margin: -4px 0; rotate: -10deg; }

/* A labelled entry: the label above, the control at full width, help below. */
.rv-entry { display: grid; gap: var(--s2); max-width: 30rem; margin: 0 0 var(--s5); }
.rv-entry__label { font-weight: 600; line-height: 1.35; }
.rv-entry__control {
  width: 100%; min-height: 52px; padding: var(--s3) var(--s4);
  border: var(--line-thin) solid var(--ink-3); border-radius: var(--r-md);
  background: #fff; color: var(--ink); font: inherit; font-size: var(--fs-md);
  transition: border-color var(--t-fast) ease;
}
textarea.rv-entry__control { min-height: 104px; resize: vertical; }
.rv-entry__control:focus-visible { outline: 2.5px solid var(--ring); outline-offset: 3px; border-color: var(--cocoa); }
@media (hover: hover) { .rv-entry__control:hover { border-color: var(--cocoa); } }
.rv-entry__help { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.45; }
.rv-entry__help:empty { display: none; }
.rv-entry__alert { margin: 0 0 var(--s5); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--alert-wash); color: var(--alert); font-weight: 600; }

/* ── wide screens: a larger reading size, and a long text's contents ───
   beside it, sticky, so the width a desktop has is used to find your way
   through the ÁSZF rather than left empty. */
.rv-read__toc { display: none; }
@media (min-width: 1024px) {
  .rv-read { font-size: 1.0625rem; }
}
@media (min-width: 1180px) {
  .rv-read--toc { display: grid; grid-template-columns: minmax(0, 72ch) minmax(220px, 280px); column-gap: var(--s10); justify-content: start; align-items: start; }
  .rv-read--toc > .rv-read__title { grid-column: 1 / -1; }
  .rv-read--toc > .rv-read__body { grid-column: 1; min-width: 0; }
  .rv-read__toc {
    display: block; grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--head-h) + var(--s6));
    max-height: calc(100vh - var(--head-h) - 2 * var(--s6)); overflow-y: auto; overscroll-behavior: contain;
    padding: 2px 0 var(--s2) var(--s5); border-left: var(--line-thin) solid var(--rule);
    font-size: var(--fs-sm); line-height: 1.35;
  }
  .rv-read__toc-h { margin: 0 0 var(--s3); font-weight: 700; color: var(--ink); }
  .rv-read__toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
  .rv-read__toc a {
    display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none;
    transition: color var(--t-fast) ease;
  }
  .rv-read__toc a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .24em; text-decoration-color: var(--coral); }
}

@media (max-width: 639.98px) {
  .rv-read { padding-top: var(--s6); }
  .rv-read__title { margin-bottom: var(--s6); }
  .rv-read-task { margin: var(--s7) calc(-1 * var(--s2)); padding: var(--s5) var(--s4); }
  .rv-read-task .rv-btn { width: 100%; white-space: normal; text-align: center; }
}
