/* ============================================================
   Langula — frontend rebuilt 1:1 from Claude Design "Langula Web"
   Page = white. Warm neutrals + terracotta accent. Self-hosted fonts.
   NO flag emojis — languages use colored code badges.
   ============================================================ */
@import url("../assets/fonts/fonts.css");

:root {
  --ink: #2D2823;
  --ink-2: #221C16;
  --muted: #6B6258;
  --muted-2: #5C544B;
  --mono: #6E665B;       /* label/secondary text — darkened for WCAG AA on white/cream */
  --mono-light: #9C9286; /* decorative only (icons, dashed borders), not body text */
  --mono-2: #C3B8A9;
  --line: #F0EBE2;
  --line-2: #EFE7DB;
  --field: #E7DFD3;
  --cream: #FAF7F1;
  --cream-2: #FBF8F2;
  --accent: #E0492F;
  --accent-2: #EA5B47;
  --accent-3: #F4805E;
  --accent-dk: #C9462E;
  --tint: #FCEAE3;
  --grad: linear-gradient(135deg, #F4805E, #E0492F);
  --grad-soft: linear-gradient(160deg, #FFF1EB, #FBF6EF);
  --sans: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono-font: 'JetBrains Mono', ui-monospace, monospace;
  --sh: 0 1px 3px rgba(45,40,35,.08), 0 24px 60px rgba(45,40,35,.06);
  --sh-card: 0 12px 36px rgba(45,40,35,.10);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: #fff;
  line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
a { color: var(--accent-dk); text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 44px; }
.eyebrow { font: 600 12px/1 var(--mono-font); letter-spacing: .1em; text-transform: uppercase; color: var(--mono); }

/* code badge (replaces all flag emojis) */
.code-badge { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center;
  font: 700 11px/1 var(--mono-font); flex: none; }

/* ---- Header ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 18px 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo-link { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.logo-link img { width: 36px; height: 36px; border-radius: 10px; }
.logo-link span { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.main-nav { display: flex; align-items: center; gap: 30px; font-weight: 600; font-size: 15px; }
.main-nav a { color: var(--muted); }
.main-nav a:hover { color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 30px; }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; background: none; border: 0; font-family: var(--sans); }
.lang-pill::after { content: "▾"; color: var(--mono-2); }
/* Header language dropdown (details/summary) */
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu[open] > summary::after { transform: rotate(180deg); }
.lang-pill::after { transition: transform .15s ease; }
.lang-menu-pop { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; min-width: 200px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px;
  box-shadow: 0 18px 40px rgba(45,40,35,.14); display: flex; flex-direction: column; gap: 2px; }
.lang-menu-pop a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink); }
.lang-menu-pop a:hover { background: var(--cream); }
.lang-menu-pop a.on { background: var(--cream); }
.btn-start { background: var(--grad); color: #fff; border-radius: 11px; padding: 11px 20px; font-weight: 700; font-size: 15px; }
.btn-start:hover { color: #fff; }
.burger { width: 44px; height: 44px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---- Drawer (design 08) ---- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(34,28,22,.4); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 86vw; background: #fff; z-index: 201;
  display: none; flex-direction: column; }
.drawer.open { display: flex; box-shadow: -20px 0 60px rgba(45,40,35,.18); animation: drawerIn .28s cubic-bezier(.4,0,.2,1); }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head .logo-link span { font-size: 18px; }
.drawer-close { width: 38px; height: 38px; border-radius: 10px; background: var(--cream); border: 1px solid var(--line-2); font-size: 18px; color: var(--ink); cursor: pointer; line-height: 1; }
.drawer-body { padding: 18px 22px; overflow-y: auto; }
.drawer-body .grp { font: 600 11px/1 var(--mono-font); letter-spacing: .1em; text-transform: uppercase; color: var(--mono); margin: 18px 0 10px; }
.drawer-nav a { display: block; padding: 13px 0; font-weight: 700; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line); }
.drawer-langs { display: flex; flex-direction: column; gap: 2px; }
.drawer-langs a { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.drawer-langs a:hover, .drawer-langs a.active { background: var(--cream); color: var(--ink); }
.drawer-foot { margin-top: auto; padding: 18px 22px; border-top: 1px solid var(--line); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-weight: 800; font-size: 16px; padding: 13px 28px; border-radius: 13px; border: none; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(224,73,47,.26); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--field); }
.btn-block { width: 100%; }

/* badge pill */
.badge-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--tint); color: #9E3620; font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 999px; }
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }

