/*
 * turkly.net landing page. Untitled UI base (Inter, stock grays, type scale, buttons) with the app's glass finish
 * (see apps/web/src/styles/glass.css). Light values on :root, dark on .dark-mode (set by theme.js).
 * Mobile first; breakpoints at 640px and 1024px. Direction-aware (logical properties) for the fa/ar RTL pages.
 * All illustrations are drawn and animated in code (no raster images); motion is off with prefers-reduced-motion.
 */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/inter-latin.3100e775e8.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/inter-turkish.dfdc5baa5c.woff2") format("woff2");
    unicode-range: U+011E-011F, U+0130, U+015E-015F, U+20BA;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/inter-latin-ext.85ec273b4c.woff2") format("woff2");
    unicode-range: U+0100-011D, U+0120-012F, U+0132-015D, U+0160-017F, U+0218-021B, U+1E9E, U+20A0-20AB, U+20AD-20B9, U+20BB-20C0, U+2113;
}
/* Cyrillic and Cyrillic Extended (ru, tg): variable 100-900 like the Latin cuts. All Inter faces must share one
   weight range, otherwise Chromium picks one face set per weight and other scripts fall back to the system font. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/inter-cyrillic.62cc01daef.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("/assets/inter-cyrillic-ext.c2963dc765.woff2") format("woff2");
    unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* Persian page (and Persian/Arabic words elsewhere): Vazirmatn, Arabic blocks only (Latin stays Inter). */
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 400 500;
    src: url("/assets/vazirmatn-arabic-400.7ed361f8fb.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-display: swap;
    font-weight: 600 800;
    src: url("/assets/vazirmatn-arabic-600.2a16234da1.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

:root {
    --brand-25: #f5f8ff;
    --brand-50: #eef3fe;
    --brand-100: #dde6fd;
    --brand-200: #c1d2fb;
    --brand-300: #97b3f8;
    --brand-400: #6a8df2;
    --brand-500: #4469e8;
    --brand-600: #2d52d6;
    --brand-700: #2442b4;
    --brand-800: #223a91;
    --brand-900: #213574;
    --brand-950: #162147;
    --tarcin: #e48e2c;

    --bg: #f7f8fc;
    --bg-tint: color-mix(in srgb, var(--brand-50) 70%, #fff);
    --text-primary: #181d27;
    --text-secondary: #414651;
    --text-tertiary: #535862;
    --text-brand: var(--brand-700);
    --border: #e9eaeb;
    --border-strong: #d5d7da;
    --focus-ring: color-mix(in srgb, var(--brand-500) 45%, transparent);
    --grid-line: rgb(10 13 18 / 0.05);
    --glow-1: color-mix(in srgb, var(--brand-500) 22%, transparent);
    --glow-2: color-mix(in srgb, var(--brand-300) 32%, transparent);
    --glow-3: color-mix(in srgb, var(--tarcin) 16%, transparent);

    --glass-bg: rgb(255 255 255 / 0.66);
    --glass-bg-strong: rgb(255 255 255 / 0.84);
    --glass-border: rgb(10 13 18 / 0.08);
    --glass-highlight: rgb(255 255 255 / 0.85);
    --glass-shadow: 0 1px 2px rgb(10 13 18 / 0.04), 0 8px 24px -12px rgb(16 24 64 / 0.14);
    --glass-shadow-strong: 0 2px 4px rgb(10 13 18 / 0.04), 0 18px 44px -14px rgb(16 24 64 / 0.24);
    --card-bg: rgb(255 255 255 / 0.72);
    --card-bg-hover: rgb(255 255 255 / 0.94);
    --card-border: rgb(10 13 18 / 0.075);
    --card-shadow: 0 1px 2px rgb(10 13 18 / 0.04), 0 8px 24px -14px rgb(16 24 64 / 0.16);
    --card-shadow-hover: 0 2px 4px rgb(10 13 18 / 0.04), 0 18px 34px -14px rgb(16 24 64 / 0.24);

    --btn-secondary-bg: #fff;
    --btn-secondary-hover: #fafafa;
    --skeuo: inset 0 0 0 1px rgb(10 13 18 / 0.18), inset 0 -2px 0 0 rgb(10 13 18 / 0.05);

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-3xl: 24px;
    --header-h: 64px;

    color-scheme: light;
}

.dark-mode {
    --bg: #0b0d12;
    --bg-tint: #0f1218;
    --text-primary: #f7f7f7;
    --text-secondary: #cecfd2;
    --text-tertiary: #94979c;
    --text-brand: var(--brand-300);
    --border: #22262f;
    --border-strong: #373a41;
    --focus-ring: color-mix(in srgb, var(--brand-400) 55%, transparent);
    --grid-line: rgb(255 255 255 / 0.04);
    --glow-1: color-mix(in srgb, var(--brand-600) 34%, transparent);
    --glow-2: color-mix(in srgb, var(--brand-400) 14%, transparent);
    --glow-3: color-mix(in srgb, var(--tarcin) 10%, transparent);

    --glass-bg: rgb(17 20 27 / 0.6);
    --glass-bg-strong: rgb(22 25 33 / 0.84);
    --glass-border: rgb(255 255 255 / 0.08);
    --glass-highlight: rgb(255 255 255 / 0.07);
    --glass-shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -16px rgb(0 0 0 / 0.7);
    --glass-shadow-strong: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 56px -16px rgb(0 0 0 / 0.8);
    --card-bg: rgb(22 25 33 / 0.66);
    --card-bg-hover: rgb(30 34 44 / 0.8);
    --card-border: rgb(255 255 255 / 0.075);
    --card-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 8px 24px -16px rgb(0 0 0 / 0.6);
    --card-shadow-hover: 0 2px 4px rgb(0 0 0 / 0.3), 0 20px 40px -16px rgb(0 0 0 / 0.75);

    --btn-secondary-bg: #13161b;
    --btn-secondary-hover: #1b1f26;
    --skeuo: inset 0 0 0 1px rgb(255 255 255 / 0.12), inset 0 -2px 0 0 rgb(0 0 0 / 0.2);

    color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: "Inter", "Vazirmatn", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}
[hidden] {
    display: none !important;
}
img,
svg {
    display: block;
    max-width: 100%;
}
img {
    height: auto;
}
h1,
h2,
h3,
p {
    margin: 0;
}
ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
a {
    color: inherit;
}
p a,
.hero-note strong {
    color: var(--text-brand);
    font-weight: 600;
}
p a {
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 3px;
}
p a:hover {
    text-decoration-color: currentColor;
}
:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 6px;
}
.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 640px) {
    .container {
        padding: 0 32px;
    }
}
.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--brand-600);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    top: 12px;
}

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-md);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s var(--ease-out);
}
.btn:active {
    transform: scale(0.97);
}
.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 20px;
}
.btn-xl {
    padding: 12px 18px;
    font-size: 16px;
    line-height: 24px;
    border-radius: var(--radius-lg);
}
.btn-primary {
    background: var(--brand-600);
    color: #fff;
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.05),
        inset 0 0 0 1px rgb(10 13 18 / 0.18),
        inset 0 -2px 0 0 rgb(10 13 18 / 0.05),
        0 8px 22px -8px color-mix(in srgb, var(--brand-600) 70%, transparent);
    position: relative;
    overflow: hidden;
}
/* Glass sheen on the primary button. */
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0) 55%);
    pointer-events: none;
}
.btn-primary:hover {
    background: var(--brand-700);
}
.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-secondary);
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.05),
        inset 0 0 0 1px var(--border-strong),
        inset 0 -2px 0 0 rgb(10 13 18 / 0.05);
}
.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    color: var(--text-primary);
}
.btn-white {
    background: #fff;
    color: var(--brand-700);
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.08),
        0 10px 24px -10px rgb(10 13 18 / 0.45);
}
.btn-white:hover {
    background: var(--brand-25);
}
.btn-ghost-white {
    background: rgb(255 255 255 / 0.12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.32);
}
.btn-ghost-white:hover {
    background: rgb(255 255 255 / 0.2);
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-tertiary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}
.icon-btn:hover {
    background: var(--glass-highlight);
    color: var(--text-primary);
}
.dark-mode .icon-btn:hover {
    background: rgb(255 255 255 / 0.06);
}

