@font-face {
  font-family: Manrope;
  src: url('/fonts/manrope-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

/* App palette: core/ui/.../color/SparrowTalkColor.kt in the sibling app. */
:root {
  color-scheme: light dark;
  --background: #f5f6fa;
  --surface: #ffffff;
  --surface-variant: #eceff6;
  --text: #171922;
  --muted: #5e687b;
  --primary: #555ecf;
  --primary-soft: #e7e9ff;
  --accent: #555ecf;
  --border: #dee3ee;
  --stage: #1d1e25;
  --stage-text: #e9edf5;
  --stage-muted: #a4aec0;
  --stage-line: #393b47;
  --stage-accent: #999fff;
  --paper: #e7e9ff;
  --paper-ink: #272a45;
  --radius-sm: 8px;
  --radius-md: 16px;
  --shadow: 0 20px 60px rgb(31 22 66 / 14%);
  --shadow-product: 0 24px 48px rgb(0 0 0 / 25%);
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 7rem;
  --content-width: 1440px;
  --gutter: max(clamp(1.25rem, 5vw, 4rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --duration-fast: 180ms;
  --duration-state: 240ms;
  --duration-entrance: 650ms;
  --duration-hero: 1000ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1d1e25;
    --surface: #202128;
    --surface-variant: #24252d;
    --text: #e9edf5;
    --muted: #a4aec0;
    --primary: #858cff;
    --primary-soft: #272a45;
    --accent: #858cff;
    --border: #292b36;
    --shadow: 0 20px 60px rgb(0 0 0 / 28%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--muted) var(--background); scroll-padding-top: 7rem; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); font: 400 1rem/1.7 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: var(--primary); text-underline-offset: .25em; overflow-wrap: anywhere; }
::selection { color: var(--paper-ink); background: #e7e9ff; }
:where(a, button, summary, [tabindex]):focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
:where(h1, h2, h3, section[id], article[id], figure[id]) { scroll-margin-top: 1rem; }
h1, h2, h3 { margin: 0 0 1.25rem; font-weight: 650; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.75rem, 6vw, 5.5rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.5rem); }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
p, ul, ol { margin: 0 0 1.25rem; }
li + li { margin-top: .65rem; }
svg { flex-shrink: 0; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 100; padding: .8rem 1.25rem; color: var(--background); background: var(--text); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Shared navigation: the sole translucent surface keeps context while scrolling. */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 2rem; max-width: none; margin: 0; padding: .65rem var(--gutter); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--background) 94%, transparent); backdrop-filter: blur(16px); }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0; color: var(--text); font-size: 1.2rem; font-weight: 700; letter-spacing: -.04em; text-decoration: none; }
.brand img { width: 35px; height: 35px; border-radius: 10px; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.5rem; }
.site-header > nav { margin-inline-start: auto; }
nav a { color: var(--muted); font-weight: 550; font-size: .875rem; text-decoration: none; transition: color var(--duration-fast); }
.site-header nav a, .site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; column-gap: .3em; }
nav a:hover, nav a[aria-current='page'] { color: var(--text); }

.language-menu { position: relative; flex-shrink: 0; max-width: 100%; font-size: .875rem; }
.language-menu summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem .8rem; border-radius: var(--radius-sm); cursor: pointer; list-style: none; color: var(--text); transition: background var(--duration-fast); }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary::after { content: ''; width: 6px; height: 6px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--duration-fast); }
.language-menu[open] summary::after { transform: rotate(225deg); }
.language-menu summary:hover, .language-menu[open] summary { background: var(--surface-variant); }
.current-language { color: var(--muted); }
.language-menu ul { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + .5rem); z-index: 40; width: min(17rem, calc(100vw - 2.5rem)); max-height: min(var(--menu-available-height, 65vh), 28rem); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: .5rem; list-style: none; background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.language-menu.opens-upward ul { inset-block-start: auto; inset-block-end: calc(100% + .5rem); }
.language-menu li + li { margin-top: 0; }
.language-menu a { display: flex; align-items: center; min-height: 44px; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; transition: background var(--duration-fast); }
.language-menu a:hover, .language-menu a[aria-current='true'] { background: var(--primary-soft); }

.button, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 48px; font-weight: 650; font-size: .95rem; text-decoration: none; }
.button { padding: .85rem 1.4rem; background: var(--text); color: var(--background); border: 0; border-radius: var(--radius-sm); transition: background var(--duration-fast), transform var(--duration-fast), box-shadow var(--duration-state); }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(22 19 40 / 15%); }
.button:active { transform: translateY(0) scale(.98); }
.text-link { justify-content: flex-start; color: var(--primary); text-decoration-line: underline; text-decoration-color: transparent; transition: text-decoration-color var(--duration-fast), gap var(--duration-state); }
.text-link:hover { text-decoration-color: currentColor; gap: .9rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: var(--space-4); }

