/* ApexProfile — «Бюро опыта».
   Paper, manila folders, rubber stamps. Tokens follow the redesign canvas
   (light + dark), fonts are self-hosted because CSP allows only font-src 'self'. */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/frontend/fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/frontend/fonts/golos-text-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/frontend/fonts/playfair-display-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/frontend/fonts/playfair-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600 800;
  font-display: swap;
  src: url("/frontend/fonts/playfair-display-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600 800;
  font-display: swap;
  src: url("/frontend/fonts/playfair-display-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --paper: #fffaf0;
  --paper-2: #ebe7d9;
  --text: #232b21;
  --heading: #192f25;
  --body: #55584c;
  --muted: #66675a;
  --line: #cbc2ae;
  --soft: #e4dac6;
  --rule: #8b8e79;
  --manila: #e3c08a;
  --tab: #d6ae70;
  --tab-text: #3b2a14;
  --tab-2: #e2ebdb;
  --tab-3: #f2ded0;
  --red: #a04331;
  --red-stamp: rgba(160, 67, 49, 0.82);
  --on-red: #fffaf0;
  --ink: #233f33;
  --ink-stamp: rgba(35, 63, 51, 0.85);
  --amber: #8a5a14;
  --amber-stamp: rgba(150, 100, 30, 0.85);
  --amber-soft: #f4e6c6;
  --sticky: #f3dd8a;
  --sticky-text: #232b21;
  --inv: #233f33;
  --on-inv: #fffaf0;
  --inv-muted: #c9d3c4;
  --btn-hover: #192f25;
  --clip: #9a4937;
  --hard: #192f25;
  --green-soft: #e2ebdb;
  --rust-soft: #f2ded0;
  --stage: #e8bf85;
  --stage-glow: #f8db9f;
  --stage-dot: rgba(140, 91, 55, 0.17);
  --stage-line: #b78550;
  --orbit: rgba(145, 99, 65, 0.42);
  --folder: #465d43;
  --folder-line: #253b2d;
  --underlay: #ead7a9;
  --under-line: #b89a70;
  --sheet: #fffae9;
  --sheet-line: #c0ad87;
  --code-bg: #1b231e;
  --code-text: #efe8d8;
  --shadow-color: rgba(57, 45, 26, 0.2);
  --shadow: 0 10px 24px var(--shadow-color);
  --font-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --radius: 4px;
  --page-max: 1240px;
  --page-gutter: 32px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131915;
  --paper: #1c241f;
  --paper-2: #171e1a;
  --text: #efe8d8;
  --heading: #f4eddd;
  --body: #c9c3b2;
  --muted: #a39d8c;
  --line: #3a4239;
  --soft: #2c342e;
  --rule: #6f7a6c;
  --manila: #6b5233;
  --tab: #7a5e3a;
  --tab-text: #f6e6c6;
  --tab-2: #25382d;
  --tab-3: #3d2822;
  --red: #e08a73;
  --red-stamp: rgba(224, 138, 115, 0.88);
  --on-red: #131915;
  --ink: #9fcfb2;
  --ink-stamp: rgba(159, 207, 178, 0.88);
  --amber: #e2b465;
  --amber-stamp: rgba(226, 180, 101, 0.88);
  --amber-soft: #3a3020;
  --sticky: #d9c46a;
  --sticky-text: #1b1b1b;
  --inv: #2c4a3c;
  --on-inv: #efe8d8;
  --inv-muted: #b9c7bb;
  --btn-hover: #3a5e4c;
  --clip: #c06a55;
  --hard: #000000;
  --green-soft: #25382d;
  --rust-soft: #3d2822;
  --stage: #5a4128;
  --stage-glow: #7a5a36;
  --stage-dot: rgba(255, 220, 170, 0.08);
  --stage-line: #7a5a36;
  --orbit: rgba(255, 220, 170, 0.16);
  --folder: #34483a;
  --folder-line: #1e2c23;
  --underlay: #8c7a55;
  --under-line: #6e5e40;
  --sheet: #f6eedb;
  --sheet-line: #b9a47c;
  --code-bg: #0e1310;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

/* ── Base ────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

h1,
h2,
h3,
h4,
h5,
p,
figure,
dl,
dd {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

::selection {
  background: var(--sticky);
  color: var(--sticky-text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── Motion ──────────────────────────────────────────────────────────────── */

@keyframes apStamp {
  0% { opacity: 0; transform: scale(2.4) rotate(var(--r, -4deg)); filter: blur(1.5px); }
  55% { opacity: 1; transform: scale(0.9) rotate(var(--r, -4deg)); filter: none; }
  75% { transform: scale(1.05) rotate(var(--r, -4deg)); }
  100% { opacity: 1; transform: scale(1) rotate(var(--r, -4deg)); }
}
@keyframes apInk {
  0% { opacity: 0; transform: scale(0.6); }
  8% { opacity: 0.35; }
  100% { opacity: 0; transform: scale(1.8); }
}
@keyframes apRow {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes apPop {
  0% { opacity: 0; transform: scale(0.3); }
  70% { transform: scale(1.25); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes apFolder {
  from { opacity: 0; transform: translateY(40px) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}
@keyframes apSticky {
  0% { opacity: 0; transform: translateY(-60px) rotate(-16deg); }
  70% { opacity: 1; transform: translateY(4px) rotate(-3deg); }
  100% { opacity: 1; transform: rotate(-4deg); }
}
@keyframes apArrive {
  from { opacity: 0.2; translate: var(--ex, 0) var(--ey, 26px); }
  to { opacity: 1; translate: 0 0; }
}
@keyframes apFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes apBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes apBar {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}
@keyframes apSwing {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}
@keyframes apSwingHard {
  0% { transform: rotate(0deg); }
  12% { transform: rotate(calc(var(--amp, 1) * 16deg)); }
  30% { transform: rotate(calc(var(--amp, 1) * -12deg)); }
  48% { transform: rotate(calc(var(--amp, 1) * 8deg)); }
  64% { transform: rotate(calc(var(--amp, 1) * -5deg)); }
  80% { transform: rotate(calc(var(--amp, 1) * 3deg)); }
  100% { transform: rotate(-2.5deg); }
}

.ap-blink {
  animation: apBlink 1s step-end infinite;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 56px var(--page-gutter) 96px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.page-head-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}

.split-main {
  flex: 999 1 600px;
  min-width: 0;
}

.split-aside {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Header and footer ───────────────────────────────────────────────────── */

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 20px max(var(--page-gutter), calc((100% - var(--page-max)) / 2 + var(--page-gutter)));
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--red);
  color: var(--on-red);
}

.brand strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 28px;
  font-size: 14.5px;
  font-weight: 520;
}

.topnav a {
  padding: 11px 0;
  color: var(--body);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  transition: color 0.16s, text-decoration-color 0.16s;
}

.topnav a:hover {
  color: var(--heading);
  opacity: 1;
}

.topnav a[aria-current="page"] {
  color: var(--heading);
  font-weight: 650;
  text-decoration-color: var(--ink);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 13px;
  color: var(--body);
}

.user-chip-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: var(--font-serif);
  font-weight: 700;
}

.user-chip[aria-current="page"] {
  color: var(--heading);
  font-weight: 650;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 26px max(var(--page-gutter), calc((100% - var(--page-max)) / 2 + var(--page-gutter)));
  border-top: 1px solid var(--rule);
  color: var(--body);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* ── Buttons and links ───────────────────────────────────────────────────── */

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 17px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s, border-color 0.16s, color 0.16s, opacity 0.16s;
}

.primary-button {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  background: var(--inv);
  color: var(--on-inv);
  font-size: 15px;
}

.primary-button:hover {
  background: var(--btn-hover);
  opacity: 1;
}

.primary-button.compact {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover,
.ghost-button:hover {
  border-color: var(--ink);
  opacity: 1;
}

.ghost-button.danger {
  color: var(--red);
}

.ghost-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.icon-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 620;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 5px;
}

.text-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* ── Type ────────────────────────────────────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
}

.kicker {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.kicker-lg {
  font-size: 13px;
}

.display-1 {
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.display-2 {
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.serif-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.form-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lead {
  color: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

/* ── Paper, notes, stamps ────────────────────────────────────────────────── */

.paper {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.outline-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--rule);
}

.sticky-note {
  padding: 18px 20px;
  background: var(--sticky);
  color: var(--sticky-text);
  box-shadow: 0 10px 20px var(--shadow-color);
  font-size: 13px;
  line-height: 1.6;
  transform: rotate(-1.5deg);
}

.sticky-note.tilt-right {
  transform: rotate(1.5deg);
}

.sticky-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.sticky-note p + p {
  margin-top: 8px;
}

.paperclip {
  display: block;
  flex: none;
  color: var(--clip);
}

.stamp {
  --r: -3deg;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 4px 14px;
  border: 3px solid currentColor;
  color: var(--ink-stamp);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(var(--r));
}

.stamp.is-animated {
  animation: apStamp 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) var(--sd, 0s) both;
}

.stamp--ok { color: var(--ink-stamp); }
.stamp--part { --r: 2deg; color: var(--amber-stamp); }
.stamp--no { --r: -2deg; color: var(--red-stamp); }

.stamp--sm {
  min-height: 30px;
  padding: 0 10px;
  border-width: 2px;
  font-size: 13px;
}

.stamp--solid.stamp--ok { color: var(--ink); }
.stamp--solid.stamp--part { color: var(--amber); }
.stamp--solid.stamp--no { color: var(--red); }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span:first-child,
.field-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-input {
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
  text-transform: none;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.text-input:focus {
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink);
}

.text-input::placeholder,
.lined-input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

select.text-input {
  cursor: pointer;
}

select.text-input option {
  background: var(--paper);
  color: var(--text);
}

textarea.text-input,
.lined-input {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image: repeating-linear-gradient(transparent, transparent 31px, var(--line) 31px, var(--line) 32px);
  background-attachment: local;
  color: var(--text);
  font-size: 15px;
  line-height: 32px;
  resize: vertical;
  outline: none;
}

textarea.text-input:focus,
.lined-input:focus {
  box-shadow: none;
  background-image: repeating-linear-gradient(transparent, transparent 31px, var(--rule) 31px, var(--rule) 32px);
  outline: 1px dashed var(--rule);
  outline-offset: 6px;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--ink);
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field-hint code,
.code-chip {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
}

.form-message {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

.form-message:empty {
  display: none;
}

.form-message.error {
  color: var(--red);
}

.form-message.success {
  color: var(--ink);
}

/* Honeypot for bots: off-screen, not focusable, ignored by screen readers */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-slot {
  min-height: 65px;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */

.chip-row,
.selected-files,
.skills-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.skill-chip,
.mini-chip,
.selected-file-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.mini-chip.missing,
.missing-list .mini-chip {
  border-color: transparent;
  background: var(--rust-soft);
  color: var(--red);
}

a.mini-chip {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

.chip-label {
  color: var(--muted);
  font-size: 13px;
}

.chip-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.chip-button:hover {
  border-color: var(--ink);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 2px 10px;
  border: 2px solid currentColor;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.status-badge[data-status="active"] {
  color: var(--ink-stamp);
}

.status-badge[data-status="expired"],
.status-badge[data-status="cancelled"] {
  color: var(--red-stamp);
}

/* ── Landing ─────────────────────────────────────────────────────────────── */

/* clip, not hidden: hidden on <body> would also stop the page from scrolling */
.landing main {
  overflow-x: clip;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(470px, 100%), 1fr));
  gap: 56px;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 80px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-copy > * {
  --ey: 9px;
  animation: apArrive 0.44s ease-out var(--d, 0s) both;
}

.hero-title {
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: clamp(46px, 5.4vw, 80px);
  font-weight: 720;
  line-height: 1.035;
  letter-spacing: -0.068em;
}

.hero-title em {
  display: block;
  color: var(--red);
  font-style: italic;
  font-weight: 650;
}

.hero-lead {
  max-width: 470px;
  color: var(--body);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 22px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.hero-stage {
  position: relative;
  isolation: isolate;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: 5px;
  background-color: var(--stage);
  background-image:
    radial-gradient(circle at 66% 19%, var(--stage-glow) 0%, transparent 55%),
    radial-gradient(var(--stage-dot) 0.65px, transparent 1px);
  background-size: auto, 4px 4px;
}

.stage-frame {
  position: absolute;
  z-index: -1;
  inset: 13px;
  border: 1px solid var(--orbit);
  border-radius: 2px;
}

.stage-orbit {
  position: absolute;
  z-index: -1;
  top: -245px;
  right: -240px;
  width: 625px;
  height: 630px;
  border: 1px solid var(--orbit);
  border-radius: 50%;
  box-shadow:
    0 0 0 14px var(--stage), 0 0 0 15px var(--orbit),
    0 0 0 29px var(--stage), 0 0 0 30px var(--orbit),
    0 0 0 45px var(--stage), 0 0 0 46px var(--orbit),
    0 0 0 63px var(--stage), 0 0 0 64px var(--orbit);
}

.stage-folder {
  --ex: -13px;
  --ey: 18px;
  position: absolute;
  inset: 74px 11% 48px 11%;
  border: 1px solid var(--folder-line);
  border-radius: 6px;
  background-color: var(--folder);
  background-image: repeating-linear-gradient(109deg, transparent 0 2px, rgba(24, 45, 36, 0.14) 2px 3px);
  box-shadow: 7px 17px 26px rgba(94, 59, 36, 0.35);
  transform: rotate(-10deg);
  animation: apArrive 0.54s cubic-bezier(0.19, 0.72, 0.29, 1) both;
}

.stage-folder::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: -1px;
  width: 39%;
  height: 27px;
  border: 1px solid var(--folder-line);
  border-bottom: 0;
  border-radius: 6px 11px 0 0;
  background-color: var(--folder);
}

.stage-folder::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  height: 23%;
  border: 1px solid rgba(197, 186, 131, 0.32);
  border-radius: 2px;
}

.stage-underlay {
  --ex: 7px;
  --ey: 25px;
  position: absolute;
  inset: 70px 11% 52px 20%;
  border: 1px solid var(--under-line);
  border-radius: 3px;
  background: var(--underlay);
  box-shadow: 4px 7px 14px rgba(75, 55, 37, 0.24);
  transform: rotate(9deg);
  animation: apArrive 0.54s cubic-bezier(0.19, 0.72, 0.29, 1) 0.09s both;
}

.case-sheet {
  --ex: 11px;
  --ey: 34px;
  position: relative;
  width: min(80%, 420px);
  margin: 44px auto 0;
  padding: 24px 28px 22px;
  border: 1px solid var(--sheet-line);
  border-radius: 2px;
  background: var(--sheet);
  color: #232b21;
  box-shadow: 0 9px 18px rgba(57, 45, 26, 0.22);
  transform: rotate(-3.5deg) translateX(5%);
  animation: apArrive 0.54s cubic-bezier(0.19, 0.72, 0.29, 1) 0.16s both;
}

.case-sheet-clip {
  position: absolute;
  top: -15px;
  right: 8px;
  width: 15px;
  height: 37px;
  border: 2px solid #9a4937;
  border-bottom-color: transparent;
  border-radius: 8px;
  transform: rotate(11deg);
}

.case-sheet-clip::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 2px;
  bottom: -3px;
  width: 6px;
  border: 1px solid #9a4937;
  border-top-color: transparent;
  border-radius: 5px;
}

.case-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 10px 0;
  border-bottom: 1px solid #d8c9a9;
  color: #55584c;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-sheet-head span:last-child {
  color: #a04331;
}

.case-sheet-name {
  margin-top: 12px;
  color: #192f25;
  font-family: var(--font-serif);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.07em;
}

.case-sheet-role {
  margin: 3px 0 12px;
  color: #55584c;
  font-size: 14px;
}

.case-sheet ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-claim {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #e4d8bd;
  line-height: 1.35;
  animation: apRow 0.4s ease-out var(--d, 0s) both;
}

.case-claim-mark {
  display: grid;
  flex: 0 0 23px;
  place-items: center;
  height: 23px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  animation: apPop 0.35s ease-out var(--sd, 0s) both;
}

.case-claim.is-ok .case-claim-mark { background: #e2ebdb; color: #233f33; }
.case-claim.is-part .case-claim-mark { background: #f4e6c6; color: #8a5a14; }
.case-claim.is-no .case-claim-mark { background: #f2ded0; color: #a04331; }

.case-claim-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.case-claim-text strong {
  font-size: 13.5px;
  font-weight: 650;
}

.case-claim.is-no strong {
  text-decoration: line-through;
}

.case-claim-text span {
  color: #55584c;
  font-size: 12.5px;
}

.case-sheet-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #e4d8bd;
  animation: apFade 0.5s ease-out 2.2s both;
}

.case-sheet-score {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.case-sheet-score > span {
  color: #55584c;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-sheet-score strong {
  color: #192f25;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.05em;
}

.case-sheet-score small {
  color: #55584c;
  font-size: 16px;
}

.case-sheet-tags {
  display: flex;
  gap: 6px;
  color: #55584c;
  font-size: 11.5px;
}

.case-sheet-tags span {
  padding: 2px 7px;
  border: 1px solid #d8c9a9;
  border-radius: 2px;
}

.seal {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 64px;
  width: 132px;
  height: 132px;
}

.seal-ink {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink-stamp) 0%, transparent 65%);
  animation: apInk 0.8s ease-out 2.72s both;
}

.seal-ring {
  --r: -14deg;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 4px solid var(--ink-stamp);
  border-radius: 50%;
  color: var(--ink-stamp);
  font-family: var(--font-serif);
  text-align: center;
  transform: rotate(var(--r));
  animation: apStamp 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) 2.6s both;
}

.seal-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px solid var(--ink-stamp);
  border-radius: 50%;
}

.seal-ring span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.seal-ring strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
}

.seal-ring small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.stage-note {
  position: absolute;
  z-index: 4;
  bottom: 22px;
  left: 22px;
  width: 196px;
  padding: 14px 16px;
  background: var(--sticky);
  color: var(--sticky-text);
  box-shadow: 0 10px 20px rgba(57, 45, 26, 0.25);
  font-size: 13px;
  line-height: 1.45;
  transform: rotate(-4deg);
  animation: apSticky 0.6s ease-out 3.3s both;
}

.replay-button {
  position: absolute;
  right: 4px;
  bottom: -36px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.band-inner {
  padding-top: 48px;
  padding-bottom: 64px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sample-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
}

.sample-profile {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.sample-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sample-avatar {
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--green-soft);
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 720;
}

.sample-person > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sample-person strong {
  font-size: 17px;
  font-weight: 650;
}

.sample-person small {
  color: var(--muted);
  font-size: 14px;
}

.sample-sources {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
  color: var(--body);
  font-size: 14px;
}

.sample-sources strong {
  color: var(--text);
}

.sample-sources span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sample-sources svg {
  flex: none;
  color: var(--ink);
}

.sample-fit {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
}

.sample-fit span {
  color: var(--muted);
  font-size: 13px;
}

.sample-fit strong {
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 720;
  letter-spacing: -0.05em;
}

.sample-tabs {
  flex: 3 1 520px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}

.tab-list {
  display: flex;
  gap: 18px;
  min-height: 50px;
  padding: 0 20px;
  border-bottom: 1px solid var(--soft);
}

.tab-list [role="tab"] {
  margin-bottom: -1px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 540;
  transition: color 0.16s;
}

.tab-list [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--ink);
  color: var(--heading);
  font-weight: 650;
}

.tab-panel {
  --ey: 4px;
  min-height: 230px;
  padding: 18px 22px 20px;
  animation: apArrive 0.25s ease-out both;
}

.tab-panel h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 650;
}

.sample-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 4px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--soft);
  line-height: 1.4;
}

