/* Theme for the server-rendered static pages (privacy / faq / terms).
   Mirrors the SPA's design tokens and self-hosted fonts (client/src/styles.css,
   client/src/main.tsx) so these pages match the rest of the site. Standalone by
   design — the SPA's hashed Vite bundle isn't referenceable from static HTML. */

:root {
  color-scheme: light;
  --paper: #faf8f3;
  --pane: #fffefb;
  --ink: #2c2c2c;
  --muted: #6f6b63;
  --faint: #a39e93;
  --navy: #0b3d91;
  --ember: #c45b00;
  --hairline: #e7e3d8;
  --hairline-soft: #efece3;
  --wash: #f3f0e8;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Spline Sans", "Helvetica Neue", Arial, sans-serif;
}

/* Self-hosted fonts — no external requests (files in /fonts). */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/newsreader-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spline Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/spline-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spline Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/spline-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Spline Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/spline-sans-latin-600-normal.woff2") format("woff2");
}

* {
  box-sizing: border-box;
  margin: 0;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--navy);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Top bar — mirrors the SPA's .topbar / .brand (styles.css:62-91). */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 54px;
  padding: 0 22px;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
}
.brand a:hover {
  text-decoration: none;
}
.brand img {
  width: 24px;
  height: 24px;
}
.brand .word,
.brand a {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-family: var(--sans);
}
.nav a,
.nav button {
  color: var(--navy);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.nav a:hover,
.nav button:hover {
  text-decoration: underline;
}
.nav .user-name {
  color: var(--muted);
  cursor: default;
}

/* Account avatar + dropdown — mirrors the SPA's TopBar menu (styles.css:160,
   763-807). Scoped under .nav so it overrides the generic .nav a/.nav button. */
.nav .menu {
  position: relative;
}
.nav .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  cursor: pointer;
}
.nav .menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 4px;
  background: var(--pane);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.nav .menu-name {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.nav .menu-sep {
  height: 1px;
  margin: 4px 0;
  background: var(--hairline);
}
.nav .menu-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.nav .menu-item:hover {
  background: var(--wash);
  text-decoration: none;
}

/* Reading column. */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 22px 64px;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}
h1 {
  font-size: 32px;
  margin-bottom: 16px;
}
h2 {
  font-size: 22px;
  margin: 32px 0 10px;
}
p,
ul,
ol {
  margin-bottom: 14px;
}
ul,
ol {
  padding-left: 22px;
}

/* Footer — mirrors SiteFooter / SITE_LINKS. */
.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 22px 48px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
}

/* Blog essay byline */
.byline-muted {
  color: var(--muted);
  font-size: 14px;
  margin-top: -8px;
}

/* Invite CTA — mirrors the app's .act.primary button. */
.cta-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
}
.cta-btn:hover {
  background: #0a3478;
  text-decoration: none;
}
