:root {
  --ink: #343c4b;
  --ink-2: #4f5767;
  --muted: #7b8392;
  --line: #e4e6ee;
  --soft: #f6f5fa;
  --page: #ffffff;
  --primary: #6e56cf;
  --primary-dark: #5941b5;
  --primary-soft: #efebfb;
  --track: #e9e8f2;
  --green: #33a474;
  --danger: #d0453f;
  --logo: #5b2af2;
  --radius: 8px;
  --head-font: "Red Hat Display", "Inter", system-ui, sans-serif;
  --body-font: "Red Hat Text", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
}

h1,
h2,
h3,
h4 {
  font-family: var(--head-font);
  color: var(--ink);
  margin: 0 0 0.35em;
  line-height: 1.15;
}

p {
  margin: 0 0 0.8em;
}

:focus-visible {
  outline: 3px solid rgba(110, 86, 207, 0.45);
  outline-offset: 2px;
}

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

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 56px calc(50vw - 50%);
  background: var(--band, var(--soft));
}

.page > .stack > .band:first-child,
.page > .band:first-child {
  margin-top: -36px;
}

.site-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

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

.logo-tile {
  display: block;
  width: 58px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--logo);
  flex: 0 0 auto;
}

.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.brand-name {
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.05;
}

.brand-name small {
  display: block;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  position: relative;
  padding: 24px 12px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active {
  color: var(--ink);
}

.head-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.who {
  position: relative;
}

.who-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.who-btn:hover {
  background: var(--soft);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.avatar.lg {
  width: 52px;
  height: 52px;
  font-size: 17px;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(52, 60, 75, 0.14);
  min-width: 240px;
  padding: 6px;
  z-index: 50;
}

.menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.menu-head strong,
.menu-head span {
  display: block;
}

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

.menu a,
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.menu a:hover,
.menu button:hover {
  background: var(--soft);
}

.proto-bar {
  background: #2f3441;
  color: #d9dce4;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 8px 0;
}

.proto-bar strong {
  color: #fff;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.stack > * + * {
  margin-top: 20px;
}

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

.muted {
  color: var(--muted);
}

.small {
  font-size: 14px;
}

.page-title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  margin: 0;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}

.card-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(110, 86, 207, 0.22);
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
  border-color: #d4d6e0;
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #fff;
}

.btn.dark {
  background: var(--primary);
  border-color: var(--primary);
}

.btn.on-navy {
  background: #fff;
  border-color: #fff;
  color: var(--primary-dark);
  box-shadow: none;
}

.btn.on-navy:hover {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.btn.on-navy:disabled {
  background: rgba(255, 255, 255, 0.25);
  border-color: transparent;
  color: #fff;
  opacity: 1;
}

.btn.danger {
  background: #fff;
  color: var(--danger);
  border-color: #f0c5c2;
  box-shadow: none;
}

.btn.danger:hover {
  background: #fdf1f0;
}

.btn.sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn.block {
  width: 100%;
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.lock {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.lock svg {
  width: 18px;
  height: 18px;
}

.track {
  height: 10px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
  flex: 1;
}

.track span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.track span.done {
  background: var(--green);
}

.welcome {
  padding: 0;
  border: 0;
  background: none;
}

.dash-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}

.dash-hero .eyebrow-line {
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px;
}

.dash-hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 800;
  color: var(--accent, var(--ink));
  margin: 0 0 12px;
}

.dash-hero p.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 560px;
}

.dash-hero .art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
}

.dash-hero .art img {
  width: min(260px, 100%);
}

.dash-hero .art.group img {
  width: 30%;
  max-width: 150px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.quiz-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  text-align: center;
  padding: 26px 20px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tile h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.tile .big {
  font-family: var(--head-font);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
}

.tile .big.violet {
  color: var(--primary);
}

.locked-path {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.banner {
  background: linear-gradient(120deg, #6e56cf, #8a6fe0);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 32px;
}

.banner h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}

.banner p {
  color: #ece8ff;
  margin: 0;
  max-width: 560px;
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.banner.tall {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.banner.tall .btn {
  align-self: flex-start;
}

.type-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
}

.type-card p {
  color: var(--ink-2);
  margin: 0;
}

.mods {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.mod-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 6px 16px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 8px;
  margin: 0 -8px;
}

a.mod-row:hover {
  background: var(--soft);
}

.mod-row .name {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
}

.mod-row .name span {
  font-weight: 500;
  color: var(--muted);
}

.mod-row .pct {
  font-family: var(--head-font);
  font-size: 15px;
  font-weight: 800;
  text-align: right;
}

.login-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 0 40px;
}

body.portal {
  background: linear-gradient(180deg, #f1edfb 0%, #f7f6fb 55%, #fff 100%);
}

body.portal .page {
  padding-top: 32px;
}

body.portal #app {
  padding: 0 16px;
}

.lineup {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: -18px;
  position: relative;
  z-index: 1;
}

.lineup img {
  width: 110px;
  height: 110px;
  margin: 0 -10px;
}

.login-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 34px 36px 30px;
  box-shadow: 0 20px 50px rgba(52, 60, 75, 0.08);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  font-family: var(--head-font);
  font-size: 19px;
  font-weight: 800;
}

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

.segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}

.segment button {
  font-family: var(--head-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 10px;
  cursor: pointer;
}

.segment button[aria-selected="true"] {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(52, 60, 75, 0.1);
}

.login-card h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.login-card .intro {
  color: var(--muted);
  margin: 6px 0 22px;
}

.login-card .btn.block {
  margin-top: 10px;
  padding: 14px;
}

.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick .btn {
  padding: 10px 12px;
  font-size: 15px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 14px;
  border-radius: 6px;
  border: 1.5px solid #d4d6e0;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(110, 86, 207, 0.14);
}

textarea.input {
  resize: vertical;
  min-height: 90px;
}

select.input {
  cursor: pointer;
}

.error {
  color: var(--danger);
  font-size: 14px;
  min-height: 18px;
  margin: 4px 0 0;
}

.switch {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin: 20px 0 0;
}

.hint {
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 0;
}

.quiz-head {
  text-align: center;
}

.quiz-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin: 0 0 10px;
}

.quiz-head p {
  color: var(--ink-2);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto;
}

.quiz-facts {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 22px;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 15px;
}

.quiz-facts span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-progress {
  position: sticky;
  top: 72px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 12px;
}

.quiz-meta {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.quiz-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
}

.quiz-bar strong {
  font-family: var(--head-font);
  font-size: 20px;
  font-weight: 800;
  min-width: 58px;
  text-align: right;
}

.qpage {
  max-width: 900px;
  margin: 0 auto;
}

.qblock {
  padding: 40px 0 38px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  opacity: 0.4;
  transform: scale(0.985);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.qblock.active,
.qblock:focus-within,
.qpage.complete .qblock {
  opacity: 1;
  transform: none;
}

.qblock.answered:not(.active) {
  opacity: 0.55;
}

.qpage.complete .qblock.answered {
  opacity: 1;
}

.qblock:last-child {
  border-bottom: 0;
}

.qblock h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  max-width: 720px;
  margin: 0 auto 8px;
}

.qhint {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
  transition: opacity 0.3s ease;
}

.qblock.answered .qhint {
  opacity: 0;
}

.choices {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 14px;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--line);
  padding: 20px 14px 18px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.choice .ring {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.choice .ring svg {
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.4);
}

.choice:hover {
  border-color: #b9aceb;
  background: #faf8ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(110, 86, 207, 0.12);
}

.choice:hover .ring {
  background: var(--primary-soft);
}

