/* Prava3D public site, player page and school cabinet: white, minimal, professional.
   One accent colour (the brand blue of SourceArt/Brand/mark.svg, darkened to #2563eb for readable text on white),
   orange only in the logo. Always light: no dark theme here. The owner's panel (/staff/, body.staff) uses the same
   tokens and components, denser (the «staff panel» section at the end). */
:root {
  --bg: #ffffff;
  --bg-2: #f7f8fa;          /* quiet surfaces: stats, notes, table heads */
  --surface: #ffffff;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #eef0f3;
  --accent: #2563eb;        /* brand blue #3B82F6, one step darker: AA contrast on white */
  --accent-2: #1d4ed8;
  --accent-soft: #eff4ff;
  --orange: #ff8a3d;        /* logo only */
  --green: #15803d; --green-soft: #ecfdf3;
  --red: #b91c1c; --red-soft: #fef2f2;
  --yellow: #8a5a00; --yellow-soft: #fffbeb;
  --road: #4a4f5a; --ground: #edf3ea; --mark: #ffffff; --glass: rgba(255, 255, 255, .85);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 16px rgba(17, 24, 39, .05);
  --shadow-lg: 0 2px 4px rgba(17, 24, 39, .04), 0 12px 32px rgba(17, 24, 39, .08);
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.125rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 6px; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: #fafbfc; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 640px; line-height: 1.6; }
.center .lead, .head.center .lead { margin-left: auto; margin-right: auto; }
.head { margin-bottom: 48px; }
.head .lead { margin-bottom: 0; }

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line-2); }
.nav__in { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; }
.brand b { color: var(--orange); font-weight: 700; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { color: var(--text-2); font-size: .9375rem; white-space: nowrap; }
.nav__links a:hover, .nav__links a.active { color: var(--text); text-decoration: none; }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .8125rem; padding: 3px 9px;
  cursor: pointer; border-radius: 999px; line-height: 1.5; }
.lang button:hover { color: var(--text); }
.lang button[aria-current="true"] { color: var(--text); font-weight: 600; background: var(--bg-2); }
.nav__link-sm { font-size: .9375rem; color: var(--text-2); white-space: nowrap; }
.nav__link-sm:hover { color: var(--text); text-decoration: none; }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px;
  width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; line-height: 1; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; min-height: 46px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 1rem; font-weight: 550; line-height: 1.2;
  cursor: pointer; white-space: nowrap; color: var(--text); background: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover { text-decoration: none; }