/* Read surfaces share the type system, with a quieter document measure. */
.page-shell { width: min(100%, 1060px); margin: 0 auto; padding: var(--space-6) var(--gutter) var(--space-7); }
.legal-page { max-width: 76ch; margin-inline: auto; }
.legal-page > h1 { max-width: 18ch; margin-bottom: 1.5rem; }
.legal-page > h2 { margin: 3.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: clamp(1.5rem, 2.5vw, 2rem); }
.legal-page > h3 { margin: 2rem 0 .7rem; }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-page strong { color: var(--text); }
.legal-page .legal-operator { margin: 4rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: .8rem; }
.page-intro { font-size: clamp(1.1rem, 2vw, 1.25rem); line-height: 1.8; max-width: 65ch; }
.eyebrow, .updated { color: var(--muted); font-size: .875rem; font-weight: 600; }
.eyebrow { display: none; }
.updated { margin-bottom: 2rem; }
.summary, .notice { margin: 2rem 0; padding: 1.5rem; background: var(--surface-variant); border-radius: var(--radius-sm); }
.summary { background: var(--primary-soft); }
.contents { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.5rem; padding: 1.5rem 0; margin: 2rem 0 3rem; border-block: 1px solid var(--border); }
.contents strong { grid-column: 1 / -1; margin-bottom: .5rem; }
.contents a { padding-block: .4rem; }
.support-page { max-width: none; }
.support-page > h1 { max-width: 12ch; }
.support-page > .page-intro { max-width: 58ch; }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; padding: clamp(1.5rem, 4vw, 3rem); margin: var(--space-5) 0 1.5rem; background: var(--paper); color: var(--paper-ink); border-radius: var(--radius-md); }
.contact-card h2 { font-size: clamp(1.1rem, 2.3vw, 1.8rem); letter-spacing: -.025em; overflow-wrap: anywhere; }
.contact-card p { color: #4e5f86; }
.contact-card .button { color: #fff; background: #272a45; text-align: center; }
.contact-card p:last-child { margin-bottom: 0; }
.help-grid, .path-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.help-grid section, .path-card { min-width: 0; padding: 2rem 0; border-top: 1px solid var(--border); }
.help-grid h3, .path-card h2 { margin-bottom: .75rem; font-size: 1.25rem; }
.path-card ol { padding-left: 1.25rem; }
.path-card .button { margin: .5rem 0 1.25rem; }
.link-list { padding: 0; list-style: none; }
.link-list li { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr); gap: 1.5rem; border-bottom: 1px solid var(--border); padding: 1.25rem 0; margin: 0; }
.link-list a { font-weight: 650; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.error-page { min-height: 70vh; display: grid; align-items: center; }
.error-page h1 { max-width: 10ch; }
.error-page .eyebrow { display: block; font-size: 5rem; color: var(--primary); font-weight: 750; line-height: 1; letter-spacing: -.04em; }

.site-footer { max-width: var(--content-width); margin: 0 auto; padding: 3rem var(--gutter) 2rem; border-top: 1px solid var(--border); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.site-footer p { color: var(--muted); font-size: .875rem; margin-bottom: 0; }
.footer-wordmark { overflow: hidden; font-size: clamp(3rem, 11vw, 9rem); font-weight: 650; letter-spacing: -.04em; line-height: 1.2; color: var(--text); opacity: .12; margin-top: 2rem; user-select: none; }

@media (max-width: 980px) {
  .site-header { gap: 1rem; }
  .site-header nav { gap: .75rem; }
  .current-language { display: none; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 9rem; }
  :where(h1, h2, h3, section[id], article[id], figure[id]) { scroll-margin-top: 1rem; }
  .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .5rem; padding-block: .65rem; }
  .brand { font-size: 1.2rem; gap: .55rem; }
  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .site-header > nav { grid-column: 1 / -1; grid-row: 2; margin: 0; gap: .25rem 1.25rem; }
  .site-header nav a { font-size: .8rem; min-height: 44px; }
  .site-header > .language-menu { grid-column: 2; grid-row: 1; }
  .language-menu summary { font-size: .8rem; padding-inline: .4rem; max-width: 125px; }
  .page-shell { padding-block: 3rem 5rem; }
  .contact-card, .help-grid, .path-grid, .contents { grid-template-columns: minmax(0, 1fr); }
  .link-list li { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .footer-top { align-items: flex-start; flex-direction: column; }
  .site-footer nav { column-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .button:active { transform: none; }
}
