/* ESSENTIQ Education — интерфейс в фирменном стиле ESSENTIQ FRAGRANCE.
   Цвета, шрифты, радиусы и тени — из tokens.css (брендбук). */

:root {
  --font-display: 'Essentiq Display', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Essentiq Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-xl: 36px;
  --inv-bg: #141414;
  --inv-ink: #F1F1EC;
  --inv-ink-2: #B4B4AC;
  --nav-w: 264px;
  --arrow-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
  --arrow-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
  --arrow-lime: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e4f222' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
  --cross-err: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b03a2e' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--text-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; line-height: 1.1; }
h1 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.05; }
h2 { font-size: clamp(20px, 2.2vw, 26px); }
h3 { font-size: 17px; line-height: 1.25; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot img { width: 180px; opacity: .8; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* маркер и подложка */
.mark { background: linear-gradient(transparent 58%, var(--lime) 58% 92%, transparent 92%); padding: 0 .08em; color: inherit; }
.inv .mark { background: none; color: var(--lime); padding: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: var(--text-eyebrow); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); flex: none; }
.inv .eyebrow { color: var(--inv-ink-2); }
.inv .eyebrow::before { box-shadow: 0 0 0 2px var(--inv-ink); }

/* ── layout ── */
.side { position: fixed; inset: 0 auto 0 0; width: var(--nav-w); padding: 26px 18px; display: flex; flex-direction: column; z-index: 20; border-right: 1px solid var(--line); background: var(--bg); }
.side .logo { height: 34px; width: auto; margin: 0 10px 2px; }
.side .sub { font: var(--text-eyebrow); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); margin: 6px 12px 0; font-size: 10.5px; }
.side nav { margin-top: 30px; display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-pill); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s; }
.side nav a:hover { background: var(--glass); color: var(--ink); }
.side nav a.on { background: var(--ink); color: var(--on-ink); }
.side .sep { height: 1px; background: var(--line); margin: 14px 10px; }
.side .me { margin-top: auto; padding: 14px 16px; border-radius: var(--radius-md); background: linear-gradient(150deg, var(--card), var(--card-2)); box-shadow: var(--shadow-card); font-size: 13px; color: var(--ink-2); }
.side .me b { display: block; color: var(--ink); font-size: 14px; }
.main { margin-left: var(--nav-w); padding: 40px 48px 72px; max-width: calc(1180px + var(--nav-w)); }
.topbar, .tabbar { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 18px 16px 110px; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; position: sticky; top: 0; z-index: 15; background: var(--top-bg); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--line); }
  .topbar .logo { height: 26px; width: auto; }
  .topbar a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--glass-line); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; z-index: 20; border-radius: 26px; background: var(--top-bg); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid var(--glass-line); box-shadow: 0 18px 40px -20px rgba(30,30,20,.4); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--ink-2); font-size: 10px; font-weight: 600; padding: 7px 0; border-radius: 20px; }
  .tabbar a.on { background: var(--ink); color: var(--on-ink); }
}

/* ── page head with ghost word ── */
.page-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; padding-top: 18px; }
.page-head[data-ghost]::before { content: attr(data-ghost); position: absolute; left: -6px; top: -14px; font: 800 clamp(56px, 9vw, 128px)/.86 var(--font-display); letter-spacing: -.02em; text-transform: uppercase; color: var(--ghost); white-space: nowrap; pointer-events: none; z-index: 0; }
.page-head > * { position: relative; z-index: 1; }
.main { overflow-x: clip; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }

