/* Nunito, variable weight, self-hosted so no visitor request leaves the site.
   SIL Open Font License, see assets/fonts/OFL.txt. Ranges as in Fontsource. */
@font-face {
  font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url("assets/fonts/nunito-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url("assets/fonts/nunito-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mental Space brand: sage from the logo mark (#94BFBA), slate from the
   wordmark and the flyer button, cream from the logo background, blue from the
   flyer's "Контакти". Sage is too light for text, so text uses its deeper tone. */
:root {
  color-scheme: light;
  --bg: #fbf7ef;
  --surface: #ffffff;
  --card: #f2ede4;
  --ink: #33434a;
  --ink-2: #5f6e74;
  --line: rgba(51, 67, 74, .14);
  --brand: #94bfba;
  --brand-deep: #4f8780;
  --slate: #56686f;
  --link: #3f7393;
  --accent: #56686f;
  --accent-ink: #ffffff;
  --accent-soft: #e4efed;
  --psy: #4f8780;
  --psy-soft: #e4efed;
  --med: #3f7393;
  --med-soft: #e3edf3;
  --warn: #a8322a;
  --warn-soft: #f8e6e2;
  --demo: #85600f;
  --demo-soft: #f8eed6;
  --tint-sage: #e6f0ee;
  --tint-blue: #e8f0f5;
  --tint-sand: #f4ecdf;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(51, 67, 74, .05), 0 6px 20px rgba(51, 67, 74, .06);
  --font: "Nunito", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #182024;
  --surface: #1f292d;
  --card: #243035;
  --ink: #e9efed;
  --ink-2: #a7b4b6;
  --line: rgba(233, 239, 237, .13);
  --brand: #94bfba;
  --brand-deep: #94bfba;
  --slate: #c9d6d8;
  --link: #8fc0de;
  --accent: #94bfba;
  --accent-ink: #182024;
  --accent-soft: #263a3b;
  --psy: #94bfba;
  --psy-soft: #263a3b;
  --med: #8fc0de;
  --med-soft: #233544;
  --warn: #ff9c90;
  --warn-soft: #3d2623;
  --demo: #ecc77a;
  --demo-soft: #3a3222;
  --tint-sage: #1f2d2d;
  --tint-blue: #1c2a33;
  --tint-sand: #282520;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font: 17px/1.6 var(--font);
  color: var(--ink);
}
a { color: var(--link); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; color: var(--slate); }
h1, h2 { font-weight: 800; letter-spacing: -.01em; }
h3 { font-weight: 700; }
h1 { font-size: clamp(32px, 5vw, 50px); color: var(--brand-deep); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
.display { font-weight: 800; letter-spacing: -.02em; line-height: 1.08; color: var(--brand-deep); font-size: clamp(40px, 7vw, 76px); margin: 0 0 20px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 48px 0; }
.section-alt { background: var(--card); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { color: var(--slate); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo img { width: 44px; height: auto; display: block; }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--slate); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.logo-word { font-weight: 800; font-size: 14px; line-height: 1.05; letter-spacing: .18em; text-transform: uppercase; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--slate); text-decoration: none; font-size: 15.5px; font-weight: 700; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-deep); }
.nav a[aria-current="page"] { font-weight: 800; border-bottom-color: var(--brand); }
.nav a { white-space: nowrap; }
@media (max-width: 760px) {
  .site-header .wrap { justify-content: space-between; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 16px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Badges and tags */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge-psy { background: var(--psy-soft); color: var(--psy); }
.badge-med { background: var(--med-soft); color: var(--med); }
.badge-demo { background: var(--demo-soft); color: var(--demo); }
.badge-ok { background: var(--accent-soft); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero .lead { font-size: 19px; color: var(--ink-2); max-width: 640px; }
.hero-split { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr; align-items: center; }
@media (max-width: 820px) { .hero-split { grid-template-columns: 1fr; } }
.hero-sub { font-size: clamp(17px, 2.2vw, 21px); font-weight: 700; color: var(--slate); max-width: 720px; margin: 0 auto 24px; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.hero-points li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }

.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }

.notice { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line); background: var(--card); }
.notice-warn { background: var(--warn-soft); border-color: transparent; }
.notice-warn h3 { color: var(--warn); }
.notice-demo { background: var(--demo-soft); border-color: transparent; color: var(--ink); }

/* Specialist card */
.spec { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: start; }
@media (max-width: 720px) { .spec { grid-template-columns: 56px 1fr; } .spec-side { grid-column: 1 / -1; } }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 22px; background: var(--psy-soft); color: var(--psy); }
.avatar.med { background: var(--med-soft); color: var(--med); }
.avatar-lg { width: 112px; height: 112px; font-size: 34px; }
@media (max-width: 720px) { .avatar { width: 56px; height: 56px; font-size: 18px; } }
.spec h3 { margin: 0 0 4px; }
.spec-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-2); }
.spec-side { text-align: right; display: grid; gap: 8px; justify-items: end; }
@media (max-width: 720px) { .spec-side { text-align: left; justify-items: start; } }
.price { font-weight: 700; font-size: 20px; }
.price small { font-weight: 400; font-size: 13px; color: var(--ink-2); }

/* Catalog layout */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .catalog { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 76px; }
@media (max-width: 900px) { .filters { position: static; } }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.list { display: grid; gap: 14px; }

/* Forms */
label { display: block; }
.field { margin-bottom: 18px; }
.field > .label { font-weight: 600; margin-bottom: 8px; display: block; }
input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 15px; }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin: 4px 0; }

