/*
 * Ser public website: one stylesheet, system fonts only, no images, no scripts.
 * Colors mirror the app's design tokens (src/ui/tokens.ts) so contrast matches the app.
 */

:root {
  color-scheme: light dark;
  --dominant: #FAF7F4;
  --secondary: #F0EAE3;
  --text-primary: #1B1B1F;
  --text-secondary: #5C5C66;
  --accent: #1F5A9E;
  --divider: #E2DAD0;
  --accent-tint: #E3ECF7;
  --mark-bg: #FFE680;
  --mark-text: #1B1B1F;
  --mark-border: #8A6D00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --dominant: #1A1816;
    --secondary: #27231F;
    --text-primary: #F3EFEA;
    --text-secondary: #BDB6AD;
    --accent: #8DB4F0;
    --divider: #3A352F;
    --accent-tint: #1F2E45;
    --mark-bg: #5A4A00;
    --mark-text: #FFF3C4;
    --mark-border: #E6C34D;
  }
}

html {
  font-size: 112.5%;
}

body {
  margin: 0;
  background: var(--dominant);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

header,
main,
footer {
  box-sizing: border-box;
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

header {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--divider);
}

main {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

footer {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--divider);
  color: var(--text-secondary);
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

dt {
  font-weight: 700;
  margin-top: 0.75rem;
}

dd {
  margin: 0 0 0.5rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999rem;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent-tint);
  color: var(--text-primary);
  border: 3px solid var(--accent);
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.site-name {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.coming-soon {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent-tint);
  border: 3px solid var(--accent);
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.draft-notice {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--accent-tint);
  border: 3px solid var(--accent);
  border-radius: 0.5rem;
}

.draft-notice strong {
  display: block;
}

.effective {
  color: var(--text-secondary);
}

.toc {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem 0.5rem 2.5rem;
  background: var(--secondary);
  border-radius: 0.5rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

mark.open-item {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0.05rem 0.3rem;
  border: 1px dashed var(--mark-border);
  border-radius: 0.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

footer p {
  margin: 0 0 0.5rem;
}
