/* Shared styling for the long-form legal pages (/privacy-policy, /terms-of-service).
   Tokens mirror index.html so the pages stay visually identical to the landing page.
   Kept separate because index.html locks the viewport (height:100%; overflow:hidden)
   and legal copy must scroll. */

:root {
  --bg: #fafaf8;
  --bg-elev: #ffffff;
  --bg-soft: #f4f2ee;
  --fg: #262220;
  --fg-soft: #4a4541;
  --fg-mute: #837c75;
  --line: #e8e3db;
  --line-soft: #efebe4;
  --coral: #e8735a;
  --coral-soft: #f08f79;
  --coral-tint: rgba(232, 115, 90, 0.08);
  --coral-tint-strong: rgba(232, 115, 90, 0.14);

  --shadow-sm:
    0 2px 4px rgba(38, 34, 32, 0.04), 0 1px 2px rgba(38, 34, 32, 0.03);
  --shadow-md:
    0 4px 12px rgba(38, 34, 32, 0.06), 0 2px 4px rgba(38, 34, 32, 0.04);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e1e;
    --bg-elev: #262624;
    --bg-soft: #2a2826;
    --fg: #e6e1db;
    --fg-soft: #bdb6ae;
    --fg-mute: #8a8278;
    --line: #3a3735;
    --line-soft: #2e2c2a;
    --coral-tint: rgba(232, 115, 90, 0.12);
    --coral-tint-strong: rgba(232, 115, 90, 0.2);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "ss03";
  /* Deliberately no height/overflow lock — these pages scroll. */
}

::selection {
  background: var(--coral-tint-strong);
  color: var(--fg);
}

/* Coral wash, matching the landing page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 40% at 50% 0%,
      var(--coral-tint),
      transparent 55%
    ),
    radial-gradient(
      ellipse 60% 50% at 100% 100%,
      var(--coral-tint),
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 40px 72px;
}

/* === NAV === */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 32px;
}
.logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
  text-decoration: none;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--coral);
  position: relative;
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-elev);
}
.nav-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mute);
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}
.nav-back:hover {
  color: var(--fg);
  border-color: var(--fg-mute);
}

/* === DOCUMENT === */
.doc-head {
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 14px;
}
.doc-meta {
  font-size: 14px;
  color: var(--fg-mute);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sep {
  opacity: 0.5;
}

/* All-caps notice line, e.g. the terms' "PLEASE READ ... CAREFULLY". */
.doc-notice {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--coral-tint);
  border: 1px solid var(--coral-tint-strong);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg-soft);
}

h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 40px 0 14px;
  /* Anchor links land clear of the heading rather than flush against it. */
  scroll-margin-top: 24px;
}

article p {
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.68;
  margin-bottom: 16px;
}
article strong {
  color: var(--fg);
  font-weight: 600;
}

article ul {
  margin: 0 0 16px 0;
  padding-left: 22px;
}
article li {
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.68;
  margin-bottom: 9px;
}
article li::marker {
  color: var(--coral);
}

article a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--coral-soft);
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
article a:hover {
  color: var(--coral);
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0 28px;
}

/* === TABLE (privacy policy, section 3) === */
/* Wrapper scrolls on narrow screens so the 3-column grid never breaks the layout. */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-elev);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-soft);
  line-height: 1.5;
}
th {
  background: var(--bg-soft);
  color: var(--fg);
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}

/* === ADDRESS === */
address {
  font-style: normal;
  color: var(--fg-soft);
  font-size: 15.5px;
  line-height: 1.68;
}

/* === FOOTER === */
footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-mute);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
footer a {
  color: var(--fg-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}
footer a:hover {
  color: var(--fg);
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .shell {
    padding: 22px 20px 56px;
  }
  h1 {
    font-size: 30px;
  }
  h2 {
    font-size: 18px;
    margin-top: 32px;
  }
  article p,
  article li {
    font-size: 15px;
  }
}