/* ── cards ── */
.card { background: linear-gradient(150deg, var(--card), var(--card-2)); border: 1px solid var(--card-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 22px 24px 24px; min-width: 0; }
.card + .card { margin-top: 16px; }
.inv { background: var(--inv-bg); color: var(--inv-ink); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.inv .muted { color: var(--inv-ink-2); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.section { margin-top: 44px; }
.section-title { margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.section-title::after { content: ""; width: 44px; height: 4px; border-radius: 4px; background: var(--lime); }

/* chrome objects */
.chrome { position: absolute; pointer-events: none; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); z-index: 0; }

/* ── hero (black inset) ── */
.hero { padding: 34px 36px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: var(--inv-ink); }
.hero .lvl { font: 700 22px/1.1 var(--font-display); color: var(--lime); margin-top: 4px; }
.hero .chrome { width: 220px; right: -54px; top: -60px; opacity: .95; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: end; }
.fact { background: var(--card); color: var(--ink); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 14px 18px; }
.fact b { display: block; font: var(--text-fact); font-size: 26px; }
.fact span { font-size: 13px; color: var(--ink-2); }
.fact.wide { grid-column: span 2; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero .chrome { width: 150px; right: -40px; top: -40px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fact { padding: 12px 12px; } .fact b { font-size: 20px; } .fact span { font-size: 11.5px; } .fact.wide { grid-column: auto; }
}

.bar { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width .4s; }
.inv .bar { background: rgba(255,255,255,.14); }
.inv .bar > i { background: var(--lime); }

/* ── bento tracks ── */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.bento .track { grid-column: span 2; }
.bento .track.big { grid-row: span 2; }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .track { grid-column: span 2; } .bento .track.big { grid-row: auto; } }
.track { display: flex; flex-direction: column; gap: 14px; text-decoration: none; position: relative; overflow: hidden; transition: transform .15s; }
.track:hover { transform: translateY(-2px); }
.track .tile { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--tile); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); flex: none; }
.track .tile .ic { width: 22px; height: 22px; }
.track p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.track .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.track .cover { position: absolute; right: -20px; bottom: -20px; width: 46%; max-width: 260px; pointer-events: none; }
.track.inv { padding: 28px; min-height: 340px; justify-content: space-between; }
.track.inv p, .track.inv .meta { color: var(--inv-ink-2); }
.track.inv .tile { background: rgba(255,255,255,.08); box-shadow: none; color: var(--lime); }
.track.inv h2 { color: var(--inv-ink); max-width: 70%; }
.track.inv .cover { width: 52%; max-width: 320px; right: -30px; bottom: -30px; }
.track .body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }

/* ── buttons: таблетка со стрелкой в круге ── */
.btn { display: inline-flex; align-items: center; gap: 14px; border: 0; border-radius: var(--radius-pill); padding: 8px 8px 8px 24px; font: var(--text-button); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease;
  background: var(--ink); color: var(--on-ink); }
.btn::after { content: ""; width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--arrow-light) center/16px no-repeat, var(--ink-soft); }
.btn:hover { transform: translateY(-2px); }
.btn.gold { background: var(--lime); color: var(--lime-ink); box-shadow: var(--shadow-lime); }
.btn.gold::after { background: var(--arrow-lime) center/16px no-repeat, var(--lime-ink); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow-card); }
.btn.ghost::after { background: var(--arrow-dark) center/16px no-repeat, var(--card-2); }
.btn.danger { background: var(--card); color: var(--err); box-shadow: var(--shadow-card); }
.btn.danger::after { background: var(--cross-err) center/16px no-repeat, var(--err-bg); }
.btn.sm { padding: 5px 5px 5px 16px; font-size: 13.5px; gap: 10px; }
.btn.sm::after { width: 30px; height: 30px; background-size: 13px; }
.btn.block { width: 100%; justify-content: space-between; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.inv .btn.ghost { background: rgba(255,255,255,.08); color: var(--inv-ink); box-shadow: none; }
.inv .btn.ghost::after { background: var(--arrow-light) center/16px no-repeat, rgba(255,255,255,.12); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* chips: фильтры, подразделы, переключатели */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 0; background: var(--card); box-shadow: var(--shadow-card); padding: 9px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--ink); color: var(--on-ink); box-shadow: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); font-size: 12.5px; background: var(--tile); color: var(--ink); font-weight: 600; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); }
.pill.ok { background: var(--lime); color: var(--lime-ink); box-shadow: none; }
.pill.bad { background: var(--err-bg); color: var(--err); box-shadow: inset 0 0 0 1px rgba(176,58,46,.25); }
.pill.grey { color: var(--ink-2); }
.pill.dark { background: var(--ink); color: var(--on-ink); box-shadow: none; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 640px) { .badges { grid-template-columns: repeat(2, 1fr); } }
.badge { padding: 18px 16px; border-radius: var(--radius-md); background: var(--tile); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.badge .bi { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); margin-bottom: 12px; }
.badge b { display: block; font: 700 14px/1.25 var(--font-display); margin-bottom: 4px; }
.badge span { font-size: 12.5px; }
.badge.on { background: linear-gradient(150deg, var(--card), var(--card-2)); color: var(--ink); box-shadow: var(--shadow-card); }
.badge.on span { color: var(--ink-2); }
.badge.on .bi { background: var(--lime); color: var(--lime-ink); }