/* ------------------------------------------------------------------ header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
.site-header.is-scrolled {
    background: var(--glass-bg);
    border-bottom-color: var(--glass-border);
    box-shadow: 0 1px 0 var(--glass-highlight) inset;
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header.is-scrolled {
        background: var(--bg);
    }
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    flex: none;
}
.logo-mark {
    width: 30px;
    height: 32px;
}
.logo-word {
    display: block;
    width: 76px;
    height: 23px;
    background: currentColor;
    -webkit-mask: url("/assets/wordmark.a33a636260.svg") center / contain no-repeat;
    mask: url("/assets/wordmark.a33a636260.svg") center / contain no-repeat;
}
.dark-mode .logo-mark {
    filter: drop-shadow(0 0 1px rgb(255 255 255 / 0.25));
}
.header-nav {
    display: none;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
}
.header-actions .btn {
    margin-inline-start: 6px;
}
.theme-toggle .icon-sun,
.dark-mode .theme-toggle .icon-moon {
    display: none;
}
.dark-mode .theme-toggle .icon-sun {
    display: block;
}
.scroll-sentinel {
    position: absolute;
    top: 8px;
    height: 1px;
    width: 1px;
}
@media (min-width: 1024px) {
    :root {
        --header-h: 72px;
    }
    .header-nav {
        display: flex;
        gap: 4px;
        margin-inline-start: 24px;
    }
    .header-nav a {
        padding: 8px 12px;
        border-radius: var(--radius-md);
        color: var(--text-tertiary);
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        transition:
            color 0.15s ease,
            background-color 0.15s ease;
    }
    .header-nav a:hover {
        color: var(--text-primary);
        background: var(--glass-highlight);
    }
    .dark-mode .header-nav a:hover {
        background: rgb(255 255 255 / 0.06);
    }
}

/* ------------------------------------------------------------------ hero */
.hero {
    position: relative;
    /* The rotating orbit and floating chips must never widen the page (RTL phones would scroll sideways). */
    overflow-x: clip;
    margin-top: calc(var(--header-h) * -1);
    padding: calc(var(--header-h) + 40px) 0 24px;
    isolation: isolate;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
/* Fading square grid (Untitled hero pattern) over soft brand glows. */
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: -10% -20% 0;
    background:
        radial-gradient(40% 45% at 78% 30%, var(--glow-1), transparent 70%),
        radial-gradient(35% 40% at 18% 12%, var(--glow-2), transparent 70%),
        radial-gradient(25% 30% at 85% 78%, var(--glow-3), transparent 70%);
}
.hero-inner {
    display: grid;
    gap: 40px;
    align-items: center;
}
.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.badge-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-block: 4px;
    padding-inline: 4px 12px;
    border-radius: 999px;
    background: var(--glass-bg);
    box-shadow:
        inset 0 0 0 1px var(--glass-border),
        var(--glass-shadow);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}
.badge-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-600);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
}
h1 {
    margin-top: 16px;
    font-size: 36px;
    line-height: 44px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.hero-lead {
    margin-top: 16px;
    max-width: 560px;
    color: var(--text-tertiary);
    font-size: 18px;
    line-height: 28px;
    text-wrap: pretty;
}
.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 32px;
}
.hero-note {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 20px;
}
@media (min-width: 480px) {
    .hero-actions {
        flex-direction: row;
        width: auto;
    }
}
@media (min-width: 1024px) {
    .hero {
        padding: calc(var(--header-h) + 72px) 0 48px;
    }
    .hero-inner {
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        gap: 64px;
    }
    h1 {
        margin-top: 20px;
        font-size: 60px;
        line-height: 72px;
    }
    .hero-lead {
        margin-top: 24px;
        font-size: 20px;
        line-height: 30px;
    }
    .hero-actions {
        margin-top: 40px;
    }
}

/* Hero art, drawn in code around the logo cat. Positions are physical (left/right) on purpose: they follow the
   artwork, which is not mirrored on RTL pages. */
.hero-art {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    margin: 0 auto;
    direction: ltr;
}
.art-ring {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, color-mix(in srgb, var(--brand-400) 30%, transparent), transparent),
        conic-gradient(from 210deg, var(--brand-100), var(--brand-300), color-mix(in srgb, var(--tarcin) 35%, var(--brand-50)), var(--brand-200), var(--brand-100));
    opacity: 0.6;
}
.dark-mode .art-ring {
    background:
        radial-gradient(closest-side, color-mix(in srgb, var(--brand-500) 38%, transparent), transparent),
        conic-gradient(from 210deg, var(--brand-900), var(--brand-700), color-mix(in srgb, var(--tarcin) 30%, var(--brand-950)), var(--brand-800), var(--brand-900));
    opacity: 0.75;
}
.art-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px dashed color-mix(in srgb, var(--brand-400) 40%, transparent);
}
.art-orbit span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 18%, transparent);
}
.art-orbit span:nth-child(1) {
    top: -5px;
    left: calc(50% - 5px);
}
.art-orbit span:nth-child(2) {
    bottom: 14%;
    left: 4%;
    background: var(--tarcin);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tarcin) 20%, transparent);
}
.art-orbit span:nth-child(3) {
    bottom: 14%;
    right: 4%;
    width: 7px;
    height: 7px;
}
.art-stage {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: var(--glass-bg);
    box-shadow:
        inset 0 0 0 1px var(--glass-border),
        inset 0 1px 0 var(--glass-highlight),
        var(--glass-shadow-strong);
    display: grid;
    place-items: center;
}
.art-cat {
    position: relative;
    width: 100%;
}
.art-cat .cat {
    width: 100%;
    height: auto;
}
/* Tea steam rising from the glass in the cat's paws. */
.steam {
    position: absolute;
    left: 56%;
    top: 22%;
    width: 15%;
    overflow: visible;
    fill: none;
    stroke: color-mix(in srgb, var(--brand-900) 55%, transparent);
    stroke-width: 3;
    stroke-linecap: round;
    opacity: 0;
}
.dark-mode .steam {
    stroke: rgb(255 255 255 / 0.55);
}
.zzz {
    position: absolute;
    left: 86%;
    top: -2%;
    width: 30%;
    height: 30%;
    color: var(--text-brand);
    font-weight: 700;
    pointer-events: none;
}
.zzz i {
    position: absolute;
    bottom: 0;
    left: 0;
    font-style: normal;
    opacity: 0;
}
.zzz i:nth-child(1) {
    font-size: 14px;
}
.zzz i:nth-child(2) {
    font-size: 18px;
}
.zzz i:nth-child(3) {
    font-size: 23px;
}
.phrase {
    position: absolute;
    left: 2%;
    top: 3%;
    display: grid;
}
.phrase span {
    grid-area: 1 / 1;
    justify-self: start;
    padding: 8px 14px;
    border-radius: 16px 16px 16px 4px;
    background: var(--brand-600);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand-600) 80%, transparent);
    transform-origin: 0 100%;
}
.phrase span:not(:first-child) {
    opacity: 0;
}
.chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 8px;
    padding-inline: 8px 14px;
    border-radius: var(--radius-xl);
    background: var(--glass-bg-strong);
    box-shadow:
        inset 0 0 0 1px var(--glass-border),
        inset 0 1px 0 var(--glass-highlight),
        var(--glass-shadow);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    white-space: nowrap;
}
[dir="rtl"] .chip {
    direction: rtl;
}
.chip-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.dark-mode .chip-icon {
    background: rgb(255 255 255 / 0.08);
    color: var(--brand-300);
}
.chip-icon-success {
    background: #dcfae6;
    color: #079455;
}
.dark-mode .chip-icon-success {
    background: rgb(23 178 106 / 0.16);
    color: #47cd89;
}
.chip-icon .icon {
    width: 20px;
    height: 20px;
}
.chip > span:last-child {
    display: flex;
    flex-direction: column;
}
.chip small {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}
.chip strong {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
.chip-lesson {
    left: -3%;
    top: 46%;
}
.chip-homework {
    right: -3%;
    bottom: 5%;
}
.icon .draw,
.icon .tick {
    stroke-dasharray: 24;
    stroke-dashoffset: 0;
}
@media (min-width: 1024px) {
    .hero-art {
        width: min(100%, 470px);
    }
    .chip-lesson {
        left: -10%;
    }
    .chip-homework {
        right: -8%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .art-ring {
        animation: spin 40s linear infinite;
    }
    .art-orbit {
        animation: spin 60s linear infinite;
    }
    .steam {
        opacity: 1;
    }
    .steam path {
        stroke-dasharray: 60;
        animation: steam 3.6s ease-in-out infinite;
    }
    .steam path:nth-child(2) {
        animation-delay: -1.2s;
    }
    .steam path:nth-child(3) {
        animation-delay: -2.4s;
    }
    .zzz i {
        animation: zzz 4.5s ease-in infinite;
    }
    .zzz i:nth-child(2) {
        animation-delay: 1.5s;
    }
    .zzz i:nth-child(3) {
        animation-delay: 3s;
    }
    .phrase span {
        opacity: 0;
        animation: phrase 9s var(--ease-out) infinite;
    }
    .phrase span:nth-child(2) {
        animation-delay: 3s;
    }
    .phrase span:nth-child(3) {
        animation-delay: 6s;
    }
    .chip-lesson {
        animation: float 7s ease-in-out infinite;
    }
    .chip-homework {
        animation: float 8s ease-in-out -3s infinite;
    }
    .chip-lesson .tick {
        animation: draw 6s var(--ease-out) infinite;
    }
    .chip-homework .draw {
        animation: draw 5s var(--ease-out) 0.4s infinite;
    }
    }
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@keyframes breathe {
    0%,
    100% {
        transform: scale(1, 1);
    }
    50% {
        transform: scale(1.025, 0.985);
    }
}
@keyframes steam {
    0% {
        stroke-dashoffset: 60;
        opacity: 0;
        transform: translateY(6px);
    }
    30% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: -60;
        opacity: 0;
        transform: translateY(-10px);
    }
}
@keyframes zzz {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.6);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(26px, -46px) scale(1.1);
    }
}
@keyframes phrase {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(6px);
    }
    5%,
    28% {
        opacity: 1;
        transform: none;
    }
    33%,
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-6px);
    }
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}
@keyframes draw {
    0%,
    8% {
        stroke-dashoffset: 24;
    }
    30%,
    90% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 24;
    }
}

