/* ProfGid — styles */
:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --surface-2: #F3EFE7;
  --ink: #16163A;
  --ink-2: #4A4A6A;
  --ink-3: #8A8AA3;
  --line: #E7E1D6;
  --brand: #3B3BF5;
  --brand-ink: #FFFFFF;
  --brand-soft: #E8E8FF;
  --sun: #FFC93C;
  --coral: #FF6B4A;
  --mint: #2EC4A0;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(22, 22, 58, .04), 0 8px 24px rgba(22, 22, 58, .06);
  --font-head: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 6vw, 60px); }
h2 { font-size: clamp(24px, 3.6vw, 36px); }
h3 { font-size: 18px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.scrolled { border-bottom-color: var(--line); }
.header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 800; font-size: 20px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--ink); position: relative; overflow: hidden; flex: none;
}
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; border-radius: 50%; }
.logo-mark::before { width: 20px; height: 20px; background: var(--sun); left: 5px; top: 5px; }
.logo-mark::after { width: 12px; height: 12px; background: var(--coral); right: 4px; bottom: 4px; }
.logo b { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; color: var(--ink-2);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.nav .lbl-short { display: none; }
.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); margin-left: 8px; flex: none;
}
.lang button {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink-2);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 800; font-size: 17px; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(59, 59, 245, .28); }
.btn-primary:hover { background: #2E2EDB; }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 .hl { color: var(--brand); }
.hero-lead { font-size: 19px; color: var(--ink-2); margin: 20px 0 30px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); display: inline-block; }

.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin-left: auto; }
.orbit-ring { position: absolute; inset: 8%; border-radius: 50%; border: 2px dashed var(--line); }
.orbit-core {
  position: absolute; inset: 31%; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; text-align: center; padding: 10px;
  font-family: var(--font-head); font-size: clamp(14px, 2vw, 18px); line-height: 1.2;
}
.orbit-core small { display: block; font-family: var(--font-body); font-weight: 700; font-size: 12px; color: #B9B9D6; margin-top: 4px; }
.chip-dot {
  position: absolute; transform: translate(-50%, -50%);
  background: var(--surface); border-radius: 999px; padding: 7px 12px 7px 8px; box-shadow: var(--shadow);
  font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.chip-dot i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
@keyframes float { 0%, 100% { margin-top: 0; } 50% { margin-top: -6px; } }

/* Sections */
.section { padding: 64px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head p { max-width: 52ch; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.step-n {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }

.scales-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.scale-tile {
  border-radius: var(--radius-sm); padding: 16px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; min-height: 108px;
}
.scale-tile .sw { width: 28px; height: 28px; border-radius: 9px; }
.scale-tile b { font-size: 15px; line-height: 1.25; }

.banner {
  background: var(--ink); color: #fff; border-radius: 28px; padding: 40px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  position: relative; overflow: hidden;
}
.banner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--sun); opacity: .9;
}
.banner > * { position: relative; z-index: 1; }
.banner p { color: #C9C9E3; margin-top: 10px; }
.banner .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 40px; color: var(--ink-2); font-size: 15px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; gap: 18px; }
.footer a { text-decoration: none; font-weight: 700; }
.footer a:hover { color: var(--ink); }

/* Test */
.test-shell { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.progress-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; width: 0; transition: width .3s ease; }
.q-card { margin-top: 26px; padding: 34px; }
.q-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.q-tag i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.q-text { font-family: var(--font-head); font-weight: 600; font-size: clamp(20px, 3vw, 26px); line-height: 1.3; min-height: 3.9em; }
.answers { display: grid; gap: 10px; margin-top: 26px; }
.answer {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-weight: 700; font-size: 17px; transition: border-color .12s, background .12s, transform .12s;
}
.answer:hover { border-color: var(--ink-3); }
.answer .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; display: grid; place-items: center; }
.answer .key { margin-left: auto; font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.answer[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.answer[aria-pressed="true"] .dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px var(--brand-soft); }
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; }
.link-btn { background: none; border: 0; cursor: pointer; font-weight: 800; color: var(--ink-2); padding: 10px 4px; }
.link-btn:hover { color: var(--ink); }
.link-btn:disabled { opacity: .35; cursor: default; }
.q-enter { animation: qin .28s ease; }
@keyframes qin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.intro { text-align: center; padding: 30px 0; }
.intro h1 { font-size: clamp(28px, 5vw, 44px); }
.intro p.muted { margin: 16px auto 26px; max-width: 52ch; }
.intro-facts { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 800; font-size: 15px; }
.intro-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* Results */
.res-hero { padding: 40px 0 10px; }
.res-hero h1 { font-size: clamp(28px, 5vw, 48px); }
.res-hero p { margin-top: 12px; max-width: 60ch; }
.res-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.top-card { position: relative; overflow: hidden; }
.top-card .rank { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--ink-3); }
.top-card h3 { font-size: 20px; margin: 10px 0 6px; }
.top-card .pct { font-family: var(--font-head); font-size: 40px; font-weight: 800; }
.top-card .sw-bar { position: absolute; left: 0; top: 0; height: 6px; width: 100%; }
.top-card p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.subjects { margin-top: 14px; font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.subjects b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 2px; }

