/* =========================
RESET & THEME
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0f14;
  --surface: #14171f;
  --card: #1a1e29;
  --border: #252a38;

  --accent: #4fffb0;
  --accent2: #00c9ff;

  --text: #e8ecf5;
  --muted: #7a849e;

  --danger: #ff5f7e;
  --warning: #ffd166;

  --success: #4fffb0;
  --fail: #ff5f7e;
  --review: #ffd166;

  --radius: 14px;

  --font-head: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;

  --inner: 1200px;
  --px: clamp(20px, 5vw, 80px);
}

/* Тёмная тема */
:root[data-theme="dark"] {
  --bg: #0d0f14;
  --surface: #14171f;
  --card: #1a1e29;
  --border: #252a38;

  --accent: #4fffb0;
  --accent2: #00c9ff;

  --text: #e8ecf5;
  --muted: #7a849e;

  --success: #4fffb0;
  --fail: #ff5f7e;
  --review: #ffd166;
}

/* Светлая тема */
:root[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --card: #ffffff;
  --border: #d0d4e2;

  --accent: #2563eb;
  --accent2: #22c55e;

  --text: #14171f;
  --muted: #6b7280;

  --success: #16a34a;
  --fail: #dc2626;
  --review: #ea580c;
}

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  overflow-x: hidden;

  background: var(--bg);
  color: var(--text);

  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

/* =========================
TOP NAV ACTIONS
========================= */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  padding: 0 10px;
  transition: 0.2s ease;
}

/* Унифицированная компактная кнопка (тема / войти) */
.header-icon-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 12px;

  border-radius: 999px;
  border: 1px solid var(--border);

  background: transparent;
  color: var(--text);

  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.header-icon-btn:active {
  transform: translateY(0);
}

/* Тумблер темы — только иконка внутри */
.theme-toggle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;

  border-radius: 50%;
  border: 1px solid var(--border);

  background: transparent;
  color: var(--text);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  font-size: 16px;
  line-height: 1;

  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0);
}

/* Общая ошибка под полем */
.field-error-text {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 4px;
}

/* Красная рамка у инпута */
.input-error {
  border-color: #ff6b6b;
  outline: none;
}


/* Только в модалке кандидата при ховере — зелёный контур */
.candidate-modal-footer .btn-secondary:hover {
  border-color: #20c997;              /* или #20c997 — выбери, какой зелёный больше нравится */
}

.nav-link {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;

  padding: 0 14px;
  height: 32px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  line-height: 1;
  font-size: 0.9rem;

  text-decoration: none;       /* без подчёркивания всегда */

  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  color: var(--text);
}

.btn-link:hover {
  color: #ffffff;
  border-color: var(--accent);
}

/* =========================
NOISE
========================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;

  pointer-events: none;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

/* =========================
GLOBAL LAYOUT
========================= */
.inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 var(--px);
}

/* =========================
GLOW BLOBS
========================= */
.glow-blob {
  position: absolute;

  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.18;

  pointer-events: none;
}

.glow-blob--green {
  width: 600px;
  height: 600px;
  background: var(--accent);
}

.glow-blob--blue {
  width: 420px;
  height: 420px;
  background: var(--accent2);
}

/* =========================
NAVBAR
========================= */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  background: rgba(13, 15, 20, 0.88);
}

:root[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(208, 212, 226, 0.8);
}

.nav-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 0 var(--px);

  height: 68px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.candidate-modal-footer {
  margin-top: 16px;          /* отступ от блока с темами */
  display: flex;
  justify-content: flex-end; /* кнопка уезжает вправо */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;

  color: var(--text);
  text-decoration: none;

  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 9px;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0d0f14;

  font-size: 0.8rem;
  font-weight: 800;
}

/* =========================
BUTTONS
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: 0.2s ease;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* CTA */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin: 8px auto 0;
  padding: 15px 34px;

  border: none;
  border-radius: 10px;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0d0f14;

  text-decoration: none;

  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;

  cursor: pointer;

  box-shadow: 0 0 32px rgba(79, 255, 176, 0.3);
  transition: box-shadow 0.25s, transform 0.2s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px rgba(79, 255, 176, 0.5);
}

.btn-cta svg {
  transition: transform 0.2s;
}

.btn-cta:hover svg {
  transform: translateX(4px);
}

