/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #fafafa;
  --bg-alt: #f1f2f4;
  --surface: #ffffff;
  --surface-2: #f5f6f7;
  --text: #1a1b1e;
  --text-muted: #6b7280;
  --accent: #e68424;
  --accent-strong: #c96e15;
  --accent-soft: #fdf0e0;
  --on-accent: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --focus-ring: rgba(230, 132, 36, 0.35);
  --shadow: 0 1px 3px rgba(16, 18, 22, 0.06), 0 10px 30px rgba(16, 18, 22, 0.07);
  --shadow-lift: 0 4px 12px rgba(16, 18, 22, 0.1), 0 20px 50px rgba(16, 18, 22, 0.12);
  --ok: #16a34a;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --header-h: 68px;
}

[data-theme="dark"] {
  --bg: #0e0f12;
  --bg-alt: #131519;
  --surface: #181a1f;
  --surface-2: #1f2228;
  --text: #f2f3f5;
  --text-muted: #9ca3af;
  --accent: #e68424;
  --accent-strong: #f09a45;
  --accent-soft: #2b1d0f;
  --on-accent: #171008;
  --border: #26282e;
  --border-strong: #3a3d45;
  --focus-ring: rgba(230, 132, 36, 0.4);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 4px 12px rgba(0, 0, 0, 0.5), 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   Base
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container { width: min(1120px, 92vw); margin-inline: auto; }
.container-narrow { width: min(780px, 92vw); }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-radius: 4px;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.35s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.footer-logo { height: 34px; width: auto; margin-bottom: 8px; }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }

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

.lang-switch {
  display: flex;
  align-items: center;
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 7px 30px 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e68424' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.lang-select:hover { border-color: var(--accent); }
.lang-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
  border-color: var(--accent);
}
.lang-select option { background: var(--surface); color: var(--text); }

.theme-toggle {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.theme-toggle:hover { transform: rotate(15deg); }
.theme-toggle svg { width: 19px; height: 19px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-burger { display: none; width: 38px; height: 38px; place-items: center; }
.nav-burger svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 2; stroke-linecap: round; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 70px);
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 20px;
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.17rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-orgs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hero-orgs li { display: flex; align-items: center; gap: 8px; }
.hero-orgs li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-art { position: relative; }
.hero-svg { width: 100%; height: auto; max-height: 480px; }

.hero-svg .draw path,
.hero-svg .draw circle,
.hero-svg .draw ellipse,
.hero-svg .draw line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 2.4s ease forwards;
}
.hero-svg .draw-slower * { animation-duration: 3.2s; animation-delay: 0.3s; }
.hero-svg .draw-slow * { animation-delay: 0.15s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.float-dots circle { animation: floaty 5s ease-in-out infinite; }
.float-dots circle:nth-child(2) { animation-delay: 0.8s; }
.float-dots circle:nth-child(3) { animation-delay: 1.6s; }
.float-dots circle:nth-child(4) { animation-delay: 2.4s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.arrows path { animation: pulse-draw 3.5s ease-in-out infinite; }
@keyframes pulse-draw {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ============================================================
   Sections & shared blocks
   ============================================================ */
.section { padding: clamp(60px, 8vw, 100px) 0; }
.alt-bg {
  background: var(--bg-alt);
  transition: background-color 0.35s ease;
}
.divider { width: 100%; height: 42px; fill: var(--bg-alt); margin-bottom: -1px; }
.divider.flip { transform: scaleY(-1) scaleX(-1); }

.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 10px; }

.spot {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.spot svg { width: 32px; height: 32px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.section-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.about p { margin-bottom: 14px; color: color-mix(in srgb, var(--text) 86%, var(--text-muted)); }

.about-visual { display: grid; gap: 16px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--accent);
  min-width: 3ch;
}
.stat-card span:last-child { color: var(--text-muted); font-size: 0.92rem; }

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.profile-card h3 { margin-bottom: 18px; font-size: 1.15rem; }
.profile-card h3::after {
  content: "";
  display: block;
  width: 42px; height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-top: 8px;
}

.tag-list { list-style: none; display: grid; gap: 10px; }
.tag-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}
.tag-list li::before {
  content: "";
  width: 8px; height: 8px;
  flex-shrink: 0;
  border-radius: 2.5px;
  background: var(--accent-soft);
  outline: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* ============================================================
   Form
   ============================================================ */
.survey-section { padding-top: 40px; }

.progress-track {
  position: relative;
  height: 6px;
  background: var(--bg-alt);
  border-radius: 999px;
  margin: 26px 0 44px;
  overflow: visible;
}
[data-theme="dark"] .progress-track { background: var(--surface-2); }
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.4s ease;
}
.progress-label {
  position: absolute;
  right: 0;
  top: -26px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.form-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 3.5vw, 40px);
  margin-bottom: 28px;
  transition: border-color 0.3s ease;
}
.form-block:focus-within { border-color: var(--accent); }

.form-block legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  padding-inline: 6px;
  margin-bottom: 24px;
}
.block-num {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.95rem;
  font-weight: 800;
}

