: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;
  }
}

/* Mobile card UX: compact horizontal rows instead of tall vertical cards */
@media (max-width: 767px) {
  .tka-quiz-panel .topics-list {
    gap: 8px;
    padding: 12px 14px 20px !important;
  }

  .tka-quiz-panel .subject-list a {
    min-height: unset;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
  }

  .tka-test-card-kicker {
    display: none;
  }

  .tka-quiz-panel .subject-list p {
    flex: 1;
    min-height: unset;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .tka-card-meta {
    display: none;
  }

  .tka-quiz-panel .take_quiz_btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(11,116,222,.22);
  }
}

/* Skill chip improvements: no count text, compact height, hide result label when idle */
.tka-subject-copy small {
  display: none;
}

.tka-quiz-side-title #tkaQuizResultCount:empty {
  display: none;
}

@media (min-width: 768px) {
  .tka-quiz-panel .topics .nav-link {
    min-height: 48px;
  }

  .tka-subject-copy strong {
    font-size: 13px;
  }
}

/* Full-width standalone search (heading removed) */
.tka-search-fullwidth {
  display: block;
  width: 100%;
  margin-bottom: 22px;
}

.tka-search-fullwidth input {
  min-height: 56px;
  font-size: 16px;
  padding: 0 22px;
}

/* Nav brand: logo + tagline only, no heading text */
.tka-test-brand span {
  font-size: 0; /* hide any residual text nodes */
}

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

/* Active chip: solid blue on desktop horizontal layout */
@media (min-width: 768px) {
  .tka-quiz-panel .topics .nav-link.active {
    background: #0b74de !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(11,116,222,.28) !important;
  }

  .tka-quiz-panel .topics .nav-link.active .link-box {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
  }

  .tka-quiz-panel .topics .nav-link.active .tka-subject-copy strong {
    color: #fff !important;
  }
}

/* ── Sticky footer ─────────────────────────────────────────────── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tka-test-main {
  flex: 1;
  min-height: unset;
}

/* ── Footer: simple single line ────────────────────────────────── */
.tka-test-footer {
  padding: 0;
  background: #08111f;
}

