/* FSMsync document-page components — Phase 3 (2026-09-11).
   Loaded AFTER site.css on privacy, terms, and sms-consent. Same ?v= rule as
   site.css: bump the query in every page that links this file whenever it changes.
   Policy copy on those pages is untouched by this sheet — shell + type only. */

/* ── PAGE HEADER ─────────────────────────── */
.page-header {
  position: relative;
  padding: 5rem 2rem 3.5rem;
  border-bottom: 1px solid var(--dark-border);
  background:
    linear-gradient(75deg, rgba(212, 101, 14, 0.12), transparent 55%),
    var(--dark);
}
.page-header-inner { max-width: 820px; margin: 0 auto; position: relative; }
.page-eyebrow {
  display: block;
  font: 600 0.78rem var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pumpkin);
  margin-bottom: 1.25rem;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  color: var(--text);
  margin-bottom: 1.25rem;
}
.page-lede { font-size: 1.05rem; color: var(--text-muted); max-width: 640px; margin-bottom: 1.5rem; }
.page-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.page-meta-item { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.page-meta-item svg { width: 14px; height: 14px; color: var(--text-dim); flex-shrink: 0; }
.page-meta-divider { width: 1px; height: 14px; background: var(--dark-border); }

/* ── CONTENT LAYOUT ──────────────────────── */
.content-wrapper { max-width: 820px; margin: 0 auto; padding: 3rem 2rem 6rem; line-height: 1.7; }

/* ── TOC ─────────────────────────────────── */
.toc {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  margin-bottom: 3.5rem;
  overflow: hidden;
}
.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary:hover { background: var(--dark-hover); }
.toc-label {
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.toc-chevron { width: 16px; height: 16px; color: var(--text-dim); transition: transform 0.2s; flex-shrink: 0; }
.toc[open] .toc-chevron { transform: rotate(180deg); }
.toc-body { padding: 0 1.5rem 1.25rem; border-top: 1px solid var(--dark-border); }
.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 2rem;
  padding-top: 1rem;
  counter-reset: toc-item;
}
.toc-list li { counter-increment: toc-item; }
.toc-list a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.2rem 0;
  transition: color 0.15s;
}
.toc-list a:hover { color: var(--ember); }
.toc-list a::before {
  content: counter(toc-item, decimal-leading-zero);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── SECTIONS ────────────────────────────── */
.policy-section {
  margin-bottom: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-border);
  animation: fadeUp 0.4s ease both;
}
.policy-section:first-of-type { border-top: none; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .policy-section { animation: none; }
}
.section-number {
  display: block;
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.08em;
  color: var(--pumpkin);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: 1rem;
}
.policy-section p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 1rem; }
.policy-section p:last-child { margin-bottom: 0; }
.policy-section strong { color: var(--text); font-weight: 600; }

/* ── DATA TABLE (mono is true here: column labels over data) ── */
.data-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.85rem; }
.data-table th {
  font: 500 0.68rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dark-border);
  background: var(--dark-mid);
}
.data-table th:first-child { border-radius: var(--radius) 0 0 0; }
.data-table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.data-table td {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(45, 51, 59, 0.5);
  vertical-align: top;
}
.data-table td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(28, 33, 40, 0.4); }

/* ── CALLOUT ─────────────────────────────── */
.callout {
  background: rgba(212, 101, 14, 0.07);
  border: 1px solid rgba(212, 101, 14, 0.2);
  border-left: 3px solid var(--pumpkin);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.callout p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0 !important; }
.callout strong { color: var(--ember); }

/* ── LIST ────────────────────────────────── */
.policy-list { list-style: none; margin: 1rem 0; }
.policy-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  line-height: 1.6;
}
.policy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pumpkin);
  opacity: 0.6;
}

/* ── CONTACT CARD ────────────────────────── */
.contact-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: rgba(212, 101, 14, 0.1);
  border: 1px solid rgba(212, 101, 14, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pumpkin);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-label {
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.contact-value { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.contact-value a { color: var(--ember); text-decoration: none; transition: color 0.2s; }
.contact-value a:hover { color: var(--pumpkin-glow); }
.contact-note { font-size: 0.82rem; color: var(--text-dim); }

/* ── SMS CONSENT: opt-in UI preview (deliberately light — it mimics the customer-facing page) ── */
.preview-frame {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 1.5rem 0;
  overflow: hidden;
}
.preview-frame-header {
  padding: 0.65rem 1rem;
  background: var(--dark-mid);
  border-bottom: 1px solid var(--dark-border);
  font: 500 0.7rem var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.preview-body {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}
.preview-body h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.preview-body .estimate-meta { font-size: 0.85rem; color: #666; margin-bottom: 1.5rem; }
.preview-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fef9f3;
  border: 1px solid #f5d4b3;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}
.preview-consent input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.preview-consent label { display: block; color: #333; font-weight: 600; margin-bottom: 4px; }
.preview-consent .disclosure { color: #555; }
.preview-consent .disclosure a { color: #C2510F; text-decoration: underline; }
.preview-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.preview-btn-approve, .preview-btn-decline {
  color: #fff;
  padding: 12px 32px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: default;
}
.preview-btn-approve { background: #16a34a; }
.preview-btn-decline { background: #dc2626; }

/* ── SMS CONSENT: sample messages (mono is true here: literal SMS text) ── */
.sms-sample {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 0.75rem 0;
}
.sms-sample-label {
  font: 600 0.72rem var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}
.sms-sample-body {
  font: 500 0.85rem var(--font-mono);
  color: var(--text);
  background: var(--dark-mid);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--pumpkin);
  white-space: pre-wrap;
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 680px) {
  .page-header { padding: 4rem 1.25rem 2.5rem; }
  .content-wrapper { padding: 2.5rem 1.25rem 4rem; }
}
@media (max-width: 560px) {
  .toc-list { grid-template-columns: 1fr; }
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table td:first-child { white-space: normal; }
}
