@font-face { font-family: P052; src: url('/public/fonts/P052-Roman.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
/* Shared public-page vocabulary, matched to the messenger's default palette. */
@font-face { font-family: Inter; src: url('/public/fonts/Inter-Regular.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('/public/fonts/Inter-Medium.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url('/public/fonts/Inter-SemiBold.ttf') format('truetype'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('/public/fonts/Inter-Bold.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }
:root {
  color-scheme: light;
  --brand-bg: #f5f6f5; --brand-surface: #ffffff; --brand-soft: #edf0ef;
  --brand-text: #272d32; --brand-muted: #5d6770; --brand-primary: #486986;
  --brand-hover: #3d5d79; --brand-code: #20272e;
  --bg: var(--brand-bg); --bg-body: var(--brand-bg); --bg-soft: var(--brand-soft);
  --surf: var(--brand-surface); --surface: var(--brand-surface); --bg-card: var(--brand-surface);
  --bg-sidebar: var(--brand-surface); --surface-strong: var(--brand-soft);
  --text: var(--brand-text); --text-main: var(--brand-text);
  --text1: var(--brand-text); --text2: var(--brand-muted); --text3: var(--brand-muted);
  --surface2: var(--brand-soft); --bg-color: var(--brand-bg); --text-color: var(--brand-text);
  --muted: var(--brand-muted); --text-sec: var(--brand-muted); --subtle: var(--brand-muted);
  --p: var(--brand-primary); --p2: var(--brand-hover); --primary: var(--brand-primary);
  --accent: var(--brand-primary); --accent-strong: var(--brand-hover);
  --accent-soft: var(--brand-soft); --accent-ink: #fff; --code-bg: var(--brand-code);
  --border: transparent; --surface-line: transparent; --shadow: none;
  --r: 20px; --r2: 24px; --radius: 20px;
}
:root[data-brand-theme="dark"] {
  color-scheme: dark;
  --brand-bg: #1b1e21; --brand-surface: #282d32; --brand-soft: #22262a;
  --brand-text: #edf2f6; --brand-muted: #b7c3cc; --brand-primary: #a6c3d9;
  --brand-hover: #bdd2e2;
  --accent-ink: #1b1e21;
}
html { scroll-padding-top: 88px; overflow-x: clip; }
body {
  background: var(--brand-bg); color: var(--brand-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px; line-height: 1.6; letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
body::before, body::after { background: none !important; }
html.brand-pages .hero { background: var(--brand-soft); color: var(--brand-text); }
html.brand-pages .hero::after { display: none; }
html.brand-pages .hero :is(h1, h2, p, .hero-sub, .hero-text) { color: var(--brand-text); }
html.brand-pages .hero-icon { background: var(--brand-surface); border: 0; }
html.brand-pages .rev { opacity: 1; transform: none; transition: none; }
html.brand-pages :is(.hero, .meta-bar, .card, .float-btn-wrap) {
  opacity: 1; animation: none;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--brand-primary); text-underline-offset: .2em; }
:is(a, button, input, select, summary, textarea):focus-visible {
  outline: 3px solid var(--brand-primary); outline-offset: 4px;
}
html.brand-pages :is(h1, h2, h3, .hero-h1, .section-title, .bc-h, .donate-h) {
  color: var(--brand-text); font-family: P052, Georgia, serif; letter-spacing: -.01em;
  -webkit-text-fill-color: currentColor; background-image: none;
  line-height: 1.2; font-weight: 400; overflow-wrap: anywhere;
}
html.brand-pages :is(h1, .hero-h1) { font-size: clamp(28px, 4vw, 40px); }
html.brand-pages :is(h2, .section-title) { font-size: clamp(22px, 2.8vw, 28px); }
html.brand-pages :is(h3, .bc-h) { font-size: 20px; }
html.brand-pages :is(p, li, .hero-sub, .hero-text, .bc-p, .card-body) { font-size: 16px; line-height: 1.65; }
:is(.meta-bar, .hero-note, .section-kicker, .footer-note, .nav-links, .topnav, .footer, .hdr-a) {
  font-size: 14px; line-height: 1.5;
}
:is(.nav, .topbar, .hdr, .doc-header, header.header) {
  background: var(--brand-soft); color: var(--brand-text);
  box-shadow: none; border: 0; backdrop-filter: none;
}
:is(.nav-links a, .topnav a, .hdr-a, .brand, .nav-logo, .logo-link) { color: var(--brand-text); }
:is(.card, .bc, .donate-card, .app-card, .download-card, .security-card,
  .info-card, .feature-card, .legal-box, .legal-warn, .endpoint, .hbox, .gbox, .lbox,
  .cookie-banner, .float-card, .legal-card, .release-card) {
  background: var(--brand-surface) !important; color: var(--brand-text);
  border: 0 !important; border-radius: 24px; box-shadow: none !important;
}
:is(.card, .bc, .donate-card, .app-card, .feature-card):hover { box-shadow: none; }
:is(.bc, .card, .donate-card) :is(p, h2, h3, .bc-h, .bc-p, .donate-h, .donate-sub) {
  color: var(--brand-text); -webkit-text-fill-color: currentColor;
}
:is(.button, .btn-blue, .btn-dark, .btn-outline, .dbtn, .btn-agree, .cookie-btn, .back-btn) {
  border: 0; border-radius: 999px; box-shadow: none !important;
  font: inherit; font-size: 16px; font-weight: 600; letter-spacing: 0;
  min-height: 44px;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}
:is(.button-primary, .btn-blue, .btn-dark, .dbtn-dark, .btn-agree, .cookie-btn) {
  background: var(--brand-primary); color: var(--accent-ink);
}
:is(.button-secondary, .btn-outline, .dbtn-light, .back-btn) {
  background: var(--brand-soft); color: var(--brand-primary);
}
:is(.button, .btn-blue, .btn-dark, .btn-outline, .dbtn, .btn-agree, .cookie-btn):active {
  transform: scale(.98);
}
:is(.bc-ico, .hero-icon, .donate-ic) { color: var(--brand-primary); box-shadow: none; }
.code-window { border: 0; border-radius: 20px; box-shadow: none; }
pre { overflow: auto; max-width: 100%; }
:not(pre) > code { overflow-wrap: anywhere; }
.cookie-banner { font-size: 14px; }
@media (max-width: 600px) {
  html.brand-pages .trust-bar { display: flex; flex-wrap: wrap; gap: 16px; padding: 24px 16px; }
  html.brand-pages .trust-item { flex: 1 1 130px; min-width: 0; white-space: normal; font-size: 14px; }
  html.brand-pages .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding: 32px 20px; }
  html.brand-pages .ss-item { min-width: 0; overflow-wrap: anywhere; }
  html.brand-pages .ss-n { font-size: 32px; }
  :is(.nav, .topbar, .hdr) { padding-left: 16px; padding-right: 16px; }
  :is(.card, .bc, .donate-card, .endpoint, .legal-box) { border-radius: 20px; }
  :is(.nav-links, .topnav) { gap: 12px; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Policy keeps the legal text intact and shares the app's typography. */
.policy-page .hdr {gap:20px;padding:16px max(20px,calc((100vw - 960px)/2));background:var(--brand-bg);align-items:center;}
.policy-page .hdr-t {font-size:14px;font-weight:500;color:var(--brand-muted);}
html.brand-pages .policy-page .hero {background:transparent;text-align:left;max-width:960px;margin:0 auto;padding:48px 24px 24px;}
html.brand-pages .policy-page .hero h1 {font-size:clamp(30px,4vw,44px);font-weight:400;line-height:1.12;max-width:760px;}
html.brand-pages .policy-page .hero p {opacity:1;max-width:720px;margin:16px 0 0;color:var(--brand-muted);}
.policy-page .upd {max-width:912px;margin:0 auto;padding:0 0 24px;background:transparent;border:0;text-align:left;font-size:14px;line-height:1.6;color:var(--brand-muted);}
.policy-page .wrap {max-width:960px;padding:0 24px 64px;}
.policy-page .card {padding:28px;margin-bottom:16px;}
html.brand-pages .policy-page .card h2 {font-family:P052,Georgia,serif;font-size:28px;font-weight:400;scroll-margin-top:100px;}
html.brand-pages .policy-page .card h3 {font:500 16px/1.5 Inter,Arial,sans-serif;letter-spacing:0;}
.policy-page :is(.sn,.cell-l) {font-size:14px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--brand-primary);background:transparent;padding:0;margin-bottom:12px;}
.policy-page :is(p,li,td,.cell-v) {color:var(--brand-text);font-size:16px;line-height:1.7;}
.policy-page :is(.lbox,.hbox,.gbox,.wbox) {background:var(--brand-soft)!important;border:0;border-radius:16px;padding:16px 20px;}
html.brand-pages .policy-page :is(.lbox,.hbox,.gbox,.wbox) :is(p,strong) {font-size:16px!important;color:var(--brand-text)!important;}
.policy-page li::before {color:var(--brand-primary);font-weight:400;}
.policy-page .cell {background:var(--brand-soft);border-radius:16px;}
.policy-page table {display:block;width:100%;overflow:auto;font-size:14px;}
.policy-page thead th {background:var(--brand-soft);color:var(--brand-primary);font-size:14px;font-weight:500;letter-spacing:0;text-transform:none;border:0;}
.policy-page tbody td {font-size:14px;min-width:100px;}
.policy-contents {padding:20px 24px;margin-bottom:24px;border-radius:20px;background:var(--brand-soft);}
.policy-contents summary {cursor:pointer;font-size:16px;color:var(--brand-primary);padding-block:4px;}
.policy-contents ol {padding-left:22px;margin-top:16px;display:grid;gap:10px;}
.policy-contents li {list-style:decimal;font-size:14px;padding:0;margin:0;}
.policy-contents li::before {content:none;}
.policy-contents a {text-decoration:underline;}
.policy-page .cookie-text {color:var(--brand-muted);font-size:14px;}
.policy-page .cookie-btn {background:var(--brand-primary);color:var(--accent-ink);font-weight:500;}
.policy-page .cookie-text a {color:var(--brand-primary);}
@media(max-width:600px){.policy-page .hdr{padding:16px;}.policy-page .hero{padding:32px 20px 20px!important;}.policy-page .upd{padding:0 20px 24px;}.policy-page .wrap{padding:0 16px 48px;}.policy-page .card{padding:20px;}.policy-contents{padding:16px 20px;}.policy-page :is(.lbox,.hbox,.gbox,.wbox){padding:14px 16px;}}
