/* Palster's public pages: About, Policies, Terms, Privacy, Cookies, Community
   Standards, Enforcement, AI, Accessibility, Copyright, Security, Contact.
   One template drawn by scripts/build_policy_pages.py. A reading page, not a
   brochure: one 680px column, the policies on the left, "On this page" on the
   right, everything neutral but links and the one filled button (Lagoon). */

:root {
  --lg-bg: var(--palster-surface-wash, #F5F5F7);
  --lg-paper: #FFFFFF;
  --lg-ink: var(--palster-text-primary, #1D1D1F);
  --lg-ink-2: var(--palster-text-secondary, #6E6E73);
  --lg-line: var(--palster-border-subtle, rgba(0, 0, 0, 0.08));
  --lg-line-strong: var(--palster-border-strong, rgba(0, 0, 0, 0.16));
  --lg-wash: var(--palster-highlight-bg, rgba(0, 0, 0, 0.06));
  --lg-wash-hover: var(--palster-highlight-bg-hover, rgba(0, 0, 0, 0.09));
  --lg-link: #047C80;
  --lg-fill: linear-gradient(180deg, #058184 0%, #04666A 100%);
  --lg-fill-hover: linear-gradient(180deg, #04666A 0%, #035458 100%);
  --lg-warn-bg: #FFF4E5;
  --lg-warn-ink: #8A4B00;
  --lg-ok-ink: #1E7B4F;
  --lg-bad-ink: #B42318;
  --lg-font: var(--palster-font-sans, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif);
  --lg-font-display: var(--palster-font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif);
  --lg-top-h: 60px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --lg-bg: #0D0E11;
  --lg-paper: #15161A;
  --lg-ink: #F5F5F7;
  --lg-ink-2: #A1A1A6;
  --lg-line: rgba(255, 255, 255, 0.09);
  --lg-line-strong: rgba(255, 255, 255, 0.18);
  --lg-wash: rgba(255, 255, 255, 0.07);
  --lg-wash-hover: rgba(255, 255, 255, 0.12);
  --lg-link: #06A6A3;
  --lg-warn-bg: rgba(255, 170, 60, 0.12);
  --lg-warn-ink: #FFC27A;
  --lg-ok-ink: #5FD39A;
  --lg-bad-ink: #FF8A80;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--lg-top-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--lg-bg);
  color: var(--lg-ink);
  font-family: var(--lg-font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--lg-link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lg-link); outline-offset: 2px; border-radius: 6px; }

.lg-skip {
  position: absolute; inset-inline-start: 16px; top: -48px; z-index: 50;
  padding: 10px 14px; border-radius: 10px;
  background: var(--lg-paper); color: var(--lg-ink); font-weight: 600;
  text-decoration: none; border: 1px solid var(--lg-line-strong);
}
.lg-skip:focus { top: 8px; }

.lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.lg-top {
  position: sticky; top: 0; z-index: 20;
  height: var(--lg-top-h);
  background: color-mix(in srgb, var(--lg-bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--lg-line);
}
.lg-top-in {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 12px;
}
.lg-brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--lg-ink); text-decoration: none;
  font-family: var(--lg-font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  min-height: 44px;
}
.lg-brand img { display: block; width: 28px; height: 28px; border-radius: 7px; }
.lg-brand .lg-wordmark { color: #6E6E73; }
html[data-theme="dark"] .lg-brand .lg-wordmark { color: #FFFFFF; }
.lg-crumb { color: var(--lg-ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 4px; }
.lg-crumb::before { content: "/"; margin-inline-end: 10px; color: var(--lg-line-strong); }
.lg-crumb:hover { color: var(--lg-ink); }
.lg-top-gap { flex: 1; }

.lg-only-light { display: none !important; }
html[data-theme="light"] .lg-only-light { display: block !important; }
html[data-theme="light"] .lg-only-dark { display: none !important; }

/* Controls follow the scale in tokens.css (2026-10-17): drawn 32px, a header
   icon 32px, a form's one action 36px; under a finger each reaches 44px. */
.lg-icon-btn {
  width: var(--palster-ctl-h, 32px); height: var(--palster-ctl-h, 32px); border-radius: 999px; border: 0;
  display: inline-grid; place-items: center; position: relative;
  background: transparent; color: var(--lg-ink-2); cursor: pointer;
}
.lg-icon-btn:hover { background: var(--lg-wash); color: var(--lg-ink); }
.lg-icon-btn::after { content: ""; position: absolute; inset: calc((100% - var(--palster-ctl-reach, 44px)) / 2); }
.lg-icon-btn svg { width: 18px; height: 18px; }
.lg-icon-btn .lg-moon { display: none; }
html[data-theme="dark"] .lg-icon-btn .lg-sun { display: none; }
html[data-theme="dark"] .lg-icon-btn .lg-moon { display: block; }

.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--palster-ctl-h, 32px); padding: 0 14px; border-radius: 999px; box-sizing: border-box;
  font: 600 13.5px/1 var(--lg-font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap; position: relative;
}
.lg-btn::after {
  content: ""; position: absolute; inset-inline-start: -1px; inset-inline-end: -1px;
  top: calc((100% - var(--palster-ctl-reach, 44px)) / 2 - 1px); bottom: calc((100% - var(--palster-ctl-reach, 44px)) / 2 - 1px);
}
#contactSend { height: var(--palster-ctl-h-lg, 36px); padding: 0 18px; }
.lg-btn-fill { background: var(--lg-fill); color: #FFFFFF; }
.lg-btn-fill:hover { background: var(--lg-fill-hover); text-decoration: none; }
.lg-btn-quiet { background: var(--lg-wash); color: var(--lg-ink); }
.lg-btn-quiet:hover { background: var(--lg-wash-hover); text-decoration: none; }
.lg-btn[disabled] { opacity: 0.55; cursor: default; }

/* ---------- hero ---------- */
.lg-hero { max-width: 1200px; margin: 0 auto; padding: 56px 24px 28px; }
.lg-hero-in { max-width: 760px; }
.lg-eyebrow {
  display: inline-block; margin: 0 0 12px; color: var(--lg-ink-2);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none;
}
a.lg-eyebrow:hover { color: var(--lg-ink); }
.lg-title {
  margin: 0; font-family: var(--lg-font-display);
  font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 700;
  text-wrap: balance;
}
.lg-lede { margin: 18px 0 0; font-size: 19px; line-height: 1.55; color: var(--lg-ink-2); text-wrap: pretty; }
.lg-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
  margin: 22px 0 0; padding: 0; list-style: none;
  font-size: 14px; color: var(--lg-ink-2);
}
.lg-meta strong { color: var(--lg-ink); font-weight: 600; }
.lg-meta .lg-print { margin-inline-start: auto; }
.lg-link-btn {
  background: none; border: 0; padding: 0; height: var(--palster-ctl-h-sm, 28px); color: var(--lg-ink-2); cursor: pointer;
  font: 500 14px/1 var(--lg-font); display: inline-flex; align-items: center; gap: 6px; position: relative;
}
.lg-link-btn::after {
  content: ""; position: absolute; inset-inline-start: 0; inset-inline-end: 0;
  top: calc((100% - var(--palster-ctl-reach, 44px)) / 2); bottom: calc((100% - var(--palster-ctl-reach, 44px)) / 2);
}
.lg-link-btn:hover { color: var(--lg-ink); }
.lg-link-btn svg { width: 16px; height: 16px; }

/* ---------- shell ---------- */
.lg-shell {
  max-width: 1200px; margin: 0 auto; padding: 8px 24px 80px;
  display: grid; gap: 48px;
  grid-template-columns: 220px minmax(0, 680px) 1fr;
  align-items: start;
}
.lg-shell.is-wide { grid-template-columns: 220px minmax(0, 1fr); }

.lg-policies, .lg-toc {
  position: sticky; top: calc(var(--lg-top-h) + 24px);
  max-height: calc(100vh - var(--lg-top-h) - 48px); overflow: auto;
  scrollbar-width: thin;
}
.lg-rail-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--lg-ink-2);
}
.lg-policies ul, .lg-toc ul { list-style: none; margin: 0; padding: 0; }
.lg-policies a {
  display: block; padding: 8px 12px; margin: 0 0 2px; border-radius: 10px;
  color: var(--lg-ink-2); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.lg-policies a:hover { background: var(--lg-wash); color: var(--lg-ink); }
.lg-policies a[aria-current="page"] { background: var(--lg-wash); color: var(--lg-ink); font-weight: 600; }
.lg-policies hr { border: 0; border-top: 1px solid var(--lg-line); margin: 12px 4px; }

.lg-toc { padding-inline-start: 16px; border-inline-start: 1px solid var(--lg-line); max-width: 260px; }
.lg-toc a {
  display: block; padding: 6px 0; color: var(--lg-ink-2); text-decoration: none;
  font-size: 14px; line-height: 1.4;
}
.lg-toc a:hover { color: var(--lg-ink); }
.lg-toc a.is-here { color: var(--lg-ink); font-weight: 600; }

/* "On this page" for narrow screens */
.lg-toc-inline { display: none; }

/* ---------- the document ---------- */
.lg-doc { min-width: 0; }
.lg-doc > section { padding: 8px 0 28px; border-bottom: 1px solid var(--lg-line); margin-bottom: 28px; }
.lg-doc > section:last-of-type { border-bottom: 0; }
.lg-doc h2 {
  position: relative; margin: 0 0 14px; font-family: var(--lg-font-display);
  font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance;
}
.lg-doc h3 { margin: 26px 0 8px; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 650; }
.lg-doc h4 { margin: 18px 0 6px; font-size: 16px; font-weight: 650; }
.lg-doc p { margin: 0 0 14px; text-wrap: pretty; }
.lg-doc ul, .lg-doc ol { margin: 0 0 16px; padding-inline-start: 22px; }
.lg-doc li { margin: 0 0 8px; padding-inline-start: 2px; }
.lg-doc li::marker { color: var(--lg-ink-2); }
.lg-doc strong { font-weight: 650; }
.lg-doc code { font-family: var(--palster-font-mono, ui-monospace, Menlo, monospace); font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: var(--lg-wash); }
.lg-doc hr { border: 0; border-top: 1px solid var(--lg-line); margin: 24px 0; }
.lg-num { color: var(--lg-ink-2); font-weight: 600; margin-inline-end: 8px; font-variant-numeric: tabular-nums; }

.lg-anchor {
  position: absolute; inset-inline-start: -36px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  color: var(--lg-ink-2); cursor: pointer; opacity: 0; display: grid; place-items: center;
}
.lg-anchor svg { width: 16px; height: 16px; }
.lg-doc h2:hover .lg-anchor, .lg-anchor:focus-visible, .lg-anchor.is-copied { opacity: 1; }
.lg-anchor:hover { background: var(--lg-wash); color: var(--lg-ink); }
.lg-anchor.is-copied { color: var(--lg-ok-ink); }

/* The plain-words summary at the top of a section ("In short"). */
.lg-short {
  margin: 0 0 18px; padding: 14px 18px; border-radius: 14px;
  background: var(--lg-wash); font-size: 15.5px; line-height: 1.6;
}
.lg-short > :last-child { margin-bottom: 0; }
.lg-short-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lg-ink-2); margin-bottom: 4px; }

.lg-note {
  margin: 0 0 18px; padding: 14px 18px; border-radius: 14px;
  background: var(--lg-warn-bg); color: var(--lg-ink);
}
.lg-note strong:first-child { color: var(--lg-warn-ink); }
.lg-note > :last-child { margin-bottom: 0; }

.lg-card {
  margin: 0 0 16px; padding: 18px 20px; border-radius: 16px;
  background: var(--lg-paper); border: 1px solid var(--lg-line);
}
.lg-card > :last-child { margin-bottom: 0; }

.lg-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.lg-dl dt { color: var(--lg-ink-2); font-size: 14px; padding-top: 1px; }
.lg-dl dd { margin: 0; }

.lg-table-wrap { margin: 0 0 18px; overflow-x: auto; border: 1px solid var(--lg-line); border-radius: 14px; background: var(--lg-paper); }
.lg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.lg-table th, .lg-table td { text-align: start; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--lg-line); }
.lg-table th { font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--lg-ink-2); white-space: nowrap; }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table td:first-child { font-weight: 600; }
.lg-table code { white-space: nowrap; }

/* Do / Don't lists in the Community Standards */
.lg-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.lg-dos > div { padding: 14px 16px; border-radius: 14px; background: var(--lg-paper); border: 1px solid var(--lg-line); }
.lg-dos h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.lg-dos ul { margin: 0; padding-inline-start: 18px; font-size: 15px; }
.lg-dos li { margin-bottom: 6px; }
.lg-dos .is-ok h4 { color: var(--lg-ok-ink); }
.lg-dos .is-no h4 { color: var(--lg-bad-ink); }

/* Card grids: the hub, About, Contact routes */
.lg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 20px; }
.lg-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 16px;
  background: var(--lg-paper); border: 1px solid var(--lg-line); color: var(--lg-ink); text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
a.lg-tile:hover { border-color: var(--lg-line-strong); text-decoration: none; }
.lg-tile-title { font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.lg-tile-title svg { width: 20px; height: 20px; flex: none; color: var(--lg-ink-2); }
.lg-tile-desc { color: var(--lg-ink-2); font-size: 14.5px; line-height: 1.5; }
.lg-tile-more { margin-top: auto; padding-top: 6px; color: var(--lg-link); font-size: 14px; font-weight: 600; }

/* What changed */
.lg-changes { margin: 8px 0 0; border-radius: 14px; background: var(--lg-wash); }
.lg-changes summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.lg-changes summary::-webkit-details-marker { display: none; }
.lg-changes summary::after { content: "+"; font-size: 20px; color: var(--lg-ink-2); }
.lg-changes[open] summary::after { content: "−"; }
.lg-changes > div { padding: 0 18px 14px; font-size: 15px; }

/* ---------- contact form ---------- */
.lg-form { display: grid; gap: 16px; margin: 0 0 12px; }
.lg-form .lg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lg-field { display: grid; gap: 6px; }
.lg-field label, .lg-field legend { font-size: 14px; font-weight: 600; }
.lg-field .lg-hint { font-size: 13.5px; color: var(--lg-ink-2); }
.lg-input, .lg-select, .lg-textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--lg-line-strong); background: var(--lg-paper); color: var(--lg-ink);
  font: 400 16px/1.45 var(--lg-font);
}
.lg-textarea { min-height: 160px; resize: vertical; }
.lg-input:focus, .lg-select:focus, .lg-textarea:focus { outline: none; border-color: var(--lg-ink-2); }
.lg-honey { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lg-form-status { font-size: 15px; margin: 0; }
.lg-form-status:empty, .lg-count:empty { display: none; }
.lg-form-status.is-error { color: var(--lg-bad-ink); }
.lg-sent { padding: 20px; border-radius: 16px; background: var(--lg-wash); }
.lg-sent h3 { margin-top: 0; }
.lg-count { font-size: 13px; color: var(--lg-ink-2); text-align: end; }

/* ---------- footer ---------- */
.lg-foot { border-top: 1px solid var(--lg-line); background: var(--lg-bg); }
.lg-foot-in {
  max-width: 1200px; margin: 0 auto; padding: 36px 24px 40px;
  display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px;
}
.lg-foot h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lg-ink-2); }
.lg-foot ul { list-style: none; margin: 0; padding: 0; }
.lg-foot li a { display: inline-block; padding: 5px 0; color: var(--lg-ink); text-decoration: none; font-size: 15px; }
.lg-foot li a:hover { text-decoration: underline; }
.lg-foot-brand p { margin: 10px 0 0; color: var(--lg-ink-2); font-size: 14px; line-height: 1.55; }
.lg-foot-base {
  max-width: 1200px; margin: 0 auto; padding: 16px 24px 32px; border-top: 1px solid var(--lg-line);
  color: var(--lg-ink-2); font-size: 13.5px;
}