/* lesson rows */
.list { padding: 8px; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-md); text-decoration: none; transition: background .12s; }
.lesson-row:hover { background: var(--tile); }
.lesson-row .num { width: 38px; height: 38px; border-radius: 50%; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font: 700 14px var(--font-display); flex: none; }
.lesson-row .num.done { background: var(--lime); box-shadow: none; }
.lesson-row .num.fail { background: var(--err-bg); color: var(--err); box-shadow: none; }
.lesson-row .t { flex: 1; min-width: 0; }
.lesson-row .t b { font-weight: 700; }

/* lesson */
.prose { font-size: 17px; line-height: 1.65; max-width: 720px; }
.prose h3 { margin: 28px 0 10px; font-size: 19px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding: 0; list-style: none; }
.prose li { margin-bottom: 8px; padding-left: 22px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); }
.prose strong { font-weight: 700; }
.lesson-card { padding: 34px 40px; }
@media (max-width: 640px) { .lesson-card { padding: 24px 20px; } }
.video { position: relative; padding-top: 56.25%; border-radius: var(--radius-lg); overflow: hidden; background: #000; margin: 0 0 24px; max-width: 800px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* quiz */
.quiz { max-width: 760px; }
.q { margin-bottom: 18px; }
.q h3 { font: 700 17px/1.35 var(--font-display); margin-bottom: 16px; }
.opt { display: block; width: 100%; text-align: left; padding: 15px 18px; border: 0; background: var(--input-bg); border-radius: var(--radius-md); margin-bottom: 10px; cursor: pointer; transition: transform .12s, background .12s; line-height: 1.45; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.opt:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--ink-3); }
.opt.sel { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.opt.ok { background: var(--lime); color: var(--lime-ink); box-shadow: none; font-weight: 600; }
.opt.bad { background: var(--err-bg); color: var(--err); box-shadow: inset 0 0 0 1px rgba(176,58,46,.3); }
.opt:disabled { cursor: default; }
.explain { font-size: 14px; color: var(--ink-2); background: var(--tile); padding: 12px 16px; border-radius: 14px; margin-top: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.verdict { font: 700 15px var(--font-display); margin-top: 8px; }
.verdict.ok { color: var(--ink); } .verdict.ok::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); margin-right: 8px; }
.verdict.bad { color: var(--err); }
.client-says { font: 700 clamp(19px, 2.4vw, 25px)/1.3 var(--font-display); padding: 22px 26px; background: var(--inv-bg); color: var(--inv-ink); border-radius: 26px 26px 26px 8px; margin-bottom: 18px; }
.client-says::before { content: "«"; color: var(--lime); } .client-says::after { content: "»"; color: var(--lime); }
.result { text-align: center; padding: 40px 24px; }
.result .big { font: 700 clamp(56px, 8vw, 84px)/1 var(--font-display); }
.result .chrome { width: 200px; left: -50px; bottom: -60px; }
.result .chrome.r { left: auto; right: -40px; top: -50px; bottom: auto; width: 160px; }
.result h2 { color: var(--inv-ink); }
.progress-dots { display: flex; gap: 5px; margin-bottom: 18px; }
.progress-dots i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.progress-dots i.ok { background: var(--ink); } .progress-dots i.bad { background: var(--err); } .progress-dots i.cur { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(20,20,20,.25); }

