:root {
  color-scheme: light;
  --paper: #f3f5f8;
  --paper-deep: #e8ecf2;
  --ink: #141c28;
  --ink-soft: #2e3d52;
  --text-muted: #546678;
  --accent: #3d6e8c;
  --accent-bright: #4d8aab;
  --accent-soft: rgba(61, 110, 140, 0.16);
  --book-accent: #c8d2de;
  --book-page: #d2dae4;
  --book-page-left: #c4ceda;
  --book-spine: #a8b6c6;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

body.page-plain {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

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

a:hover {
  color: var(--ink);
}

.book-accent {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 0;
  pointer-events: none;
  transform: translate(-38%, -50%);
  perspective: 900px;
}

.book-3d {
  display: flex;
  align-items: stretch;
  transform: rotateX(14deg) rotateZ(-3deg);
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 28px rgba(84, 102, 120, 0.14));
}

.book-spine {
  flex: 0 0 11px;
  background: linear-gradient(180deg, #8fa3b8 0%, #7a90a8 50%, #8fa3b8 100%);
  border-radius: 2px;
  box-shadow:
    inset -2px 0 4px rgba(40, 56, 72, 0.18),
    inset 2px 0 4px rgba(255, 255, 255, 0.35);
}

.book-page {
  position: relative;
  height: 15rem;
  background: linear-gradient(160deg, #d8e0e8 0%, #c5d0dc 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 140, 160, 0.22);
}

.book-page--left {
  width: 5rem;
  transform-origin: right center;
  transform: rotateY(62deg);
  background: linear-gradient(200deg, #b8c6d4 0%, #a8b8c8 100%);
  border-radius: 3px 0 0 3px;
}

.book-page--right {
  width: 12rem;
  transform-origin: left center;
  transform: rotateY(-42deg);
  border-radius: 0 4px 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem 1.1rem 1.5rem 0.9rem;
}

.book-page--right::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 0.45rem;
  border-radius: 1px;
  background: linear-gradient(180deg, #9eb0c2 0%, #8a9cb0 100%);
  opacity: 0.55;
}

.book-line {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: rgba(90, 110, 130, 0.22);
  transform: skewY(-2deg);
}

.book-line:nth-child(1) { width: 88%; }
.book-line:nth-child(2) { width: 72%; margin-left: 10%; }
.book-line:nth-child(3) { width: 92%; }
.book-line:nth-child(4) { width: 64%; margin-left: 14%; }
.book-line:nth-child(5) { width: 80%; margin-left: 6%; }

.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.45;
  will-change: transform;
}

.glow-a {
  width: min(75vw, 32rem);
  height: min(75vw, 32rem);
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
}

.glow-b {
  width: min(55vw, 20rem);
  height: min(55vw, 20rem);
  bottom: 8%;
  right: -12%;
  background: radial-gradient(circle, rgba(61, 110, 140, 0.1) 0%, transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding:
    calc(2.5rem + var(--safe-top))
    calc(1.25rem + var(--safe-right))
    calc(1.75rem + var(--safe-bottom))
    calc(1.25rem + var(--safe-left));
}

.shell-narrow {
  max-width: 36rem;
  margin: 0 auto;
  width: 100%;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: 28rem;
  width: 100%;
  gap: 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 13vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
}

.headline {
  margin: 0.875rem 0 0;
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 4.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--ink-soft);
}

.lede {
  margin: 1.125rem 0 0;
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 22rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  min-width: 11rem;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: #f8fafc;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  box-shadow:
    0 0 0 1px rgba(61, 110, 140, 0.25),
    0 10px 28px rgba(61, 110, 140, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cta:hover {
  color: #f8fafc;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(61, 110, 140, 0.4),
    0 14px 36px rgba(61, 110, 140, 0.28);
}

.cta:active {
  transform: translateY(0);
}

.cta-subline {
  margin: 0.875rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 22rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.foot a {
  color: var(--text-muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.sep {
  opacity: 0.45;
}

.page-title {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.back {
  text-decoration: none;
  color: var(--text-muted);
}

.back:hover {
  color: var(--accent);
}

.prose {
  margin-top: 1.5rem;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

/* —— Privacy policy page —— */

.shell-policy {
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2rem;
}

.policy-header {
  width: 100%;
}

.policy-meta {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.policy-meta p {
  margin: 0;
}

.policy-intro {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 42rem;
}

.policy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  margin-top: 0.5rem;
}

.policy-toc-wrap {
  width: 100%;
}

.policy-toc-details {
  border: 1px solid rgba(61, 110, 140, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.45);
}

.policy-toc-details summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
}

.policy-toc-details summary::-webkit-details-marker {
  display: none;
}

.policy-toc-details summary::after {
  content: "";
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.policy-toc-details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.policy-toc {
  margin: 0;
  padding: 0 0 0.5rem;
}

.policy-toc ol {
  margin: 0;
  padding: 0 1rem 0.75rem;
  list-style: none;
  counter-reset: policy-toc;
}

.policy-toc li {
  margin: 0;
  counter-increment: policy-toc;
}

.policy-toc a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-decoration: none;
}

.policy-toc a::before {
  content: counter(policy-toc) ".";
  flex: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.policy-toc a:hover,
.policy-toc a:focus-visible {
  color: var(--ink);
}

.policy-body {
  margin-top: 0;
  min-width: 0;
}

.policy-body section {
  margin-bottom: 2rem;
}

.policy-body h2 {
  margin: 0 0 0.75rem;
  scroll-margin-top: calc(1.25rem + var(--safe-top));
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.policy-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.policy-body p,
.policy-body li {
  color: var(--text-muted);
}

.policy-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.policy-body li {
  margin-bottom: 0.375rem;
}

.policy-body li:last-child {
  margin-bottom: 0;
}

.policy-body strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.policy-body table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.policy-body th,
.policy-body td {
  padding: 0.625rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(61, 110, 140, 0.15);
}

.policy-body th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(61, 110, 140, 0.06);
}

.policy-body tr:last-child th,
.policy-body tr:last-child td {
  border-bottom: none;
}

.shell-policy .foot {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (min-width: 768px) {
  .policy-toc-details {
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .policy-toc-details summary {
    display: none;
  }

  .policy-toc-details .policy-toc {
    display: block;
  }

  .policy-toc-wrap {
    position: sticky;
    top: calc(1rem + var(--safe-top));
    align-self: start;
    max-height: calc(100dvh - 2rem - var(--safe-top));
    overflow-y: auto;
  }

  .policy-toc ol {
    padding: 0;
  }
}

@media (min-width: 1024px) {
  .policy-layout {
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift-a {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-48%) translateY(1.5rem); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1rem, -1.25rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .glow-a {
    animation: drift-a 14s ease-in-out infinite;
  }

  .glow-b {
    animation: drift-b 18s ease-in-out infinite;
  }
}

@media (min-width: 768px) {
  .shell {
    padding-top: calc(3.5rem + var(--safe-top));
  }

  .lede {
    font-size: 1.0625rem;
  }

  .book-page {
    height: 17rem;
  }

  .book-page--left {
    width: 5.5rem;
  }

  .book-page--right {
    width: 14rem;
  }
}

@media (max-width: 380px) {
  .book-page {
    height: 12rem;
  }

  .book-page--left {
    width: 3.5rem;
  }

  .book-page--right {
    width: 9rem;
    padding: 1rem 0.75rem;
    gap: 0.65rem;
  }
}