/* Profile */
.profile { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.booking { position: sticky; top: 76px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.slot { font: inherit; font-size: 14px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }

/* Cabinet */
.cabinet { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .cabinet { grid-template-columns: 1fr; } }
.side-nav { display: grid; gap: 4px; }
.side-nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.stat { font-size: 30px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* Pricing */
.plan { border: 2px solid var(--accent); }
.plan .amount { font-size: 34px; font-weight: 700; }
.compare td:first-child { font-weight: 600; }

/* Sitemap visual */
.flow { display: grid; gap: 10px; }
.flow-node { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.flow-node a { font-weight: 600; text-decoration: none; }
.flow-arrow { text-align: center; color: var(--ink-2); line-height: 1; }
.lane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-mock { background: var(--accent-soft); color: var(--accent); }
.status-next { background: var(--demo-soft); color: var(--demo); }
.money { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; text-align: center; }
@media (max-width: 720px) { .money { grid-template-columns: 1fr; } .money .flow-arrow { transform: rotate(90deg); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; margin-top: 48px; font-size: 14px; color: var(--ink-2); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer a { color: var(--ink-2); display: block; margin: 4px 0; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); max-width: 420px; padding: 24px; }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }
[hidden] { display: none !important; }

/* Home, Preply-like */
.btn-lg { padding: 15px 26px; font-size: 18px; }
.hero .display { font-size: clamp(40px, 6vw, 68px); }
.hero-visual { position: relative; max-width: 460px; justify-self: end; width: 100%; }
@media (max-width: 820px) { .hero-visual { justify-self: center; } }
.hero-visual img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 32px; }
.photo-credit { position: absolute; right: 14px; bottom: 8px; margin: 0; font-size: 11px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.photo-credit a { color: inherit; }
.float-card { position: absolute; display: flex; gap: 10px; align-items: center; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(30, 45, 50, .16); font-size: 14px; line-height: 1.35; max-width: 260px; }
.float-card .avatar { width: 44px; height: 44px; font-size: 15px; flex: none; }
.float-a { left: -36px; top: 36px; }
.float-b { right: -28px; bottom: 56px; }
@media (max-width: 1100px) { .float-a { left: 12px; } .float-b { right: 12px; } }
.float-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--accent-soft); flex: none; }
.quick-start { margin-top: 24px; padding: 18px 20px; }
.quick-roles { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.quick-role { flex: 1 1 140px; text-align: center; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 700; text-decoration: none; transition: border-color .15s, transform .15s; }
.quick-role:hover, .quick-role:focus-visible { border-color: var(--brand-deep); transform: translateY(-2px); }

.stats-band { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; padding: 28px 16px; }
.stat-num { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; color: var(--brand-deep); line-height: 1.1; }
.stat-label { color: var(--ink-2); font-size: 15px; }

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }
.cat { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat:hover, .cat:focus-visible { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat b { display: block; }
.cat-count { color: var(--ink-2); font-size: 14px; }
.cat-arrow { color: var(--brand-deep); font-size: 22px; font-weight: 700; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tab { font: inherit; font-weight: 700; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.carousel-nav { display: flex; gap: 8px; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, calc((100% - 48px) / 4)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 12px; }
@media (max-width: 900px) { .carousel { grid-auto-columns: minmax(250px, 80%); } }
.mini { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; transition: transform .15s; }
.mini:hover { transform: translateY(-3px); }
.mini .avatar { width: 64px; height: 64px; margin-bottom: 6px; }
.mini h3 { margin: 0; }
.mini h3 a { color: var(--ink); text-decoration: none; }
.mini .price { font-size: 18px; margin-top: auto; padding-top: 8px; }

.guarantee { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--brand); color: #1f3133; border-radius: 32px; padding: clamp(24px, 4vw, 48px); }
.guarantee h2 { color: #1f3133; }
.guarantee p { max-width: 640px; margin: 0; }
.guarantee .btn { background: #1f3133; color: #fbf7ef; }

.join-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--slate); color: var(--bg); border-radius: 32px; padding: clamp(24px, 4vw, 48px); }
.join-band h2 { color: var(--bg); }
.join-band .hero-points li::before { color: var(--brand); }
.btn-on-dark { background: var(--bg); color: var(--slate); }
.btn-ghost-dark { background: transparent; color: var(--bg); border-color: currentColor; }

/* Catalog hover preview, Preply-like */
.wrap-wide { max-width: 1340px; }
.catalog.with-preview { grid-template-columns: 250px minmax(0, 1fr) 300px; }
@media (max-width: 1180px) { .catalog.with-preview { grid-template-columns: 250px minmax(0, 1fr); } .preview { display: none; } }
@media (max-width: 900px) { .catalog.with-preview { grid-template-columns: 1fr; } }
.preview { position: sticky; top: 76px; }
.preview .video-box { aspect-ratio: 16 / 10; border-radius: 14px; background: var(--card); display: grid; place-items: center; text-align: center; color: var(--ink-2); font-size: 14px; margin: 12px 0; padding: 12px; }
.list .spec { transition: border-color .15s, box-shadow .15s; }
.list .spec.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent-soft); }

/* Step-by-step matching, Preply-like */
.wizard { max-width: 680px; margin: 0 auto; }
.progress { height: 6px; border-radius: 999px; background: var(--card); overflow: hidden; margin: 8px 0 28px; }
.progress span { display: block; height: 100%; background: var(--brand-deep); border-radius: inherit; transition: width .25s; }
.step-q { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; color: var(--slate); margin: 0 0 8px; line-height: 1.2; }
.options { display: grid; gap: 10px; margin: 20px 0; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; font-weight: 600; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s; }
.option:hover { border-color: var(--brand); }
.option[aria-pressed="true"] { border-color: var(--brand-deep); background: var(--accent-soft); }
.option .tick { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; font-size: 14px; }
.option[aria-pressed="true"] .tick { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.option[aria-pressed="true"] .tick::after { content: "✓"; }
.wizard-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.live-count { font-weight: 700; color: var(--brand-deep); }
.step-q:focus { outline: none; }
@media (max-width: 1100px) { .nav { gap: 4px 12px; } .nav a { font-size: 14.5px; } }
.wizard { padding: 0 16px; }

/* Section colours and pictures that separate the home blocks */
.tint-sage { background: var(--tint-sage); }
.tint-blue { background: var(--tint-blue); }
.tint-sand { background: var(--tint-sand); }
.stats-band.tint-sage { border-color: transparent; }
.hero-visual::before { content: ""; position: absolute; inset: -28px -28px auto auto; width: 70%; height: 70%; border-radius: 50%; background: var(--brand); opacity: .35; filter: blur(2px); z-index: -1; }
.hero-visual::after { content: ""; position: absolute; left: -22px; bottom: -22px; width: 38%; height: 38%; border-radius: 50%; background: var(--tint-blue); z-index: -1; }
.hero .wrap { position: relative; z-index: 0; }
.step-icon { position: relative; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--brand-deep); display: grid; place-items: center; margin-bottom: 14px; }
.step-icon svg, .role-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step-icon span { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--slate); color: var(--bg); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.tint-blue .step-icon { background: var(--tint-blue); color: var(--link); }
.role-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--psy-soft); color: var(--psy); margin-bottom: 12px; }
.role-icon.med { background: var(--med-soft); color: var(--med); }
.join-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
@media (max-width: 820px) { .join-band { grid-template-columns: 1fr; } }
.join-photo { position: relative; margin: 0; }
.join-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.join-photo figcaption { position: absolute; right: 12px; bottom: 8px; font-size: 11px; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.join-photo figcaption a { color: inherit; }

/* Booking calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px; }
.cal-head b { font-size: 17px; }
.cal-head button:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 4px 0; }
.cal-day { position: relative; font: inherit; font-size: 15px; aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink-2); opacity: .45; cursor: default; }
.cal-day.has-free { opacity: 1; color: var(--ink); font-weight: 700; background: var(--accent-soft); cursor: pointer; }
.cal-day.has-free::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brand-deep); }
.cal-day.has-free:hover { border-color: var(--brand); }
.cal-day.is-today { border-color: var(--line); }
.cal-day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cal-day[aria-pressed="true"]::after { background: var(--accent-ink); }
.cal-times { margin-top: 14px; min-height: 64px; }
.cal-date { display: block; margin-bottom: 4px; }
.cal-date::first-letter { text-transform: uppercase; }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.form-error, .field-error { color: var(--warn); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.book-done { text-align: center; }
.book-done .btn-row { justify-content: center; }
.book-done .spec { text-align: left; margin-top: 16px; }
.done-mark { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--brand-deep); font-size: 28px; font-weight: 800; }
dialog { max-width: 480px; width: calc(100% - 32px); }

/* Specialist registration */
.join-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .join-layout { grid-template-columns: 1fr; } }
.join-aside { position: sticky; top: 76px; padding-top: 64px; }
@media (max-width: 900px) { .join-aside { position: static; padding-top: 0; } }
.steps { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-2); }
.steps li.current { color: var(--brand-deep); font-weight: 800; }
.steps li.done button { font: inherit; background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; }
.steps li.done::before { content: "✓ "; color: var(--brand-deep); }
[aria-invalid="true"] { border-color: var(--warn) !important; }
.choices[aria-invalid="true"] .choice span { border-color: var(--warn); }
.week { display: grid; gap: 8px; border-radius: 14px; }
.week-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.week-row.on { border-color: var(--brand); }
.week-row .check { margin: 0; font-weight: 700; min-width: 130px; }
.week-times { display: flex; align-items: center; gap: 8px; }
.week-times select { width: auto; padding: 8px 10px; }
.week-row:not(.on) .week-times { opacity: .4; }
.file-drop { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; color: var(--ink-2); }
.file-drop:hover { border-color: var(--brand); }
.file-drop.has-file { border-style: solid; border-color: var(--brand-deep); color: var(--ink); font-weight: 600; }
.file-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.summary dt { font-weight: 700; color: var(--ink-2); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.join-step .field > .label { margin-bottom: 6px; }
tr.is-new td { background: var(--accent-soft); }
#book { scroll-margin-top: 140px; }

/* Phone and tablet */
.menu-toggle { display: none; align-items: center; gap: 6px; font: inherit; font-weight: 700; font-size: 15px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--slate); cursor: pointer; }
.filters-toggle { display: none; justify-self: start; }
.book-bar { display: none; }
.cabinet > *, .cabinet .grid > * { min-width: 0; }

@media (max-width: 900px) {
  .site-header .wrap { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 8px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; order: 3; flex: 1 0 100%; flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 0; padding: 4px 0 8px; }
  .site-header.nav-open .nav { display: flex; }
  .nav a { font-size: 17px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--brand-deep); }

  .filters-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: block; }

  .book-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(30, 45, 50, .08); transition: transform .2s; }
  .book-bar b { font-size: 18px; }
  .book-bar small { color: var(--ink-2); }
  .book-bar.is-hidden { transform: translateY(110%); }
  body[data-page="specialist"] { padding-bottom: 72px; }

  .booking, .preview, .join-aside { position: static; }
}