.tka-footer-simple {
  padding: 20px 0;
  text-align: center;
  color: #475569;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.tka-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.tka-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.tka-footer-logo img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.tka-footer-logo small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tka-footer-brand p {
  max-width: 270px;
  margin: 0 0 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.tka-footer-social {
  display: flex;
  gap: 10px;
}

.tka-social-btn {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff !important;
  font-size: 16px;
  text-decoration: none !important;
  transition: transform .15s ease, opacity .15s ease;
}

.tka-social-btn:hover {
  transform: translateY(-3px);
  opacity: .85;
}

.tka-social-insta { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.tka-social-yt    { background: #ff0000; }
.tka-social-li    { background: #0077b5; }
.tka-social-wa    { background: #25d366; }

.tka-footer-col h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tka-footer-col a {
  display: block;
  margin: 0 0 10px;
  color: #475569;
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease;
}

.tka-footer-col a:hover {
  color: #bfdbfe;
  text-decoration: none;
}

.tka-footer-bottom {
  margin-top: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  color: #334155;
  font-size: 13px;
}

@media (max-width: 767px) {
  .tka-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding-bottom: 32px;
  }

  .tka-footer-brand {
    grid-column: 1 / -1;
  }

  .tka-footer-brand p {
    max-width: 100%;
  }
}

/* ===== QUIZ MODAL UI REDESIGN ===== */

.tka-quiz-modal-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  margin-bottom: 4px;
  margin-top: 8px;
}
.tka-quiz-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 15px;
  margin-bottom: 0;
}
.tka-count-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 20px;
}
.tka-count-card {
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 10px;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s;
  background: #fff;
  user-select: none;
}
.tka-count-card:hover {
  border-color: #0b74de;
  box-shadow: 0 4px 16px rgba(11,116,222,.13);
}
.tka-count-card.is-selected,
.tka-count-card:has(input:checked) {
  border-color: #0b74de;
  background: #eef5ff;
  box-shadow: 0 4px 16px rgba(11,116,222,.18);
}
.tka-count-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: #0b74de;
  line-height: 1;
}
.tka-count-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 5px;
}
.tka-count-next-wrap { text-align: center; margin-top: 4px; }
.tka-quiz-brand-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
}
.tka-quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.tka-quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.tka-quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: #0b74de;
  border-radius: 999px;
  transition: width .3s ease;
}
.tka-quiz-progress-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.tka-quiz-topic-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.tka-q-text {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  line-height: 1.6;
}
.tka-q-num {
  color: #0b74de;
  font-weight: 800;
  margin-right: 3px;
}
.tka-q-text pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  overflow-x: auto;
  margin: 10px 0;
}
.tka-q-text code {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 13px;
}
.tka-q-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tka-choice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
  margin: 0;
  width: 100%;
}
.tka-choice-card:hover { border-color: #93c5fd; background: #f8fbff; }
.tka-choice-card.is-selected {
  border-color: #0b74de;
  background: #eef5ff;
  box-shadow: 0 2px 10px rgba(11,116,222,.13);
}
.tka-choice-alpha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.tka-choice-card.is-selected .tka-choice-alpha { background: #0b74de; color: #fff; }
.tka-choice-text { font-size: 15px; color: #334155; line-height: 1.5; }
.tka-quiz-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.tka-result-circle-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 20px auto 16px;
}
.tka-score-svg { width: 148px; height: 148px; transform: rotate(-90deg); }
.tka-score-bg  { fill: none; stroke: #e2e8f0; stroke-width: 10; }
.tka-score-ring {
  fill: none;
  stroke: #22c55e;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset .85s cubic-bezier(.4,0,.2,1), stroke .4s;
}
.tka-score-ring.is-fail { stroke: #ef4444; }
.tka-score-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-weight: 900;
  font-size: 2rem;
  color: #1e293b;
  line-height: 1;
}
.tka-score-den { font-size: 1rem; color: #64748b; font-weight: 600; }
.tka-result-grade { display: block; font-size: 1.1rem; font-weight: 700; text-align: center; margin: 4px 0 16px; }
.tka-grade-pass { color: #15803d; }
.tka-grade-avg  { color: #92400e; }
.tka-grade-fail { color: #b91c1c; }
.tka-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.tka-btn-primary {
  background: #0b74de;
  color: #fff !important;
  border: 2px solid #0b74de;
  border-radius: 999px;
  padding: 11px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.tka-btn-primary:hover { background: #0960c8; border-color: #0960c8; }
.tka-btn-secondary {
  background: transparent;
  color: #0b74de !important;
  border: 2px solid #0b74de;
  border-radius: 999px;
  padding: 9px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.tka-btn-secondary:hover { background: #eef5ff; }
.tka-quiz-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  margin: 14px 0 18px;
}
.tka-answer-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  text-align: left;
}
.tka-a-question { font-size: 15px; font-weight: 600; color: #1e293b; margin-bottom: 12px; line-height: 1.55; }
.tka-a-choices { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 7px; }
.tka-a-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
  color: #475569;
}
.tka-a-alpha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tka-a-ctext { line-height: 1.5; }
.tka-a-correct { border-color: #86efac; background: #f0fdf4; }
.tka-a-correct .tka-a-alpha { background: #22c55e; color: #fff; }
.tka-a-wrong { border-color: #fca5a5; background: #fef2f2; }
.tka-a-wrong .tka-a-alpha { background: #ef4444; color: #fff; }
.tka-a-verdict { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.tka-a-pass    { background: #dcfce7; color: #15803d; }
.tka-a-fail    { background: #fee2e2; color: #b91c1c; }
.tka-a-skipped { background: #fef9c3; color: #92400e; }
.tka-a-explanation {
  margin-top: 10px;
  padding: 11px 14px;
  background: #eff6ff;
  border-left: 3px solid #0b74de;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}
@media (max-width: 480px) {
  .tka-count-cards { gap: 8px; }
  .tka-count-card  { padding: 16px 8px; border-radius: 12px; }
  .tka-count-num   { font-size: 2rem; }
  .tka-choice-card { padding: 11px 13px; gap: 11px; }
  .tka-choice-text { font-size: 14px; }
  .tka-result-actions { flex-direction: column; align-items: center; }
  .tka-btn-primary, .tka-btn-secondary { width: 100%; max-width: 260px; text-align: center; }
}

/* ===== QUIZ HEADER (timer + progress + account) ===== */
.tka-quiz-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 18px;
  background: #fff;
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tka-quiz-timer-slot {
  flex-shrink: 0;
  min-width: 50px;
  font-size: 14px;
  font-weight: 700;
  color: #ef4444;
}
.tka-quiz-timer-slot:empty { min-width: 0; }
.tka-quiz-progress-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
/* override old .tka-quiz-progress-wrap if present */
.tka-quiz-progress-wrap { display: none !important; }
.tka-quiz-account {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tka-quiz-account a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  transition: background .15s, color .15s, border-color .15s;
}
.tka-quiz-account a:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* ===== CHOICE CARD ALIGNMENT FIX ===== */

/* Force label to behave as full-width flex row */
label.tka-choice-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 18px !important;
  gap: 16px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  cursor: pointer !important;
  user-select: none !important;
  margin: 0 !important;
  transition: border-color .15s, background .15s, box-shadow .15s !important;
  min-height: 52px !important;
}
label.tka-choice-card:hover {
  border-color: #93c5fd !important;
  background: #f8fbff !important;
}
label.tka-choice-card.is-selected {
  border-color: #0b74de !important;
  background: #eef5ff !important;
  box-shadow: 0 0 0 3px rgba(11,116,222,.12) !important;
}

/* Fixed-size, perfectly centered letter circle */
label.tka-choice-card .tka-choice-alpha {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  top: auto !important;
  transition: background .15s, color .15s !important;
}
label.tka-choice-card.is-selected .tka-choice-alpha {
  background: #0b74de !important;
  color: #fff !important;
}

/* Option text: flex-1, wraps naturally, vertically centered */
label.tka-choice-card .tka-choice-text {
  flex: 1 !important;
  min-width: 0 !important;
  font-size: 15px !important;
  color: #1e293b !important;
  line-height: 1.55 !important;
  word-break: break-word !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: center !important;
}

/* ===== PROGRESS BAR FIX ===== */
.tka-quiz-progress-bar {
  flex: 1 !important;
  height: 7px !important;
  background: #e2e8f0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  position: relative !important;
}
.tka-quiz-progress-fill {
  height: 100% !important;
  min-width: 4px !important;
  background: linear-gradient(90deg, #0b74de, #38bdf8) !important;
  border-radius: 999px !important;
  transition: width .35s ease !important;
  display: block !important;
}
.tka-quiz-progress-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #0b74de !important;
  white-space: nowrap !important;
  display: block !important;
}
.tka-quiz-progress-center {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-width: 0 !important;
}

/* ===== QUIZ HEADER PROGRESS BAR REDESIGN ===== */
.tka-quiz-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  margin-bottom: 20px !important;
  background: #fff !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  border-radius: 0 !important;
}

/* "Q 2 of 10" chip — left side */
.tka-quiz-q-label {
  flex-shrink: 0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0b74de !important;
  white-space: nowrap !important;
  letter-spacing: .02em !important;
  min-width: 64px !important;
}

/* bar — center, takes all remaining space */
.tka-quiz-bar-wrap {
  flex: 1 !important;
  min-width: 0 !important;
}
.tka-quiz-bar-track {
  width: 100% !important;
  height: 8px !important;
  background: #e2e8f0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  display: block !important;
}
.tka-quiz-bar-fill {
  height: 100% !important;
  width: 0% !important;
  min-width: 0 !important;
  background: linear-gradient(90deg, #0b74de 0%, #38bdf8 100%) !important;
  border-radius: 999px !important;
  transition: width .4s cubic-bezier(.4,0,.2,1) !important;
  display: block !important;
}

/* right side: timer + account icons */
.tka-quiz-header-right {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.tka-quiz-timer-text {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ef4444 !important;
}
.tka-quiz-account {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
}
.tka-quiz-account a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  text-decoration: none !important;
  transition: background .15s, color .15s !important;
}
.tka-quiz-account a:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

/* kill old progress styles */
.tka-quiz-progress-wrap,
.tka-quiz-progress-center,
.tka-quiz-progress-bar,
.tka-quiz-progress-fill,
.tka-quiz-progress-label,
.tka-quiz-timer-slot { display: none !important; }

@media (max-width: 480px) {
  .tka-quiz-q-label { min-width: 56px; font-size: 11px; }
  .tka-quiz-bar-track { height: 6px; }
  .tka-quiz-header { padding: 10px 12px; gap: 8px; }
}

/* ===== SMOOTH + STRONG CORNERS ===== */

/* Modal itself */
#take-quiz .modal-content {
  border-radius: 20px !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.18) !important;
}

/* Option cards */
label.tka-choice-card {
  border-radius: 16px !important;
}
label.tka-choice-card.is-selected {
  border-radius: 16px !important;
}

/* Letter circle — already 50%, keep */
label.tka-choice-card .tka-choice-alpha {
  border-radius: 50% !important;
}

/* Quiz topic heading divider — round pill */
.tka-quiz-topic-heading {
  border-bottom: none !important;
  background: #f1f5f9 !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  margin-bottom: 20px !important;
}

/* Quiz header — rounded bottom only when sticky */
.tka-quiz-header {
  border-radius: 0 0 14px 14px !important;
  border-bottom: none !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.06) !important;
}

/* Nav buttons */
.tka-quiz-nav .btn.quiz-btn,
.tka-quiz-nav .btn.quiz-btn-submit {
  border-radius: 12px !important;
  padding: 10px 24px !important;
  font-weight: 700 !important;
}

/* Next / Submit button */
a.qnext, a.qsubmit,
.btn.quiz-btn, .btn.quiz-btn-submit {
  border-radius: 12px !important;
}

/* Count cards */
.tka-count-card {
  border-radius: 20px !important;
}

/* Start Quiz button */
#countbtn {
  border-radius: 12px !important;
  padding: 12px 32px !important;
  font-weight: 700 !important;
}

/* Result action buttons */
.tka-btn-primary,
.tka-btn-secondary {
  border-radius: 14px !important;
}

/* Answer review cards */
.tka-answer-card {
  border-radius: 18px !important;
}
.tka-a-choice {
  border-radius: 12px !important;
}
.tka-a-explanation {
  border-radius: 0 12px 12px 0 !important;
}
.tka-a-verdict {
  border-radius: 10px !important;
}

/* Progress bar track — already 999px, reinforce */
.tka-quiz-bar-track {
  border-radius: 999px !important;
}
.tka-quiz-bar-fill {
  border-radius: 999px !important;
}

/* Account icon circles */
.tka-quiz-account a {
  border-radius: 50% !important;
}

/* ===== HOME PAGE REDESIGN ===== */

/* ── Hero v2 ── */
.tka-hero-v2 {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f5e9 100%);
  padding: 72px 0 64px;
  border-bottom: 1px solid #e2e8f0;
}
.tka-hero-v2-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}
.tka-hero-v2-left {
  flex: 1;
}
.tka-hero-v2-right {
  flex-shrink: 0;
  width: 320px;
}
.tka-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #bfdbfe;
  color: #0b74de;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.tka-hero-h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -.02em;
}
.tka-hero-accent {
  color: #0b74de;
  position: relative;
}
.tka-hero-sub {
  font-size: 17px;
  color: #475569;
  margin: 0 0 28px;
  line-height: 1.6;
}
.tka-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0b74de;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(11,116,222,.3);
  transition: background .2s, box-shadow .2s, transform .15s;
}
.tka-hero-cta:hover {
  background: #0960c8;
  box-shadow: 0 12px 32px rgba(11,116,222,.38);
  transform: translateY(-2px);
  color: #fff;
  text-decoration: none;
}

/* Hero stats panel */
.tka-hero-stats {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,.09);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tka-hero-stat {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
}
.tka-hero-stat:first-child { padding-top: 0; }
.tka-hero-stat:last-child  { padding-bottom: 0; }
.tka-hero-stat-divider {
  height: 1px;
  background: #f1f5f9;
}
.tka-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: #0b74de;
  line-height: 1;
  margin-bottom: 4px;
}
.tka-stat-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.tka-hero-scroll-hint {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 16px;
  letter-spacing: .04em;
}

/* ── Boards section ── */
.tka-boards-section {
  background: #f8fafc;
  padding: 64px 0 80px;
}
.tka-board-group {
  margin-bottom: 60px;
}
.tka-board-group:last-child { margin-bottom: 0; }

.tka-board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.tka-board-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.tka-board-period {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.tka-board-cta {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0b74de;
  text-decoration: none;
  padding: 8px 18px;
  border: 1.5px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tka-board-cta:hover { background: #eff6ff; color: #0b74de; text-decoration: none; }

/* ── Leader cards ── */
.tka-leader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tka-leader-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 22px 20px 18px;
  position: relative;
  transition: box-shadow .2s, transform .2s;
  overflow: hidden;
}
.tka-leader-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  transform: translateY(-3px);
}

/* Rank badge */
.tka-card-rank {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 12px;
}

/* Score */
.tka-card-score {
  font-size: 2rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 8px;
}
.tka-score-unit {
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 2px;
}

/* Name */
.tka-card-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Detail line */
.tka-card-detail {
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Subject tag */
.tka-card-subject {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0b74de;
  background: #eff6ff;
  border-radius: 6px;
  padding: 3px 10px;
  margin-bottom: 6px;
}

/* Batch info */
.tka-card-batch {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* ── Gold / Silver / Bronze ── */
.tka-rank-gold {
  border-color: #f59e0b !important;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%) !important;
  box-shadow: 0 4px 20px rgba(245,158,11,.15) !important;
}
.tka-rank-gold .tka-card-score { color: #92400e; }
.tka-rank-gold .tka-card-name  { color: #78350f; }

.tka-rank-silver {
  border-color: #94a3b8 !important;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%) !important;
  box-shadow: 0 4px 16px rgba(148,163,184,.15) !important;
}
.tka-rank-silver .tka-card-score { color: #334155; }

.tka-rank-bronze {
  border-color: #d97706 !important;
  background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%) !important;
  box-shadow: 0 4px 16px rgba(217,119,6,.12) !important;
}
.tka-rank-bronze .tka-card-score { color: #92400e; }

/* Gold accent stripe at top */
.tka-rank-gold::before,
.tka-rank-silver::before,
.tka-rank-bronze::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
}
.tka-rank-gold::before   { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tka-rank-silver::before { background: linear-gradient(90deg, #64748b, #94a3b8); }
.tka-rank-bronze::before { background: linear-gradient(90deg, #d97706, #f59e0b); }

/* ── Mobile responsive ── */
@media (max-width: 767px) {
  .tka-hero-v2 { padding: 44px 0 36px; }
  .tka-hero-v2-inner { flex-direction: column; gap: 32px; }
  .tka-hero-v2-right { width: 100%; }
  .tka-hero-stats { flex-direction: row; padding: 20px 16px; gap: 0; }
  .tka-hero-stat { flex: 1; align-items: center; padding: 0 8px; }
  .tka-hero-stat-divider { width: 1px; height: auto; align-self: stretch; }
  .tka-stat-num { font-size: 1.5rem; }
  .tka-hero-scroll-hint { display: none; }

  .tka-leader-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tka-board-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tka-board-cta { align-self: flex-start; }
  .tka-card-score { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .tka-leader-grid { grid-template-columns: 1fr; }
}

/* ===== MOBILE NAV FIX — hamburger right, dropdown menu ===== */

/* Always keep logo-left / toggle-right in one row */
.tka-test-nav {
  flex-direction: row !important;
  align-items: center !important;
  padding: 0 !important;
  min-height: 64px !important;
  position: relative !important;
}

/* Hamburger button — right side, styled */
.tka-test-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  order: 10;
}
.tka-test-menu-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
/* The 3 span bars */
.tka-test-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #1e293b;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
/* Hide the old <b>Menu</b> text */
.tka-test-menu-toggle b {
  display: none !important;
}
/* Animate to X when open */
.tka-test-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.tka-test-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.tka-test-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop: nav links visible, hamburger hidden */
@media (min-width: 768px) {
  .tka-test-menu-toggle { display: none !important; }
  .tka-test-links {
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
  }
}

/* Mobile: hamburger visible, nav hidden by default */
@media (max-width: 767px) {
  .tka-test-menu-toggle {
    display: flex !important;
  }
  .tka-test-links {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 12px 8px !important;
    box-shadow: 0 16px 40px rgba(0,0,0,.13) !important;
    z-index: 2000 !important;
    gap: 2px !important;
  }
  .tka-test-links.is-open {
    display: flex !important;
  }
  .tka-test-links a {
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    display: block !important;
    transition: background .15s !important;
  }
  .tka-test-links a:hover,
  .tka-test-links a.is-active {
    background: #f1f5f9 !important;
    color: #0b74de !important;
  }
  .tka-test-links .tka-test-cta {
    background: #0b74de !important;
    color: #fff !important;
    text-align: center !important;
    margin-top: 6px !important;
    border-radius: 10px !important;
  }
  .tka-test-links .tka-test-cta:hover {
    background: #0960c8 !important;
    color: #fff !important;
  }
}

/* ===== PRACTICE PAGE ===== */

.tka-practice-breadcrumb {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}
.tka-breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}
.tka-breadcrumb-list li + li::before {
  content: '›';
  margin-right: 6px;
  color: #94a3b8;
}
.tka-breadcrumb-list a {
  color: #64748b;
  text-decoration: none;
}
.tka-breadcrumb-list a:hover { color: #0b74de; }

.tka-practice-hero {
  padding: 52px 0 40px;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 60%, #f0fdf4 100%);
  border-bottom: 1px solid #e2e8f0;
}
.tka-practice-h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.12;
  margin: 8px 0 14px;
  letter-spacing: -.02em;
}
.tka-practice-intro {
  max-width: 760px;
  font-size: 16px;
  color: #475569;
  line-height: 1.7;
  margin: 0 0 22px;
}
.tka-practice-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #475569;
}
.tka-pstat strong { color: #0b74de; font-weight: 800; }
.tka-pstat-divider { color: #cbd5e1; }

.tka-practice-topics {
  padding: 48px 0 40px;
  background: #fff;
}
.tka-practice-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 24px;
}
.tka-practice-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
.tka-practice-card {
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s !important;
}
.tka-practice-card:hover {
  transform: translateY(-4px) !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 12px 32px rgba(11,116,222,.12) !important;
  text-decoration: none !important;
  color: var(--test-ink) !important;
}

.tka-practice-faq {
  padding: 48px 0 40px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
.tka-faq-list {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tka-faq-item {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}
.tka-faq-item[open] { border-color: #bfdbfe; }
.tka-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.tka-faq-q::-webkit-details-marker { display: none; }
.tka-faq-q::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: #94a3b8;
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform .2s;
}
.tka-faq-item[open] .tka-faq-q::after {
  content: '−';
}
.tka-faq-a {
  padding: 0 20px 16px;
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.tka-practice-cta-strip {
  background: #0b74de;
  padding: 32px 0;
}
.tka-practice-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tka-practice-cta-inner strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}
.tka-practice-cta-inner span { color: #bfdbfe; font-size: 14px; }
.tka-practice-cta-inner .tka-hero-cta {
  background: #fff !important;
  color: #0b74de !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  flex-shrink: 0;
}
.tka-practice-cta-inner .tka-hero-cta:hover {
  background: #f0f7ff !important;
}

@media (max-width: 767px) {
  .tka-practice-hero { padding: 36px 0 28px; }
  .tka-practice-grid { grid-template-columns: 1fr 1fr !important; }
  .tka-practice-cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .tka-practice-grid { grid-template-columns: 1fr !important; }
}

/* ===== LEADER CARD COMPACT + FIXES ===== */

/* Score + unit on ONE line — original CSS forces span { display:block } */
.tka-score-unit {
  display: inline !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-left: 2px !important;
  vertical-align: baseline !important;
}
.tka-card-score {
  display: flex !important;
  align-items: baseline !important;
  gap: 2px !important;
  font-size: 1.7rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
}

/* Compact card */
.tka-leader-card {
  padding: 14px 16px 12px !important;
  border-radius: 14px !important;
}
.tka-leader-grid {
  gap: 12px !important;
}
.tka-card-rank {
  font-size: 1.3rem !important;
  margin-bottom: 6px !important;
}
.tka-card-name {
  font-size: 14px !important;
  margin-bottom: 4px !important;
}
.tka-card-detail {
  font-size: 12px !important;
  margin-bottom: 6px !important;
}
.tka-card-subject {
  font-size: 10px !important;
  padding: 2px 8px !important;
  margin-bottom: 4px !important;
}
.tka-card-batch {
  font-size: 11px !important;
  margin-top: 2px !important;
}

/* Boards section tighter */
.tka-boards-section {
  padding: 40px 0 56px !important;
}
.tka-board-group {
  margin-bottom: 40px !important;
}
.tka-board-header {
  margin-bottom: 16px !important;
}

/* Logo bigger */
.tka-test-brand img {
  height: 50px !important;
  width: auto !important;
}
@media (max-width: 575px) {
  .tka-test-brand img { height: 42px !important; }
}
