/* Shared legal-page styles — extends the visual language of index.html.
 * Per-site overrides live in <site>/legal.css (loaded after this file)
 * and only need to redeclare the :root variables they want to change. */
:root {
  --navy-0: #050a18;
  --navy-1: #0a1430;
  --blue-1: #1a3a8a;
  --blue-2: #2862c8;
  --blue-3: #4a8cf0;
  --ink:    #0c1226;
  --ink-2:  #2a3550;
  --mute:   #6b7592;
  --line:   #e6eaf2;
  --bg:     #ffffff;
  --paper-soft: #f5f7fb;
  --topbar-gradient: radial-gradient(80% 120% at 50% -10%, #1d3782 0%, #0a1430 60%, #050a18 100%);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--blue-3); color: #fff; }

/* ============ Topbar ============ */
.topbar {
  background: var(--topbar-gradient);
  color: #fff;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  max-width: 880px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand .icon { width: 36px; height: 36px; border-radius: 10px; }
.brand .name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand .name span { color: rgba(255,255,255,0.55); font-weight: 500; margin-left: 6px; font-size: 13px; }
.topbar nav { display: flex; gap: 18px; align-items: center; }
.topbar nav a { font-size: 13px; color: rgba(255,255,255,0.78); }
.topbar nav a:hover { color: #fff; text-decoration: none; }
.topbar nav .active { color: #fff; }

.app-icon {
  border-radius: 22%;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(15,30,90,0.45);
}
.app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ============ Page header strip ============ */
.page-head {
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
  padding: 56px 28px 48px;
}
.page-head-inner { max-width: 880px; margin: 0 auto; }
.page-head .crumbs {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--mute); text-transform: uppercase; margin-bottom: 14px;
}
.page-head .crumbs a { color: var(--blue-2); }
.page-head h1 {
  font-weight: 800;
  font-size: clamp(36px, 4.5vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.page-head .updated {
  font-family: var(--mono); font-size: 12px; color: var(--mute);
}

/* ============ Article ============ */
article.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}
article.legal .toc {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 48px;
}
article.legal .toc h2 {
  font-size: 11px; font-family: var(--mono); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute);
  margin: 0 0 10px; font-weight: 600;
}
article.legal .toc ol {
  list-style: none; padding: 0; margin: 0;
  columns: 2; column-gap: 32px;
  font-size: 14px;
}
article.legal .toc ol li {
  break-inside: avoid;
  padding: 4px 0;
  display: flex; gap: 8px;
}
article.legal .toc ol li .num {
  font-family: var(--mono); font-size: 11px; color: var(--mute);
  flex-shrink: 0; padding-top: 2px;
}
article.legal .toc ol li a { color: var(--ink); font-weight: 500; }
article.legal .toc ol li a:hover { color: var(--blue-2); }

article.legal section {
  padding-top: 32px;
  scroll-margin-top: 24px;
}
article.legal section + section {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

article.legal h2 {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 16px;
  display: flex; align-items: baseline; gap: 14px;
}
article.legal h2 .num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-2);
  letter-spacing: 0.05em;
}
article.legal h3 {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 28px 0 10px;
  color: var(--ink);
}
article.legal p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
article.legal ul {
  padding: 0 0 0 18px;
  margin: 0 0 14px;
  color: var(--ink-2);
}
article.legal ul li { padding: 4px 0; }
article.legal strong { color: var(--ink); font-weight: 700; }

article.legal .callout {
  background: var(--paper-soft);
  border-left: 3px solid var(--blue-2);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink-2);
  margin: 18px 0;
}
article.legal .callout b {
  color: var(--ink);
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 13px;
}

article.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
article.legal table td, article.legal table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
article.legal table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--mute); text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 700px) {
  article.legal table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  article.legal table td, article.legal table th { padding: 10px 8px; }
}

/* ============ Footer ============ */
footer.legal-foot {
  background: var(--navy-0);
  color: rgba(255,255,255,0.6);
  padding: 32px 28px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
footer.legal-foot a { color: var(--blue-3); }
footer.legal-foot .row { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
  article.legal .toc ol { columns: 1; }
  .topbar nav .links { display: none; }
}
