 :root {
    /* Matches app/src/main/java/com/goalingo/ui/theme/Color.kt.
       Roles: background, onBackground, onSurfaceVariant, primary,
       surfaceContainerHigh, outlineVariant, and surfaceContainerLow. */
    color-scheme: light;
    --paper: #fbfcff;
    --ink: #1a1c1e;
    --muted: #44474e;
    --blue: #2e6bd9;
    --blue-dark: #2e6bd9;
    --wash: #e9ebf0;
    --line: #e1e3e8;
    --surface: #f5f6fa;
    --orbit-line: #74777f;
    --benefit-line: #e1e3e8;
    --warning-bg: #ffdcc5;
    --warning-line: #8b5e3c;
    --button-bg: #2e6bd9;
    --button-text: #ffffff;
    --button-hover: #2e6bd9;
    --selection-bg: #d7e3ff;
    --selection-text: #001b3f;
    --deep-ink: #2a2c31;
    --download-text: #f1f0f4;
    --download-button: #d5e8da;
    --download-button-text: #0c2418;
    --download-button-hover: #b9ccbf;
    --phone-border: #74777f;
    --phone-shadow: #00000033;
    --max-width: 1180px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121317;
    --ink: #e3e2e6;
    --muted: #c4c6d0;
    --blue: #afc6ff;
    --blue-dark: #afc6ff;
    --wash: #202227;
    --line: #2f3138;
    --surface: #15171b;
    --orbit-line: #8e9099;
    --benefit-line: #2f3138;
    --warning-bg: #643d24;
    --warning-line: #f2b893;
    --button-bg: #afc6ff;
    --button-text: #002e6a;
    --button-hover: #afc6ff;
    --selection-bg: #00429a;
    --selection-text: #d7e3ff;
    --download-text: #e3e2e6;
    --download-button: #b9ccbf;
    --download-button-text: #203528;
    --download-button-hover: #d5e8da;
    --phone-border: #8e9099;
    --phone-shadow: #00000066;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.65; }
a { color: inherit; text-underline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-weight: 650; }
h1 { font-size: clamp(44px, 4.8vw, 66px); letter-spacing: -.055em; line-height: 1.07; max-width: 660px; }
h2 { font-size: clamp(32px, 3.5vw, 46px); letter-spacing: -.045em; line-height: 1.15; }
h3 { font-size: 22px; letter-spacing: -.025em; line-height: 1.3; }
::selection { background: var(--selection-bg); color: var(--selection-text); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }
.container { width: min(var(--max-width), calc(100% - 96px)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 10; left: 16px; top: -100px; padding: 12px 20px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.site-header { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px 24px; padding-block: 24px 16px; }
.site-header > .brand { grid-column: 1; grid-row: 1; }
.header-actions { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.language-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.language-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 4px 8px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.language-nav a[aria-current="page"] { background: var(--wash); color: var(--blue); font-weight: 700; }
.language-nav a:hover { text-decoration: underline; }
.theme-control { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.theme-control[hidden] { display: none; }
.theme-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.theme-switch-track { position: relative; display: block; width: 52px; height: 30px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash); }
.theme-switch-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-dark); }
.theme-switch[aria-checked="true"] .theme-switch-track { background: var(--button-bg); }
.theme-switch[aria-checked="true"] .theme-switch-thumb { left: 25px; background: var(--button-text); }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-size: 25px; font-weight: 700; letter-spacing: -.05em; }
.brand img { border-radius: 10px; }
.main-nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 15px; }
.main-nav a:hover, .site-footer nav a:hover { color: var(--blue); text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-radius: 12px; padding: 14px 24px; background: var(--button-bg); color: var(--button-text); text-decoration: none; font-size: 16px; font-weight: 600; transition: background .18s ease; }
.button:hover { background: var(--button-hover); }
.button-small { min-height: 44px; padding: 11px 18px; font-size: 14px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 44px; padding-block: 48px 84px; }
.hero-copy, .practice-copy, .faq-layout > div { min-width: 0; }
h1, h2, h3 { overflow-wrap: break-word; }
.availability { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 24px; color: var(--muted); }
.availability > span { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.hero-description { color: var(--muted); max-width: 475px; font-size: 18px; margin-top: 26px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 32px; }
.play-button { min-height: 66px; padding: 12px 25px; text-align: left; }
.play-button > span { font-size: 21px; line-height: 1.15; }
.play-button small { display: block; font-size: 11px; font-weight: 500; margin-bottom: 4px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.text-link:hover { color: var(--blue); }
.hero-note { margin-top: 18px; font-size: 12px; color: var(--muted); }
.hero-visual { position: relative; min-height: 630px; display: grid; grid-template-rows: 1fr auto; gap: 28px; place-items: center; isolation: isolate; }
.story-orbit { position: absolute; z-index: -1; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--wash); }
.story-orbit::after { content: ""; position: absolute; inset: -18px; border: 1px dashed var(--orbit-line); border-radius: 50%; }
.phone { padding: 7px; background: var(--deep-ink); border: 1px solid var(--phone-border); border-radius: 35px; box-shadow: 0 24px 45px -18px var(--phone-shadow); overflow: hidden; }
.phone img { border-radius: 28px; width: 100%; }
.hero-phone { grid-row: 1; width: 264px; margin-block: 20px; transform: rotate(7deg); }
.story-label { position: absolute; z-index: 1; background: var(--surface); padding: 8px 17px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.label-movies { top: 92px; left: 0; transform: rotate(-9deg); }
.label-books { right: -8px; bottom: 140px; transform: rotate(6deg); }
.visual-caption { grid-row: 2; justify-self: start; font-size: 15px; line-height: 1.4; }
.visual-caption > span { font-size: 29px; display: block; color: var(--blue); margin-bottom: 6px; }
.story-strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-content { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-block: 28px; }
.strip-content p { font-size: 14px; color: var(--muted); }
.strip-content strong { color: var(--ink); font-weight: 600; }
.strip-content ul { display: flex; flex-wrap: wrap; gap: 12px 30px; list-style: none; padding: 0; margin: 0; font-size: 17px; font-weight: 600; }
.strip-content li::before { content: "✦"; margin-right: 12px; color: var(--blue); font-size: 14px; }
.section { padding-block: 92px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 48px; margin-bottom: 46px; }
.section-heading > p { max-width: 360px; color: var(--muted); }
.workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; padding: 0; margin: 0; list-style: none; }
.workflow li { border-top: 1px solid var(--line); padding-top: 22px; }
.step-number { display: inline-block; color: var(--blue); margin-bottom: 18px; font-size: 15px; font-weight: 600; }
.workflow p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.practice-section { background: var(--wash); }
.practice-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 86px; padding-block: 72px; }
.practice-visual { display: grid; place-items: center; position: relative; }
.practice-visual::before { content: ""; position: absolute; width: 88%; aspect-ratio: 1; background: var(--paper); border-radius: 50%; }
.practice-phone { position: relative; width: 256px; transform: rotate(-5deg); }
.practice-copy > p { margin-top: 22px; color: var(--muted); }
.benefits { margin-block: 28px; }
.benefits > div { border-top: 1px solid var(--benefit-line); padding-block: 18px; }
.benefits dt { font-size: 18px; font-weight: 650; }
.benefits dd { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.gallery-hint { color: var(--muted); font-size: 14px; margin-top: -22px; margin-bottom: 26px; }
.screenshot-gallery { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x proximity; padding: 8px 6px 24px; scrollbar-color: var(--blue) var(--wash); }
.screenshot { flex: 0 0 236px; scroll-snap-align: start; }
.screenshot a { display: block; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.screenshot a:hover { border-color: var(--blue); }
.screenshot img { border-radius: 19px; }
.screenshot figcaption { padding: 18px 3px 0; }
.screenshot strong { display: block; font-size: 17px; }
.screenshot figcaption span { display: block; color: var(--muted); font-size: 14px; margin-top: 5px; }
.faq-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 80px; border-top: 1px solid var(--line); padding-top: 70px; }
.faq-layout > div > p { margin-top: 22px; color: var(--muted); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 22px 30px 22px 0; font-weight: 600; position: relative; list-style: none; font-size: 17px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 3px; color: var(--blue); font-size: 23px; top: 16px; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--muted); padding: 0 24px 22px 0; font-size: 15px; }
.download-section { background: var(--deep-ink); color: var(--download-text); text-align: center; border: 1px solid var(--line); border-radius: 28px; padding: 56px 24px 60px; }
.download-section > img { margin: 0 auto 22px; border-radius: 14px; }
.download-section > p { color: var(--download-text); margin: 20px 0 28px; }
.download-section .button { background: var(--download-button); color: var(--download-button-text); }
.download-section .button:hover { background: var(--download-button-hover); }
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 30px; padding-block: 56px 32px; }
.site-footer .brand { font-size: 22px; }
.site-footer > div > p, .copyright { font-size: 13px; color: var(--muted); margin-top: 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 12px 24px; }
.site-footer nav a { text-decoration: none; font-size: 13px; }
.copyright { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; }
@media (max-width: 1050px) {
    .container { width: calc(100% - 64px); }
    .site-header { flex-wrap: wrap; padding-block: 20px; }
    .main-nav { order: 3; width: 100%; justify-content: center; }
    .main-nav { gap: 18px; }
    .hero { gap: 28px; }
    .hero-visual { min-height: 590px; }
    .hero-phone { width: 234px; }
    .label-books { right: 0; bottom: 120px; }
    .strip-content { align-items: start; }
    .strip-content ul { max-width: 390px; gap: 12px 24px; }
    .practice-layout { gap: 48px; }
    .workflow { gap: 24px; }
}
@media (max-width: 760px) {
    .container { width: calc(100% - 40px); }
    .site-header { flex-wrap: wrap; gap: 16px; padding-block: 20px; min-height: 0; }
    .brand { font-size: 23px; }
    .main-nav { order: 3; width: 100%; justify-content: center; gap: 30px; padding-top: 12px; border-top: 1px solid var(--line); }
    .button-small { padding: 10px 13px; font-size: 12px; }
    .header-actions { width: 100%; justify-content: space-between; gap: 12px; }
    .hero { grid-template-columns: 1fr; padding-block: 36px 45px; gap: 30px; }
    h1 { max-width: 600px; font-size: clamp(42px, 8vw, 58px); }
    .availability { margin-bottom: 18px; font-size: 13px; }
    .hero-description { max-width: 550px; font-size: 17px; margin-top: 22px; }
    .hero-visual { width: min(420px, 100%); margin-inline: auto; min-height: 590px; }
    .hero-phone { width: 236px; }
    .label-movies { top: 85px; }
    .label-books { bottom: 120px; }
    .visual-caption { bottom: 7px; }
    .strip-content { flex-direction: column; gap: 20px; }
    .strip-content ul { max-width: none; font-size: 15px; }
    .section { padding-block: 60px; }
    .section-heading { flex-direction: column; align-items: start; gap: 22px; margin-bottom: 34px; }
    .section-heading > p { max-width: 550px; }
    .workflow { grid-template-columns: 1fr; gap: 26px; }
    .workflow li { padding-left: 46px; position: relative; padding-top: 20px; }
    .step-number { position: absolute; left: 0; top: 22px; }
    .workflow p { margin-top: 10px; max-width: 550px; }
    .practice-layout { grid-template-columns: 1fr; gap: 42px; padding-block: 55px; }
    .practice-copy { order: -1; }
    .practice-visual { max-width: 450px; width: 100%; margin-inline: auto; }
    .practice-phone { width: 230px; }
    .gallery-hint { margin-top: -8px; }
    .screenshot { flex-basis: 220px; }
    .faq-layout { grid-template-columns: 1fr; gap: 30px; }
    .download-section { border-radius: 22px; padding: 42px 22px; }
    .download-section > p { font-size: 16px; }
    .site-footer { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
    .site-footer nav { justify-content: start; }
}
/* Long-form support and legal pages share the landing page's visual system. */
.help-languages { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 18px 20px 0; font-size: 14px; }
.help-languages a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.document-page .wrap { width: min(900px, calc(100% - 96px)); margin-inline: auto; padding-block: 42px 32px; overflow-wrap: anywhere; }
.document-page .hero { display: block; padding: 0 0 44px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.document-page .eyebrow { display: inline-block; color: var(--blue); font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.document-page h1 { max-width: 850px; font-size: clamp(38px, 4.8vw, 60px); }
.document-page .subtitle { max-width: 720px; color: var(--muted); font-size: 18px; margin-top: 22px; }
.document-page .card { padding-block: 30px; border-bottom: 1px solid var(--line); }
.document-page .card h2 { font-size: clamp(25px, 3vw, 32px); margin-bottom: 20px; letter-spacing: -.035em; }
.document-page .card h3 { font-size: 21px; margin-block: 28px 12px; }
.document-page .card p { margin-bottom: 16px; }
.document-page .card > :last-child { margin-bottom: 0; }
.document-page .card ul, .document-page .card ol { margin-block: 16px; padding-left: 24px; }
.document-page .card li { margin-block: 9px; padding-left: 4px; }
.document-page .card li::marker { color: var(--blue); }
.document-page .muted { color: var(--muted); }
.document-page .toc { padding: 28px; background: var(--wash); border: 1px solid var(--line); border-radius: 20px; margin-bottom: 20px; }
.document-page .toc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.document-page .toc a { display: block; color: var(--ink); padding: 10px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; }
.document-page .toc a:hover { background: var(--paper); color: var(--blue-dark); }
.document-page .callout, .document-page .callout-warning { padding: 18px 22px; margin-top: 22px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--wash); }
.document-page .callout-warning { background: var(--warning-bg); border-left-color: var(--warning-line); }
.document-page .pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.document-page .pill { border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 14px; color: var(--blue-dark); background: var(--surface); }
.document-page .highlight { background: var(--wash); color: var(--blue-dark); border-radius: 6px; padding: 3px 8px; font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.document-page .faq-item { padding-block: 22px; border-top: 1px solid var(--line); }
.document-page .faq-item:first-of-type { border-top: 0; }
.document-page .faq-item h3 { margin-top: 0; }
.document-page .footer { margin-top: 30px; color: var(--muted); font-size: 13px; }
.document-page .main-nav a[aria-current="page"], .document-page .site-footer nav a[aria-current="page"] { color: var(--blue-dark); text-decoration: underline; }
.document-page .site-footer { border-top: 1px solid var(--line); margin-top: 32px; }
@media (max-width: 1050px) {
    .document-page .wrap { width: min(900px, calc(100% - 64px)); }
}
@media (max-width: 760px) {
    .document-page .wrap { width: calc(100% - 40px); padding-top: 32px; }
    .document-page .hero { padding-bottom: 30px; margin-bottom: 24px; }
    .document-page .subtitle { font-size: 17px; }
    .document-page .card { padding-block: 24px; }
    .document-page .toc { padding: 22px 16px; }
    .document-page .toc-grid { grid-template-columns: 1fr; gap: 6px; }
    .document-page .callout, .document-page .callout-warning { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .button { transition: none; }
}

/* Keep brand, language selector and theme controls aligned at every locale's text length. */
@media (max-width: 760px) {
    .site-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 8px; }
    .site-header > .brand { grid-column: 1; grid-row: 1; justify-self: start; }
    .site-header > .brand { font-size: 18px; gap: 6px; white-space: nowrap; }
    .site-header > .brand img { width: 28px; height: 28px; }
    .site-header .header-actions { display: contents; }
    .site-header .language-nav { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 0; }
    .site-header .language-nav a { min-width: 32px; padding-inline: 4px; font-size: 12px; }
    .site-header .theme-control { grid-column: 3; grid-row: 1; }
    .site-header .theme-switch { position: relative; width: 44px; padding-inline: 0; justify-content: center; }
    .site-header .theme-switch > span:first-child,
    .site-header .theme-switch > span:last-child { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); display: block; width: 12px; font-size: 12px; line-height: 1; text-align: center; pointer-events: none; }
    .site-header .theme-switch > span:first-child { left: 8px; color: var(--button-text); }
    .site-header .theme-switch > span:last-child { right: 8px; color: var(--ink); }
    .site-header .theme-switch[aria-checked="true"] > span:last-child { color: var(--button-bg); }
    .site-header .theme-switch-track { width: 40px; }
    .site-header .theme-switch-thumb { width: 18px; }
    .site-header .theme-switch[aria-checked="true"] .theme-switch-thumb { left: 19px; }
    .site-header .main-nav { grid-column: 1 / -1; grid-row: 3; gap: 8px 16px; margin-top: 0; padding-top: 12px; }
    .site-header .header-actions .button { grid-column: 1 / -1; grid-row: 2; text-align: center; }
    .hero-actions { align-items: flex-start; }
    .hero-actions .text-link { min-height: 44px; }
}