:root {
  --ink: #111214;
  --muted: #66686d;
  --line: #e8e8e8;
  --paper: #fafafa;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; overflow-wrap: anywhere; }
button { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 30; padding: .7rem 1rem; border-radius: .5rem; color: white; background: var(--ink); }
.skip-link:focus { top: 1rem; }

.site-header,
.legal-site-footer {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 1.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.site-header { min-height: 5rem; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.wordmark-name { font-size: 1rem; font-weight: 750; letter-spacing: -.035em; text-transform: uppercase; }
.wordmark-label { padding-left: .85rem; border-left: 1px solid #cfd0d2; color: #77797e; font-size: .68rem; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; }
.site-header nav,
.legal-site-footer nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-header a,
.legal-site-footer a,
.legal-site-footer button { color: #55575c; font-size: .9rem; text-decoration: none; }
.site-header a:hover,
.legal-site-footer a:hover,
.legal-site-footer button:hover { color: var(--ink); }
.language-switcher { position: relative; }
.language-switcher summary { display: inline-flex; min-height: 2.35rem; align-items: center; gap: .42rem; padding: 0 .68rem; border: 1px solid #d9dade; border-radius: .62rem; color: #505257; background: var(--white); font-size: .76rem; font-weight: 700; letter-spacing: .04em; list-style: none; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary:hover, .language-switcher[open] summary { border-color: #bfc1c5; background: #f5f5f6; }
.language-switcher summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.language-icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.language-chevron { width: .72rem; height: .72rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transition: transform .15s; }
.language-switcher[open] .language-chevron { transform: rotate(180deg); }
.language-menu { position: absolute; z-index: 40; top: calc(100% + .55rem); right: 0; width: min(15rem, calc(100vw - 2rem)); max-height: min(25rem, 70vh); overflow-y: auto; padding: .5rem; border: 1px solid #dedfe2; border-radius: .85rem; background: var(--white); box-shadow: 0 18px 45px rgba(17,18,20,.16); }
.language-menu > p { margin: .35rem .5rem .45rem; color: #85878c; font-size: .66rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.language-options { display: grid; gap: .15rem; }
.site-header .language-options > a { display: grid; min-height: 2.65rem; grid-template-columns: 1fr auto auto; align-items: center; gap: .65rem; padding: .6rem .7rem; border-radius: .58rem; color: #3f4145; font-size: .86rem; text-decoration: none; }
.site-header .language-options > a:hover { color: var(--ink); background: #f2f2f3; }
.site-header .language-options > a[aria-current="page"] { color: var(--ink); background: #f2f2f3; font-weight: 650; }
.site-header .language-options > a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.language-option-code { color: #929499; font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
.language-check { width: 1rem; color: var(--ink); font-size: .8rem; text-align: center; }

.legal-main { width: min(100%, 72rem); margin: 0 auto; padding: 0 2rem 4rem; }
.legal-tools { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 2rem 0 1.25rem; }
.legal-back { color: var(--muted); font-size: .9rem; text-decoration: none; }
.legal-tabs { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.legal-tabs a { padding: .58rem .8rem; border-radius: .65rem; color: var(--muted); font-size: .84rem; text-decoration: none; }
.legal-tabs a:hover { color: var(--ink); background: #efeff0; }
.legal-tabs a[aria-current="page"] { color: white; background: var(--ink); }

.legal-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--white); box-shadow: 0 24px 70px rgba(0,0,0,.08); }
.legal-hero { padding: 3.5rem; border-bottom: 1px solid var(--line); }
.legal-kicker { margin: 0 0 .75rem; color: #7a7c81; font-size: .72rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.legal-hero h1 { max-width: 50rem; margin: 0; font-size: clamp(2.5rem, 6vw, 4.35rem); line-height: 1; letter-spacing: -.06em; }
.legal-intro { max-width: 42rem; margin: 1.15rem 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.legal-updated { margin: 1rem 0 0; color: #898b90; font-size: .8rem; }

.legal-content { width: min(100%, 50rem); padding: 1rem 3.5rem 3rem; }
.legal-section { min-width: 0; padding: 1.65rem 0; border-top: 1px solid var(--line); }
.legal-section:first-child { border-top: 0; }
.legal-section h2 { margin: 0 0 .7rem; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; letter-spacing: -.03em; }
.legal-section h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.legal-section p,
.legal-section li { color: #595b60; font-size: .95rem; line-height: 1.72; overflow-wrap: anywhere; }
.legal-section p { margin: 0 0 1rem; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul,
.legal-section ol { margin: .7rem 0 1rem; padding-left: 1.25rem; }
.legal-section img,
.legal-section svg,
.legal-section video { max-width: 100%; height: auto; }
.legal-section table,
.legal-section pre { display: block; max-width: 100%; overflow-x: auto; }
.legal-section .notice,
.legal-section .legal-note,
.legal-section .contact-card,
.legal-section .quick-card,
.legal-section.support-card,
.legal-section.contact-block,
.legal-section.privacy-choice { padding: 1.35rem; border-radius: .9rem; background: #f3f3f4; }
.legal-section .contact-grid,
.legal-section .support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.legal-section .support-card-wide { grid-column: 1 / -1; }
.legal-section .email-button,
.legal-section .support-cta,
.legal-section .button,
.legal-section button { display: inline-flex; max-width: 100%; margin-top: .35rem; padding: .8rem 1rem; border: 1px solid var(--ink); border-radius: .65rem; color: white; background: var(--ink); text-decoration: none; white-space: normal; }

.legal-site-footer { min-height: 8rem; border-top: 1px solid var(--line); color: #595b60; }
.legal-site-footer p { margin: 0; font-size: .88rem; }
.legal-site-footer button { padding: 0; border: 0; background: none; cursor: pointer; }

.consent-banner { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 20; width: min(100% - 2rem, 48rem); margin: 0 auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: white; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.consent-banner[hidden] { display: none; }
.consent-banner h2 { margin: .2rem 0 .4rem; font-size: 1.15rem; }
.consent-banner p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.consent-label { font-size: .7rem !important; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.consent-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.consent-actions button { padding: .65rem .85rem; border: 1px solid var(--line); border-radius: .55rem; background: white; cursor: pointer; }
.consent-actions .consent-primary { color: white; border-color: var(--ink); background: var(--ink); }

@media (max-width: 700px) {
  .site-header { padding: 1.25rem; }
  .wordmark { align-items: center; flex-direction: row; gap: .65rem; }
  .wordmark-name { font-size: .82rem; }
  .wordmark-label { padding-left: .65rem; font-size: .58rem; }
  /* Back-to-app plus the legal tabs already provide the useful phone navigation. */
  .site-header nav > a { display: none; }
  .language-switcher summary { min-height: 2.2rem; padding: 0 .58rem; }
  .legal-main { padding: 0 .5rem 2rem; }
  .legal-tools { align-items: flex-start; flex-direction: column; gap: .8rem; margin: 1.25rem .75rem 1rem; }
  .legal-shell { border-radius: 1.15rem; }
  .legal-hero { padding: 2.5rem 1.25rem; }
  .legal-content { padding: .75rem 1.25rem 2rem; }
  .legal-section .contact-grid,
  .legal-section .support-grid { grid-template-columns: 1fr; }
  .legal-section .support-card-wide { grid-column: auto; }
  .legal-site-footer { align-items: flex-start; flex-direction: column; padding: 2rem 1.25rem; }
}

@media (max-width: 420px) {
  .wordmark-label { display: none; }
  .legal-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .legal-tabs.has-health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-tabs a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; text-align: center; }
  .legal-hero h1 { font-size: clamp(2.15rem, 13vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
