/*
  horizon4 — secondary page shell (privacy, terms, 404).

  Loaded after main.css. main.css is a pre-built, purged Tailwind v4 bundle that
  only contains the template's utilities, so this file uses its own small set of
  h4-* component classes instead of relying on utilities that were never
  generated. It reuses main.css's design tokens (colors, type scale, font) and
  its .main-container, so these pages stay in step with the homepage.

  External and same-origin on purpose: the production CSP allows style-src
  'self', and pins every inline <style> block by hash. Keep styling here, never
  in inline <style> blocks or style="" attributes.
*/

:root {
  --h4-ink: var(--color-secondary, #1a1a1c);
  --h4-ink-80: rgba(26, 26, 28, .80);
  --h4-ink-72: rgba(26, 26, 28, .72);
  --h4-ink-60: rgba(26, 26, 28, .60);
  --h4-ink-45: rgba(26, 26, 28, .45);
  --h4-canvas: var(--color-background-13, #f2f5fa);
  --h4-chip: var(--color-background-3, #f4f5f8);
  --h4-line: var(--color-stroke-1, #dfe4eb);
  --h4-line-soft: var(--color-stroke-2, #e3e7ed);
  --h4-line-strong: var(--color-stroke-3, #d7dde5);
  --h4-panel: rgba(255, 255, 255, .94);
  --h4-shadow: 0 30px 80px rgba(15, 23, 42, .12);
  --h4-shadow-soft: 0 18px 48px rgba(15, 23, 42, .08);
  --h4-radius-xl: 28px;
  --h4-radius-lg: 22px;
  --h4-focus: 0 0 0 3px rgba(26, 26, 28, .18);
}

/* ---------- page frame ---------- */

.h4-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--h4-canvas);
  background-image:
    radial-gradient(1100px 520px at 50% -140px, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(900px 480px at 100% 0%, rgba(203, 213, 225, .35) 0%, rgba(203, 213, 225, 0) 70%),
    radial-gradient(800px 460px at 0% 8%, rgba(226, 232, 240, .55) 0%, rgba(226, 232, 240, 0) 70%);
  background-repeat: no-repeat;
  color: var(--h4-ink);
}

.h4-page > main {
  flex: 1 0 auto;
}

.h4-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: .75rem 1.25rem;
  border-radius: 9999px;
  background: var(--h4-ink);
  color: #fff;
  font-size: var(--text-tagline-2);
  transition: top .15s ease;
}
.h4-skip:focus {
  top: 1rem;
}

.h4-page a:focus-visible,
.h4-page summary:focus-visible {
  outline: none;
  box-shadow: var(--h4-focus);
  border-radius: 9999px;
}

/* ---------- header (same pill as the homepage) ---------- */

.h4-header {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 1.5rem 1rem 0;
}
@media (min-width: 48rem) {
  .h4-header { padding-top: 3.75rem; }
}

.h4-header-bar {
  max-width: 900px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .625rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 9999px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  box-shadow: var(--h4-shadow);
}

.h4-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding-left: .625rem;
  padding-right: .75rem;
  border-radius: 9999px;
  color: var(--h4-ink);
}
.h4-brand-logo {
  width: 12rem;
  height: 2.375rem;
  flex-shrink: 0;
}

.h4-nav {
  display: none;
  align-items: center;
  gap: .5rem;
}
@media (min-width: 60rem) {
  .h4-nav { display: flex; }
}
.h4-nav a {
  white-space: nowrap;
  padding: .5rem 1rem;
  border-radius: 9999px;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  color: var(--h4-ink-72);
  transition: color .15s ease;
}
.h4-nav a:hover { color: var(--h4-ink); }

.h4-cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  padding: .75rem 1.25rem;
  border-radius: 9999px;
  background: var(--h4-ink);
  color: #fff;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  transition: background-color .15s ease;
}
.h4-cta:hover { background: #000; }
.h4-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}
.h4-cta-icon svg { width: 2rem; height: 1.3125rem; }

@media (max-width: 24rem) {
  .h4-header-bar { gap: .5rem; }
  .h4-brand { gap: .5rem; padding-right: .25rem; }
  .h4-brand-logo { width: 9.5rem; height: 1.875rem; }
  .h4-cta { padding: .5rem 1rem .5rem .5rem; }
}

/* ---------- shared bits ---------- */

.h4-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border: 1px solid var(--h4-line-strong);
  border-radius: 9999px;
  background: #fff;
  font-size: var(--text-tagline-3);
  line-height: var(--text-tagline-3--line-height);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--h4-ink-60);
}
.h4-eyebrow-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 9999px;
  background: var(--h4-ink);
}