.sample-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 630;
  white-space: nowrap;
}

.sample-chip.is-ok { background: var(--green-soft); color: var(--ink); }
.sample-chip.is-part { background: var(--amber-soft); color: var(--amber); }
.sample-chip.is-no { background: var(--rust-soft); color: var(--red); }

.sample-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sample-text strong {
  font-size: 15px;
  font-weight: 640;
}

.sample-text span {
  color: var(--body);
  font-size: 14px;
}

.sample-questions {
  margin: 0;
  padding-left: 22px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.45;
}

.sample-questions li {
  padding: 9px 0 9px 3px;
  border-top: 1px solid var(--soft);
}

.inv-section {
  background: var(--inv);
  color: var(--on-inv);
}

.inv-inner {
  padding-top: 104px;
  padding-bottom: 104px;
}

.inv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.inv-head h2 {
  color: var(--on-inv);
  font-size: clamp(36px, 4vw, 58px);
}

.inv-head p {
  max-width: 380px;
  color: var(--inv-muted);
  font-size: 16px;
  line-height: 1.6;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 46px 18px;
  padding-top: 28px;
}

.folder-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 230px;
  padding: 30px 26px 34px;
  background: var(--paper);
  color: var(--text);
}

.folder-card-tab {
  position: absolute;
  top: -28px;
  left: 0;
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 16px;
  background: var(--manila);
  color: var(--tab-text);
  font-size: 12px;
  font-weight: 600;
}

