/* Layout: sticky top bar; public site = editorial single column of bands; app = sidebar + workspace (tabs scroll on phones). Window-pane motif from the logo. */
:root {
  --bg: #F3F6FA; --surface: #FFFFFF; --surface-2: #EAF0F7; --ink: #1D232E; --ink-2: #4B5566; --muted: #7A8494;
  --line: #D9E1EB; --brand: #1A63C2; --brand-hover: #134F9E; --brand-ink: #FFFFFF; --brand-soft: #E3EDFA;
  --sun: #E89A1C; --sun-soft: #FCEFD8; --good: #17845A; --good-soft: #DDF3E8; --warn: #A86A07; --warn-soft: #FBEFD6;
  --bad: #BE3A33; --bad-soft: #FBE3E1; --info: #5B4FC4; --info-soft: #ECEAFB; --shadow: 0 1px 2px rgba(20,35,60,.06), 0 8px 24px rgba(20,35,60,.06);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E131C; --surface: #161D29; --surface-2: #1D2634; --ink: #E7ECF3; --ink-2: #AEB8C7; --muted: #7F8A9B;
  --line: #2A3445; --brand: #5C9BEF; --brand-hover: #7FB1F3; --brand-ink: #0B1220; --brand-soft: #18294A;
  --sun: #F0B04A; --sun-soft: #3A2C12; --good: #4CC28C; --good-soft: #12301F; --warn: #E3A945; --warn-soft: #362810;
  --bad: #EE7A72; --bad-soft: #3A1A18; --info: #A39BF0; --info-soft: #241F48; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0E131C; --surface: #161D29; --surface-2: #1D2634; --ink: #E7ECF3; --ink-2: #AEB8C7; --muted: #7F8A9B;
  --line: #2A3445; --brand: #5C9BEF; --brand-hover: #7FB1F3; --brand-ink: #0B1220; --brand-soft: #18294A;
  --sun: #F0B04A; --sun-soft: #3A2C12; --good: #4CC28C; --good-soft: #12301F; --warn: #E3A945; --warn-soft: #362810;
  --bad: #EE7A72; --bad-soft: #3A1A18; --info: #A39BF0; --info-soft: #241F48; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: .85rem; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.container { max-width: 1160px; margin: 0 auto; }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo img { width: 40px; height: 40px; flex: none; }
.logo b { font-family: var(--display); font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.logo b span { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a.navlink { white-space: nowrap; text-decoration: none; color: var(--ink-2); font-weight: 600; padding: 8px 12px; border-radius: 8px; font-size: .92rem; }
.nav a.navlink:hover { background: var(--surface-2); color: var(--ink); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-actions .menu-btn { display: none; }
.nav .mobile-only { display: none !important; }
.nav.open .mobile-only { display: block !important; }
@media (max-width: 1080px) {
  .nav .navlink { display: none; }
  .nav-actions .menu-btn { display: inline-flex; }
  .nav.open { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open .navlink { display: block; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-sun { background: var(--sun); color: #1D1505; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-good { background: var(--good-soft); color: var(--good); }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.iconbtn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }

/* Public bands */
.band { padding-block: 64px; }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.hero { padding-block: 48px 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero-copy .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 56ch; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 6px; }
.hero-facts div { display: grid; }
.hero-facts b { font-family: var(--display); font-size: 1.6rem; font-weight: 800; }
.hero-facts span { font-size: .82rem; color: var(--muted); }
.window { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 8px; padding: 8px; background: var(--ink); border-radius: 18px; box-shadow: var(--shadow); max-width: 460px; justify-self: end; width: 100%; }
.window .pane { border-radius: 10px; overflow: hidden; background: var(--surface); }
.window .pane.photo { grid-column: 1 / -1; aspect-ratio: 4 / 3; max-width: 100%; background: #FFFFFF; padding: 14px; }
.window .pane.photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.window .pane.info { padding: 14px; display: grid; gap: 2px; align-content: start; }
.window .pane.info b { font-family: var(--display); font-size: 1.05rem; }
.window .pane.info span { font-size: .8rem; color: var(--muted); }
.stars { color: var(--sun); letter-spacing: 1px; }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 680px; }
.section-head p { color: var(--ink-2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.about .bio { display: grid; gap: 14px; color: var(--ink-2); max-width: 64ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.factlist { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.factlist div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.factlist div:last-child { border-bottom: 0; }
.factlist dt, .factlist span:first-child { color: var(--muted); }
.price-card { display: grid; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); align-content: start; position: relative; }
.price-card.featured { border: 2px solid var(--brand); }
.price-card .tag { position: absolute; top: -12px; left: 20px; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.price { font-family: var(--display); font-size: 2.2rem; font-weight: 800; line-height: 1; }
.price small { font-family: var(--body); font-size: .85rem; font-weight: 500; color: var(--muted); }
.save { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--good); background: var(--good-soft); padding: 2px 8px; border-radius: 6px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.ticks li { display: flex; gap: 8px; }
.ticks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 4px; background: var(--brand-soft); box-shadow: inset 0 0 0 4px var(--brand-soft), inset 0 0 0 8px var(--brand); transform: scale(.75); }
.review { display: grid; gap: 10px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; align-content: start; }
.review footer { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--brand-soft); color: var(--brand); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { padding: 18px; border-top: 3px solid var(--brand); background: var(--surface); border-radius: 0 0 12px 12px; display: grid; gap: 6px; }
.step b { font-family: var(--display); font-size: 1.05rem; }
.step::before { counter-increment: step; content: var(--step-label, "Step") " " counter(step); font-size: .72rem; font-weight: 700; color: var(--brand); letter-spacing: .08em; text-transform: uppercase; }
details.faq { border-bottom: 1px solid var(--line); padding-block: 14px; }
details.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 1.2rem; color: var(--brand); }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding-top: 8px; color: var(--ink-2); max-width: 70ch; }
.cta-band { background: var(--brand); color: var(--brand-ink); border-radius: 20px; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta-band p { opacity: .85; }
.cta-band .btn-sun { flex: none; }
.footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: 1.05rem; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; cursor: pointer; }
.auth-wrap { max-width: 520px; margin: 40px auto; }
.divider { height: 1px; background: var(--line); margin-block: 6px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-pending { background: var(--warn-soft); color: var(--warn); }
.s-confirmed { background: var(--brand-soft); color: var(--brand); }
.s-completed, .s-paid { background: var(--good-soft); color: var(--good); }
.s-cancelled, .s-rejected, .s-noshow { background: var(--bad-soft); color: var(--bad); }
.s-info { background: var(--info-soft); color: var(--info); }

/* Booking */
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.option-list { display: grid; gap: 10px; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.option:hover { border-color: var(--brand); }
.option.sel { border: 2px solid var(--brand); padding: 13px 15px; background: var(--brand-soft); }
.option .t { display: grid; gap: 2px; min-width: 0; }
.option .t b { font-weight: 700; }
.option .t span { font-size: .82rem; color: var(--muted); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { display: grid; gap: 8px; align-content: start; min-width: 0; }
.day-h { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); }
.day-h b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day-h span { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.slot { padding: 7px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .82rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--brand); color: var(--brand); }
.slot.sel { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.noslots { font-size: .76rem; text-align: center; color: var(--muted); padding: 8px 0; }
@media (max-width: 760px) { .days { grid-template-columns: repeat(7, 88px); overflow-x: auto; padding-bottom: 6px; } .days-wrap { overflow-x: auto; } }
.summary { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); display: grid; gap: 14px; }
.sumline { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.sumline span:first-child { color: var(--muted); }
.paybox { display: grid; gap: 8px; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: .88rem; background: var(--surface-2); color: var(--ink-2); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--brand-soft); color: var(--ink); }
.notice.good { background: var(--good-soft); color: var(--good); }

/* App shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.side { border-right: 1px solid var(--line); background: var(--surface); padding: 18px 12px; display: grid; align-content: start; gap: 2px; }
.side .who { display: flex; gap: 10px; align-items: center; padding: 6px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side .who b { display: block; font-size: .92rem; line-height: 1.2; }
.side .who span { font-size: .76rem; color: var(--muted); }
.side a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.side a:hover { background: var(--surface-2); color: var(--ink); }
.side a.on { background: var(--brand-soft); color: var(--brand); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: #1D1505; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.work { padding-block: 28px 60px; min-width: 0; }
.work-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
@media (max-width: 880px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: flex; overflow-x: auto; gap: 4px; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 40; }
  .side .who, .side .sep { display: none; }
}
.sep { height: 1px; background: var(--line); margin: 10px 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi b { font-family: var(--display); font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi small { font-size: .78rem; color: var(--ink-2); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.actions { white-space: nowrap; text-align: right; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
.lesson { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lesson:last-child { border-bottom: 0; }
.datebox { width: 54px; flex: none; text-align: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); padding: 6px 0; }
.datebox b { display: block; font-family: var(--display); font-size: 1.3rem; line-height: 1; }
.datebox span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.lesson .meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lesson .meta b { font-size: .95rem; }
.lesson .meta span { font-size: .82rem; color: var(--muted); }
.lesson .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .84rem; cursor: pointer; color: var(--ink-2); }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; min-width: 940px; }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 260px; display: grid; grid-template-rows: auto 1fr; }
.cal-day.today { border-color: var(--brand); }
.cal-day header { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.cal-day header b { font-family: var(--display); }
.cal-day .body { padding: 8px; display: grid; gap: 6px; align-content: start; }
.ev { border-radius: 8px; padding: 7px 8px; font-size: .78rem; cursor: pointer; border-left: 3px solid var(--brand); background: var(--brand-soft); display: grid; gap: 1px; }
.ev.pending { border-color: var(--warn); background: var(--warn-soft); }
.ev.completed { border-color: var(--good); background: var(--good-soft); }
.ev.off { border-color: var(--bad); background: var(--bad-soft); cursor: default; }
.ev b { font-variant-numeric: tabular-nums; }
.avail-note { font-size: .72rem; color: var(--muted); }
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-height: 480px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 600px; }
.chat-list button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.chat-list button.on { background: var(--brand-soft); }
.chat-list .nm { font-weight: 700; font-size: .88rem; }
.chat-list .pv { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.msgs { padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 520px; }
.msg { max-width: 75%; padding: 9px 13px; border-radius: 14px; font-size: .9rem; background: var(--surface-2); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); }
.msg time { display: block; font-size: .7rem; opacity: .7; margin-top: 3px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .chat { grid-template-columns: minmax(0, 1fr); } .chat-list { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); } }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--brand); }
.chart .bar:hover, .chart .hit:hover + .bar { fill: var(--brand-hover); }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 6px 9px; border-radius: 8px; font-size: .78rem; white-space: nowrap; transform: translate(-50%, -110%); }
.chart-box { position: relative; }
.wk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wk-row:last-child { border-bottom: 0; }
.ranges { display: grid; gap: 8px; }
.range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.range .input { width: 120px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(10,15,25,.45); z-index: 80; display: grid; justify-items: end; }
.drawer { background: var(--bg); width: min(560px, 100%); height: 100%; overflow-y: auto; padding: calc(env(safe-area-inset-top, 0px) + 22px) max(22px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) 22px; display: grid; gap: 16px; align-content: start; box-shadow: var(--shadow); }
.modal-bg { position: fixed; inset: 0; background: rgba(10,15,25,.45); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 16px; width: min(480px, 100%); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.toast { position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .9rem; z-index: 100; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.mode-bar { background: var(--sun-soft); color: var(--ink); font-size: .84rem; padding-block: 8px; border-bottom: 1px solid var(--line); }
.mode-bar .container { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mode-bar b { color: var(--warn); }
.rating-input { display: flex; gap: 4px; }
.rating-input button { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--line); padding: 0 2px; }
.rating-input button.on { color: var(--sun); }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } .book-grid { grid-template-columns: minmax(0, 1fr); } .summary { position: static; } }
@media (max-width: 880px) { .hero-grid, .about { grid-template-columns: minmax(0, 1fr); } .window { justify-self: start; } .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nav-actions .btn-ghost:not(.menu-btn), .nav-actions .btn-soft { display: none; } .logo { min-width: 0; overflow: hidden; } .grid-2, .grid-3, .grid-4, .steps, .form-grid { grid-template-columns: minmax(0, 1fr); } .band { padding-block: 44px; } .cta-band { padding: 24px; } .lesson { flex-wrap: wrap; } .lesson .acts { width: 100%; justify-content: flex-start; } .logo b { font-size: 1rem; } .wk-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 440px) { .logo b { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- Server-rendered additions ---- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.flashes { display: grid; gap: 8px; padding-top: 14px; }
.flash { padding: 12px 16px; border-radius: 10px; font-size: .92rem; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.flash-success { background: var(--good-soft); color: var(--good); }
.flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-info { background: var(--brand-soft); color: var(--ink); }
.flash button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 1.1rem; }
.errors { background: var(--bad-soft); color: var(--bad); padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.errors ul { margin: 0; padding-left: 18px; }
.inline-form { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tabs a.tab { text-decoration: none; display: inline-block; }
.slot { text-decoration: none; text-align: center; color: var(--ink); display: block; }
.option { text-decoration: none; color: var(--ink); }
.pay-choice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.pay-choice:has(input:checked) { border: 2px solid var(--brand); padding: 11px 13px; background: var(--brand-soft); }
.pay-choice .t { display: grid; gap: 1px; }
.pay-choice .t span { font-size: .8rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.copy { user-select: all; overflow-wrap: anywhere; }
details.box { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 14px 18px; }
details.box summary { cursor: pointer; font-weight: 700; }
.chart-tip { z-index: 5; }
.side form { margin: 0; }
.side .linkish { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; color: var(--ink-2); font-weight: 600; font-size: .9rem; cursor: pointer; }
.side .linkish:hover { background: var(--surface-2); }
.photo-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.setup-list { display: grid; gap: 8px; }
.setup-list a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); text-decoration: none; font-size: .9rem; }
.review-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.review-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.review-stars label { font-size: 1.7rem; color: var(--line); cursor: pointer; }
.review-stars input:checked ~ label, .review-stars label:hover, .review-stars label:hover ~ label { color: var(--sun); }
.review-stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.notfound { padding-block: 80px; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* Intro video in the hero window */
.window .pane.video { grid-column: 1 / -1; aspect-ratio: 16 / 9; max-width: 100%; background: #000; position: relative; }
.window .pane.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; display: block; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .2s; }
.video-facade:hover img { opacity: 1; }
.video-facade .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); transition: transform .15s; }
.video-facade:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.video-facade .video-label { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.mini-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.window .pane.info span b { color: var(--ink); font-size: 1.05rem; font-family: var(--display); }
.window .pane.info span span { font-size: .8rem; color: var(--muted); }

/* Live classroom */
.room-bar { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 8px; }
.room-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; min-width: 0; }
.room-frame { display: block; width: 100%; height: calc(100vh - 64px - 52px); height: calc(100dvh - 64px - 52px); min-height: 480px; border: 0; background: #0E131C; }

/* ===== Update 5: smooth & dynamic ===== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Page transitions (Chrome, Edge, Safari 18+). Header and sidebar stay still; content fades and slides. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: topbar; transition: box-shadow .2s; }
.topbar.scrolled { box-shadow: 0 6px 18px rgba(20,35,60,.08); }
.side { view-transition-name: sidebar; }
::view-transition-old(root) { animation: vt-out .16s ease-in both; }
::view-transition-new(root) { animation: vt-in .26s cubic-bezier(.2,.8,.2,1) both; }
.vt-same::view-transition-old(root), .vt-same::view-transition-new(root) { animation-duration: .12s; animation-name: vt-fade; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes vt-fade { from { opacity: .4; } }
.page-enter { animation: vt-in .26s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* Top progress bar */
.nprogress { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; height: 3px; width: 0; z-index: 200; background: linear-gradient(90deg, var(--brand), var(--sun)); box-shadow: 0 0 8px rgba(26,99,194,.5); opacity: 0; pointer-events: none; }
.nprogress.run { opacity: 1; animation: np-grow 8s cubic-bezier(.1,.6,.2,1) forwards; }
.nprogress.run.done { animation: none; width: 100%; opacity: 0; transition: width .18s ease, opacity .3s .15s; }
@keyframes np-grow { 0% { width: 0; } 10% { width: 35%; } 40% { width: 70%; } 100% { width: 92%; } }

/* Toast notifications */
#toasts { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 76px); right: max(16px, env(safe-area-inset-right, 0px)); z-index: 150; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
#toasts .flash { pointer-events: auto; box-shadow: 0 10px 30px rgba(20,35,60,.16); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 13px 14px 13px 16px; border-left: 4px solid var(--brand); opacity: 0; transform: translateX(16px); transition: opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1); font-weight: 600; }
#toasts .flash.in { opacity: 1; transform: none; }
#toasts .flash.out { opacity: 0; transform: translateX(16px); }
#toasts .flash-success { border-left-color: var(--good); }
#toasts .flash-success span::before { content: "✓ "; color: var(--good); font-weight: 800; }
#toasts .flash-error { border-left-color: var(--bad); }
#toasts .flash-error span::before { content: "! "; color: var(--bad); font-weight: 800; }
#toasts .flash-info { border-left-color: var(--brand); }
@media (max-width: 560px) { #toasts { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); left: max(16px, env(safe-area-inset-left, 0px)); width: auto; } #toasts .flash { transform: translateY(16px); } }

/* Buttons: press feedback and loading spinner */
.btn { transition: background .15s, border-color .15s, transform .12s, box-shadow .2s, color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(26,99,194,.28); }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) rgba(255,255,255,.25) rgba(255,255,255,.25); animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-soft.is-loading::after, .btn-good.is-loading::after, .btn-danger.is-loading::after { border-color: var(--brand) var(--brand) var(--line) var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards and options: hover lift */
.price-card, .review, .kpi, .option, .slot, .step, .cal-day .ev, .lesson, .chat-list a, table.t tr.click td { transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .2s, border-color .15s, background .15s; }
.price-card:hover, .review:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,35,60,.10); }
.kpi:hover { box-shadow: 0 8px 20px rgba(20,35,60,.07); }
.option:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,35,60,.07); }
.slot:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26,99,194,.15); }
.slot.sel { animation: pop .25s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { 50% { transform: scale(1.06); } }
.cal-day .ev:hover { transform: translateX(2px); }
.side a { transition: background .15s, color .15s; }
.navlink { transition: background .15s, color .15s; }

/* Reveal on scroll (only when JavaScript is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; } .hero-copy > *:nth-child(3) { animation-delay: .12s; } .hero-copy > *:nth-child(4) { animation-delay: .18s; } .hero-copy > *:nth-child(5) { animation-delay: .24s; }
  .hero .window { animation: rise .7s .1s cubic-bezier(.2,.8,.2,1) both; }
  .badge { animation: pop .4s cubic-bezier(.2,.8,.2,1); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
h1[tabindex="-1"]:focus { outline: none; }
section[id] { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 72px); }

/* Legal pages, cookie notice, footer links */
.legal-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-nav { display: grid; gap: 4px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.legal-nav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.legal-nav a:hover { background: var(--surface-2); }
.legal-nav a.on { background: var(--brand-soft); color: var(--brand); }
.legal { padding: 32px 36px; display: grid; gap: 12px; max-width: 820px; }
.legal h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.legal h2 { font-size: 1.15rem; margin-top: 14px; }
.legal p, .legal li { color: var(--ink-2); max-width: 72ch; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 760px) { .legal-wrap { grid-template-columns: minmax(0, 1fr); } .legal-nav { position: static; display: flex; overflow-x: auto; } .legal { padding: 22px; } }
.footer .container { row-gap: 14px; }
.legal-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.legal-links a { color: var(--muted); }
.cookie-note { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 140; max-width: 460px; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(20,35,60,.16); font-size: .84rem; color: var(--ink-2); transition: opacity .3s, transform .3s; }
.cookie-note.out { opacity: 0; transform: translateY(10px); }
@media (max-width: 560px) { .cookie-note { right: max(16px, env(safe-area-inset-right, 0px)); max-width: none; } }

/* ===== Update 7: languages, level test, stronger landing ===== */
/* Language switcher */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .8rem; color: var(--ink-2); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary, .lang-switch summary:hover { border-color: var(--brand); color: var(--brand); }
.lang-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: grid; z-index: 60; animation: pop .16s ease; }
.lang-menu a { padding: 8px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a.on { background: var(--brand-soft); color: var(--brand); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Trust badges + quote pane */
.trust { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trust li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.trust svg { color: var(--brand); flex: none; }
.window .pane.quote { grid-column: 1 / -1; padding: 14px 16px; display: grid; gap: 6px; }
.window .pane.quote p { margin: 0; font-size: .92rem; color: var(--ink); line-height: 1.5; }
.window .pane.quote .stars { color: var(--sun); letter-spacing: 2px; font-size: .85rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 22px 12px 10px; color: #fff; font-size: .82rem; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
@media (max-width: 720px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Level test promo */
.level-band { background: linear-gradient(135deg, var(--brand-soft), var(--sun-soft)); }
.level-promo { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 28px; align-items: center; }
.level-scale { display: flex; gap: 6px; align-items: flex-end; height: 92px; }
.level-scale span { flex: 1; display: grid; place-items: end center; padding-bottom: 6px; border-radius: 8px 8px 4px 4px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: .8rem; color: var(--ink-2); height: calc(34% + var(--i, 0) * 13%); }
.level-scale span:nth-child(n+3) { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.level-scale span:nth-child(n+5) { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); color: var(--ink); }
.level-scale.result span { height: auto; padding: 10px 0; place-items: center; border-radius: 8px; background: var(--surface-2); }
.level-scale.result { height: auto; align-items: stretch; }
.level-scale.result span.on { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.level-scale.result span.me { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); transform: scale(1.06); box-shadow: 0 6px 16px rgba(26,99,194,.3); }
@media (max-width: 880px) { .level-promo { grid-template-columns: minmax(0, 1fr); } .level-promo .btn { justify-self: start; } }

/* Sticky mobile call to action */
.sticky-cta { display: none; }
@media (max-width: 720px) {
  .sticky-cta { display: flex; gap: 8px; position: fixed; inset-inline: 0; bottom: 0; z-index: 90; padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .sticky-cta.show { transform: none; }
  .sticky-cta .btn-primary { flex: 1; justify-content: center; }
  body.has-sticky-cta .footer { padding-bottom: 84px; }
  body.has-sticky-cta #toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }
}

/* Level test */
.lt { display: grid; gap: 16px; }
.lt-progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lt-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--sun)); border-radius: inherit; transition: width .35s cubic-bezier(.2,.8,.2,1); }
.lt-count { margin: -6px 0 0; }
.lt-q { border: 1px solid var(--line); margin: 0; padding: 22px; display: grid; gap: 14px; }
.lt-q legend { float: left; width: 100%; padding: 0; margin-bottom: 4px; }
.lt-text { font-family: var(--display); font-size: clamp(1.2rem, 2.6vw, 1.55rem); font-weight: 600; margin: 0; }
.lt-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lt-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; background: var(--surface); transition: border-color .15s, background .15s, transform .12s; }
.lt-opt:hover { border-color: var(--brand); }
.lt-opt:active { transform: scale(.98); }
.lt-opt input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.lt-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.lt.js .lt-q { display: none; }
.lt.js .lt-q.on { display: grid; animation: ltin .28s cubic-bezier(.2,.8,.2,1); }
.lt:not(.js) .lt-progress, .lt:not(.js) .lt-count, .lt:not(.js) [data-lt-prev], .lt:not(.js) [data-lt-skip] { display: none; }
@keyframes ltin { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
[dir="rtl"] .lt.js .lt-q.on { animation-name: ltin-rtl; }
@keyframes ltin-rtl { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .lt-opts { grid-template-columns: minmax(0, 1fr); } .lt-q { padding: 18px; } }
.lt-result { display: grid; gap: 14px; text-align: center; justify-items: center; padding: 30px 22px; }
.lt-result .level-scale { width: min(100%, 460px); }
.lt-badge { display: grid; gap: 2px; justify-items: center; }
.lt-badge b { font-family: var(--display); font-size: 3.4rem; line-height: 1; color: var(--brand); }
.lt-badge span { font-weight: 700; font-size: 1.1rem; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 720px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* Booking extras: weekly repeat, codes, group strip */
.repeat-box { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.repeat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; font-size: .85rem; }
.repeat-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: 6px; background: var(--surface); }
.repeat-list li.ok span:last-child { color: var(--good); font-weight: 600; }
.repeat-list li.no { opacity: .6; text-decoration: line-through; }
.repeat-list li.no span:last-child { text-decoration: none; color: var(--bad); }
.coupon-box { display: flex; gap: 8px; align-items: center; }
.coupon-box .input { flex: 1; min-width: 0; }
.group-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ===== Right-to-left (Arabic) ===== */
[dir="rtl"] body { font-family: "Tajawal", var(--body); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .lt-badge span { font-family: "Tajawal", var(--display); letter-spacing: 0; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .flip { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .price-card .tag { left: auto; right: 20px; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
@media (max-width: 880px) { [dir="rtl"] .side { border-left: 0; } }
[dir="rtl"] .errors ul, [dir="rtl"] .legal ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .video-facade .video-label { left: auto; right: 12px; }
[dir="rtl"] .chat-list { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .chat-list button { text-align: right; }
[dir="rtl"] #toasts { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); }
[dir="rtl"] #toasts .flash { border-left: 1px solid var(--line); border-right: 4px solid var(--brand); padding: 13px 16px 13px 14px; transform: translateX(-16px); }
[dir="rtl"] #toasts .flash.in { transform: none; }
[dir="rtl"] #toasts .flash.out { transform: translateX(-16px); }
[dir="rtl"] #toasts .flash-success { border-right-color: var(--good); }
[dir="rtl"] #toasts .flash-error { border-right-color: var(--bad); }
@media (max-width: 560px) { [dir="rtl"] #toasts { right: max(16px, env(safe-area-inset-right, 0px)); } }
[dir="rtl"] .cookie-note { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); }
[dir="rtl"] .lt-q legend { float: right; }
[dir="rtl"] .input[type="email"], [dir="rtl"] .input[type="tel"], [dir="rtl"] .num { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .input[type="email"], [dir="rtl"] .input[type="tel"] { text-align: right; }
.lt.js .lt-q legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Update 9: group classes, codes, referrals ===== */
.group-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .15s, box-shadow .2s; }
.group-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.group-card .gc-date { width: 56px; flex: none; text-align: center; border-radius: 10px; background: var(--sun-soft); color: var(--warn); padding: 8px 0; }
.group-card .gc-date b { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.group-card .gc-date span { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.group-card .gc-body { display: grid; gap: 4px; min-width: 0; flex: 1; }
.group-card .gc-body > b { font-size: 1rem; line-height: 1.3; }
.group-card .gc-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-weight: 700; }
.group-card.compact { box-shadow: none; padding: 12px; }
.referral { background: linear-gradient(135deg, var(--surface), var(--sun-soft)); }
.coupon-box { flex-wrap: wrap; }
.lesson { flex-wrap: wrap; }
.lesson .meta { flex: 1 1 210px; }

/* Header: keep everything on one line; the full menu collapses into ☰ below 1080px */
.nav-actions .btn { white-space: nowrap; }
@media (min-width: 1081px) { .nav.open .mobile-only { display: none !important; } }
@media (min-width: 1081px) and (max-width: 1240px) { .nav a.navlink { padding: 8px 9px; font-size: .88rem; } .nav-actions { gap: 6px; } }
@media (max-width: 1080px) { .nav-actions { margin-left: auto; } [dir="rtl"] .nav-actions { margin-left: 0; margin-right: auto; } }

/* ===== Contact section ===== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list li > span:last-child { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.contact-list small { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-list a { font-weight: 700; color: var(--ink); text-decoration: none; }
.contact-list a:hover { color: var(--brand); text-decoration: underline; }
.contact-list .ci { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.contact-list .ci.wa { background: #DCF8E6; color: #128C4A; }
.contact-form { padding: 24px; position: relative; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
[dir="rtl"] .contact-list small { letter-spacing: 0; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ===== Availability grid (tutor) ===== */
.av-card { position: relative; display: grid; gap: 12px; }
.av-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.av-help { margin: 0; }
.av-legend { display: inline-flex; align-items: center; gap: 6px; }
.av-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.av-legend i.lo { background: hsla(215, 85%, 72%, .45); }
.av-legend i.hi { background: hsla(330, 85%, 72%, .72); margin-inline-start: 6px; }
.av-grid { --pm: .5px; --row: calc(30 * var(--pm)); user-select: none; -webkit-user-select: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
@media (min-height: 900px) { .av-grid { --pm: .55px; } }
.avg-head, .avg-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.avg-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.avg-dh { padding: 8px 4px; text-align: center; border-inline-start: 1px solid var(--line); display: grid; gap: 1px; }
.avg-dh b { font-size: .82rem; }
.avg-dh small { font-size: .7rem; color: var(--muted); min-height: 1em; }
.avg-body { position: relative; height: calc(1440 * var(--pm)); overflow: hidden; }
.avg-times { position: relative; }
.avg-times span { position: absolute; inset-inline: 0; top: calc(var(--r) * var(--row)); transform: translateY(-50%); font-size: .66rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.avg-times span:first-child { transform: none; }
.avg-col { position: relative; border-inline-start: 1px solid var(--line); cursor: crosshair; touch-action: pan-x pan-y;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 100% calc(2 * var(--row)), 100% var(--row); }
.avg-heat { position: absolute; inset: 0; pointer-events: none; transition: opacity .2s; }
.avg-heat i { position: absolute; inset-inline: 0; top: calc(var(--r) * var(--row)); height: var(--row); }
.heat-off .avg-heat { opacity: 0; }
.avg-night { position: absolute; inset-inline: 52px 0; top: 0; height: calc(360 * var(--pm)); background: color-mix(in srgb, var(--ink) 5%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); pointer-events: none; }
.avg-night span { position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%); background: var(--ink); color: var(--bg); font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.avg-blocks { position: absolute; inset: 0; }
.avb { position: absolute; inset-inline: 4px; background: #2C2D3A; color: #fff; border-radius: 6px; padding: 4px 7px; cursor: grab; box-shadow: 0 2px 6px rgba(0,0,0,.18); overflow: hidden; transition: box-shadow .15s, transform .12s; z-index: 2; }
:root[data-theme="dark"] .avb { background: #3B4A66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avb { background: #3B4A66; } }
.avb:hover { box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.avb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.avb b { font-size: .7rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.avb.short b { font-size: .64rem; }
.avb-h { position: absolute; inset-inline: 0; height: 8px; cursor: ns-resize; }
.avb-h.t { top: 0; } .avb-h.b { bottom: 0; }
.avb-h::after { content: ""; position: absolute; left: 50%; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: rgba(255,255,255,.55); opacity: 0; transition: opacity .15s; }
.avb-h.t::after { top: 2px; } .avb-h.b::after { bottom: 2px; }
.avb:hover .avb-h::after { opacity: 1; }
.avb.ghost { background: var(--brand); opacity: .92; z-index: 3; cursor: grabbing; box-shadow: 0 8px 20px rgba(26,99,194,.35); }
.av-grid.dragging, .av-grid.dragging * { cursor: grabbing !important; }
.av-pop { position: absolute; z-index: 20; width: 250px; padding: 14px; display: grid; gap: 10px; box-shadow: 0 12px 32px rgba(20,35,60,.2); animation: pop .15s ease; }
.av-pop .input { padding: 6px 8px; min-height: 0; }
@media (max-width: 760px) {
  .av-grid { --pm: 1px; overflow-x: auto; }
  .avg-head, .avg-body { min-width: 640px; }
  .avg-body { max-height: 70vh; overflow-y: auto; }
  .avg-head { position: sticky; top: 0; z-index: 4; }
}

/* ===== Automatic emails & Google card ===== */
.fu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .fu-grid { grid-template-columns: minmax(0, 1fr); } }
.fu-card.off { opacity: .72; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
[dir="rtl"] .switch input:checked + span::before { transform: translateX(-20px); }
[dir="rtl"] .switch span::before { left: auto; right: 3px; }
.gcal-card .gcal-logo { display: inline-flex; }
.gcal-steps { display: grid; gap: 8px; padding-inline-start: 20px; margin: 10px 0 0; line-height: 1.55; }
.gcal-uri { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); padding: 3px 8px; border-radius: 6px; display: inline-block; margin-top: 4px; }

/* Brand: "English Windows" with a small "ACADEMY" line underneath */
.logo b { display: grid; line-height: 1.05; }
.logo b .lw span { color: var(--brand); }
.logo b small { font-family: var(--body); font-size: .62rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
[dir="rtl"] .logo b small { letter-spacing: .2em; }
/* Header that would not fit on one line (long brand or long translations): fold the menu into ☰ automatically */
@media (min-width: 1081px) { .logo { flex: none; } .topbar .container { max-width: 1360px; } }
@media (max-width: 1080px) { .logo { min-width: 0; overflow: hidden; } .logo b { min-width: 0; } .logo b .lw, .logo b small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.nav-collapsed .nav .navlink { display: none; }
.nav-collapsed .nav-actions .menu-btn { display: inline-flex; }
.nav-collapsed .nav-actions { margin-left: auto; }
[dir="rtl"] .nav-collapsed .nav-actions { margin-left: 0; margin-right: auto; }
.nav-collapsed .nav.open { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
.nav-collapsed .nav.open .navlink { display: block; }
.nav-collapsed .nav.open .mobile-only { display: block !important; }
@media (max-width: 560px) { .logo { flex: 0 1 auto; } .logo b { display: none; } }
.logo b .lw { color: var(--ink); }
