/* Shared styling for web/privacy.html and web/terms.html.
   One stylesheet, two documents — the layout/brand chrome lives here so a
   future revision only ever touches the legal text in the page it belongs
   to, never a second copy of the surrounding page design. */

:root {
  /* Matches AppColors.sunbeam (lib/core/theme/app_theme.dart) exactly — the
     Flutter app's Main Feed background — so these static pages and the
     in-app footer/background never visibly disagree. */
  --bg: #FCF0B9;
  --paper: #FFFDF9;
  --ink: #2A1650;
  --ink-soft: #4A2D80;
  --purple: #7B5EA7;
  --blue: #3D7EAA;
  --sunbeam: #FCF0B9;
  --crystal-rose: #FDC2C9;
  --mint-gloss: #B7F8D3;
  --line: rgba(42, 22, 80, 0.14);
  --rose-gold: #A8704F;
  --rose-gold-light: #D8A860;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--purple); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

header.site {
  padding: 28px 24px 0;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
}

/* Obvious, consistent way back to the app from any legal/policy page —
   works whether the visitor is signed in or not: "/" is the Flutter app's
   own entry point, and its router redirect already sends a signed-in
   visitor to /home and a signed-out one to sign-in (see app_router.dart's
   _RouterNotifier.redirect) — this link doesn't need to know which. */
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--purple);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.home-link:hover { background: var(--sunbeam); }

.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  vertical-align: middle;
}

.doc-header {
  margin: 36px 0 8px;
}

h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 6px;
  text-wrap: balance;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.meta a { color: inherit; text-decoration: underline; }

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

section:first-of-type h2 { border-top: none; padding-top: 0; }

h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  margin: 22px 0 8px;
  color: var(--ink);
}

p { margin: 0 0 14px; }

ul, ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

li { margin-bottom: 6px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--line);
}

th {
  background: var(--crystal-rose);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

td { background: var(--paper); }

.cross-link {
  display: inline-block;
  margin-top: 4px;
}

/* Pricing page's 3-tier comparison — added alongside privacy/terms'
   existing components rather than a separate stylesheet, per this file's
   own "one shared stylesheet" intent above. */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0 32px;
}

.plan {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0 0 10px;
  color: var(--ink);
}

.plan .price {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 2rem;
  margin: 0;
  color: var(--ink);
}

.plan .price .period {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.plan .price-alt {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 2px 0 18px;
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.plan ul li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  font-size: 0.94rem;
}

.plan ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple);
  font-weight: 800;
}

.plan.featured {
  border: 2px solid var(--purple);
  box-shadow: 0 6px 20px rgba(123, 94, 167, 0.18);
}

.plan.featured li::before { color: var(--rose-gold); }

.plan .badge {
  position: absolute;
  top: -13px;
  left: 20px;
  background: var(--purple);
  color: var(--paper);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0;
}

.disclosure {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* Full-bleed link bar matching the in-app WebLegalFooter's inline style
   (lib/widgets/web_legal_footer.dart) — same 8 links, same order, same
   cream background as the rest of the page (no separate/white strip). Not
   the same widget (this is a static page, not Flutter), but the same
   content and look. The old standalone "© 2026 BeaconAI LLC · colorshare.app
   · legal@colorshare.app" footer.site block that used to sit above this one
   is gone — the copyright line lives inside this same bar now (far right),
   so there's exactly one footer per page instead of two. */
.legal-links-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  margin-top: 32px;
  font-size: 0.85rem;
  line-height: 1.8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.legal-links-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.legal-links-footer a:hover { text-decoration: underline; }

.legal-links-footer .sep {
  color: var(--ink-soft);
  opacity: 0.55;
  margin: 0 8px;
}

.legal-links-footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.legal-links-footer .dmca-badge { display: inline-flex; line-height: 0; }
.legal-links-footer .dmca-badge img { height: 24px; width: auto; }

.legal-links-footer-copyright {
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Section 15.2: kept in sync by hand with AppConstants.mobileBreakpoint
   (lib/core/constants/app_constants.dart) -- plain CSS can't import a Dart
   constant. Was 480px; unified to 600 so this page, main_nav.dart, and
   subscription_screen.dart all agree on where "mobile" ends. */
@media (max-width: 600px) {
  .wrap { padding: 0 18px 72px; }
  header.site { padding: 22px 18px 0; }
  .plans { grid-template-columns: 1fr; }
  .legal-links-footer { font-size: 0.8rem; padding: 12px 16px; }
  .legal-links-footer .sep { margin: 0 5px; }
}