.folder-card:nth-child(2) .folder-card-tab { background: var(--tab-2); color: var(--text); }
.folder-card:nth-child(3) .folder-card-tab { background: var(--tab-3); color: var(--text); }
.folder-card:nth-child(4) .folder-card-tab { background: var(--red); color: var(--on-red); }

.folder-card h3 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
}

.folder-card p {
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 56px;
  align-items: start;
  padding-top: 104px;
  padding-bottom: 104px;
}

.two-col-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.marks-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.mark-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.55;
}

.mark-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mark-row .stamp {
  width: 214px;
  font-size: 18px;
  white-space: nowrap;
}

.steps-band {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.steps-band .two-col {
  padding-top: 96px;
  padding-bottom: 96px;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.steps-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.steps-list li > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.steps-list li b:last-child,
.steps-list strong {
  font-size: 18px;
}

.steps-list small {
  color: var(--muted);
  font-size: 15px;
}

.closing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 32px;
  align-items: stretch;
  padding-top: 104px;
  padding-bottom: 104px;
}

.confidential {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 40px;
  border: 1px solid var(--rule);
}

.confidential .stamp {
  position: absolute;
  top: 26px;
  right: -10px;
  --r: 12deg;
  padding: 6px 18px;
  color: var(--red-stamp);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.confidential h3 {
  max-width: 380px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
}

.confidential p {
  color: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

.cta-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 40px;
  background: var(--red);
  color: var(--on-red);
}

.cta-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1;
}

.cta-card a {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  height: 56px;
  padding: 0 26px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 4px 4px 0 var(--hard);
  font-size: 16px;
  font-weight: 600;
}

/* ── Claim form: «Завести дело» ──────────────────────────────────────────── */

.claim-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 44px 44px;
}