/* ------------------------------------------------------------------ sections */
.section {
    padding: 64px 0;
}
.section-tight {
    padding: 32px 0;
}
.section-tint {
    background: linear-gradient(180deg, transparent, var(--bg-tint) 18%, var(--bg-tint) 82%, transparent);
}
.section-head {
    max-width: 768px;
    margin-bottom: 40px;
}
.eyebrow {
    color: var(--text-brand);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}
h2 {
    margin-top: 12px;
    font-size: 30px;
    line-height: 38px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.section-head h2:first-child {
    margin-top: 0;
}
.section-lead {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 18px;
    line-height: 28px;
    text-wrap: pretty;
}
h3 {
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
}
@media (min-width: 1024px) {
    .section {
        padding: 96px 0;
    }
    .section-tight {
        padding: 48px 0;
    }
    .section-head {
        margin-bottom: 64px;
    }
    h2 {
        font-size: 36px;
        line-height: 44px;
        letter-spacing: -0.02em;
    }
    .section-lead {
        margin-top: 20px;
        font-size: 20px;
        line-height: 30px;
    }
    h3 {
        font-size: 20px;
        line-height: 30px;
    }
}

.card {
    position: relative;
    border-radius: var(--radius-2xl);
    background: var(--card-bg);
    box-shadow:
        inset 0 0 0 1px var(--card-border),
        inset 0 1px 0 var(--glass-highlight),
        var(--card-shadow);
    transition:
        transform 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out),
        background-color 0.25s ease;
}
@media (hover: hover) {
    .card:hover {
        background: var(--card-bg-hover);
        box-shadow:
            inset 0 0 0 1px var(--card-border),
            inset 0 1px 0 var(--glass-highlight),
            var(--card-shadow-hover);
        transform: translateY(-3px);
    }
}

/* Features */
.feature-grid {
    display: grid;
    gap: 16px;
}
.feature {
    padding: 24px;
}
.feature-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--brand-25), var(--brand-50));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--brand-200) 70%, transparent),
        inset 0 1px 0 #fff;
}
.dark-mode .feature-icon {
    background: linear-gradient(180deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.03));
    box-shadow:
        inset 0 0 0 1px rgb(255 255 255 / 0.08),
        inset 0 1px 0 rgb(255 255 255 / 0.06);
}
.feature-icon .icon {
    width: 26px;
    height: 26px;
    color: var(--brand-600);
    stroke-width: 1.8;
    transition: transform 0.35s var(--ease-spring);
}
.dark-mode .feature-icon .icon {
    color: var(--brand-300);
}
@media (hover: hover) {
    .feature:hover .feature-icon .icon {
        transform: scale(1.12) rotate(-6deg);
    }
}
.feature p,
.step p,
.level p {
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 16px;
    line-height: 24px;
}
@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}
@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
    .feature {
        padding: 32px;
    }
}

/* Steps */
.steps {
    display: grid;
    gap: 16px;
    counter-reset: step;
}
.step {
    padding: 24px;
    padding-top: 12px;
    overflow: hidden;
}
.step-num {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-600);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand-600) 80%, transparent);
}
@media (min-width: 1024px) {
    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
    .step {
        padding: 32px;
        padding-top: 16px;
    }
    .step-num {
        top: 24px;
        inset-inline-start: 24px;
    }
}

/* Levels: vertical track on phones, horizontal on desktop. */
.levels {
    position: relative;
    display: grid;
    gap: 12px;
}
.levels::before {
    content: "";
    position: absolute;
    inset-inline-start: 27px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand-200), var(--brand-600));
}
.dark-mode .levels::before {
    background: linear-gradient(180deg, var(--brand-800), var(--brand-400));
}
.level {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.level > div {
    flex: 1;
    padding: 4px 0 12px;
}
.level-code {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--card-bg-hover);
    color: var(--text-brand);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow:
        inset 0 0 0 2px var(--brand-200),
        var(--card-shadow);
}
.dark-mode .level-code {
    background: #151922;
    box-shadow:
        inset 0 0 0 2px var(--brand-800),
        var(--card-shadow);
}
.level:last-child .level-code {
    background: var(--brand-600);
    color: #fff;
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand-600) 80%, transparent);
}
.level p {
    margin-top: 4px;
}
@media (min-width: 1024px) {
    .levels {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 24px;
    }
    .levels::before {
        inset-inline-start: 28px;
        /* Ends at the last circle: one column (minus the half circle) from the end edge. */
        inset-inline-end: calc((100% - 4 * 24px) / 5 - 28px);
        top: 27px;
        bottom: auto;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, var(--brand-200), var(--brand-600));
    }
    .dark-mode .levels::before {
        background: linear-gradient(90deg, var(--brand-800), var(--brand-400));
    }
    [dir="rtl"] .levels::before {
        background: linear-gradient(270deg, var(--brand-200), var(--brand-600));
    }
    .dark-mode[dir="rtl"] .levels::before {
        background: linear-gradient(270deg, var(--brand-800), var(--brand-400));
    }
    .level {
        flex-direction: column;
        gap: 20px;
    }
    .level > div {
        padding: 0;
    }
}