.field-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { display: block; margin-bottom: 22px; position: relative; }
.field:last-child { margin-bottom: 0; }

.label-text {
  display: block;
  font-weight: 600;
  font-size: 0.94rem;
  margin-bottom: 9px;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
textarea { resize: vertical; min-height: 84px; }

/* ---------- autocomplete ---------- */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 264px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  padding: 6px;
}
.ac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}
.ac-item mark { background: none; color: var(--accent); font-weight: 700; }
.ac-item:hover, .ac-item.active { background: var(--accent-soft); color: var(--text); }
.ac-text { min-width: 0; overflow-wrap: anywhere; }
.ac-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---------- tag chips (multi-value fields) ---------- */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.tag-chips:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.tag-chips input {
  flex: 1;
  min-width: 140px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px 8px !important;
  width: auto !important;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px 5px 13px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: pop-in 0.18s ease;
}
.tag-remove {
  width: 19px; height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 0.85rem;
  line-height: 1;
  transition: background-color 0.2s ease;
}
.tag-remove:hover { background: rgba(0, 0, 0, 0.28); }

.error-msg {
  display: none;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: #dc2626;
  margin-top: 6px;
}
.field.invalid input,
.field.invalid textarea { border-color: #dc2626; }
.field.invalid > .error-msg,
.field.invalid .group-error,
.option-grid.invalid ~ .group-error,
.group-error.visible { display: block; }

.chip-other:has(input:checked) ~ .other-input:not([hidden]),
.other-input { margin-top: 12px; }

.option-grid { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.22s ease;
  user-select: none;
}
.chip:hover span {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 3px 12px var(--focus-ring);
}
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }

.other-input:not([hidden]) { width: 100%; }

.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.check-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--text) 85%, var(--text-muted));
  transition: all 0.22s ease;
  user-select: none;
}
.check-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.check-chip input {
  appearance: none;
  width: 20px; height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  background: var(--surface);
}
.check-chip input::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2.5px solid var(--on-accent);
  border-bottom: 2.5px solid var(--on-accent);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.18s ease;
  margin-top: -3px;
}
.check-chip input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-chip input:checked::after { transform: rotate(-45deg) scale(1); }
.check-chip:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.privacy-block legend { font-size: 1.05rem; }
.privacy-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.consent-check {
  display: flex !important;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
}
.consent-error { margin-top: 8px; }
.consent-check.invalid ~ .consent-error { display: block; }

.consent-check input { position: absolute; opacity: 0; }
.checkmark-box {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
  border-radius: 7px;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}
.checkmark-box::after {
  content: "";
  width: 11px; height: 6px;
  border-left: 2.5px solid var(--on-accent);
  border-bottom: 2.5px solid var(--on-accent);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.18s ease;
  margin-top: -2px;
}
.consent-check input:checked ~ .checkmark-box { background: var(--accent); border-color: var(--accent); }
.consent-check input:checked ~ .checkmark-box::after { transform: rotate(-45deg) scale(1); }

.submit-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 0 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 18px var(--focus-ring);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 10px 26px var(--focus-ring); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-big { padding: 16px 40px; font-size: 1.05rem; }
.btn-small { padding: 9px 18px; font-size: 0.85rem; }

.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#submit-btn[disabled] { opacity: 0.7; pointer-events: none; }

