:root {
  --test-blue: #0b74de;
  --test-ink: #0f172a;
  --test-muted: #64748b;
  --test-line: #e2e8f0;
  --test-soft: #f8fafc;
  --test-green: #16a34a;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--test-ink);
  background: #fff;
}

.tka-test-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.tka-test-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--test-line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
  backdrop-filter: blur(14px);
}

.tka-test-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.tka-test-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
  color: var(--test-ink);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.tka-test-brand:hover {
  color: var(--test-ink);
  text-decoration: none;
}

.tka-test-brand img {
  height: 36px;
  width: auto;
}

.tka-test-brand span {
  display: grid;
  color: #111827;
  font-size: 18px;
  line-height: 1.02;
}

.tka-test-brand small {
  color: var(--test-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tka-test-menu-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--test-line);
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  font-weight: 900;
}

.tka-test-menu-toggle span {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.tka-test-menu-toggle b {
  font-size: 13px;
}

.tka-test-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  gap: 3px;
}

.tka-test-links a,
.tka-test-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .01em;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.tka-test-links a:hover,
.tka-test-link:hover {
  background: #eff6ff;
  color: var(--test-blue);
  text-decoration: none;
}

.tka-test-link.is-active {
  background: #eaf3ff;
  color: #075cab;
  box-shadow: inset 0 0 0 1px rgba(11, 116, 222, .14);
}

.tka-test-links .tka-test-cta,
.tka-test-cta {
  margin-left: 8px;
  background: var(--test-blue);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(11, 116, 222, .2);
}

.tka-test-links .tka-test-cta:hover,
.tka-test-cta:hover {
  background: #075cab;
  color: #fff;
}

.tka-test-main {
  min-height: 60vh;
}

.tka-test-hero {
  padding: 76px 0 68px;
  background:
    radial-gradient(circle at 12% 18%, rgba(11, 116, 222, .14), transparent 28%),
    radial-gradient(circle at 84% 26%, rgba(22, 163, 74, .13), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #fff 52%, #f3fbf7 100%);
  border-bottom: 1px solid var(--test-line);
}

.tka-test-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 42px;
  align-items: center;
}

.tka-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--test-blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tka-test-hero h1,
.tka-test-hub-hero h1 {
  margin: 0 0 16px;
  color: #0b1220;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1;
  font-weight: 900;
}

.tka-test-hero p,
.tka-test-hub-hero p {
  max-width: 740px;
  color: #475569;
  font-size: 18px;
  line-height: 1.75;
}

.tka-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tka-test-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 900;
  text-decoration: none;
}

.tka-test-button:hover {
  text-decoration: none;
}

.tka-test-button-primary {
  background: var(--test-blue);
  color: #fff;
}

.tka-test-button-secondary {
  background: #fff;
  border-color: var(--test-line);
  color: var(--test-ink);
}

.tka-test-panel,
.tka-test-card,
.tka-topic-card {
  border: 1px solid var(--test-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .075);
}

.tka-test-panel {
  padding: 24px;
}

.tka-test-panel h2 {
  margin: 0 0 16px;
  color: #064d87;
  font-size: 24px;
  font-weight: 900;
}

.tka-test-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tka-test-stat {
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
}

.tka-test-stat strong {
  display: block;
  color: var(--test-blue);
  font-size: 24px;
  font-weight: 900;
}

.tka-test-stat span {
  color: var(--test-muted);
  font-weight: 800;
}

.tka-test-section {
  padding: 58px 0;
}

.tka-test-section h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 900;
}

.tka-test-lead {
  color: var(--test-muted);
  font-size: 17px;
  line-height: 1.7;
}

.tka-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.tka-topic-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 22px;
  color: var(--test-ink);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tka-topic-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  color: var(--test-ink);
  text-decoration: none;
}

.tka-topic-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--test-blue);
}

.tka-topic-card strong {
  font-size: 22px;
  font-weight: 900;
}

.tka-topic-card span {
  margin-top: 8px;
  color: var(--test-muted);
  line-height: 1.6;
}

.tka-test-hub-hero {
  padding: 58px 0;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 60%, #ecfdf5 100%);
  border-bottom: 1px solid var(--test-line);
}