/* FAQ */
.faq-wrap {
    max-width: 832px;
}
.faq-wrap .section-head {
    margin-bottom: 32px;
}
.faq {
    display: grid;
    gap: 12px;
}
.faq details {
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    box-shadow:
        inset 0 0 0 1px var(--card-border),
        var(--card-shadow);
}
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-size: 17px;
    line-height: 26px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    border-radius: inherit;
}
.faq summary::-webkit-details-marker {
    display: none;
}
.faq summary .icon {
    color: var(--text-tertiary);
    transition: transform 0.25s var(--ease-out);
}
.faq details[open] summary .icon {
    transform: rotate(180deg);
}
.faq details p {
    padding: 0 20px 20px;
    color: var(--text-tertiary);
    font-size: 16px;
    line-height: 24px;
}

/* Final call to action */
.cta {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 40px 24px 24px;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(70% 90% at 100% 0%, rgb(255 255 255 / 0.18), transparent 60%),
        radial-gradient(50% 70% at 0% 100%, color-mix(in srgb, var(--tarcin) 30%, transparent), transparent 70%),
        linear-gradient(135deg, var(--brand-600), var(--brand-800));
    box-shadow:
        inset 0 0 0 1px rgb(255 255 255 / 0.12),
        inset 0 1px 0 rgb(255 255 255 / 0.2),
        0 24px 48px -24px color-mix(in srgb, var(--brand-700) 70%, transparent);
    isolation: isolate;
}
.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgb(255 255 255 / 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 80% 20%, #000, transparent 75%);
}
.cta h2 {
    margin-top: 0;
}
.cta p {
    margin-top: 12px;
    max-width: 520px;
    color: rgb(255 255 255 / 0.85);
    font-size: 18px;
    line-height: 28px;
}
.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
}
/* "Hello" in every site language, cycling inside a glass orb. */
.hello {
    position: relative;
    display: grid;
    place-items: center;
    width: 220px;
    height: 220px;
    margin: 16px auto 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, rgb(255 255 255 / 0.28), rgb(255 255 255 / 0.06) 60%);
    box-shadow:
        inset 0 0 0 1px rgb(255 255 255 / 0.28),
        inset 0 -12px 30px rgb(10 13 18 / 0.12),
        0 20px 40px -20px rgb(10 13 18 / 0.5);
}
.hello span {
    grid-area: 1 / 1;
    color: #fff;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0;
}
.hello span:first-child {
    opacity: 1;
}
.hello span[dir="rtl"] {
    letter-spacing: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .hello span,
    .hello span:first-child {
        opacity: 0;
        animation: hello 22s var(--ease-out) infinite;
    }
    .hello span:nth-child(2) { animation-delay: 2s; }
    .hello span:nth-child(3) { animation-delay: 4s; }
    .hello span:nth-child(4) { animation-delay: 6s; }
    .hello span:nth-child(5) { animation-delay: 8s; }
    .hello span:nth-child(6) { animation-delay: 10s; }
    .hello span:nth-child(7) { animation-delay: 12s; }
    .hello span:nth-child(8) { animation-delay: 14s; }
    .hello span:nth-child(9) { animation-delay: 16s; }
    .hello span:nth-child(10) { animation-delay: 18s; }
    .hello span:nth-child(11) { animation-delay: 20s; }
}
@keyframes hello {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    2%,
    7.5% {
        opacity: 1;
        transform: none;
    }
    9.5%,
    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.96);
    }
}
@media (min-width: 480px) {
    .cta-actions {
        flex-direction: row;
    }
}
@media (min-width: 1024px) {
    .cta {
        grid-template-columns: 1fr auto;
        align-items: end;
        padding: 64px;
        align-items: center;
    }
    .hello {
        width: 300px;
        height: 300px;
        margin: 0;
    }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
    padding: 40px 0 calc(40px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    margin-top: 32px;
}
.footer-inner {
    display: grid;
    gap: 24px;
}
.footer-brand {
    display: grid;
    gap: 12px;
    justify-items: start;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.footer-nav a {
    color: var(--text-tertiary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.footer-nav a:hover {
    color: var(--text-primary);
}
.footer-copy {
    color: var(--text-tertiary);
    font-size: 14px;
}
@media (min-width: 1024px) {
    .site-footer {
        margin-top: 48px;
    }
    .footer-inner {
        grid-template-columns: 1fr auto;
        align-items: start;
    }
}

/* ------------------------------------------------------------------ scroll reveal (app.js adds the classes) */
.reveal-pending {
    opacity: 0;
    transform: translateY(16px);
}
.reveal-pending.is-visible {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.6s var(--ease-out),
        transform 0.6s var(--ease-out);
}
.feature-grid > .is-visible:nth-child(3n + 2),
.steps > .is-visible:nth-child(2),
.levels > .is-visible:nth-child(2) {
    transition-delay: 0.06s;
}
.feature-grid > .is-visible:nth-child(3n),
.steps > .is-visible:nth-child(3),
.levels > .is-visible:nth-child(3) {
    transition-delay: 0.12s;
}
.levels > .is-visible:nth-child(4) {
    transition-delay: 0.18s;
}
.levels > .is-visible:nth-child(5) {
    transition-delay: 0.24s;
}

@media (prefers-reduced-transparency: reduce) {
    .site-header.is-scrolled,
    .chip {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: var(--bg);
    }
}

/* 404 page */
.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 70vh;
    justify-content: center;
    text-align: center;
}
.not-found h1 {
    margin-top: 0;
}
.not-found .btn {
    margin-top: 16px;
}

/* ------------------------------------------------------------------ language menu */
.lang-menu {
    position: relative;
}
.lang-menu summary {
    list-style: none;
}
.lang-menu summary::-webkit-details-marker {
    display: none;
}
.lang-code {
    font-size: 13px;
    letter-spacing: 0.02em;
}
.flag {
    flex: none;
    width: 20px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
    outline: 1px solid rgb(10 13 18 / 0.1);
    outline-offset: -1px;
}
.lang-list a span {
    flex: 1;
}
.lang-list a {
    gap: 10px;
}
@media (max-width: 479px) {
    .lang-menu summary .lang-code {
        display: none;
    }
    .lang-menu summary .flag {
        width: 24px;
        height: 18px;
    }
}
.lang-list {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 60;
    min-width: 188px;
    padding: 6px;
    border-radius: var(--radius-xl);
    background: var(--glass-bg-strong);
    box-shadow:
        inset 0 0 0 1px var(--glass-border),
        var(--glass-shadow-strong);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
}
.lang-menu[open] .lang-list {
    animation: pop 0.18s var(--ease-out);
}
.lang-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.lang-list a:hover {
    background: var(--glass-highlight);
    color: var(--text-primary);
}
.dark-mode .lang-list a:hover {
    background: rgb(255 255 255 / 0.06);
}
.lang-list a[aria-current]::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-600);
}
@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
}

/* ------------------------------------------------------------------ step illustrations */
.step-art {
    position: relative;
    height: 128px;
    margin: 28px 0 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--brand-25), var(--brand-50));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-200) 60%, transparent);
    overflow: hidden;
}
.dark-mode .step-art {
    background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.02));
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07);
}
/* 1: chat */
.art-chat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
}
.msg {
    max-width: 80%;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}
