/* Legal pages — privacy policy and terms.
   Palette lifted from the app's Oxford theme (lib/core/theme.dart) so the
   documents look like the product they describe, rather than a generic
   template. Layout follows the reference: sticky header, sidebar contents,
   centred reading column. */

:root {
  --bg:           #f2f4f7;   /* AppTheme.dashboardBg */
  --card:         #ffffff;   /* AppTheme.cardFillColor */
  --surface:      #f7f9fb;   /* AppTheme.surface */
  --border:       #dfe4eb;   /* AppTheme.cardBorder */
  --outline:      #c7d0db;   /* AppTheme.cardOutline */
  --ink:          #16202e;   /* AppTheme.textPrimary */
  --ink-muted:    #4e5a6b;   /* AppTheme.textMuted */
  --ink-faint:    #8792a3;   /* AppTheme.textFaint */
  --accent:       #1b3a6b;   /* AppTheme.accentColor */
  --accent-soft:  #e4eaf3;   /* AppTheme.accentSoft */
  --hero:         #e3eaf3;   /* AppTheme.heroFill */
  --success:      #2f7d57;   /* AppTheme.successGreen */

  --radius: 18px;
  --shell: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, 'Segoe UI', system-ui, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

/* The full logo lockup, shown without a tile — it carries its own diamond and
   outline, which read fine on the white header. No background, so nothing
   crops or competes with the artwork. */
.brand .mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  flex: none;
}

.brand .mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14.5px;
  font-weight: 600;
}

.site-nav a { color: var(--ink-muted); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* ---------------- shell ---------------- */
.layout {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 34px 24px 80px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

/* ---------------- sidebar contents ---------------- */
.toc {
  position: sticky;
  top: 86px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.toc h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 12px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  font-size: 13.5px;
}

.toc li { counter-increment: toc; }

.toc a {
  display: block;
  padding: 7px 10px 7px 30px;
  border-radius: 9px;
  color: var(--ink-muted);
  position: relative;
  line-height: 1.35;
}

.toc a::before {
  content: counter(toc);
  position: absolute;
  left: 9px;
  top: 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

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

/* Scroll-spy highlight, set from legal.js. */
.toc a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.toc a.active::before { color: var(--accent); }

/* ---------------- document ---------------- */
.doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 44px 48px;
  min-width: 0;
}

.doc-head {
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.9px;
  color: var(--ink);
  line-height: 1.12;
  text-wrap: balance;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--hero);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* A rule above each major section, as in the reference. */
.doc h2 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 40px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  text-wrap: balance;
  scroll-margin-top: 96px;
}

.doc h2:first-of-type { border-top: none; padding-top: 8px; }

.doc h3 {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 9px;
  scroll-margin-top: 96px;
}

.doc h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin: 22px 0 8px;
}

.doc p { margin: 0 0 14px; font-size: 15px; }

.doc ul {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
}

.doc li { margin-bottom: 9px; }
.doc li::marker { color: var(--outline); }
.doc li > p { margin-bottom: 8px; }
.doc ul ul { margin-top: 9px; }

.doc strong { color: var(--ink); font-weight: 700; }
.doc em { font-style: normal; font-weight: 600; color: var(--accent); }

/* Contact panel at the foot of each document. */
.contact-card {
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
}

/* Cross-links between the two documents. */
.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.doc-nav a {
  padding: 11px 18px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.doc-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---------------- footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 28px 24px;
}

.site-footer .wrap {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
}

.site-footer .links { display: flex; gap: 20px; font-weight: 600; }
.site-footer .links a { color: var(--ink-muted); }
.site-footer .links a:hover { color: var(--accent); text-decoration: none; }
.site-footer .copy { color: var(--ink-faint); }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; max-height: none; }
  .toc ol { columns: 2; column-gap: 14px; }
  .doc { padding: 28px 22px 34px; }
  .site-nav { gap: 16px; font-size: 13.5px; }
}

@media (max-width: 560px) {
  .toc ol { columns: 1; }
  .site-header .wrap { padding: 12px 16px; }
  .layout { padding: 20px 14px 56px; }
}