/* ---------- widths ---------- */
@media (max-width: 1179px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr) 220px; max-width: 1000px; }
  .lg-shell.is-wide { grid-template-columns: minmax(0, 1fr); }
  .lg-policies { display: none; }
  .lg-foot-in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 899px) {
  :root { --lg-top-h: 56px; }
  .lg-top-in { padding-block: 0 0; padding-inline: 16px 8px; gap: 8px; }
  .lg-hero { padding: 32px 16px 20px; }
  .lg-lede { font-size: 17px; }
  .lg-meta .lg-print { margin-inline-start: 0; }
  .lg-shell, .lg-shell.is-wide { display: block; padding: 0 0 56px; }
  .lg-toc { display: none; }
  .lg-anchor { display: none; }

  /* Edge to edge like the app: words sit 16px in, boxes reach both edges
     square-cornered with no side borders. Insets, never negative margins. */
  .lg-doc > section > *,
  .lg-doc > .lg-intro > * { margin-inline-start: 16px; margin-inline-end: 16px; }
  .lg-doc > section > .lg-short,
  .lg-doc > section > .lg-note,
  .lg-doc > section > .lg-card,
  .lg-doc > section > .lg-table-wrap,
  .lg-doc > section > .lg-changes,
  .lg-doc > section > .lg-sent,
  .lg-toc-inline {
    margin-inline-start: 0; margin-inline-end: 0; border-radius: 0;
    border-inline-start-width: 0; border-inline-end-width: 0;
    padding-inline-start: 16px; padding-inline-end: 16px;
  }
  .lg-doc > section > .lg-table-wrap { padding: 0; }
  .lg-doc > section > .lg-grid,
  .lg-doc > section > .lg-dos { margin-inline-start: 0; margin-inline-end: 0; gap: 0; }
  .lg-grid .lg-tile, .lg-dos > div {
    border-radius: 0; border-inline-start-width: 0; border-inline-end-width: 0; border-top-width: 0; padding-inline-start: 16px; padding-inline-end: 16px;
  }
  .lg-grid { grid-template-columns: 1fr; border-top: 1px solid var(--lg-line); }
  .lg-dos { grid-template-columns: 1fr; border-top: 1px solid var(--lg-line); }
  .lg-doc > section { padding: 8px 0 20px; margin-bottom: 20px; }
  .lg-doc h2 { font-size: 23px; }

  .lg-toc-inline {
    display: block; margin: 0 0 24px; border-top: 1px solid var(--lg-line); border-bottom: 1px solid var(--lg-line);
    background: var(--lg-paper);
  }
  .lg-toc-inline summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 600; cursor: pointer; }
  .lg-toc-inline summary::-webkit-details-marker { display: none; }
  .lg-toc-inline summary::after { content: "+"; font-size: 20px; color: var(--lg-ink-2); }
  .lg-toc-inline[open] summary::after { content: "−"; }
  .lg-toc-inline ol { margin: 0 0 12px; padding-inline-start: 22px; }
  .lg-toc-inline a { display: block; padding: 8px 0; color: var(--lg-ink); text-decoration: none; }

  .lg-form .lg-row { grid-template-columns: 1fr; }
  .lg-dl { grid-template-columns: 1fr; gap: 2px; }
  .lg-dl dd { margin-bottom: 10px; }

  .lg-foot-in { grid-template-columns: 1fr 1fr; padding: 28px 16px; gap: 24px; }
  .lg-foot-brand { grid-column: 1 / -1; }
  .lg-foot-base { padding: 16px 16px 28px; }
}

@media (max-width: 420px) {
  .lg-crumb { display: none; }
}

@media print {
  .lg-top, .lg-policies, .lg-toc, .lg-toc-inline, .lg-foot-in, .lg-anchor, .lg-print, .lg-skip, .lg-form { display: none !important; }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
  .lg-shell { display: block; padding: 0; }
  .lg-hero { padding: 0 0 12pt; }
  .lg-doc > section { break-inside: auto; border: 0; }
  .lg-doc h2, .lg-doc h3 { break-after: avoid; }
  .lg-short, .lg-note, .lg-card, .lg-tile { background: none !important; border: 1px solid #CCCCCC; }
  a { color: #000000; }
  .lg-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555555; }
}