.msg-in {
    align-self: flex-start;
    border-end-start-radius: 4px;
    background: var(--card-bg-hover);
    color: var(--text-secondary);
    box-shadow: inset 0 0 0 1px var(--card-border);
}
.msg-out {
    align-self: flex-end;
    border-end-end-radius: 4px;
    background: var(--brand-600);
    color: #fff;
}
.typing {
    align-self: flex-start;
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 14px;
    background: var(--card-bg-hover);
    box-shadow: inset 0 0 0 1px var(--card-border);
}
.typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}
/* 2: calendar */
.art-calendar {
    display: grid;
    place-items: center;
}
.cal {
    display: grid;
    grid-template-columns: repeat(7, 18px);
    gap: 6px;
}
.cal i {
    height: 18px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--brand-200) 45%, transparent);
}
.dark-mode .cal i {
    background: rgb(255 255 255 / 0.08);
}
.cal i.pick {
    background: var(--brand-600);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 25%, transparent);
}
.cal-check {
    position: absolute;
    top: 18px;
    inset-inline-end: 22%;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #17b26a;
    box-shadow: 0 8px 18px -8px rgb(23 178 106 / 0.9);
}
.cal-check svg,
.done-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* 3: progress */
.art-progress {
    display: grid;
    place-items: end center;
    padding-bottom: 22px;
}
.bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 80px;
}
.bars i {
    width: 22px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
    transform-origin: 50% 100%;
}
.bars i:nth-child(1) { height: 22%; opacity: 0.55; }
.bars i:nth-child(2) { height: 38%; opacity: 0.65; }
.bars i:nth-child(3) { height: 55%; opacity: 0.75; }
.bars i:nth-child(4) { height: 74%; opacity: 0.88; }
.bars i:nth-child(5) { height: 100%; }
@media (prefers-reduced-motion: no-preference) {
    .msg-in {
        animation: chat-in 6s var(--ease-out) infinite;
    }
    .msg-out {
        animation: chat-out 6s var(--ease-out) infinite;
    }
    .typing {
        animation: chat-typing 6s var(--ease-out) infinite;
    }
    .typing i {
        animation: dot 1s ease-in-out infinite;
    }
    .typing i:nth-child(2) { animation-delay: 0.15s; }
    .typing i:nth-child(3) { animation-delay: 0.3s; }
    .cal i.pick {
        animation: pick 5s var(--ease-out) infinite;
    }
    .cal-check {
        animation: pop-in 5s var(--ease-spring) infinite;
    }
    .bars i {
        animation: grow 5s var(--ease-out) infinite;
    }
    .bars i:nth-child(2) { animation-delay: 0.12s; }
    .bars i:nth-child(3) { animation-delay: 0.24s; }
    .bars i:nth-child(4) { animation-delay: 0.36s; }
    .bars i:nth-child(5) { animation-delay: 0.48s; }
}
@keyframes chat-in {
    0% { opacity: 0; transform: translateY(8px); }
    8%, 90% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}
@keyframes chat-out {
    0%, 28% { opacity: 0; transform: translateY(8px); }
    36%, 90% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}
@keyframes chat-typing {
    0%, 52% { opacity: 0; transform: translateY(8px); }
    58%, 90% { opacity: 1; transform: none; }
    100% { opacity: 0; }
}
@keyframes dot {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-3px); opacity: 1; }
}
@keyframes pick {
    0%, 20% { background: color-mix(in srgb, var(--brand-200) 45%, transparent); box-shadow: none; }
    32%, 92% { background: var(--brand-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 25%, transparent); }
    100% { background: color-mix(in srgb, var(--brand-200) 45%, transparent); box-shadow: none; }
}
@keyframes pop-in {
    0%, 34% { opacity: 0; transform: scale(0.3); }
    44%, 90% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.6); }
}
@keyframes grow {
    0% { transform: scaleY(0.08); }
    30%, 88% { transform: scaleY(1); }
    100% { transform: scaleY(0.08); }
}

/* ------------------------------------------------------------------ request form */
.request {
    display: grid;
    gap: 32px;
}
.checklist {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}
.checklist li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 24px;
}
.checklist .icon {
    width: 24px;
    height: 24px;
    padding: 5px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    stroke-width: 3;
}
.dark-mode .checklist .icon {
    background: rgb(255 255 255 / 0.08);
    color: var(--brand-300);
}
.request-card {
    padding: 24px;
}
@media (hover: hover) {
    .request-card:hover {
        transform: none;
    }
}
.request-form {
    display: grid;
    gap: 18px;
}
.field {
    display: grid;
    gap: 6px;
}
.field-row {
    display: grid;
    gap: 18px;
}
.field label {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}
.optional {
    color: var(--text-tertiary);
    font-weight: 400;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    font: inherit;
    font-size: 16px;
    line-height: 24px;
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.05),
        inset 0 0 0 1px var(--border-strong);
    transition: box-shadow 0.15s ease;
}
.field textarea {
    resize: vertical;
    min-height: 104px;
}
.field input::placeholder,
.field textarea::placeholder {
    color: #717680;
}
[dir="rtl"] .field input[dir="ltr"] {
    text-align: right;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.05),
        inset 0 0 0 2px var(--brand-500),
        0 0 0 4px var(--focus-ring);
}
.field input:user-invalid,
.field textarea:user-invalid {
    box-shadow: inset 0 0 0 1px #f04438;
}
.hp {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.btn-block {
    width: 100%;
}
.btn[disabled] {
    opacity: 0.7;
    cursor: progress;
}
.form-status:empty {
    display: none;
}
.form-status {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-tertiary);
}
.form-status.is-error {
    color: #d92d20;
}
.dark-mode .form-status.is-error {
    color: #f97066;
}
.form-privacy {
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 18px;
}
.request-done {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 32px 8px;
    text-align: center;
}
.request-done:focus {
    outline: none;
}
.request-done p {
    max-width: 380px;
    color: var(--text-tertiary);
}
.done-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: #17b26a;
    box-shadow: 0 0 0 8px rgb(23 178 106 / 0.15);
    animation: pop-in-once 0.5s var(--ease-spring);
}
.done-icon svg {
    width: 26px;
    height: 26px;
}
@keyframes pop-in-once {
    from {
        opacity: 0;
        transform: scale(0.4);
    }
}
@media (min-width: 640px) {
    .field-row {
        grid-template-columns: 1fr 1fr;
    }
    .request-card {
        padding: 32px;
    }
}
@media (min-width: 1024px) {
    .request {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 64px;
        align-items: start;
    }
    .request-copy {
        position: sticky;
        top: calc(var(--header-h) + 32px);
    }
}