.tka-test-footer {
  background: #08111f;
  color: #dbeafe;
  padding: 42px 0 20px;
}

.tka-test-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 26px;
}

.tka-test-footer h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.tka-test-footer a {
  display: block;
  margin: 9px 0;
  color: #bfdbfe;
}

.tka-test-footer-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #94a3b8;
}

.tka-quiz-flow-hero {
  padding: 56px 0 34px;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 65%, #ecfdf5 100%);
  border-bottom: 1px solid var(--test-line);
}

.tka-quiz-flow-hero h1 {
  max-width: 760px;
  margin: 12px 0 12px;
  color: var(--test-ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 900;
}

.tka-quiz-flow-hero p {
  max-width: 780px;
  color: var(--test-muted);
  font-size: 19px;
  line-height: 1.7;
}

.tka-quiz-flow {
  padding: 30px 0 64px;
  background:
    radial-gradient(circle at 8% 18%, rgba(11,116,222,.08), transparent 26%),
    radial-gradient(circle at 90% 8%, rgba(22,163,74,.08), transparent 24%),
    #f8fafc;
}

.tka-quiz-panel {
  display: grid;
  grid-template-columns: minmax(220px, 292px) minmax(0, 1fr);
  min-height: 680px;
  border: 1px solid var(--test-line);
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15,23,42,.08);
}

.tka-quiz-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}

.tka-quiz-command h2 {
  margin: 0;
  color: var(--test-ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.08;
}

.tka-quiz-search {
  display: grid;
  gap: 7px;
  margin: 0;
}

.tka-quiz-search span {
  color: var(--test-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tka-quiz-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--test-line);
  border-radius: 999px;
  background: #fff;
  color: var(--test-ink);
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(15,23,42,.06);
  outline: 0;
}

.tka-quiz-search input:focus {
  border-color: rgba(11,116,222,.45);
  box-shadow: 0 0 0 4px rgba(11,116,222,.1), 0 14px 34px rgba(15,23,42,.06);
}

.tka-studio-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #e7edf6;
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 18px 48px rgba(15,23,42,.06);
}

.tka-studio-guidance span {
  display: block;
  color: #0b74de;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tka-studio-guidance strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.tka-studio-guidance a {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-radius: 999px;
  background: #0b74de;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(11,116,222,.18);
}

.tka-quiz-subjects {
  background: linear-gradient(180deg, #fff, #f8fafc);
  border-right: 1px solid var(--test-line);
}

.tka-quiz-side-title {
  position: sticky;
  top: 75px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--test-line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
}

.tka-quiz-side-title strong {
  color: var(--test-ink);
  font-size: 16px;
  font-weight: 900;
}

.tka-quiz-side-title span {
  color: var(--test-muted);
  font-size: 12px;
  font-weight: 800;
}

.tka-quiz-panel .topics {
  position: sticky;
  display: flex;
  flex-direction: column !important;
  flex-wrap: nowrap;
  top: 132px;
  max-height: calc(100vh - 142px);
  overflow: auto;
  padding: 10px;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.tka-quiz-panel .topics .nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 64px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border: 0 !important;
  border-radius: 16px;
  color: var(--test-ink) !important;
  font-weight: 800;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tka-quiz-panel .topics .nav-link.active {
  background: #eaf3ff;
  color: var(--test-blue) !important;
  box-shadow: inset 4px 0 0 var(--test-blue), 0 10px 24px rgba(11,116,222,.1);
}

.tka-quiz-panel .topics .nav-link:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}

.tka-quiz-panel .link-box {
  display: inline-flex;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
}

.tka-subject-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tka-subject-copy strong {
  color: inherit;
  font-size: 15px;
  line-height: 1.25;
}

.tka-subject-copy small {
  color: var(--test-muted);
  font-size: 12px;
  font-weight: 800;
}

.tka-quiz-content {
  min-width: 0;
  background: #fff;
}

.tka-quiz-topic-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 30px 34px;
  border-bottom: 1px solid var(--test-line);
  background:
    radial-gradient(circle at 92% 18%, rgba(11,116,222,.08), transparent 30%),
    #fff;
}

.tka-quiz-topic-head h3 {
  margin: 0 0 8px;
  color: var(--test-ink);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  line-height: 1;
}