.btn--primary, .btn--blue { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn--primary:hover, .btn--blue:hover { background: var(--accent-2); color: #fff; }
.btn--dark { background: var(--text); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: #cfd3da; background: var(--bg-2); color: var(--text); }
.btn--sm { padding: 7px 14px; min-height: 36px; font-size: .875rem; border-radius: 8px; }
.btn--danger { background: var(--surface); border-color: #f1c4c4; color: var(--red); }
.btn--danger:hover { background: var(--red-soft); color: var(--red); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-link { font-weight: 550; }
.btn-link::after { content: " →"; }

/* ---------- hero ---------- */
.hero { padding: 88px 0 72px; text-align: center; }
.hero h1 { max-width: 820px; margin-left: auto; margin-right: auto; }
.hero .lead { margin: 0 auto; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 32px 0 20px; align-items: center; }
.hero .hero__cta, .center .hero__cta { justify-content: center; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; color: var(--muted); font-size: .875rem; }
.hero__tags a { color: var(--text-2); }
.tag { color: var(--muted); font-size: .875rem; }
.hero--split { text-align: left; padding: 80px 0 72px; }
.hero--split .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero--split h1, .hero--split .lead { margin-left: 0; }
.hero--split .hero__cta, .hero--split .hero__tags { justify-content: flex-start; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
.grid--one { max-width: 520px; margin: 0 auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-top: 16px; }
.card p { color: var(--text-2); margin: 0; }
.panel { border-radius: var(--radius); padding: 32px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); }
.icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.step { position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; font-weight: 650; font-size: .9rem; color: var(--accent); background: var(--accent-soft); margin-bottom: 14px; }
.step p { color: var(--text-2); margin: 0; font-size: .97rem; }
.steps--list { list-style: none; padding: 0; margin: 24px 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* pricing */
.price { display: flex; flex-direction: column; position: relative; }
.price__value { font-size: 2rem; font-weight: 700; margin: 8px 0 2px; letter-spacing: -.02em; }
.price__value small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.price--best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.badge--best { position: absolute; top: -12px; left: 28px; background: var(--accent); color: #fff; border-color: var(--accent); }
.tiers { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: .95rem; }
.tiers th, .tiers td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.tiers td:last-child, .tiers th:last-child { text-align: right; }
.tiers th { color: var(--muted); font-weight: 500; font-size: .8125rem; }

/* faq */
.faq { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 550; font-size: 1.05rem; list-style: none; display: flex;
  justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding-bottom: 18px; margin: 0; }

.cta { text-align: center; padding: 56px 28px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line-2); }
.cta .hero__cta { justify-content: center; margin-bottom: 0; }
.cta h2 { margin-bottom: 10px; }
.cta .lead { margin: 0 auto; }

/* the app's call to action on the home page */
.app-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; padding: 40px;
  border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.app-cta h2 { margin-bottom: 8px; }
.app-cta p { margin: 0; color: var(--text-2); }
.app-cta .hero__cta { margin: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 20px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 0; display: grid; gap: 16px;
  background: var(--surface); min-width: 0; }
.form legend { padding: 0 8px; font-weight: 650; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { min-width: 0; }
.field label { display: block; font-size: .875rem; font-weight: 550; margin-bottom: 6px; color: var(--text); }
.field input, .field select, .field textarea, .toolbar input, .toolbar select, .inline-form input, .inline-form select,
.form input[type=file] {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid #d5d9e0; background: var(--surface);
  color: var(--text); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s; min-height: 46px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .toolbar input:focus, .toolbar select:focus,
.inline-form input:focus, .inline-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.field input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 2px 10px 0 0; flex: none; accent-color: var(--accent); }
.field--check label { display: flex; align-items: flex-start; font-weight: 400; }
.field .help { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.field .errors, .form-errors { color: var(--red); font-size: .875rem; margin-top: 6px; }
.form-errors { background: var(--red-soft); border: 1px solid #f5cccc; border-radius: var(--radius-sm); padding: 12px 14px; }
.total { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; padding: 18px 20px;
  border-radius: var(--radius-sm); background: var(--bg-2); }
.total strong { font-size: 1.5rem; font-weight: 700; }
.form input[type=file] { padding: 8px; }
.form-page { max-width: 860px; }
.form-page h1, .page-title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }

/* ---------- messages / notes ---------- */
.messages { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); }
.messages .success { border-color: #bbe5c9; background: var(--green-soft); }
.messages .error { border-color: #f5cccc; background: var(--red-soft); }
.messages .warning { border-color: #f3dfa8; background: var(--yellow-soft); }
.note { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line-2); }
.note--warn { background: var(--yellow-soft); border-color: #f3dfa8; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }

/* ---------- cabinet ---------- */
.cab { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 40px; padding: 32px 0 96px; align-items: start; }
.side { position: sticky; top: 88px; display: grid; gap: 2px; }
.side__school { padding: 4px 12px 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; display: grid; gap: 6px; justify-items: start; }
.side__school b { display: block; }
.side a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-size: .9375rem; }
.side a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; }
.side a.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.cab__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cab__head h1 { font-size: 1.75rem; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 550; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfc; }
.table .num { text-align: right; white-space: nowrap; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .03em; font-weight: 500; }
.table .code { white-space: nowrap; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 550;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.badge--awaiting, .badge--pending, .badge--proof-new { color: var(--yellow); background: var(--yellow-soft); border-color: #f3dfa8; }
.badge--completed, .badge--available, .badge--verified, .badge--proof-accepted { color: var(--green); background: var(--green-soft); border-color: #bbe5c9; }
.badge--assigned { color: var(--accent-2); background: var(--accent-soft); border-color: #c7d7fb; }
.badge--redeemed { color: var(--text); }
.badge--cancelled, .badge--revoked, .badge--blocked, .badge--proof-rejected { color: var(--red); background: var(--red-soft); border-color: #f5cccc; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; padding: 8px 12px; min-height: 40px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.inline-form input, .inline-form select { width: auto; max-width: 100%; padding: 7px 12px; min-height: 38px; font-size: .9rem; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }
.auth { max-width: 440px; margin: 72px auto 104px; }
.auth h1 { font-size: 2rem; }
.bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar i.bar--mid { background: #d97706; }
.bar i.bar--low { background: var(--red); }
.bar i.bar--done { background: var(--green); }
select[multiple] { min-height: 160px; }
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; align-items: end; height: 180px;
  padding: 16px; border-radius: var(--radius); background: var(--bg-2); }
.chart__col { display: grid; gap: 6px; align-content: end; text-align: center; font-size: .75rem; color: var(--muted); height: 100%; }
.chart__bar { background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }

/* ---------- player page ---------- */
.account { max-width: 760px; margin: 0 auto; padding: 48px 0 96px; }
.account h2 { font-size: 1.35rem; margin-top: 40px; }
.account__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.plan-row:last-child { border-bottom: 0; }

/* ---------- legal ---------- */
.prose { max-width: 740px; }
.prose h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.prose h2 { font-size: 1.25rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--text-2); }
.prose li { margin-bottom: .4em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--bg); font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: .8rem; font-weight: 650; color: var(--text); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer__about { color: var(--muted); margin: 14px 0 0; max-width: 280px; }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-2); display: flex;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }

/* ---------- illustrations (inline SVG, colours from these tokens) ---------- */
.art { width: 100%; height: auto; display: block; }
.art--hero { max-width: 540px; margin-left: auto; }
.art-box { padding: 28px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line-2); }
.section--alt .art-box { background: var(--surface); }
.a-surface { fill: var(--surface); } .a-bg { fill: var(--bg-2); } .a-stroke { stroke: var(--line); stroke-width: 1.5; }
.a-line { fill: var(--line); } .a-text { fill: var(--text-2); } .a-road { fill: var(--road); } .a-ground { fill: var(--ground); }
.a-mark rect { fill: var(--mark); } .a-glass { fill: var(--glass); } .a-rows rect { fill: var(--line); }
.a-accent { fill: var(--accent); } .a-accent-soft { fill: var(--accent-soft); } .a-orange { fill: var(--orange); }
.a-green { fill: var(--green); } .a-green-soft { fill: var(--green-soft); } .a-red { fill: #e5484d; } .a-off { fill: #2c2c30; }
.a-dark { fill: #1f2937; } .a-star { fill: #ffd27a; }
.a-check { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.a-arrow { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 5; }
.a-arrow-head { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scene { display: none; }

/* calm motion, only when the visitor allows it */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .grid .card, .price { transition: transform .2s ease, box-shadow .2s ease; }
  .grid .card:hover, .price:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .a-car-move { animation: car-to-line 7s ease-in-out infinite; }
  @keyframes car-to-line { 0% { transform: translateY(34px); } 35%, 75% { transform: translateY(0); } 100% { transform: translateY(34px); } }
  .btn:active { transform: scale(.98); }
}

/* ---------- responsive ---------- */
.show-m { display: none; }
@media (max-width: 1000px) {
  .split, .hero--split .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero--split { text-align: center; }
  .hero--split .hero__cta, .hero--split .hero__tags { justify-content: center; }
  .hero--split .lead { margin: 0 auto; }
  .art--hero { margin: 0 auto; max-width: 440px; }
  .grid--3, .grid--4, .steps, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cab { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .side { position: static; grid-auto-flow: column; overflow-x: auto; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
  .side a { white-space: nowrap; }
  .side__school { display: none; }
}
@media (max-width: 860px) {
  .nav__links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 4px 20px 16px; box-shadow: var(--shadow-lg); }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 13px 0; font-size: 1rem; border-bottom: 1px solid var(--line-2); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__toggle { display: grid; place-items: center; }
  .nav__link-sm { display: none; }
  .hide-m { display: none !important; }
  .show-m { display: inline; }
  .nav__links .show-m { display: block; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section--tight { padding: 40px 0; }
  .hero, .hero--split { padding: 48px 0 56px; }
  .lead { font-size: 1.05rem; }
  .head { margin-bottom: 32px; }
  .nav__in { gap: 12px; height: 60px; }
  .nav__links { top: 60px; padding: 4px 16px 16px; }
  .nav__right { gap: 8px; }
  .nav__right .btn { display: none; }

  .lang button { padding: 3px 7px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
  .hero__cta .btn-link { text-align: center; }
  .grid--2, .grid--3, .grid--4, .steps, .steps--list, .row, .stats, .account__grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .card, .panel { padding: 22px; }
  .form fieldset { padding: 18px; }
  .app-cta { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; text-align: center; }
  .cta { padding: 40px 20px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 20px; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .auth { margin: 40px auto 72px; }
  .cab__head h1 { font-size: 1.5rem; }
}

/* ---------- invoice (always light, print-friendly) ---------- */
.invoice-page { background: #fff; color: #111; }
.invoice { max-width: 860px; margin: 24px auto; padding: 40px; background: #fff; color: #111; font-size: 14px;
  font-family: Arial, "Helvetica Neue", sans-serif; }
.invoice h1 { font-size: 22px; margin-bottom: 4px; letter-spacing: 0; }
.invoice table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice th, .invoice td { border: 1px solid #999; padding: 8px 10px; text-align: left; vertical-align: top; }
.invoice .r { text-align: right; }
.invoice .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.invoice .parties h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #555; }
.invoice .purpose { padding: 12px 14px; border: 2px dashed #555; border-radius: 8px; margin: 18px 0; }
.invoice .sign { display: flex; justify-content: space-between; margin-top: 48px; }
.invoice .toolbar-print { display: flex; gap: 10px; margin-bottom: 24px; }
.invoice .warn { background: #fff8eb; border: 1px solid #f5b83d; padding: 10px 12px; border-radius: 8px; }
@media (max-width: 640px) {
  .invoice { padding: 20px 16px; margin: 0; }
  .invoice .parties { grid-template-columns: 1fr; }
  .invoice table { display: block; overflow-x: auto; }
}
@media print {
  .invoice .toolbar-print, .invoice .warn { display: none; }
  .invoice { margin: 0; padding: 0; max-width: none; }
  .invoice table { display: table; }
  @page { margin: 16mm; }
}

/* ---------- staff panel (/staff/): the same look, denser for daily work ---------- */
.chart__bar--2 { background: #93b4f5; }
.staff .cab { grid-template-columns: 208px minmax(0, 1fr); gap: 28px; padding: 24px 0 72px; }
.staff .wrap.cab { max-width: 1320px; }
.staff .side { top: 76px; }
.staff .side a { padding: 7px 10px; font-size: .9rem; }
.staff .side form .btn { width: 100%; }
.staff .cab__head { margin-bottom: 16px; }
.staff .cab__head h1 { font-size: 1.5rem; }
.staff h2 { font-size: 1.15rem !important; letter-spacing: -.01em; }
.staff .stats { gap: 12px; margin-bottom: 16px; }
.staff .stat { padding: 14px 16px; box-shadow: none; }
.staff .stat b { font-size: 1.35rem; }
.staff .table-wrap { box-shadow: none; border-radius: var(--radius-sm); }
.staff .table { font-size: .875rem; }
.staff .table th, .staff .table td { padding: 8px 12px; }
.staff .table th { font-size: .72rem; }
.staff .table .small { font-size: .8rem; }
.staff .toolbar { gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.staff .toolbar input, .staff .toolbar select { min-height: 36px; padding: 6px 10px; font-size: .875rem; background: var(--surface); }
.staff .inline-form { gap: 6px; }
.staff .inline-form input, .staff .inline-form select { min-height: 34px; padding: 5px 10px; font-size: .85rem; }
.staff .inline-form label { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.staff .btn--sm { padding: 6px 12px; min-height: 34px; font-size: .85rem; }
.staff .form.card { padding: 20px; gap: 14px; box-shadow: none; }
.staff .card { box-shadow: none; }
.staff .badge { padding: 1px 8px; font-size: .72rem; }
.staff .pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.staff .messages { margin-top: 16px; }
@media (max-width: 1000px) {
  .staff .cab { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 12px; }
  .staff .side form { display: none; }
}
@media (max-width: 640px) {
  .staff .table th, .staff .table td { padding: 7px 8px; }
  .staff .toolbar > *, .staff .toolbar input[type=search] { min-width: 0 !important; flex: 1 1 140px; }
  .staff .inline-form input:not([type=checkbox]):not([type=hidden]) { flex: 1 1 110px; width: auto !important; }
  .staff .stat b { font-size: 1.15rem; }
}