/* forms */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font: var(--text-label); margin: 0 0 6px 4px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; height: 52px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius-input); background: var(--input-bg); font-weight: 500; outline: none; }
textarea { height: auto; min-height: 96px; padding: 14px 18px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 280px; font-size: 14.5px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
input[type=search] { height: 56px; border-radius: var(--radius-pill); padding: 0 24px; box-shadow: var(--shadow-card); border-color: transparent; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.checks input { width: 18px; height: 18px; accent-color: #141414; }
.hint { font-size: 13px; color: var(--ink-2); margin: -4px 0 14px 4px; }
.err { color: var(--err); font-size: 13.5px; min-height: 20px; margin: 10px 0 0 4px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.login .left { padding: 40px 56px; display: flex; flex-direction: column; }
.login .left .logo { height: 40px; width: auto; }
.login .left .inner { margin: auto 0; max-width: 420px; padding: 40px 0; }
.login h1 { font-size: clamp(30px, 3.6vw, 48px); margin-bottom: 14px; }
.login .lead { font: var(--text-lead); color: var(--ink-2); margin: 0 0 28px; }
.login .art { position: relative; margin: 16px 16px 16px 0; border-radius: var(--radius-xl); overflow: hidden; background: radial-gradient(ellipse at 50% 55%, #f7f7f5 0%, var(--bg) 70%); }
.login .art img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 55%, transparent 100%); }
.login .art .tag { position: absolute; left: 28px; bottom: 28px; right: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-card); }
.lang-switch button { border: 0; background: transparent; padding: 7px 16px; border-radius: var(--radius-pill); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.lang-switch button.on { background: var(--ink); color: var(--on-ink); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login .art { order: -1; height: 230px; margin: 12px 12px 0; }
  .login .art .tag { display: none; }
  .login .left { padding: 22px 20px 40px; }
  .login .left .inner { padding: 24px 0 0; margin: 0; }
}

/* tables */
.table-wrap { overflow-x: auto; background: linear-gradient(150deg, var(--card), var(--card-2)); border: 1px solid var(--card-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: var(--text-eyebrow); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 170px; }
td .bar { width: 90px; display: inline-block; vertical-align: middle; margin-right: 8px; }
tr.me td { background: rgba(228,242,34,.22); }
tr.me td:first-child { border-radius: 14px 0 0 14px; } tr.me td:last-child { border-radius: 0 14px 14px 0; }
.rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font-display); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.rank.top1 { background: var(--lime); box-shadow: none; }
.rank.top2, .rank.top3 { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.subnav { margin-bottom: 26px; }

.perfume { text-decoration: none; display: block; transition: transform .15s; }
.perfume:hover { transform: translateY(-2px); }
.perfume .brand { font: var(--text-eyebrow); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.perfume h3 { margin: 6px 0 14px; font-size: 18px; }
.notes-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 640px) { .notes-col { grid-template-columns: 1fr; } }
.notes-col div { background: var(--tile); border-radius: var(--radius-md); padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line); }
.notes-col b { display: block; font: var(--text-eyebrow); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.filters { margin: 16px 0 22px; }

.event { display: flex; gap: 18px; align-items: center; }
.event .date { width: 64px; height: 64px; border-radius: var(--radius-md); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.event .date b { font: 700 24px/1 var(--font-display); }
.event .date span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 700; margin-top: 2px; }

.modal-bg { position: fixed; inset: 0; background: rgba(20,20,20,.4); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--bg); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 40px 80px -30px rgba(0,0,0,.45); }
.modal h2 { margin-bottom: 20px; }
.qedit { border-radius: var(--radius-md); padding: 18px; margin-bottom: 14px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius-pill); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: var(--radius-pill); font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.seg button.on-present { background: var(--lime); color: var(--lime-ink); }
.seg button.on-late { background: var(--ink); color: var(--on-ink); }
.seg button.on-absent { background: var(--err-bg); color: var(--err); }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--on-ink); padding: 13px 20px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(150deg, var(--card), var(--card-2)); box-shadow: var(--shadow-card); border-radius: var(--radius-md); padding: 14px 18px; font-size: 14px; margin-bottom: 20px; font-weight: 500; }
.notice::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--ink); flex: none; }
.notice a { font-weight: 700; }
.empty { text-align: center; color: var(--ink-2); padding: 34px; }

/* поправки */
.hero > .chrome { position: absolute; }
.fact { font: var(--text-body); }
.fact span { font-family: var(--font-body); font-weight: 500; letter-spacing: 0; }
.track .cover { top: -26px; right: -26px; bottom: auto; width: 38%; max-width: 220px; }
.track.inv .cover { top: -34px; right: -34px; bottom: auto; width: 42%; max-width: 280px; }
.fact span { display: block; line-height: 1.3; margin-top: 4px; }
.page-head { margin-top: 10px; }
.page-head[data-ghost]::before { top: -4px; }
.notice { flex-wrap: nowrap; }
.notice > span { flex: 1; }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.grid > .card + .card, .bento > .card + .card { margin-top: 0; }
/* своя картинка входа — объекты на прозрачном фоне */
.login .art img.hero-img[src*="login"] { inset: 6% 6% 130px; width: 88%; height: calc(100% - 130px - 6%); object-fit: contain; -webkit-mask-image: none; mask-image: none; filter: drop-shadow(0 30px 40px rgba(30,30,20,.12)); }
@media (max-width: 860px) { .login .art img.hero-img[src*="login"] { inset: 5%; height: 90%; } }
.track .cover { filter: drop-shadow(0 18px 24px rgba(30,30,20,.18)); }
/* предметные картинки курсов и тренажёров — целиком, без обрезки */
.track .cover, .track.inv .cover { top: 18px; right: 18px; bottom: auto; width: 34%; max-width: 230px; }
.track .body h2, .track .body h3 { max-width: 62%; }
@media (max-width: 640px) { .track .cover, .track.inv .cover { width: 38%; top: 14px; right: 12px; } }
.track.trainer .cover { top: auto; bottom: 14px; right: 14px; width: 52%; max-width: 240px; }
.track.trainer .body p { max-width: 100% !important; }
.track.trainer .cover { width: 50%; max-width: 210px; }

