/* Shared styles for HomeHub legal pages (Terms, Privacy, Account Deletion) */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700;800&display=swap");

:root {
  --brand: #2e7eed;
  --brand-ink: #1a5fc9;
  --brand-soft: #eaf2fe;
  --ink: #1d2433;
  --ink-2: #4a5468;
  --ink-3: #6b7489;
  --line: #e3e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --warn-bg: #fff7e6;
  --warn-line: #f3c26b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5b9bf5;
    --brand-ink: #8ab8ff;
    --brand-soft: #182a45;
    --ink: #e8ecf3;
    --ink-2: #b9c2d3;
    --ink-3: #8d97ab;
    --line: #2a3345;
    --bg: #0f141d;
    --card: #161d29;
    --warn-bg: #2b2414;
    --warn-line: #7a5d20;
    --shadow: none;
  }
  .brand img { filter: brightness(0) invert(1); }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand-ink); text-underline-offset: 2px; }
a:hover { color: var(--brand); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 26px; width: auto; display: block; }
.doc-switch { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.doc-switch a {
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-2);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.doc-switch a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.doc-switch a[aria-current="page"] { background: var(--brand); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #1c5fd0 100%);
  color: #fff;
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 44px 16px 52px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; opacity: .85; margin-bottom: 8px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 40px); line-height: 1.2; font-weight: 800; }
.hero p { margin: 0; max-width: 720px; opacity: .92; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.meta span {
  font-size: 13px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  padding: 4px 12px; border-radius: 999px;
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1120px; margin: -28px auto 0; padding: 0 16px 48px;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* TOC */
.toc { position: sticky; top: 76px; padding: 18px 8px 18px 18px; max-height: calc(100vh - 96px); overflow: auto; }
.toc summary {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  list-style: none; cursor: default; margin-bottom: 8px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4;
  color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent;
}
.toc a::before { content: counter(toc) "."; color: var(--ink-3); min-width: 20px; font-variant-numeric: tabular-nums; }
.toc a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.toc a.active { color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }

/* Content */
.content { padding: 8px 40px 40px; min-width: 0; }
.content section { padding-top: 28px; border-top: 1px solid var(--line); margin-top: 28px; counter-increment: sec; }
.content section:first-of-type { border-top: 0; margin-top: 0; }
.content { counter-reset: sec; }
.content h2 {
  font-size: 22px; line-height: 1.3; margin: 0 0 12px; font-weight: 700; display: flex; gap: 10px; align-items: baseline;
}
.content section > h2::before {
  content: counter(sec); flex: none;
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-size: 14px; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink);
  transform: translateY(-2px);
}
.content h3 { font-size: 17px; margin: 22px 0 6px; font-weight: 700; }
.content p { margin: 0 0 12px; color: var(--ink-2); }
.content li { color: var(--ink-2); margin-bottom: 6px; }
.content ul, .content ol { padding-left: 22px; margin: 0 0 12px; }
.content strong { color: var(--ink); }

/* Summary cards */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 24px 0 8px; }
.glance div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.glance b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.glance span { font-size: 14px; color: var(--ink-2); line-height: 1.55; display: block; }

.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--brand-soft);
  border-radius: 10px; padding: 14px 16px; margin: 16px 0; font-size: 15px;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn-line); background: var(--warn-bg); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
td { color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 600; min-width: 140px; }

/* Contact block */
.contact {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0;
}
.contact div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.contact b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.contact span, .contact a { font-size: 15px; }

/* Steps (deletion page) */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 2px 0 14px 46px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff !important;
  font-weight: 700; text-decoration: none; padding: 12px 20px; border-radius: 10px; margin: 6px 0 12px;
}
.btn:hover { filter: brightness(1.06); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); }
.site-footer .inner {
  max-width: 1120px; margin: 0 auto; padding: 24px 16px; font-size: 13.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
}
.site-footer a { color: var(--ink-2); margin-right: 14px; }

.to-top {
  position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: #fff; text-decoration: none;
  box-shadow: 0 6px 18px rgba(46, 126, 237, .35); opacity: 0; pointer-events: none; transition: opacity .2s;
  font-size: 20px;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: -24px; gap: 14px; }
  .toc { position: static; max-height: none; padding: 4px 14px; }
  .toc summary { cursor: pointer; padding: 10px 0; margin: 0; display: flex; justify-content: space-between; }
  .toc summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--ink-3); }
  .toc[open] summary::after { content: "\2013"; }
  .toc ol { padding-bottom: 10px; }
  .content { padding: 4px 20px 28px; }
}
@media (max-width: 560px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .doc-switch { justify-content: flex-start; margin-left: -10px; }
  .hero-inner { padding: 32px 16px 44px; }
  .content h2 { font-size: 20px; }
  .glance { gap: 8px; }
  .glance div { padding: 10px 12px; }
  .glance span { font-size: 13.5px; }
  body { font-size: 15.5px; }
}

@media print {
  .topbar, .toc, .to-top, .site-footer .links { display: none !important; }
  .hero { background: none; color: #000; }
  .meta span { border-color: #999; background: none; }
  .layout { display: block; margin: 0; }
  .card { border: 0; box-shadow: none; }
  .content { padding: 0; }
  a { color: #000; }
}
