/* Satoshi font from FontShare */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');
@import url('/brand-theme.css');

:root {
  --bg: var(--surface-primary);
  --card: var(--surface-primary);
  --border: var(--border-subtle);
  --border-hover: var(--border-default);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--brand-primary);
  --muted-bg: var(--surface-secondary);
  --max-width: 72rem;
  --nav-height: 4rem;
  --font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-full: 9999px;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 2.35rem) 1.5rem 4rem;
}

.page-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), var(--max-width));
  min-height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  background: var(--navbar-bg);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand .accent {
  display: inline;
  color: var(--brand-primary);
}

.header-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.header-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}

.header-links a:hover {
  color: var(--text);
  background: var(--muted-bg);
  border-color: var(--border);
}

.legal-hero {
  margin-bottom: 2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

h1 {
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}

.lead {
  overflow-wrap: anywhere;
  font-size: clamp(1.02rem, 1.9vw, 1.16rem);
  color: var(--muted);
  max-width: 50rem;
}

.updated {
  margin-top: 1.05rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.legal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}

.legal-card h2 {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.legal-card p {
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.legal-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 1rem 0 0.45rem;
}

.legal-card ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.legal-card li {
  margin-bottom: 0.45rem;
}

.callout {
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  color: var(--muted);
  margin-top: 0.7rem;
}

.related-intro {
  color: var(--muted);
  margin-bottom: 1rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.related-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: transparent;
}

.related-item:hover {
  background: var(--muted-bg);
  border-color: var(--border-hover);
}

.related-item-title {
  font-weight: 600;
  color: var(--text);
}

.related-item-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-footer {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.82rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--muted-bg);
  color: var(--text);
}

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

@media (max-width: 1024px) {
  .page {
    padding-top: calc(var(--nav-height) + 2.1rem);
  }

  .header-links a {
    padding-inline: 0.7rem;
  }
}

@media (max-width: 900px) {
  .page-header {
    width: calc(100% - 1.25rem);
    top: 0.6rem;
    min-height: 3.6rem;
    padding: 0.45rem 0.75rem;
  }

  .brand {
    font-size: 1.15rem;
  }

  .header-links {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    justify-content: flex-start;
    max-width: 64%;
    padding-bottom: 0.1rem;
  }

  .header-links::-webkit-scrollbar {
    display: none;
  }

  .legal-card {
    padding: 1.15rem 1.1rem;
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page {
    padding: calc(var(--nav-height) + 1.85rem) 0.95rem 3rem;
  }

  .page-header {
    border-radius: 1.1rem;
  }

  .header-links {
    max-width: 60%;
  }

  h1 {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  a,
  .related-item {
    transition: none;
  }
}