.claim-form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.form-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.step-num {
  font-weight: 700;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
}

.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 2px dashed var(--line);
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--clip);
  background: color-mix(in srgb, var(--sticky) 14%, transparent);
}

.upload-dropzone > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upload-dropzone strong {
  font-size: 16px;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px dotted var(--line);
}

.inventory {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inventory li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px dotted var(--line);
}

.inventory li:first-child {
  padding-top: 0;
}

.inventory li > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inventory strong {
  font-size: 15px;
}

.inventory small {
  color: var(--body);
  font-size: 13px;
  line-height: 1.55;
}

.progress-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 56px;
  padding: 40px 44px;
  animation: apFolder 0.5s ease-out both;
}

.progress-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.progress-head strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.progress-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.progress-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  animation: apRow 0.35s ease-out var(--d, 0s) both;
}

.progress-steps b {
  color: var(--red);
}

.progress-bar {
  height: 14px;
  padding: 2px;
  border: 1px solid var(--rule);
}

.progress-bar span {
  display: block;
  height: 100%;
  background-color: var(--red);
  background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgba(255, 255, 255, 0.25) 8px 16px);
  background-size: 40px 100%;
  animation: apBar 0.6s linear infinite;
}

/* ── Registry of cases (results) ─────────────────────────────────────────── */

