/* =========================================================================
   pages.css — CTV Domination
   Styles for pages built after the contact.html/style.css redesign pass
   started: /terms and /payment-failed. Deliberately does NOT touch or
   depend on style.css internals (class names there may change). Uses
   var(--token, fallback) throughout so these pages inherit the live
   marketing palette when style.css happens to be loaded alongside this
   file, and fall back to a plain, permanent look when it isn't — which is
   the intended, insulated state for /terms specifically.
   ========================================================================= */

:root {
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font, 'Inter', Arial, Helvetica, sans-serif);
  background: var(--bg, #FFFFFF);
  color: var(--body, #374151);
  -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------------
   /terms — plain, printable legal document. No cards, no accent color
   decoration beyond links. Readable measure, generous line-height.
   ------------------------------------------------------------------- */

.terms-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  position: sticky;
  top: 0;
  background: var(--bg, #FFFFFF);
  z-index: 5;
}

.terms-page-back {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent, #2563EB);
  text-decoration: none;
}
.terms-page-back:hover { text-decoration: underline; }

.terms-page-print {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border, #E5E7EB);
  background: var(--surface, #F3F4F6);
  color: var(--ink, #111827);
  cursor: pointer;
}
.terms-page-print:hover { border-color: var(--accent, #2563EB); color: var(--accent, #2563EB); }

.terms-page-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

.terms-doc { color: var(--body, #374151); }

.terms-doc .terms-meta {
  font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted, #6B7280);
  margin: 0 0 4px;
}

.terms-doc h1 {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  color: var(--ink, #111827);
  margin: 0 0 4px;
}

.terms-doc .terms-subhead {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted, #6B7280);
  margin: 0 0 20px;
}

.terms-doc h2 {
  font-size: 19px;
  color: var(--ink, #111827);
  margin: 34px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #E5E7EB);
}
.terms-doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 24px; }

.terms-doc h3 {
  font-size: 15.5px;
  color: var(--ink, #111827);
  margin: 20px 0 8px;
}

.terms-doc p {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.terms-doc ul, .terms-doc ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
.terms-doc li {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 6px;
}

.terms-doc strong { color: var(--ink, #111827); }

.terms-doc table.rate-card {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 14px;
}
.terms-doc table.rate-card th,
.terms-doc table.rate-card td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border, #E5E7EB);
}
.terms-doc table.rate-card th {
  background: var(--surface, #F3F4F6);
  font-weight: 700;
  color: var(--ink, #111827);
}
.terms-doc table.rate-card td:last-child,
.terms-doc table.rate-card th:last-child { text-align: right; }

.terms-doc .terms-acceptance-heading {
  border-top: 2px solid var(--ink, #111827);
}

@media print {
  .no-print { display: none !important; }
  .terms-page-main { max-width: none; padding: 0; }
  .terms-doc h2 { break-after: avoid; }
  .terms-doc h3 { break-after: avoid; }
  .terms-doc table.rate-card { break-inside: avoid; }
  @page { margin: 0.75in; }
  body { color: #000; }
}

/* -------------------------------------------------------------------
   /payment-failed — small, self-contained, no marketing chrome.
   ------------------------------------------------------------------- */

.pf-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pf-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  padding: 40px 32px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: var(--radius, 12px);
  background: var(--bg, #FFFFFF);
}

.pf-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FEF2F2;
  color: #B91C1C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  margin: 0 auto 20px;
}

.pf-card h1 {
  font-size: 22px;
  font-weight: 600;
  text-transform: none;
  color: var(--ink, #111827);
  margin: 0 0 12px;
}

.pf-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--body, #374151);
  margin: 0 0 12px;
}

.pf-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 8px;
  background: var(--accent, #2563EB);
  color: #FFFFFF;
  border: 1px solid var(--accent, #2563EB);
}
.pf-btn:hover { background: var(--accent-hover, #1D4ED8); }

.pf-btn--ghost {
  background: transparent;
  color: var(--ink, #111827);
  border: 1px solid var(--border, #E5E7EB);
}
.pf-btn--ghost:hover { border-color: var(--accent, #2563EB); color: var(--accent, #2563EB); }

.pf-contact {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted, #6B7280);
}
.pf-contact a { color: var(--accent, #2563EB); }