.h4-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  white-space: nowrap;
  padding: .75rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.h4-button-dark {
  background: var(--h4-ink);
  color: #fff;
}
.h4-button-dark:hover { background: #000; }
.h4-button-line {
  border: 1px solid var(--h4-line);
  background: rgba(255, 255, 255, .7);
  color: var(--h4-ink);
}
.h4-button-line:hover { border-color: var(--h4-ink-45); background: #fff; }

/* ---------- legal page hero ---------- */

.h4-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
@media (min-width: 48rem) {
  .h4-hero { padding: 5.5rem 0 3.5rem; }
}

.h4-hero h1 {
  margin-top: 1.25rem;
  font-size: var(--text-heading-3);
  line-height: var(--text-heading-3--line-height);
  font-weight: 500;
  letter-spacing: -.01em;
}
@media (min-width: 48rem) {
  .h4-hero h1 {
    font-size: var(--text-heading-2);
    line-height: var(--text-heading-2--line-height);
  }
}

.h4-updated {
  margin-top: 1rem;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  color: var(--h4-ink-60);
}

.h4-doc-switch {
  display: inline-flex;
  margin-top: 2rem;
  padding: .3125rem;
  gap: .25rem;
  border: 1px solid var(--h4-line);
  border-radius: 9999px;
  background: rgba(255, 255, 255, .7);
}
.h4-doc-switch a {
  white-space: nowrap;
  padding: .5rem 1.125rem;
  border-radius: 9999px;
  font-size: var(--text-tagline-2);
  line-height: var(--text-tagline-2--line-height);
  color: var(--h4-ink-72);
  transition: color .15s ease, background-color .15s ease;
}
.h4-doc-switch a:hover { color: var(--h4-ink); }
.h4-doc-switch a[aria-current="page"] {
  background: var(--h4-ink);
  color: #fff;
}

/* ---------- legal page body ---------- */

.h4-legal {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 5rem;
}
@media (min-width: 64rem) {
  .h4-legal {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
    max-width: 1080px;
    margin-inline: auto;
    padding-bottom: 7.5rem;
  }
}

.h4-toc {
  display: none;
}
@media (min-width: 64rem) {
  .h4-toc {
    display: block;
    position: sticky;
    top: 2rem;
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--h4-line);
    border-radius: var(--h4-radius-lg);
    background: rgba(255, 255, 255, .7);
  }
}
.h4-toc-title {
  padding-inline: .5rem;
  font-size: var(--text-tagline-3);
  line-height: var(--text-tagline-3--line-height);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--h4-ink-45);
}
.h4-toc ol {
  margin-top: .75rem;
  display: grid;
  gap: .125rem;
  list-style: none;
  padding: 0;
}
.h4-toc a {
  display: block;
  padding: .375rem .5rem;
  border-radius: .75rem;
  font-size: var(--text-tagline-2);
  line-height: 1.4;
  color: var(--h4-ink-60);
  transition: color .15s ease, background-color .15s ease;
}
.h4-toc a:hover {
  color: var(--h4-ink);
  background: var(--h4-chip);
}
.h4-toc a:focus-visible { border-radius: .75rem; }

.h4-doc {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--h4-line);
  border-radius: var(--h4-radius-xl);
  background: var(--h4-panel);
  box-shadow: var(--h4-shadow-soft);
}
@media (min-width: 48rem) {
  .h4-doc { padding: 3rem 3.5rem; }
}

.h4-doc section {
  scroll-margin-top: 2rem;
}
.h4-doc section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--h4-line-soft);
}

.h4-doc h2 {
  font-size: var(--text-heading-6);
  line-height: var(--text-heading-6--line-height);
  font-weight: 500;
  color: var(--h4-ink);
}
.h4-doc p,
.h4-doc ul {
  max-width: 68ch;
  margin-top: .875rem;
  font-size: var(--text-tagline-1);
  line-height: 1.7;
  color: var(--h4-ink-80);
}
.h4-doc h2 + p { margin-top: .75rem; }
.h4-doc ul {
  padding-left: 1.25rem;
  list-style: disc;
}
.h4-doc li + li { margin-top: .375rem; }
.h4-doc li::marker { color: var(--h4-ink-45); }