.registry {
  margin-top: 96px;
  scroll-margin-top: 24px;
}

.registry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.registry-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skills-list {
  justify-content: flex-end;
  max-width: 520px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 46px;
  padding-top: 24px;
}

.empty-state {
  padding-top: 0;
}

.empty-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px 24px;
  border: 2px dashed var(--line);
  text-align: center;
}

.empty-state-inner h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
}

.empty-state-inner p {
  max-width: 520px;
  color: var(--body);
}

.empty-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid var(--red-stamp);
  border-radius: 50%;
  color: var(--red-stamp);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  transform: rotate(-8deg);
}

.results-errors {
  padding: 16px 20px;
  border: 1px solid var(--red-stamp);
  background: var(--rust-soft);
  color: var(--text);
  text-align: left;
}

.results-errors strong {
  color: var(--red);
}

.results-errors .report-list {
  margin-top: 8px;
}

.candidate-card {
  --folder-color: var(--manila);
  --folder-text: var(--tab-text);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  width: 100%;
  padding: 22px 26px;
  border: 0;
  background: var(--folder-color);
  color: var(--text);
  box-shadow: var(--shadow);
  text-align: left;
  animation: apFolder 0.5s ease-out var(--d, 0s) both;
  transition: transform 0.16s;
}

.candidate-card:hover {
  transform: translateY(-2px);
}

.candidate-card.good {
  --folder-color: var(--tab-2);
  --folder-text: var(--text);
}

.candidate-card.weak {
  --folder-color: var(--tab-3);
  --folder-text: var(--text);
}