.tka-quiz-topic-head p {
  max-width: 760px;
  margin: 0;
  color: var(--test-muted);
  font-size: 16px;
  line-height: 1.65;
}

.tka-topic-count {
  display: grid;
  min-width: 120px;
  padding: 16px;
  border: 1px solid var(--test-line);
  border-radius: 18px;
  background: #f8fafc;
  text-align: center;
}

.tka-topic-count strong {
  color: var(--test-blue);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.tka-topic-count span {
  margin-top: 4px;
  color: var(--test-muted);
  font-size: 12px;
  font-weight: 800;
}

.tka-quiz-panel .topics-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 18px;
  padding: 28px 34px 36px !important;
}

.tka-quiz-panel .subject-list {
  margin-bottom: 0;
  padding: 0;
}

.tka-quiz-panel .subject-list a {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--test-line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,1)),
    radial-gradient(circle at 86% 16%, rgba(11,116,222,.1), transparent 28%);
  color: var(--test-ink) !important;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tka-quiz-panel .subject-list a:hover {
  transform: translateY(-4px);
  border-color: rgba(23,119,242,.35);
  box-shadow: 0 18px 38px rgba(15,23,42,.1);
}

.tka-quiz-panel .subject-list p {
  margin: 12px 0 16px;
  color: var(--test-ink);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.25;
}

.tka-test-card-kicker {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #075cab;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tka-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.tka-card-meta em {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.tka-quiz-panel .take_quiz_btn {
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15,23,42,.14);
}

.tka-empty-tests {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 34px;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
  text-align: center;
}

.tka-empty-tests strong {
  color: var(--test-ink);
  font-size: 20px;
  font-weight: 900;
}

.tka-empty-tests span {
  color: var(--test-muted);
  font-weight: 700;
}

@media (max-width: 1199px) {
  .tka-quiz-panel {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    padding: 24px !important;
  }
  .tka-quiz-topic-head {
    padding: 26px;
  }
}

