/* ==========================================================================
   Pro Hauls — legal document pages (/privacy-policy, /terms-of-service)

   Layered on top of prohauls-pages.css: same off-black greys, same safety
   orange, same Saira Condensed display type. The difference is density and
   restraint — these are long statutory documents, so section padding tightens,
   display type steps down, and the only decoration is the hazard hatch used
   for conspicuous (all-caps) notices. Nothing here overrides the tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Document hero — no photo bed; legal pages stay sober
   -------------------------------------------------------------------------- */

.legal .hero { padding-top: clamp(40px, 6vh, 68px); padding-bottom: clamp(32px, 5vh, 56px); }
.legal .hero h1 { max-width: 26ch; font-size: clamp(29px, 4.4vw, 52px); }
.legal .hero .lede { max-width: 66ch; }

/* Effective-date / authority strip. Mirrors .stats but quieter — this is
   reference data, not a headline number. */
.doc-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 1px;
  width: 100%;
  background: var(--rule-2);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  overflow: hidden;
}
.doc-meta div { background: var(--panel); padding: 15px 18px; display: flex; flex-direction: column; gap: 4px; }
.doc-meta dt,
.doc-meta b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-4);
}
.doc-meta span { font-size: 14.5px; color: var(--text-2); line-height: 1.4; font-variant-numeric: tabular-nums; }
.doc-meta div:first-child span { color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------------------
   Table of contents — numbered dispatch-board grid
   -------------------------------------------------------------------------- */

.toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background: var(--rule-2);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  overflow: hidden;
}
.toc a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 13px 18px;
  background: var(--panel);
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.35;
  transition: background .18s ease, color .18s ease;
}
.toc a:hover { background: var(--panel-2); color: var(--text); }
.toc a span:last-child {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .5px;
  line-height: 1.3;
}
.toc .n {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  color: var(--accent);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.toc a:hover .n { color: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Document body — tighter sections, smaller display type, longer measure
   -------------------------------------------------------------------------- */

.legal main section { padding: clamp(34px, 4.4vh, 54px) var(--gut); }
.legal main .shell { gap: 16px; }
.legal main h2 { font-size: clamp(21px, 2.7vw, 31px); line-height: 1.04; }
.legal main .sec-head { margin-bottom: 4px; }

.legal main p,
.legal main li {
  max-width: 82ch;
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-3);
}
.legal main p + p { margin-top: 0; }

/* Sub-section headings keep their statutory numbering (1.1, 2.8.3), so they
   are set as labels with an orange tick rather than big display type. */
.legal main h3 {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
  font-size: clamp(15.5px, 1.5vw, 17.5px);
  letter-spacing: .6px;
  color: var(--text);
  text-transform: none;
  line-height: 1.25;
}
.legal main h4.sub {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: none;
  color: var(--text-2);
}
.legal main h4.sub::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 2px;
  margin-right: 9px;
  vertical-align: middle;
  background: var(--accent-line);
}

/* Operative paragraphs the drafters set in bold end to end. */
.legal main p.lede-p {
  color: var(--text-2);
  font-weight: 600;
  padding-left: 14px;
  border-left: 1px solid var(--accent-line);
}

/* Conspicuous all-caps notices — hazard bar, the same device the landing
   pages use for the "we are not junk removal" callout. */
.legal main p.caps {
  position: relative;
  margin: 6px 0;
  padding: 18px 22px;
  border: 1px solid var(--rule-2);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--panel);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.62;
  letter-spacing: .3px;
  max-width: 88ch;
}
.legal main p.caps::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  border-radius: 2px 0 0 2px;
  background-image: repeating-linear-gradient(-45deg, var(--accent) 0 5px, #111214 5px 10px);
}

/* Lettered clauses — (a), (b), (i) — marker column stays aligned and legible. */
.lettered { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lettered li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; }
.lettered .mk {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.72;
}

/* Contact / filing addresses. */
.legal main p.addr {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  max-width: 46ch;
}

/* Statutory tables run dense and wrap hard on phones. */
.legal main table { font-size: 13.8px; min-width: 560px; }
.legal main th, .legal main td { padding: 12px 16px; vertical-align: top; }
.legal main tbody th { font-size: 13.8px; color: var(--text-2); }

/* --------------------------------------------------------------------------
   Back-to-contents — sticky, unobtrusive, keyboard reachable
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: clamp(12px, 3vw, 26px);
  bottom: clamp(12px, 3vw, 26px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  background: rgba(11, 11, 13, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text-3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.to-top:hover { border-color: var(--accent-line); color: var(--text); }
.to-top svg { width: 12px; height: 12px; fill: var(--accent); }

/* --------------------------------------------------------------------------
   Print — these documents get printed and filed
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .to-top, .hero-hatch, .siblings, .doc-actions, footer .foot-grid { display: none !important; }
  body { background: #fff; color: #111; font-size: 10.5pt; }
  .legal .hero { padding: 0 0 12pt; border-bottom: 1pt solid #999; }
  h1, h2, h3, h4 { color: #000; }
  .legal main section { padding: 10pt 0; border-bottom: 0; break-inside: avoid-page; }
  .legal main section:nth-of-type(even) { background: none; }
  .legal main p, .legal main li { color: #111; max-width: none; }
  .legal main p.caps, .legal main p.addr, .doc-meta, .toc { background: none; border-color: #999; }
  .legal main p.caps::before { display: none; }
  a { color: #111; text-decoration: underline; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 8.5pt; color: #444; }
  .toc { display: none; }
  .eyebrow { border-color: #999; color: #111; background: none; }
}
