/* ---------------------------------------------------
   Calculator All-in-One — Privacy Policy
   Design tokens
   Color:
     --bg:        #FBFBF9  (page background, warm off-white)
     --surface:   #FFFFFF  (card / nav surface)
     --ink:       #1B1E22  (primary text)
     --ink-soft:  #4B5158  (secondary text)
     --line:      #E3E1DB  (hairline borders)
     --accent:    #2B5C82  (deep slate blue — primary accent)
     --accent-soft: #EEF3F6 (accent tint for backgrounds)
   Type:
     Headings — "Source Serif 4" (serif, editorial, legal-document feel)
     Body     — "Inter" (sans, high legibility at small sizes)
   Layout:
     Single-column document, 720px measure, left-aligned.
     Sticky left-hand contents rail on wide viewports only.
--------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --ink: #1b1e22;
  --ink-soft: #4b5158;
  --line: #e3e1db;
  --accent: #2b5c82;
  --accent-soft: #eef3f6;
  --measure: 700px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

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

a:hover,
a:focus {
  text-decoration-thickness: 2px;
}

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

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 56px 0 40px;
}

.app-name {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.site-header h1 {
  margin: 0 0 14px;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: var(--ink);
}

.site-header .meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- Page layout ---------- */

.page {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--measure));
  gap: 56px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 72px;
}

/* ---------- Table of contents ---------- */

.toc {
  position: sticky;
  top: 32px;
}

.toc-title {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 7px 0 7px 14px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ---------- Policy content ---------- */

.policy section {
  padding-top: 40px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.policy section:first-child {
  padding-top: 0;
  border-top: none;
}

.policy h2 {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--ink);
  scroll-margin-top: 24px;
}

.policy p {
  margin: 0 0 16px;
  color: var(--ink);
  max-width: 68ch;
}

.policy ul {
  margin: 0 0 16px;
  padding-left: 22px;
  max-width: 66ch;
}

.policy li {
  margin-bottom: 8px;
  color: var(--ink);
}

.policy a {
  word-break: break-word;
}

.contact-email {
  font-size: 1.05rem;
}

/* Developer info definition list */

.info-list {
  margin: 0 0 16px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border-radius: 6px;
  max-width: 68ch;
}

.info-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 0;
}

.info-list div + div {
  border-top: 1px solid rgba(43, 92, 130, 0.12);
}

.info-list dt {
  font-weight: 600;
  min-width: 140px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
}

.site-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

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

@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }

  .toc {
    position: static;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px;
    background: var(--surface);
  }

  .toc ol {
    border-left: none;
    columns: 2;
    column-gap: 20px;
  }

  .toc a {
    padding: 5px 0;
    border-left: none;
  }

  .toc a:hover,
  .toc a:focus-visible {
    color: var(--accent);
    text-decoration: underline;
  }

  .site-header {
    padding: 40px 0 28px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 18px;
  }

  .toc ol {
    columns: 1;
  }

  .policy h2 {
    font-size: 1.25rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