/* ------------------------------------------------------------------ RTL (fa, ar) */
[dir="rtl"] .icon-flip {
    transform: scaleX(-1);
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .badge-group,
[dir="rtl"] .eyebrow {
    letter-spacing: 0;
}
[dir="rtl"] h1 {
    line-height: 1.4;
}
[dir="rtl"] h2 {
    line-height: 1.45;
}
[dir="rtl"] body {
    line-height: 1.7;
}
/* Chinese page: the system CJK fonts (far too large to self-host); Latin stays Inter. */
html:lang(zh) body,
html:lang(zh) .field input,
html:lang(zh) .field select,
html:lang(zh) .field textarea {
    font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}
html:lang(zh) h1,
html:lang(zh) h2,
html:lang(zh) h3 {
    letter-spacing: 0;
}
/* Persian page: Vazirmatn (Vazir) first; Arabic page: IBM Plex Sans Arabic. Latin words fall through to Inter. */
html[lang="fa"] body,
html[lang="fa"] .field input,
html[lang="fa"] .field select,
html[lang="fa"] .field textarea {
    font-family: "Vazirmatn", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}
html[lang="ar"] body,
html[lang="ar"] .field input,
html[lang="ar"] .field select,
html[lang="ar"] .field textarea {
    font-family: "IBM Plex Sans Arabic", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

/* ------------------------------------------------------------------ Tarçın poses (src/art) in the page */
.art-progress .bars {
    position: absolute;
    inset-inline-start: 18%;
    bottom: 22px;
    height: 64px;
    opacity: 0.5;
}
.step-cat {
    position: absolute;
    inset-inline-end: 14%;
    top: 50%;
    width: 108px;
    transform: translateY(-50%);
}
.request-card {
    position: relative;
    margin-top: 72px;
}
.request-peek {
    position: absolute;
    bottom: calc(100% - 6px);
    inset-inline-end: 28px;
    width: 120px;
    pointer-events: none;
}
.done-cat {
    width: 150px;
    margin-bottom: 4px;
}
.cta-art {
    display: grid;
    justify-items: center;
    margin-top: 12px;
}
.cta-art .hello {
    width: 150px;
    height: 150px;
    margin: 0 0 -8px;
    z-index: 1;
}
.cta-art .hello span {
    font-size: 28px;
}
.cta-cat {
    width: 190px;
}
.not-found-cat {
    width: 150px;
}
@media (min-width: 1024px) {
    .request-card {
        margin-top: 0;
    }
    .request-peek {
        width: 140px;
    }
    .cta-art {
        grid-template-columns: auto auto;
        align-items: end;
        margin-top: 0;
    }
    .cta-art .hello {
        align-self: start;
        margin: 0 -24px 0 0;
    }
    .cta-cat {
        width: 230px;
    }
}

/* ------------------------------------------------------------------ placement test (#test, engine in app.js) */
.levels-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}
.test-wrap {
    max-width: 880px;
}
.test-card {
    padding: 24px;
}
@media (hover: hover) {
    .test-card:hover {
        transform: none;
    }
}
.test-intro {
    display: grid;
    justify-items: start;
    gap: 20px;
}
.test-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}
.test-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}
.test-facts .icon {
    color: var(--brand-600);
}
.dark-mode .test-facts .icon {
    color: var(--brand-300);
}
.test-note,
.test-status {
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 20px;
}
.test-status:empty {
    display: none;
}
.test-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
}
.test-link {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--text-tertiary);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.test-link:hover {
    color: var(--text-primary);
}
.test-progress {
    height: 6px;
    margin: 12px 0 20px;
    border-radius: 6px;
    background: var(--border);
    overflow: hidden;
}
.test-progress b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-500), var(--brand-600));
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.4s var(--ease-out);
}
[dir="rtl"] .test-progress b {
    transform-origin: 100% 50%;
}
.test-skill {
    color: var(--text-brand);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.test-passage {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-tint);
    box-shadow: inset 0 0 0 1px var(--card-border);
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 26px;
    text-align: left;
}
.test-q {
    margin-top: 12px;
    font-size: 20px;
    line-height: 30px;
    font-weight: 600;
    text-align: left;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.test-q:focus {
    outline: none;
}
.test-passage {
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.test-options {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}
.test-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
    font: inherit;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 1px 2px rgb(10 13 18 / 0.05),
        inset 0 0 0 1px var(--border-strong);
    transition:
        box-shadow 0.15s ease,
        background-color 0.15s ease,
        transform 0.15s var(--ease-out);
}
.test-option:hover {
    background: var(--btn-secondary-hover);
}
.test-option:active {
    transform: scale(0.99);
}
.test-option[aria-pressed="true"] {
    background: var(--brand-25);
    box-shadow:
        inset 0 0 0 2px var(--brand-500),
        0 0 0 4px var(--focus-ring);
}
.dark-mode .test-option[aria-pressed="true"] {
    background: rgb(68 105 232 / 0.14);
}
.test-key {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-tint);
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--card-border);
}
.test-option[aria-pressed="true"] .test-key {
    background: var(--brand-600);
    color: #fff;
    box-shadow: none;
}
.test-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}
.test-actions .test-next {
    margin-inline-start: auto;
}
.test-result {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}
.test-result:focus {
    outline: none;
}
.test-result-cat {
    width: 130px;
}
.result-level {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 520px;
    text-align: start;
}
.result-level .level-code {
    width: 72px;
    height: 72px;
    font-size: 24px;
    background: var(--brand-600);
    color: #fff;
    box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand-600) 80%, transparent);
}
.result-level p,
.result-score {
    color: var(--text-tertiary);
}
.result-score {
    font-weight: 600;
}
.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}
@media (min-width: 640px) {
    .test-card {
        padding: 36px;
    }
    .test-options {
        grid-template-columns: 1fr 1fr;
    }
}

/* Latin handles and links inside RTL text (e.g. @turkishlessonstr on fa/ar) keep their own direction. */
[dir="rtl"] p a[href*="instagram.com"],
[dir="rtl"] p a[href*="app.turkly.net"] {
    unicode-bidi: isolate;
    direction: ltr;
}

/* Touch targets: at least 44px tall on phones. */
.lang-menu summary {
    min-height: 44px;
}
.lang-list a {
    min-height: 44px;
}
.footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}
.test-link {
    min-height: 44px;
}

/* Optional report-by-email step inside the test result. */
.report-form,
.report-done {
    width: 100%;
    max-width: 560px;
    margin-top: 8px;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-tint);
    box-shadow: inset 0 0 0 1px var(--card-border);
    text-align: start;
}
.report-form {
    display: grid;
    gap: 14px;
}
.report-form h4,
.report-done h4 {
    margin: 0;
    font-size: 17px;
    line-height: 26px;
    font-weight: 600;
}
.report-text,
.report-done p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 15px;
    line-height: 22px;
}
.report-fields {
    display: grid;
    gap: 14px;
}
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}
.consent input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--brand-600);
}
.report-done {
    display: flex;
    gap: 14px;
    align-items: center;
}
.report-done:focus {
    outline: none;
}
.report-done-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #17b26a;
}
.report-done-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (min-width: 640px) {
    .report-fields {
        grid-template-columns: 1fr 1fr;
    }
}

/* ------------------------------------------------------------------ hero proof line */
.hero-proof {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}
.hero-proof .icon,
.proof-ig .verified {
    width: 18px;
    height: 18px;
    fill: var(--brand-600);
    stroke: #fff;
    stroke-width: 1.6;
}
.hero-proof + .hero-note {
    margin-top: 8px;
}

/* ------------------------------------------------------------------ proof strip (#proof) */
.proof {
    padding: 8px 0 24px;
}
.proof-grid {
    display: grid;
    gap: 16px;
}
.quote {
    margin: 0;
    padding: 22px 24px;
}
.quote blockquote {
    margin: 0;
}
.quote blockquote p {
    color: var(--text-primary);
    font-size: 17px;
    line-height: 26px;
    font-weight: 500;
}
.quote .quote-original {
    margin-top: 8px;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    font-style: italic;
}
html[lang="tr"] .quote-original {
    display: none;
}
.quote figcaption {
    margin-top: 12px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 18px;
}
.proof-ig {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    color: inherit;
    text-decoration: none;
}
.proof-ig-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
    color: #fff;
}
.proof-ig > span:last-child {
    display: grid;
    gap: 2px;
}
.proof-ig strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}
.proof-ig small {
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 20px;
}
.proof-ig .verified .tick {
    fill: none;
}
@media (min-width: 1024px) {
    .proof {
        padding: 0 0 32px;
    }
    .proof-grid {
        grid-template-columns: 1.15fr 1fr 0.9fr;
        gap: 24px;
    }
}

/* ------------------------------------------------------------------ goals (#goals) */
.goal-grid {
    display: grid;
    gap: 16px;
}
.goal-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    color: inherit;
    text-decoration: none;
}
.goal-link p {
    margin-top: 8px;
    color: var(--text-tertiary);
}
.goal-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--text-brand);
    font-size: 15px;
    font-weight: 600;
}
.goal-cta .icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s var(--ease-out);
}
@media (hover: hover) {
    .goal-link:hover .goal-cta .icon {
        transform: translateX(3px);
    }
    [dir="rtl"] .goal-link:hover .goal-cta .icon {
        transform: scaleX(-1) translateX(3px);
    }
}
@media (min-width: 640px) {
    .goal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}
@media (min-width: 1024px) {
    .goal-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 24px;
    }
    /* 3 + 2 layout: first row of three, second row of two wider cards. */
    .goal-grid > li {
        grid-column: span 2;
    }
    .goal-grid > li:nth-child(n + 4) {
        grid-column: span 3;
    }
}

