:root {
  --sds-bg: #f5f5f7;
  --sds-card: rgba(255, 255, 255, 0.94);
  --sds-text: #1d1d1f;
  --sds-muted: #6e6e73;
  --sds-line: rgba(0, 0, 0, 0.09);
  --sds-dark: #111214;
  --sds-radius: 28px;
  --sds-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  color: var(--sds-text);
  background: var(--sds-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.legal-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 26px;
}

.legal-brand {
  color: var(--sds-text);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.legal-back {
  color: var(--sds-text);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--sds-line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}

.legal-hero {
  padding: 58px 0 30px;
  max-width: 820px;
}

.legal-kicker {
  margin: 0 0 12px;
  color: var(--sds-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -.055em;
}

.legal-lead {
  margin: 24px 0 0;
  color: var(--sds-muted);
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.5;
}

.legal-card {
  background: var(--sds-card);
  border: 1px solid var(--sds-line);
  border-radius: var(--sds-radius);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 8px 32px rgba(0,0,0,.04);
  margin-top: 22px;
}

.legal-card h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.035em;
}

.legal-card h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  letter-spacing: -.015em;
}

.legal-card p,
.legal-card li {
  color: #424245;
  font-size: 16px;
  line-height: 1.72;
}

.legal-card ul { padding-left: 22px; }
.legal-card a { color: #0066cc; }
.legal-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f0f3f7;
  color: #333336;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 34px 2px 0;
  color: var(--sds-muted);
  font-size: 13px;
}

.legal-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.legal-footer a { color: inherit; text-decoration: none; }

/* Consent UI */
html.sds-privacy-open,
html.sds-privacy-open body { overflow: hidden; }

.sds-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(15, 15, 17, .40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sds-consent {
  width: min(760px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.96);
  color: #1d1d1f;
  box-shadow: var(--sds-shadow);
  padding: 26px;
}

.sds-consent__eyebrow {
  color: #6e6e73;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}

.sds-consent h2 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.06;
  letter-spacing: -.045em;
}

.sds-consent > p {
  margin: 16px 0 0;
  color: #515154;
  line-height: 1.6;
}

.sds-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
}

.sds-consent__links a {
  color: #0066cc;
  font-size: 13px;
  text-decoration: none;
}

.sds-consent__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}

.sds-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sds-btn--primary { background: #111214; color: #fff; }
.sds-btn--secondary { background: #ececf0; color: #1d1d1f; }
.sds-btn:focus-visible,
.sds-privacy-manage:focus-visible,
.sds-setting-row input:focus-visible {
  outline: 3px solid rgba(0,102,204,.30);
  outline-offset: 3px;
}

.sds-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid rgba(0,0,0,.08);
}
.sds-setting-row:first-of-type { margin-top: 18px; }
.sds-setting-row p { margin: 5px 0 0; color: #6e6e73; font-size: 13px; line-height: 1.45; }
.sds-required { white-space: nowrap; color: #6e6e73; font-size: 12px; font-weight: 700; }
.sds-setting-row--toggle { cursor: pointer; }
.sds-setting-row--toggle input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: #111214; }

.sds-privacy-manage {
  position: fixed;
  z-index: 2147482000;
  left: 14px;
  bottom: 14px;
  appearance: none;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255,255,255,.88);
  color: #343438;
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font: 600 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

@media (max-width: 640px) {
  .legal-shell { width: min(100% - 22px, 1120px); padding-top: 18px; }
  .legal-hero { padding-top: 38px; }
  .legal-card { border-radius: 22px; }
  .sds-consent-backdrop { padding: 10px; }
  .sds-consent { padding: 21px; border-radius: 23px; }
  .sds-consent__actions { flex-direction: column-reverse; }
  .sds-btn { width: 100%; }
  .sds-setting-row { align-items: flex-start; }
  .sds-privacy-manage { left: 10px; bottom: 10px; }
}
