/* Shared by every page of sipapp.eu. Bump ?v= in the HTML when this file changes. */
/* Fonts are served from this site (SIL Open Font License), so visiting sipapp.eu sends nothing to Google. */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("/assets/fonts/dm-sans-latin-opsz-normal.woff2") format("woff2"); }

:root {
  --bg: #F4E8D2;          /* cream page */
  --surface: #EDE0C4;
  --surface-2: #E2D3B2;
  --ink: #180D2B;         /* plum ink */
  --ink-2: #4A3568;
  --muted: #8A7060;       /* decoration only, never small text */
  --ring: #9E3B52;        /* wine ring on light */
  --gold: #C49040;
  --gold-light: #DEAD73;
  --on-gold: #180D2B;
  --band: #180D2B;        /* plum band */
  --band-ink: #F2E6C8;
  --band-ink-2: #C8B4E0;
  --green: #1A8A6A;
  --violet: #6B3A9E;
  --heat-1: #3D2660; --heat-2: #6B3A9E; --heat-3: #8B4DB0;
  --phone-bg: #110B1C; --phone-surface: #1E1530; --phone-surface-2: #2C2040; --phone-ink: #F2E6C8; --phone-muted: #8E80A6; --phone-green: #1AAA82;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hair: 0.5px;
  --r-sm: 8px; --r-btn: 10px; --r-lg: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110B1C; --surface: #1E1530; --surface-2: #2C2040; --ink: #F2E6C8; --ink-2: #C8B4E0; --muted: #5A4D6E;
    --ring: #C49040; --band: #1E1530; --band-ink: #F2E6C8; --band-ink-2: #C8B4E0; --green: #1AAA82;
    --phone-bg: #F4E8D2; --phone-surface: #EDE0C4; --phone-surface-2: #E2D3B2; --phone-ink: #180D2B; --phone-muted: #6E5A4C; --phone-green: #1A8A6A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110B1C; --surface: #1E1530; --surface-2: #2C2040; --ink: #F2E6C8; --ink-2: #C8B4E0; --muted: #5A4D6E;
  --ring: #C49040; --band: #1E1530; --band-ink: #F2E6C8; --band-ink-2: #C8B4E0; --green: #1AAA82;
  --phone-bg: #F4E8D2; --phone-surface: #EDE0C4; --phone-surface-2: #E2D3B2; --phone-ink: #180D2B; --phone-muted: #6E5A4C; --phone-green: #1A8A6A;
  color-scheme: dark;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } * { animation: none !important; transition: none !important } }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px) }
a { color: inherit }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; text-wrap: balance; margin: 0; letter-spacing: -0.01em }
p { margin: 0 }
.label { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2) }

/* ── Header ───────────────────────────── */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: var(--hair) solid var(--surface-2) }
.top .wrap { display: flex; align-items: center; gap: 20px; padding-block: 10px }
.brand { display: flex; align-items: center; text-decoration: none }
.brand svg { width: 44px; height: 44px; display: block }
nav.links { display: flex; gap: 22px; margin-left: 12px }
nav.links a { text-decoration: none; font-size: 14px; color: var(--ink-2) }
nav.links a:hover { color: var(--ink) }
.spacer { flex: 1 }
.lang { display: flex; border: var(--hair) solid var(--muted); border-radius: 999px; padding: 2px }
.lang button { font: 500 12px/1 var(--font-body); letter-spacing: .06em; border: 0; background: transparent; color: var(--ink-2); padding: 7px 10px; border-radius: 999px; cursor: pointer; min-width: 36px }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg) }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px/1 var(--font-body); text-decoration: none; border-radius: var(--r-btn); padding: 15px 22px; min-height: 48px; transition: transform 80ms ease, background-color 150ms ease }
.btn:active { transform: scale(.97) }
.btn-primary { background: var(--gold); color: var(--on-gold) }
.btn-primary:hover { background: var(--gold-light) }
.btn-quiet { color: var(--ink); border: 1px solid var(--muted) }
.btn-quiet:hover { background: var(--surface) }
.top .btn { padding: 11px 16px; min-height: 40px; font-size: 14px }


footer { border-top: var(--hair) solid var(--surface-2) }
footer .wrap { padding-block: 36px 48px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 40px; align-items: start; font-size: 14px; color: var(--ink-2) }
footer .brand svg { width: 64px; height: 64px }
.help { display: grid; gap: 6px; max-width: 46em }
.help strong { color: var(--ink); font-weight: 500 }
.num { font-variant-numeric: tabular-nums; user-select: all; color: var(--ink); font-weight: 500; white-space: nowrap }
.small { font-size: 12px }

/* ── Shared narrow rules ───────────────── */
@media (max-width: 900px) { nav.links { display: none } }
@media (max-width: 680px) { .top .btn { display: none } footer .wrap { grid-template-columns: minmax(0, 1fr) } }

/* ── Additions for the standalone site ─── */
[hidden] { display: none !important }
body { margin: 0 }
.skip { position: absolute; left: 16px; top: -100px; z-index: 20; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r-btn); text-decoration: none; font-size: 14px }
.skip:focus { top: 8px }
footer nav.legal { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px }
footer nav.legal a { color: var(--ink-2) }
footer nav.legal a:hover { color: var(--ink) }

/* ── Legal and plain pages ─────────────── */
.legal-main .wrap { max-width: 860px; padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px) }
.prose h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.02; font-weight: 500; font-variation-settings: "opsz" 144 }
.prose h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.12; margin: 2.2em 0 .6em }
.prose p, .prose li { color: var(--ink-2); max-width: 44em }
.prose p { margin-top: 12px }
.prose .meta { font-size: 13px; margin-top: 14px }
.prose .lead { font-size: 18px; color: var(--ink); margin-top: 22px }
.prose ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 10px }
.prose li::marker { color: var(--ring) }
.prose strong { color: var(--ink); font-weight: 600 }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px }
.prose a:hover { color: var(--ring) }
.prose code { font-size: .92em; background: var(--surface); padding: 1px 6px; border-radius: 4px; color: var(--ink) }
.draft { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); border-left: 3px solid var(--gold); color: var(--ink) !important; font-size: 15px }
mark.ph { background: color-mix(in srgb, var(--gold) 38%, transparent); color: var(--ink); padding: 1px 5px; border-radius: 4px; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone }
.tablewrap { margin-top: 16px; overflow-x: auto; border: var(--hair) solid var(--muted); border-radius: var(--r-sm) }
.tablewrap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14.5px }
.tablewrap th, .tablewrap td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: var(--hair) solid var(--surface-2); color: var(--ink-2) }
.tablewrap th { background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: .02em }
.tablewrap tr:last-child td { border-bottom: 0 }
.tablewrap td:first-child { color: var(--ink); font-weight: 500 }
.notfound { min-height: 50vh; display: grid; align-content: center; gap: 18px; justify-items: start }
.notfound h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1; font-weight: 500 }
.notfound p { color: var(--ink-2); max-width: 32em; font-size: 18px }
