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

:root {
  /* Quiet Ink palette — light */
  --bg: #FAF7F2;
  --card: #F2ECE1;
  --text: #1F1B17;
  --muted: #6B6258;
  --faint: #9B9286;
  --separator: rgba(31, 27, 23, 0.12);
  --hairline: rgba(31, 27, 23, 0.08);
  --accent: #B5532F;
  --accent-press: #9A4426;
  --header-bg: rgba(250, 247, 242, 0.82);
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1815;
    --card: #262220;
    --text: #F2EBDF;
    --muted: #A89F8F;
    --faint: #6E665B;
    --separator: rgba(242, 235, 223, 0.10);
    --hairline: rgba(242, 235, 223, 0.06);
    --accent: #DC7B52;
    --accent-press: #C46A42;
    --header-bg: rgba(26, 24, 21, 0.78);
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro",
    system-ui, "Segoe UI", Roboto, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(181, 83, 47, 0.20); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); font-weight: 600; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
}

.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: "Crimson Pro", "New York", Georgia, serif; }
.logo:hover { text-decoration: none; }

.app-icon {
  width: 30px;
  height: 30px;
  border-radius: 22%;
  box-shadow: 0 0 0 0.5px var(--hairline);
}

.logo-name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }

.nav { display: flex; gap: 22px; font-size: 16px; font-weight: 400; }
.nav a { color: var(--accent); }
.nav a:not(.active) { color: var(--muted); }
.nav a:hover { text-decoration: none; opacity: 0.7; }
.nav a.active { color: var(--accent); font-weight: 600; }

/* ---- Page ---- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 20px 48px;
}

.page-title {
  font-family: "Crimson Pro", "New York", Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--text);
}

.effective-date {
  margin-top: 8px;
  font-size: 15px;
  color: var(--faint);
}

/* Grouped content card */
.card {
  margin-top: 22px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 8px 22px 24px;
}

.card h2 {
  margin-top: 26px;
  margin-bottom: 4px;
  font-family: "Crimson Pro", "New York", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
}

.card p { margin-top: 12px; color: var(--text); }
.card ul { margin: 12px 0; padding-left: 22px; }
.card li { margin-bottom: 7px; color: var(--text); }
.card li::marker { color: var(--accent); }

/* ---- Table ---- */
table {
  width: 100%;
  margin: 18px 0 6px;
  font-size: 15px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--separator);
  border-radius: 12px;
  overflow: hidden;
}

thead th {
  text-align: left;
  padding: 11px 13px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg);
}

td {
  padding: 11px 13px;
  border-top: 1px solid var(--separator);
  vertical-align: top;
  color: var(--muted);
}

td strong { color: var(--text); }

/* ---- Footer ---- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--hairline); }

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

.logo-sm {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-weight: 500;
  font-family: "Crimson Pro", "New York", Georgia, serif;
}
.logo-sm:hover { text-decoration: none; }
.logo-sm .app-icon { width: 22px; height: 22px; }

.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--faint); }
.footer-links a:hover { color: var(--text); text-decoration: none; }

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; text-align: left; }
}

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