/* ---- Ad slots ---- */
.ad-slot { text-align: center; padding: 22px 44px; }
.ad-slot[data-slot="ad-top"] { padding-bottom: 0; }
.ad-slot[data-slot="ad-inline-1"], .ad-slot[data-slot="ad-inline-2"] { padding-top: 8px; padding-bottom: 40px; }
.ad-slot .ad-label { display: block; font: 600 9px/1 var(--mono-font); letter-spacing: .14em; text-transform: uppercase; color: var(--mono); margin-bottom: 7px; }
.ad-slot .ad-box { margin: 0 auto; width: 100%; max-width: 970px; height: 90px; border: 1px dashed #C8BCA9; border-radius: 12px; background: var(--cream-2);
  color: var(--mono); font: 600 12px/1 var(--mono-font); letter-spacing: .05em; text-align: center; padding: 0 8px; display: grid; place-items: center; }
.ad-slot[data-slot="ad-inline-1"] .ad-box, .ad-slot[data-slot="ad-inline-2"] .ad-box { height: 250px; }
.ad-anchor { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: rgba(255,255,255,.98); border-top: 1px solid var(--line);
  padding: 8px 12px; display: none; align-items: center; gap: 8px; box-shadow: 0 -4px 14px rgba(45,40,35,.05); }