/* =========================
SECTION HEADINGS
========================= */
.section-label {
  margin-bottom: 14px;

  color: var(--muted);

  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: 56px;

  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
}

.dashboard-title {
  margin-bottom: 4px;
}

/* =========================
HERO
========================= */
#hero-wrapper {
  position: relative;

  width: 100%;
  overflow: hidden;

  background: var(--bg);
}

#hero-wrapper .glow-blob--green {
  top: -80px;
  left: -100px;
}

#hero-wrapper .glow-blob--blue {
  top: 60px;
  right: -80px;
}

#hero {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: clamp(80px, 14vw, 140px) 0 clamp(80px, 12vw, 120px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin-bottom: 28px;
  padding: 5px 14px;

  border-radius: 100px;
  border: 1px solid rgba(79, 255, 176, 0.22);

  background: rgba(79, 255, 176, 0.08);
  color: var(--accent);

  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: var(--accent);

  animation: pulse 2s infinite;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;

  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h1 .highlight {
  background: linear-gradient(90deg, var(--accent), var(--accent2));

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 540px;
  margin-bottom: 44px;

  color: var(--muted);

  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 300;
}

/* =========================
HERO CARDS
========================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;

  width: 100%;
  margin-bottom: 48px;
}

.card {
  position: relative;
  overflow: hidden;

  padding: 28px 26px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--card);

  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 255, 176, 0.35);
}

.card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 2px;

  background: linear-gradient(90deg, var(--accent), var(--accent2));

  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;
  margin-bottom: 16px;

  border-radius: 10px;
  border: 1px solid rgba(79, 255, 176, 0.2);

  background: rgba(79, 255, 176, 0.1);

  font-size: 1.15rem;
}

.card h3 {
  margin-bottom: 8px;

  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);

  font-size: 0.88rem;
  line-height: 1.55;
}

/* =========================
HOW IT WORKS
========================= */
#how-wrapper {
  width: 100%;

  background: var(--surface);

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#how-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 80px var(--px);
}

.steps {
  position: relative;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 65px;
}

.steps::before {
  content: "";

  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;

  height: 1px;

  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent));

  opacity: 0.3;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 0 28px;

  text-align: center;
}

.step-num {
  position: relative;
  z-index: 1;

  display: grid;
  place-items: center;

  width: 56px;
  height: 56px;
  margin-bottom: 16px;

  border-radius: 50%;
  border: 2px solid var(--accent);

  background: var(--bg);
  color: var(--accent);

  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;

  box-shadow: 0 0 20px rgba(79, 255, 176, 0.2);
}

.step h3 {
  margin-bottom: 8px;

  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

.step p {
  color: var(--muted);

  font-size: 0.87rem;
}

/* =========================
DASHBOARD
========================= */
#dashboard {
  width: 100%;
  background: var(--bg);
}

#dashboard-inner {
  max-width: calc(var(--inner) + 0px);
  margin: 0 auto;
  padding: 64px var(--px) 80px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;

  margin-bottom: 28px;
}

#dashboard p {
  color: var(--muted);
}