.form-status { font-size: 0.9rem; font-weight: 500; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #dc2626; }

.thanks-panel {
  text-align: center;
  padding: clamp(50px, 8vw, 90px) 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 40px;
  animation: pop-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pop-in {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.thanks-icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thanks-panel h2 { font-size: 1.9rem; margin-bottom: 12px; }
.thanks-panel p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 26px; }

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard-main { padding: clamp(46px, 6vw, 76px) 0 80px; }

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 6px;
}
.dash-head h1 { display: flex; align-items: center; gap: 14px; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.h1-icon { width: 38px; height: 38px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dash-actions { display: flex; gap: 10px; }
.dash-updated { font-size: 0.85rem; margin-bottom: 30px; }

.spin-on-click.loading svg, button.loading svg { animation: spin 0.8s linear infinite; }
#refresh-btn svg { width: 15px; height: 15px; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.kpi-card:hover { transform: translateY(-3px); }
.kpi-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  color: var(--accent);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.kpi-label { font-size: 0.85rem; color: var(--text-muted); }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.chart-card.wide { grid-column: 1 / -1; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 2.6vw, 30px);
  box-shadow: var(--shadow);
}
.chart-card h2 { font-size: 1.02rem; margin-bottom: 20px; }
.chart-card h2.mt { margin-top: 30px; }

.bars { display: grid; gap: 11px; }
.bar-item { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 44px; align-items: center; gap: 12px; font-size: 0.86rem; }
.bar-label { color: var(--text-muted); font-weight: 500; overflow-wrap: anywhere; }
.bar-track {
  height: 22px;
  background: var(--bg-alt);
  border-radius: 7px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar-count { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }

.challenges-bars .bar-item { grid-template-columns: minmax(140px, 220px) 1fr 44px; }

.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut {
  --p1: 33%; --p2: 33%;
  width: 158px; height: 158px;
  flex-shrink: 0;
  border-radius: 50%;
  position: relative;
  background:
    conic-gradient(var(--accent) 0 var(--p1), var(--accent-strong) var(--p1) calc(var(--p1) + var(--p2)), var(--border-strong) calc(var(--p1) + var(--p2)) 100%);
  mask: radial-gradient(closest-side, transparent 54%, #000 55%);
  -webkit-mask: radial-gradient(closest-side, transparent 54%, #000 55%);
  transition: --p1 0.5s ease;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text);
  -webkit-mask: none;
  mask: none;
}
.legend { display: grid; gap: 9px; font-size: 0.87rem; }
.legend li { list-style: none; display: flex; align-items: center; gap: 9px; color: var(--text-muted); font-weight: 500; }
.legend .swatch { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.legend b { color: var(--text); }

.word-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.cloud-tag {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-weight: 600;
  font-size: var(--tag-size, 0.9rem);
  transition: all 0.22s ease;
  cursor: default;
}
.cloud-tag.hot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cloud-tag:hover { transform: translateY(-2px); }

.raw-table-section { margin-top: 40px; }
.raw-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.raw-table-head h2 { font-size: 1.3rem; }
.pager { display: flex; align-items: center; gap: 12px; }
.pager-info { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pager button[disabled] { opacity: 0.4; pointer-events: none; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.raw-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; min-width: 900px; }
.raw-table th, .raw-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.raw-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  font-weight: 700;
  white-space: nowrap;
}
.raw-table tr:last-child td { border-bottom: none; }
.raw-table tbody tr:hover { background: var(--accent-soft); }

.empty-state { text-align: center; color: var(--text-muted); padding: 50px 0; font-size: 1.05rem; }
.dashboard-cta { display: flex; width: fit-content; margin: 0 auto; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 44px 0 30px;
  transition: background-color 0.35s ease;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.footer-nav { display: flex; gap: 22px; align-items: baseline; }
.footer-nav a { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }
.copyright { text-align: center; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.12s; }

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

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid, .section-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin-inline: auto; }
  .charts-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .nav-burger { display: grid; }
  .field-row.two { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .profiles-grid { grid-template-columns: 1fr; }
  .lang-select { padding: 6px 26px 6px 12px; font-size: 0.76rem; }
  .bar-item { grid-template-columns: 90px 1fr 36px; gap: 8px; font-size: 0.78rem; }
  .dash-actions { width: 100%; }
  .form-block { padding: 20px 16px; }
}