.h4-doc a {
  color: var(--h4-ink);
  text-decoration: underline;
  text-decoration-color: var(--h4-ink-45);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color .15s ease;
}
.h4-doc a:hover { text-decoration-color: var(--h4-ink); }
.h4-doc a:focus-visible { border-radius: .25rem; }

.h4-doc-foot {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--h4-line-soft);
}
.h4-back {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  color: var(--h4-ink-72);
  transition: color .15s ease;
}
.h4-back:hover { color: var(--h4-ink); }

/* ---------- footer (homepage footer card, readable on the light canvas) ---------- */

.h4-footer {
  padding-bottom: 2.5rem;
}
.h4-footer-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--h4-line);
  border-radius: var(--h4-radius-xl);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--h4-shadow);
}
@media (min-width: 48rem) {
  .h4-footer-card { padding: 2.5rem; }
}
@media (min-width: 64rem) {
  .h4-footer-card {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.h4-footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.h4-footer-tagline {
  margin-top: 1rem;
  max-width: 620px;
  font-size: var(--text-tagline-1);
  line-height: var(--text-tagline-1--line-height);
  color: rgba(26, 26, 28, .65);
}
.h4-footer-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (min-width: 40rem) {
  .h4-footer-actions { flex-direction: row; }
}

.h4-footer-meta {
  padding-top: 2rem;
  text-align: center;
  font-size: var(--text-tagline-2);
  line-height: var(--text-tagline-2--line-height);
  color: var(--h4-ink-60);
}
.h4-footer-links {
  margin-top: .75rem;
}
.h4-footer-links a,
.h4-links a {
  color: var(--h4-ink-60);
  transition: color .15s ease;
}
.h4-footer-links a:hover,
.h4-links a:hover { color: var(--h4-ink); }
.h4-footer-links a[aria-current="page"] { color: var(--h4-ink); }
.h4-sep {
  padding-inline: .5rem;
  color: var(--h4-ink-45);
}

/* ---------- 404 ---------- */

.h4-notfound {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0 4rem;
}
@media (min-width: 48rem) {
  .h4-notfound { padding: 6rem 0 7rem; }
}
.h4-notfound-card {
  width: 100%;
  max-width: 560px;
  padding: 2.5rem 1.75rem;
  border: 1px solid var(--h4-line);
  border-radius: var(--h4-radius-xl);
  background: var(--h4-panel);
  box-shadow: var(--h4-shadow);
  text-align: center;
}
@media (min-width: 40rem) {
  .h4-notfound-card { padding: 3.5rem 3rem; }
}
.h4-code {
  margin-top: 1.5rem;
  font-size: 5.5rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.05em;
  color: rgba(26, 26, 28, .12);
}
@media (min-width: 40rem) {
  .h4-code { font-size: 7.5rem; }
}
.h4-notfound h1 {
  margin-top: 1.25rem;
  font-size: var(--text-heading-4);
  line-height: var(--text-heading-4--line-height);
  font-weight: 500;
}
.h4-notfound-text {
  margin: .875rem auto 0;
  max-width: 34ch;
  font-size: var(--text-tagline-1);
  line-height: 1.6;
  color: var(--h4-ink-72);
}
.h4-notfound-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}
.h4-links {
  margin-top: 1.75rem;
  font-size: var(--text-tagline-2);
  line-height: var(--text-tagline-2--line-height);
}

/* ---------- print (legal pages) ---------- */

@media print {
  .h4-page { background: #fff; }
  .h4-header,
  .h4-toc,
  .h4-doc-switch,
  .h4-doc-foot,
  .h4-footer,
  .h4-skip { display: none !important; }
  .h4-hero { padding: 0 0 1.5rem; text-align: left; }
  .h4-legal { display: block; padding: 0; }
  .h4-doc { padding: 0; border: 0; box-shadow: none; background: #fff; }
  .h4-doc p, .h4-doc ul { max-width: none; color: #000; }
}
