/* LanternScout — legal pages (Terms, Privacy). Scrollable; no app shell lock. */

:root {
  --cream:         #fdf8f0;
  --cream-dark:    #f5ede0;
  --navy:          #1d3a5e;
  --navy-light:    #e8eef5;
  --amber-soft:    #fef3c7;
  --amber-strong:  #b45309;
  --teal:          #0d9488;
  --teal-soft:     #ccfbf1;
  --ink:           #12243a;
  --muted:         #5a6a7e;
  --border:        rgba(29, 58, 94, 0.14);
  --border-strong: rgba(29, 58, 94, 0.28);
  --card-bg:       rgba(255, 255, 255, 0.97);
  --legal-panel:   #f5ede0;
  --legal-panel-alt: #faf6f0;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--cream-dark);
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--cream-dark);
  border-bottom: 1px solid var(--border);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 160ms ease, border-color 160ms ease;
}

.legal-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.legal-back:hover {
  background: var(--legal-panel);
  border-color: var(--border-strong);
}

.legal-topbar-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.legal-back--end {
  margin-top: 2.5rem;
}

.legal-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

.legal-header {
  margin-bottom: 3rem;
}

.legal-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  margin-left: -1rem;
}

.legal-hero-text {
  min-width: 0;
  flex: 1;
}

.legal-hero .legal-title {
  margin: 0;
}

.legal-hero .legal-date {
  margin: 0.4rem 0 0;
}

@media (max-width: 520px) {
  .legal-hero {
    gap: 1rem;
  }

  .legal-hero .logo-img--legal-brand {
    height: min(132px, 30vw);
  }
}

.legal-brand {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.logo-img {
  display: block;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-img--legal-wordmark {
  width: min(200px, 52vw);
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(29, 58, 94, 0.15));
}

.logo-img--legal-brand {
  height: min(192px, 36vw);
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(29, 58, 94, 0.15));
}

.legal-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 0.5rem;
  line-height: 1.1;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.legal-notice {
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.legal-notice--terms,
.legal-notice--privacy {
  background: var(--amber-soft);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  color: var(--amber-strong);
}

.legal-section {
  margin-bottom: 2.25rem;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--legal-panel);
}

.legal-section p {
  font-size: 0.93rem;
  color: #374151;
  line-height: 1.8;
  margin: 0 0 0.75rem;
}

.legal-section ul {
  padding-left: 1.5rem;
  margin: 0 0 0.75rem;
}

.legal-section ul li {
  font-size: 0.93rem;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 0.35rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.88rem;
}

.data-table th {
  background: var(--legal-panel);
  color: var(--navy);
  font-weight: 700;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
}

.data-table td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  color: #374151;
  vertical-align: top;
  line-height: 1.6;
}

.data-table tr:nth-child(even) td {
  background: var(--legal-panel-alt);
}

.legal-contact {
  background: var(--legal-panel);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 3rem;
}

.legal-contact p {
  font-size: 0.9rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.7;
}

.legal-contact a {
  color: var(--navy);
  font-weight: 700;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.rights-item {
  background: var(--legal-panel);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.rights-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.rights-item span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.footer-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.footer-link:hover { color: var(--navy); }

.footer-sep {
  color: var(--border-strong);
  font-size: 0.75rem;
  user-select: none;
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--muted);
}