.choice[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.choice[aria-checked="true"] .ring {
  background: var(--primary);
}

.choice[aria-checked="true"] .ring svg {
  opacity: 1;
  transform: none;
}

.qblock.active:not(.answered) .choice .ring {
  animation: ring-invite 2.4s ease-in-out infinite;
}

.qblock.active:not(.answered) .choice:nth-child(2) .ring {
  animation-delay: 0.15s;
}

.qblock.active:not(.answered) .choice:nth-child(3) .ring {
  animation-delay: 0.3s;
}

.qblock.active:not(.answered) .choice:nth-child(4) .ring {
  animation-delay: 0.45s;
}

@keyframes ring-invite {
  0%,
  60%,
  100% {
    box-shadow: 0 0 0 0 rgba(110, 86, 207, 0);
  }
  30% {
    box-shadow: 0 0 0 7px rgba(110, 86, 207, 0.16);
  }
}

#next.ready {
  animation: next-ready 1.6s ease-in-out 0.2s 2;
}

@keyframes next-ready {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(110, 86, 207, 0.22);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(110, 86, 207, 0.18), 0 4px 14px rgba(110, 86, 207, 0.22);
  }
}

#fill {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--primary), #8f78e6);
  transition: width 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) !important;
}

#fill.grow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: sheen 1.1s ease 0.15s 1;
}

@keyframes sheen {
  to {
    transform: translateX(100%);
  }
}

.quiz-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.quiz-nav .btn {
  min-width: 150px;
}

.saved-note {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
  background: var(--soft);
}

.hero .lead {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0;
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 58px);
  font-weight: 800;
  color: var(--accent);
  margin: 8px 0 6px;
}

.hero .tagline {
  font-size: 20px;
  margin: 12px 0 0;
  max-width: 480px;
  color: var(--ink-2);
}

.hero .art {
  display: flex;
  justify-content: center;
}

.hero .art img {
  width: min(340px, 100%);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-2 > *,
.grid-3 > *,
.split > * {
  min-width: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.trait {
  margin: 20px 0 8px;
}

.trait-top {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.trait .track {
  height: 12px;
  background: var(--t-soft, var(--track));
}

.trait .track span {
  background: var(--t, var(--primary));
}

.scale {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #33a474, #e4ae3a 50%, #e0605a);
  margin: 18px 0 10px;
}

.scale i {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.scale-labels b {
  color: var(--ink);
}

.topic-row {
  display: grid;
  grid-template-columns: 190px 1fr 48px;
  gap: 14px;
  align-items: center;
  font-size: 15px;
  margin-top: 12px;
}

.topic-row b {
  text-align: right;
  font-family: var(--head-font);
}

.bullets {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--ink-2);
}

.bullets li + li {
  margin-top: 6px;
}

.big-stat {
  font-family: var(--head-font);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.mine-note {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.types-intro {
  text-align: center;
}

.types-intro h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 800;
  margin: 0 0 12px;
}

.types-intro p {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 auto 22px;
}

.family {
  --band: var(--soft);
}

.family-head {
  text-align: center;
  margin-bottom: 30px;
}

.family-head h2 {
  font-size: clamp(30px, 3.6vw, 40px);
  font-weight: 800;
  color: var(--accent);
  margin: 0;
}

.family-head p {
  color: var(--ink-2);
  font-size: 17px;
  margin: 6px 0 0;
}

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

.type-tile {
  background: #fff;
  border-radius: 10px;
  padding: 26px 20px 28px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid transparent;
  box-shadow: 0 2px 10px rgba(52, 60, 75, 0.05);
}

.type-tile.mine {
  border-color: var(--accent);
}

.type-tile img {
  width: 190px;
  height: 190px;
  margin: 0 auto 14px;
}

.type-tile h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 6px;
}

.type-tile p {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

.theory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}

.steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.steps button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 15px;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
  color: var(--ink-2);
}

.steps button:hover:not(:disabled) {
  background: var(--soft);
}

.steps button[aria-current="step"] {
  background: var(--primary-soft);
  font-weight: 700;
  color: var(--ink);
}

.steps button:disabled {
  color: #aab0bc;
  cursor: not-allowed;
}

.dot {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #d4d6e0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.dot.done {
  background: var(--green);
  border-color: var(--green);
}

.lesson h2 {
  font-size: 28px;
  font-weight: 800;
}

.lesson .body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 680px;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 16px;
  color: var(--ink-2);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
}

.option:hover {
  border-color: #c9c2ee;
}

.option[aria-checked="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.option.right {
  background: #e6f5ee;
  border-color: var(--green);
}

.option.wrong {
  background: #fcebea;
  border-color: var(--danger);
}

.lesson .options {
  max-width: 580px;
  margin-top: 12px;
}

.feedback {
  font-weight: 700;
  margin-top: 12px;
  min-height: 22px;
}

.feedback.good {
  color: var(--green);
}

.feedback.bad {
  color: var(--danger);
}

.module-list {
  display: grid;
  gap: 14px;
}

.module-item {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 22px;
  align-items: center;
}

.module-item h3 {
  font-size: 19px;
  margin: 0 0 4px;
}

.module-item .meter,
td .meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--head-font);
  font-weight: 800;
  font-size: 14px;
}

td .meter {
  min-width: 160px;
  font-size: 13px;
}

td .meter .track {
  height: 8px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  margin-right: 6px;
  white-space: nowrap;
}

.tag.game {
  background: #fdf1d6;
  color: #7a5608;
  margin-right: 6px;
}

.tag.k {
  background: #fcf3de;
  color: #8a5f10;
}

.tag.h {
  background: #e3f4ec;
  color: #1f7a52;
}

.tag.r {
  background: #fdeceb;
  color: #a8352f;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stat {
  text-align: left;
  padding: 22px 26px;
}

.stat h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.stat b {
  font-family: var(--head-font);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
}

.filter:hover {
  border-color: var(--primary);
}

.filter[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th {
  background: var(--soft);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  color: var(--muted);
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:hover td {
  background: #fbfbfd;
}

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

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-head h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
}

.info-tile h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.info-tile .val {
  font-family: var(--head-font);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}

.info-tile .val.md {
  font-size: 22px;
  padding-top: 6px;
}

.notes-area {
  width: 100%;
  min-height: 220px;
  border: 1.5px solid var(--line);
  background: #fffdf6;
  border-radius: 6px;
  padding: 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink-2);
  resize: vertical;
  margin-top: 10px;
}

.notes-area:focus {
  outline: none;
  border-color: var(--primary);
}

.edit-row {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 4px 14px;
  align-items: center;
  margin-top: 14px;
}

.edit-row label {
  grid-column: 1 / -1;
  font-size: 14px;
  font-weight: 700;
}

.edit-row input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.edit-row output {
  font-weight: 800;
  text-align: right;
}

.subtabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}

.subtabs button {
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 700;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.subtabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--primary);
}

.q-list {
  display: grid;
  gap: 10px;
}

.q-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}

.q-item .n {
  font-family: var(--head-font);
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

.q-item .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.q-item .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--ink-2);
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.opt-row {
  display: grid;
  grid-template-columns: 1fr 170px 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.opt-row .check {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 14px;
}

.notice {
  background: #fcf3de;
  color: #6f4a0c;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
}

.drop {
  border: 2px dashed #cfc6f2;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  background: #fff;
  transition: background 0.15s ease;
}

.drop.over {
  background: var(--primary-soft);
}

pre.code {
  background: #2f3441;
  color: #e7e8ef;
  padding: 14px;
  border-radius: 8px;
  font-size: 12.5px;
  overflow-x: auto;
  line-height: 1.6;
}

.preview {
  max-height: 260px;
  overflow: auto;
  font-size: 14px;
  margin: 10px 0 0;
  padding-left: 22px;
}

.picker {
  display: grid;
  gap: 4px;
  align-content: start;
}

.picker button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-size: 14px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--ink);
}

