/* ==========================================================================
   Meok Apps — shared design system
   Three pages share this sheet: the studio hub, Pitch Tactics, HexaWord.
   Each page sets a palette class on <body> (.t-studio / .t-pitch / .t-hex);
   only the accent tokens change, so the pages read as one site.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */

:root {
    color-scheme: light dark;

    --maxw: 68rem;
    --gutter: 1.5rem;

    /* Spacing and radii mirror the game's own design tokens, so the site and
       the app round their corners the same way. */
    --r-sm: 12px;
    --r-md: 20px;
    --r-lg: 26px;
    --r-pill: 999px;

    --bg: #F6F6F3;
    --bg-2: #EDEEEA;
    --surface: #FFFFFF;
    --surface-2: #F3F4F1;
    --ink: #14171A;
    --ink-2: #4C545B;
    --ink-3: #7B838B;
    --line: #E3E4E0;
    --line-strong: #D2D4CF;

    --shadow-sm: 0 1px 2px rgba(15, 20, 25, .05);
    --shadow-md: 0 1px 2px rgba(15, 20, 25, .05), 0 10px 28px -16px rgba(15, 20, 25, .3);
    --shadow-lg: 0 2px 4px rgba(15, 20, 25, .05), 0 26px 60px -28px rgba(15, 20, 25, .38);

    /* Overridden per page. */
    --accent: #8A6420;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(138, 100, 32, .1);
    --hero-glow: rgba(217, 172, 99, .3);

    /* No webfont is loaded: the privacy policy states that these pages fetch
       no external resources, and a font from a CDN would hand the visitor's IP
       to a third party on a page about not doing that. Headings are set apart
       by weight, size and tracking instead of by family. */
    --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark palette. Declared twice on purpose: once for the system preference,
   once for an explicit choice, so the toggle wins in both directions. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0C0E10;
        --bg-2: #101315;
        --surface: #16191C;
        --surface-2: #1D2124;
        --ink: #ECEFF1;
        --ink-2: #A7B0B7;
        --ink-3: #79828A;
        --line: #24282C;
        --line-strong: #313740;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -18px rgba(0, 0, 0, .8);
        --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 30px 70px -30px rgba(0, 0, 0, .9);
    }
}

:root[data-theme="dark"] {
    --bg: #0C0E10;
    --bg-2: #101315;
    --surface: #16191C;
    --surface-2: #1D2124;
    --ink: #ECEFF1;
    --ink-2: #A7B0B7;
    --ink-3: #79828A;
    --line: #24282C;
    --line-strong: #313740;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 30px -18px rgba(0, 0, 0, .8);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 30px 70px -30px rgba(0, 0, 0, .9);
}

/* --- per-page accents --------------------------------------------------- */

body.t-studio {
    --accent: #8A6420;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(138, 100, 32, .1);
    --hero-glow: rgba(184, 147, 78, .28);
}

body.t-pitch {
    --accent: #2E7D5B;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(46, 125, 91, .1);
    --hero-glow: rgba(46, 125, 91, .26);
}

body.t-hex {
    --accent: #A0700F;
    --accent-ink: #2A2114;
    --accent-soft: rgba(160, 112, 15, .12);
    --hero-glow: rgba(226, 177, 91, .34);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.t-studio {
        --accent: #D9AC63;
        --accent-ink: #1A1408;
        --accent-soft: rgba(217, 172, 99, .14);
        --hero-glow: rgba(184, 147, 78, .2);
    }

    :root:not([data-theme="light"]) body.t-pitch {
        --accent: #6FC79A;
        --accent-ink: #082115;
        --accent-soft: rgba(111, 199, 154, .13);
        --hero-glow: rgba(46, 125, 91, .24);
    }

    :root:not([data-theme="light"]) body.t-hex {
        --accent: #E2B15B;
        --accent-ink: #241F18;
        --accent-soft: rgba(226, 177, 91, .14);
        --hero-glow: rgba(226, 177, 91, .18);
    }
}

:root[data-theme="dark"] body.t-studio {
    --accent: #D9AC63;
    --accent-ink: #1A1408;
    --accent-soft: rgba(217, 172, 99, .14);
    --hero-glow: rgba(184, 147, 78, .2);
}

:root[data-theme="dark"] body.t-pitch {
    --accent: #6FC79A;
    --accent-ink: #082115;
    --accent-soft: rgba(111, 199, 154, .13);
    --hero-glow: rgba(46, 125, 91, .24);
}