@media print {
  .site-header, .toc, .doc-nav, .site-footer { display: none; }
  .layout { display: block; padding: 0; }
  .doc { border: none; padding: 0; }
}

/* ============================================================
   Document hub (index) — a landing page for the legal documents
   rather than a marketing page.
   ============================================================ */
.hub {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hub-head { max-width: 680px; margin-bottom: 38px; }

.hub-head h1 {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--ink);
  line-height: 1.1;
  text-wrap: balance;
}

.hub-head p {
  margin-top: 14px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 18px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.hub-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.hub-card h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 8px;
}

.hub-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;
}

.hub-card .go {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* Account deletion gets its own panel: Play's Data safety form asks for a
   public URL describing how users delete their data, and this is it. */
.delete-panel {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.delete-panel h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.delete-panel p { font-size: 15px; margin-bottom: 12px; }

.delete-panel ol {
  margin: 0 0 14px 20px;
  font-size: 15px;
}

.delete-panel li { margin-bottom: 7px; }

.delete-panel .note {
  font-size: 13.5px;
  color: var(--ink-faint);
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .hub { padding: 34px 16px 56px; }
}

/* ============================================================
   Contact page
   ============================================================ */
.contact-list {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color 0.18s ease;
}

.contact-row:hover { border-color: var(--accent); text-decoration: none; }

.contact-row .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.contact-row .body { flex: 1; min-width: 0; }

.contact-row h2 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
  margin-bottom: 4px;
}

.contact-row p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

.contact-row .addr {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}


/* ============================================================
   Overview sections on the hub: what the app is, how it works.
   ============================================================ */
.overview {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 44px;
  margin-bottom: 22px;
}

.overview .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.overview h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
  margin-bottom: 12px;
  text-wrap: balance;
}

/* Feature chips — short enough to scan, not a second feature list. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips span {
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .overview { grid-template-columns: 1fr; gap: 30px; padding: 28px 22px; }
  .step:not(:last-child)::after { display: none; }
}

/* ---- numbered steps inside the overview card ---- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 52px;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

/* Connector down to the next step, so the three read as a sequence. */
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16.5px;
  top: 38px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.steps h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
  margin: 6px 0 5px;
}

.steps p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

@media (max-width: 900px) {
  .steps li { padding-left: 46px; }
}

/* ============================================================
   Hero call-to-action buttons
   ============================================================ */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.1px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(27, 58, 107, 0.85);
}

.btn-primary:hover { box-shadow: 0 14px 26px -12px rgba(27, 58, 107, 0.9); }

.btn-secondary {
  background: var(--card);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Pre-launch state: reads as a real button but goes nowhere, and says so on
   hover rather than pretending to be a live link. */
.is-soon {
  cursor: default;
  opacity: 0.92;
}

.is-soon:hover { transform: none; }

@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* ============================================================
   Feature grid
   ============================================================ */
.section-head {
  text-align: center;
  margin: 40px 0 20px;
}

.section-head h2 {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--ink);
  text-wrap: balance;
}

.section-head p {
  margin-top: 7px;
  font-size: 15.5px;
  color: var(--ink-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.feature h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.2px;
  margin: 15px 0 7px;
}

.feature p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0;
}

.ficon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

/* Six tints, all pulled from the app's own palette rather than a rainbow, so
   the grid still reads as one family. */
.f-navy   { background: #e4eaf3; color: #1b3a6b; }
.f-teal   { background: #ddf1ef; color: #227f76; }
.f-green  { background: #e0efe7; color: #2f7d57; }
.f-amber  { background: #f7ecd9; color: #a8701a; }
.f-indigo { background: #e6e9f5; color: #45539b; }
.f-slate  { background: #e8ebef; color: #4e5a6b; }

/* An inline link that must not be missed. Site links are navy with no
   underline, which reads as plain text mid-paragraph — fine for a footnote,
   not for the account-deletion route Google Play requires to be prominent. */
a.emphasis {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
a.emphasis:hover { background: var(--hero); }
