/*
  Design system (v2).
  Warm light background, white cards with soft depth, one turquoise for actions and a sunny
  yellow used only for highlights (ratings, the marker under a headline word). One typeface, Onest,
  self-hosted so no visitor data goes to a font CDN. Rounded but not bubbly: 10px controls, 16px cards.
  The variable names --blue/--serif are historical: --blue is the primary colour, --serif the heading font.
*/

@font-face { font-family: "Onest"; src: url("/fonts/onest-cyrillic-wght-normal-fe2bd26ae82a604773dc696a60820fd4.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("/fonts/onest-latin-wght-normal-3db826ed1c5d780edac1a068afa38081.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f4f4f5;
  --sheet: #ffffff;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98a2b3;
  --rule: #e4e4e7;
  --rule-strong: #cfcfd4;
  --blue: #0a8f93;          /* primary */
  --blue-dark: #076e73;
  --blue-wash: #dff5f4;
  --accent: #ffc83d;
  --accent-wash: #fff4d1;
  --red: #d92d20;
  --red-wash: #fef1f0;
  --green: #067647;
  --green-wash: #e3f6ea;
  --amber: #b54708;
  --amber-wash: #fef3e0;
  --deep: #0b5c60;          /* dark surfaces: footer, call-to-action band */
  --serif: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w: 1160px;
  --r: 10px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .05);
  --sh-2: 0 6px 16px -4px rgba(16, 24, 40, .10), 0 2px 4px rgba(16, 24, 40, .04);
  --sh-3: 0 24px 48px -16px rgba(16, 24, 40, .22), 0 4px 10px rgba(16, 24, 40, .05);
  --ring: 0 0 0 4px rgba(10, 143, 147, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding: 2.2rem 0 4.5rem; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); font-weight: 800; }
h2 { font-size: 1.4rem; margin-top: 1.8em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; letter-spacing: -.01em; }
h2:first-child, h3:first-child { margin-top: 0; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(10, 143, 147, .35); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-dark); text-decoration-color: currentColor; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
small, .small { font-size: .875rem; }
.muted { color: var(--ink-soft); }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 30rem; }
.prose { max-width: 44rem; }
.prose li { margin-bottom: .4em; }