:root[data-theme="dark"] body.t-hex {
    --accent: #E2B15B;
    --accent-ink: #241F18;
    --accent-soft: rgba(226, 177, 91, .14);
    --hero-glow: rgba(226, 177, 91, .18);
}

/* --- language switch ----------------------------------------------------
   Both languages sit in the markup and CSS hides the one not chosen, so the
   page is readable with JavaScript switched off. */

html[data-lang="en"] [lang="tr"] {
    display: none;
}

html[data-lang="tr"] [lang="en"] {
    display: none;
}

/* --- base --------------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.022em;
    line-height: 1.12;
    margin: 0;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.narrow {
    max-width: 46rem;
}

:where(a, button, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -120%);
    z-index: 60;
    padding: .6rem 1.1rem;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus-visible {
    transform: translate(-50%, 0);
}

/* --- header ------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    transition: border-color .2s ease, background .2s ease;
}

.site-header[data-stuck="true"] {
    border-bottom-color: var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -.01em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.brand svg {
    display: block;
    flex: none;
}

.brand small {
    color: var(--ink-3);
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-inline-start: auto;
}

.nav a {
    padding: .45rem .7rem;
    border-radius: var(--r-pill);
    color: var(--ink-2);
    font-size: .93rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s ease, background .15s ease;
}

.nav a:hover {
    color: var(--ink);
    background: var(--surface-2);
}

.nav a[aria-current="page"] {
    color: var(--ink);
    background: var(--accent-soft);
}

.controls {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-inline-start: .25rem;
}

.switch {
    display: flex;
    gap: .15rem;
    padding: .2rem;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
}

.switch button {
    border: 0;
    padding: .28rem .62rem;
    background: none;
    color: var(--ink-3);
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.switch button:hover {
    color: var(--ink);
}

.switch button[aria-pressed="true"] {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--ink-2);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.icon-btn:hover {
    color: var(--ink);
    border-color: var(--line-strong);
}

.icon-btn svg {
    display: block;
}

:root:not([data-theme="dark"]) .icon-moon {
    display: none;
}

:root[data-theme="dark"] .icon-sun {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun {
        display: none;
    }

    :root:not([data-theme="light"]) .icon-moon {
        display: block;
    }
}

/* --- buttons ------------------------------------------------------------ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .8rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.btn svg {
    flex: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--ink-3);
}

.btn-quiet {
    background: none;
    color: var(--ink-2);
    border-color: var(--line-strong);
    min-height: 2.6rem;
    padding: .55rem 1.1rem;
    font-size: .93rem;
}

.btn-quiet:hover {
    color: var(--ink);
    border-color: var(--ink-3);
}

.btn[aria-disabled="true"] {
    cursor: default;
    opacity: .95;
}

.btn[aria-disabled="true"]:hover {
    transform: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.btn-row.center {
    justify-content: center;
}

/* --- badges and chips --------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 1rem;
}

.eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: var(--line-strong);
}

.eyebrow.plain::before {
    display: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .34rem .8rem .34rem .62rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    background: var(--surface);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ink-2);
    white-space: nowrap;
}

.badge .dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.badge.live .dot {
    background: #35A06B;
    box-shadow: 0 0 0 3px rgba(53, 160, 107, .18);
}

.badge.soon .dot {
    background: #C08A45;
    box-shadow: 0 0 0 3px rgba(192, 138, 69, .18);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.chips li {
    padding: .4rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--surface-2);
    font-size: .88rem;
    color: var(--ink-2);
}

.chips li b {
    color: var(--ink);
    font-weight: 600;
}

/* --- sections ----------------------------------------------------------- */

section {
    padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
    max-width: 42rem;
    margin: 0 0 2.6rem;
}

.section-head.center {
    margin-inline: auto;
    text-align: center;
}

.section-head.center .eyebrow::before {
    display: none;
}

.section-head h2 {
    font-size: clamp(1.75rem, 4.2vw, 2.5rem);
}

.section-head p {
    margin: .9rem 0 0;
    color: var(--ink-2);
    font-size: 1.05rem;
}

.rule {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 0;
}