/* ------------------------------------------------------------------ teacher (#teacher) */
.teacher {
    display: grid;
    gap: 32px;
    align-items: center;
}
.teacher-card {
    display: grid;
    justify-items: center;
    gap: 24px;
    padding: 32px 24px;
}
@media (hover: hover) {
    .teacher-card:hover {
        transform: none;
    }
}
.teacher-photo {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--brand-50);
    box-shadow:
        0 0 0 6px color-mix(in srgb, var(--brand-500) 18%, transparent),
        0 18px 36px -16px color-mix(in srgb, var(--brand-700) 80%, transparent);
}
.teacher-facts {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}
.teacher-facts li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}
.teacher-facts .icon {
    width: 24px;
    height: 24px;
    padding: 5px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-600);
    stroke-width: 3;
}
.dark-mode .teacher-facts .icon {
    background: rgb(255 255 255 / 0.08);
    color: var(--brand-300);
}
.teacher-copy h2 {
    margin-top: 12px;
}
.teacher-text {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 17px;
    line-height: 27px;
}
.teacher-copy .btn {
    margin-top: 28px;
}
@media (min-width: 1024px) {
    .teacher {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 64px;
    }
}

/* ------------------------------------------------------------------ six levels, three CTA buttons, zh */
@media (min-width: 1024px) {
    .levels {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 20px;
    }
    .levels::before {
        inset-inline-end: calc((100% - 5 * 20px) / 6 - 28px);
    }
}
.levels > .is-visible:nth-child(6) {
    transition-delay: 0.3s;
}
.cta-actions {
    flex-wrap: wrap;
}
/* Instagram is blocked in mainland China: no Instagram buttons or links on the Chinese page. */
html:lang(zh) .btn-instagram,
html:lang(zh) .link-instagram {
    display: none;
}

/* Selects: no native arrow (Safari pushed it past the field's edge); our chevron sits inside the padding. */
.field select {
    -webkit-appearance: none;
    appearance: none;
    padding-inline-end: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23717680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 18px 18px;
    background-position: right 14px center;
    text-overflow: ellipsis;
    cursor: pointer;
}
[dir="rtl"] .field select {
    background-position: left 14px center;
}
.dark-mode .field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394979c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.field select::-ms-expand {
    display: none;
}

/* Phones: long button labels (de, ru, tr...) wrap instead of pushing the page wider than the screen. */
@media (max-width: 479px) {
    .btn-xl {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }
}

/* Very narrow phones (≤ 380px): tighter header so long "Sign in" labels (ar, tg, ru) fit next to the logo. */
@media (max-width: 380px) {
    .header-inner {
        gap: 8px;
    }
    .logo-word {
        width: 62px;
    }
    .header-actions {
        gap: 0;
    }
    .header-actions .icon-btn {
        min-width: 36px;
        padding: 0 6px;
    }
    .header-actions .btn {
        margin-inline-start: 2px;
        padding-inline: 10px;
    }
}

/* Client-side navigation (pageRouter in app.js): the header stays put while the page cross-fades. */
.site-header {
    view-transition-name: site-header;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
}
html.is-navigating {
    cursor: progress;
}

/* Five header links: tighter between 1024 and 1279px so long labels (de, ru, uz) fit next to the actions. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .header-nav {
        gap: 0;
        margin-inline-start: 8px;
    }
    .header-nav a {
        padding: 8px 9px;
        font-size: 14px;
        white-space: nowrap;
    }
    .header-inner {
        gap: 10px;
    }
}
@media (min-width: 1024px) {
    .header-nav a {
        white-space: nowrap;
    }
}

/* Six narrow level columns: long single words (de "Höchststufe", ru, uz) hyphenate instead of overflowing. */
.level > div {
    min-width: 0;
}
.level h3,
.level p {
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Back-to-top button (shared header partial): appears after scrolling down, every page. */
.to-top {
    position: fixed;
    inset-inline-end: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow:
        inset 0 0 0 1px var(--glass-border),
        var(--glass-shadow-strong);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s var(--ease-out),
        background-color 0.15s ease;
}
.to-top.is-shown {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.to-top:hover {
    background: var(--brand-600);
    color: #fff;
}
.to-top .icon {
    width: 22px;
    height: 22px;
}
@media (prefers-reduced-motion: reduce) {
    .to-top {
        transition: none;
    }
}

/*
 * Tarçın poses (src/art/cat-*.html), made from the logo (see README.md).
 * Each pose is a frame holding the vector pose as an instant poster (<img>) and a short looping Kling clip
 * (white background, 640px H.264, ~40-160 KB) that app.js loads and plays only while it is on screen, never with
 * reduced motion; the clip fades in over the poster once it plays.
 * --ar is the clip's aspect ratio; --px/--py/--pw place the poster exactly where the cat sits in the clip frame
 * (fractions of the frame), so swapping poster -> video doesn't jump.
 * - .cat-sticker: a white disc (the clip's white background reads as a sticker on any page background).
 * - The peek pose sits on top of a card edge, where a white clip background can't work: it is the vector pose only,
 *   with a gentle bob.
 */
.cat-frame {
    --inset: 0%;
    position: relative;
    display: block;
    aspect-ratio: var(--ar, 1);
}
.cat-frame > .cat-poster {
    position: absolute;
    left: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--px));
    top: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--py));
    width: calc((100% - 2 * var(--inset)) * var(--pw));
    height: auto;
}
.cat-clip {
    position: absolute;
    inset: var(--inset);
    width: calc(100% - 2 * var(--inset));
    height: calc(100% - 2 * var(--inset));
    opacity: 0;
    transition: opacity 0.35s ease;
}
.cat-clip.is-playing {
    opacity: 1;
}
.cat-sticker {
    --inset: 5%;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 1px rgb(10 13 18 / 0.06),
        0 10px 30px -14px rgb(16 24 64 / 0.35);
}
.cat-wave {
    --px: 0.1631;
    --py: 0.0674;
    --pw: 0.7041;
}
.cat-cheer {
    --px: 0.1895;
    --py: 0.0508;
    --pw: 0.6016;
}
.cat-tea {
    --px: 0.2402;
    --py: 0.0898;
    --pw: 0.5195;
}
.cat-peek {
    --ar: 640 / 432;
    --px: 0.041;
    --py: 0.0217;
    --pw: 0.918;
}
@media (prefers-reduced-motion: no-preference) {
    .cat-peek .cat-poster {
        animation: cat-peek 5s ease-in-out infinite;
    }
}
@keyframes cat-peek {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4%);
    }
}

/* Blog: article pages and the per-language article index (src/article.html, src/blog-index.html). */
.article {
    max-width: 760px;
}
.article h1 {
    margin: 0.5rem 0 0.75rem;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}
.breadcrumb a {
    color: var(--text-brand);
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.article-meta {
    margin: 0 0 2rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}
.prose {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.prose h2 {
    margin: 3rem 0 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: clamp(1.45rem, 3vw, 1.75rem);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose h3 {
    margin: 2rem 0 0.6rem;
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 650;
    color: var(--text-brand);
    scroll-margin-top: calc(var(--header-h) + 16px);
}
.prose p,
.prose ul,
.prose ol {
    margin: 0 0 1.1rem;
}
.prose ul,
.prose ol {
    padding-inline-start: 1.4rem;
}
.prose li + li {
    margin-top: 0.35rem;
}
.prose a {
    color: var(--text-brand);
    text-underline-offset: 3px;
}
.prose strong {
    color: var(--text-primary);
    font-weight: 650;
}
.prose blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-inline-start: 3px solid var(--brand-500);
    background: var(--bg-tint);
    border-radius: var(--radius-md);
}
.prose blockquote p {
    margin: 0;
}
.table-wrap {
    margin: 0 0 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.5;
}
.prose th,
.prose td {
    padding: 0.6rem 0.85rem;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}
.prose th {
    color: var(--text-primary);
    background: var(--bg-tint);
}
.prose tr:last-child td {
    border-bottom: 0;
}
.article-cta {
    margin: 3rem 0 0;
    padding: 1.75rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--card-shadow);
}
.article-cta h2 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    color: var(--text-primary);
}
.article-cta p {
    margin: 0 0 1.25rem;
    color: var(--text-secondary);
}
.article-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.related {
    margin-top: 3rem;
}
.related h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
}
.post-list {
    display: grid;
    gap: 1rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}
