/*
 * Shared layout for the privacy and terms pages. The account deletion page uses delete.css.
 * Brand colours and the font come from brand/brand.css, loaded after this file.
 * Keep this file brand-neutral: no product names, no brand hex values.
 *
 * Phones: one reading column, section links as a sticky horizontal strip.
 * 960px and up: section links move into a sticky sidebar next to the text.
 * Sections are separated by hairlines; only .notice is a filled panel.
 * Works without JavaScript and without web fonts.
 */

:root {
  color-scheme: light;
  --bg: #fbfbfc;
  --paper: #ffffff;
  --text: #2c2c31;
  --muted: #6b6b73;
  --line: #e6e6ea;
  --brand: #333333;
  --brand-dark: #222222;
  --soft: #f1f1f4;
  --ink: #222222;
  --brand-rgb: 51, 51, 51;
  --ink-rgb: 34, 34, 34;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --measure: 68ch;
  --toc-h: 56px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(var(--brand-rgb), 0.08), rgba(var(--brand-rgb), 0) 440px),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(var(--brand-rgb), 0.18);
}

.shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
}

/* Header */

.hero {
  padding: 12px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(var(--ink-rgb), 0.06), 0 6px 16px rgba(var(--ink-rgb), 0.14);
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.meta {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.meta-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.meta-item strong {
  color: var(--muted);
  font-weight: 600;
}

/* Section links */

.toc {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  margin: 0 -20px;
  padding: 10px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  border-block: 1px solid var(--line);
  background: rgba(251, 251, 252, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.toc::-webkit-scrollbar {
  display: none;
}

.toc a {
  flex: none;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.toc a:hover {
  border-color: rgba(var(--brand-rgb), 0.5);
  color: var(--brand-dark);
}

/* Sections */

.card {
  padding: 32px 0 8px;
  scroll-margin-top: calc(var(--toc-h) + 8px);
}

.card + .card {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.notice {
  margin-top: 24px;
  padding: 22px 20px;
  border: 1px solid rgba(var(--brand-rgb), 0.16);
  border-radius: var(--radius);
  background: var(--soft);
}

.notice + .card {
  border-top: 0;
}

h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
ul {
  max-width: var(--measure);
  overflow-wrap: break-word;
}

p {
  margin: 0 0 12px;
}

ul {
  margin: 4px 0 12px;
  padding-left: 20px;
}

li {
  margin: 8px 0;
  padding-left: 4px;
}

li::marker {
  color: var(--brand);
}

.card > :last-child {
  margin-bottom: 0;
}

strong {
  color: var(--ink);
  font-weight: 700;
}

.checks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.checks svg {
  flex: none;
  margin-top: 5px;
}

a {
  color: var(--brand-dark);
  text-decoration-color: rgba(var(--brand-rgb), 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.address {
  font-style: normal;
}

.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin: 4px 0;
}

@media (min-width: 720px) {
  .shell {
    padding-inline: 32px;
  }

  .toc {
    margin-inline: -32px;
    padding-inline: 32px;
  }

  .meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .meta-item {
    display: block;
  }

  .meta-item strong {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
  }

  .notice {
    padding: 26px 28px;
  }
}

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    column-gap: 64px;
    padding: 40px 40px 64px;
  }

  .hero {
    grid-column: 1 / -1;
    padding: 0 0 48px;
  }

  .brand {
    margin-bottom: 48px;
  }

  /* The sidebar spans every row the sections use; empty extra rows collapse to 0. */
  .toc {
    grid-column: 1;
    grid-row: 2 / span 40;
    align-self: start;
    top: 32px;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-left: 1px solid var(--line);
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .toc a {
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
  }

  .toc a:hover {
    border-left-color: var(--brand);
    color: var(--ink);
  }

  .card,
  .footer {
    grid-column: 2;
  }

  .card {
    scroll-margin-top: 32px;
  }

  .notice {
    margin-top: 0;
  }
}

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

  .toc a {
    transition: none;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .shell {
    display: block;
    padding: 0;
  }

  .toc {
    display: none;
  }

  .notice {
    padding: 0;
    border: 0;
    background: none;
  }

  .card {
    break-inside: avoid;
  }
}