.case-tab {
  position: absolute;
  top: -24px;
  left: 0;
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 14px;
  background: var(--folder-color);
  color: var(--folder-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.case-rank {
  width: 40px;
  color: var(--folder-text);
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}

.case-paper {
  display: flex;
  flex: 1 1 360px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.case-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.case-name {
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.case-meta {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.case-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  color: var(--body);
  font-size: 13px;
}

.case-metrics b {
  color: var(--text);
  font-weight: 650;
}

.case-score {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
}

.case-score strong {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.candidate-card .stamp {
  min-width: 196px;
}

.case-open {
  display: inline-flex;
  align-items: center;
  height: 48px;
  margin-left: auto;
  padding: 0 20px;
  background: var(--inv);
  color: var(--on-inv);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.candidate-card:hover .case-open {
  background: var(--btn-hover);
}

/* ── Report drawer: «Личное дело» ────────────────────────────────────────── */

.report-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.report-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 25, 21, 0.55);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(940px, 100%);
  height: 100%;
  background: var(--manila);
  box-shadow: 0 30px 60px var(--shadow-color);
  transform: translateX(24px);
  transition: transform 0.2s ease;
}

.report-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 20px;
  color: var(--tab-text);
}

.drawer-header > div:first-child {
  min-width: 0;
}

.drawer-kicker {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.drawer-header a {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.drawer-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.drawer-actions .ghost-button,
.drawer-actions .icon-button {
  border-color: color-mix(in srgb, var(--tab-text) 45%, transparent);
  background: color-mix(in srgb, var(--paper) 35%, transparent);
  color: var(--tab-text);
}

.drawer-content {
  overflow: auto;
  margin: 0 24px 24px;
  padding: 36px 40px 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.rp-small-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
}

.tone-strong { --tone: var(--ink); --tone-soft: var(--green-soft); --tone-stamp: var(--ink-stamp); }
.tone-good { --tone: var(--amber); --tone-soft: var(--amber-soft); --tone-stamp: var(--amber-stamp); }
.tone-weak { --tone: var(--red); --tone-soft: var(--rust-soft); --tone-stamp: var(--red-stamp); }

.report-block {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}

.report-block h3,
.rp-section-head h3 {
  margin-bottom: 14px;
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.rp-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
}

.rp-section-head h3 {
  margin: 0;
}

.rp-count,
.rp-meta,
.rp-muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rp-muted + .rp-muted,
.chip-row + .rp-muted {
  margin-top: 10px;
}

.rp-hero {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.rp-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.rp-score-value {
  color: var(--tone);
  font-family: var(--font-serif);
  font-size: 64px;
  font-weight: 700;
  line-height: 0.9;
  font-variant-numeric: lining-nums tabular-nums;
}

.rp-score-max,
.rp-score-label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rp-score-label {
  margin-top: 8px;
  line-height: 1.4;
}

.rp-hero-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.rp-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.rp-badge {
  --r: -2deg;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 3px 12px;
  border: 3px solid currentColor;
  color: var(--tone-stamp);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(var(--r));
  animation: apStamp 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) 0.2s both;
}

.rp-place {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.rp-verdict {
  font-size: 19px;
  line-height: 1.6;
}

.rp-formula {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-formula-bar {
  display: flex;
  height: 14px;
  padding: 2px;
  border: 1px solid var(--rule);
}

.rp-formula-bar span {
  height: 100%;
}

.part-skills,
.dot-skills {
  background: var(--ink);
}

.part-github,
.dot-github {
  background: var(--tab);
}

.rp-formula-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--body);
  font-size: 13px;
}

.rp-formula-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rp-formula-legend i {
  width: 10px;
  height: 10px;
}

.rp-formula-text {
  color: var(--muted);
  font-size: 13px;
}

.rp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rp-facts span {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--body);
  font-size: 12.5px;
}

.rp-summary {
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.65;
}

.rp-reqs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rp-req {
  --tone: var(--muted);
  --tone-soft: var(--soft);
  --tone-stamp: var(--muted);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 90px;
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft);
  animation: apRow 0.4s ease-out both;
}

.rp-req.is-code { --tone: var(--ink); --tone-soft: var(--green-soft); --tone-stamp: var(--ink-stamp); }
.rp-req.is-resume { --tone: var(--amber); --tone-soft: var(--amber-soft); --tone-stamp: var(--amber-stamp); }
.rp-req.is-missing { --tone: var(--red); --tone-soft: var(--rust-soft); --tone-stamp: var(--red-stamp); }

.rp-req-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--tone-soft);
  color: var(--tone);
  font-size: 13px;
  font-weight: 700;
}

.rp-req-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rp-req-main strong {
  font-size: 15px;
  font-weight: 640;
}

.rp-req.is-missing .rp-req-main strong {
  color: var(--muted);
  text-decoration: line-through;
}

.rp-req-main span {
  overflow: hidden;
  color: var(--body);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-req-status {
  --r: -2deg;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: 30px;
  padding: 0 10px;
  border: 2px solid currentColor;
  color: var(--tone-stamp);
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(var(--r));
}

.rp-req:nth-child(even) .rp-req-status {
  --r: 2deg;
}

.rp-meter {
  height: 6px;
  overflow: hidden;
  background: var(--soft);
}

.rp-meter span {
  display: block;
  height: 100%;
  background: var(--tone, var(--ink));
}

.rp-meter.empty {
  background: transparent;
}

.rp-mini-scores {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  margin-bottom: 18px;
}

.rp-mini-score {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
}

.rp-mini-score span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rp-mini-score strong {
  color: var(--tone);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.rp-list-box h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rp-list-box h4::before {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  letter-spacing: 0;
}

.rp-list-box.is-plus h4::before {
  content: "+";
  background: var(--green-soft);
  color: var(--ink);
}

.rp-list-box.is-risk h4::before {
  content: "!";
  background: var(--rust-soft);
  color: var(--red);
}

.report-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-list li {
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 14.5px;
  line-height: 1.5;
}

.report-list li::before {
  content: "— ";
  color: var(--muted);
}

.rp-inline-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.rp-inline-list > span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.rp-questions-block {
  padding: 22px 26px;
  border-top: 0;
  background: var(--sticky);
  color: var(--sticky-text);
  box-shadow: 0 10px 20px var(--shadow-color);
  transform: rotate(0.6deg);
}

.rp-questions-block .rp-section-head h3 {
  color: var(--sticky-text);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rp-questions-block .ghost-button {
  border-color: rgba(27, 27, 27, 0.35);
  color: var(--sticky-text);
}

.rp-questions {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: question;
}

.rp-questions li {
  position: relative;
  padding: 7px 0 7px 28px;
  font-size: 15px;
  line-height: 1.55;
  counter-increment: question;
}

.rp-questions li::before {
  content: counter(question) ".";
  position: absolute;
  top: 7px;
  left: 0;
  font-weight: 700;
}

.rp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
}

.github-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--line);
}

.github-stat span {
  color: var(--body);
  font-size: 13px;
}

.github-stat strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.rp-alert {
  margin: 8px 0;
  padding: 10px 14px;
  border: 1px solid var(--red-stamp);
  background: var(--rust-soft);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
}

.rp-verdict-small {
  margin-bottom: 6px;
  font-weight: 700;
}

.rp-details {
  margin-top: 30px;
  border-top: 1px solid var(--rule);
}

.rp-details > summary,
.rp-subdetails > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  cursor: pointer;
  list-style: none;
}