/* ═════════ Телефон ═════════ */
html { -webkit-text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
.btn:active, .chip:active, .opt:active:not(:disabled), .track:active, .lesson-row:active { transform: scale(.98); }
input, select, textarea { font-size: 16px; } /* iOS не зумит поля */

@media (max-width: 900px) {
  body { font-size: 15.5px; }
  .main { padding: 14px 14px calc(108px + env(safe-area-inset-bottom)); }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  h1 { font-size: 27px; }
  .page-head { margin: 4px 0 20px; padding-top: 10px; }
  .page-head[data-ghost]::before { font-size: 64px; top: 0; }
  .section { margin-top: 32px; }
  .card { padding: 18px; border-radius: 24px; }
  .grid { gap: 14px; }

  /* главная */
  .hero { border-radius: 28px; }
  .hero h1 { font-size: 28px; }
  .event .date { width: 56px; height: 56px; }

  /* курсы */
  .bento { grid-template-columns: 1fr; gap: 14px; }
  .bento .track { grid-column: auto; }
  .track.inv { min-height: 0; padding: 22px; border-radius: 28px; }
  .track .body h2, .track .body h3 { max-width: 60%; font-size: 19px; }
  .track .body p { max-width: 100% !important; font-size: 14px; }
  .track .body[style] { max-width: 100% !important; }
  .track .cover, .track.inv .cover { width: 34%; max-width: 140px; top: 12px; right: 10px; }
  .track.trainer { min-height: 0 !important; padding-bottom: 150px; }
  .track.trainer .cover { width: 46%; max-width: 170px; bottom: 10px; right: 10px; }

  /* фильтры и подменю — лентой с прокруткой */
  .chips.filters, .chips.subnav { flex-wrap: nowrap; overflow-x: auto; margin-left: -14px; margin-right: -14px; padding: 4px 14px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { scroll-snap-align: start; padding: 10px 16px; }

  /* уроки и тесты */
  .lesson-row { padding: 12px 10px; gap: 12px; }
  .lesson-row .pill { display: none; }
  .lesson-card { padding: 22px 18px; }
  .prose { font-size: 16.5px; }
  .q h3 { font-size: 16px; }
  .opt { padding: 16px; min-height: 54px; font-size: 15.5px; }
  .client-says { font-size: 19px; padding: 18px 20px; }
  .result { padding: 32px 18px; border-radius: 28px; }
  .result .row { flex-direction: column; align-items: stretch; }
  .result .btn { justify-content: space-between; }

  /* режим теста: без нижнего меню, кнопка закреплена внизу */
  .shell.focus .tabbar { display: none; }
  .shell.focus .main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .shell.focus .action-bar:not(:empty) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--top-bg); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-top: 1px solid var(--line); }
  .shell.focus .action-bar .btn { width: 100%; justify-content: space-between; }

  /* таблицы */
  .table-wrap { border-radius: 22px; margin: 0 -2px; }
  th, td { padding: 11px 12px; }
  td:first-child { min-width: 140px; }
  .rating td:first-child, .rating th:first-child { min-width: 0; width: 44px; }
  .rating th:nth-child(3), .rating td:nth-child(3), .rating th:nth-child(4), .rating td:nth-child(4) { display: none; }

  /* формы и окна — снизу, как в приложениях */
  .modal-bg { place-items: end stretch; padding: 0; }
  .modal { max-width: none; border-radius: 28px 28px 0 0; max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheet .22s ease-out; }
  .modal .row .btn { flex: 1; justify-content: space-between; }
  .grid.g2 > label.f { margin-bottom: 0; }
  .seg button { padding: 8px 10px; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (max-width: 380px) {
  .facts { grid-template-columns: 1fr 1fr; } .fact.wide { grid-column: span 2; }
  .tabbar a { font-size: 9.5px; }
}
