/* Centability's palette, from apps/mobile/src/constants/theme.ts */
:root {
  --text: #0f172a;
  --text-secondary: #5b6878;
  --background: #f3f6f6;
  --surface: #ffffff;
  --separator: #e2e8e7;
  --accent: #0f766e;
  --accent-soft: #dcf1ee;
  --highlight: #ff7a59;
  --on-accent: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --background: #0a1113;
    --surface: #141e21;
    --separator: #22302f;
    --accent: #2dd4bf;
    --accent-soft: #12302d;
    --on-accent: #0a1113;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer */
.site-header {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.site-header nav {
  display: flex;
  gap: 18px;
  font-size: 15px;
}

.site-header nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--accent);
}

.site-footer {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--separator);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

/* Landing page */
.hero {
  padding: 72px 0 40px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 560px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
}

.badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

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

.panel {
  margin: 40px 0;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
}

.panel h2 {
  margin-top: 0;
}

.panel ul {
  padding-left: 20px;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

/* Policy pages */
.doc {
  padding-top: 48px;
}

.doc h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
}

.doc .updated {
  margin: 0 0 32px;
  color: var(--text-secondary);
}

.doc h2 {
  margin: 44px 0 12px;
  padding-top: 8px;
  font-size: 24px;
  line-height: 1.25;
}

.doc h3 {
  margin: 28px 0 8px;
  font-size: 19px;
}

.doc li + li {
  margin-top: 6px;
}

.summary {
  margin: 24px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.toc {
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 15px;
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 22px;
  columns: 2 220px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  font-size: 15px;
}

th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--separator);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

th {
  background: var(--accent-soft);
}
