/* RoastMania legal pages — matches the app theme (lib/core/app_theme.dart).
   Static by design: no build step, no JS, shared by index/terms/privacy. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bg: #080F14;
  --surface: #141F2B;
  --accent: #FF6B00;
  --border-soft: #33465C;
  --text-primary: #E5E7EB;
  --text-soft: #D1D5DB;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Nunito', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 0px 20px 64px;
}

/* ---- header (brand hero) ---- */

.hero {
  margin-top: 32px;
  text-align: center;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand .logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  box-shadow: 0 10px 36px rgba(249, 82, 90, 0.25);
}

.brand-name {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.4px;
}

/* Accent rule echoing the app icon's orange→magenta monogram gradient. */
.brand-rule {
  width: 64px;
  height: 3px;
  border-radius: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, #f79a3e, #f9525a, #e93a9a);
}

.doc-header {
  margin: 40px 0 8px;
  text-align: center;
}

.doc-header h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.updated {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---- table of contents ---- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 28px 0 8px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin: 4px 0;
  break-inside: avoid;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* ---- desktop ≥900px: sticky Contents sidebar on the left ---- */

@media (min-width: 900px) {
  .page {
    max-width: 1040px;
    padding: 0px 32px 64px;
  }

  .doc-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    column-gap: 56px;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 28px 0 0;
    margin: 0;
  }

  .toc h2 {
    margin: 0 0 12px;
  }

  .toc ol {
    columns: 1;
  }

  .toc li {
    margin: 7px 0;
  }

  .toc a {
    font-size: 14px;
    text-decoration: none;
    color: var(--text-secondary);
  }

  .toc a:hover {
    color: var(--accent);
    text-decoration: underline;
  }

  .doc-body {
    max-width: 700px;
    margin: 0 auto;
  }
}

/* ---- document body ---- */

section {
  margin-top: 36px;
}

h2 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
}

h2 .num {
  color: var(--accent);
  margin-right: 6px;
}

p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

ul {
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--text-soft);
}

li {
  margin: 6px 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(255, 107, 0, 0.5);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--accent);
}

/* ---- footer ---- */

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 14px;
}

footer .links {
  margin-bottom: 8px;
}

footer a {
  color: var(--text-secondary);
}

/* ---- index landing cards ---- */

.doc-cards {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.doc-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.doc-card:hover {
  border-color: var(--accent);
}

.doc-card .icon {
  font-size: 22px;
}

.doc-card h2 {
  margin: 8px 0 6px;
  color: var(--text-primary);
  font-size: 20px;
}

.doc-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---- print: legal docs get printed / saved as PDF ---- */

@media print {
  body {
    background: #fff;
    color: #111;
  }
  p,
  ul,
  li {
    color: #222;
  }
  .brand .logo,
  .brand-rule,
  .toc,
  footer {
    display: none;
  }
  a {
    color: #111;
    text-decoration: none;
  }
  h2 .num {
    color: #111;
  }
}

.emailLink {
color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 0, 0.5);
    text-underline-offset: 3px;
}
