/* Duskline — privacy / terms reading layout */
body.page-legal {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--section-x);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.legal-topbar .nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .legal-topbar { gap: 10px; }
}
.legal-main {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--section-x) clamp(48px, 8vw, 96px);
}
/* Legal pages: settings overlay must sit above sticky top bar; panel uses full settings grid */
body.page-legal .settings-overlay {
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
body.page-legal .settings-panel {
  width: min(100%, 1100px);
  max-height: min(90dvh, 900px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.page-legal .settings-grid {
  grid-template-columns: 1.3fr 1fr;
}
body.page-legal .settings-group-wide {
  grid-column: 1 / -1;
}
@media (max-width: 860px) {
  body.page-legal .settings-grid {
    grid-template-columns: 1fr;
  }
}
.legal-doc {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.legal-doc-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}
.legal-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 12px;
}
.legal-doc h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--text-main);
}
.legal-updated {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0 0 20px;
}
.legal-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-dim);
  margin: 0;
  max-width: 40em;
}
.legal-toc {
  margin: 0 0 40px;
  padding: 20px 22px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}
.legal-toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 12px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-toc a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
}
.legal-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section {
  margin-bottom: 36px;
  scroll-margin-top: 88px;
}
.legal-section h2 {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--text-main);
}
.legal-section p,
.legal-section li {
  color: var(--text-dim);
  margin: 0 0 12px;
}
.legal-section ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}
.legal-section li {
  margin-bottom: 8px;
}
.legal-section a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
}
.legal-section a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.legal-note {
  font-size: 13.5px;
  color: var(--text-mute) !important;
  font-style: italic;
}
.legal-doc-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}
.legal-doc-footer a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.legal-doc-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal-copy {
  font-size: 12px;
  color: var(--text-mute);
  margin: 12px 0 0;
}
.legal-site-footer {
  border-top: 1px solid var(--border-light);
  padding: 28px var(--section-x) 40px;
  background: var(--bg-base);
}
.legal-site-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}
.legal-footer-home {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.legal-footer-home:hover { color: var(--accent-1); }
.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}
.legal-footer-nav a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
}
.legal-footer-nav a:hover,
.legal-footer-nav a[aria-current="page"] {
  color: var(--accent-1);
}
/*
  Footer legal strip: plain text links (not buttons).
  Must NOT use bare `nav {}` fixed positioning (that pinned these to the top).
*/
.footer-legal-links {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: auto;
  list-style: none;
  border: 0;
  background: none;
  box-shadow: none;
  z-index: auto;
}
.footer-legal-links a {
  font-size: var(--fs-micro, 12px);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text-mute);
  text-decoration: none;
  line-height: 1.4;
  padding: 0 2px;
  border: 0;
  background: none;
  border-radius: 0;
  min-height: 0;
  box-shadow: none;
  transform: none;
}
.footer-legal-links a:hover {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  transform: none;
}
.footer-legal-sep {
  color: var(--text-mute);
  opacity: 0.5;
  font-size: var(--fs-micro, 12px);
  font-weight: 400;
  user-select: none;
  padding: 0 8px;
  line-height: 1;
}
html[data-theme="minimal"] .legal-doc h1,
html[data-theme="minimal"] .legal-section h2,
html[data-theme="glass"] .legal-doc h1,
html[data-theme="glass"] .legal-section h2 {
  font-style: normal;
  letter-spacing: -0.03em;
}

