/* ============================================================================================
   Review Reels · /terms (loaded after app.css; uses its tokens, keyframes and hooks)
   The quietest page on the set: an article, not a card. One measure of text on hairlines, a
   contents rail beside it, numerals because clauses are a real sequence, and one gold moment
   (the italic ampersand in the h1). Structure comes from rules and space, never from boxes.

   MOTION: the take on the head (app.css), the rail rising as its last beat, sections arriving
   through the shared [data-reveal] (RR.reveal), a 3 px slide on the contents links and colour
   crossfades at 160 ms. Transform/opacity only; all of it is off under prefers-reduced-motion.
   ============================================================================================ */

html { scroll-behavior: smooth; }                        /* app.css forces auto under reduced motion */
.terms-page .wrap { max-width: var(--container); }       /* the page hangs off the same left edge as the nav; the article sets the measure */
.terms-page main.wrap { padding-bottom: 56px; }           /* the colophon closes the page, so no long tail under it */

/* ---- head ----------------------------------------------------------------------------------- */
.terms-page .page-head { margin-bottom: 0; }
.terms-page .page-head .em-mask { padding-left: .06em; margin-left: -.06em; margin-right: -.1em; }   /* the italic ampersand overhangs on both sides; the pull-back evens the word spaces around it */
.terms-meta { margin-top: 18px; font-variant-numeric: tabular-nums; }
.terms-meta .spec { color: inherit; }

/* ---- layout: contents rail + article -------------------------------------------------------- */
.terms-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 88px; align-items: start; padding-top: 48px; }

.terms-toc { position: sticky; top: 96px; padding-top: 5px; }   /* the kicker shares a baseline with the first clause heading */
.terms-toc .eyebrow { font-size: 15px; }
.terms-toc ol { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--hair-2); }
.terms-toc li { border-bottom: 1px solid var(--hair); }
.terms-toc a { position: relative; display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 12px 0 11px; font-size: 14px; line-height: 1.4; color: var(--text-2); text-decoration: none; transition: color var(--fast) var(--ease); }
.terms-toc a i, .terms-no { font: normal 600 13px/1 var(--display); letter-spacing: .1em; color: var(--gold); }   /* serifed, as in the main page's contents: sans "III" reads as tally marks */
.terms-toc a i { flex: 0 0 26px; }
.terms-toc a span { display: inline-block; transition: transform var(--fast) var(--ease); }
.terms-toc a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease); }
.terms-toc a:hover { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .terms-toc a:hover span { transform: translateX(3px); } }
/* the clause you are reading stays marked in the contents. These are long documents now, so the mark
   follows the scroll (an IntersectionObserver in the page adds .is-here) rather than only :target -
   and it is presentational: with no JS the rail is still a plain, working list of links. */
.terms-toc a.is-here { color: var(--text); }
.terms-toc a.is-here::after { transform: scaleX(1); }

/* ---- the article ---------------------------------------------------------------------------- */
.terms-article { --measure: 584px; min-width: 0; }   /* rules run to the container edge (they line up with the head, the nav and the colophon); the text keeps a ~70-character measure (CSS "64ch" is ~87 real characters in Instrument Sans) */
.terms-sec { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: baseline; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--hair); scroll-margin-top: 96px; transition: border-color var(--fast) var(--ease); }
.terms-sec:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.terms-no { transition: color var(--fast) var(--ease); }
.terms-sec h2 { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.terms-sec p { font-size: 17px; line-height: 1.7; color: var(--text-2); max-width: var(--measure); margin-top: 12px; text-wrap: pretty; }   /* pretty, not balance: no one-word last lines */
.terms-sec strong { color: var(--text); font-weight: inherit; }   /* the promise in each clause: brighter, not heavier */
.terms-sec:target { border-top-color: var(--hair-gold); }
.terms-sec:target .terms-no { color: var(--gold-300); }

/* a real legal document has sub-clauses: a quiet sans sub-head, and lists that keep the measure */
.terms-sec h3 { margin-top: 28px; font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .02em; color: var(--text); }
.terms-sec h3 + p { margin-top: 8px; }
.terms-sec ul, .terms-sec ol.terms-items { list-style: none; margin: 14px 0 0; padding: 0; max-width: var(--measure); }
.terms-sec li { position: relative; padding: 9px 0 9px 22px; font-size: 16px; line-height: 1.65; color: var(--text-2); border-top: 1px solid var(--hair); }
.terms-sec li:first-child { border-top: 0; padding-top: 2px; }
.terms-sec li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 10px; height: 1px; background: var(--hair-gold); }
.terms-sec li:first-child::before { top: .75em; }
.terms-sec li b { color: var(--text); font-weight: 600; }
.terms-sec a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--hair-gold); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color var(--fast) var(--ease); }
.terms-sec a:not(.btn):hover { text-decoration-color: var(--gold); }
.terms-sec p + p { margin-top: 14px; }
/* a placeholder the owner still has to fill in: marked, not hidden, so it cannot ship unnoticed */
.todo { display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--gold-100); background: var(--gold-soft); border: 1px dashed var(--hair-gold); border-radius: var(--r-xs); padding: 1px 7px; overflow-wrap: anywhere; }