@media (max-width: 820px) {
  .side-nav { display: flex; overflow-x: auto; gap: 6px; padding: 8px; }
  .side-nav a { white-space: nowrap; }
}

@media (max-width: 480px) {
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 7px 11px; font-size: 13.5px; }
  .menu-toggle { padding: 7px 11px; font-size: 14px; }
  .logo-word { font-size: 12px; }
  .logo img { width: 38px; }
  section { padding: 36px 0; }
  .hero { padding: 36px 0 32px; }
  .spec-side .btn { flex: 1; }
  .spec-side { grid-template-columns: 1fr 1fr; display: grid; width: 100%; }
  .spec-side .price, .spec-side .small { grid-column: 1 / -1; }
  .float-card { max-width: 220px; font-size: 13px; }
}

@media (max-width: 900px) {
  .site-header .wrap { justify-content: space-between; }
}
@media (max-width: 420px) {
  .logo-word { display: none; }
  .menu-toggle { padding: 7px 10px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Cabinet bookings as cards on phones */
@media (max-width: 600px) {
  .cabinet table thead { display: none; }
  .cabinet table, .cabinet tbody, .cabinet tr, .cabinet td { display: block; width: 100%; }
  .cabinet tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cabinet td { border: 0; padding: 2px 0; }
  .cabinet td:nth-child(1) { font-weight: 700; }
  .cabinet td:nth-child(2)::before { content: "Час: "; color: var(--ink-2); }
  .cabinet td:nth-child(3)::before { content: "Запит: "; color: var(--ink-2); }
  .cabinet td:nth-child(4)::before { content: "Формат: "; color: var(--ink-2); }
  .cabinet td:last-child { padding-top: 8px; }
  .cabinet tr.is-new { background: var(--accent-soft); border-radius: 12px; padding: 12px; }
  .cabinet tr.is-new td { background: none; }
}
