/* ==========================================================================
   Sidenote — warm-paper site styles
   No web fonts, no trackers, no build step. One stylesheet for every page.
   ========================================================================== */

:root {
  --paper: #f8f3e9;
  --paper-2: #f1e8d8;
  --surface: #fffdf8;
  --ink: #221e18;
  --ink-soft: #3a342b;
  --muted: #6a6154;
  --line: #e3d9c7;
  --line-strong: #d2c4ab;
  --accent: #b45309;
  --accent-strong: #8a3f06;
  --accent-soft: #f6e7cf;
  --good: #2f6b4f;
  --good-soft: #e4efe7;
  --shadow-sm: 0 1px 2px rgba(48, 37, 20, 0.06), 0 8px 24px -16px rgba(48, 37, 20, 0.25);
  --shadow-lg: 0 30px 70px -35px rgba(48, 37, 20, 0.45), 0 2px 6px rgba(48, 37, 20, 0.06);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120e;
    --paper-2: #1b1813;
    --surface: #1d1a15;
    --ink: #f5efe3;
    --ink-soft: #e4dccb;
    --muted: #b7ad9d;
    --line: #322c23;
    --line-strong: #463c2d;
    --accent: #fbbf24;
    --accent-strong: #fcd34d;
    --accent-soft: #2a2317;
    --good: #7dd3a8;
    --good-soft: #1c2a22;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 70px -35px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .frame:hover {
    transform: rotate(-0.6deg);
  }
  .card:hover {
    transform: none;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 82% -8%, var(--accent-soft) 0%, transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

code,
kbd,
pre {
  font-family: var(--mono);
}

code {
  font-size: 0.9em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.35em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.wrap {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(820px, calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 8px 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow-center {
  justify-content: center;
}

.actions-center {
  justify-content: center;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 58ch;
}

.fine {
  font-size: 0.82rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.93rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-mobile {
  display: none;
  position: relative;
}

.nav-mobile summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-mobile summary::-webkit-details-marker {
  display: none;
}

.nav-mobile summary::after {
  content: "▾";
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-mobile[open] summary::after {
  content: "▴";
}

.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.nav-mobile-panel a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}

.nav-mobile-panel a:hover {
  background: var(--paper-2);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  .button {
    background: var(--ink);
    color: #14120e;
    border-color: var(--ink);
  }
  .button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #14120e;
  }
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button-ghost:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  .button-ghost {
    background: transparent;
    color: var(--ink);
  }
  .button-ghost:hover {
    background: var(--paper-2);
    color: var(--ink);
    border-color: var(--ink);
  }
}

.button-small {
  min-height: 38px;
  padding: 0 1rem;
  font-size: 0.87rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.1rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero .lede {
  margin-bottom: 0.4rem;
}

.hero .fine {
  margin-top: 1.1rem;
}

.hero-art {
  position: relative;
  margin: 0;
}

.frame {
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotate(-0.6deg);
}

@media (prefers-reduced-motion: no-preference) {
  .frame {
    transition: transform 400ms ease;
  }
  .frame:hover {
    transform: rotate(0deg);
  }
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.3rem 0.65rem;
}

.frame-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame-dot:first-child {
  background: #d97757;
}

.frame-dot:nth-child(2) {
  background: #d9a441;
}

.frame-dot:nth-child(3) {
  background: #6f9e78;
}

.frame-url {
  margin-left: 0.5rem;
  flex: 1;
  min-width: 0;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame img {
  border-radius: 12px;
  border: 1px solid var(--line);
}

.hero-badge {
  position: absolute;
  left: -18px;
  bottom: -22px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px var(--good-soft);
}

/* --------------------------------------------------------------------------
   Strip
   -------------------------------------------------------------------------- */

.strip {
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.strip-item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 0.7rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 60ch;
}

/* Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  padding: 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

@media (prefers-color-scheme: dark) {
  .card-icon {
    color: var(--accent);
  }
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0;
}

.card code {
  font-size: 0.82em;
}

/* Privacy flow diagram */

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.split h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 0.8rem;
}

.split .lede {
  font-size: 1rem;
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.75rem;
  margin: 1.6rem 0 1.2rem;
}

.flow-node {
  padding: 1.05rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.flow-node strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.flow-node span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.flow-node.is-optional {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  box-shadow: none;
}

.flow-arrow {
  align-self: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.1rem;
}

.flow-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.privacy-points {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.privacy-points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.6rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.privacy-points svg {
  width: 20px;
  height: 20px;
  color: var(--good);
  margin-top: 0.1rem;
}

/* Self-host / terminal */

.selfhost {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Grid children default to min-width:auto, so a long terminal line would
   starve the other column instead of scrolling inside the pre. */
.selfhost > *,
.split > *,
.hero > *,
.legal-layout > * {
  min-width: 0;
}

.terminal {
  min-width: 0;
  background: #1b1813;
  border: 1px solid #332c22;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: #f3ead9;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #332c22;
  background: #211d17;
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4a4033;
}

.terminal-bar span:first-child {
  background: #d97757;
}

.terminal-bar span:nth-child(2) {
  background: #d9a441;
}

.terminal-bar span:nth-child(3) {
  background: #6f9e78;
}

.terminal-title {
  margin-left: 0.5rem;
  white-space: nowrap;
  color: #a89b86;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.terminal pre {
  margin: 0;
  padding: 1.2rem 1.2rem 1.4rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
}

.terminal code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.terminal .prompt {
  color: #d9a441;
}

.terminal .comment {
  color: #8d816d;
}

.steps {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

/* FAQ */

.faq {
  display: grid;
  gap: 0.65rem;
  max-width: 860px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.15rem 1.1rem;
}

.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  color: var(--muted);
  font-size: 0.93rem;
  padding: 0 0 1rem;
  margin: 0;
  max-width: 68ch;
}

/* CTA */

.cta {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4rem) 1.5rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: var(--radius-lg);
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.6rem;
}

.cta p {
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 auto 1.5rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #1b1813;
  color: #cfc5b4;
  border-top: 1px solid #2c261e;
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.site-footer a {
  color: #cfc5b4;
  text-decoration: none;
}

.site-footer a:hover {
  color: #f3ead9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2.2rem;
}

.footer-brand .brand {
  color: #f3ead9;
  margin-bottom: 0.7rem;
}

.footer-brand p {
  color: #a89b86;
  font-size: 0.86rem;
  max-width: 30ch;
}

.footer-col h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a89b86;
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid #2c261e;
  color: #a89b86;
  font-size: 0.8rem;
}

.footer-bottom .promise {
  color: #d9a441;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Legal / policy pages
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(2.5rem, 5vw, 4rem) 0 1.8rem;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.page-head .lede {
  max-width: 64ch;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.3rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--muted);
}

.policy-meta strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.policy-meta > span {
  min-width: 0;
}

.policy-meta > span:nth-child(2) {
  flex: 1 1 18rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.toc h2 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  display: grid;
  grid-template-columns: 1.7em 1fr;
  padding: 0.18rem 0;
}

.toc a::before {
  content: counter(toc) ".";
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.7;
}

.toc a:hover {
  color: var(--accent-strong);
}

.prose {
  max-width: 74ch;
  font-size: 1rem;
  color: var(--ink-soft);
}

.prose > h2 {
  font-size: 1.5rem;
  margin: 2.4rem 0 0.7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  scroll-margin-top: 100px;
}

.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  font-size: 1.12rem;
  margin: 1.6rem 0 0.5rem;
  color: var(--ink);
}

.prose p,
.prose li {
  line-height: 1.7;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  overflow-wrap: anywhere;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.2rem 0 1.5rem;
  border-radius: var(--radius-sm);
}

.table-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 3px;
}

.table-wrap table {
  margin: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.5rem;
  font-size: 0.88rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.78rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.note {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.note strong {
  color: var(--ink);
}

.note p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-strong);
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.notfound h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.notfound p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0 auto 1.5rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    max-width: 760px;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .split,
  .selfhost {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-desktop {
    display: none;
  }
  .nav-mobile {
    display: block;
  }
  .strip-inner {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.7rem;
  }
}

@media (max-width: 400px) {
  /* At 320px the brand, CTA and menu no longer fit on one row; the hero
     repeats the CTA immediately below, so drop the header copy. */
  .nav-actions > .button {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .wrap,
  .wrap-narrow {
    width: calc(100% - 32px);
  }
  .header-inner {
    min-height: 64px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
  .hero-badge {
    position: static;
    margin-top: 0.9rem;
    justify-content: center;
  }
  .frame {
    transform: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .policy-meta {
    flex-direction: column;
  }
  .policy-meta > span:nth-child(2) {
    flex: 0 1 auto;
  }

  /* Stack legal tables as labelled cards instead of scrolling sideways. */
  .table-wrap {
    overflow: visible;
  }
  .prose table {
    border: 0;
    background: transparent;
    font-size: 0.92rem;
  }
  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
    width: auto;
  }
  .prose tbody tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 0.75rem;
    overflow: hidden;
  }
  .prose td {
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
  }
  .prose tr td:last-child {
    border-bottom: 0;
  }
  .prose td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* --------------------------------------------------------------------------
   Print — policy pages should print cleanly
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --paper: #fff;
    --surface: #fff;
    --ink: #000;
    --ink-soft: #111;
    --muted: #333;
    --line: #ccc;
    --accent: #000;
    --accent-strong: #000;
    --accent-soft: #f2f2f2;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .site-header,
  .site-footer,
  .toc,
  .back-link,
  .actions {
    display: none !important;
  }
  .legal-layout {
    display: block;
    padding: 0;
  }
  .page-head {
    padding-top: 0;
    border-bottom: 0;
  }
  .prose {
    max-width: none;
  }
  .prose a {
    color: #000;
    text-decoration: underline;
  }
  .prose > h2 {
    break-after: avoid;
  }
  .note {
    border: 1px solid #999;
    background: #f7f7f7;
  }
}
