/* /terms: a readable document. Builds on app.css tokens. */
.terms {
  display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 40px; justify-content: center;
  padding: 36px max(20px, env(safe-area-inset-left)) 80px;
}
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.toc b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 10px; }
.toc a:hover { background: var(--surface-2); color: var(--ink); }
.doc { font-size: 16px; line-height: 1.65; }
.doc h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; margin: 0 0 6px; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-family: var(--font-display); letter-spacing: -.02em; font-size: 26px; margin: 44px 0 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc section { scroll-margin-top: calc(var(--header-h) + 16px); }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.summary { background: var(--surface); border-radius: 22px; padding: 6px 24px 14px; box-shadow: var(--shadow-1); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.summary h2 { margin-top: 18px; }
.rule {
  background: var(--surface); border-radius: 20px; padding: 18px 22px; margin: 14px 0;
  box-shadow: var(--shadow-1); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.rule:target { outline: 3px solid var(--accent); outline-offset: 2px; }
.rule h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 18px; }
.rule-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; flex: none; }
.rule p { margin: 0 0 10px; color: var(--ink-2); }
.rule-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rule-cols h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.rule-cols ul { margin: 0; font-size: 14.5px; }
.rule-no-go h4 { color: var(--danger); }
.rule-ok h4 { color: var(--ok); }
@media (max-width: 860px) {
  .terms { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .toc b { width: 100%; }
  .rule-cols { grid-template-columns: 1fr; }
}
/* The PDF a confirmation email attaches (tools/terms_pdf.py prints this page). */
@media print {
  .top .top-right, .toc { display: none; }
  .terms { display: block; padding: 0; }
  .summary, .rule { box-shadow: none; break-inside: avoid; }
  .doc { font-size: 10.5pt; }
  .doc h2 { font-size: 16pt; margin-top: 22pt; }
  body { background: #fff; }
}
