/* Shared styles for prutsel.com legal pages (privacy.html, terms.html).
   Mirrors the brand tokens + typefaces from index.html; kept in one file so both pages stay in sync. */

/* Self-hosted brand typefaces (no third-party font CDN) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

:root,
:root[data-theme="light"] {
  --bg: #faf7f2;
  --text: #16130f;
  --muted: #6b6357;
  --line: #e7e1d6;
  --link: #c0480f;
  --linkh: #16130f;
  --orange: #ed6a1a;
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #16130f;
    --text: #faf7f2;
    --muted: #9a8f80;
    --line: rgba(250, 247, 242, 0.13);
    --link: #ed6a1a;
    --linkh: #ffffff;
    --orange: #ed6a1a;
    --card: rgba(250, 247, 242, 0.04);
  }
}
:root[data-theme="dark"] {
  --bg: #16130f;
  --text: #faf7f2;
  --muted: #9a8f80;
  --line: rgba(250, 247, 242, 0.13);
  --link: #ed6a1a;
  --linkh: #ffffff;
  --orange: #ed6a1a;
  --card: rgba(250, 247, 242, 0.04);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
::selection {
  background: var(--orange);
  color: #fff;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

/* header: wordmark (links home) + theme toggle */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
}
.site-header .wordmark {
  display: block;
  height: clamp(26px, 4.5vw, 32px);
  width: auto;
}
.site-header a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}
.theme-toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  flex: none;
  transition: border-color .2s ease, color .2s ease;
}
.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
/* Two-icon toggle — show the current theme's glyph (sun in light, moon in dark). */
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .theme-icon-moon {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .theme-icon-sun {
    display: none;
  }
  :root:not([data-theme]) .theme-toggle .theme-icon-moon {
    display: block;
  }
}

/* content */
.legal {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 32px 64px;
}
.legal h1 {
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 24px 0 6px;
}
.legal h2 {
  font-size: clamp(17px, 2.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
}
.legal p,
.legal li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
}
.legal p {
  margin: 12px 0;
}
.legal ul {
  margin: 12px 0;
  padding-left: 22px;
}
.legal li {
  margin: 6px 0;
}
.legal a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.legal a:hover,
.legal a:focus-visible {
  color: var(--linkh);
  border-color: var(--linkh);
  outline: none;
}
.legal strong {
  font-weight: 600;
}
.legal code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.legal .updated {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 8px;
}
.legal .backlink {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 32px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle,
  .legal a {
    transition: none;
  }
}