.ad-anchor .ad-wrap { flex: 1; }
.ad-anchor .ad-label { font-size: 7px; }
.ad-anchor .ad-box { height: 46px; max-width: none; border-radius: 7px; }
.ad-anchor .ad-close { width: 22px; height: 22px; border-radius: 50%; background: #F4F0E8; color: var(--mono); border: 0; font-weight: 800; cursor: pointer; flex: none; }

/* ---- Hero ---- */
.hero-inner { max-width: var(--max); margin: 0 auto; padding: 60px 44px 50px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 54px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin: 22px 0 18px; }
.hero .lead { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0 0 30px; max-width: 480px; }
.hero-checks { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; font-weight: 600; font-size: 14px; color: var(--mono); }

.pair-picker { background: var(--cream); border: 1px solid var(--line-2); border-radius: 18px; padding: 18px; display: flex; align-items: flex-end; gap: 14px; max-width: 520px; }
.pair-picker .field { flex: 1; min-width: 0; }
.pair-picker .field-label { font: 600 12px/1 var(--mono-font); letter-spacing: .08em; text-transform: uppercase; color: var(--mono); margin-bottom: 8px; }
.pair-picker select { width: 100%; background: #fff; border: 1px solid var(--field); border-radius: 12px; padding: 13px 36px 13px 14px; font: 700 15px var(--sans); color: var(--ink); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E665B' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.pair-picker .go { width: 52px; height: 50px; flex: none; border-radius: 12px; background: var(--grad); border: none; cursor: pointer; display: grid; place-items: center; }
.pair-picker .go::after { content: ""; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; margin-left: 3px; }
.pair-picker .go .go-text { display: none; color: #fff; font-weight: 800; font-size: 16px; }

.hero-show { background: var(--grad-soft); border: 1px solid #F4E7DD; border-radius: 22px; padding: 30px; }
.word-card { background: #fff; border-radius: 18px; box-shadow: var(--sh-card); padding: 30px; text-align: center; }
.word-card .step { font: 600 12px/1 var(--mono-font); letter-spacing: .08em; text-transform: uppercase; color: var(--mono); }
.word-card .term { font-size: 46px; font-weight: 800; letter-spacing: -.02em; margin: 22px 0 6px; }
.word-card .phon { font: 500 16px/1 var(--mono-font); color: var(--mono); margin-bottom: 18px; }
.word-card .tr { border-top: 1px solid var(--line); padding-top: 16px; font-size: 20px; font-weight: 700; }
.speak-btn { width: 54px; height: 54px; border-radius: 50%; background: var(--grad); border: none; cursor: pointer; display: grid; place-items: center; margin: 0 auto 18px; }
.speak-btn::after { content: ""; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; margin-left: 3px; }

/* ---- Section + language chips ---- */
.section { max-width: var(--max); margin: 0 auto; padding: 50px 44px; }
.section.cream { background: var(--cream); width: 100%; max-width: none; margin: 0; border-top: 1px solid var(--line); }
.section.cream > .inner { max-width: var(--max); margin: 0 auto; }
.section.bordered { border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 38px; }
.section-head h2 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.section-head p { font-size: 17px; color: var(--muted); margin: 0; }

.lang-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--cream); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 15px 7px 7px; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.lang-chip .lang-name { font-weight: 700; font-size: 14px; }
a.lang-chip:hover { border-color: var(--accent); background: #fff; }

/* dedicated page headers (Languages / How it works / FAQ) */
.page-head { max-width: 760px; margin: 0 auto; padding: 30px 0 8px; text-align: center; }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head h1 { font-size: 44px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }
.page-head .lead { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0 auto; max-width: 620px; }
.page-head + .section .lang-grid { justify-content: center; }

/* feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; }
.feature-card .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--tint); display: grid; place-items: center; margin-bottom: 16px; }
.ic .sh-square { width: 16px; height: 16px; border-radius: 5px; background: var(--accent-2); }
.ic .sh-ring { width: 16px; height: 16px; border-radius: 50%; border: 4px solid var(--accent-2); }
.ic .sh-tri { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--accent-2); margin-left: 3px; }
.ic .sh-diamond { width: 15px; height: 15px; background: var(--accent-2); transform: rotate(45deg); }
.feature-card h3 { font-weight: 800; font-size: 17px; margin-bottom: 6px; }
.feature-card p { font-size: 14px; line-height: 1.5; color: var(--mono); margin: 0; }

/* alternating feature rows */
.feature-rows .feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin-bottom: 36px; }
.feature-rows .feature-row:nth-child(even) .row-media { order: -1; }
.feature-row h3 { font-size: 27px; font-weight: 800; margin: 0 0 10px; }
.feature-row p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }
.row-media { border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: #fff; }
.row-media .win { height: 30px; background: var(--cream); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 5px; padding: 0 12px; }
.row-media .win span { width: 8px; height: 8px; border-radius: 50%; }
.row-media .win span:nth-child(1) { background: #E0857A; } .row-media .win span:nth-child(2) { background: #E8C07A; } .row-media .win span:nth-child(3) { background: #9FCBA0; }
.row-media .shot { aspect-ratio: 16/10; background: repeating-linear-gradient(45deg,#FBF8F2,#FBF8F2 11px,#F3EDE3 11px,#F3EDE3 22px); display: grid; place-items: center; color: #B9AE9F; font: 600 12px/1 var(--mono-font); letter-spacing: .05em; }
.badge-pill.sm { font-size: 13px; padding: 6px 13px; margin-bottom: 14px; font-weight: 800; }

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line-2); border-radius: 14px; margin-bottom: 12px; background: #fff; }
.faq-item summary { list-style: none; cursor: pointer; padding: 20px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); }

/* ---- Final CTA ---- */
.cta-final { background: var(--grad); color: #fff; text-align: center; padding: 64px 44px; }
.cta-final h2 { color: #fff; font-size: 32px; margin-bottom: 14px; }
.cta-final p { color: rgba(255,255,255,.9); margin-bottom: 26px; }
.cta-final .btn { background: #fff; color: var(--accent-dk); }

/* ---- Footer ---- */
.site-footer { margin-top: auto; background: #fff; border-top: 1px solid var(--line); padding: 28px 44px; font-size: 13px; font-weight: 600; color: var(--mono); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-footer a:hover { color: var(--accent-dk); }

/* ---- Legal / Contact ---- */
.page-narrow { max-width: 760px; margin: 0 auto; padding: 48px 44px 70px; }
.page-narrow h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.page-narrow h2 { font-size: 20px; font-weight: 800; margin: 30px 0 10px; }
.page-narrow p, .page-narrow li { color: var(--muted-2); margin-bottom: 12px; }
.page-narrow .updated { color: var(--mono); font-family: var(--mono-font); font-size: 13px; margin-bottom: 26px; }
.card-soft { background: var(--cream); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; margin-bottom: 16px; }
.field-label { font: 600 12px/1 var(--mono-font); letter-spacing: .08em; text-transform: uppercase; color: var(--mono); margin: 14px 0 7px; }
.input { width: 100%; background: #fff; border: 1px solid var(--field); border-radius: 12px; padding: 13px 14px; font: 600 15px var(--sans); color: var(--ink); }
.input:focus { outline: none; border-color: var(--accent); }

/* ---- Learn app ---- */
.learn-main { flex: 1; width: 100%; }
.learn-wrap { max-width: 1000px; margin: 0 auto; padding: 30px 44px 80px; }
.crumbs { font: 600 12px/1 var(--mono-font); letter-spacing: .06em; text-transform: uppercase; color: var(--mono); margin-bottom: 14px; }
.picker-step { margin-bottom: 30px; }
.picker-step h2 { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.picker-step p { color: var(--muted); margin-bottom: 18px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pick { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px; cursor: pointer; font: inherit; text-align: left; width: 100%; position: relative; transition: border-color .15s, transform .15s; }
.pick:hover { border-color: var(--accent); transform: translateY(-2px); }
.pick.selected { border: 2px solid var(--accent); background: var(--tint); }
.pick .code-badge { width: 46px; height: 46px; font-size: 14px; }
.pick b { display: block; font-weight: 800; font-size: 16px; }
.pick small { color: var(--mono); font-size: 13px; font-weight: 600; }

.dash-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-title h1 { font-size: 28px; display: flex; align-items: center; gap: 12px; }
.dash-title p { color: var(--muted); }
.dash-stats { display: flex; gap: 22px; }
.dash-stats .s b { font-size: 28px; font-weight: 800; display: block; }
.dash-stats .s span { font: 600 11px/1 var(--mono-font); text-transform: uppercase; letter-spacing: .06em; color: var(--mono); }
.level-group { margin-bottom: 28px; }
.level-group h3 { font: 700 12px/1 var(--mono-font); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dk); margin-bottom: 12px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.lesson { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; cursor: pointer; text-align: left; width: 100%; font: inherit; transition: transform .15s, box-shadow .2s; }
.lesson:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.lesson:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.lesson .num { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--cream); display: grid; place-items: center; font-weight: 800; color: var(--mono); font-size: .9rem; }
.lesson.done .num { background: var(--grad); color: #fff; }
.lesson .l-meta b { display: block; font-size: .92rem; }
.lesson .l-meta small { color: var(--mono); font-size: .78rem; }
.lesson .lock { margin-left: auto; color: var(--mono-2); }

.player { max-width: 620px; margin: 0 auto; }
.player-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.progress-bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 26px; }
.progress-bar i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.card { background: #fff; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--sh-card); padding: 44px 32px; text-align: center; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.card .term { font-size: 46px; font-weight: 800; letter-spacing: -.02em; }
.card .phon { font: 500 16px/1 var(--mono-font); color: var(--mono); }
.card .tr { font-size: 20px; color: var(--accent-dk); font-weight: 700; }
.card .tr.hidden { filter: blur(7px); cursor: pointer; }
.card .sentence { padding-top: 16px; width: 100%; }
.card .sentence .s-text { font-size: 1.15rem; } .card .sentence .s-tr { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.player-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; }
.player-nav .btn { flex: 1; }
.kbd-hint { text-align: center; color: var(--mono-2); font-size: .8rem; margin-top: 16px; }
.kbd-hint kbd { background: var(--cream); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 7px; font-family: var(--mono-font); font-size: .78rem; }

/* ============================================================
   Responsive (mobile artboards)
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-show { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-rows .feature-row { grid-template-columns: 1fr; gap: 20px; }
  .feature-rows .feature-row:nth-child(even) .row-media { order: 0; }
  .pick-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap, .section, .ad-slot, .page-narrow, .learn-wrap { padding-left: 20px; padding-right: 20px; }
  .header-inner { padding: 14px 20px; }
  .logo-link img { width: 30px; height: 30px; border-radius: 8px; }
  .logo-link span { font-size: 18px; }
  .main-nav, .btn-start { display: none; }
  .burger { width: 34px; height: 34px; border-radius: 9px; }
  .burger span { width: 15px; }
  .hero-inner { padding: 26px 20px 24px; }
  .hero h1 { font-size: 32px; line-height: 1.08; margin-top: 16px; }
  .hero .lead { font-size: 15px; margin-bottom: 20px; }
  .pair-picker { flex-wrap: wrap; padding: 14px; }
  .pair-picker .field { flex: 1 1 100%; }
  .pair-picker .go { width: 100%; height: 52px; }
  .pair-picker .go::after { display: none; }
  .pair-picker .go .go-text { display: inline; }
  .section { padding: 40px 20px; }
  .section-head h2, .cta-final h2 { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .pick-grid { grid-template-columns: 1fr; }
  .picker-step h2 { font-size: 24px; }
  .ad-slot .ad-box { height: 70px; }
  .ad-slot[data-slot="ad-inline-1"] .ad-box, .ad-slot[data-slot="ad-inline-2"] .ad-box { height: 200px; }
  .ad-anchor { display: flex; }
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
  .footer-links { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ============================================================
   Learn app (design 02–05): own header, picker, dashboard, path
   ============================================================ */
.app-body { background: #fff; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 100; }
.app-logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.app-logo img { width: 32px; height: 32px; border-radius: 9px; }
.app-logo span { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.app-right { display: flex; align-items: center; gap: 12px; }
.streak-chip { display: inline-flex; align-items: center; gap: 8px; background: #FFF4EC; border: 1px solid #FFE2CE; color: #B5611F; border-radius: 11px; padding: 9px 14px; font-weight: 800; font-size: 14px; }
.streak-chip .sd { width: 8px; height: 8px; border-radius: 50%; background: #FF8A3D; }
.lang-pill-app { display: inline-flex; align-items: center; gap: 8px; background: var(--cream); border: 1px solid var(--line-2); border-radius: 11px; padding: 7px 12px; font-weight: 800; font-size: 14px; color: var(--ink); }
.lang-pill-app .caret { color: var(--mono-2); }
.code-badge.sm { width: 24px; height: 24px; font-size: 9px; }
.code-badge.big { width: 46px; height: 46px; font-size: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }

/* app drawer */
.app-drawer .drawer-appnav { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.app-drawer .drawer-appnav a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 15px; color: var(--muted-2); }
.app-drawer .drawer-appnav a.active { background: var(--tint); color: var(--accent-dk); font-weight: 800; }
.app-drawer .drawer-appnav a:hover { background: var(--cream); }
.dn-ic { width: 28px; height: 28px; border-radius: 8px; background: #F4F0E8; display: grid; place-items: center; }
.drawer-appnav a.active .dn-ic { background: var(--accent-2); }
.drawer-appnav a.active .dn-ic span { background: #fff; border-color: #fff; }
.drawer-pair { margin: 8px 18px 0; background: var(--cream); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; }
.drawer-pair .dp-mono { font: 600 10px/1 var(--mono-font); letter-spacing: .08em; text-transform: uppercase; color: var(--mono); margin-bottom: 11px; }
.drawer-pair .dp-row { display: flex; align-items: center; justify-content: space-between; }
.drawer-pair .dp-lang { display: flex; align-items: center; gap: 10px; }
.drawer-pair .dp-lang b { font-size: 14px; } .drawer-pair .dp-lang small { display: block; color: var(--mono); font-size: 12px; font-weight: 600; }
.drawer-pair .dp-change { font: 700 12px/1 var(--mono-font); color: var(--accent-dk); }
.drawer-signin { display: flex; align-items: center; justify-content: space-between; font-weight: 800; color: var(--ink); }

.learn-main { flex: 1; width: 100%; }
#app { max-width: 1080px; margin: 0 auto; padding: 30px 38px 80px; }

/* picker (02) */
.picker-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.step-eyebrow { font: 600 12px/1 var(--mono-font); letter-spacing: .1em; text-transform: uppercase; color: var(--mono); margin-bottom: 10px; }
.picker-top h2 { font-size: 32px; font-weight: 800; }
.speak-pill { display: inline-flex; align-items: center; gap: 12px; background: var(--cream); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px 14px; }
.speak-pill .sp-mono { font: 600 12px/1 var(--mono-font); text-transform: uppercase; color: var(--mono); }
.speak-pill select { background: #fff; border: 1px solid var(--field); border-radius: 12px; padding: 10px 36px 10px 14px; font: 700 15px var(--sans); color: var(--ink); appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236E665B' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.lang-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lang-pick { position: relative; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px; cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, transform .15s; }
.lang-pick:hover { border-color: var(--accent); transform: translateY(-2px); }
.lang-pick.selected { border: 2px solid var(--accent); background: var(--tint); }
.lang-pick .lp-meta b { display: block; font-weight: 800; font-size: 16px; }
.lang-pick .lp-meta small { color: var(--mono); font-size: 13px; font-weight: 600; }
.lang-pick .lp-check { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--field); }
.lang-pick .lp-check.on { background: var(--accent); border-color: var(--accent); }
.picker-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.picker-sel { color: var(--muted); font-weight: 600; font-size: 14px; }

/* dashboard (03) */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.dash-hello { font-size: 14px; font-weight: 600; color: var(--mono); }
.dash-head h1 { font-size: 30px; font-weight: 800; margin-top: 4px; }
.dash-date { font: 600 13px/1 var(--mono-font); color: var(--mono); }
.dash-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card { background: var(--cream); border: 1px solid var(--line-2); border-radius: 18px; padding: 20px; }
.stat-card.goal { display: flex; align-items: center; gap: 18px; }
.sc-mono { font: 600 11px/1 var(--mono-font); text-transform: uppercase; color: var(--mono); margin-bottom: 10px; }
.sc-big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.sc-big2 { font-size: 16px; font-weight: 800; }
.sc-sub { font-size: 13px; font-weight: 700; color: var(--mono); margin-top: 4px; }
.sc-sub.up { color: var(--accent-dk); }
.goal-ring { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.goal-in { width: 58px; height: 58px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.dash-cards2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 18px; }
.continue-card { background: var(--grad); color: #fff; border-radius: 20px; padding: 26px; }
.cc-mono { font: 600 11px/1 var(--mono-font); text-transform: uppercase; opacity: .85; margin-bottom: 12px; }
.cc-title { font-size: 23px; font-weight: 800; margin-bottom: 6px; }
.cc-meta { font-size: 14px; opacity: .9; margin-bottom: 16px; }
.cc-bar { height: 8px; background: rgba(255,255,255,.3); border-radius: 99px; margin-bottom: 18px; }
.cc-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.cc-btn { background: #fff; color: var(--accent); border: 0; border-radius: 12px; padding: 12px 24px; font-weight: 800; font-size: 15px; cursor: pointer; }
.session-card { background: #fff; border: 1px solid var(--line-2); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; justify-content: center; }
.sess-title { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.sess-meta { font-size: 14px; color: var(--mono); margin-bottom: 18px; }
.sess-btn { background: var(--tint); color: var(--accent-dk); border: 0; border-radius: 12px; padding: 12px 24px; font-weight: 800; font-size: 15px; cursor: pointer; align-self: flex-start; }
.dash-badges { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.badge-tile { width: 54px; height: 54px; border-radius: 14px; background: var(--tint); display: grid; place-items: center; }
.badge-tile.locked { background: #F4F0E8; }
.badge-tile.locked span { background: #C8BCA9; border-color: #C8BCA9; }
.badge-tile.more { background: #F4F0E8; border: 1px dashed #C8BCA9; color: var(--mono); font: 700 13px/1 var(--mono-font); }

/* learning path (04) */
.path-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.path-head h2 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.path-sub { color: var(--mono); font-weight: 600; font-size: 15px; }
.lvl-tabs { display: flex; gap: 8px; }
.lvl-tab { background: #F4F0E8; color: var(--mono); border: 0; border-radius: 11px; padding: 10px 18px; font-weight: 800; font-size: 14px; cursor: pointer; }
.lvl-tab.on { background: var(--grad); color: #fff; }
.lvl-bar { background: var(--cream); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.lb-name { font-weight: 800; font-size: 14px; white-space: nowrap; }
.lb-track { flex: 1; height: 9px; background: #EDE4D7; border-radius: 99px; }
.lb-track i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.lb-count { font: 700 13px/1 var(--mono-font); color: var(--mono); }
.path-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.path-lesson { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; cursor: pointer; font: inherit; text-align: left; transition: transform .15s, box-shadow .2s; }
.path-lesson:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.path-lesson:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.path-lesson.current { border: 2px solid var(--accent); }
.pl-num { width: 46px; height: 46px; border-radius: 13px; background: var(--cream); color: var(--mono); display: grid; place-items: center; font: 800 17px/1 var(--mono-font); flex-shrink: 0; }
.path-lesson.done .pl-num { background: var(--grad); color: #fff; }
.pl-meta { flex: 1; min-width: 0; } .pl-meta b { display: block; font-weight: 800; font-size: 16px; } .pl-meta small { color: var(--mono); font-size: 13px; font-weight: 600; }
.pl-status { font: 700 11px/1 var(--mono-font); text-transform: uppercase; color: var(--mono); white-space: nowrap; }
.path-lesson.done .pl-status { color: var(--accent-dk); }
.ad-slot.wide { grid-column: 1 / -1; }
.ad-slot.rect { padding: 0; }
.ad-slot.rect .ad-box { width: 300px; height: 250px; max-width: 300px; }
.ad-slot.wide .ad-box { height: 90px; }

/* learn-app sub-navigation (same shared template; in-content tabs) */
.learn-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-2); padding-bottom: 16px; margin-bottom: 10px; }
.lbar-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lbar-tab { padding: 9px 15px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); }
.lbar-tab:hover { background: var(--cream); color: var(--ink); }
.lbar-tab.on { background: var(--ink); color: #fff; }
.lbar-right { display: flex; align-items: center; gap: 12px; }

/* lesson player */
.player { max-width: 620px; margin: 0 auto; }
.player-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.player-pos { color: var(--mono); font-size: .9rem; }
.btn-small { padding: 8px 14px; font-size: 14px; }
.card .s-text { font-size: 1.2rem; font-weight: 700; }
.card .s-tr { color: var(--muted); margin-top: 8px; }
.card .tr.hidden, .card .s-tr.hidden { filter: blur(7px); cursor: pointer; }
.stub { text-align: center; padding: 60px 20px; } .stub h2 { font-size: 1.6rem; margin-bottom: 8px; } .stub p { color: var(--muted); margin-bottom: 20px; }

/* ---- SEO landing (09) ---- */
.btn-lg { padding: 16px 30px; font-size: 17px; }
.seo-hero { padding: 48px 0 36px; }
.seo-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.seo-badge { display: inline-flex; align-items: center; gap: 9px; background: var(--cream); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px 6px 6px; margin-bottom: 22px; font-weight: 700; font-size: 13px; }
.seo-hero h1 { font-size: 56px; line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin: 0 0 18px; }
.seo-lead { font-size: 19px; line-height: 1.5; color: var(--muted); margin: 0 0 28px; max-width: 500px; }
.seo-lead strong { color: var(--ink); }
.seo-hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.seo-hero-meta { font: 600 13px/1 var(--mono-font); color: var(--mono); }
.seo-hero-card { background: var(--grad-soft); border: 1px solid #F4E7DD; border-radius: 22px; padding: 30px; }
.seo-h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.seo-h2.sm { font-size: 24px; }
.seo-h2 + .seo-sub { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 700px; margin: 0 0 24px; }
.seo-benefits { margin-top: 26px; }
.seo-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.seo-step { border: 1px solid var(--line-2); border-radius: 18px; padding: 26px; }
.seo-step-n { width: 46px; height: 46px; border-radius: 13px; background: var(--grad); color: #fff; display: grid; place-items: center; font: 800 20px/1 var(--mono-font); margin-bottom: 16px; }
.seo-step h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.seo-step p { font-size: 14px; line-height: 1.5; color: var(--mono); margin: 0; }
.seo-words { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.seo-word { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; text-align: center; }
.sw-term { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.sw-ph { font: 500 12px/1 var(--mono-font); color: var(--mono); margin-bottom: 10px; }
.sw-tr { font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.seo-levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.seo-level { background: var(--cream); border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; }
.seo-lv-badge { display: inline-block; background: var(--tint); color: var(--accent-dk); border-radius: 9px; padding: 6px 12px; font: 800 13px/1 var(--mono-font); }
.seo-lv-badge.on { background: var(--grad); color: #fff; }
.seo-level h3 { font-size: 17px; font-weight: 800; margin: 14px 0 6px; }
.seo-level p { font-size: 14px; line-height: 1.5; color: var(--mono); margin: 0; }
.seo-lv-range { font: 600 11px/1 var(--mono-font); color: var(--mono-2); margin-top: 12px; }
.seo-more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seo-morelink { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; color: var(--ink); }
.seo-morelink:hover { border-color: var(--accent); }
.seo-morelink span:not(.seo-arrow):not(.code-badge) { font-weight: 700; font-size: 15px; flex: 1; }
.seo-arrow { color: var(--accent-dk); font-weight: 800; }
.seo-long { max-width: 780px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.75; color: #5C544B; }
.seo-faqs { max-width: 820px; display: flex; flex-direction: column; gap: 12px; }
.seo-faq { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 22px 24px; }
.seo-faq-q { font-weight: 800; font-size: 17px; }
.seo-faq-a { font-size: 15px; line-height: 1.65; color: var(--muted); margin-top: 10px; }

/* ---- Auth pages (register / login / forgot) ---- */
.auth-body { background: var(--cream); }
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 56px 20px 70px; display: flex; flex-direction: column; align-items: center; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--ink); }
.auth-logo img { width: 36px; height: 36px; border-radius: 10px; }
.auth-logo span { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.auth-card { width: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 12px 36px rgba(45,40,35,.06); padding: 34px; }
.auth-card h1 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; text-align: center; }
.auth-sub { font-size: 14px; color: var(--mono); text-align: center; margin: 0 0 22px; line-height: 1.5; }
.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--field); border-radius: 11px; padding: 12px; font: 700 15px var(--sans); color: var(--ink); background: #fff; cursor: pointer; }
.auth-oauth:hover { background: var(--cream); }
.auth-oauth .oa-g { width: 20px; height: 20px; border-radius: 50%; background: var(--cream); border: 1px solid var(--line-2); display: grid; place-items: center; font: 700 11px/1 var(--mono-font); color: var(--accent); }
.auth-oauth .oa-a { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--mono-2); font-size: 13px; font-weight: 600; margin: 18px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-field { display: block; margin-bottom: 14px; }
.auth-field > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 7px; }
.auth-field > span.auth-field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-field-row a { font-size: 13px; color: var(--accent-dk); font-weight: 700; }
.auth-field input { width: 100%; background: var(--cream); border: 1px solid var(--field); border-radius: 11px; padding: 13px 14px; font: 500 15px var(--sans); color: var(--ink); }
.auth-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }
.btn-block { width: 100%; display: block; text-align: center; margin-top: 4px; }
.auth-terms { font-size: 12px; color: var(--mono-2); text-align: center; line-height: 1.5; margin: 16px 0 0; }
.auth-terms a { color: var(--accent-dk); font-weight: 700; }
.auth-back { text-align: center; margin-top: 18px; }
.auth-back a, .auth-alt a { color: var(--accent-dk); font-weight: 800; }
.auth-alt { margin-top: 20px; font-size: 14px; color: var(--muted); font-weight: 600; text-align: center; }

@media (max-width: 860px) {
  .seo-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .seo-hero h1 { font-size: 42px; }
  .seo-steps, .seo-levels, .seo-words, .seo-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .seo-steps, .seo-more { grid-template-columns: 1fr; }
  .seo-hero h1 { font-size: 36px; }
}

@media (max-width: 900px) {
  .dash-stats3 { grid-template-columns: 1fr; }
  .dash-cards2, .dash-badges { grid-template-columns: 1fr; }
  .lang-cards { grid-template-columns: 1fr 1fr; }
  .path-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app-header { padding: 12px 16px; }
  #app { padding: 22px 16px 70px; }
  .picker-top, .path-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .picker-top h2, .path-head h2 { font-size: 24px; }
  .lang-cards { grid-template-columns: 1fr; }
  .lvl-bar { flex-wrap: wrap; }
  .streak-chip, .lang-pill-app .caret { display: none; }
  .app-right { gap: 8px; }
}
