@font-face {
  font-family: Manrope;
  src: url(/legal-assets/Manrope.ttf) format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: oklch(98.4% .003 100);
  --surface: #fff;
  --surface-subtle: #f0efea;
  --ink: oklch(25% .006 70);
  --muted: oklch(49% .01 70);
  --body-copy: #57544d;
  --accent: oklch(58% .19 29);
  --accent-ink: #ac3b2f;
  --line: rgb(42 37 30 / .12);
  --code-bg: #efeee9;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #191919;
  --surface: #222221;
  --surface-subtle: #222221;
  --ink: #f2f1ef;
  --muted: #a5a4a1;
  --body-copy: #b3b0a8;
  --accent: #ef5044;
  --accent-ink: #f2a498;
  --line: rgb(255 255 255 / .09);
  --code-bg: #2a2a28;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.75 Manrope, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; color: inherit; cursor: pointer; touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .nav-get {
  transition: background-color .18s, color .18s, border-color .18s, transform .18s var(--ease);
}
button:active:not(:disabled), .nav-get:active { transform: scale(.97); }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  background: var(--ink);
  color: var(--canvas);
  padding: 12px 20px;
  border-radius: 100px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1180px; width: calc(100% - 64px); margin-inline: auto; }

/* Shared marketing header */
.site-header {
  position: relative;
  z-index: 50;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.site-header .brand img { width: 54px; height: 42px; object-fit: contain; }
.site-header .brand > span {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
}
.site-icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.site-header .primary-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 5px;
  border-radius: 100px;
  font-size: 14px;
  color: #393833;
  background: linear-gradient(180deg, #ffffffc9, #efefec99);
  border: 1px solid #ffffffb3;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 #d6d5d040, 0 2px 3px #25201005, 0 8px 22px #25201006;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
html[data-theme="dark"] .site-header .primary-nav {
  color: #d2d0cc;
  background: linear-gradient(180deg, #ffffff12, #ffffff04);
  border-color: #ffffff16;
  box-shadow: inset 0 1px 0 #ffffff0c, inset 0 -1px 0 #0003, 0 5px 18px #0001;
}
.site-header .nav-link,
.site-header .nav-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 100px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: inherit;
  background: transparent;
}
.site-header .nav-trigger > .site-icon { width: 16px; height: 16px; color: #79776f; transition: transform .18s ease; }
html[data-theme="dark"] .site-header .nav-trigger > .site-icon { color: #a9a7a3; }
.site-header .nav-trigger[aria-expanded="true"] > .site-icon { transform: rotate(180deg); }
.nav-dropdown { position: relative; }

.site-header .nav-trigger[aria-expanded="true"],
.site-header .is-current > .nav-trigger {
  color: var(--ink);
  background: #26231c08;
  box-shadow: inset 0 1px 0 #ffffff80;
}
html[data-theme="dark"] .site-header .nav-trigger[aria-expanded="true"],
html[data-theme="dark"] .site-header .is-current > .nav-trigger {
  background: #ffffff0c;
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff09;
}

.nav-popover {
  position: absolute;
  top: calc(100% + 17px);
  left: -6px;
  width: 318px;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid #e0dfdb;
  background: #fffffff5;
  color: #252522;
  box-shadow: 0 16px 40px #28221918, 0 3px 8px #28221908, inset 0 1px 0 #fff;
  animation: nav-reveal .16s ease-out;
}
html[data-theme="dark"] .nav-popover {
  border-color: #d8d8d6;
  background: #fbfbfa;
  color: #252522;
  box-shadow: 0 16px 40px #0004, 0 3px 9px #0002, inset 0 1px 0 #fff;
}
.nav-popover::before { content: ''; position: absolute; left: 0; right: 0; height: 20px; top: -20px; }
.nav-popover-right { left: auto; right: -6px; }
.site-header .nav-popover-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 13px;
  border-radius: 15px;
  color: #252522;
}
.nav-item-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid #dadad7;
  border-radius: 13px;
  color: #e94e43;
  background: #fff;
  box-shadow: 0 2px 3px #00000008;
}
.nav-popover-link strong { display: block; font-size: 16px; font-weight: 650; line-height: 1.5; }
.nav-popover-link small { display: block; font-size: 12px; color: #74746e; margin-top: 2px; }

.theme-toggle,
.site-header .nav-get,
.site-header .mobile-nav-toggle {
  color: #36352f;
  background: linear-gradient(180deg, #fff9, #eae9e47a);
  border: 1px solid #ffffffb3;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #3830250c, 0 3px 12px #38302507;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .site-header .nav-get,
html[data-theme="dark"] .site-header .mobile-nav-toggle {
  color: #f2f1ef;
  background: linear-gradient(180deg, #ffffff18, #ffffff08);
  border-color: #ffffff1a;
  box-shadow: inset 0 1px 0 #ffffff16, inset 0 -1px 0 #0003, 0 4px 15px #0001;
}
.theme-toggle {
  display: grid;
  place-items: center;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
.theme-toggle .site-icon { grid-area: 1 / 1; width: 19px; height: 19px; }
.theme-toggle .theme-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
html[data-theme="dark"] .theme-toggle .theme-moon { display: none; }

.site-header .nav-get {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.site-header .nav-get img { width: 17px; height: 17px; filter: none; }
html[data-theme="dark"] .site-header .nav-get img { filter: invert(1); opacity: .85; }
.mobile-nav-toggle { display: none; }

@keyframes nav-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero matching /features and /changelog */
main { flex: 1; }
.content-hero {
  text-align: center;
  padding-block: 84px 72px;
  border-bottom: 1px solid var(--line);
}
.page-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--muted);
  margin: 0 0 22px;
}
.content-hero h1 {
  font-size: clamp(48px, 6.4vw, 80px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.055em;
  margin: 0 0 24px;
}
.content-hero h1 em {
  font-style: normal;
  color: var(--ink);
  position: relative;
}
.content-hero h1 em::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 0;
  bottom: -4px;
  height: 5px;
  background: var(--accent);
  border-radius: 80% 30% 70% 20%;
  transform: rotate(-2deg);
}
.content-hero .description {
  max-width: 640px;
  margin: 0 auto 22px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
}
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-subtle);
  box-shadow: inset 0 0 0 1px var(--line);
}
.updated time { color: var(--ink); font-weight: 600; }

/* Two-column legal layout (matches /features category sidebar + content) */
.legal-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 70px;
  padding-block: 60px 96px;
  align-items: start;
}
.feature-index {
  position: sticky;
  top: 32px;
  padding-top: 4px;
}
.toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.feature-index nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}
.feature-index nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0 9px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  transition: color .16s, border-color .16s;
}
.feature-index nav a span {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  opacity: .8;
  flex-shrink: 0;
}
.feature-index nav a[aria-current],
.feature-index nav a:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.feature-index nav a[aria-current] span {
  color: var(--accent);
  opacity: 1;
}
.legal-switch {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.legal-switch a { color: var(--muted); }
.legal-switch a[aria-current="page"] { color: var(--ink); }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #ef504466;
}

/* Legal article & summary card */
article { min-width: 0; }
.summary {
  padding: 28px 32px;
  margin: 0 0 48px;
  border-radius: 22px;
  background: var(--surface-subtle);
  box-shadow: inset 0 0 0 1px var(--line);
}
.summary-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.summary p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}

