/* ============================================================
   MamaBee — legal pages (Privacy, Terms)
   Loads AFTER styles2.css to reuse tokens, nav, footer, buttons.
   Adds a calm, readable long-form document layout.
   ============================================================ */

.legal-hero {
  background: var(--grad-honey);
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  border-radius: 0 0 40px 40px;
}
.legal-hero .hex-bg { position: absolute; inset: 0; opacity: .22; pointer-events: none; }
.legal-hero .hex-bg span { position: absolute; background: rgba(255,255,255,.55); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%); }
.legal-hero .wrap { position: relative; z-index: 1; }
.legal-hero .crumb { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: 0.92rem; color: var(--cocoa); background: rgba(255,255,255,0.55); padding: 8px 16px; border-radius: var(--pill); }
.legal-hero h1 { margin-top: 20px; font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--cocoa); }
.legal-hero .updated { margin-top: 14px; font-weight: 700; color: #6b4a1e; font-size: 1.02rem; }

/* layout: sticky table of contents + content */
.legal-body { padding: 56px 0 96px; }
.legal-grid { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }

.legal-toc { position: sticky; top: 98px; align-self: start; }
.legal-toc h4 { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 14px; }
.legal-toc a { display: block; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 0.95rem; color: var(--ink-muted); transition: color .16s ease, background-color .16s ease; }
.legal-toc a:hover { color: var(--cocoa); background: var(--honey-xlt); }
.legal-toc a.active { color: var(--cocoa); background: var(--honey-lt); }

.legal-content { max-width: 760px; }

/* callout summary box */
.legal-summary {
  background: var(--honey-xlt);
  border: 2px solid var(--honey-lt);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  margin-bottom: 44px;
}
.legal-summary .tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 0.86rem; color: var(--honey-dk); margin-bottom: 10px; }
.legal-summary p { font-size: 1.06rem; font-weight: 600; color: var(--ink); line-height: 1.6; }

.legal-content section { scroll-margin-top: 98px; }
.legal-content section + section { margin-top: 44px; }
.legal-content h2 {
  font-family: var(--font-display); font-weight: 900; font-size: 1.62rem;
  letter-spacing: -0.02em; color: var(--ink);
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 2px solid var(--divider);
  display: flex; align-items: center; gap: 12px;
}
.legal-content h2 .hx { width: 26px; height: 28px; flex: none; background: var(--honey); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%); }
.legal-content h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; color: var(--cocoa); margin: 26px 0 8px; }
.legal-content p { font-size: 1.04rem; line-height: 1.68; color: var(--ink); font-weight: 500; margin: 0 0 14px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-content strong { font-weight: 800; color: var(--ink); }
.legal-content a.inline { color: var(--honey-dk); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--honey-lt); }
.legal-content a.inline:hover { text-decoration-color: var(--honey-dk); }

.legal-content ul.bullets { margin: 0 0 14px; display: grid; gap: 11px; }
.legal-content ul.bullets li { position: relative; padding-left: 28px; font-size: 1.04rem; line-height: 1.6; color: var(--ink); font-weight: 500; }
.legal-content ul.bullets li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 9px; height: 10px; background: var(--honey); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%); }
.legal-content ul.bullets li strong { color: var(--cocoa); }

/* permission cards */
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.perm-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 22px 24px; }
.perm-card h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.perm-card h3 .pic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--honey-lt); }
.perm-card h3 .pic svg { width: 20px; height: 20px; color: var(--honey-dk); }
.perm-card dl { margin: 0; display: grid; gap: 9px; }
.perm-card dt { font-family: var(--font-display); font-weight: 800; font-size: 0.82rem; color: var(--ink-muted); letter-spacing: .02em; }
.perm-card dd { margin: 0; font-size: 0.98rem; line-height: 1.5; color: var(--ink); font-weight: 500; }
.perm-card dd code { font-family: var(--font-body); background: var(--cream-deep); padding: 1px 6px; border-radius: 6px; font-size: 0.9rem; font-weight: 700; color: var(--cocoa); }

/* "not legal advice" note */
.legal-note { margin-top: 14px; background: var(--lavender-lt); border-radius: var(--radius); padding: 18px 22px; font-size: 0.98rem; line-height: 1.6; color: var(--lavender-dkr); font-weight: 600; }
.legal-note strong { color: var(--lavender-dkr); }

/* cross-link footer of the doc */
.legal-cross { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding-top: 28px; border-top: 2px solid var(--divider); }
.legal-cross span { font-weight: 700; color: var(--ink-muted); }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; }
  .legal-toc .toc-inner { display: flex; flex-wrap: wrap; gap: 8px; }
  .legal-toc a { padding: 7px 13px; background: var(--surface); box-shadow: var(--shadow-soft); }
  .perm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .legal-hero { padding: 48px 0 44px; border-radius: 0 0 28px 28px; }
  .legal-hero h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  .legal-body { padding: 36px 0 64px; }
  .legal-content h2 { font-size: 1.32rem; }
  .legal-content section + section { margin-top: 36px; }
  .legal-summary { padding: 20px 18px; }
  .legal-content p, .legal-content ul.bullets li { font-size: 0.98rem; }
  .perm-card { padding: 18px 16px; }
  .legal-cross { flex-direction: column; align-items: flex-start; }
}