/* --- hero --------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
    background: var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto;
    height: 70%;
    background: radial-gradient(60% 60% at 50% 0%, var(--hero-glow), transparent 70%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .5;
    color: var(--line-strong);
    pointer-events: none;
    mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}

.hero .wrap {
    position: relative;
}

.hero-grid {
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
}

@media (min-width: 60rem) {
    .hero-grid {
        grid-template-columns: 1.05fr .95fr;
    }
}

.hero h1 {
    font-size: clamp(2.4rem, 6.4vw, 4rem);
    margin: 0 0 1.1rem;
}

.hero .lede {
    margin: 0;
    max-width: 34rem;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: var(--ink-2);
}

.hero .btn-row {
    margin-top: 2rem;
}

.hero-art {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(10, 15, 20, .22));
}

/* --- stats -------------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 1px;
    margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
    padding: 0;
    list-style: none;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}

.stats li {
    background: var(--surface);
    padding: 1.15rem 1.25rem;
}

.stats b {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.4vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stats span {
    display: block;
    margin-top: .2rem;
    font-size: .87rem;
    line-height: 1.35;
    color: var(--ink-3);
}

/* --- cards -------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.1rem;
}

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.5rem 1.45rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.card h3 {
    margin: 1rem 0 .45rem;
    font-size: 1.1rem;
}

.card p {
    margin: 0;
    color: var(--ink-2);
    font-size: .96rem;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.card-icon svg {
    display: block;
}

/* --- steps -------------------------------------------------------------- */

.steps {
    counter-reset: step;
    display: grid;
    gap: 1rem;
    max-width: 46rem;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.25rem 1.4rem;
}

.steps li::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    flex: none;
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 600;
    color: var(--accent);
    padding-top: .12rem;
    font-variant-numeric: tabular-nums;
}

.steps h3 {
    font-size: 1rem;
    margin: 0 0 .25rem;
}

.steps p {
    margin: 0;
    color: var(--ink-2);
    font-size: .96rem;
}

/* --- plain list of facts ------------------------------------------------ */

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1px;
    padding: 0;
    margin: 0;
    list-style: none;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}

.facts li {
    background: var(--surface);
    padding: 1.2rem 1.3rem;
}

.facts b {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .2rem;
}

.facts span {
    color: var(--ink-2);
    font-size: .93rem;
}

/* --- footer ------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-2);
    padding: 3rem 0 3.5rem;
    font-size: .94rem;
    color: var(--ink-2);
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.footer-grid h3 {
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 0 0 .8rem;
    font-weight: 600;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .5rem;
}

.footer-grid a {
    color: var(--ink-2);
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
    font-size: .88rem;
}

/* --- legal pages --------------------------------------------------------
   The privacy policies. Long, plain, and read rather than skimmed, so the
   measure stays narrow and the headings stay quiet. */

.legal-page {
    padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}

.legal {
    max-width: 44rem;
    margin-inline: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1.6rem;
    color: var(--ink-3);
    font-size: .92rem;
    font-weight: 500;
    text-decoration: none;
}

.back-link:hover {
    color: var(--ink);
}

.legal h1 {
    font-size: clamp(1.8rem, 4.4vw, 2.5rem);
    margin: 0 0 1.3rem;
}