article section {
  padding-bottom: 38px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 32px;
}
article section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
article h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.035em;
  margin: 0 0 18px;
  color: var(--ink);
}
.section-number {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  flex: none;
}
article section p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--body-copy);
}
article section p:last-child { margin-bottom: 0; }
article a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #ef504455;
}
code {
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--code-bg);
  color: var(--ink);
  padding: 2px 7px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

/* Shared marketing footer */
footer.wrap {
  border-top: 1px solid var(--line);
  padding-block: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px 25px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
footer.wrap nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.wrap > span:nth-child(2) { color: var(--muted); opacity: .8; }
footer.wrap nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (hover: hover) {
  .site-header .nav-link:hover,
  .site-header .nav-trigger:hover { background: #26231c08; color: #191914; }
  html[data-theme="dark"] .site-header .nav-link:hover,
  html[data-theme="dark"] .site-header .nav-trigger:hover { color: #fff; background: #ffffff0c; }
  .site-header .nav-popover-link:hover { background: #eeedeb; color: #111; }
  .site-header .nav-get:hover,
  .theme-toggle:hover { background: #eae8dfb3; }
  html[data-theme="dark"] .site-header .nav-get:hover { background: linear-gradient(180deg, #ffffff24, #ffffff10); }
  html[data-theme="dark"] .theme-toggle:hover { background: #ffffff14; }
  article a:hover,
  .contact-link:hover,
  .legal-switch a:hover,
  footer.wrap a:hover { color: var(--accent-ink); }
}

@media (max-width: 1050px) {
  .site-header { gap: 15px; }
  .site-header .nav-link,
  .site-header .nav-trigger { padding-inline: 12px; }
  .legal-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 44px; }
}

@media (max-width: 900px) {
  .site-header { height: 88px; }
  .site-header .brand { margin-right: auto; }
  .site-header .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 100px;
    font-size: 0;
  }
  .mobile-nav-toggle .site-icon { width: 17px; height: 17px; }
  .site-header .primary-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    padding: 10px;
    border-radius: 22px;
    background: #fafaf8f5;
    box-shadow: 0 12px 30px #38302517, inset 0 1px 0 #fff, 0 0 0 1px #3830250c;
  }
  html[data-theme="dark"] .site-header .primary-nav {
    background: #252524f5;
    box-shadow: 0 16px 32px #0004, inset 0 1px 0 #ffffff12;
  }
  .site-header .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
  }
  .site-header .nav-link,
  .site-header .nav-trigger {
    display: flex;
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
    padding-inline: 16px;
    border-radius: 12px;
  }
  .nav-popover {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    margin: 5px 0 9px;
    box-shadow: none;
    border-radius: 17px;
    padding: 6px;
  }
  .nav-popover::before { display: none; }
  .site-header .nav-popover-link { display: flex; padding: 12px; }
  .site-header .nav-get { min-height: 44px; padding: 10px 14px; }
}

@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .content-hero { padding-block: 54px 48px; }
  .legal-layout { grid-template-columns: 1fr; gap: 36px; padding-block: 36px 72px; }
  .feature-index { position: static; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .feature-index nav { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; border-left: 0; }
  .feature-index nav a { border-left: 0; padding: 7px 0; margin-left: 0; }
  footer.wrap > span:nth-child(2) { display: none; }
}

@media (max-width: 680px) {
  .wrap { width: calc(100% - 36px); }
  .content-hero h1 { font-size: clamp(38px, 10.5vw, 54px); }
  .content-hero .description { font-size: 16px; }
  .summary { padding: 22px 24px; border-radius: 18px; margin-bottom: 36px; }
  article h2 { font-size: 21px; }
  article section { padding-bottom: 30px; margin-bottom: 30px; }
  footer.wrap { flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 26px; }
}

@media (max-width: 480px) {
  .feature-index nav { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .site-header { gap: 9px; height: 80px; }
  .site-header .nav-get { padding-inline: 13px; }
  .site-header .nav-get img { display: none; }
  .site-header .brand img { width: 48px; height: 38px; }
  .site-header .brand > span { font-size: 16px; }
  .header-actions { gap: 7px; }
}
@media (max-width: 360px) { .site-header .nav-get { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button:active:not(:disabled), .nav-get:active { transform: none; }
}