.rp-details > summary::-webkit-details-marker,
.rp-subdetails > summary::-webkit-details-marker {
  display: none;
}

.rp-details > summary {
  padding: 20px 0;
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.rp-details > summary .rp-count {
  font-family: var(--font-sans);
}

.rp-details > summary::before,
.rp-subdetails > summary::before {
  content: "▸";
  color: var(--muted);
  transition: transform 0.15s ease;
}

.rp-details[open] > summary::before,
.rp-subdetails[open] > summary::before {
  transform: rotate(90deg);
}

.rp-details-body {
  display: grid;
  /* minmax(0, 1fr): long code lines scroll inside <pre> instead of widening the drawer */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 8px;
}

.rp-subdetails {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--paper-2) 55%, var(--paper));
}

.rp-subdetails > summary {
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
}

.rp-subdetails > .rp-snippet {
  margin: 0 14px 14px;
}

.rp-snippet + .rp-snippet {
  margin-top: 14px;
}

.rp-snippet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 12.5px;
}

.rp-snippet-head a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  overflow-wrap: anywhere;
}

.rp-snippet-file {
  color: var(--muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.rp-signature {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-code,
.rp-code {
  margin: 8px 0 0;
  overflow: auto;
  border-radius: 3px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
}

.evidence-code {
  max-height: 360px;
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rp-code {
  max-height: 480px;
  padding: 10px 0;
}

.rp-code code {
  display: block;
  min-width: max-content;
}

.rp-code-line {
  display: block;
  padding: 0 14px 0 0;
  white-space: pre;
}

.rp-code-line.is-hit {
  background: rgba(227, 192, 138, 0.16);
  box-shadow: inset 3px 0 0 #e3c08a;
}

.rp-ln {
  display: inline-block;
  width: 3.6em;
  margin-right: 14px;
  padding-right: 10px;
  border-right: 1px solid rgba(203, 194, 174, 0.2);
  color: #8b8e79;
  text-align: right;
  user-select: none;
}

.rp-code-line.is-hit .rp-ln {
  color: #e3c08a;
  font-weight: 700;
}

.rp-code-gap {
  display: block;
  padding: 2px 0 2px calc(3.6em + 24px);
  color: #8b8e79;
  font-style: italic;
}

.rp-repo-list {
  gap: 0;
}

.rp-repo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px dotted var(--line);
}

.rp-repo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.rp-repo-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.rp-footnote {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px dotted var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ── Auth: «Пропуск» ─────────────────────────────────────────────────────── */

.auth-page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 88px;
}

.pass-stage {
  display: flex;
  flex: 1 1 440px;
  justify-content: center;
  min-width: 0;
  padding: 20px 0;
}

.pass {
  --amp: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0;
  animation: apSwing 3.6s ease-in-out infinite;
}

.pass.is-hit {
  animation: apSwingHard 2.6s cubic-bezier(0.3, 0.7, 0.4, 1) both;
}

.pass-strap {
  width: 26px;
  height: 120px;
  margin-bottom: -12px;
  background: var(--red);
}

.pass-ring {
  position: relative;
  z-index: 2;
  width: 70px;
  height: 22px;
  margin-bottom: -6px;
  border: 3px solid var(--clip);
  border-radius: 6px;
  background: var(--bg);
}

.pass-card {
  display: flex;
  flex-direction: column;
  width: 340px;
  max-width: 100%;
  transform: rotate(-3deg);
}

.pass-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--inv);
  color: var(--on-inv);
}

.pass-card-head > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pass-card-head b {
  font-family: var(--font-serif);
  font-size: 18px;
}

.pass-card-head small {
  font-size: 11px;
}

.pass-card-body {
  display: flex;
  gap: 18px;
  padding: 24px 22px 26px;
  font-size: 13px;
}

.pass-photo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 112px;
  border: 2px dashed var(--line);
}

.pass-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pass-fields span {
  color: var(--muted);
}

.pass-fields b {
  font-size: 16px;
}

.pass-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 22px;
}

.pass-barcode {
  width: 92px;
  height: 26px;
  background-image: repeating-linear-gradient(90deg, var(--text) 0 2px, transparent 2px 4px, var(--text) 4px 7px, transparent 7px 9px);
}

.pass-hit {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  cursor: grab;
}