.post-list a {
    display: block;
    padding: 1.25rem 1.5rem;
    color: inherit;
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
    transition: background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.post-list a:hover {
    background: var(--card-bg-hover);
    box-shadow: var(--card-shadow-hover);
}
.post-list strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.post-list span {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Featured image under the title and the illustration in the middle of the article. */
.article-hero,
.article-figure {
    margin: 0 0 2rem;
}
.article-figure {
    margin: 2.25rem 0;
}
.article-hero img,
.article-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-2xl);
    box-shadow:
        inset 0 0 0 1px var(--card-border),
        var(--card-shadow);
}

/* Table of contents (built from the ## headings). */
.toc {
    margin: 0 0 2rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--bg-tint);
    box-shadow: inset 0 0 0 1px var(--card-border);
}
.toc-title {
    margin: 0 0 0.6rem !important;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
}
.toc ol {
    margin: 0 !important;
    padding-inline-start: 1.25rem;
    font-size: 0.975rem;
    line-height: 1.55;
}
.toc li + li {
    margin-top: 0.4rem;
}
.prose .toc a {
    color: var(--text-secondary);
    text-decoration: none;
}
.prose .toc a:hover {
    color: var(--text-brand);
    text-decoration: underline;
}

/* Thumbnails on the blog index and in "related articles". */
.post-thumb {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 0.9rem;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ------------------------------------------------------------------ blog theme (cards, meta, share, slider) */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}
.post-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}
.dark-mode .post-badge {
    background: rgb(255 255 255 / 0.08);
    color: var(--brand-300);
}
.post-badge .icon {
    width: 14px;
    height: 14px;
}
a.post-badge:hover {
    background: var(--brand-100);
}

/* Share bar */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 2.25rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.share-label {
    margin-inline-end: 6px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 600;
}
.share-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--btn-secondary-bg);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--border-strong);
    transition:
        transform 0.15s var(--ease-out),
        color 0.15s ease,
        background-color 0.15s ease;
}
.share-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.share-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}
.share-whatsapp:hover { background: #25d366; }
.share-telegram:hover { background: #229ed9; }
.share-x:hover { background: #0f1419; }
.share-facebook:hover { background: #1877f2; }
.share-linkedin:hover { background: #0a66c2; }
.share-copy:hover { background: var(--brand-600); }
.share-copy.is-copied {
    background: #17b26a;
    color: #fff;
}
/* WhatsApp, Telegram, X, Facebook and LinkedIn are blocked in mainland China. */
html:lang(zh) .share-ext {
    display: none;
}

/* About the teacher */
.teacher-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--radius-2xl);
    background: var(--bg-tint);
    box-shadow: inset 0 0 0 1px var(--card-border);
}
.teacher-box img {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}
.teacher-box .eyebrow {
    margin: 0;
}
.teacher-box h2 {
    margin: 4px 0 6px;
    font-size: 1.25rem;
    color: var(--text-primary);
}
.teacher-box p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}
.teacher-box-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--text-brand);
    font-weight: 600;
    text-decoration: none;
}
.teacher-box-link .icon {
    width: 16px;
    height: 16px;
}
@media (max-width: 520px) {
    .teacher-box {
        flex-direction: column;
    }
}

/* Previous / next article */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 2.5rem;
}
.post-nav-link {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    box-shadow:
        inset 0 0 0 1px var(--card-border),
        var(--card-shadow);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s var(--ease-out);
}
.post-nav-link:hover {
    transform: translateY(-2px);
}
.post-nav-link small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
}
.post-nav-link strong {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
}
.post-nav .is-next {
    text-align: end;
}
@media (max-width: 520px) {
    .post-nav {
        grid-template-columns: 1fr;
    }
}

/* Article cards (index grid and related slider) */
.post-card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--card-bg);
    box-shadow:
        inset 0 0 0 1px var(--card-border),
        var(--card-shadow);
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out);
}
@media (hover: hover) {
    .post-card > a:hover {
        transform: translateY(-3px);
        box-shadow:
            inset 0 0 0 1px var(--card-border),
            var(--card-shadow-hover);
    }
}
.post-card .post-thumb {
    margin: 0;
    border-radius: 0;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
}
.post-thumb-icon {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
    color: var(--brand-600);
}
.dark-mode .post-thumb-icon {
    background: linear-gradient(135deg, rgb(255 255 255 / 0.06), rgb(255 255 255 / 0.02));
    color: var(--brand-300);
}
.post-thumb-icon .icon {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}
.post-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    padding: 16px 18px 18px;
}
.post-card strong {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.4;
}
.post-excerpt {
    color: var(--text-tertiary);
    font-size: 0.92rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    margin-top: auto;
    padding-top: 4px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* Related articles: one row of six, scroll/slide with snap and arrow buttons. */
.related {
    margin-top: 3rem;
}
.related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}
.related-head h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
}
.slider-buttons {
    display: flex;
    gap: 8px;
}
.slider-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--btn-secondary-bg);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.slider-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.slider-btn .icon {
    width: 18px;
    height: 18px;
}
.post-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 72%);
    gap: 16px;
    margin: 0 -4px;
    padding: 4px 4px 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    list-style: none;
}
.post-slider > li {
    scroll-snap-align: start;
}
@media (min-width: 640px) {
    .post-slider {
        grid-auto-columns: calc((100% - 32px) / 2.6);
    }
}
@media (prefers-reduced-motion: reduce) {
    .post-slider {
        scroll-behavior: auto;
    }
}

/* Blog index: filters, a featured first article and a card grid. */
.blog-index {
    max-width: 1180px;
}
.blog-index > h1 {
    margin: 0.5rem 0 0.75rem;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1.75rem 0 1.5rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--btn-secondary-bg);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.filter-chip .icon {
    width: 16px;
    height: 16px;
}
.filter-chip span {
    color: var(--text-tertiary);
    font-weight: 500;
}
.filter-chip[aria-pressed="true"] {
    background: var(--brand-600);
    color: #fff;
    box-shadow: none;
}
.filter-chip[aria-pressed="true"] span {
    color: rgb(255 255 255 / 0.8);
}
.post-grid {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 640px) {
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
    /* The newest article spans the full row, picture beside the text. */
    .post-grid > .is-featured {
        grid-column: 1 / -1;
    }
    .post-grid > .is-featured > a {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
    }
    .post-grid > .is-featured .post-thumb {
        height: 100%;
        aspect-ratio: auto;
    }
    .post-grid > .is-featured strong {
        font-size: 1.6rem;
    }
    .post-grid > .is-featured .post-card-body {
        justify-content: center;
        padding: 32px;
    }
}
.post-card[hidden] {
    display: none !important;
}
.post-grid > .is-featured.is-featured-off {
    grid-column: auto;
}
.post-grid > .is-featured.is-featured-off > a {
    display: flex;
}
.post-grid > .is-featured.is-featured-off strong {
    font-size: 1.05rem;
}
.related.no-slide .slider-buttons {
    display: none;
}
/* "More articles" breaks out of the 760px text column: six cards in one row on wide screens, a slider below that. */
.article .related {
    --related-w: min(1180px, 100vw - 32px);
    width: var(--related-w);
    margin-inline: calc((100% - var(--related-w)) / 2);
}
@media (min-width: 640px) {
    .article .related {
        --related-w: min(1180px, 100vw - 64px);
    }
}
@media (min-width: 1024px) {
    .post-slider {
        grid-auto-columns: calc((100% - 3 * 16px) / 4);
    }
}
@media (min-width: 1200px) {
    .post-slider {
        grid-auto-columns: calc((100% - 5 * 16px) / 6);
    }
    .post-slider .post-card strong {
        font-size: 0.95rem;
    }
    .post-slider .post-excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.85rem;
    }
    .post-slider .post-card-body {
        padding: 12px 14px 14px;
    }
}