@media (max-width: 991px) {
  .tka-test-nav {
    min-height: 68px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .tka-test-menu-toggle {
    display: inline-flex;
    flex-direction: column;
  }
  .tka-test-links {
    display: none;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--test-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15,23,42,.1);
  }
  .tka-test-links.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tka-test-links a,
  .tka-test-link,
  .tka-test-links .tka-test-cta {
    width: 100%;
    min-height: 44px;
    margin-left: 0;
    justify-content: center;
  }
  .tka-test-hero-grid,
  .tka-topic-grid,
  .tka-test-footer-grid {
    grid-template-columns: 1fr;
  }
  .tka-quiz-command {
    grid-template-columns: 1fr;
  }
  .tka-quiz-panel {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .tka-quiz-subjects {
    border-right: 1px solid var(--test-line);
    border-bottom: 0;
  }
  .tka-quiz-side-title {
    position: sticky;
  }
  .tka-quiz-panel .topics {
    position: sticky;
    display: flex;
    flex-direction: column !important;
    flex-wrap: nowrap;
    max-height: calc(100vh - 142px);
    overflow: auto;
    padding: 10px;
  }
  .tka-quiz-panel .topics .nav-link {
    min-height: 58px;
    margin-bottom: 6px;
    padding: 9px 10px;
  }
  .tka-quiz-panel .topics .nav-link.active {
    box-shadow: inset 4px 0 0 var(--test-blue), 0 10px 24px rgba(11,116,222,.1);
  }
  .tka-quiz-panel .link-box {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .tka-subject-copy strong {
    font-size: 13px;
  }
  .tka-subject-copy small {
    font-size: 11px;
  }
  .tka-quiz-topic-head {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .tka-topic-count {
    width: fit-content;
    min-width: 110px;
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
    padding: 18px !important;
  }
  .tka-quiz-panel .subject-list a {
    min-height: 168px;
    padding: 16px;
  }
  .tka-quiz-panel .subject-list p {
    font-size: 17px;
  }
}

@media (max-width: 767px) {
  .tka-quiz-panel {
    grid-template-columns: 1fr;
  }
  .tka-quiz-subjects {
    border-right: 0;
    border-bottom: 1px solid var(--test-line);
  }
  .tka-quiz-side-title {
    position: static;
  }
  .tka-quiz-panel .topics {
    position: static;
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    padding: 10px 14px 14px;
    scroll-snap-type: x mandatory;
  }
  .tka-quiz-panel .topics .nav-link {
    flex: 0 0 220px;
    margin-bottom: 0;
    scroll-snap-align: start;
  }
  .tka-quiz-panel .topics .nav-link.active {
    box-shadow: inset 0 -4px 0 var(--test-blue), 0 10px 24px rgba(11,116,222,.1);
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .tka-test-shell {
    width: min(100% - 20px, 1180px);
  }
  .tka-test-brand img {
    height: 30px;
  }
  .tka-test-brand small {
    display: none;
  }
  .tka-test-brand span {
    font-size: 16px;
  }
  .tka-test-links.is-open {
    grid-template-columns: 1fr;
  }
  .tka-test-hero {
    padding: 46px 0;
  }
  .tka-test-actions,
  .tka-test-stats {
    grid-template-columns: 1fr;
  }
  .tka-test-button {
    width: 100%;
  }
  .tka-quiz-flow-hero h1 {
    font-size: 34px;
  }
  .tka-quiz-flow-hero p {
    font-size: 16px;
  }
  .tka-quiz-command h2 {
    font-size: 26px;
  }
  .tka-quiz-panel {
    border-radius: 16px;
  }
  .tka-quiz-panel .topics .nav-link {
    flex: 0 0 205px;
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: 1fr;
    padding: 16px !important;
  }
  .tka-quiz-topic-head {
    padding: 20px;
  }
  .tka-quiz-topic-head h3 {
    font-size: 30px;
  }
  .tka-quiz-panel .subject-list a {
    min-height: 168px;
  }
}

/* Practice Studio: iOS-style white test finder */
.tka-quiz-flow-hero {
  padding: 54px 0 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(11,116,222,.08), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(20,184,166,.08), transparent 26%),
    linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.tka-quiz-flow-hero h1 {
  max-width: 900px;
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: -0.02em;
}

.tka-quiz-flow-hero p {
  max-width: 760px;
}

.tka-quiz-flow {
  padding: 34px 0 72px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.tka-quiz-command {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: center;
  margin-bottom: 18px;
}

.tka-quiz-command h2 {
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.03em;
}

.tka-studio-lead {
  max-width: 680px;
  margin: 10px 0 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.6;
}

.tka-quiz-search input {
  min-height: 58px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  font-size: 16px;
  box-shadow: 0 18px 48px rgba(15,23,42,.08);
}

.tka-quiz-panel {
  display: block;
  min-height: 0;
  border-radius: 28px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 28px 80px rgba(15,23,42,.09);
  backdrop-filter: blur(18px);
}

.tka-quiz-subjects {
  border-right: 0;
  border-bottom: 1px solid #e8eef7;
  background: rgba(255,255,255,.72);
}

.tka-quiz-side-title {
  position: static;
  padding: 20px 28px 10px;
  border-bottom: 0;
  background: transparent;
}

.tka-quiz-side-title strong {
  font-size: 15px;
}

.tka-quiz-panel .topics {
  position: static;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap;
  max-height: none;
  padding: 8px 24px 22px;
  overflow-x: auto;
  gap: 10px;
  scroll-snap-type: x mandatory;
}

.tka-quiz-panel .topics::-webkit-scrollbar {
  height: 8px;
}

.tka-quiz-panel .topics::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #dbe7f5;
}

.tka-quiz-panel .topics .nav-link {
  flex: 0 0 auto;
  min-height: 52px;
  max-width: 260px;
  margin: 0;
  padding: 9px 14px 9px 10px;
  border: 1px solid #e7edf6 !important;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
  scroll-snap-align: start;
}

.tka-quiz-panel .topics .nav-link.active {
  border-color: rgba(11,116,222,.28) !important;
  background: #f2f8ff;
  color: #075cab !important;
  box-shadow: 0 16px 38px rgba(11,116,222,.13);
}

.tka-quiz-panel .topics .nav-link:hover {
  transform: translateY(-1px);
}

.tka-quiz-panel .link-box {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 14px;
}

.tka-subject-copy strong {
  max-width: 164px;
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tka-subject-copy small {
  font-size: 11px;
}

.tka-studio-advisor {
  display: none;
}

.tka-quiz-content {
  background: transparent;
}

.tka-quiz-topic-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 34px 40px 28px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.tka-quiz-topic-head h3 {
  max-width: 820px;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.035em;
}

.tka-quiz-topic-head p {
  max-width: 700px;
}

.tka-topic-count {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15,23,42,.07);
}

.tka-quiz-panel .topics-list {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 20px;
  padding: 30px 40px 40px !important;
}

.tka-quiz-panel .subject-list a {
  min-height: 204px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15,23,42,.07);
}

.tka-quiz-panel .subject-list a:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(15,23,42,.11);
}

.tka-test-card-kicker {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tka-quiz-panel .subject-list p {
  display: -webkit-box;
  min-height: 56px;
  margin: 14px 0;
  overflow: hidden;
  font-size: 21px;
  letter-spacing: -0.015em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tka-card-meta em {
  background: #f3f6fa;
}

.tka-quiz-panel .take_quiz_btn {
  background: #0b74de !important;
  box-shadow: 0 14px 28px rgba(11,116,222,.2);
}

.tka-no-results {
  margin: 34px 40px 44px;
  padding: 38px;
  border: 1px solid #e7edf6;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
  text-align: center;
  box-shadow: 0 18px 44px rgba(15,23,42,.07);
}

.tka-no-results strong,
.tka-no-results span,
.tka-no-results a {
  display: block;
}

.tka-no-results strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
}

.tka-no-results span {
  margin-top: 8px;
  color: #64748b;
  font-weight: 700;
}

.tka-no-results a {
  width: fit-content;
  margin: 20px auto 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: #0b74de;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 1199px) {
  .tka-quiz-panel .topics-list {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 767px) {
  .tka-quiz-flow-hero {
    padding: 38px 0 18px;
  }
  .tka-quiz-command {
    grid-template-columns: 1fr;
  }
  .tka-studio-lead {
    font-size: 16px;
  }
  .tka-quiz-search input {
    min-height: 54px;
  }
  .tka-studio-guidance {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }
  .tka-studio-guidance a {
    width: 100%;
    text-align: center;
  }
  .tka-quiz-panel {
    border-radius: 22px;
  }
  .tka-quiz-side-title {
    padding: 18px 18px 8px;
  }
  .tka-quiz-panel .topics {
    padding: 8px 16px 18px;
  }
  .tka-quiz-panel .topics .nav-link {
    max-width: 230px;
  }
  .tka-quiz-topic-head {
    grid-template-columns: 1fr;
    padding: 26px 22px 22px;
  }
  .tka-quiz-topic-head h3 {
    font-size: 36px;
  }
  .tka-topic-count {
    display: none;
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: 1fr;
    padding: 20px !important;
  }
  .tka-quiz-panel .subject-list a {
    min-height: 178px;
  }
  .tka-no-results {
    margin: 22px 20px 28px;
    padding: 28px 20px;
  }
}

/* iPhone-simple mode: one calm screen, no extra banners */
.tka-quiz-flow {
  padding: 34px 0 58px;
  background: #f5f7fb;
}

.tka-quiz-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.tka-quiz-command .tka-kicker {
  margin-bottom: 8px;
  color: #0b74de;
  font-size: 12px;
  letter-spacing: .08em;
}

.tka-quiz-command h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.tka-studio-lead,
.tka-studio-guidance,
.tka-quiz-search span,
.tka-quiz-flow-hero {
  display: none !important;
}

.tka-quiz-search {
  margin: 0;
}

.tka-quiz-search input {
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px #e7edf6, 0 12px 28px rgba(15,23,42,.06);
}

.tka-quiz-search input:focus {
  box-shadow: inset 0 0 0 2px rgba(11,116,222,.35), 0 12px 28px rgba(15,23,42,.08);
}

.tka-quiz-panel {
  display: block;
  overflow: hidden;
  border: 1px solid #e7edf6;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,.06);
}

.tka-quiz-subjects {
  border: 0;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.tka-quiz-side-title {
  display: flex;
  position: static;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 8px;
  border: 0;
  background: #fff;
}

.tka-quiz-side-title strong {
  color: #111827;
  font-size: 15px;
}

.tka-quiz-side-title span {
  color: #6b7280;
  font-size: 12px;
}

.tka-quiz-panel .topics {
  position: static;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap;
  gap: 8px;
  max-height: none;
  padding: 8px 18px 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.tka-quiz-panel .topics .nav-link {
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 210px;
  margin: 0;
  padding: 7px 12px 7px 8px;
  border: 1px solid #e7edf6 !important;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  scroll-snap-align: start;
}

.tka-quiz-panel .topics .nav-link.active {
  border-color: rgba(11,116,222,.35) !important;
  background: #f3f8ff;
  color: #0b74de !important;
  box-shadow: none;
}

.tka-quiz-panel .topics .nav-link:hover {
  transform: none;
}

.tka-quiz-panel .link-box {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 12px;
}

.tka-subject-copy strong {
  max-width: 132px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tka-subject-copy small {
  font-size: 10px;
  line-height: 1.1;
}

.tka-quiz-topic-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.tka-quiz-topic-head .tka-kicker {
  margin-bottom: 8px;
  font-size: 11px;
}

.tka-quiz-topic-head h3 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.tka-quiz-topic-head p {
  display: none;
}

.tka-topic-count {
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f7f9fc;
  box-shadow: none;
}

.tka-topic-count strong {
  font-size: 24px;
}

.tka-topic-count span {
  font-size: 10px;
}

.tka-quiz-panel .topics-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 14px;
  padding: 22px 28px 30px !important;
}

.tka-quiz-panel .subject-list a {
  min-height: 164px;
  padding: 18px;
  border: 1px solid #e7edf6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.045);
}

.tka-quiz-panel .subject-list a:hover {
  transform: translateY(-1px);
  border-color: #cfe0f5;
  box-shadow: 0 14px 32px rgba(15,23,42,.07);
}

.tka-test-card-kicker {
  max-width: 100%;
  padding: 5px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3f8ff;
  color: #0b74de;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tka-quiz-panel .subject-list p {
  display: -webkit-box;
  min-height: 44px;
  margin: 12px 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tka-card-meta {
  margin-bottom: 12px;
}

.tka-card-meta em {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #64748b;
  font-size: 11px;
}

.tka-quiz-panel .take_quiz_btn {
  padding: 9px 14px;
  border-radius: 999px;
  background: #0b74de !important;
  color: #fff;
  font-size: 13px;
  box-shadow: none;
}

.tka-no-results {
  margin: 22px 28px 30px;
  padding: 26px 18px;
  border-radius: 18px;
  background: #f7f9fc;
  box-shadow: none;
}

.tka-no-results strong {
  font-size: 22px;
}

@media (max-width: 1199px) {
  .tka-quiz-panel .topics-list {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 767px) {
  .tka-quiz-flow {
    padding: 20px 0 38px;
  }
  .tka-quiz-command {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .tka-quiz-command h2 {
    font-size: 36px;
  }
  .tka-quiz-panel {
    border-radius: 20px;
  }
  .tka-quiz-side-title {
    padding: 16px 16px 8px;
  }
  .tka-quiz-panel .topics {
    padding: 8px 14px 14px;
  }
  .tka-quiz-topic-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 18px 16px;
  }
  .tka-topic-count {
    display: none;
  }
  .tka-quiz-panel .topics-list {
    grid-template-columns: 1fr;
    padding: 16px !important;
  }
  .tka-quiz-panel .subject-list a {
    min-height: 152px;
  }
}

/* Mobile iPhone polish */
html,
body {
  overflow-x: hidden;
}

.subject-list.is-disabled a {
  cursor: not-allowed;
  opacity: .64;
}

.subject-list.is-disabled .take_quiz_btn {
  background: #e5e7eb !important;
  color: #6b7280;
}

@media (max-width: 767px) {
  .tka-test-shell {
    width: min(100% - 28px, 1180px);
  }

  .tka-test-header {
    box-shadow: 0 8px 20px rgba(15,23,42,.05);
  }

  .tka-test-nav {
    min-height: 62px;
    padding: 8px 0;
    gap: 10px;
  }

  .tka-test-brand {
    gap: 10px;
  }

  .tka-test-brand img {
    height: 28px;
  }

  .tka-test-brand span {
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .tka-test-menu-toggle {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    justify-content: center;
    border-radius: 16px;
    gap: 4px;
    box-shadow: none;
  }

  .tka-test-menu-toggle span {
    width: 18px;
  }

  .tka-test-menu-toggle b {
    display: none;
  }

  .tka-test-links.is-open {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .tka-quiz-flow {
    padding: 18px 0 34px;
    background: #f5f7fb;
  }

  .tka-quiz-command {
    gap: 12px;
    margin-bottom: 14px;
  }

  .tka-quiz-command .tka-kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .tka-quiz-command h2 {
    font-size: 34px;
    font-weight: 850;
    letter-spacing: -0.035em;
  }

  .tka-quiz-search input {
    min-height: 50px;
    padding: 0 16px;
    border-radius: 17px;
    font-size: 15px;
    font-weight: 700;
  }

  .tka-quiz-panel {
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(15,23,42,.055);
  }

  .tka-quiz-side-title {
    padding: 16px 16px 6px;
  }

  .tka-quiz-side-title strong {
    font-size: 15px;
  }

  .tka-quiz-side-title span {
    font-size: 11px;
  }

  .tka-quiz-panel .topics {
    gap: 8px;
    padding: 8px 14px 12px;
  }

  .tka-quiz-panel .topics .nav-link {
    max-width: 190px;
    min-height: 42px;
    padding: 7px 10px 7px 7px;
    border-radius: 15px;
  }

  .tka-quiz-panel .link-box {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    font-size: 11px;
  }

  .tka-subject-copy strong {
    max-width: 112px;
    font-size: 12px;
    font-weight: 800;
  }

  .tka-subject-copy small {
    font-size: 10px;
  }

  .tka-quiz-topic-head {
    padding: 20px 18px 14px;
  }

  .tka-quiz-topic-head .tka-kicker {
    margin-bottom: 7px;
    font-size: 11px;
  }

  .tka-quiz-topic-head h3 {
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -0.035em;
  }

  .tka-quiz-panel .topics-list {
    gap: 12px;
    padding: 14px !important;
  }

  .tka-quiz-panel .subject-list a {
    min-height: 138px;
    padding: 15px;
    border-radius: 17px;
    box-shadow: 0 8px 20px rgba(15,23,42,.045);
  }

  .tka-test-card-kicker {
    padding: 5px 8px;
    font-size: 10px;
    letter-spacing: .06em;
  }

  .tka-quiz-panel .subject-list p {
    min-height: 40px;
    margin: 10px 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
  }

  .tka-card-meta {
    margin-bottom: 10px;
  }

  .tka-card-meta em {
    font-size: 11px;
  }

  .tka-quiz-panel .take_quiz_btn {
    padding: 8px 13px;
    font-size: 13px;
  }
}

/* Skill navigation: desktop wraps, mobile swipes */
@media (min-width: 768px) {
  .tka-quiz-panel .topics {
    display: flex;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding: 10px 24px 20px;
    scroll-snap-type: none;
  }

  .tka-quiz-panel .topics::-webkit-scrollbar {
    display: none;
  }

  .tka-quiz-panel .topics .nav-link {
    flex: 0 1 auto;
    width: auto;
    max-width: 245px;
    min-height: 44px;
    margin: 0;
  }

  .tka-subject-copy strong {
    max-width: 150px;
  }
}

@media (max-width: 767px) {
  .tka-quiz-panel .topics {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
}

/* Desktop skill prioritization */
@media (min-width: 768px) {
  .tka-quiz-subjects:not(.is-expanded):not(.is-searching) .topics .nav-link.is-extra-skill {
    display: none !important;
  }

  .tka-more-skills {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    margin: 0 24px 18px;
    padding: 8px 14px;
    border: 1px solid #dbe7f5;
    border-radius: 999px;
    background: #f7fbff;
    color: #0b74de;
    font-size: 13px;
    font-weight: 900;
  }

  .tka-more-skills:hover,
  .tka-more-skills:focus {
    background: #eef6ff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(11,116,222,.1);
  }
}

@media (max-width: 767px) {
  .tka-more-skills {
    display: none;
  }
}