/* ---------- Header ---------- */
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; gap: 1.6rem; min-height: 4.25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.3rem; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 2rem; height: 2rem; flex: none; }
.nav { display: flex; align-items: center; gap: .2rem; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); font-weight: 500; text-decoration: none; padding: .5rem .8rem; border-radius: var(--r); }
.nav a:hover { color: var(--ink); background: var(--paper); }
.nav a[aria-current="page"] { color: var(--blue-dark); background: var(--blue-wash); }
.nav a.btn { padding: .55rem 1rem; color: #fff; }
.nav a.btn:hover { color: #fff; background: var(--blue-dark); }
.nav a.nav-user { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.nav-user .dot { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--blue-wash); color: var(--blue-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.nav .spacer { flex: 1; }
.nav form { margin: 0; }
.btn.nav-toggle { display: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(10, 143, 147, .35); text-underline-offset: 3px; }
.nav .linklike { color: var(--ink-faint); text-decoration: none; padding: .5rem .6rem; font-weight: 500; }
.nav .linklike:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #d2e6e7; padding: 3.2rem 0 2rem; font-size: .93rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer .brand { color: #fff; margin-bottom: .9rem; }
.site-footer h4 { font: 600 .78rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #fff; margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #d2e6e7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal-line { margin: 2.4rem 0 0; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; color: #b4d6d8; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: 600 .97rem/1.2 var(--sans);
  padding: .72rem 1.15rem; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--sheet); color: var(--ink);
  text-decoration: none; cursor: pointer; text-align: center; box-shadow: var(--sh-1);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; }
.btn:hover { background: var(--paper); color: var(--ink); border-color: var(--ink-faint); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(7, 110, 115, .3), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; box-shadow: 0 6px 14px -4px rgba(7, 110, 115, .45); }
.btn-danger { border-color: #f3c0bb; color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-soft); box-shadow: none; }
.btn-quiet:hover { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.btn-small { padding: .45rem .8rem; font-size: .88rem; border-radius: 8px; }
.btn-large { padding: .95rem 1.5rem; font-size: 1.05rem; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1.15rem; }
.field > label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search],
input[type=date], input[type=time], input[type=url], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule-strong);
  border-radius: var(--r); padding: .68rem .8rem; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.3rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23475467' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; }
input[type=file] { padding: .5rem; background: var(--paper); border-style: dashed; }
textarea { min-height: 7rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue); box-shadow: var(--ring); }
.hint { font-size: .86rem; color: var(--ink-soft); margin-top: .3rem; }
.error, .field-error { font-size: .88rem; color: var(--red); margin-top: .3rem; font-weight: 500; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .65rem; cursor: pointer; }
.check input { margin-top: .22rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--blue); cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .1rem 1.5rem; }
fieldset { border: 0; border-top: 1px solid var(--rule); padding: 1.4rem 0 0; margin: 1.8rem 0 0; }
legend { font: 700 1.08rem var(--serif); padding: 0 .7rem 0 0; letter-spacing: -.01em; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }
.inline-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* ---------- Surfaces ---------- */
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.6rem 1.7rem; box-shadow: var(--sh-1); }
.panel + .panel { margin-top: 1.3rem; }
.panel-margin { box-shadow: var(--sh-2); }            /* the one key panel of a page: lifted a little more */
.notice { display: block; border: 1px solid var(--rule); background: var(--sheet); padding: .85rem 1.05rem; border-radius: 12px; margin-bottom: 1.3rem; }
.notice-ok { border-color: #b7e4c7; background: var(--green-wash); color: #064b2f; }
.notice-warn { border-color: #f6d9a8; background: var(--amber-wash); color: #7a3306; }
.notice-error { border-color: #f6c6c1; background: var(--red-wash); color: #8f1d14; }
.notice-info { border-color: #b5e4e3; background: var(--blue-wash); color: #075055; }
.notice p:last-child { margin-bottom: 0; }
.notice a { color: inherit; text-decoration-color: currentColor; }
.empty { border: 1.5px dashed var(--rule-strong); border-radius: var(--r-lg); padding: 2.6rem 1.5rem; text-align: center; color: var(--ink-soft); background: rgba(255, 255, 255, .5); }
.empty p:last-child { margin-bottom: 0; }

.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; line-height: 1.3; padding: .2rem .6rem;
  border-radius: 999px; color: var(--ink-soft); background: #eeeef0; white-space: nowrap; border: 0; }
.tag-ok { color: var(--green); background: var(--green-wash); }
.tag-warn { color: var(--amber); background: var(--amber-wash); }
.tag-bad { color: var(--red); background: var(--red-wash); }
.tag-info { color: var(--blue-dark); background: var(--blue-wash); }
.tag-verified::before { content: ""; width: .85rem; height: .85rem; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23067647'/%3E%3Cpath d='m4.6 8.2 2.3 2.3 4.5-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; padding: .42rem .9rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule);
  color: var(--ink); font-size: .92rem; font-weight: 500; text-decoration: none; box-shadow: var(--sh-1); transition: border-color .15s, color .15s, transform .15s; }
a.chip:hover { border-color: var(--blue); color: var(--blue-dark); transform: translateY(-1px); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.with-sidebar { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.2rem; align-items: start; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin: 0; }
.breadcrumbs { font-size: .86rem; color: var(--ink-soft); margin-bottom: 1.1rem; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-dark); text-decoration: underline; }
.breadcrumbs span + span::before, .breadcrumbs a + span::before, .breadcrumbs a + a::before, .breadcrumbs span + a::before {
  content: "›"; margin: 0 .5rem; color: var(--ink-faint); }

/* Section navigation inside the teacher workspace and the admin area */
.side-nav { border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--r-lg); padding: .5rem; box-shadow: var(--sh-1);
  position: sticky; top: 5.4rem; }
.side-nav a { display: block; padding: .62rem .85rem; color: var(--ink-soft); font-weight: 500; text-decoration: none; border-radius: 9px; }
.side-nav a + a { margin-top: 2px; }
.side-nav a:hover { background: var(--paper); color: var(--ink); }
.side-nav a.active { background: var(--blue-wash); color: var(--blue-dark); font-weight: 600; }
.side-nav .count { float: right; font-size: .78rem; font-weight: 600; background: var(--accent); color: var(--ink); border-radius: 999px; padding: .05rem .5rem; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; font-size: .94rem; overflow: hidden; }
.table th { text-align: left; font: 600 .76rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft);
  padding: .7rem .9rem; border-bottom: 1px solid var(--rule); background: #f8f8f9; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafafa; }
.table-wrap { overflow-x: auto; border-radius: 12px; }

.dl { display: grid; grid-template-columns: 11rem 1fr; gap: .5rem 1rem; margin: 0; }
.dl dt { color: var(--ink-soft); }
.dl dd { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .9rem; }
.stat { padding: 1.1rem 1.25rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--sh-1); }
.stat .num { font: 800 1.9rem/1.1 var(--serif); letter-spacing: -.03em; display: block; }
.stat .lbl { font-size: .86rem; color: var(--ink-soft); }

/* ---------- Avatars ---------- */
.avatar { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 18px; background: var(--blue-wash); flex: none; }
.avatar-lg { width: 8rem; height: 8rem; border-radius: 26px; }
.avatar-initials { display: flex; align-items: center; justify-content: center; font: 700 1.5rem var(--serif); color: var(--blue-dark); text-decoration: none; }
.avatar-lg.avatar-initials { font-size: 2.6rem; }
.av-0 { background: #d9f3f2; color: #076e73; }
.av-1 { background: #fff0c9; color: #8a5a00; }
.av-2 { background: #e2ecff; color: #1d4aa8; }
.av-3 { background: #fde5df; color: #a8321f; }
.av-4 { background: #ece6fb; color: #5a3bb0; }
.av-5 { background: #dff1f6; color: #0d6079; }

/* ---------- Rating and price ---------- */
.rating { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; white-space: nowrap; }
.rating::before { content: ""; width: 1rem; height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23f5b301' d='m10 1.6 2.6 5.3 5.8.8-4.2 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.6 7.7l5.8-.8z'/%3E%3C/svg%3E") center/contain no-repeat; }
.rating .of { font-weight: 400; color: var(--ink-soft); }
.price { font: 800 1.45rem/1.1 var(--serif); letter-spacing: -.02em; }
.price small { font: 400 .8rem var(--sans); letter-spacing: 0; color: var(--ink-soft); display: block; margin-top: .25rem; }

/* ---------- Teacher cards (the directory listing) ---------- */
.listing { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.listing > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av body side" "slots slots slots"; align-content: start;
  gap: .2rem 1.2rem; padding: 1.3rem 1.4rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); transition: box-shadow .2s, border-color .2s, transform .2s; }
.listing > li:hover { box-shadow: var(--sh-2); border-color: var(--rule-strong); transform: translateY(-2px); }
.listing > li > :first-child { grid-area: av; }
.listing .listing-body { grid-area: body; min-width: 0; }
.listing .side { grid-area: side; text-align: right; min-width: 7.5rem; }
.listing h3 { margin: 0 0 .2rem; font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; }
.listing h3 a { color: var(--ink); text-decoration: none; }
.listing h3 a:hover { color: var(--blue-dark); }
.listing .headline { margin: 0 0 .6rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.listing .tags { margin-bottom: .55rem; }
.listing .tags a { text-decoration: none; }
.listing .tags a:hover { background: var(--blue-wash); color: var(--blue-dark); }
.listing .meta { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.listing .meta > span + span::before { content: "·"; margin: 0 .45rem; color: var(--ink-faint); }
.listing .side p { margin: .5rem 0 0; font-size: .88rem; }
.card-slots { grid-area: slots; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--rule); }
.card-slots .lbl { font-size: .84rem; color: var(--ink-soft); margin-right: .2rem; }
.card-slots .more { font-size: .86rem; margin-left: .3rem; font-weight: 500; }
.listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Free hours ---------- */
.slot { display: inline-block; margin: .2rem 0; padding: .38rem .7rem; border: 1px solid #b5e4e3; border-radius: 8px; color: var(--blue-dark); background: var(--blue-wash);
  text-decoration: none; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; transition: background .15s, color .15s, transform .15s; }
a.slot:hover { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-1px); }
.slot-taken { border-color: var(--rule); color: var(--ink-faint); background: transparent; text-decoration: line-through; font-weight: 400; }
.timetable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; table-layout: fixed; overflow: hidden; box-shadow: var(--sh-1); }
.timetable th { font: 600 .76rem var(--sans); text-transform: uppercase; letter-spacing: .05em; padding: .65rem .3rem; border-bottom: 1px solid var(--rule);
  background: #f8f8f9; text-align: center; color: var(--ink-soft); }
.timetable td { border-right: 1px solid var(--rule); padding: .45rem .35rem; vertical-align: top; text-align: center; font-size: .9rem; }
.timetable th + th { border-left: 1px solid var(--rule); }
.timetable td:last-child { border-right: 0; }
.timetable .slot { display: block; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .35rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { min-width: 2.5rem; text-align: center; padding: .5rem .8rem; border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; color: var(--ink);
  background: var(--sheet); font-weight: 500; }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination a:hover { border-color: var(--blue); color: var(--blue-dark); }

/* ---------- Messages ---------- */
.thread { display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 34rem; background: var(--sheet); border: 1px solid var(--rule); padding: .7rem 1rem; border-radius: 16px 16px 16px 4px; box-shadow: var(--sh-1); }
.msg-mine { align-self: flex-end; background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg .when { display: block; font-size: .76rem; color: var(--ink-faint); margin-top: .3rem; }
.msg-mine .when, .msg-mine .when a { color: rgba(255, 255, 255, .75); }

/* ---------- Home ---------- */
main.home { padding-top: 0; }
.hero-band { background: linear-gradient(180deg, #e3f5f4 0%, #f1f6ef 60%, var(--paper) 100%); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.hero-band::before { content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: linear-gradient(rgba(10, 143, 147, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 143, 147, .07) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse at 80% 10%, #000 0%, transparent 62%); -webkit-mask-image: radial-gradient(ellipse at 80% 10%, #000 0%, transparent 62%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 3rem; align-items: center; padding-top: 4rem; padding-bottom: 4rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 600; color: var(--blue-dark); background: #fff; border: 1px solid #c4e9e8;
  padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.2rem; }
.hero-eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--blue); }
.hero h1, .hero-grid h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); line-height: 1.06; letter-spacing: -.035em; margin-bottom: 1.1rem; }
.mark { background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%); padding: 0 .08em; }
.hero-grid .lead { font-size: 1.15rem; max-width: 34rem; }
.search-bar { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .5rem; background: var(--sheet); border: 1px solid var(--rule);
  padding: .7rem; border-radius: 18px; margin-top: 1.8rem; align-items: end; box-shadow: var(--sh-3); }
.search-bar .field { margin: 0; }
.search-bar .field > label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 .1rem .8rem; }
.search-bar select { border-color: transparent; background-color: transparent; font-weight: 500; padding-top: .45rem; padding-bottom: .45rem; }
.search-bar select:hover { background-color: var(--paper); }
.search-bar .field + .field { border-left: 1px solid var(--rule); padding-left: .5rem; }
.search-bar .btn { white-space: nowrap; align-self: stretch; padding-left: 1.4rem; padding-right: 1.4rem; border-radius: 12px; }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; list-style: none; padding: 0; margin: 1.5rem 0 0; font-size: .93rem; color: var(--ink-soft); }
.hero-points li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-points li::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%230a8f93'/%3E%3Cpath d='m4.6 8.2 2.3 2.3 4.5-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* the live teacher card shown beside the headline */
.hero-card { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 22px; padding: 1.5rem; box-shadow: var(--sh-3); transform: rotate(1.2deg); }
.hero-card-top { display: flex; gap: 1rem; align-items: center; }
.hero-card h2 { font-size: 1.15rem; margin: 0 0 .15rem; }
.hero-card h2 a { color: var(--ink); text-decoration: none; }
.hero-card .sub { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.hero-card .row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.1rem 0; padding: .85rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.hero-card .lbl { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 .6rem; }
.hero-card .slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.hero-card .slot { margin: 0; }
.hero-badge { position: absolute; left: -1.4rem; bottom: -1.1rem; background: var(--ink); color: #fff; font-size: .86rem; font-weight: 600; padding: .6rem .95rem; border-radius: 12px;
  box-shadow: var(--sh-2); transform: rotate(-3deg); display: inline-flex; align-items: center; gap: .5rem; }
.hero-badge::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }

.home-section { margin-top: 4.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; font-size: 1.7rem; font-weight: 800; }
.section-head a { font-size: .95rem; font-weight: 600; text-decoration: none; }
.section-head a::after { content: " →"; }
.section-sub { color: var(--ink-soft); margin: -.9rem 0 1.5rem; max-width: 40rem; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.4rem; }
.popular .lbl { font-size: .86rem; color: var(--ink-soft); margin-right: .2rem; }
.link-columns { columns: 4 12rem; column-gap: 2rem; list-style: none; padding: 0; margin: 0; }
.link-columns li { margin-bottom: .4rem; break-inside: avoid; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.steps li { counter-increment: step; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.6rem 1.5rem; box-shadow: var(--sh-1); }
.steps li::before { content: counter(step); font: 800 1.05rem var(--serif); display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--blue-wash); color: var(--blue-dark); margin-bottom: 1rem; }
.steps li:nth-child(2)::before { background: var(--accent-wash); color: #8a5a00; }
.steps li:nth-child(3)::before { background: var(--ink); color: #fff; }
.steps h3 { margin: 0 0 .4rem; font-size: 1.12rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.browse { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; }
.browse .panel { margin: 0; }
.browse h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.cta-band { margin-top: 4.2rem; background: var(--deep); color: #d3e4e5; border-radius: 24px; padding: 2.8rem 3rem; display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 2rem; align-items: center;
  position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -4rem; top: -4rem; width: 16rem; height: 16rem; border-radius: 50%; border: 2.4rem solid rgba(255, 200, 61, .14); pointer-events: none; }
.cta-band h2 { color: #fff; font-size: 1.8rem; font-weight: 800; margin: 0 0 .6rem; }
.cta-band p { margin: 0; max-width: 36rem; }
.cta-band strong { color: var(--accent); }
.cta-band .btn { position: relative; z-index: 1; background: var(--accent); border-color: var(--accent); color: var(--ink); }
.cta-band .btn:hover { background: #ffd666; border-color: #ffd666; color: var(--ink); }

/* ---------- Sign-in / sign-up pages ---------- */
.auth { max-width: 29rem; margin: 1.5rem auto 0; }
.auth h1 { text-align: center; font-size: 1.9rem; }
.auth .lead { text-align: center; font-size: 1rem; margin: -.3rem auto 1.6rem; }
.auth .panel { padding: 2rem; box-shadow: var(--sh-2); }
.auth-alt { text-align: center; margin-top: 1.3rem; color: var(--ink-soft); font-size: .95rem; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; background: #e7e7ea; padding: .3rem; border-radius: 12px; margin-bottom: 1.4rem; }
.role-switch a { text-align: center; padding: .55rem; border-radius: 9px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .93rem; }
.role-switch a.active { background: var(--sheet); color: var(--ink); box-shadow: var(--sh-1); }

.cookie-note { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 40rem; margin: 0 auto; background: var(--ink); color: var(--sheet);
  padding: .9rem 1.1rem; border-radius: 14px; display: flex; gap: 1rem; align-items: center; font-size: .9rem; z-index: 20; box-shadow: var(--sh-3); }
.cookie-note a { color: var(--sheet); }
.cookie-note .btn { flex: none; }
.cookie-note[hidden] { display: none; }

/* ---------- Billing: kabinet/abonament (module billing) ---------- */
.billing-state .actions { margin-top: 1.2rem; }
.billing-hint { margin: .6rem 0 0; }
.billing-list { padding-left: 1.2rem; margin: 0 0 1em; }
.billing-list li { margin-bottom: .3em; }
/* ---------- Account module: e-mail reminder under the header, account pages, legal documents ---------- */
.verify-bar { margin-top: 1rem; }
.verify-bar .notice { margin-bottom: 0; }
.panel > h2 { font-size: 1.2rem; margin-top: 0; }
.doc-meta { font-size: .875rem; color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding-bottom: .8rem; margin-bottom: 1.6rem; }
.doc h2 { font-size: 1.25rem; }
.doc .table { margin: 0 0 1.2rem; }
.doc address { font-style: normal; margin-bottom: 1em; }
.toc { list-style: none; padding: 0; margin: 0 0 2rem; columns: 2 16rem; column-gap: 2rem; font-size: .95rem; }
.toc li { margin-bottom: .25rem; break-inside: avoid; }

/* ==========================================================================
   Catalog module (public pages: home, /uchiteli, /uchitel/{slug}, /predmeti,
   /kak-raboti, /za-uchiteli). Everything below belongs to bg.vextro.catalog.
   ========================================================================== */
.preline { white-space: pre-line; overflow-wrap: anywhere; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.plain-list li { padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.plain-list li:last-child { border-bottom: 0; }

/* Home */
.search-bar .btn { white-space: nowrap; }
.home-section { margin-top: 3rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-strong); padding-bottom: .4rem; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: .95rem; }
.section-head + .listing { border-top: 0; margin-top: -1.1rem; }
.steps h3 { margin: 0 0 .3rem; }
.steps p { margin: 0; color: var(--ink-soft); }
.home-teachers { border-top: 1px solid var(--rule); padding-top: 2rem; }

/* Listing rows */
.listing-body { min-width: 0; }
.listing h3 .tag { font-family: var(--sans); font-weight: 400; vertical-align: .15em; margin-left: .3rem; }
.listing .headline { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.listing .meta { margin: 0 0 .15rem; }
.listing .meta a { color: var(--ink-soft); }
.listing .side p { margin: .45rem 0 0; font-size: .9rem; }
.listing .next-free { line-height: 1.4; }

/* Search */
.listing-intro { margin-bottom: 1rem; }
.city-links { margin: -.3rem 0 1.6rem; }
.filters { padding: 1.1rem 1.2rem 1.2rem; }
.filters .field { margin-bottom: .9rem; }
.filters label { font-size: .92rem; }
.filters .check { margin-bottom: .5rem; }
.filters .btn { margin-top: .6rem; }
.filters-reset { margin: .8rem 0 0; text-align: center; }
.results { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1.5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.results-head p { margin: 0; }
.to-filters { display: none; margin-left: .8rem; }
.sort-links a, .sort-links .active { margin-left: .6rem; white-space: nowrap; }
.sort-links .active { font-weight: 600; border-bottom: 2px solid var(--ink); }
.pagination .gap { border: 0; background: none; padding-left: .2rem; padding-right: .2rem; color: var(--ink-faint); }

/* Teacher page */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; grid-template-areas: "head aside" "body aside";
  gap: 0 2.5rem; align-items: start; }
.profile-head { grid-area: head; display: flex; gap: 1.5rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.profile-head > div:first-child { flex: none; }
.profile-head > div:last-child { min-width: 0; }
.profile-head h1 { margin-bottom: .3rem; }
.profile-head .lead { font-size: 1.08rem; margin-bottom: .6rem; }
.profile-head p:last-child { margin-bottom: 0; }
.profile-marks { margin-bottom: .4rem; }
.profile-marks .verified-note { margin-left: .4rem; }
.profile-rating a { margin-left: .5rem; }
.profile-aside { grid-area: aside; position: sticky; top: 1rem; }
.profile-aside .price { font-size: 1.9rem; margin-bottom: 1rem; }
.profile-aside .price small { font-size: .875rem; }
.profile-aside p { margin-bottom: .6rem; }
.profile-aside .aside-note { margin: .9rem 0 0; }
.facts { margin: 0 0 1.1rem; border-top: 1px solid var(--rule); }
.facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.facts dt { color: var(--ink-soft); flex: none; }
.facts dd { margin: 0; text-align: right; }
.profile-body { grid-area: body; min-width: 0; padding-top: 1.8rem; }
.profile-body > section + section { margin-top: 2.4rem; }
.profile-body section[id] { scroll-margin-top: 1rem; }
.timetable-days + .timetable-days { margin-top: .8rem; }
.timetable-days th .tt-date { display: block; font-weight: 400; letter-spacing: 0; color: var(--ink-soft); }
.timetable-days td { height: 3.2rem; }
.tt-none { color: var(--ink-faint); }
.reviews { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.reviews > li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.reviews > li > * { max-width: 44rem; }
.reviews p { margin-bottom: .4rem; }
.review-head { display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: baseline; }
.review-reply { margin: .7rem 0 0 .2rem; padding-left: .9rem; border-left: 2px solid var(--rule-strong); }
.review-reply p:last-child { margin-bottom: 0; }
.report-link { margin-top: 2.5rem; }
.report-link a { color: var(--ink-faint); }

/* Subjects index and informational pages */
.subject-group { margin-top: 2.2rem; }
.subject-group h2 { border-bottom: 1px solid var(--rule-strong); padding-bottom: .4rem; margin-bottom: 1rem; }
.subject-index .count { font-size: .85rem; color: var(--ink-soft); margin-left: .3rem; font-variant-numeric: tabular-nums; }
.subject-index .count-zero { color: var(--ink-faint); }
.subjects-note { margin-top: 2.5rem; }
.info-section { margin-top: 2.8rem; }
.info-section > h2 { border-bottom: 1px solid var(--rule-strong); padding-bottom: .4rem; margin-bottom: 1.3rem; }
.info-text { margin-top: 2rem; }
.info-more { margin-top: 1.4rem; }
.info-actions { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.offer-list { margin: 0; border-top: 1px solid var(--rule); }
.offer-list > div { display: grid; grid-template-columns: 13rem 1fr; gap: .2rem 1.5rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.offer-list dt { font-weight: 600; }
.offer-list dd { margin: 0; color: var(--ink-soft); }
.qa dt { font: 600 1.05rem/1.35 var(--serif); margin-top: 1.3rem; }
.qa dt:first-child { margin-top: 0; }
.qa dd { margin: .3rem 0 0; }
.offer-price h2 { font-size: 1.2rem; margin-bottom: .8rem; }
.offer-price .price { font-size: 2.2rem; margin-bottom: .8rem; }
.offer-price .price small { font-size: .875rem; }
.offer-price p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .home-section { margin-top: 2.3rem; }
  .search-layout .filters { order: 2; margin-top: 2rem; }
  .to-filters { display: inline; }
  .profile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "aside" "body"; }
  .profile-head { border-bottom: 0; padding-bottom: 1.2rem; gap: 1rem; }
  .profile-head .avatar-lg { width: 5.5rem; height: 5.5rem; }
  .profile-aside { position: static; }
  .offer-list > div { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* The 7-column timetable becomes one line per day; the day name comes from data-day. */
  .timetable-days, .timetable-days tbody, .timetable-days tr { display: block; }
  .timetable-days thead { display: none; }
  .timetable-days td { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; height: auto; text-align: left;
    border-right: 0; padding: .5rem .6rem; font-size: .95rem; }
  .timetable-days tr td:last-child { border-bottom: 0; }
  .timetable-days + .timetable-days { margin-top: -1px; }
  .timetable-days td::before { content: attr(data-day); flex: 0 0 4.4rem; font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
  .timetable-days .slot { margin: 0; padding: .4rem .55rem; }
  .profile-marks .verified-note { display: block; margin: .3rem 0 0; }
}

/* ---------- Teacher workspace (module "teacher": /kabinet, /kabinet/profil, /kabinet/grafik, /kabinet/dokumenti) ---------- */
.kab-main { min-width: 0; }   /* lets wide tables scroll inside the grid column instead of widening the page */
.kab-main .panel > h2 { margin-top: 0; }   /* the hidden CSRF input comes first in a form, so h2:first-child does not match */
.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.checklist > li { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: .2rem 1rem; align-items: baseline;
  padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.checklist .tag { justify-self: start; }
.checklist p { margin: .15rem 0 0; }
.admin-note { margin: .4rem 0 .6rem; padding: .1rem 0 .1rem .8rem; border-left: 2px solid var(--rule-strong); white-space: pre-line; }
.plain-list { margin: 0 0 1em; padding-left: 1.2rem; }
.plain-list li { margin-bottom: .25em; }
.kab-url, .doc-name { overflow-wrap: anywhere; }
.photo-row { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; align-items: start; }
.photo-row > * { min-width: 0; }
.photo-remove { margin-top: .8rem; }
.input-short { max-width: 9rem; }
.field-medium { max-width: 22rem; }
.group-title { font: 600 .8rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 1.2rem 0 .5rem; }
.form-actions { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.form-actions + .hint { margin-top: .7rem; }
.window-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 0 1rem; align-items: end; }
/* .timetable.tt-rows: a one-row week that turns into one line per day on a phone */
.tt-rows .tt-label { display: none; }
.tt-rows td { padding: .5rem .3rem; }
.tt-window + .tt-window { margin-top: .5rem; }
.tt-window form { margin: 0; }
.tt-date { font-weight: 400; color: var(--ink-soft); }
.slot-short { border-style: dashed; border-color: var(--rule-strong); color: var(--ink-soft); background: transparent; }
@media (max-width: 640px) {
  .checklist > li { grid-template-columns: 1fr; }
  .photo-row { grid-template-columns: 1fr; }
  .window-fields { grid-template-columns: 1fr 1fr; }
  .window-fields .field:first-child, .window-fields .field:last-child { grid-column: 1 / -1; }
  /* .table.table-stack: each row becomes a block, so nothing has to be scrolled sideways */
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; }
  .table-stack tr { padding: .7rem .8rem; border-bottom: 1px solid var(--rule); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { padding: .1rem 0; border: 0; text-align: left; }
  .table-stack td:last-child:not(:first-child) { margin-top: .4rem; }
  .tt-rows thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tt-rows, .tt-rows tbody, .tt-rows tr { display: block; }
  .tt-rows td { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; align-items: baseline; text-align: left;
    border-right: 0; padding: .55rem .7rem; font-size: .95rem; }
  .tt-rows td:last-child { border-bottom: 0; }
  .tt-rows .tt-label { display: block; font-weight: 500; }
  .tt-rows .tt-cell { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: baseline; }
  .tt-rows .slot { margin: 0; padding: .3rem .5rem; }
  .tt-rows .tt-window { display: flex; gap: .6rem; align-items: baseline; margin: 0; flex-basis: 100%; }
}

/* ---------- Booking module: lesson rows, hour picker, conversations, reviews ---------- */
.text-pre { white-space: pre-line; overflow-wrap: anywhere; }
.lessons { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 1px solid var(--rule-strong); }
.lessons > li { display: grid; grid-template-columns: 12.5rem 1fr auto; gap: .5rem 1.4rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.lessons .when { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.lessons .when strong { display: block; font: 600 1.05rem/1.3 var(--serif); color: var(--ink); white-space: nowrap; }
.lessons .what { min-width: 0; }
.lessons h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.lessons h3 a { color: var(--ink); text-decoration: none; }
.lessons h3 a:hover { text-decoration: underline; }
.lessons .meta { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .35rem; }
.lessons .meta > span + span::before { content: "·"; margin: 0 .45rem; }
.lessons .what p { margin-bottom: .35rem; }
.lessons .what p:last-child { margin-bottom: 0; }
.lessons .note { border-left: 2px solid var(--rule-strong); padding-left: .7rem; font-size: .92rem; }
.lessons .reply { border-left: 2px solid var(--blue); padding-left: .7rem; font-size: .95rem; }
.lessons .actions { grid-column: 2 / -1; align-items: flex-start; }
.lessons details { flex: 1 1 100%; }
.lessons details[open] { border-top: 1px solid var(--rule); padding-top: .8rem; margin-top: .2rem; }
.lessons details > summary { display: inline-block; list-style: none; }
.lessons details > summary::-webkit-details-marker { display: none; }
.lessons details form { margin-top: .8rem; max-width: 34rem; }
.section-count { font: 400 .95rem var(--sans); color: var(--ink-soft); margin-left: .4rem; }

.slot-days { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--rule-strong); }
.slot-days > li { display: grid; grid-template-columns: 13rem 1fr; gap: .4rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.slot-days .slots { display: flex; flex-wrap: wrap; gap: .4rem; }
.slot-days .slot { margin: 0; padding: .35rem .7rem; }

.conv-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.conv-list a { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: .9rem .4rem; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; }
.conv-list a:hover { background: var(--sheet); }
.conv-list .who { font-weight: 600; }
.conv-list .at { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }
.conv-list .preview { grid-column: 1 / -1; font-size: .92rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.conv-list .has-unread .preview { color: var(--ink); }

.thread { margin-bottom: 1.5rem; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .when a { color: var(--ink-soft); margin-left: .6rem; }

.rating-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.rating-pick label { display: flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border: 1px solid var(--rule-strong);
  border-radius: var(--r); background: var(--sheet); cursor: pointer; font-variant-numeric: tabular-nums; }
.rating-pick input { accent-color: var(--blue); margin: 0; }

@media (max-width: 700px) {
  .lessons > li { grid-template-columns: 1fr; gap: .35rem; }
  .lessons .actions { grid-column: 1; }
  .slot-days > li { grid-template-columns: 1fr; }
  .msg { max-width: 100%; }
}

/* ---------- Admin module (/admin/**) ---------- */
.admin-main { min-width: 0; }   /* lets a wide table scroll inside the grid column instead of stretching the page */
.admin-main .table { font-size: .9rem; }
.admin-main .table th, .admin-main .table td { padding: .5rem .65rem; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .sub { display: block; font-size: .82rem; color: var(--ink-soft); }
.table input[type=text], .table input[type=number], .table input[type=date], .table select { padding: .3rem .45rem; }
.table input[type=text] { min-width: 10rem; }
.table select { min-width: 9rem; }
.table input[type=number] { width: 4.5rem; }
.table .row-actions.tight { flex-wrap: nowrap; }
.table .col-text { min-width: 16rem; }
.table form { margin: 0; }
.table .row-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.filter-bar { margin-bottom: 1.2rem; }
.filter-bar .grow { flex: 1 1 14rem; }
.result-count { font-size: .875rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.section-tabs { display: flex; gap: 1.4rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); margin-bottom: 1.4rem; }
.section-tabs a { padding: .4rem 0; margin-bottom: -1px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.section-tabs a:hover { border-bottom-color: var(--rule-strong); }
.section-tabs a.active { border-bottom-color: var(--red); font-weight: 600; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.quoted { border-left: 3px solid var(--rule-strong); padding: .1rem 0 .1rem .9rem; margin: 0 0 1rem; white-space: pre-line; }
.listing-preview { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; margin-bottom: 1.2rem; }
.listing-preview h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
.decision + .decision { border-top: 1px solid var(--rule); margin-top: 1.1rem; padding-top: 1.1rem; }
.decision textarea { min-height: 4.5rem; }
.stat .lbl .sub { display: block; font-size: .8rem; }
.admin-main .stats + .grid-2 { margin-top: 2.2rem; }
@media (max-width: 860px) {
  .listing-preview { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v2 refinements: bring the module sections above in line with the design
   system (cards instead of ruled rows) and hold the shared responsive rules.
   Keep this block last.
   ========================================================================== */
.section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 1.4rem; }
.section-head + .listing { margin-top: 0; }
.plain-list li { border-bottom-color: var(--rule); }

/* search */
.filters { position: sticky; top: 5.4rem; padding: 1.3rem; }
.filters-title { font-size: 1rem; margin: 0 0 1rem; }
.results-head { margin-bottom: 1rem; }
.results-count strong { font-size: 1.05rem; }
.sort-links { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.sort-links a, .sort-links .active { margin-left: 0; padding: .3rem .75rem; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink-soft); border: 0; }
.sort-links a:hover { background: var(--sheet); color: var(--ink); }
.sort-links .active { background: var(--ink); color: #fff; font-weight: 600; border-bottom: 0; }
.city-links a { margin-right: .15rem; }

/* teacher page */
.profile { gap: 0 2rem; grid-template-columns: minmax(0, 1fr) 21rem; }
.profile-head { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.7rem; box-shadow: var(--sh-1); align-items: center; }
.profile-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.profile-head .lead { color: var(--ink-soft); }
.profile-marks { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.profile-marks .verified-note { margin-left: 0; }
.profile-rating { display: flex; align-items: center; gap: .6rem; }
.profile-rating a { margin-left: 0; }
.profile-aside { top: 5.4rem; }
.profile-aside .panel { padding: 1.6rem; box-shadow: var(--sh-2); }
.profile-aside .price { font-size: 2.2rem; }
.facts { border-top-color: var(--rule); }
.facts > div { border-bottom-color: var(--rule); }
.facts dd { font-weight: 500; }
.profile-body > section { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.6rem 1.7rem; box-shadow: var(--sh-1); }
.profile-body > section + section { margin-top: 1.3rem; }
.profile-body { padding-top: 1.3rem; }
.profile-body section[id] { scroll-margin-top: 5.5rem; }
.profile-body .timetable { box-shadow: none; }
.timetable-days td { height: auto; min-height: 3rem; }
.reviews { border-top: 0; display: grid; gap: .8rem; }
.reviews > li { padding: 1rem 1.1rem; border: 1px solid var(--rule); border-radius: 12px; background: #fafafa; }
.review-reply { border-left: 3px solid var(--blue-wash); }
.report-link { margin-top: 1.5rem; text-align: right; }

/* informational pages */
.subject-group h2, .info-section > h2 { border-bottom: 0; padding-bottom: 0; }
.subject-index { columns: auto; display: flex; flex-wrap: wrap; gap: .5rem; }
.subject-index li { margin: 0; }
.subject-index li a { display: inline-flex; padding: .42rem .9rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .93rem; }
.subject-index li a:hover { border-color: var(--blue); color: var(--blue-dark); }
.subject-index li { display: inline-flex; align-items: center; }
.offer-list { border-top: 0; display: grid; gap: .7rem; }
.offer-list > div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.2rem; }
.qa dt { font: 700 1.03rem/1.35 var(--serif); }
.offer-price { box-shadow: var(--sh-2); }
.offer-price .price { font-size: 2.6rem; }
.info-actions { border-top: 0; }

/* workspace, lessons, conversations */
.checklist { border-top: 0; }
.checklist > li { border-bottom-color: var(--rule); }
.lessons { border-top: 0; display: grid; gap: .9rem; }
.lessons > li { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.2rem 1.4rem; box-shadow: var(--sh-1); }
.lessons .when strong { font: 700 1.05rem/1.3 var(--serif); }
.slot-days { border-top: 0; }
.slot-days > li { border-bottom-color: var(--rule); }
.conv-list { border-top: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.conv-list a { padding: 1rem 1.2rem; }
.conv-list li:last-child a { border-bottom: 0; }
.conv-list a:hover { background: #fafafa; }
.rating-pick label { border-radius: 999px; padding: .5rem 1rem; }
.section-tabs a.active { border-bottom-color: var(--blue); color: var(--blue-dark); }
.verify-bar { margin-top: 1rem; }

.listing > li > a:first-child { text-decoration: none; }
.nav-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-switch { max-width: 24rem; }
.role-switch a { white-space: nowrap; }
.checklist, .slot-days { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: .3rem 1.4rem; box-shadow: var(--sh-1); }
.checklist > li:last-child, .slot-days > li:last-child { border-bottom: 0; }
.offer-price ul { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.offer-price li { padding: .6rem 0 .6rem 1.7rem; border-bottom: 1px solid var(--rule);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%230a8f93'/%3E%3Cpath d='m4.6 8.2 2.3 2.3 4.5-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left .85rem / 1.05rem no-repeat; }
.offer-price li:last-child { border-bottom: 0; }
@media (min-width: 861px) { .nav { flex-wrap: nowrap; } .nav a { white-space: nowrap; } }
.listing-2 .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.listing-2 .card-slots .lbl { flex-basis: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .listing-2 .listing { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.8rem; padding-bottom: 3rem; }
  .hero-card { max-width: 26rem; transform: none; }
  .hero-badge { left: auto; right: 1rem; }
  .listing-grid { grid-template-columns: 1fr; }
  .browse { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .with-sidebar, .with-aside, .grid-2, .grid-3, .steps { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .search-bar { grid-template-columns: 1fr; padding: .9rem; }
  .search-bar .field + .field { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: .5rem; }
  .search-bar .btn { padding-top: .9rem; padding-bottom: .9rem; }
  .side-nav, .filters, .profile-aside { position: static; }
  .side-nav { display: flex; overflow-x: auto; gap: .2rem; }
  .side-nav a { white-space: nowrap; }
  .side-nav a + a { margin-top: 0; }
  .dl { grid-template-columns: 1fr; gap: 0; }
  .dl dd { margin-bottom: .6rem; }
  .btn.nav-toggle { display: inline-flex; margin-left: auto; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: .15rem; padding-bottom: 1rem; }
  .nav.open { display: flex; }
  .nav .spacer { display: none; }
  .nav a.btn { margin-top: .4rem; }
  .timetable { font-size: .8rem; }
  .cta-band { grid-template-columns: 1fr; padding: 2rem 1.6rem; }
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile-head { padding: 1.2rem; }
  .profile-body > section { padding: 1.2rem; }
  .home-section, .cta-band { margin-top: 3rem; }
}
@media (max-width: 640px) {
  .listing > li { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av body" "side side" "slots slots"; padding: 1.1rem; }
  .listing .side { text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin-top: .7rem; }
  .listing .side p { margin: 0; }
  .price small { display: inline; margin-left: .3rem; }
  .avatar { width: 3.6rem; height: 3.6rem; border-radius: 14px; }
  .avatar-lg { width: 5.5rem; height: 5.5rem; border-radius: 20px; }
  .panel { padding: 1.25rem; }
  .auth .panel { padding: 1.4rem; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cookie-note, .btn { display: none; }
  body { background: #fff; }
}

/* ==========================================================================
   Landing page (v3): a sentence you complete instead of a search form, a board
   of real free hours, a numbered index of subjects, a price ticket for teachers.
   Big type on full-width colour bands; no card grid.
   ========================================================================== */
.lp { --cream: #f4f4f5; --sun: #ffc83d; background: var(--cream); padding-bottom: 0; }
.lp h2 { font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 0; }
.lp-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: 1rem; color: var(--ink-soft); margin: 0 0 2rem; max-width: 44rem; }
.lp-kicker span { font: 700 .74rem/1 var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--ink); border: 1.5px solid var(--ink); padding: .45rem .7rem; border-radius: 999px; }

/* hero: the sentence */
.lp-hero { position: relative; padding: 4.5rem 0 0; overflow: hidden; }
.lp-hero > .wrap:first-child { position: relative; }
.lp-sentence h1 { font-size: clamp(2.5rem, 7.2vw, 6.2rem); font-weight: 800; line-height: 1.04; letter-spacing: -.045em; margin: 0; max-width: 16ch; }
.lp-line { white-space: nowrap; }
.lp-pick { position: relative; display: inline-block; vertical-align: baseline; }
.lp-pick select { font: inherit; letter-spacing: inherit; line-height: 1.15; color: var(--ink); width: auto; max-width: 92vw; padding: 0 .95em .04em .12em; border: 0; border-radius: 0;
  border-bottom: .07em solid var(--ink); background-color: var(--sun); box-shadow: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23101828' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .22em center; background-size: .55em; transition: background-color .15s; }
.lp-pick select:hover { background-color: #ffd96b; border-color: var(--ink); }
.lp-pick select:focus { box-shadow: 0 0 0 .08em var(--ink); border-color: var(--ink); }
.lp-pick option { font-size: 1rem; font-weight: 400; letter-spacing: 0; background: #fff; }
.lp-go-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 2.6rem; }
.lp-go { display: inline-flex; align-items: center; gap: .9rem; font: 700 1.15rem/1 var(--sans); color: #fff; background: var(--ink); border: 0; border-radius: 999px;
  padding: 1.15rem 1.2rem 1.15rem 1.9rem; cursor: pointer; text-decoration: none; transition: background .15s, gap .15s; }
.lp-go svg { width: 2.3rem; height: 2.3rem; padding: .5rem; border-radius: 50%; background: var(--sun); color: var(--ink); flex: none; transition: transform .2s; }
.lp-go:hover { background: var(--blue-dark); color: #fff; }
.lp-go:hover svg { transform: translateX(4px); }
.lp-sticker { position: absolute; right: 1.5rem; top: -.5rem; width: 9.5rem; height: 9.5rem; border-radius: 50%; background: var(--blue); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; font-size: .8rem; font-weight: 600; line-height: 1.25; transform: rotate(11deg); }
.lp-sticker b { font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: .2rem; color: var(--sun); }
.lp-facts { list-style: none; padding: 0; margin: 4.5rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.lp-facts li { padding: 1.3rem 1.4rem 2.2rem 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.45; }
.lp-facts li + li { border-left: 1px solid rgba(16, 24, 40, .18); padding-left: 1.4rem; }
.lp-facts b { display: block; color: var(--ink); font-size: 1.08rem; margin-bottom: .3rem; letter-spacing: -.01em; }

/* the board of free hours */
.lp-board { background: var(--deep); color: #cfe2e3; padding: 5rem 0 4rem; }
.lp-board-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: end; margin-bottom: 2.6rem; }
.lp-board h2 { color: #fff; font-size: clamp(2.1rem, 5vw, 4rem); }
.lp-board h2 span { color: var(--sun); }
.lp-board-head p { margin: 0; max-width: 28rem; justify-self: end; font-size: 1.02rem; }
.lp-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.lp-rows a { display: grid; grid-template-columns: 9.5rem minmax(0, 1.25fr) minmax(0, 1fr) 5.5rem 3rem; gap: 1.5rem; align-items: center; padding: 1.15rem .6rem;
  border-bottom: 1px solid rgba(255, 255, 255, .18); color: inherit; text-decoration: none; transition: background .15s, padding .2s, color .15s; }
.lp-rows i { display: block; font-style: normal; font-size: .88rem; color: #b4d6d8; }
.lp-rows b { display: block; color: #fff; font-weight: 600; }
.lp-when b { font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.lp-when i { margin-top: .3rem; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; }
.lp-what b { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.lp-who { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.lp-who .avatar { width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1.05rem; }
.lp-price { font-size: 1.5rem; font-weight: 800; color: #fff; text-align: right; letter-spacing: -.03em; }
.lp-arrow { justify-self: end; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff; transition: background .15s, color .15s, border-color .15s; }
.lp-rows a:hover { background: var(--sun); color: var(--ink); padding-left: 1.3rem; }
.lp-rows a:hover b, .lp-rows a:hover .lp-price { color: var(--ink); }
.lp-rows a:hover i { color: rgba(16, 24, 40, .7); }
.lp-rows a:hover .lp-arrow { background: var(--ink); border-color: var(--ink); color: #fff; }
.lp-board-more { margin: 2rem 0 0; text-align: right; }
.lp-board-more a { color: var(--sun); font-weight: 600; text-decoration: none; font-size: 1.05rem; }
.lp-board-more a:hover { text-decoration: underline; }

/* numbered index of subjects */
.lp-index { padding: 5.5rem 0 4.5rem; }
.lp-index-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.lp-index h2 { font-size: clamp(2.1rem, 5vw, 4rem); }
.lp-index-head a { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: .15rem; }
.lp-index-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 4rem; border-top: 2px solid var(--ink); }
.lp-index-list li { break-inside: avoid; }
.lp-index-list a { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .8rem; align-items: baseline; padding: 1.05rem .3rem; border-bottom: 1px solid rgba(16, 24, 40, .2);
  color: var(--ink); text-decoration: none; transition: padding .2s, background .15s; }
.lp-index-list .n { font-size: .8rem; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.lp-index-list .t { font-size: clamp(1.2rem, 2.1vw, 1.65rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.lp-index-list .c { font-size: .86rem; color: var(--ink-soft); white-space: nowrap; }
.lp-index-list a:hover { padding-left: 1rem; background: #fff; }
.lp-index-list a:hover .n { color: var(--blue); }
.lp-cities { margin: 3rem 0 0; font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 500; line-height: 1.5; letter-spacing: -.015em; max-width: 52rem; color: var(--ink-soft); }
.lp-cities a { color: var(--ink); text-decoration-color: var(--sun); text-decoration-thickness: .16em; text-underline-offset: .18em; }
.lp-cities a:hover { background: var(--sun); }

/* three steps on one line */
.lp-how { background: #fff; padding: 5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.lp-how h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 18ch; margin-bottom: 3.2rem; }
.lp-how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; }
.lp-how ol::before { content: ""; position: absolute; left: 0; right: 0; top: 2.6rem; border-top: 2px dashed var(--rule-strong); }
.lp-how li { position: relative; padding-right: 2.5rem; }
.lp-how .num { position: relative; display: inline-block; font-size: 5.2rem; font-weight: 800; line-height: 1; letter-spacing: -.05em; color: #fff; -webkit-text-stroke: 2px var(--ink); background: #fff; padding-right: 1.1rem; }
.lp-how li:nth-child(2) .num { color: var(--sun); }
.lp-how h3 { font-size: 1.35rem; margin: 1.3rem 0 .5rem; letter-spacing: -.02em; }
.lp-how p { margin: 0; color: var(--ink-soft); max-width: 22rem; }

/* for teachers: a statement and a price ticket */
.lp-teach { background: var(--sun); padding: 5.5rem 0; }
.lp-teach > .wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: 4rem; align-items: center; }
.lp-teach h2 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); margin-bottom: 1.4rem; }
.lp-teach-text p { font-size: 1.1rem; max-width: 34rem; color: #3a2f0a; }
.lp-teach .lp-kicker { margin-bottom: 1.4rem; }
.lp-go-dark { margin-top: 1rem; }
.lp-go-dark svg { background: #fff; }
.lp-ticket { background: #ffffff; color: var(--ink); padding: 2.2rem 2rem 1.8rem; transform: rotate(2.2deg); box-shadow: 0 30px 50px -22px rgba(60, 40, 0, .45);
  font-variant-numeric: tabular-nums;
  -webkit-mask: radial-gradient(circle at 12px 0, transparent 7px, #000 7.5px) -12px 0 / 24px 51% repeat-x, radial-gradient(circle at 12px 100%, transparent 7px, #000 7.5px) -12px 100% / 24px 51% repeat-x;
  mask: radial-gradient(circle at 12px 0, transparent 7px, #000 7.5px) -12px 0 / 24px 51% repeat-x, radial-gradient(circle at 12px 100%, transparent 7px, #000 7.5px) -12px 100% / 24px 51% repeat-x; }
.lp-ticket-title { font: 700 .76rem/1 var(--sans); text-transform: uppercase; letter-spacing: .16em; text-align: center; margin: .4rem 0 1.4rem; }
.lp-ticket dl { margin: 0; border-top: 1.5px dashed var(--ink-faint); }
.lp-ticket dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1.5px dashed var(--ink-faint); }
.lp-ticket dt { color: var(--ink-soft); }
.lp-ticket dd { margin: 0; font-weight: 600; }
.lp-ticket-total { display: flex; justify-content: space-between; align-items: baseline; margin: 1.2rem 0 .3rem; }
.lp-ticket-total span { font-weight: 600; }
.lp-ticket-total b { font-size: 2.9rem; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.lp-ticket-note { margin: 0; font-size: .86rem; color: var(--ink-soft); text-align: right; }

@media (max-width: 980px) {
  .lp-sticker { position: static; transform: rotate(-6deg); margin-top: 2.2rem; width: 8rem; height: 8rem; }
  .lp-sticker b { font-size: 1.9rem; }
  .lp-facts { grid-template-columns: 1fr 1fr; margin-top: 3rem; }
  .lp-facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .lp-facts li:nth-child(n+3) { border-top: 1px solid rgba(16, 24, 40, .18); }
  .lp-board-head { grid-template-columns: 1fr; }
  .lp-board-head p { justify-self: start; }
  .lp-rows a { grid-template-columns: 6.5rem minmax(0, 1fr) auto; grid-template-areas: "when what price" "when who arrow"; gap: .5rem 1.1rem; }
  .lp-when { grid-area: when; } .lp-what { grid-area: what; } .lp-who { grid-area: who; } .lp-price { grid-area: price; } .lp-arrow { grid-area: arrow; }
  .lp-when b { font-size: 1.7rem; }
  .lp-teach > .wrap { grid-template-columns: 1fr; gap: 3rem; }
  .lp-ticket { max-width: 24rem; }
}
@media (max-width: 700px) {
  .lp-hero { padding-top: 2.8rem; }
  .lp-line { white-space: normal; }
  .lp-facts { grid-template-columns: 1fr; }
  .lp-facts li, .lp-facts li + li { border-left: 0; padding: 1.1rem 0; border-top: 1px solid rgba(16, 24, 40, .18); }
  .lp-facts li:first-child { border-top: 0; }
  .lp-index-list { columns: 1; }
  .lp-index-list .c { display: none; }
  .lp-how ol { grid-template-columns: 1fr; gap: 2.2rem; }
  .lp-how ol::before { display: none; }
  .lp-board, .lp-index, .lp-how, .lp-teach { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .lp-who .avatar { display: none; }
  .lp-rows a { grid-template-columns: 5.2rem minmax(0, 1fr) auto; padding-left: 0; padding-right: 0; }
  .lp-what b { font-size: 1.12rem; }
}

/* ---------- Inquiry without an account (/zapitvane) ---------- */
.inquiry { max-width: 44rem; }
.inquiry h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.inquiry .panel { margin-top: 1.6rem; }
.inquiry .btn-block + .hint { margin-top: .9rem; text-align: center; }
.inquiry-phone { font-size: 1.2rem; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Logo: the clock whose hands form a V; lowercase wordmark ---------- */
.brand { font-weight: 700; letter-spacing: -.03em; font-size: 1.45rem; gap: .5rem; }
.brand span { text-transform: lowercase; }
.brand-mark { width: 2.1rem; height: 2.1rem; }

/* ---------- Plans (kabinet/abonament, /za-uchiteli) ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.plan-card { position: relative; display: flex; flex-direction: column; margin: 0; }
.plan-card + .plan-card { margin-top: 0; }
.plan-featured { border-color: var(--blue); box-shadow: var(--sh-2); }
.plan-badge { position: absolute; top: -.7rem; left: 1.2rem; }
.plan-card h3 { margin: .3rem 0 0; font-size: 1.25rem; }
.plan-months { margin: 0 0 .9rem; color: var(--ink-soft); font-size: .92rem; }
.plan-card .price { font-size: 1.9rem; margin-bottom: .4rem; }
.plan-savings { margin: 0 0 .8rem; font-size: .88rem; font-weight: 600; color: var(--green); }
.plan-lines { flex: 1; margin-bottom: 1rem; font-size: .93rem; }
.plan-lines li { padding: .35rem 0; }
.plan-card form { margin-top: auto; }
.billing-trial { margin-top: 1.4rem; padding: 1.2rem 1.3rem; border: 1.5px dashed var(--blue); border-radius: 12px; background: var(--blue-wash); }
.billing-trial h3 { margin: 0 0 .3rem; }
.billing-trial p { margin-bottom: .8rem; }
.offer-plans li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; }
.offer-plan-price { margin-left: auto; color: var(--ink-soft); font-size: .92rem; white-space: nowrap; }

/* ---------- Referral programme ---------- */
.invite-link { display: flex; gap: .5rem; margin: .6rem 0; }
.invite-link input { flex: 1; font-variant-numeric: tabular-nums; }
.referral-box .tags { margin-top: .5rem; }

/* ---------- E-mail verification code ---------- */
.code-input { font-size: 2rem; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding: .6rem; font-weight: 700; }

/* ---------- Admin traffic view (/admin/trafik) ---------- */
.traffic-table td { font-size: .86rem; }
.traffic-path { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.traffic-path .sub { font-family: inherit; }
.traffic-row-bad td { background: var(--red-wash); }
.traffic-row-warn td { background: var(--amber-wash); }
.traffic-bad { color: var(--red); }
.traffic-top { margin: 1.2rem 0; }
.traffic-top summary { cursor: pointer; font-weight: 600; margin-bottom: .6rem; }
.admin-main .stats { margin-bottom: .5rem; }

/* ---------- Teacher schedule: the clickable week grid ---------- */
.hour-grid { border-collapse: separate; border-spacing: 3px; width: 100%; table-layout: fixed; user-select: none; -webkit-user-select: none; }
.hour-grid th { font: 600 .78rem/1.2 var(--sans); color: var(--ink-soft); padding: 0; }
.hour-grid th:first-child { width: 3.6rem; }
.hg-head { font: inherit; color: inherit; background: none; border: 0; padding: .35rem .2rem; width: 100%; border-radius: 6px; cursor: pointer; }
.hg-head:hover { background: var(--blue-wash); color: var(--blue-dark); }
.hour-grid td { padding: 0; }
.hg-cell { display: block; position: relative; height: 1.9rem; border-radius: 6px; background: var(--sheet); border: 1px solid var(--rule); cursor: pointer;
  transition: background .1s, border-color .1s; }
.hg-cell input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; left: 0; top: 0; cursor: pointer; }
.hg-cell span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .72rem; color: var(--ink-faint); }
.hg-cell:hover { border-color: var(--blue); }
.hg-cell:has(input:checked) { background: var(--blue); border-color: var(--blue); }
.hg-cell:has(input:checked) span { color: #fff; font-weight: 600; }
.hg-cell:has(input:focus-visible) { box-shadow: var(--ring); }
.hour-grid-actions { margin: .9rem 0 2rem; }
.exact-window { margin-top: 1.4rem; }
.exact-window > summary { cursor: pointer; font-weight: 600; margin-bottom: .8rem; }
@media (max-width: 640px) {
  .hour-grid th:first-child { width: 2.9rem; }
  .hg-cell { height: 1.7rem; }
  .hg-cell span { font-size: .62rem; }
}

/* ---------- Homework (/kabinet/domashni, /moite-domashni) ---------- */
.hw-steps { list-style: none; padding: 0; margin: 0 0 1.2rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.hw-steps a { display: inline-block; padding: .4rem .85rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule);
  color: var(--ink-soft); text-decoration: none; font-size: .88rem; font-weight: 500; }
.hw-steps .on a { background: var(--blue); border-color: var(--blue); color: #fff; }
.hw-steps .done a { color: var(--blue-dark); border-color: #b5e4e3; }
.hw-target { font-size: .92rem; color: var(--ink-soft); margin: -.3rem 0 1.2rem; }
.hw-compose { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hw-compose h2 { margin: 0 0 .3rem; }
.hw-compose p { margin: 0; }
.hw-tests { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .8rem; }
.hw-tests > li { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; background: var(--sheet);
  border: 1px solid var(--rule); border-radius: 14px; padding: 1rem 1.2rem; box-shadow: var(--sh-1); }
.hw-tests h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.hw-tests p { margin: .3rem 0 0; }
.hw-tests .tags { margin-top: .5rem; }
.hw-picker { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1.4rem; align-items: start; }
.hw-basket { position: sticky; top: 5.4rem; }
.hw-basket ol { padding-left: 1.2rem; margin: 0 0 .8rem; font-size: .88rem; }
.hw-basket li { margin-bottom: .45rem; }
.hw-basket li form { display: inline; margin-left: .3rem; }
.hw-cat-chips { margin: 0 0 1rem; }
.hw-cat-chips .chip { font-size: .84rem; padding: .3rem .7rem; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.hw-questions { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .8rem; }
.hw-questions > li { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 1rem 1.2rem; }
.hw-questions > li.in { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.hw-q-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; margin-bottom: .5rem; }
.hw-q-tools { margin-left: auto; display: inline-flex; gap: .7rem; }
.hw-q-text { margin: 0 0 .6rem; font-size: 1.02rem; }
.hw-q-options { margin: 0 0 .7rem; padding: 0; list-style: none; }
.hw-q-options li { margin-bottom: .2rem; padding-left: 1.6rem; position: relative; }
.hw-q-options li::before { position: absolute; left: 0; color: var(--ink-faint); font-weight: 600; }
.hw-q-options li:nth-child(1)::before { content: "а)"; }
.hw-q-options li:nth-child(2)::before { content: "б)"; }
.hw-q-options li:nth-child(3)::before { content: "в)"; }
.hw-q-options li:nth-child(4)::before { content: "г)"; }
.hw-q-options li.is-right { color: var(--green); font-weight: 600; }
.hw-q-options li.chosen { text-decoration: underline; text-decoration-thickness: 2px; }
.hw-q-options li.chosen:not(.is-right) { color: var(--red); }
.hw-review-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.6rem 0 .4rem; }
.hw-review-head h2 { margin: 0; }
.hw-option { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
.hw-option input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); flex: none; }
.hw-new { margin-top: 1.4rem; }
.hw-new > summary { cursor: pointer; }
.hw-new form { margin-top: 1rem; }
.hw-grade-row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin-top: .6rem; padding-top: .7rem; border-top: 1px dashed var(--rule); }
.hw-grade-row .field { margin: 0; }
.hw-grade-row input[type=number] { width: 6rem; }
.hw-student-answer { background: var(--paper); border-radius: 10px; padding: .7rem .9rem; margin-bottom: .5rem; }
.hw-score { margin: .4rem 0 0; font-weight: 700; font-size: 1.1rem; text-align: right; }
.hw-score-big { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; margin: 0 0 .4rem; }
.hw-student { max-width: 50rem; }
.hw-choices { border: 0; padding: 0; margin: 0 0 .5rem; }
.hw-choices .check { padding: .45rem .6rem; border-radius: 8px; margin-bottom: .2rem; }
.hw-choices .check:hover { background: var(--paper); }
.hw-choices .check.is-right { background: var(--green-wash); }
.hw-choices .check.is-wrong { background: var(--red-wash); }
.hw-result { margin-bottom: 1.2rem; }
.hw-answering textarea { margin-bottom: .4rem; }
.hw-send .actions { margin-top: .6rem; }
@media (max-width: 980px) {
  .hw-picker { grid-template-columns: 1fr; }
  .hw-basket { position: static; order: -1; }
}

/* ---------- Admin reports (/admin/otcheti) ---------- */
.report-table td { font-size: .86rem; }
.report-grid { margin-top: 1rem; }
.report-grid h2 { margin-top: 1.6rem; }
.report-high { color: var(--red); font-weight: 600; }

/* ==========================================================================
   Homework journey (/kabinet/domashni/novo/*): one decision per screen, a progress bar,
   big tap targets that advance on tap, a sticky bottom bar. Mobile-app feel, same palette.
   ========================================================================== */
body:has(main.journey) .site-footer { display: none; }
main.journey { padding: 1.4rem 0 0; display: flex; flex-direction: column; }
.j-wrap { max-width: 40rem; width: 100%; flex: 1; padding-bottom: 2rem; }
.j-wrap-wide { max-width: var(--w); }
.j-wrap > * { animation: j-in .28s ease-out both; }
@keyframes j-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.j-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .9rem; }
.j-exit { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .92rem;
  padding: .35rem .6rem .35rem .4rem; margin-left: -.4rem; border-radius: 999px; }
.j-exit:hover { background: var(--sheet); color: var(--ink); }
.j-exit svg { width: 1.1rem; height: 1.1rem; }
.j-count { font-size: .82rem; font-weight: 600; color: var(--ink-faint); letter-spacing: .02em; }
.j-progress { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .35rem; }
.j-progress li { font-size: .72rem; font-weight: 600; color: var(--ink-faint); }
.j-progress li::before { content: ""; display: block; height: 5px; border-radius: 999px; background: var(--rule); margin-bottom: .4rem; transition: background .3s; }
.j-progress li.done::before { background: var(--blue); }
.j-progress li.on::before { background: linear-gradient(90deg, var(--blue) 0 50%, var(--rule) 50%); }
.j-progress li.on { color: var(--blue-dark); }
.j-progress li.done { color: var(--ink-soft); }
.j-context { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .8rem; }
.j-context span { font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); color: var(--ink-soft); }
.j-heading { font-size: clamp(1.7rem, 4.6vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 .5rem; }
.j-sub { color: var(--ink-soft); margin: 0 0 1.4rem; font-size: 1.02rem; }
.j-top + * { margin-top: 1.2rem; }

/* option cards: a radio (or a link) that fills the width */
.j-options { display: grid; gap: .7rem; }
.j-card { position: relative; display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.05rem 1.15rem; background: var(--sheet);
  border: 1.5px solid var(--rule); border-radius: 16px; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer;
  box-shadow: var(--sh-1); transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; }
.j-card:hover { border-color: var(--blue); transform: translateY(-1px); box-shadow: var(--sh-2); color: var(--ink); }
.j-card:active { transform: scale(.99); }
.j-card > input { position: absolute; opacity: 0; pointer-events: none; }
.j-card:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.j-card:has(input:focus-visible) { box-shadow: var(--ring); }
.j-card.is-off { opacity: .5; pointer-events: none; box-shadow: none; }
.j-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.j-card-text strong { font-size: 1.06rem; font-weight: 650; }
.j-card-text small { color: var(--ink-soft); font-size: .88rem; line-height: 1.4; }
.j-avatar { width: 2.9rem; height: 2.9rem; border-radius: 50%; font-size: 1.15rem; }
.j-tick { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--rule-strong); flex: none; transition: all .15s; }
.j-card:has(input:checked) .j-tick { border-color: var(--blue); background: var(--blue)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat; }
.j-icon { width: 2.9rem; height: 2.9rem; flex: none; border-radius: 14px; background: var(--blue-wash); color: var(--blue-dark); display: flex; align-items: center; justify-content: center; }
.j-icon svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.j-icon-ok { background: var(--blue); color: #fff; }
.j-chevron { font-size: 1.7rem; line-height: 1; color: var(--ink-faint); transition: transform .15s; }
.j-card:hover .j-chevron { transform: translateX(3px); color: var(--blue); }

/* grade tiles */
.j-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.j-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1.15; border-radius: 16px;
  background: var(--sheet); border: 1.5px solid var(--rule); cursor: pointer; box-shadow: var(--sh-1); transition: all .15s; }
.j-tile:hover { border-color: var(--blue); transform: translateY(-1px); }
.j-tile input { position: absolute; opacity: 0; pointer-events: none; }
.j-tile-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.j-tile-lbl { font-size: .74rem; color: var(--ink-faint); font-weight: 600; margin-top: .2rem; }
.j-tile:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; }
.j-tile:has(input:checked) .j-tile-lbl { color: rgba(255, 255, 255, .8); }
.j-tile:has(input:focus-visible) { box-shadow: var(--ring); }
.j-tile-dot { position: absolute; top: .55rem; right: .55rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); display: inline-block; }
.j-legend { display: flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--ink-soft); margin-top: 1rem; }
.j-legend .j-tile-dot { position: static; }

/* prepared tests */
.j-tests { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.j-tests form { margin: 0; }
.j-test-meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-size: .84rem; color: var(--ink-soft); margin: .3rem 0 .45rem; }
.j-test-meta span + span::before { content: "·"; margin-right: .8rem; color: var(--ink-faint); }

/* question list */
.j-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .9rem; }
.j-summary div { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: .8rem 1rem; text-align: center; }
.j-summary strong { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.j-summary span { font-size: .8rem; color: var(--ink-soft); }
.j-note { font-size: .9rem; color: var(--ink-soft); background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: .65rem .9rem; margin: 0 0 .9rem; }
.j-note-ok { background: var(--green-wash); border-color: #b7e4c7; color: #064b2f; }
.j-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.j-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.j-questions > li { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: var(--sh-1); }
.j-q-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.j-q-num { width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.j-q-tools { margin-left: auto; display: inline-flex; gap: .25rem; }
.j-icon-btn { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink-soft);
  font: 600 .95rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s; }
.j-icon-btn:hover:not([disabled]) { border-color: var(--blue); color: var(--blue-dark); }
.j-icon-btn[disabled] { opacity: .35; cursor: default; }
.j-remove:hover:not([disabled]) { border-color: var(--red); color: var(--red); background: var(--red-wash); }

/* deadline */
.j-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.8rem, 1fr)); gap: .55rem; margin-bottom: 1rem; }
.j-chip { position: relative; cursor: pointer; }
.j-chip input { position: absolute; opacity: 0; pointer-events: none; }
.j-chip > span { display: flex; flex-direction: column; gap: .1rem; padding: .75rem .9rem; border-radius: 14px; background: var(--sheet); border: 1.5px solid var(--rule);
  transition: all .15s; height: 100%; }
.j-chip strong { font-size: .96rem; }
.j-chip small { font-size: .78rem; color: var(--ink-soft); }
.j-chip:hover > span { border-color: var(--blue); }
.j-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.j-chip input:checked + span small { color: rgba(255, 255, 255, .8); }
.j-chip input:focus-visible + span { box-shadow: var(--ring); }
.j-when { margin-bottom: .6rem; }
.j-switch { display: flex; align-items: center; gap: .8rem; cursor: pointer; padding: .8rem 1rem; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: 14px; margin: .4rem 0 1rem; }
.j-switch input { position: absolute; opacity: 0; pointer-events: none; }
.j-switch-track { position: relative; width: 2.8rem; height: 1.6rem; flex: none; border-radius: 999px; background: var(--rule-strong); transition: background .2s; }
.j-switch-track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.j-switch input:checked + .j-switch-track { background: var(--blue); }
.j-switch input:checked + .j-switch-track::after { transform: translateX(1.2rem); }
.j-switch input:focus-visible + .j-switch-track { box-shadow: var(--ring); }

/* confirm */
.j-review { margin: 0 0 1rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--sh-1); overflow: hidden; }
.j-review > div { display: grid; grid-template-columns: 8.5rem 1fr auto; gap: .2rem 1rem; align-items: baseline; padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.j-review > div:last-child { border-bottom: 0; }
.j-review dt { font-size: .84rem; color: var(--ink-soft); }
.j-review dd { margin: 0; font-weight: 600; display: flex; flex-direction: column; }
.j-review dd small { font-weight: 400; color: var(--ink-soft); font-size: .84rem; }
.j-review a { font-size: .86rem; font-weight: 600; text-decoration: none; }
.j-save-name { display: none; }
form:has(input[name=saveAs]:checked) .j-save-name { display: block; }

/* done */
.j-done { text-align: center; padding-top: 2.5rem; }
.j-done .j-sub { max-width: 30rem; margin-left: auto; margin-right: auto; }
.j-done-mark { width: 5.5rem; height: 5.5rem; margin: 0 auto 1.4rem; }
.j-done-mark svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.j-done-mark circle { fill: var(--blue); stroke: none; transform-origin: center; animation: j-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.j-done-mark path { stroke: #fff; stroke-width: 4.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: j-draw .4s .3s ease-out forwards; }
@keyframes j-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes j-draw { to { stroke-dashoffset: 0; } }
.j-done-actions { display: grid; gap: .6rem; max-width: 22rem; margin: 2rem auto 0; }

/* sticky bottom bar */
.j-bar { position: sticky; bottom: 0; z-index: 25; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--rule);
  box-shadow: 0 -6px 20px -12px rgba(16, 24, 40, .25); padding-bottom: env(safe-area-inset-bottom); }
.j-bar-inner { max-width: 40rem; margin: 0 auto; padding: .75rem 1.25rem; display: flex; align-items: center; gap: .6rem; }
main.journey:has(.j-wrap-wide) .j-bar-inner { max-width: var(--w); }
.j-bar-spacer { flex: 1; }
.j-back svg, .j-next svg { width: 1.15rem; height: 1.15rem; }
.j-next { min-width: 10.5rem; border-radius: 999px; }
.j-back { border-radius: 999px; }
.j-next[disabled] { opacity: .45; }

@media (max-width: 640px) {
  main.journey { padding-top: .8rem; }
  .j-progress li span { display: none; }
  .j-progress { margin-bottom: 1.2rem; }
  .j-grades { grid-template-columns: repeat(3, 1fr); }
  .j-review > div { grid-template-columns: 1fr auto; }
  .j-review dt { grid-column: 1 / -1; }
  .j-next { min-width: 0; flex: 1; }
  .j-card { padding: .95rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .j-wrap > *, .j-done-mark circle, .j-done-mark path { animation: none; }
  .j-done-mark path { stroke-dashoffset: 0; }
}

/* ---------- Sign-up journey and the setup screens after it (/registracia/*, /dobre-doshli/*) ---------- */
.j-alt { margin-top: 1.4rem; color: var(--ink-soft); font-size: .95rem; }
.j-big-field input { font-size: 1.25rem; padding: .95rem 1.05rem; border-radius: 14px; }
.j-big-field .code-input { font-size: 2rem; }
.j-consents { display: grid; gap: .5rem; margin-top: 1.2rem; }
.j-check { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; background: var(--sheet); border: 1.5px solid var(--rule);
  border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.j-check input { width: 1.25rem; height: 1.25rem; margin-top: .1rem; flex: none; accent-color: var(--blue); }
.j-check:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.j-check.has-error { border-color: var(--red); }
.j-check-optional { border-style: dashed; }
.j-consents .field-error { margin: -.2rem 0 .2rem .3rem; }
.j-welcome { background: var(--green-wash); color: #064b2f; border: 1px solid #b7e4c7; border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1.2rem; font-weight: 500; }
.j-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin: 1.4rem 0 .6rem; }
.j-group:first-child h2 { margin-top: 0; }
.j-picks { display: flex; flex-wrap: wrap; gap: .5rem; }
.j-pick { position: relative; cursor: pointer; }
.j-pick input { position: absolute; opacity: 0; pointer-events: none; }
.j-pick span { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border-radius: 999px; background: var(--sheet);
  border: 1.5px solid var(--rule); font-weight: 500; transition: all .15s; }
.j-pick:hover span { border-color: var(--blue); }
.j-pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.j-pick input:checked + span::before { content: "✓"; font-weight: 700; }
.j-pick input:focus-visible + span { box-shadow: var(--ring); }
.j-picks-big { margin-bottom: 1.4rem; }
.j-picks-big .j-pick span { padding: .85rem 1.3rem; font-size: 1.05rem; }
.j-or { margin: 1.4rem 0 .6rem; }
.j-price { position: relative; max-width: 14rem; }
.j-price input { font-size: 2rem; font-weight: 800; padding-right: 2.6rem; }
.j-price-unit { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 700; color: var(--ink-faint); }
.j-chips-3 { grid-template-columns: repeat(3, 1fr); }
.j-skip { border-radius: 999px; }
@media (max-width: 640px) { .j-skip { padding-left: .6rem; padding-right: .6rem; } }

/* bottom bar on narrow screens: the main button never wraps; "Назад" becomes an arrow when there is also "Пропусни" */
.j-next { white-space: nowrap; }
@media (max-width: 640px) {
  .j-bar-inner { gap: .4rem; padding-left: 1rem; padding-right: 1rem; }
  .j-bar-inner:has(.j-skip) .j-back-text { display: none; }
  .j-bar-inner:has(.j-skip) .j-back { padding-left: .7rem; padding-right: .7rem; }
  .j-next { padding-left: 1.1rem; padding-right: 1.1rem; }
}
@media (max-width: 640px) { .j-bar-spacer { display: none; } .j-next { flex: 1; justify-content: center; } }

/* ==========================================================================
   Mobile header and menu drawer (fragments/mobile.html). Below 860px the desktop links are hidden;
   the header shows the logo, quick icons and a menu button that opens a sheet from the right.
   Works without JavaScript through #menu:target; app.js adds animation, Esc and focus handling.
   ========================================================================== */
.m-actions, .m-drawer { display: none; }
.m-ico { width: 1.35rem; height: 1.35rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .site-header .wrap { min-height: 3.75rem; gap: .5rem; flex-wrap: nowrap; }
  .site-header .nav, .site-header .nav.open, .btn.nav-toggle { display: none; }
  .brand { font-size: 1.3rem; }
  .brand-mark { width: 2rem; height: 2rem; }
  .m-actions { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
  .m-quick { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
  .m-quick:hover, .m-quick.on { background: var(--blue-wash); color: var(--blue-dark); }
  .m-burger { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    background: var(--ink); text-decoration: none; }
  .m-burger span { display: block; width: 1.1rem; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .2s; }
  .m-burger span:nth-child(2) { width: .75rem; margin-left: .35rem; }
  html.m-open .m-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  html.m-open .m-burger span:nth-child(2) { opacity: 0; }
  html.m-open .m-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .m-drawer { display: block; position: fixed; inset: 0; z-index: 60; visibility: hidden; pointer-events: none; }
  .m-drawer:target, html.m-open .m-drawer { visibility: visible; pointer-events: auto; }
  .m-backdrop { position: absolute; inset: 0; background: rgba(7, 41, 44, .45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s; }
  .m-drawer:target .m-backdrop, html.m-open .m-backdrop { opacity: 1; }
  .m-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(22rem, 88vw); background: var(--sheet); box-shadow: var(--sh-3);
    display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem 1.2rem;
    transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); }
  .m-drawer:target .m-sheet, html.m-open .m-sheet { transform: none; }
  .m-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; position: sticky; top: 0; background: var(--sheet); z-index: 1; }
  .m-sheet-head .brand span { text-transform: lowercase; }
  .m-close { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: var(--paper); }
  .m-close svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

  .m-user { display: flex; align-items: center; gap: .8rem; padding: .85rem; margin: .4rem 0 .8rem; border-radius: 16px; background: var(--blue-wash);
    color: var(--ink); text-decoration: none; }
  .m-user strong { display: block; font-size: 1rem; }
  .m-user small { color: var(--blue-dark); font-size: .8rem; }
  .m-avatar { width: 2.8rem; height: 2.8rem; flex: none; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: 1.15rem;
    display: inline-flex; align-items: center; justify-content: center; }
  .m-guest { padding: 1rem; margin: .4rem 0 .8rem; border-radius: 16px; background: var(--deep); color: #fff; }
  .m-guest strong { display: block; font-size: 1.05rem; line-height: 1.3; margin-bottom: .25rem; }
  .m-guest small { color: #d2e6e7; }
  .m-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin: 1rem .6rem .3rem; }
  .m-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .m-links a { display: flex; align-items: center; gap: .85rem; padding: .8rem .7rem; border-radius: 12px; color: var(--ink); text-decoration: none;
    font-weight: 550; font-size: 1.02rem; }
  .m-links a .m-ico { color: var(--ink-soft); }
  .m-links a:hover { background: var(--paper); }
  .m-links a.on { background: var(--blue-wash); color: var(--blue-dark); }
  .m-links a.on .m-ico { color: var(--blue); }
  .m-foot { margin-top: auto; padding-top: 1.2rem; display: grid; gap: .55rem; }
  .m-foot form { margin: 0; }
  .m-logout { display: flex; align-items: center; gap: .85rem; width: 100%; padding: .8rem .7rem; border: 0; border-radius: 12px; background: none;
    font: 550 1.02rem var(--sans); color: var(--red); cursor: pointer; }
  .m-logout:hover { background: var(--red-wash); }
  .m-legal { margin: .6rem 0 0; font-size: .8rem; color: var(--ink-faint); text-align: center; }
  .m-legal a { color: var(--ink-soft); text-decoration: none; }
  html.m-open, html.m-open body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .m-sheet, .m-backdrop, .m-burger span { transition: none; } }

/* ---------- Mobile bottom tab bar (fragments/mobile :: tabs) ---------- */
.m-tabs { display: none; }
.m-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px;
  background: var(--red); color: #fff; font: 700 .68rem/1 var(--sans); margin-left: auto; }
@media (max-width: 860px) {
  .m-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--rule);
    padding: .3rem .4rem max(.35rem, env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -16px rgba(16, 24, 40, .3); }
  .m-tabs a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .35rem .1rem .25rem;
    color: var(--ink-faint); text-decoration: none; font-size: .68rem; font-weight: 600; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .m-tabs a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .m-tabs .m-ico { width: 1.45rem; height: 1.45rem; transition: transform .2s; }
  .m-tabs a::before { content: ""; position: absolute; top: .2rem; width: 3rem; height: 1.95rem; border-radius: 999px; background: transparent;
    transition: background .2s; z-index: -1; }
  .m-tabs a.on { color: var(--blue-dark); }
  .m-tabs a.on::before { background: var(--blue-wash); }
  .m-tabs a.on .m-ico { stroke-width: 2.1; }
  .m-tabs a:active .m-ico { transform: scale(.9); }
  .m-tabs .m-badge { position: absolute; top: .05rem; left: calc(50% + .45rem); margin: 0; box-shadow: 0 0 0 2px #fff; }
  body:has(.m-tabs) { padding-bottom: calc(4.1rem + env(safe-area-inset-bottom)); }
  body:has(main.journey) .m-tabs, html.m-open .m-tabs { display: none; }
  body:has(main.journey) { padding-bottom: 0; }
  .m-links .m-badge { margin-left: auto; }
  .cookie-note { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
}

/* ---------- Landing hero on phones: same texts and colours, better fit ---------- */
@media (max-width: 700px) {
  .lp-hero { padding-top: 1.6rem; }
  .lp-hero > .wrap:first-child { position: relative; }
  /* the 0 € sticker sits in the top corner instead of under the button */
  .lp-sticker { position: absolute; top: -.3rem; right: 1rem; width: 5.4rem; height: 5.4rem; margin: 0; transform: rotate(10deg);
    font-size: .6rem; line-height: 1.2; box-shadow: 0 8px 20px -8px rgba(10, 143, 147, .6); }
  .lp-sticker b { font-size: 1.45rem; margin-bottom: .1rem; }
  .lp-kicker { flex-direction: column; align-items: flex-start; gap: .55rem; padding-right: 6rem; margin-bottom: 1.5rem; font-size: .92rem; }
  /* headline: a bit smaller; each choice gets its own full-width line, so no word is cut off */
  .lp-sentence h1 { font-size: clamp(2.05rem, 9.6vw, 2.7rem); line-height: 1.1; max-width: none; }
  .lp-pick { display: block; margin: .14em 0; }
  .lp-pick select { display: block; width: 100% !important; max-width: none; font-size: .86em; padding: .06em 1.4em .1em .25em;
    border-radius: 6px 6px 0 0; background-position: right .35em center; background-size: .5em; text-overflow: ellipsis; }
  .lp-line { display: flex; align-items: center; gap: .3em; white-space: nowrap; }
  .lp-line .lp-pick { flex: 1; min-width: 0; }
  /* the call to action fills the width */
  .lp-go-row { flex-direction: column; align-items: stretch; gap: .9rem; margin-top: 1.6rem; }
  .lp-go { justify-content: space-between; padding: 1rem 1rem 1rem 1.4rem; font-size: 1.08rem; }
    .lp-facts { margin-top: 2.2rem; }
  .lp-facts li, .lp-facts li + li { padding: .95rem 0 .95rem 1.9rem; position: relative; }
  .lp-facts li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--blue)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.5 12.5 3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/75% no-repeat; }
}
@media (max-width: 360px) {
  .lp-sticker { width: 4.6rem; height: 4.6rem; }
  .lp-sticker b { font-size: 1.2rem; }
  .lp-kicker { padding-right: 5rem; }
}
@media (max-width: 700px) { .lp-facts li:nth-child(n) { padding: .95rem 0 .95rem 1.9rem; border-left: 0; } }

/* ---------- Landing facts on phones: a 2 × 2 grid of small cards instead of a ruled list ---------- */
@media (max-width: 700px) {
  .lp-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; border-top: 0; margin-top: 2rem; padding-bottom: 2.2rem; }
  .lp-facts li:nth-child(n) { position: relative; padding: 2.7rem .9rem .9rem; border: 1px solid var(--rule); border-top: 1px solid var(--rule);
    border-radius: 16px; background: var(--sheet); box-shadow: var(--sh-1); font-size: .84rem; line-height: 1.4; }
  .lp-facts li::before { left: .9rem; top: .9rem; width: 1.45rem; height: 1.45rem; }
  .lp-facts b { font-size: .95rem; line-height: 1.25; margin-bottom: .3rem; }
}
@media (max-width: 340px) { .lp-facts { grid-template-columns: 1fr; } }

/* ---------- Share box for a teacher's listing (fragments/share.html) ---------- */
.share { background: var(--sheet); border: 1px solid var(--rule); border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: var(--sh-1); margin: 0 0 1.4rem; }
.share-head h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.share-head p { margin: 0 0 .9rem; }
.share-link { display: flex; gap: .5rem; }
.share-link input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; background: var(--paper); }
.share-link .btn { flex: none; min-width: 7rem; }
.share-targets { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.share-target { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--sheet); color: var(--ink); font: 600 .88rem var(--sans); text-decoration: none; cursor: pointer; transition: all .15s; }
.share-target svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-target:hover { border-color: currentColor; transform: translateY(-1px); }
.share-native { background: var(--ink); border-color: var(--ink); color: #fff; }
.share-native:hover { color: #fff; }
.share-viber:hover { color: #7360f2; } .share-whatsapp:hover { color: #1fa855; } .share-facebook:hover { color: #1877f2; } .share-mail:hover { color: var(--blue-dark); }
.share-msg { margin-top: .9rem; }
.share-msg summary { cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--blue-dark); }
.share-msg textarea { margin: .6rem 0 .5rem; min-height: 0; font-size: .92rem; background: var(--paper); }
.share-own { margin-bottom: 1.2rem; }
.share-own > summary { cursor: pointer; padding: .8rem 1rem; border-radius: 12px; background: var(--blue-wash); color: var(--blue-dark); list-style: none; }
.share-own > summary::-webkit-details-marker { display: none; }
.share-own[open] > summary { margin-bottom: .8rem; }
.j-done-share { text-align: left; margin: 1.6rem auto 0; max-width: 32rem; }
@media (max-width: 640px) {
  .share { padding: 1rem; }
  .share-link { flex-direction: column; }
  .share-link .btn { width: 100%; }
  .share-target { flex: 1 1 calc(50% - .45rem); justify-content: center; }
  .share-native { flex-basis: 100%; }
}
.btn.is-copied { background: var(--green); border-color: var(--green); color: #fff; }
.panel + .share { margin-top: .9rem; }

/* ---------- Mobile tab bar, iOS style: a floating glass capsule with a rounded active pill ---------- */
@media (max-width: 860px) {
  .m-tabs { left: .75rem; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); padding: .25rem;
    border-radius: 28px; border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
    box-shadow: 0 10px 30px -8px rgba(16, 24, 40, .28), 0 2px 6px rgba(16, 24, 40, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
    animation: m-tabs-in .35s cubic-bezier(.2, .9, .3, 1.2) both; }
  .m-tabs::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    box-shadow: inset 0 0 0 .5px rgba(16, 24, 40, .08); }
  .m-tabs a { border-radius: 22px; padding: .3rem .1rem .25rem; gap: .08rem; transition: color .2s, transform .15s; }
  .m-tabs .m-ico { width: 1.3rem; height: 1.3rem; }
  .m-tabs a::before { inset: 0; top: 0; width: auto; height: auto; border-radius: 22px; background: transparent; transform: scale(.8); opacity: 0;
    transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), opacity .2s, background .2s; }
  .m-tabs a.on::before { background: rgba(10, 143, 147, .13); transform: scale(1); opacity: 1; box-shadow: inset 0 0 0 1px rgba(10, 143, 147, .12); }
  .m-tabs a:hover::before { background: rgba(16, 24, 40, .05); transform: scale(1); opacity: 1; }
  .m-tabs a.on:hover::before { background: rgba(10, 143, 147, .16); }
  .m-tabs a:active { transform: scale(.92); }
  .m-tabs a:active .m-ico { transform: none; }
  .m-tabs a.on .m-ico { transform: translateY(-1px); }
  .m-tabs .m-badge { top: .1rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, .95); }
  body:has(.m-tabs) { padding-bottom: calc(4.8rem + env(safe-area-inset-bottom)); }
  body:has(main.journey) { padding-bottom: 0; }
  .cookie-note { bottom: calc(6rem + env(safe-area-inset-bottom)); }
}
@keyframes m-tabs-in { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .m-tabs { animation: none; } .m-tabs a, .m-tabs a::before { transition: none; } }

/* Tags inside a tag list may break their own text, so a long subject name never runs past the card */
.tags { min-width: 0; max-width: 100%; }
.tags .tag { white-space: normal; max-width: 100%; text-align: left; overflow-wrap: anywhere; }

/* ---------- Online tests (/kabinet/testove, /t/{code}) ---------- */
.ot-done { text-align: center; padding-top: 1.4rem; }
.ot-done > .j-exit { display: inline-flex; margin-bottom: 1rem; }
.ot-qr { margin: 1.4rem auto .8rem; max-width: 20rem; background: #fff; border: 1px solid var(--rule); border-radius: 22px; padding: 1.1rem;
  box-shadow: var(--sh-2); }
.ot-qr-code svg { display: block; width: 100%; height: auto; }
.ot-qr figcaption { display: flex; flex-direction: column; gap: .2rem; margin-top: .6rem; }
.ot-qr-url { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.ot-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.4rem; }
.ot-rows .when strong { font-size: 1.6rem; }
.ot-actions { margin: 1rem 0 1.4rem; }
.ot-actions .spacer { flex: 1; }
.ot-url { font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.ot-qstats { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ot-qstats li { display: grid; grid-template-columns: 6rem 1fr auto; gap: .8rem; align-items: center; background: var(--sheet); border: 1px solid var(--rule);
  border-radius: 12px; padding: .6rem .8rem; font-size: .9rem; }
.ot-qstat-bar { display: block; height: .55rem; border-radius: 999px; background: var(--paper); overflow: hidden; }
.ot-qstat-bar span { display: block; height: 100%; border-radius: inherit; }
.ot-qstat-bar .high { background: var(--green); } .ot-qstat-bar .mid { background: var(--accent); } .ot-qstat-bar .low { background: var(--red); }
.ot-qstat-num { color: var(--ink-soft); white-space: nowrap; }
.w0 { width: 0; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
.ot-badge { display: inline-flex; font: 700 .74rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--blue-dark);
  background: var(--blue-wash); padding: .45rem .75rem; border-radius: 999px; margin: 0 0 .9rem; }
.ot-intro .j-summary, .ot-result .j-summary { margin: 1.2rem 0; }
.ot-as { color: var(--ink-soft); margin: .4rem 0 1rem; }
.ot-take-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ot-take-head .ot-badge { margin: 0; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-progress { height: 5px; border-radius: 999px; background: var(--rule); margin: .9rem 0 1rem; overflow: hidden; }
.ot-progress span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: inherit; transition: width .25s; }
.ot-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ot-q { background: var(--sheet); border: 1px solid var(--rule); border-radius: 18px; padding: 1.1rem; box-shadow: var(--sh-1); }
.ot-q-text { font-size: 1.08rem; font-weight: 600; margin: .4rem 0 .9rem; }
.ot-options { gap: .5rem; }
.ot-option { padding: .8rem .9rem; box-shadow: none; }
.ot-letter { width: 1.9rem; height: 1.9rem; flex: none; border-radius: 50%; background: var(--paper); color: var(--ink-soft); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.ot-option:has(input:checked) .ot-letter { background: var(--blue); color: #fff; }
.ot-q textarea { min-height: 6rem; }
.ot-q.is-answered { border-color: #b5e4e3; }
.ot-left { white-space: nowrap; }
.ot-score { width: 9rem; height: 9rem; margin: .4rem auto 1.2rem; border-radius: 50%; background: var(--blue); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 12px 30px -10px rgba(10, 143, 147, .6); }
.ot-score strong { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ot-score span { font-size: .78rem; opacity: .9; margin-top: .3rem; }
.ot-score.is-pending { background: var(--accent); color: var(--ink); box-shadow: 0 12px 30px -10px rgba(255, 200, 61, .7); }
.ot-result { text-align: center; }
.ot-result .ot-review { text-align: left; margin-top: 1.4rem; }
@media (max-width: 640px) {
  .ot-qstats li { grid-template-columns: 1fr; gap: .35rem; }
  .ot-score { width: 7.5rem; height: 7.5rem; }
}

/* ---------- Sign-in with Google / Facebook ---------- */
.social { display: grid; gap: .6rem; margin: 0 0 1.2rem; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: .85rem 1rem; border-radius: 14px; background: var(--sheet);
  border: 1.5px solid var(--rule-strong); color: var(--ink); font-weight: 650; text-decoration: none; box-shadow: var(--sh-1); transition: all .15s; }
.social-btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); box-shadow: var(--sh-2); }
.social-btn svg { width: 1.35rem; height: 1.35rem; flex: none; }
.social-divider { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 0; color: var(--ink-faint); font-size: .85rem; }
.social-divider::before, .social-divider::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.identities { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.identities li { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border: 1px solid var(--rule); border-radius: 12px; }
.identities svg { width: 1.5rem; height: 1.5rem; flex: none; }
.identities .who { flex: 1; min-width: 0; }
.identities .who strong { display: block; }
.identities .who small { color: var(--ink-soft); overflow-wrap: anywhere; }
.identities form { margin: 0; }
/* ---------- Admin report: daily stacked bars (online tests). Colours validated for colour-blind separation. ---------- */
.report-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; align-items: end; height: 10rem; padding: .7rem .7rem 0;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; border-bottom-width: 1px; }
.report-bar { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; cursor: default; }
.report-bar:hover .report-seg { filter: brightness(1.12); }
.report-seg { display: block; min-height: 2px; }
.report-seg + .report-seg { margin-top: 2px; }
.report-bar .report-seg:first-child { border-radius: 4px 4px 0 0; }
.report-seg-student { background: #0093a0; }
.report-seg-guest { background: #b88000; }
.report-bar-day { height: 1.3rem; font-size: .62rem; color: var(--ink-faint); text-align: center; padding-top: .25rem; white-space: nowrap; overflow: visible; }
.report-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; }
.report-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-left: .6rem; }
.report-key:first-child { margin-left: 0; }
.report-key-student { background: #0093a0; } .report-key-guest { background: #b88000; }
.report-table-view { margin: .6rem 0 0; }
.report-table-view summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--blue-dark); }
.report-table-view .table { margin-top: .6rem; max-width: 28rem; }

/* ---- Academies: the "Школа" mark next to an academy's name (catalog card, profile page) ---- */
.tag-academy { color: var(--deep); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* ---- Съветник (/savetnik): results page, and its entry points on the landing page and the catalog ---- */
.helper-results { max-width: 52rem; padding-bottom: 3rem; }
.helper-head { align-items: flex-start; gap: 1rem 1.5rem; flex-wrap: wrap; }
.helper-kicker { margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dark); }
.helper-summary { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; }
.helper-summary li { font-size: .86rem; padding: .25rem .65rem; border-radius: 999px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-strong); color: var(--ink-soft); }
.helper-picks { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.helper-pick { position: relative; }
.helper-best { display: inline-block; margin: 0 0 .8rem; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--accent-wash); color: var(--ink); }
.helper-pick-head { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem 1rem; align-items: start; }
.helper-pick-title { min-width: 0; }
.helper-pick-title h2 { font-size: 1.2rem; margin: 0 0 .2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.helper-pick-title .headline { margin: 0 0 .35rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.helper-pick-title .meta { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.helper-pick-title .meta > span + span::before { content: "·"; margin: 0 .45rem; color: var(--ink-faint); }
.helper-why { display: grid; gap: .5rem; margin-top: .9rem; }
.helper-reasons, .helper-caveats { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .93rem; }
.helper-reasons li, .helper-caveats li { position: relative; padding-left: 1.5rem; }
.helper-reasons li::before { content: ""; position: absolute; left: .15rem; top: .3em; width: .45rem; height: .8rem; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.helper-caveats li { color: var(--amber); }
.helper-caveats li::before { content: "!"; position: absolute; left: .1rem; top: 0; width: 1rem; text-align: center; font-weight: 800; }
.helper-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.helper-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--r-lg); background: var(--sheet); box-shadow: var(--sh-1); }
.helper-more p { margin: 0; }
.helper-how { margin-top: 1.5rem; max-width: 44rem; }
@media (max-width: 640px) {
  .helper-pick-head { grid-template-columns: auto 1fr; }
  .helper-pick-head .price { grid-column: 1 / -1; }
  .helper-actions .btn { flex: 1 1 auto; text-align: center; }
}

/* Catalog sidebar box. */
.helper-promo { margin: 0 0 1.1rem; padding: 0 0 1.1rem; border-bottom: 1px solid var(--rule); }
.helper-promo p { margin: 0 0 .6rem; font-size: .93rem; }
.helper-school-note { margin: .9rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--rule); }

/* ---- Feedback module: grades (2-6) and written feedback, /kabinet/otsenki and /moite-otsenki ---- */
.nav .count { display: inline-block; margin-left: .35rem; font-size: .72rem; font-weight: 700; line-height: 1.3; background: var(--accent); color: var(--ink); border-radius: 999px; padding: .05rem .45rem; vertical-align: .1em; }
.lead-small { color: var(--ink-soft); max-width: 44rem; margin: 0 0 1.4rem; }
.grade { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: 10px;
  font: 800 1.15rem/1 var(--serif); }
.grade-ok { color: var(--green); background: var(--green-wash); }
.grade-mid { color: var(--amber); background: var(--amber-wash); }
.grade-low { color: var(--red); background: var(--red-wash); }
.fb-avg { display: inline-flex; align-items: baseline; gap: .4rem; margin: .2rem 0 0; padding: .15rem .6rem; border-radius: 999px; font-size: .92rem; }
.fb-avg b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fb-avg-big { font-size: 1rem; padding: .3rem .8rem; }
.fb-avg-big b { font: 800 1.6rem/1 var(--serif); }
.fb-notes { display: grid; gap: .9rem; }
.fb-note { background: var(--sheet); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 1.1rem 1.2rem; }
.fb-note-wrap .fb-note { margin: 0; }
.fb-note-head { display: flex; gap: .9rem; align-items: flex-start; }
.fb-note-who { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.fb-note-meta { margin: .1rem 0 0; font-size: .86rem; color: var(--ink-soft); }
.fb-note-meta > span + span::before { content: "·"; margin: 0 .45rem; color: var(--ink-faint); }
.fb-note-body { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1.4rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--rule); }
.fb-note-body h4 { margin: 0 0 .2rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.fb-note-body p { margin: 0; }
.fb-note-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin: .4rem .2rem 0; font-size: .9rem; }
.fb-summaries { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .9rem; }
.fb-summaries > li, .fb-summaries > li.panel { margin: 0; }
.fb-summaries p { margin: 0 0 .35rem; }
.fb-sum-subject { font-weight: 700; font-size: 1.05rem; }
.fb-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.fb-row .grade { width: 1.8rem; height: 1.8rem; font-size: .95rem; border-radius: 8px; }
.fb-delete { margin-top: 1rem; }
.grade-picks { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.grade-pick { position: relative; cursor: pointer; }
.grade-pick input { position: absolute; opacity: 0; pointer-events: none; }
.grade-pick > span { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 5.2rem; padding: .55rem .6rem;
  border-radius: var(--r); background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--rule-strong); color: var(--ink-soft); }
.grade-pick > span b { font: 800 1.4rem/1 var(--serif); }
.grade-pick > span small { font-size: .74rem; }
.grade-pick > span.grade-ok, .grade-pick > span.grade-mid, .grade-pick > span.grade-low { background: var(--sheet); }
.grade-pick > span.grade-ok b, .grade-pick input:checked + span.grade-ok { color: var(--green); }
.grade-pick > span.grade-mid b, .grade-pick input:checked + span.grade-mid { color: var(--amber); }
.grade-pick > span.grade-low b, .grade-pick input:checked + span.grade-low { color: var(--red); }
.grade-pick input:checked + span:not([class*="grade-"]) { color: var(--ink); }
.grade-pick input:checked + span { box-shadow: inset 0 0 0 2.5px currentColor; }
.grade-pick input:checked + span.grade-ok { background: var(--green-wash); }
.grade-pick input:checked + span.grade-mid { background: var(--amber-wash); }
.grade-pick input:checked + span.grade-low { background: var(--red-wash); }
.grade-pick input:focus-visible + span { box-shadow: var(--ring); }
@media (max-width: 640px) {
  .fb-note-body { grid-template-columns: 1fr; }
  .grade-pick > span { min-width: 4.2rem; }
}
/* Narrow desktops: the avatar initial is enough; the full name would push the menu wider than the screen. */
@media (min-width: 861px) and (max-width: 1100px) { .nav-user .nav-name { display: none; } }

/* ---- Students module: invitation link (/kabinet/uchenici) and the invitation page (/svarzvane/{code}) ---- */
.inv-benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.6rem; }
.inv-benefits li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); }
.inv-benefits li strong { display: block; color: var(--ink); }
.inv-benefits li::before { content: ""; position: absolute; left: .2rem; top: .3em; width: .45rem; height: .8rem; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.inv-benefits-short { grid-template-columns: 1fr; margin: .4rem 0 1rem; }
.inv-benefits-short li strong { display: inline; }
.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.inv-steps li { display: flex; gap: .7rem; align-items: flex-start; }
.inv-steps b { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--ink); font-weight: 800; }
.inv-share .share { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.inv-qr { display: flex; gap: 1.2rem; align-items: center; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--rule); }
.inv-qr-img { flex: none; width: 8.5rem; height: 8.5rem; background: #fff; border-radius: var(--r); padding: .4rem; box-shadow: inset 0 0 0 1px var(--rule); }
.inv-qr-img svg { width: 100%; height: 100%; display: block; }
.inv-qr p { margin: 0 0 .6rem; }
.inv-list-title { margin-top: 2rem; }
.inv-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; align-items: center; }
.inv-actions form { margin: 0; }
.inv-page { max-width: 40rem; padding-top: 2rem; padding-bottom: 3rem; }
.inv-card h1 { margin: 0 0 .2rem; }
.inv-who { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.2rem; }
.inv-who p { margin: 0; }
.inv-lead { font-size: 1.05rem; }
.inv-mine { margin-top: 2rem; }
.inv-mine li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
form.inline { display: inline; margin: 0; }
@media (max-width: 760px) {
  .inv-benefits, .inv-steps { grid-template-columns: 1fr; }
  .inv-qr { flex-direction: column; align-items: flex-start; }
  .inv-actions { justify-content: flex-start; }
}
/* Kabinet home: the invitation right after login. */
.inv-top { position: relative; background: var(--sheet); border: 1.5px solid var(--blue); border-radius: var(--r-lg); padding: 1.6rem 1.8rem;
  margin: .4rem 0 2rem; box-shadow: 0 8px 24px -12px rgba(10, 143, 147, .35); }
.inv-top-head { display: flex; gap: 1.2rem 2rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.3rem; }
.inv-top h2 { margin: 0 0 .45rem; font-size: 1.2rem; }
.inv-top-head p { margin: 0; color: var(--ink-soft); max-width: 40rem; }
.inv-top-head .inv-top-tags { margin-bottom: .7rem; }
.inv-top-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.inv-top-tags .badge-new { margin: 0; }
.inv-top-count { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: var(--blue-wash); color: var(--blue-dark); text-decoration: none; }
.inv-top-count:hover { color: var(--blue-dark); text-decoration: underline; }
.inv-top-qr { flex: none; display: flex; gap: 1rem; align-items: center; margin: 0; padding: .8rem 1rem .8rem .8rem; border-radius: var(--r);
  background: var(--blue-wash); max-width: 20rem; }
.inv-top-qr-img { flex: none; width: 6.5rem; height: 6.5rem; padding: .3rem; background: #fff; border-radius: 8px; }
.inv-top-qr-img svg { width: 100%; height: 100%; display: block; }
.inv-top-qr figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; font-size: .8rem; color: var(--ink-soft); }
.inv-top-qr figcaption strong { font-size: .92rem; color: var(--blue-dark); }
.inv-top-qr .btn { margin-top: .2rem; }
.inv-top .share-link { margin: 0; }
.inv-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .9rem 0 0; }
.inv-top-more { margin-left: auto; font-weight: 600; font-size: .92rem; }
@media (max-width: 640px) {
  .inv-top-head { flex-direction: column; }
  .inv-top-qr { max-width: none; width: 100%; }
  .inv-top { padding: 1.2rem 1.1rem; }
  .inv-top-more { margin-left: 0; flex-basis: 100%; }
}
/* Collapsible panel: <details class="fold panel"> with a chevron; closed by default. */
.fold { padding: 0; }
.fold + .fold { margin-top: .8rem; }
.fold > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; align-items: center;
  padding: 1rem 1.3rem; cursor: pointer; border-radius: var(--r-lg); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover .fold-title { color: var(--blue-dark); }
.fold > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.fold-title { grid-column: 1; font-weight: 700; font-size: 1.05rem; }
.fold-sub { grid-column: 1; font-size: .86rem; color: var(--ink-soft); }
.fold-chevron { grid-column: 2; grid-row: 1 / span 2; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue-wash); position: relative; transition: transform .2s; }
.fold-chevron::before { content: ""; position: absolute; left: 50%; top: 45%; width: .5rem; height: .5rem; border: solid var(--blue-dark);
  border-width: 0 2.2px 2.2px 0; transform: translate(-50%, -50%) rotate(45deg); }
.fold[open] > summary .fold-chevron { transform: rotate(180deg); }
.fold[open] > summary { border-bottom: 1px solid var(--rule); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fold-body { padding: 1.2rem 1.3rem 1.3rem; }
.fold-body > .lead-small { margin-top: 0; }
.inv-how-title { font-size: 1rem; margin: 1.5rem 0 .8rem; }
@media (prefers-reduced-motion: reduce) { .fold-chevron { transition: none; } }

/* "Ново" pill: draws the eye to a new feature without colouring the whole card. */
.badge-new { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; padding: .2rem .6rem .2rem .5rem; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.badge-new i { position: relative; width: .45rem; height: .45rem; border-radius: 50%; background: #fff; }
.badge-new i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: badge-pulse 1.8s ease-out infinite; }
@keyframes badge-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .badge-new i::after { animation: none; } }
/* Landing hero: the Съветник is the main way in; the sentence search above it stays for people who know what they want. */
.lp-go-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); padding-top: .75rem; padding-bottom: .75rem; font-size: 1rem; }
.lp-go-quiet svg { width: 1.9rem; height: 1.9rem; }
.lp-go-quiet:hover { background: var(--ink); color: #fff; }
.lp-advisor { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 2.5rem; align-items: center;
  margin: 2.6rem 0 0; padding: 2rem 2.2rem; border-radius: 22px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #11888c 0%, var(--deep) 55%, #08484b 100%);
  box-shadow: 0 24px 48px -20px rgba(11, 92, 96, .55); }
.lp-advisor::after { content: ""; position: absolute; right: -3rem; bottom: -4rem; width: 14rem; height: 14rem; border-radius: 50%;
  border: 2.2rem solid rgba(255, 200, 61, .12); pointer-events: none; }
.lp-advisor-head .lp-advisor-tag { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 1.1rem; font-weight: 700; letter-spacing: .02em; }
.lp-advisor .badge-new { background: var(--sun); color: var(--ink); margin: 0; }
.lp-advisor .badge-new i, .lp-advisor .badge-new i::after { background: var(--ink); }
.lp-advisor h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6rem; }
.lp-advisor-head p { margin: 0; color: rgba(255, 255, 255, .82); }
.lp-advisor-start { position: relative; z-index: 1; }
.lp-advisor-q { margin: 0 0 .7rem; font-weight: 700; color: var(--sun); }
.lp-advisor-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.lp-advisor-chips a { display: inline-flex; align-items: center; gap: .35rem; padding: .62rem 1.05rem; border-radius: 999px; background: #fff; color: var(--ink);
  font-weight: 600; text-decoration: none; transition: transform .15s, background .15s; }
.lp-advisor-chips a:hover { background: var(--sun); color: var(--ink); transform: translateY(-2px); }
.lp-advisor-chips a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.lp-advisor-chips .lp-advisor-more { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.lp-advisor-chips .lp-advisor-more:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lp-advisor-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 1.1rem 0 0; padding: 0; font-size: .8rem; color: rgba(255, 255, 255, .6); }
.lp-advisor-steps li { display: inline-flex; align-items: center; gap: .4rem; }
.lp-advisor-steps li::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.lp-advisor-steps li.on { color: #fff; font-weight: 600; }
.lp-advisor-steps li.on::before { background: var(--sun); }
@media (max-width: 860px) {
  .lp-advisor { grid-template-columns: 1fr; padding: 1.5rem 1.3rem; margin-top: 1.8rem; }
  .lp-advisor-steps { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lp-advisor-chips a { transition: none; } }