.scale-bars { display: grid; gap: 12px; }
.scale-row { display: grid; grid-template-columns: 220px 1fr 52px; gap: 14px; align-items: center; font-weight: 700; }
.scale-row .bar { height: 14px; }
.scale-row .v { text-align: right; font-variant-numeric: tabular-nums; }

.sphere-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sphere-res { display: flex; gap: 14px; align-items: center; text-decoration: none; padding: 18px; }
.sphere-res:hover { border-color: var(--ink-3); }
.sphere-res .ico { font-size: 28px; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.sphere-res b { display: block; line-height: 1.25; }
.sphere-res .pct-chip { margin-left: auto; font-weight: 800; color: var(--brand); }

.prof-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; counter-reset: prof; }
.prof-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 18px; }
.prof-item::before {
  counter-increment: prof; content: counter(prof);
  font-family: var(--font-head); font-weight: 800; width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 14px;
}
.prof-item b { display: block; line-height: 1.3; }
.prof-item .meta { font-size: 13px; color: var(--ink-3); font-weight: 700; margin-top: 2px; }
.prof-item p { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.prof-item .pct-chip { font-weight: 800; color: var(--brand); }
.note { margin-top: 24px; font-size: 14px; color: var(--ink-2); background: var(--surface-2); border-radius: 16px; padding: 14px 16px; }

/* Map */
.map-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0 18px; height: 54px;
}
.search:focus-within { border-color: var(--brand); }
.search input { border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; flex: 1; min-width: 0; color: var(--ink); }
.search svg { color: var(--ink-3); flex: none; }
.sphere-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 26px; }
.sphere-card {
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 12px; padding: 22px; min-height: 170px;
  transition: transform .15s, border-color .15s;
}
.sphere-card:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.sphere-card .ico { font-size: 30px; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); }
.sphere-card b { font-size: 17px; line-height: 1.3; }
.sphere-card .cnt { margin-top: auto; font-size: 14px; color: var(--ink-3); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.match-chip { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 13px; }

.search-results { display: grid; gap: 10px; margin-top: 22px; }
.search-results .prof-row { padding: 16px 18px; }
.empty { text-align: center; padding: 40px 0; color: var(--ink-2); }

dialog.sheet {
  border: 0; padding: 0; border-radius: 28px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(22, 22, 58, .3);
}
dialog.sheet::backdrop { background: rgba(22, 22, 58, .45); backdrop-filter: blur(3px); }
.sheet-head { position: sticky; top: 0; background: var(--bg); padding: 26px 26px 18px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head .row { display: flex; gap: 16px; align-items: center; }
.sheet-head .ico { font-size: 34px; width: 64px; height: 64px; border-radius: 20px; background: var(--surface); display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }
.sheet-head p { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.close {
  margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 22px; line-height: 1; flex: none;
}
.close:hover { background: var(--line); }
.sheet-body { padding: 18px 26px 28px; display: grid; gap: 10px; }
.prof-row { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.prof-row b { display: block; }
.prof-row .meta { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.prof-row p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); display: inline-flex; align-items: center; gap: 6px; }
.tag i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .orbit { max-width: 360px; margin: 10px auto 0; }
  .scales-grid { grid-template-columns: repeat(2, 1fr); }
  .top3 { grid-template-columns: 1fr; }
  .prof-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav a.hide-sm { display: none; }
  .nav a { padding: 8px 10px; white-space: nowrap; }
  .nav .lbl-full { display: none; }
  .nav .lbl-short { display: inline; }
  .lang { margin-left: 4px; }
  .lang button { padding: 6px 9px; }
  .sphere-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sphere-card { padding: 14px; min-height: 0; gap: 10px; border-radius: 18px; }
  .sphere-card .ico { width: 44px; height: 44px; font-size: 24px; border-radius: 14px; }
  .sphere-card b { font-size: 15px; }
  .sphere-card .cnt { font-size: 12px; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 1fr; padding: 28px; }
  .section { padding: 44px 0; }
  .q-card { padding: 22px; }
  .answer .key { display: none; }
  .scale-row { grid-template-columns: 1fr 44px; }
  .scale-row .bar { grid-column: 1 / -1; grid-row: 2; }
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
}
@media (max-width: 420px) {
  .header .wrap { gap: 8px; }
  .logo span.txt { display: none; }
  .chip-dot { font-size: 11px; padding: 5px 9px 5px 6px; }
}

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

@media print {
  .header, .footer, .res-actions, .no-print { display: none !important; }
  body { background: #fff; font-size: 13px; }
  .card { box-shadow: none; break-inside: avoid; }
  .section { padding: 18px 0; }
  .top3 { grid-template-columns: repeat(3, 1fr); }
  .prof-list { grid-template-columns: 1fr 1fr; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
