/* LEGAL PAGES: one notice, a contents ticket beside numbered sections. Builds on site.css tokens. */

.legal-top { padding-block: clamp(.5rem, 2vw, 1.5rem) var(--gap); }
.legal-top h1 { max-width: 18ch; }
.legal-top .lede { margin-bottom: 0; }
.legal-top .ticket p:last-child { margin-bottom: 0; }

.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
@media (min-width: 56rem) {
  .legal { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); }
}

/* contents list: numbered, each entry a full-height touch target */
.legal__toc .name { margin-bottom: .5rem; }
.toc { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: var(--line) dotted var(--ink); }
.toc li:first-child { border-top: 0; }
.toc a { display: flex; gap: .6rem; align-items: baseline; min-height: 2.75rem; padding-block: .6rem; text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--hot); flex: none; }
.toc a:hover { color: var(--hot); text-decoration: underline; text-decoration-thickness: var(--line); }

/* numbered sections divided by dotted lines */
.legal__body { max-width: 42rem; counter-reset: sec; }
.legal__body section { counter-increment: sec; padding-block: 1.75rem; border-top: var(--line) dotted var(--ink); }
.legal__body section:first-child { border-top: 0; padding-top: 0; }
.legal__body h2 { font-size: clamp(1.625rem, 1.4rem + 1vw, 2.125rem); margin-bottom: .6em; }
.legal__body h2::before { content: counter(sec); display: inline-block; vertical-align: .18em; min-width: 2rem; margin-right: .6rem; padding: .3rem .4rem; border: var(--line) solid var(--ink); font: 600 1rem/1 var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.legal__body ul { padding-left: 1.2rem; margin: 0 0 1em; }
.legal__body li { margin-bottom: .5em; }
.legal__body section > :last-child { margin-bottom: 0; }
.legal__body code { font: 600 .9em var(--text); padding: .05em .3em; border: var(--line) dotted var(--ink); overflow-wrap: anywhere; }
.legal__body .btn { margin-top: .25rem; }
.legal__body .specs dd { overflow-wrap: anywhere; }

/* 404: one ticket, text on one side of the tear, the window photo on the other */
.nf { padding-block: clamp(.5rem, 2vw, 1.5rem) clamp(2.5rem, 6vw, 5rem); }
.nf__ticket { max-width: 60rem; }
.nf__ticket .ticket__body { padding: clamp(1.25rem, 3vw, 2.25rem); }
.nf__ticket h1 { max-width: 12ch; }
.nf__ticket .stub { flex-basis: 40%; min-height: 18rem; }
.nf-links { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .5rem; max-width: 20rem; }
.nf-links .btn { width: 100%; }
@media (max-width: 40rem) {
  .nf__ticket .stub { flex-basis: 30%; }
}