.dashboard-hint {
  margin-top: 8px;
  max-width: 520px;

  color: var(--text);

  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.dashboard-note {
  margin-top: 8px;

  font-size: 0.86rem;
}

/* TABLE */
.table-wrap {
  overflow-x: auto;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;

  font-size: 0.88rem;
}

thead th {
  padding: 14px 18px;

  text-align: left;
  white-space: nowrap;

  color: var(--muted);
  background: var(--surface);

  border-bottom: 1px solid var(--border);

  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

tbody td {
  padding: 13px 18px;

  white-space: nowrap;
  vertical-align: middle;
}

/* clickable row */
#results-table-body tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

/* SCORE BAR */
.pct-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pct-track {
  width: 72px;
  height: 5px;

  flex-shrink: 0;
  overflow: hidden;

  border-radius: 100px;

  background: var(--border);
}

.pct-fill {
  height: 100%;

  border-radius: 100px;

  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* VERDICTS */
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 3px 10px;

  border-radius: 100px;

  font-size: 0.78rem;
  font-weight: 600;
}

.verdict--pass {
  border: 1px solid rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.verdict--fail {
  border: 1px solid rgba(255, 95, 126, 0.4);
  background: rgba(255, 95, 126, 0.16);
  color: var(--danger);
}

.verdict--review {
  border: 1px solid rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

/* =========================
CANDIDATE MODAL
========================= */
.modal-inner.modal-card {
  max-width: 520px;
  padding: 24px 24px 22px;
}

.candidate-modal-header {
  display: grid;
  grid-template-columns: 1fr auto; /* текстовый блок + кнопка закрытия */
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.candidate-modal-header > div:first-child {
  text-align: center;
  width: 100%;
}

.candidate-modal-title {
  font-size: 1.15rem;   /* было 1.4rem */
  font-weight: 500;    /* вместо 700/800 по умолчанию */
  margin-bottom: 4px;
}

.candidate-modal-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.candidate-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.meta-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
}

.meta-label {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.meta-value {
  font-weight: 500;
  font-size: 0.9rem;
}

.candidate-topics h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.topics {
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}

@media (max-width: 480px) {
  .candidate-modal-header {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .candidate-meta {
    grid-template-columns: 1fr;
  }
}

/* =========================
AUTH / GENERIC MODAL
========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;

  display: none;

  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 201;

  display: none;
  align-items: center;
  justify-content: center;
}

.modal-inner {
  position: relative;
  width: 100%;
  max-width: 340px;        /* было 380–420, теперь ещё компактнее */
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;

  max-height: 80vh;        /* ограничиваем по высоте окна */
  overflow-y: auto;        /* если контента много — скролл внутри */
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;

  border: none;
  background: transparent;

  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-tabs {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  margin: 0 auto 18px;
  padding: 3px 4px;

  border-radius: 999px;
  background: var(--surface);
}

.modal-tab {
  padding: 6px 14px;
  border: none;
  border-radius: 999px;

  background: transparent;
  color: var(--muted);

  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.modal-tab.active {
  background: var(--accent);
  color: #0d0f14;
}

.modal-form {
  display: none;
  flex-direction: column;
  gap: 12px;

  text-align: left;
}

.modal-form.active {
  display: flex;
}

.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;

  color: var(--muted);

  font-size: 0.85rem;
}

.modal-form input {
  padding: 8px 10px;

  border-radius: 8px;
  border: 1px solid var(--border);

  background: var(--bg);
  color: var(--text);

  font-size: 0.9rem;
}

.modal-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-form input.input-error {
  border-color: var(--danger);
}

.modal-submit {
  margin-top: 6px;
  padding: 10px 0;

  border: none;
  border-radius: 8px;

  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0d0f14;

  font-family: var(--font-head);
  font-weight: 700;

  cursor: pointer;
}

.modal-hint {
  margin-top: 4px;

  color: var(--muted);

  font-size: 0.78rem;
}

.modal.open,
.modal-overlay.open {
  display: flex;
}

.modal-overlay.open {
  display: block;
}

/* =========================
FOOTER
========================= */
footer {
  width: 100%;

  background: var(--surface);

  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--inner);
  margin: 0 auto;
  padding: 32px var(--px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;

  color: var(--muted);

  font-size: 0.84rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: var(--accent);
  text-decoration: none;

  transition: opacity 0.2s;
}

footer a:hover {
  opacity: 0.75;
}

/* =========================
ANIMATIONS
========================= */
.fade-up {
  opacity: 0;
  transform: translateY(24px);

  animation: fadeUp 0.6s forwards;
}

.delay-1 {
  animation-delay: 0.12s;
}

.delay-2 {
  animation-delay: 0.24s;
}

.delay-3 {
  animation-delay: 0.36s;
}

.delay-4 {
  animation-delay: 0.48s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
RESPONSIVE
========================= */
@media (max-width: 640px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 24px;

    position: static;
  }

  .steps::before {
    display: none;
  }

  .step {
    align-items: flex-start;

    margin-bottom: 24px;
    padding: 0;

    text-align: left;
  }

  .step:last-child {
    margin-bottom: 0;
  }

  .step-num {
    margin-bottom: 12px;
  }
}

/* Светлая тема: вердикты и модалки */

:root[data-theme="light"] .verdict--fail {
  border-color: color-mix(in srgb, var(--fail) 50%, transparent);
  background: color-mix(in srgb, var(--fail) 18%, transparent);
  color: var(--fail);
}

:root[data-theme="light"] .verdict--review {
  border-color: color-mix(in srgb, var(--review) 50%, transparent);
  background: color-mix(in srgb, var(--review) 18%, transparent);
  color: var(--review);
}

:root[data-theme="light"] .modal-inner {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

:root[data-theme="light"] .modal-close {
  color: #6b7280;
}

:root[data-theme="light"] .modal-tabs {
  background: #f3f4f6;
}

:root[data-theme="light"] .modal-tab {
  color: #6b7280;
}

:root[data-theme="light"] .modal-tab.active {
  background: var(--accent);
  color: #0d0f14;
}

:root[data-theme="light"] .modal-form label {
  color: #374151;
}

:root[data-theme="light"] .modal-form input {
  background: #f9fafb;
  color: #111827;
  border-color: #d1d5db;
}

:root[data-theme="light"] .modal-form input:focus {
  border-color: var(--accent);
}

:root[data-theme="light"] .modal-hint {
  color: #6b7280;
}

/* Hover по таблице в зависимости от темы */
:root[data-theme="light"] #results-table-body tr:hover {
  background-color: rgba(37, 99, 235, 0.08);
}

:root[data-theme="dark"] #results-table-body tr:hover {
  background-color: rgba(79, 255, 176, 0.08);
}

:root[data-theme="dark"] .modal-inner {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-secondary {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border, #dde5ed);
  background: var(--bg-main, #e8eef5);
  color: var(--text-primary, #2c3e50);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

:root[data-theme="dark"] .candidate-modal-footer .btn-secondary {
  background: var(--card);   /* тёмный фон, как у модалки */
  color: var(--text);        /* светлый текст */
  border-color: var(--border);
}

:root[data-theme="dark"] .candidate-modal-footer .btn-secondary:hover {
  border-color: #22c55e;     /* зелёный контур при ховере */
}

/* Светлая тема: оставляем светлой, но тоже с зелёным контуром при ховере */
:root[data-theme="light"] .candidate-modal-footer .btn-secondary:hover {
  border-color: #22c55e;
}

.btn-secondary:hover {
  border-color: var(--accent, #20c997);
}

.btn-secondary[disabled] {
  opacity: 0.6;
  cursor: default;
}

.topic-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.topic-row:last-child {
  border-bottom: none;
}

.topic-name {
  color: var(--muted);
  font-size: 0.88rem;
}

.topic-score {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* =========================
   MOBILE 480px
   ========================= */
@media (max-width: 480px) {
  .nav-inner {
    height: auto;
    min-height: 56px;
    padding: 10px var(--px);
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-link {
    padding: 0 10px;
    height: 30px;
    font-size: 0.8rem;
  }

  .header-icon-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 14px;
  }

  /* НОВОЕ: чуть компактнее заголовок на мобиле */
  h1 {
    font-size: clamp(2.1rem, 8vw, 2.6rem);
    line-height: 1.1;
  }

  /* НОВОЕ: меньшие боковые отступы контейнера */
  .inner {
    padding: 0 16px;
  }

  #hero {
    padding: 60px 0 50px;
  }

  .eyebrow {
    font-size: 0.7rem;
    padding: 4px 10px;
    margin-bottom: 20px;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 32px;
  }

  .card {
    padding: 20px 18px;
  }

  .card h3 {
    font-size: 0.92rem;
  }

  .card p {
    font-size: 0.82rem;
  }

  .btn-cta {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  #how-inner {
    padding: 48px var(--px);
  }

  .section-title {
    margin-bottom: 36px;
    font-size: clamp(1.3rem, 4vw, 2rem);
  }

  #dashboard-inner {
    padding: 40px var(--px) 60px;
  }

  .dashboard-hint {
    font-size: 13px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-inner.modal-card {
    padding: 18px 16px;
  }

  .candidate-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .modal-inner {
    max-width: calc(100vw - 32px);
    padding: 18px 16px;
  }

  .modal-form input {
    font-size: 16px;
    padding: 10px 12px;
  }

  .modal-submit {
    padding: 12px 0;
    font-size: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 24px var(--px);
  }

  table {
    font-size: 0.8rem;
  }

  thead th {
    padding: 10px 10px;
    font-size: 0.65rem;
  }

  tbody td {
    padding: 10px 10px;
  }
}