.picker button img {
  width: 40px;
  height: 40px;
}

.picker button[aria-selected="true"],
.picker button:hover {
  background: var(--primary-soft);
}

.editor-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.lesson-edit {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(47, 52, 65, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow: auto;
  padding: 28px 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.modal.wide {
  max-width: 820px;
}

.modal h2 {
  font-size: 24px;
  font-weight: 800;
}

.modal .hero {
  border-radius: 10px;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #2f3441;
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  z-index: 200;
  max-width: calc(100% - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

@media (max-width: 960px) {
  .head-inner {
    flex-wrap: wrap;
    gap: 0 16px;
    padding-top: 10px;
  }
  .main-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
  }
  .main-nav a {
    padding: 12px 10px 14px;
  }
  .quiz-progress {
    top: 116px;
  }
  .split,
  .hero,
  .dash-hero,
  .lesson-layout,
  .editor-layout,
  .theory-grid {
    grid-template-columns: 1fr;
  }
  .hero,
  .dash-hero {
    text-align: center;
  }
  .hero .tagline,
  .dash-hero p.lede {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .module-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  .wrap {
    padding: 0 16px;
  }
  .band {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .brand-name small {
    display: none;
  }
  .who-name {
    display: none;
  }
  .tiles,
  .stats,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .choices {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .choice {
    flex-direction: row;
    text-align: left;
    gap: 14px;
    padding: 12px 14px;
  }
  .choice .ring {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }
  .qblock {
    padding: 30px 0;
  }
  .type-grid {
    grid-template-columns: 1fr;
  }
  .q-item {
    grid-template-columns: 1fr;
  }
  .q-item .n {
    text-align: left;
  }
  .q-item .actions {
    justify-content: flex-start;
  }
  .opt-row {
    grid-template-columns: 1fr 36px;
  }
  .opt-row > :nth-child(2) {
    grid-column: 1;
  }
  .topic-row {
    grid-template-columns: 1fr 44px;
  }
  .topic-row .track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .login-card {
    padding: 26px 20px;
  }
  .lineup img {
    width: 84px;
    height: 84px;
  }
  .quick {
    grid-template-columns: 1fr;
  }
  .quiz-nav .btn {
    min-width: 0;
    flex: 1;
  }
}

@media print {
  body {
    background: #fff;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes bar-fill {
  from {
    width: 0;
  }
}

@keyframes marker {
  from {
    left: 0;
  }
}

@keyframes pick {
  0% {
    transform: scale(0.98);
  }
  60% {
    transform: scale(1.012);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

@keyframes pop-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

@keyframes char-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-12deg);
  }
  75% {
    transform: rotate(12deg);
  }
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

html {
  scroll-behavior: smooth;
}

.site-head {
  animation: fade-in 0.35s ease both;
}

.entering .stack > *,
.entering .lesson-layout > * {
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.entering .stack > :nth-child(2),
.entering .lesson-layout > :nth-child(2) {
  animation-delay: 70ms;
}

.entering .stack > :nth-child(3) {
  animation-delay: 140ms;
}

.entering .stack > :nth-child(4) {
  animation-delay: 210ms;
}

.entering .stack > :nth-child(5) {
  animation-delay: 280ms;
}

.entering .stack > :nth-child(6) {
  animation-delay: 350ms;
}

.entering .stack > :nth-child(n + 7) {
  animation-delay: 400ms;
}

.login-card {
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.lineup img {
  animation: pop-in 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}

.lineup img:nth-child(2) {
  animation-delay: 80ms;
}

.lineup img:nth-child(3) {
  animation-delay: 160ms;
}

.lineup img:nth-child(4) {
  animation-delay: 240ms;
}

.segment button {
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.track span {
  transition: width 0.7s cubic-bezier(0.22, 0.8, 0.3, 1);
  animation: bar-fill 1s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

.quiz-bar .track span {
  transition: width 0.65s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.scale i {
  animation: marker 1s 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}

.btn {
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.option {
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.option:hover {
  transform: translateX(3px);
}

.choice[aria-checked="true"] .ring {
  animation: pick 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.option[aria-checked="true"] {
  animation: pick 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.option.wrong {
  animation: shake 0.4s ease;
}

.feedback.good {
  animation: pick 0.35s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.lesson h2,
.lesson .body,
.lesson .options {
  animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.lesson .body,
.lesson .options {
  animation-delay: 60ms;
}

.mod-row {
  transition: background 0.2s ease;
}

.tile:hover .lock,
.locked-path:hover .lock {
  animation: wiggle 0.5s ease;
}

.hero .art img,
.dash-hero .art img {
  animation: char-in 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both, bob 6s 0.8s ease-in-out infinite;
}

.type-tile {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.type-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(60, 60, 140, 0.08);
}

.type-tile:hover img {
  animation: bob 1.6s ease-in-out infinite;
}

.menu:not([hidden]) {
  animation: drop 0.16s ease-out;
}

.modal-back {
  animation: fade-in 0.18s ease;
}

.modal {
  animation: pop-in 0.24s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}

.modal-back.closing {
  animation: fade-out 0.17s ease forwards;
}

.modal-back.closing .modal {
  animation: pop-out 0.17s ease forwards;
}

.toast {
  animation: toast-in 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.toast.leaving {
  animation: toast-out 0.3s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero .art img,
  .dash-hero .art img,
  .type-tile:hover img,
  .tile:hover .lock,
  .locked-path:hover .lock,
  .qblock.active:not(.answered) .choice .ring,
  #next.ready,
  #fill.grow::after,
  .option.wrong,
  .option[aria-checked="true"],
  .choice[aria-checked="true"] .ring,
  .feedback.good,
  .cta-glow::after {
    animation: none !important;
  }
  .entering .stack > *,
  .entering .lesson-layout > *,
  .login-card,
  .lineup img,
  .sheet {
    animation-name: fade-in !important;
  }
  .btn:hover,
  .type-tile:hover,
  .choice:hover,
  .option:hover {
    transform: none !important;
  }
}

.stack.flush > * + * {
  margin-top: 0;
}

.page > .stack.flush > .band:last-child {
  margin-bottom: -64px;
}

.qpage.complete .qblock {
  opacity: 1;
}

.check-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  margin: 6px 0 14px;
}

.check-line input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.viz {
  --viz-1: #6f4fb0;
  margin-top: 16px;
}

.hb {
  display: grid;
  gap: 8px;
}

.hb-row {
  display: grid;
  grid-template-columns: var(--label, 150px) 1fr;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  outline: none;
  border-radius: 4px;
}

.hb-label {
  text-align: right;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  border-left: 1px solid #cfd2dc;
  padding-right: 42px;
}

.hb-bar {
  display: block;
  height: 12px;
  min-width: 0;
  border-radius: 0 6px 6px 0;
  transition: opacity 0.15s ease;
  animation: bar-fill 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

.hb-val {
  font-family: var(--head-font);
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.cols {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.col-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 180px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1;
}

.col-area {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  background: linear-gradient(#eceef3, #eceef3) 0 0 / 100% 1px no-repeat, linear-gradient(#eceef3, #eceef3) 0 90px / 100% 1px no-repeat;
}

.col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  outline: none;
  min-width: 0;
}

.col-plot {
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid #cfd2dc;
}

.col-bar {
  display: block;
  width: min(22px, 60%);
  border-radius: 6px 6px 0 0;
  transition: opacity 0.15s ease;
  animation: col-fill 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

@keyframes col-fill {
  from {
    height: 0;
  }
}

.col-label {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.viz:has(.hb-bar:hover) .hb-bar:not(:hover),
.viz:has(.col-bar:hover) .col-bar:not(:hover),
.viz:has(.viz-mark:focus-visible) .viz-mark:not(:focus-visible) .hb-bar,
.viz:has(.viz-mark:focus-visible) .viz-mark:not(:focus-visible) .col-bar {
  opacity: 0.5;
}

.viz-tip {
  position: fixed;
  z-index: 300;
  max-width: 300px;
  background: #2f3441;
  color: #fff;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 8px 12px;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.viz-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.viz-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.viz-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.viz-table {
  margin-top: 10px;
  font-size: 14px;
}

.viz-table summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}

.viz-table table {
  margin-top: 8px;
}

.btn.lg {
  padding: 15px 34px;
  font-size: 18px;
}

.btn.xl {
  padding: 19px 44px;
  font-size: 21px;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(110, 86, 207, 0.35);
}

.btn.xl:hover {
  box-shadow: 0 14px 34px rgba(110, 86, 207, 0.42);
}

.btn-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

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

.cta-glow {
  position: relative;
  overflow: hidden;
}

.cta-glow::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: cta-sweep 4.5s ease-in-out 1.2s infinite;
}

@keyframes cta-sweep {
  0%,
  70% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

@media (max-width: 640px) {
  .btn.xl {
    width: 100%;
    padding: 17px 24px;
    font-size: 19px;
  }
  .btn.lg {
    width: 100%;
  }
}

.type-code {
  font-family: var(--head-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.type-tile .code {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.qsection {
  text-align: center;
  padding: 26px 0 4px;
}

.qsection h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 6px;
}

.qsection p {
  color: var(--muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

.choices.many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choices.many .choice {
  padding: 16px 12px 14px;
}

.tag.p {
  background: #e7f0fb;
  color: #25609e;
}

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

.glance-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.glance-mix,
.glance-steps,
.glance-meter {
  display: flex;
  gap: 2px;
  height: 8px;
  margin: 12px 0 8px;
}

.glance-mix i {
  display: block;
  min-width: 4px;
  border-radius: 2px;
}

.glance-steps {
  gap: 4px;
}

.glance-steps i {
  flex: 1;
  border-radius: 2px;
  background: var(--track);
}

.glance-steps i.on {
  background: var(--accent);
}

.glance-meter {
  background: var(--track);
  border-radius: 2px;
  overflow: hidden;
}

.glance-meter i {
  display: block;
  border-radius: 2px;
  background: var(--accent);
}

.glance-note {
  font-size: 13px;
  color: var(--muted);
}

.glance-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.glance-tile b {
  font-family: var(--head-font);
  font-size: 21px;
  line-height: 1.2;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.donut-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}

.donut {
  width: 210px;
  height: 210px;
}

.donut-arc {
  transition: opacity 0.15s ease;
  animation: donut-in 1.1s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

@keyframes donut-in {
  from {
    stroke-dasharray: 0 999;
  }
}

.donut:hover .donut-arc {
  opacity: 0.5;
}

.donut .viz-mark.hot .donut-arc,
.donut .viz-mark:focus .donut-arc {
  opacity: 1;
}

.donut-big {
  font-family: var(--head-font);
  font-size: 34px;
  font-weight: 800;
  fill: var(--ink);
}

.donut-small {
  font-size: 14px;
  fill: var(--muted);
  font-weight: 600;
}

.literacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 8px;
}

.radar {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: #e4e3ef;
  stroke-width: 1;
}

.radar-shape {
  animation: radar-in 1s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
  transform-origin: center;
}

@keyframes radar-in {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
}

.radar-label {
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink-2);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.topic-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-list b {
  font-family: var(--head-font);
}

.topic-list em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.topic-list em.good {
  background: #e3f4ec;
  color: #1f7a52;
}

.wins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.win {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  background: #f3fbf7;
  border: 1px solid #cdeedd;
  border-radius: 10px;
  padding: 16px 18px;
}

.win p {
  margin: 0;
  color: var(--ink-2);
}

.win-big {
  font-family: var(--head-font);
  font-size: 24px;
  font-weight: 800;
  color: #1f7a52;
  min-width: 64px;
  text-align: center;
  line-height: 1.1;
}

.win-big small {
  display: block;
  font-family: var(--body-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.on-track {
  margin-top: 16px;
  background: var(--soft);
  border-radius: 10px;
  padding: 18px 22px;
}

.sources {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.sources a {
  color: inherit;
}

.on-track h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 19px;
}

.on-track p {
  margin: 0;
  color: var(--ink-2);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 18px 18px;
}

.person-card strong {
  display: block;
  font-family: var(--head-font);
  font-size: 18px;
  margin-top: 14px;
}

.person-card p {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

.person-photo,
.person-initials {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--accent, var(--line));
}

.person-initials {
  font-size: 38px;
}

.photo-credit {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
}

.photo-credit:hover {
  text-decoration: underline;
}

.people-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.person-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
  font-size: 14px;
  font-weight: 600;
}

.person-mini img,
.person-mini .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

body.no-scroll {
  overflow: hidden;
}

.reveal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: linear-gradient(180deg, var(--soft), #fff);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade-in 0.3s ease;
}

.reveal.leaving {
  animation: fade-out 0.35s ease forwards;
}

.reveal-inner {
  text-align: center;
  max-width: 560px;
}

.reveal-wait span {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: wait-dot 1s ease-in-out infinite;
}

.reveal-wait span:nth-child(2) {
  animation-delay: 0.15s;
}

.reveal-wait span:nth-child(3) {
  animation-delay: 0.3s;
}

.reveal-wait p {
  margin-top: 18px;
  color: var(--ink-2);
  font-weight: 600;
}

@keyframes wait-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.reveal-result {
  position: relative;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.reveal-result img {
  width: 230px;
  height: 230px;
  margin: 0 auto;
  animation: char-in 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.reveal-result h1 {
  font-size: clamp(40px, 7vw, 64px);
  color: var(--accent);
  margin: 0;
}

.reveal-result .lead {
  font-size: 20px;
  color: var(--ink-2);
  margin: 10px 0 0;
}

.reveal-result .tagline {
  font-size: 19px;
  color: var(--ink-2);
  margin: 4px 0 26px;
}

.burst {
  position: absolute;
  left: 50%;
  top: 110px;
  width: 0;
  height: 0;
}

.burst i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  opacity: 0;
  animation: burst 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) var(--d) forwards;
}

@keyframes burst {
  0% {
    opacity: 1;
    transform: rotate(var(--a)) translateY(0) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateY(-180px) scale(1);
  }
}

.share-card {
  margin: 16px 0 18px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1200 / 630;
  background: var(--soft);
  display: grid;
  place-items: center;
}

.share-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-loading {
  color: var(--muted);
  font-size: 14px;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.share-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.share-btn:hover {
  border-color: var(--primary);
  background: #faf8ff;
  transform: translateY(-1px);
}

.share-btn.x svg {
  color: #111;
}

.share-btn.facebook svg {
  color: #1877f2;
}

.share-btn.linkedin svg {
  color: #0a66c2;
}

.share-btn.tumblr svg {
  color: #36465d;
}

.share-btn.whatsapp svg {
  color: #25a244;
}

.share-btn.reddit svg {
  color: #ff4500;
}

@media (max-width: 860px) {
  .glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .literacy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .glance {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .burst i,
  .reveal-result img,
  .reveal-wait span,
  .radar-shape,
  .donut-arc {
    animation: none !important;
  }
}

.tool {
  margin: 22px 0 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfaff, #fff);
  padding: 20px 22px;
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.tool-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.tool-badge,
.paywall-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.tool-fields {
  display: grid;
  gap: 10px;
}

.tool-field {
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

.tool-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tool-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.tool-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding: 9px 10px;
  background: transparent;
}

.tool-input em {
  font-style: normal;
  color: var(--muted);
  padding: 0 10px;
  white-space: nowrap;
}

.tool-input em:first-child {
  padding-right: 0;
}

.tool-out {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.tool-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.tool-stat b {
  font-size: 16px;
  color: var(--ink);
  text-align: right;
}

.tool-stat.strong b {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.tool-note {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.tool-note.warn {
  color: var(--danger);
  font-weight: 600;
}

.tool-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding-top: 26px;
  margin-top: 4px;
}

.tool-bar {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.tool-bar-fill {
  display: block;
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  transition: height 0.35s ease;
}

.tool-bar em {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -20px;
  font-style: normal;
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
}

.tool-bar b {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.tool-bars + * {
  margin-top: 22px;
}

.tool-bars:last-child {
  margin-bottom: 20px;
}

.tool-foot {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.key-points {
  margin-top: 22px;
  border-left: 4px solid var(--primary);
  background: var(--soft);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

.key-points h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.key-points ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.locked-module {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 44px 32px;
}

.locked-module .lock {
  width: 56px;
  height: 56px;
}

.locked-module .lock svg {
  width: 26px;
  height: 26px;
}

.locked-module h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
}

.tag.prem {
  background: #fdf1d6;
  color: #7a5608;
  margin-left: 6px;
}

.premium-zone {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: linear-gradient(160deg, #f6f2ff 0%, #fff 60%);
}

.premium-zone > .row {
  align-items: flex-end;
  gap: 16px;
}

.premium-zone .card-sub {
  max-width: 560px;
}

.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.premium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.premium-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(110, 86, 207, 0.12);
  transform: translateY(-2px);
}

.premium-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.premium-card strong {
  font-family: var(--head-font);
  font-size: 17px;
  line-height: 1.3;
  padding-right: 40px;
}

.premium-lock {
  position: absolute;
  top: 12px;
  right: 12px;
}

.premium-lock .lock {
  width: 30px;
  height: 30px;
}

.premium-lock .lock svg {
  width: 15px;
  height: 15px;
}

.premium-sum {
  font-size: 14px;
  color: var(--ink-2);
}

.paywall h2,
.consult h2 {
  margin: 12px 0 6px;
}

.paywall-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.paywall-list li {
  display: grid;
  align-content: start;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

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

.paywall-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 16px;
}

.paywall-price span {
  color: var(--muted);
}

.tick {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--green);
}

.consult-list,
.banner-list {
  list-style: none;
  margin: 16px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.consult-list li,
.banner-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.consult-list .tick,
.banner-list .tick {
  margin-top: 2px;
}

.banner-list {
  margin: 14px 0 8px;
}

.banner-list .tick {
  color: #fff;
}

.banner-list span {
  color: #fff;
}

.banner-meta {
  font-size: 14px;
  opacity: 0.9;
}

.consult-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.consult-pay {
  margin: 8px 0 18px;
}

.consult-facts div {
  display: grid;
  align-content: start;
  gap: 2px;
  background: var(--soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.consult-facts span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.consult-facts b {
  font-size: 14px;
  line-height: 1.35;
}

.consult-topics {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
}

.consult-topics legend {
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip input:checked + span {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.disclosure {
  background: #fff8e8;
  border: 1px solid #f1dfb3;
  border-radius: 10px;
  padding: 14px 16px 4px;
  margin-top: 6px;
}

.disclosure strong {
  display: block;
  margin-bottom: 4px;
}

.disclosure p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-2);
}

.next-steps {
  margin: 18px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 12px;
}

.next-steps li {
  padding-left: 4px;
}

.next-steps b,
.next-steps span {
  display: block;
}

.next-steps span {
  color: var(--ink-2);
  font-size: 14px;
}

@media (max-width: 720px) {
  .tool-grid,
  .paywall-list {
    grid-template-columns: 1fr;
  }
  .consult-facts {
    grid-template-columns: 1fr 1fr;
  }
  .consult-facts div:last-child {
    grid-column: 1 / -1;
  }
  .tool {
    padding: 16px;
  }
  .premium-zone {
    padding: 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-card:hover {
    transform: none;
  }
}

.lesson-check {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.lesson-check h3 {
  margin: 0 0 2px;
  font-size: 21px;
  font-weight: 800;
}

.lq {
  margin-top: 22px;
}

.lq-q {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  max-width: 640px;
  font-weight: 600;
  color: var(--ink);
}

.lq-n {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary-dark);
  transition: background 0.2s ease, color 0.2s ease;
}

.lq.solved .lq-n {
  background: var(--green);
  color: #fff;
}

.lesson .lq .options {
  animation: none;
  margin-left: 36px;
  max-width: 560px;
}

.lq .feedback {
  margin-left: 36px;
  max-width: 560px;
  font-weight: 500;
}

.lq .feedback b {
  font-weight: 800;
}

.option:disabled {
  cursor: default;
}

.lq.solved .option:not(.right) {
  opacity: 0.5;
}

.lq .option.wrong {
  animation: shake 0.3s ease;
}

.gate {
  text-align: right;
  margin: 10px 0 0;
}

.flash-link {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.flash-link:hover,
.flash-link.on {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.flash-link small {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.flash-stack {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 24px;
}

.flash-stack::before,
.flash-stack::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 15px;
  border: 2px solid var(--primary);
  border-radius: 3px;
  background: #fff;
}

.flash-stack::before {
  left: 0;
  top: 7px;
}

.flash-stack::after {
  left: 7px;
  top: 0;
  background: var(--primary-soft);
}

.flash-head {
  align-items: flex-start;
  margin-bottom: 18px;
}

.flash-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.flash-meta b {
  color: var(--ink);
}

.flashcard {
  display: block;
  width: 100%;
  max-width: 640px;
  height: 280px;
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  perspective: 1400px;
}

.flash-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.flashcard.flipped .flash-inner {
  transform: rotateY(180deg);
}

.flash-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(52, 60, 75, 0.12);
  text-align: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flash-face.back {
  transform: rotateY(180deg);
  background: var(--primary-soft);
  border-color: #d9d0f7;
}

.flash-face small {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.flash-face strong {
  font-family: var(--head-font);
  font-size: 32px;
  line-height: 1.2;
  color: var(--ink);
}

.flash-face em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
}

.flash-face.back span {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 520px;
}

.flashcard:focus-visible {
  outline: none;
}

.flashcard:focus-visible .flash-face {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.flashcard.in-right {
  animation: card-in-right 0.35s ease;
}

.flashcard.in-left {
  animation: card-in-left 0.35s ease;
}

@keyframes card-in-right {
  from {
    opacity: 0;
    transform: translateX(48px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-in-left {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.flash-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.flash-keys {
  text-align: center;
  margin-top: 14px;
}

.flash-done {
  text-align: center;
  padding: 24px 0 8px;
}

.flash-score {
  margin: 0;
  font-family: var(--head-font);
  font-size: 20px;
  color: var(--muted);
}

.flash-score b {
  font-size: 56px;
  color: var(--primary);
}

.flash-done h3 {
  margin: 6px 0;
  font-size: 22px;
}

@media (max-width: 640px) {
  .flashcard {
    height: 240px;
  }
  .flash-face {
    padding: 22px;
  }
  .flash-face strong {
    font-size: 26px;
  }
  .flash-face.back span {
    font-size: 17px;
  }
  .lesson .lq .options,
  .lq .feedback {
    margin-left: 0;
  }
}

.input.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.5;
}

.section-head {
  margin-top: 34px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.model-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 20px;
  margin: 16px 0 6px;
}

.model-controls .field {
  flex: 1 1 220px;
  max-width: 320px;
  margin: 0;
}

.model-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}

.model-stats div {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
}

.model-stats span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.model-stats b {
  font-family: var(--head-font);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.model-stats small {
  font-size: 12.5px;
  color: var(--ink-2);
}

.model-read {
  margin: 12px 0 6px;
  max-width: 820px;
  color: var(--ink-2);
}

.plot-box {
  width: 100%;
  margin-top: 8px;
}

.plot {
  display: block;
  overflow: visible;
}

.plot-grid {
  stroke: #eceef3;
  stroke-width: 1;
}

.plot-axis {
  stroke: #c3c7d0;
  stroke-width: 1;
}

.plot-tick {
  font-size: 11.5px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}

.plot-label {
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--ink-2);
}

.plot-pt {
  cursor: default;
}

.plot-pt.hot > :last-child {
  stroke: var(--ink);
  stroke-width: 2;
}

.mark-icon {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}

.km-legend span {
  display: inline-flex;
  align-items: center;
}

.km-key {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.k-pick {
  display: inline-grid;
  grid-template-columns: repeat(3, 48px);
  margin: 0;
}

.k-pick button[aria-pressed="true"] {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(52, 60, 75, 0.1);
}

.k-table {
  font-size: 14px;
}

.k-table td,
.k-table th {
  padding: 5px 12px;
}

.heatmap {
  display: grid;
  grid-template-columns: minmax(84px, auto) repeat(var(--n), minmax(34px, 1fr));
  gap: 2px;
  margin-top: 14px;
  font-size: 12px;
}

.hm-col {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  justify-self: center;
  align-self: end;
  padding: 4px 0;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.hm-row {
  align-self: center;
  padding-right: 8px;
  text-align: right;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.hm-cell {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.hm-cell.self {
  background: var(--soft);
}

.hm-cell.hot,
.hm-cell:focus-visible {
  box-shadow: 0 0 0 2px var(--ink);
}

.hm-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.hm-scale i {
  flex: 0 1 220px;
  height: 10px;
  border-radius: 5px;
}

.ct th,
.ct td {
  text-align: center;
}

.ct tbody th {
  text-align: left;
}

.ct th,
.ct td {
  padding: 8px 8px;
}

.ct thead th {
  font-size: 11.5px;
  line-height: 1.3;
}

.ct tbody th {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.ct td b {
  font-size: 15px;
}

.grid-2 .model-stats {
  grid-template-columns: 1fr 1fr;
}

.ct td small {
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .model-stats {
    grid-template-columns: 1fr 1fr;
  }
  .heatmap {
    grid-template-columns: minmax(70px, auto) repeat(var(--n), minmax(26px, 1fr));
    font-size: 10.5px;
  }
  .hm-cell {
    min-height: 28px;
  }
}

.advanced {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.advanced > summary::-webkit-details-marker {
  display: none;
}

.advanced > summary:hover {
  background: var(--soft);
}

.advanced > summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.advanced > summary h2 {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 800;
}

.advanced > summary .card-sub {
  display: block;
}

.advanced-chevron {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-right: 2.5px solid var(--ink-2);
  border-bottom: 2.5px solid var(--ink-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}

.advanced[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.advanced[open] .advanced-chevron {
  transform: translateY(3px) rotate(-135deg);
}

.advanced-body {
  padding: 20px;
  background: var(--soft);
  border-radius: 0 0 var(--radius) var(--radius);
}

.advanced[open] .advanced-body {
  animation: fade-in 0.25s ease;
}

@media (max-width: 640px) {
  .advanced > summary {
    padding: 16px;
  }
  .advanced-body {
    padding: 12px;
  }
}


.patterns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pattern {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
}

.pattern h3 {
  margin: 8px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.pattern p {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.pattern-evidence {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.pattern-meter {
  display: inline-flex;
  gap: 3px;
}

.pattern-meter i {
  width: 16px;
  height: 6px;
  border-radius: 2px;
  background: var(--track);
}

.pattern-meter i.on {
  background: #1f7a52;
}

.pattern .pattern-action {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}

.pattern .pattern-stats {
  margin: auto 0 0;
  padding-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.explore {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.explore > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}

.ct td.over {
  background: #e3f1ea;
}

.ct td.under {
  box-shadow: inset 0 0 0 2px #e0c8c2;
}

.heatmap-wrap {
  max-width: 760px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pager-info {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

#pages > .pager-info {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pager-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.pager-buttons button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}

.pager-buttons button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.pager-buttons button[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager-buttons button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pager-gap {
  padding: 0 4px;
  color: var(--muted);
}

.out-of {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--muted);
  margin-left: 2px;
}

.cohort {
  position: relative;
  z-index: 20;
  padding: 18px 22px;
  border-color: #d9d0f7;
  background: linear-gradient(180deg, #faf8ff, #fff);
}

.cohort-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
}

.cohort-controls .field {
  flex: 1 1 220px;
  max-width: 340px;
  margin: 0;
}

.cohort-samples {
  margin: 0 0 12px;
}

.cohort-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.aus-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 4px;
  font-size: 13px;
  color: var(--ink-2);
}

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

.aus-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.aus-legend i.me {
  background: #6f4fb0;
}

.aus-legend i.nat {
  background: #b7bcc7;
}

.aus-legend i.ci {
  width: 16px;
  height: 0;
  border-radius: 0;
  border-top: 2px solid #20242d;
}

.aus-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.aus-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
}

.aus-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.aus-head h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

.aus-verdict {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.aus-verdict.ahead {
  color: #1f7a52;
}

.aus-verdict.behind {
  color: #b4461f;
}

.aus-bar {
  display: grid;
  grid-template-columns: 150px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 13px;
}

.aus-label {
  color: var(--ink-2);
}

.aus-track {
  position: relative;
  height: 14px;
  border-radius: 3px;
  background: var(--track);
}

.aus-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
}

.aus-fill.me {
  background: #6f4fb0;
}

.aus-fill.nat {
  background: #b7bcc7;
}

.aus-ci {
  position: absolute;
  top: 50%;
  height: 0;
  border-top: 2px solid #20242d;
}

.aus-ci::before,
.aus-ci::after {
  content: "";
  position: absolute;
  top: -6px;
  height: 10px;
  border-left: 2px solid #20242d;
}

.aus-ci::before {
  left: 0;
}

.aus-ci::after {
  right: 0;
}

.aus-bar b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.aus-read {
  margin: 10px 0 6px;
  font-size: 14.5px;
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .aus-list {
    grid-template-columns: 1fr;
  }
  .aus-bar {
    grid-template-columns: 96px 1fr 40px;
  }
}

.aus-row .pattern-stats {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.person-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 22px;
}

.person-avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.person-main {
  flex: 1 1 260px;
  min-width: 0;
}

.person-main h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}

.person-type {
  margin: 2px 0 4px;
}

.person-score {
  display: grid;
  justify-items: end;
  text-align: right;
}

.person-score b {
  font-family: var(--head-font);
  font-size: 34px;
  line-height: 1;
}

.talking {
  margin: 14px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.talking li {
  padding-left: 4px;
  color: var(--ink);
}

.stands {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.stand-head {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
}

.stand-head span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.stand-strip {
  position: relative;
  height: 22px;
  margin: 6px 0 4px;
  border-radius: 4px;
  background: var(--soft);
}

.stand-strip i {
  position: absolute;
  width: 2px;
  height: 8px;
  margin-left: -1px;
  border-radius: 1px;
  background: #b7bcc7;
}

.stand-me {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #6f4fb0;
  box-shadow: 0 0 0 2px #fff;
}

.stand-avg {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: #20242d;
}

.stand p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.aus-me {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.aus-me-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.aus-me-row p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.aus-me-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.aus-me-row.yes .aus-me-mark {
  background: #e3f1ea;
  color: #1f7a52;
}

.aus-me-row.no .aus-me-mark {
  background: #fbe9e2;
  color: #b4461f;
}

.missed,
.applies {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.missed li,
.applies li {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.missed li:last-child,
.applies li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.missed span,
.applies li > span:last-child {
  font-size: 14px;
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .person-score {
    justify-items: start;
    text-align: left;
  }
}

.applies .applies-fit {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.applies .applies-fit.yes {
  color: #1f7a52;
}

.picker {
  position: relative;
}

.combo {
  position: relative;
}

.combo .input {
  padding-left: 38px;
  background-image: radial-gradient(circle at 50% 50%, transparent 5px, var(--muted) 5.5px, var(--muted) 7px, transparent 7.5px), linear-gradient(45deg, transparent 45%, var(--muted) 45%, var(--muted) 58%, transparent 58%);
  background-size: 18px 18px, 8px 8px;
  background-position: 12px 50%, 25px calc(50% + 7px);
  background-repeat: no-repeat;
}

.combo-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(52, 60, 75, 0.16);
  animation: drop 0.14s ease-out;
}

.combo-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.combo-list li[aria-selected="true"] {
  background: var(--primary-soft);
}

.combo-list li.current b::after {
  content: "Selected";
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.combo-text {
  display: grid;
  min-width: 0;
}

.combo-text b {
  font-weight: 700;
  color: var(--ink);
}

.combo-text small {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combo-text mark {
  background: #fdf1d6;
  color: inherit;
  border-radius: 2px;
}

.combo-list .combo-empty {
  cursor: default;
  color: var(--muted);
}

.picker-hint {
  text-align: left;
}

.more {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.more > summary::-webkit-details-marker {
  display: none;
}

.more > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.more[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.more-body {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.more-body > p {
  max-width: 860px;
}

.more-title {
  margin: 18px 0 4px;
  font-size: 16px;
}

.more-list {
  margin: 8px 0 12px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.plain-answer {
  margin: 14px 0 8px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 860px;
}

.aus-source {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.kind {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}

.kind-head {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
}

.kind-head span {
  margin-left: auto;
  color: var(--muted);
}

.kind h3 {
  margin: 8px 0 4px;
  font-size: 16px;
  line-height: 1.35;
}

.kind p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.links {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.links li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 15.5px;
}

.link-size {
  flex: 0 0 auto;
  min-width: 108px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.link-size.strong {
  color: #1f7a52;
}

@media (max-width: 640px) {
  .links li {
    flex-direction: column;
    gap: 2px;
  }
}

.qblock.game h2 {
  max-width: 720px;
}

.qslider {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 640px;
  margin: 8px auto 0;
  padding: 18px 20px 14px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #faf8ff, #fff);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qblock.active .qslider.untouched {
  border-color: #cdbff3;
}

.qslider.locked {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.qslider-stage svg {
  display: block;
  width: 160px;
  height: 120px;
}

.coin rect,
.coin ellipse {
  fill: #e8b53a;
  stroke: #b8860b;
  stroke-width: 1.2;
}

.coin ellipse {
  fill: #f5cd5c;
}

.coin {
  animation: coin-drop 0.28s cubic-bezier(0.3, 0.8, 0.3, 1.2) both;
  animation-delay: calc(var(--i) * 12ms);
}

.coin-shadow {
  fill: rgba(52, 60, 75, 0.12);
}

@keyframes coin-drop {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
}

.jar-glass {
  fill: rgba(111, 79, 176, 0.06);
  stroke: #6f4fb0;
  stroke-width: 3;
}

.jar-fill {
  fill: #cdbff3;
  transition: y 0.3s ease, height 0.3s ease;
}

.jar-coin {
  fill: #f5cd5c;
  stroke: #b8860b;
  stroke-width: 1.2;
}

.jar-lid {
  fill: #6f4fb0;
}

.jar-slot {
  fill: #fff;
}

.qslider-value {
  font-family: var(--head-font);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  height: 40px;
  line-height: 40px;
  white-space: nowrap;
}

.qslider.untouched .qslider-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
}

.qslider-input {
  --pos: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.qslider-input::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary) var(--pos), var(--track) var(--pos));
}

.qslider-input::-moz-range-track {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary) var(--pos), var(--track) var(--pos));
}

.qslider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  box-shadow: 0 3px 10px rgba(111, 79, 176, 0.35);
  transition: transform 0.15s ease;
}

.qslider-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--primary);
  box-shadow: 0 3px 10px rgba(111, 79, 176, 0.35);
}

.qslider.untouched .qslider-input::-webkit-slider-runnable-track {
  background: var(--track);
}

.qslider.untouched .qslider-input::-webkit-slider-thumb {
  border-color: #b7a8e4;
  animation: thumb-hint 1.6s ease-in-out infinite;
}

.qslider-input:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.qslider-input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 8px;
}

@keyframes thumb-hint {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(111, 79, 176, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(111, 79, 176, 0);
  }
}

.qslider-ticks {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  width: 100%;
  gap: 4px;
}

.qslider-tick {
  padding: 6px 2px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  color: var(--muted);
  cursor: pointer;
}

.qslider-tick:hover {
  color: var(--ink);
  background: var(--soft);
}

.qslider-tick.on {
  color: var(--primary-dark);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .qslider.untouched .qslider-input::-webkit-slider-thumb {
    animation: none;
  }
}

.cohort-controls .cohort-who {
  flex: 1 1 240px;
  max-width: 300px;
}

.cohort-controls .cohort-clients {
  flex: 2 1 320px;
  max-width: 560px;
}

.dd {
  position: relative;
  margin: 0;
}

.dd-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 15px;
}

.dd-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  background: #fff;
}

.dd-button:hover {
  border-color: #b7a8e4;
}

.dd-text {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dd-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.dd-button[aria-expanded="true"] .dd-chevron {
  transform: translateY(2px) rotate(-135deg);
}

.dd-list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(360px, 90vw);
  max-height: 360px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(52, 60, 75, 0.16);
  outline: none;
  animation: drop 0.14s ease-out;
}

.dd-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.dd-list li.on {
  background: var(--primary-soft);
}

.dd-list li b {
  display: block;
  font-size: 15px;
}

.dd-list li small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

.dd-check {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 3px;
}

.dd-list li[aria-selected="true"] .dd-check {
  border-right: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  width: 6px;
  height: 11px;
  margin: 2px 4px 0 4px;
  transform: rotate(45deg);
}

.picker-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.picker-label label {
  margin-bottom: 6px;
}

.combo-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 50px;
  padding: 5px 10px 5px 38px;
  border: 1.5px solid #d4d6e0;
  border-radius: 6px;
  background: #fff;
  cursor: text;
  background-image: radial-gradient(circle at 50% 50%, transparent 5px, var(--muted) 5.5px, var(--muted) 7px, transparent 7.5px), linear-gradient(45deg, transparent 45%, var(--muted) 45%, var(--muted) 58%, transparent 58%);
  background-size: 18px 18px, 8px 8px;
  background-position: 12px 14px, 25px 28px;
  background-repeat: no-repeat;
}

.combo-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.combo-input {
  flex: 1 1 140px;
  min-width: 120px;
  border: 0;
  outline: 0;
  padding: 6px 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}

.chip-person {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13.5px;
  font-weight: 600;
}

.chip-person button,
.fchip-x {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.chip-person button:hover,
.fchip-x:hover {
  background: rgba(111, 79, 176, 0.18);
}

.chips-clear {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.combo-tick {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  border: 2px solid var(--line);
  border-radius: 5px;
}

.combo-list li[aria-selected="true"] .combo-tick {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.combo.multi .combo-list li.current b::after {
  content: none;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #d9d0f7;
}

.filter-label {
  font-weight: 700;
  font-size: 14px;
  margin-right: 4px;
}

.fchip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cdbff3;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
}

.fchip-edit {
  padding: 5px 4px 5px 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
  cursor: pointer;
}

.fchip-x {
  margin-right: 3px;
}

.add-filter {
  padding: 6px 12px;
  border: 1px dashed var(--primary);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.add-filter:hover {
  background: var(--primary-soft);
}

.pop-host {
  position: relative;
}

.popover {
  position: absolute;
  z-index: 50;
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(52, 60, 75, 0.18);
  animation: drop 0.14s ease-out;
}

.popover h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.fmenu {
  display: grid;
  gap: 2px;
}

.fmenu button {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.fmenu button:hover,
.fmenu button:focus-visible {
  background: var(--primary-soft);
  outline: none;
}

.fedit-options {
  display: grid;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
}

.fedit-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 14.5px;
  cursor: pointer;
}

.fedit-option:hover {
  background: var(--soft);
}

.fedit-option input {
  accent-color: var(--primary);
}

.fedit-option small {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.fedit-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fedit-range label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.fedit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.tl-good {
  color: #1f7a52;
}

.tl-fair {
  color: #9a6700;
}

.tl-low {
  color: #c0392b;
}

.stat .out-of {
  color: var(--muted);
}

.tl-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.stat-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-link:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(110, 86, 207, 0.14);
  transform: translateY(-2px);
}

.stat-link:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.stat-more {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
}

.advanced {
  border: 0;
  background: none;
}

.advanced > summary {
  position: relative;
  overflow: hidden;
  gap: 20px;
  padding: 22px 26px;
  border-radius: 14px;
  background: linear-gradient(120deg, #5941b5 0%, #6e56cf 55%, #8a6fe0 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(89, 65, 181, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.advanced > summary:hover {
  background: linear-gradient(120deg, #5238a8 0%, #6549c4 55%, #7f62d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(89, 65, 181, 0.34);
}

.advanced > summary h2 {
  color: #fff;
  font-size: 25px;
}

.adv-art {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
  width: 64px;
  height: 52px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.adv-art i {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 1px 1px;
  background: #fff;
  opacity: 0.9;
}

.adv-copy {
  flex: 1;
  min-width: 0;
}

.adv-sub {
  display: block;
  color: #ece8ff;
  font-size: 14.5px;
}

.adv-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 15px;
}

.adv-cta .advanced-chevron {
  width: 9px;
  height: 9px;
  margin: 0;
  border-color: var(--primary-dark);
}

.adv-close,
.advanced[open] .adv-open {
  display: none;
}

.advanced[open] .adv-close {
  display: inline;
}

.advanced[open] > summary {
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.advanced .advanced-body {
  border: 1px solid var(--line);
  border-top: 0;
}

@media (max-width: 640px) {
  .advanced > summary {
    flex-wrap: wrap;
    padding: 18px;
  }
  .adv-art {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-shine {
    animation: none;
  }
  .advanced > summary:hover,
  .stat-link:hover {
    transform: none;
  }
}

.similar-pick {
  max-width: 440px;
  margin-top: 12px;
}

.nav-shine {
  --shine-ink: var(--ink-2);
  background: linear-gradient(100deg, var(--shine-ink) 0%, var(--shine-ink) 40%, #c9cdd8 50%, var(--shine-ink) 60%, var(--shine-ink) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nav-shine 3.2s ease-in-out infinite;
}

.main-nav a:hover .nav-shine,
.main-nav a.active .nav-shine {
  --shine-ink: var(--ink);
}

@keyframes nav-shine {
  0% {
    background-position: 100% 0;
  }
  60%,
  100% {
    background-position: 0% 0;
  }
}

.tool-badge,
.paywall-badge {
  padding: 0;
  border-radius: 0;
  background: none;
}

.tag,
.tag.k,
.tag.h,
.tag.r,
.tag.p,
.tag.prem,
.tag.game {
  padding: 0;
  border-radius: 0;
  background: none;
  font-weight: 700;
}

.tag + .tag {
  margin-left: 8px;
}

.choices.many {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 0 auto;
  gap: 8px;
}

.choices.many .choice {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  gap: 14px;
  padding: 12px 16px;
}

.choices.many .choice .ring {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.choices.many .choice .ring svg {
  width: 16px;
  height: 16px;
}

.mobile-note {
  display: none;
  margin: 0;
  padding: 10px 16px;
  background: #fdf1d6;
  color: #5c4308;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  .mobile-note {
    display: block;
  }
}

.requests-card {
  border: 0;
  background: linear-gradient(135deg, #5941b5 0%, #6e56cf 60%, #8a6fe0 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(89, 65, 181, 0.25);
}

.requests-card .card-title {
  color: #fff;
  font-size: 22px;
}

.requests-card .card-sub {
  color: #ece8ff;
}

.requests-card .table-scroll {
  margin-top: 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.requests-card .table-scroll table {
  margin-top: 0 !important;
}

.requests-card .pager {
  margin-top: 12px;
  border-top: 0;
  padding: 0;
}

.requests-card .pager-info,
.requests-card #request-pages > .pager-info {
  color: #ece8ff;
  border-top: 0;
  padding: 10px 0 0;
}

.requests-card > .row + #request-list > .card-sub {
  color: #ece8ff;
}

.stat-note {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.clients-head {
  margin-top: 8px;
  align-items: center;
}

.clients-head .card-title {
  margin: 0;
}

.show-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

.show-count .input {
  width: auto;
  padding: 6px 10px;
  font-size: 14px;
}

.save-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  background: var(--primary-soft);
  border-color: #d9d0f5;
}

.save-note h2 {
  font-size: 19px;
  margin: 0 0 4px;
}

.save-note p {
  margin: 0;
  color: var(--ink-2);
  max-width: 640px;
}

.save-note .btn {
  flex: none;
}

.save-box .hint {
  margin: -4px 0 4px;
}

.guest-hint {
  margin: 10px 0 0;
  text-align: center;
}

.login-card .staff {
  margin-top: 22px;
}

.login-card .staff form {
  margin-top: 14px;
}

.cohort-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

@media (max-width: 760px) {
  .save-note {
    flex-direction: column;
    align-items: stretch;
  }
  .save-note .btn {
    width: 100%;
  }
}

.fixed-cols {
  table-layout: fixed;
  min-width: 760px;
}

.fixed-cols.wide-cols {
  min-width: 940px;
}

.fixed-cols td {
  overflow-wrap: anywhere;
}

.fixed-cols td .meter {
  min-width: 0;
}

.req-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 560px) {
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions .btn {
    width: 100%;
  }
}

.chip-person.out {
  background: var(--soft);
  color: var(--muted);
}

.chip-slot {
  display: contents;
}

.quiet .hb-bar,
.quiet .col-bar,
.quiet .track span,
.quiet .donut-arc,
.quiet .radar-shape {
  animation: none;
}