.legal-meta {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.1rem 1.3rem;
    margin-bottom: 2.2rem;
    font-size: .93rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.legal-meta p {
    margin: 0;
}

.legal-meta p+p {
    margin-top: .5rem;
}

.legal-meta strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-intro {
    margin-bottom: 2.4rem;
    font-size: 1.05rem;
}

.legal-intro p {
    margin: 0 0 1rem;
    color: var(--ink-2);
}

.legal-intro p:last-child {
    margin-bottom: 0;
}

.toc {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 1.3rem 1.5rem 1.4rem;
    margin-bottom: 2.6rem;
}

.toc h2 {
    margin: 0 0 .8rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.toc ol {
    columns: 2;
    column-gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .93rem;
}

.toc li {
    break-inside: avoid;
    margin-bottom: .35rem;
}

.toc a {
    color: var(--ink-2);
    text-decoration: none;
}

.toc a:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 34rem) {
    .toc ol {
        columns: 1;
    }
}

.legal h2 {
    font-size: 1.12rem;
    margin: 2.6rem 0 .75rem;
    scroll-margin-top: 6rem;
}

.legal h2:first-of-type {
    margin-top: 0;
}

.legal p {
    margin: 0 0 1.05rem;
    color: var(--ink-2);
}

/* The policies quote Android permission constants and package names —
   `com.google.android.gms.permission.AD_ID` is wider than a 320px screen and
   has nowhere to break on its own. Only over-long words are affected; ordinary
   prose wraps as before. */
.legal p,
.legal li,
.legal code {
    overflow-wrap: anywhere;
}

/* Cells get the gentler rule: `anywhere` also shrinks a column's min-content
   width, which collapsed the table and broke ordinary words down the middle
   ("Processin / g"). `break-word` only breaks a word that genuinely cannot
   fit. */
.legal th,
.legal td {
    overflow-wrap: break-word;
}

.legal h3 {
    font-size: 1rem;
    margin: 1.9rem 0 .6rem;
    scroll-margin-top: 6rem;
}

.legal ol {
    margin: 0 0 1.15rem;
    padding-inline-start: 1.45rem;
    color: var(--ink-2);
}

.legal ol li::marker {
    color: var(--ink-3);
}

/* Section rules from the source. The one that ends the lede would dangle
   above the contents box, so it is dropped. */
.legal hr.legal-rule {
    height: 1px;
    margin: 2.6rem 0 0;
    border: 0;
    background: var(--line);
}

.legal-intro hr.legal-rule:last-child {
    display: none;
}

.legal blockquote {
    margin: 0 0 1.2rem;
    padding: .9rem 1.15rem;
    border-inline-start: 3px solid var(--accent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    background: var(--surface-2);
}

.legal blockquote p {
    margin: 0;
    color: var(--ink-2);
}

/* Tables. The two-column fact tables shrink to fit; the wide ones with a
   header row keep a readable minimum and scroll inside their own box rather
   than pushing the page sideways. */
.table-wrap {
    overflow-x: auto;
    margin: 0 0 1.3rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
}

.legal table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.legal table:has(thead) {
    min-width: 30rem;
}

.legal th,
.legal td {
    padding: .7rem .9rem;
    text-align: start;
    vertical-align: top;
    border-block-end: 1px solid var(--line);
    color: var(--ink-2);
}

.legal thead th {
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
}

.legal tbody tr:last-child td {
    border-block-end: 0;
}

.legal ul {
    margin: 0 0 1.15rem;
    padding-inline-start: 1.2rem;
    color: var(--ink-2);
}

.legal li {
    margin-bottom: .45rem;
}

.legal li::marker {
    color: var(--ink-3);
}

.legal strong {
    color: var(--ink);
    font-weight: 600;
}

.legal code {
    padding: .1em .4em;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    font-size: .88em;
}

.legal .to-top {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: .92rem;
}

.legal .to-top a {
    color: var(--ink-3);
    text-decoration: none;
}

.legal .to-top a:hover {
    color: var(--ink);
}

/* --- scroll reveal ------------------------------------------------------ */

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s cubic-bezier(.22, .8, .3, 1), transform .6s cubic-bezier(.22, .8, .3, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* --- small screens ------------------------------------------------------ */

/* Below this the brand, the links and the two controls no longer fit on one
   line — the brand and the language switch both refuse to wrap — so the nav
   drops to a row of its own rather than pushing the controls off-screen. */
@media (max-width: 44rem) {
    .site-header .wrap {
        flex-wrap: wrap;
        min-height: 0;
        row-gap: .1rem;
        padding-block: .55rem;
    }

    .brand {
        order: 1;
    }

    .controls {
        order: 2;
        margin-inline-start: auto;
    }

    /* Four links plus the longer Turkish labels no longer fit a 320px row, so
       the nav scrolls inside itself rather than pushing the page sideways.
       Nothing is hidden: every link stays reachable by swiping the row. */
    .nav {
        order: 3;
        flex-basis: 100%;
        margin-inline: -.5rem;
        padding-inline: .5rem;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        overscroll-behavior-inline: contain;
        /* Softens the trailing edge so a cut-off link reads as "there is more
           to swipe" rather than as a broken layout. */
        mask-image: linear-gradient(to right, #000 calc(100% - 1.25rem), transparent);
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        flex: none;
        white-space: nowrap;
    }
}

@media (max-width: 34rem) {
    :root {
        --gutter: 1.15rem;
    }

    body {
        font-size: 16px;
    }

    .brand small {
        display: none;
    }

    .nav a {
        padding: .4rem .55rem;
        font-size: .89rem;
    }

    .btn-row .btn {
        width: 100%;
    }
}