.auth-panel {
  display: flex;
  flex: 1 1 460px;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--rule);
}

.auth-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.auth-tabs a + a {
  border-left: 1px solid var(--rule);
}

.auth-tabs a[aria-current="page"] {
  background: var(--inv);
  color: var(--on-inv);
}

.auth-tabs a[aria-current="page"]:hover {
  opacity: 1;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-card .primary-button {
  align-self: flex-start;
}

.auth-switch {
  color: var(--body);
  font-size: 14px;
}

.code-input {
  max-width: 260px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.35em;
}

.code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.auth-switch a {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Account and admin ───────────────────────────────────────────────────── */

/* Protected pages stay invisible until auth.js confirms access (no flash before the redirect) */
body[data-auth="user"]:not(.auth-ready) main,
body[data-auth="admin"]:not(.auth-ready) main {
  visibility: hidden;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 28px;
  align-items: start;
}

.account-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 34px 36px;
}

.account-card h2,
.modal-card h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.account-card .primary-button {
  align-self: flex-start;
}

.account-facts {
  display: flex;
  flex-direction: column;
}

.account-facts div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--line);
}

.account-facts dt {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-facts dd {
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-bottom: 16px;
}

.admin-toolbar .text-input {
  max-width: 380px;
}

.admin-count {
  color: var(--muted);
  font-size: 14px;
}

.admin-message {
  min-height: 21px;
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 16px 18px;
  border-bottom: 1px dotted var(--line);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions .ghost-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.table-empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}

.modal {
  width: min(480px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 30px 60px var(--shadow-color);
}

.modal::backdrop {
  background: rgba(19, 25, 21, 0.55);
}

.modal-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 32px 32px;
}

.modal-subtitle {
  margin-top: -6px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions .primary-button {
  min-height: 44px;
}

/* ── Price list (page is not linked from navigation) ─────────────────────── */

.price-list {
  padding: 32px 34px;
}

.price-list-head,
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.price-list-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 12px;
}

.price-row {
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px dotted var(--line);
}

.price-row > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-row b:first-child {
  font-size: 18px;
}

.price-row small {
  color: var(--muted);
  font-size: 13px;
}

.price-row > b {
  font-family: var(--font-serif);
  font-size: 28px;
}

.price-row.featured > b {
  color: var(--red);
}

.price-row .text-button {
  align-self: flex-start;
  color: var(--ink);
}

.price-row .plan-button.selected {
  color: var(--red);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .rp-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rp-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 16px;
  }

  .topbar {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topnav {
    order: 3;
    width: 100%;
    column-gap: 20px;
  }

  .page {
    padding-top: 36px;
    padding-bottom: 64px;
  }

  .hero {
    gap: 40px;
    padding-top: 36px;
  }

  .hero-visual,
  .hero-stage {
    min-height: 520px;
  }

  .case-sheet {
    width: 86%;
    padding: 20px 20px 18px;
  }

  .stage-note {
    width: 170px;
  }

  .inv-inner,
  .two-col,
  .closing,
  .steps-band .two-col {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .mark-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .sample-row {
    grid-template-columns: 1fr;
  }

  .confidential,
  .cta-card {
    padding: 28px 24px;
  }

  .confidential .stamp {
    position: static;
    align-self: flex-start;
  }

  .claim-form,
  .progress-panel {
    padding: 28px 20px 30px;
  }

  .candidate-card {
    padding: 18px;
  }

  .case-paper {
    flex-basis: 100%;
  }

  .case-open {
    margin-left: 0;
  }

  .drawer-header {
    flex-direction: column;
    padding: 18px 16px 16px;
  }

  .drawer-content {
    margin: 0 10px 10px;
    padding: 24px 18px 30px;
  }

  .rp-req {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .rp-req-status,
  .rp-req .rp-meter {
    grid-column: 2;
    justify-self: start;
  }

  .rp-req-main span {
    white-space: normal;
  }

  .rp-mini-scores,
  .two-column {
    grid-template-columns: 1fr;
  }

  .account-card,
  .modal-card,
  .price-list {
    padding: 24px 20px 26px;
  }

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
  }

  .data-table tr {
    padding: 14px 16px;
    border-bottom: 1px dotted var(--line);
  }

  .data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table td,
  .data-table tbody tr:last-child td {
    padding: 5px 0;
    border: 0;
  }

  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .row-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }
}

@media (max-width: 460px) {
  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .primary-button {
    flex: 1;
  }

  .hero-actions .primary-button,
  .form-footer .primary-button {
    width: 100%;
  }

  .rp-stat-grid {
    grid-template-columns: 1fr;
  }

  .pass-card-body {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ── Print: «Скачать PDF» keeps only the case file ───────────────────────── */

@media print {
  body > *:not(.report-drawer),
  .drawer-backdrop,
  .drawer-actions,
  .rp-small-button {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .report-drawer,
  .drawer-panel {
    position: static;
    width: 100%;
    height: auto;
    border: 0;
    background: #fff;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  .drawer-content {
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .report-block,
  .rp-hero,
  .rp-req,
  .rp-snippet,
  .rp-questions li {
    break-inside: avoid;
  }

  .rp-questions-block {
    transform: none;
    box-shadow: none;
  }

  .evidence-code {
    white-space: pre-wrap;
  }

  .rp-code {
    max-height: none;
    overflow: visible;
  }

  .rp-code-line {
    white-space: pre-wrap;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