/* plans: a two-row ledger in the product's own words (hairline pill, foil pill) */
.terms-plans { margin: 18px 0 0; max-width: var(--measure); }
.terms-plans > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hair); }
.terms-plans > div:last-child { border-bottom: 1px solid var(--hair); }
.terms-plans dt, .terms-plans dd { margin: 0; }
.terms-plans dd { font-size: 16px; line-height: 1.6; color: var(--text-2); font-variant-numeric: tabular-nums; text-wrap: balance; }   /* two-line ledger entries, not running prose: balanced so "9:16 only." is never left alone */

/* end matter: the notice, then who to write to; both sit on the text column, not under the numerals */
.terms-end { margin: 48px 0 0 56px; max-width: var(--measure); }
.terms-end .msg { margin-top: 0; font-size: 14px; }
.terms-contact { margin-top: 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.terms-contact a { color: var(--text); text-decoration: underline; text-decoration-color: var(--hair-gold); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color var(--fast) var(--ease); }
.terms-contact a:hover { text-decoration-color: var(--gold); }

/* colophon: the same closing line as the main page, with the other legal doors beside it */
.terms-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-top: 96px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--muted); }
.terms-foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.terms-foot-nav a { color: var(--muted); text-decoration: none; transition: color var(--fast) var(--ease); }
.terms-foot-nav a:hover { color: var(--gold-2); }

/* ---- narrower: the rail becomes a two-column contents block above the article --------------- */
@media (max-width: 960px) {
  .terms-layout { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .terms-toc { position: static; margin-bottom: 44px; padding-top: 0; }
  .terms-toc ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
}
@media (max-width: 600px) {
  .terms-layout { padding-top: 24px; }
  .terms-toc { margin-bottom: 36px; }
  .terms-toc ol { column-gap: 16px; margin-top: 12px; }
  .terms-toc a { gap: 8px; }
  .terms-toc a i { flex-basis: 20px; }
  .terms-meta { margin-top: 14px; }
  .terms-meta .spec.wide { display: none; }   /* one line at 390: the contents block right below already says four */
  .terms-sec { grid-template-columns: minmax(0, 1fr); margin-top: 32px; padding-top: 24px; scroll-margin-top: 76px; }
  .terms-no { margin-bottom: 12px; }
  .terms-sec h2 { font-size: 22px; }
  .terms-sec p { font-size: 16px; }
  .terms-plans > div { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; }
  .terms-end { margin: 40px 0 0; }
  .terms-foot { margin-top: 64px; }
}

/* ---- motion ---------------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .page-head .terms-meta { animation: rise var(--t-enter) var(--ease) 140ms backwards; }
  .terms-toc { animation: rise var(--t-enter) var(--ease) 200ms backwards; }   /* "backwards": nothing lingers on the sticky rail */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .terms-toc a, .terms-toc a span, .terms-toc a::after, .terms-sec, .terms-no, .terms-contact a { transition: none; }
  .terms-toc a:hover span { transform: none; }
}
@media print {
  .terms-toc, .nav { display: none; }
  .terms-layout { display: block; padding-top: 24px; }
}
