/* IQ test UI adapted from 8tp/iq-test (MIT) https://github.com/8tp/iq-test */

.iqtest-app {
  --primary: var(--dica-action, #1B4F9C);
  --primary-light: var(--dica-action-hover, #244a86);
  --accent: #4f7ad1;
  --bg: var(--dica-surface-soft, #f7f8fa);
  --card: var(--dica-surface, #fff);
  --text: var(--dica-ink, #0f172a);
  --text-light: var(--dica-body, #475467);
  --border: var(--dica-border, #e4e7ec);
  --success: #17803d;
  --danger: #c2410c;
  --warning: #b45309;
  --radius: 12px;
  margin: 0 0 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 12px 32px var(--dica-shadow, rgba(15, 23, 42, 0.08));
  overflow: hidden;
  font-family: inherit;
  line-height: 1.55;
  scroll-margin-top: 80px;
}

html[data-theme="dark"] .iqtest-app {
  --accent: #7aa2f7;
  --success: #4ade80;
  --danger: #f87171;
  --warning: #fbbf24;
}

.iqtest-app .iq-pad {
  padding: 22px 22px 26px;
}

.iqtest-intro {
  margin: 0 0 14px;
  color: var(--dica-body, #334155);
}

.iqtest-intro strong {
  color: var(--dica-ink, #0f172a);
}

.iqtest-app button {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.iqtest-app .intro-card h2,
.iqtest-app .results-details h3 {
  border: 0;
  padding: 0;
  background: none;
}

.iqtest-app .btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.iqtest-app .option-btn,
.iqtest-app .btn-nav,
.iqtest-app .q-dot,
.iqtest-app .matrix-cell,
.iqtest-app .sequence-cell {
  background: var(--card);
}

.iqtest-app .option-btn:hover {
  background: var(--bg);
}

.iqtest-app .option-btn.selected {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
}

.iqtest-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.iqtest-modal-card {
  background: var(--dica-surface, #fff);
  color: var(--dica-ink, #0f172a);
  border-radius: 12px;
  padding: 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

html[data-theme="dark"] .iqtest-modal-card {
  background: #1b2130;
  color: #e8eaf0;
}

@media (max-width: 768px) {
  .iqtest-app .iq-pad { padding: 16px; }
  .iqtest-app .container { padding: 0; }
}

.iqtest-app,
.iqtest-app *,
.iqtest-app *::before,
.iqtest-app *::after{ box-sizing: border-box; }
.iqtest-app .iq-text-stem {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 20px 0;
  text-align: center;
  color: var(--primary);
  letter-spacing: 0.2px;
  line-height: 1.45;
}
.iqtest-app .intro-card,
.iqtest-app .question-card,
.iqtest-app .results-card {
  margin-top: 0;
  box-shadow: none;
}
html[data-theme="dark"] .iqtest-app .disclaimer {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
}
.iqtest-app /* HEADER */
.header{
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 24px 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(44,62,122,0.3);
}.iqtest-app .header h1{ font-size: 1.8rem; font-weight: 700; letter-spacing: 0.5px; }.iqtest-app .header p{ opacity: 0.85; font-size: 0.95rem; margin-top: 4px; }.iqtest-app /* SCREENS */
.screen{ display: none; }.iqtest-app .screen.active{ display: block; }.iqtest-app /* INTRO */
.intro-card{
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  margin-top: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}.iqtest-app .intro-card h2{ font-size: 1.5rem; margin-bottom: 16px; color: var(--primary); }.iqtest-app .intro-card p{ margin-bottom: 12px; color: var(--text-light); }.iqtest-app .intro-card ul{ margin: 12px 0 20px 20px; color: var(--text-light); }.iqtest-app .intro-card li{ margin-bottom: 6px; }.iqtest-app .category-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}.iqtest-app .cat-item{
  background: var(--bg);
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
}.iqtest-app .cat-item strong{ display: block; font-size: 0.95rem; color: var(--primary); }.iqtest-app .cat-item span{ font-size: 0.82rem; color: var(--text-light); }.iqtest-app .btn{
  display: inline-block;
  padding: 14px 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}.iqtest-app .btn:hover{ background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(44,62,122,0.3); }.iqtest-app .btn:disabled{ opacity: 0.5; cursor: not-allowed; transform: none; }.iqtest-app .btn-start{ margin-top: 20px; }.iqtest-app .disclaimer{
  margin-top: 20px;
  padding: 14px;
  background: #fff8e1;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #856404;
  border: 1px solid #ffeeba;
}.iqtest-app /* TEST SCREEN */
.test-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}.iqtest-app .progress-info{ font-size: 0.9rem; color: var(--text-light); }.iqtest-app .progress-info .cat-label{
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 8px;
}.iqtest-app .timer{
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}.iqtest-app .timer.warning{ color: var(--warning); }.iqtest-app .timer.danger{ color: var(--danger); animation: iq-pulse 1s ease-in-out infinite; }@keyframes iq-pulse{ 50% { opacity: 0.6; } }.iqtest-app .progress-bar{
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}.iqtest-app .progress-fill{
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 3px;
  transition: width 0.3s ease;
}.iqtest-app .question-card{
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  min-height: 400px;
}.iqtest-app .question-text{
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text);
}.iqtest-app /* MATRIX GRID */
.matrix-container{ display: flex; flex-direction: column; align-items: center; gap: 24px; }.iqtest-app .matrix-grid{
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  background: var(--text);
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
}.iqtest-app .matrix-cell{
  width: 110px;
  height: 110px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}.iqtest-app .matrix-cell.missing{
  background: #eef1fb;
  position: relative;
}.iqtest-app .matrix-cell.missing::after{
  content: '?';
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}.iqtest-app .matrix-cell svg{ width: 90px; height: 90px; }.iqtest-app /* SEQUENCE ROW */
.sequence-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}.iqtest-app .sequence-cell{
  width: 80px;
  height: 80px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}.iqtest-app .sequence-cell svg{ width: 60px; height: 60px; }.iqtest-app .sequence-arrow{
  font-size: 1.5rem;
  color: var(--text-light);
  margin: 0 2px;
}.iqtest-app .sequence-cell.missing{
  background: #eef1fb;
  border-color: var(--accent);
  border-style: dashed;
  position: relative;
}.iqtest-app .sequence-cell.missing::after{
  content: '?';
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}.iqtest-app /* ANSWER OPTIONS */
.options-label{ font-size: 0.85rem; color: var(--text-light); margin: 20px 0 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }.iqtest-app .options-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}.iqtest-app .options-grid.text-options{
  grid-template-columns: 1fr;
  max-width: 500px;
}.iqtest-app .option-btn{
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  position: relative;
}.iqtest-app .option-btn:hover{ border-color: var(--accent); background: #f8f9ff; }.iqtest-app .option-btn.selected{ border-color: var(--primary); background: #eef1fb; box-shadow: 0 0 0 1px var(--primary); }.iqtest-app .option-btn svg{ width: 60px; height: 60px; }.iqtest-app .option-btn .option-letter{
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
}.iqtest-app .option-btn.text-opt{
  justify-content: flex-start;
  padding: 12px 16px;
  min-height: auto;
  font-size: 1rem;
}.iqtest-app .option-btn.text-opt .option-letter{ position: static; margin-right: 12px; font-size: 0.85rem; color: var(--primary); }.iqtest-app /* NAV */
.test-nav{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}.iqtest-app .btn-nav{
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
}.iqtest-app .btn-nav:hover{ border-color: var(--primary); color: var(--primary); }.iqtest-app .btn-nav.primary{ background: var(--primary); color: white; border-color: var(--primary); }.iqtest-app .btn-nav.primary:hover{ background: var(--primary-light); }.iqtest-app .question-dots{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}.iqtest-app .question-dots-scroll{
  display: none;
}.iqtest-app .q-dot{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all 0.15s;
}.iqtest-app .q-dot:hover{ border-color: var(--accent); }.iqtest-app .q-dot.current{ border-color: var(--primary); background: var(--primary); color: white; }.iqtest-app .q-dot.answered{ background: var(--accent); border-color: var(--accent); color: white; }.iqtest-app .q-dot.skipped{ border-color: var(--danger); background: white; color: var(--danger); }.iqtest-app /* RESULTS */
.results-card{
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  margin-top: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
}.iqtest-app .iq-score{
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 16px 0 4px;
}.iqtest-app .iq-label{ font-size: 1rem; color: var(--text-light); margin-bottom: 4px; }.iqtest-app .iq-range{ font-size: 0.85rem; color: var(--text-light); }.iqtest-app .iq-percentile{
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-top: 8px;
}.iqtest-app .bell-curve-container{ margin: 30px 0; }.iqtest-app .bell-curve-container svg{ max-width: 100%; }.iqtest-app .category-results{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 30px 0;
  text-align: left;
}.iqtest-app .cat-result{
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
}.iqtest-app .cat-result-name{ font-weight: 600; font-size: 0.9rem; color: var(--primary); margin-bottom: 8px; }.iqtest-app .cat-result-bar{
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}.iqtest-app .cat-result-fill{
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}.iqtest-app .cat-result-score{ font-size: 0.82rem; color: var(--text-light); }.iqtest-app .results-details{
  margin-top: 24px;
  text-align: left;
}.iqtest-app .results-details h3{ font-size: 1.1rem; color: var(--primary); margin-bottom: 12px; }.iqtest-app .results-table{
  width: 100%;
  border-collapse: collapse;
}.iqtest-app .results-table th,
.iqtest-app .results-table td{
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}.iqtest-app .results-table th{ font-weight: 600; color: var(--text-light); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }.iqtest-app .correct-mark{ color: var(--success); font-weight: 700; }.iqtest-app .wrong-mark{ color: var(--danger); font-weight: 700; }.iqtest-app /* TABLET */
@media (max-width: 768px){
  .container { padding: 14px; }
  .intro-card, .question-card, .results-card { padding: 24px; }
  .matrix-cell { width: 95px; height: 95px; }
  .matrix-cell svg { width: 78px; height: 78px; }
  .options-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sequence-row { gap: 6px; }
  .sequence-cell { width: 70px; height: 70px; }
  .sequence-cell svg { width: 52px; height: 52px; }
}.iqtest-app /* MOBILE */
@media (max-width: 480px){
  .header { padding: 16px 0; }
  .header h1 { font-size: 1.3rem; }
  .header p { font-size: 0.82rem; }
  .container { padding: 10px; }
  .intro-card, .question-card, .results-card { padding: 16px; }
  .intro-card h2 { font-size: 1.2rem; }
  .category-grid { grid-template-columns: 1fr; gap: 8px; }
  .cat-item { padding: 10px 12px; }
  .btn-start { width: 100%; padding: 16px; font-size: 1.1rem; }

  /* Test header */
  .test-header { padding: 10px 0; margin-bottom: 12px; }
  .progress-info { font-size: 0.82rem; }
  .progress-info .cat-label { font-size: 0.7rem; padding: 2px 8px; }
  .timer { font-size: 1rem; }

  /* Question card */
  .question-card { padding: 16px; min-height: auto; }
  .question-text { font-size: 0.95rem; margin-bottom: 16px; }

  /* Matrix grid - scale to fit mobile */
  .matrix-grid { gap: 3px; padding: 3px; }
  .matrix-cell { width: calc((100% - 12px) / 3); height: auto; aspect-ratio: 1; max-width: 100px; max-height: 100px; }
  .matrix-cell svg { width: 85%; height: 85%; }
  .matrix-cell.missing::after { font-size: 2rem; }

  /* Sequence row */
  .sequence-row { gap: 3px; }
  .sequence-cell { width: 52px; height: 52px; }
  .sequence-cell svg { width: 40px; height: 40px; }
  .sequence-arrow { display: none; }
  .sequence-cell.missing::after { font-size: 1.3rem; }

  /* Options */
  .options-label { margin: 14px 0 8px; font-size: 0.78rem; }
  .options-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .option-btn { min-height: 56px; padding: 8px; border-radius: 6px; }
  .option-btn svg { width: 44px; height: 44px; }
  .option-btn .option-letter { top: 4px; left: 6px; font-size: 0.65rem; }
  .options-grid.text-options { grid-template-columns: 1fr; }
  .option-btn.text-opt { padding: 12px 14px; font-size: 0.9rem; min-height: auto; }
  .option-btn.text-opt .option-letter { font-size: 0.8rem; }

  /* Number sequence display */
  .question-card div[style*="font-size:1.3rem"] { font-size: 1.1rem !important; }

  /* Navigation */
  .test-nav { margin-top: 16px; padding-top: 12px; flex-wrap: wrap; gap: 10px; }
  .btn-nav { padding: 12px 24px; font-size: 0.9rem; }
  .question-dots { display: none; }
  .question-dots-scroll {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 10px 0 6px;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  }
  .question-dots-scroll::-webkit-scrollbar { display: none; }
  .question-dots-scroll .q-dot { flex-shrink: 0; width: 36px; height: 36px; font-size: 0.75rem; }

  /* Results */
  .iq-score { font-size: 3.2rem; }
  .iq-label { font-size: 0.9rem; }
  .iq-range { font-size: 0.78rem; }
  .iq-percentile { font-size: 0.95rem; }
  .category-results { grid-template-columns: 1fr; gap: 10px; }
  .results-table th, .results-table td { padding: 8px 6px; font-size: 0.78rem; }
  .results-table th { font-size: 0.7rem; }
  .disclaimer { font-size: 0.75rem; padding: 10px; }
}.iqtest-app /* Very small phones */
@media (max-width: 360px){
  .matrix-cell { width: calc((100% - 10px) / 3); height: auto; aspect-ratio: 1; }
  .sequence-cell { width: 44px; height: 44px; }
  .sequence-cell svg { width: 34px; height: 34px; }
  .options-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .option-btn { min-height: 56px; padding: 8px; }
  .option-btn svg { width: 40px; height: 40px; }
  .question-dots-scroll .q-dot { width: 32px; height: 32px; font-size: 0.7rem; }
  .iq-score { font-size: 2.8rem; }
}.iqtest-app /* Prevent horizontal scroll and ensure touch targets */
@media (max-width: 480px){
  .iqtest-app button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .option-btn { min-height: 48px; } /* iOS accessibility minimum */
}

@media (max-width: 768px) {
  .iqtest-app .intro-card,
  .iqtest-app .question-card,
  .iqtest-app .results-card { padding: 20px; }
  .iqtest-app .matrix-cell { width: 90px; height: 90px; }
  .iqtest-app .matrix-cell svg { width: 74px; height: 74px; }
  .iqtest-app .sequence-cell { width: 64px; height: 64px; }
}

@media (max-width: 480px) {
  .iqtest-app .intro-card,
  .iqtest-app .question-card,
  .iqtest-app .results-card { padding: 14px; }
  .iqtest-app .category-grid { grid-template-columns: 1fr; }
  .iqtest-app .btn-start { width: 100%; }
  .iqtest-app .question-card { min-height: 0; }
  .iqtest-app .matrix-grid {
    gap: 3px;
    padding: 3px;
    width: min(100%, 300px);
    grid-template-columns: repeat(3, 1fr);
  }
  .iqtest-app .matrix-cell {
    width: auto;
    height: auto;
    aspect-ratio: 1;
    max-width: none;
    max-height: none;
  }
  .iqtest-app .matrix-cell svg { width: 85%; height: 85%; }
  .iqtest-app .sequence-cell { width: 48px; height: 48px; }
  .iqtest-app .sequence-cell svg { width: 36px; height: 36px; }
  .iqtest-app .sequence-arrow { display: none; }
  .iqtest-app .options-grid { gap: 6px; }
  .iqtest-app .option-btn { min-height: 52px; padding: 8px; }
  .iqtest-app .option-btn svg { width: 42px; height: 42px; }
  .iqtest-app .question-dots { display: none; }
  .iqtest-app .question-dots-scroll {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 10px 0 6px;
  }
  .iqtest-app .question-dots-scroll .q-dot { flex-shrink: 0; width: 36px; height: 36px; }
  .iqtest-app .test-nav { flex-wrap: wrap; gap: 10px; }
  .iqtest-app .iq-score { font-size: 3rem; }
  .iqtest-app .category-results { grid-template-columns: 1fr; }
}

/* —— Test stage (layout matching the quiz mockup) —— */
#iq-test-screen {
  --iq-ink: #1c274c;
  --iq-line: #dbe0ee;
  --iq-soft: #eef1fb;
  --iq-accent: #4f46e5;
  --iq-navy: #1e2a4a;
}
#iq-test-screen.active {
  display: block;
  padding: 0;
}
.iqtest-app:has(#iq-test-screen.active) {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
#iq-test-screen .iq-stage {
  position: relative;
  background: var(--card, #fff);
  border: 1px solid var(--iq-line);
  border-radius: 22px;
  padding: 22px 24px 20px;
  box-shadow: 0 18px 40px rgba(28, 39, 76, 0.08);
  overflow: hidden;
  scroll-margin-top: 80px;
}
#iq-test-screen .iq-stage::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 52px;
  background: var(--iq-accent);
  border-radius: 0 22px 0 14px;
}

#iq-test-screen .iq-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
}
#iq-test-screen .iq-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#iq-test-screen .iq-pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--iq-line);
  background: #fff;
  color: var(--iq-ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
#iq-test-screen .iq-pill-cat {
  background: #eef0ff;
  border-color: transparent;
  color: var(--iq-accent);
  font-weight: 700;
}
#iq-test-screen .iq-timer-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--iq-line);
  border-radius: 14px;
  background: #f7f8fc;
  color: var(--iq-ink);
  min-width: 148px;
}
#iq-test-screen .iq-timer-icon {
  flex: none;
  color: var(--iq-accent);
}
#iq-test-screen .timer {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--iq-ink);
  font-variant-numeric: tabular-nums;
}
#iq-test-screen .iq-timer-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7390;
  margin-top: 1px;
}
#iq-test-screen .iq-timer-card:has(.timer.warning) {
  background: #fff8e8;
  border-color: #f3d9a0;
}
#iq-test-screen .timer.warning { color: #b45309; }
#iq-test-screen .iq-timer-card:has(.timer.danger) {
  background: #fff1f0;
  border-color: #f3c0bb;
}
#iq-test-screen .timer.danger { color: #c2410c; animation: iq-pulse 1s ease-in-out infinite; }

#iq-test-screen .iq-progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
#iq-test-screen #iq-progress-pct,
#iq-test-screen #iq-q-frac {
  font-size: 0.78rem;
  font-weight: 650;
  color: #6b7390;
  white-space: nowrap;
}
#iq-test-screen .progress-bar {
  height: 6px;
  margin: 0;
  background: #e8ebf6;
  border-radius: 99px;
}
#iq-test-screen .progress-fill {
  background: var(--iq-accent);
  border-radius: 99px;
}

#iq-test-screen .question-card {
  background: #fff;
  border: 1px solid var(--iq-line);
  border-radius: 16px;
  padding: 22px 24px;
  min-height: 0;
  margin-bottom: 18px;
}
#iq-test-screen .iq-prompt-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
#iq-test-screen .iq-prompt-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 16rem;
  min-width: 0;
  justify-self: start;
}
#iq-test-screen .question-text {
  overflow-wrap: normal;
  word-break: normal;
}
#iq-test-screen .iq-prompt-row.is-text {
  grid-template-columns: 1fr;
  gap: 10px;
}
#iq-test-screen .iq-prompt-row.is-text .iq-prompt-side {
  max-width: none;
  width: 100%;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
#iq-test-screen .iq-prompt-row.is-text .question-text {
  flex: 1;
  min-width: 0;
}
#iq-test-screen .iq-prompt-row.is-text .iq-prompt-visual {
  width: 100%;
  justify-self: stretch;
  justify-content: flex-start;
}
#iq-test-screen .iq-prompt-row.is-text .iq-text-stem {
  text-align: left;
  max-width: none;
}
#iq-test-screen .iq-prompt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef0ff;
  color: var(--iq-accent);
}
#iq-test-screen .question-text {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--iq-ink);
}
#iq-test-screen .iq-prompt-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  justify-self: center;
}
#iq-test-screen .iq-text-stem {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--iq-ink);
  text-align: left;
  letter-spacing: 0;
  line-height: 1.45;
}

#iq-test-screen .matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  gap: 0;
  background: #fff;
  padding: 0;
  border: 1.5px solid var(--iq-navy);
  border-radius: 10px;
  overflow: hidden;
  width: max-content;
  max-width: 100%;
}
#iq-test-screen .matrix-cell {
  width: 84px;
  height: 84px;
  background: #fff;
  border-right: 1.5px solid var(--iq-navy);
  border-bottom: 1.5px solid var(--iq-navy);
}
#iq-test-screen .matrix-cell:nth-child(3n) { border-right: 0; }
#iq-test-screen .matrix-cell:nth-child(n + 7) { border-bottom: 0; }
#iq-test-screen .matrix-cell svg { width: 58px; height: 58px; }
#iq-test-screen .matrix-cell.missing {
  background: #eef0ff;
}
#iq-test-screen .matrix-cell.missing::after {
  font-size: 1.8rem;
  color: var(--iq-accent);
}

#iq-test-screen .sequence-row { gap: 8px; }
#iq-test-screen .sequence-cell {
  width: 72px;
  height: 72px;
  border: 1.5px solid var(--iq-navy);
  border-radius: 10px;
}
#iq-test-screen .sequence-cell.missing {
  background: #eef0ff;
  border-color: var(--iq-accent);
}

#iq-test-screen .options-label {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  color: var(--iq-ink);
}
#iq-test-screen .options-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
#iq-test-screen .options-grid.text-options {
  grid-template-columns: 1fr 1fr;
  max-width: none;
}
#iq-test-screen .option-btn {
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 10px 8px 12px;
  border: 1px solid var(--iq-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(28, 39, 76, 0.04);
}
#iq-test-screen .option-btn .option-letter {
  position: static;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7390;
  line-height: 1;
}
#iq-test-screen .option-btn svg { width: 54px; height: 54px; }
#iq-test-screen .option-btn:hover {
  border-color: #c5cbf0;
  background: #fafbff;
  transform: translateY(-1px);
}
#iq-test-screen .option-btn.selected {
  border-color: var(--iq-accent);
  background: #eef0ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}
#iq-test-screen .option-btn.selected .option-letter { color: var(--iq-accent); }
#iq-test-screen .option-btn:focus-visible {
  outline: 2px solid var(--iq-accent);
  outline-offset: 2px;
}
#iq-test-screen .option-btn.text-opt {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--iq-ink);
}
#iq-test-screen .option-btn.text-opt .option-letter {
  min-width: 1.2em;
  margin-right: 8px;
  color: var(--iq-accent);
}

#iq-test-screen .test-nav {
  margin-top: 20px;
  padding-top: 4px;
  border: 0;
  gap: 12px;
}
#iq-test-screen .btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--iq-line);
  border-radius: 12px;
  background: #fff;
  color: var(--iq-ink);
  font-weight: 700;
}
#iq-test-screen .btn-nav.primary {
  background: var(--iq-accent);
  border-color: var(--iq-accent);
  color: #fff;
  padding: 12px 22px;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
#iq-test-screen .btn-nav.primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}
#iq-test-screen .btn-nav:hover {
  border-color: #c5cbf0;
  color: var(--iq-ink);
}
#iq-test-screen .btn-nav:disabled {
  opacity: 0.4;
}
#iq-test-screen .iq-autosave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  flex: 1;
  font-size: 0.8rem;
  font-weight: 550;
  color: #8b93ab;
  text-align: center;
}
#iq-test-screen .iq-autosave svg { flex: none; opacity: 0.85; }
#iq-test-screen .question-dots { display: none; }
#iq-test-screen .iq-nav-arrow { font-weight: 400; }

html[data-theme="dark"] #iq-test-screen {
  --iq-ink: #e8eaf0;
  --iq-line: #334155;
  --iq-soft: #1b2130;
  --iq-navy: #94a3b8;
}
html[data-theme="dark"] .iqtest-app:has(#iq-test-screen.active) {
  background: transparent;
}
html[data-theme="dark"] #iq-test-screen .iq-stage,
html[data-theme="dark"] #iq-test-screen .question-card,
html[data-theme="dark"] #iq-test-screen .iq-pill,
html[data-theme="dark"] #iq-test-screen .option-btn,
html[data-theme="dark"] #iq-test-screen .btn-nav,
html[data-theme="dark"] #iq-test-screen .matrix-grid,
html[data-theme="dark"] #iq-test-screen .matrix-cell {
  background: var(--dica-surface-raised, #1b2130);
}
html[data-theme="dark"] #iq-test-screen .iq-timer-card,
html[data-theme="dark"] #iq-test-screen .iq-pill-cat,
html[data-theme="dark"] #iq-test-screen .iq-prompt-icon,
html[data-theme="dark"] #iq-test-screen .matrix-cell.missing,
html[data-theme="dark"] #iq-test-screen .option-btn.selected {
  background: rgba(79, 70, 229, 0.18);
}
html[data-theme="dark"] #iq-test-screen .progress-bar { background: #334155; }
html[data-theme="dark"] #iq-test-screen .iq-autosave,
html[data-theme="dark"] #iq-test-screen .iq-timer-label,
html[data-theme="dark"] #iq-test-screen #iq-progress-pct,
html[data-theme="dark"] #iq-test-screen #iq-q-frac { color: #9aa3b2; }

@media (max-width: 900px) {
  #iq-test-screen .options-grid { grid-template-columns: repeat(3, 1fr); }
  #iq-test-screen .iq-prompt-row { grid-template-columns: 1fr; }
  #iq-test-screen .iq-prompt-side { max-width: none; }
  #iq-test-screen .iq-prompt-visual { justify-content: center; width: 100%; }
}

@media (max-width: 640px) {
  #iq-test-screen .iq-stage { padding: 16px 14px 14px; border-radius: 18px; }
  #iq-test-screen .iq-topbar { flex-direction: column; align-items: stretch; }
  #iq-test-screen .iq-timer-card { justify-content: flex-start; }
  #iq-test-screen .question-card { padding: 12px 12px 16px; }
  #iq-test-screen .iq-prompt-row { gap: 12px; }
  #iq-test-screen .iq-prompt-icon { display: none; }
  #iq-test-screen .iq-prompt-side {
    align-items: stretch;
    gap: 0;
    max-width: none;
    width: 100%;
  }
  #iq-test-screen .question-text {
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.35;
    text-align: center;
  }
  #iq-test-screen .iq-text-stem {
    font-size: 0.95rem;
    text-align: center;
  }
  #iq-test-screen .matrix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
  }
  #iq-test-screen .matrix-cell {
    width: auto;
    height: auto;
    aspect-ratio: 1;
  }
  #iq-test-screen .matrix-cell svg { width: 72%; height: 72%; }
  #iq-test-screen .matrix-cell.missing::after { font-size: 2.2rem; }
  #iq-test-screen .sequence-row { width: 100%; justify-content: space-between; }
  #iq-test-screen .sequence-cell { width: auto; flex: 1; height: auto; aspect-ratio: 1; max-width: 72px; }
  #iq-test-screen .options-grid.text-options { grid-template-columns: 1fr; }
  #iq-test-screen .iq-autosave { display: none; }
  #iq-test-screen .test-nav { flex-wrap: wrap; }
  #iq-test-screen .btn-nav { flex: 1 1 auto; justify-content: center; }
  #iq-test-screen .btn-nav.primary { flex: 1 1 auto; }
  #iq-test-screen .question-dots-scroll {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 0 0;
    scrollbar-width: none;
  }
  #iq-test-screen .question-dots-scroll .q-dot {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
  }
}

/* —— Landing (intro) —— */
.article:has(#iq-intro-screen.active) .single-title,
.article:has(#iq-intro-screen.active) .article-subheading,
.article:has(#iq-intro-screen.active) .post-info,
.article:has(#iq-intro-screen.active) .iqtest-intro {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.iqtest-app:has(#iq-intro-screen.active) {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
}
.iq-landing {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.iq-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 8px 12px;
  align-items: stretch;
  padding: 28px 28px 22px;
  border-radius: 22px;
  border: 1px solid #e4e8f6;
  background:
    radial-gradient(120% 80% at 100% 0%, #efe9ff 0%, transparent 55%),
    linear-gradient(180deg, #fbfcff, #f4f6ff);
  overflow: hidden;
}
.iq-hero-title {
  margin: 10px 0 8px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #151b3a;
}
.iq-hero-lead {
  margin: 0 0 18px;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.45;
  color: #4b5578;
}
.iq-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.iq-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.iq-cat {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
}
.iq-cat strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  color: #1c274c;
}
.iq-cat div span {
  display: block;
  font-size: 0.78rem;
  color: #5b6482;
}
.iq-cat div em {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  font-style: normal;
  color: #7a829c;
}
.iq-cat-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  overflow: hidden;
}
.iq-cat-ico svg {
  display: block;
  width: 20px;
  height: 20px;
  max-width: none;
  flex: none;
  color: #fff;
}
.iq-cat-ico svg,
.iq-cat-ico svg * {
  fill: #fff !important;
  stroke: none !important;
}
.iq-cat-blue { background: #eef4ff; }
.iq-cat-blue .iq-cat-ico { background: #3b82f6; }
.iq-cat-green { background: #eefbf3; }
.iq-cat-green .iq-cat-ico { background: #16a34a; }
.iq-cat-purple { background: #f4eefe; }
.iq-cat-purple .iq-cat-ico { background: #7c3aed; }
.iq-cat-orange { background: #fff4e8; }
.iq-cat-orange .iq-cat-ico { background: #f59e0b; }
.iq-cat-ico-num {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.iq-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.iq-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e4e8f6;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 650;
  color: #1c274c;
}
.iq-facts svg { color: #4f46e5; }
.iq-hero-art {
  position: relative;
  min-height: 240px;
}
.iq-hero-art img,
.post-content .iq-hero-art img {
  position: absolute;
  inset: auto -24px -28px auto;
  width: min(118%, 520px);
  height: auto;
  max-width: none;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.iq-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-radius: 18px;
  background: linear-gradient(90deg, #3b3ee0, #5b4cf5 55%, #6d4dff);
  color: #fff;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
}
.iq-cta-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.iq-cta-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}
.iq-cta-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.iq-cta-sub {
  margin: 2px 0 0;
  font-size: 0.88rem;
  opacity: 0.9;
}
.iq-cta-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border: 0;
  border-radius: 12px;
  background: #f5c518;
  color: #1a1403;
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.iq-cta-btn:hover { filter: brightness(1.05); }
.iq-cta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.iq-info {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.9fr;
  gap: 12px;
}
.iq-info-card {
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid #e4e8f6;
  background: #fff;
}
.iq-info-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #151b3a;
  border: 0;
  background: none;
  padding: 0;
}
.iq-info-card p,
.iq-info-card li {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4b5578;
}
.iq-info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.iq-info-card li {
  position: relative;
  padding: 3px 0 3px 22px;
}
.iq-info-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.15em;
  color: #16a34a;
  font-weight: 800;
  font-size: 0.85rem;
}
.iq-info-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #fff;
}
.iq-info-ico-blue { background: #4f46e5; }
.iq-info-ico-amber { background: #f59e0b; }
.iq-info-warn {
  background: #fff8eb;
  border-color: #f3e0b8;
}
.iq-info-warn h2 { color: #9a6b12; }

html[data-theme="dark"] .iq-hero {
  border-color: #334155;
  background: radial-gradient(120% 80% at 100% 0%, #2a2150 0%, transparent 55%), #151a28;
}
html[data-theme="dark"] .iq-hero-title,
html[data-theme="dark"] .iq-cat strong,
html[data-theme="dark"] .iq-facts li,
html[data-theme="dark"] .iq-info-card h2 { color: #e8eaf0; }
html[data-theme="dark"] .iq-hero-lead,
html[data-theme="dark"] .iq-cat span,
html[data-theme="dark"] .iq-cat em,
html[data-theme="dark"] .iq-info-card p,
html[data-theme="dark"] .iq-info-card li { color: #9aa3b2; }
html[data-theme="dark"] .iq-facts li,
html[data-theme="dark"] .iq-info-card {
  background: #1b2130;
  border-color: #334155;
}
html[data-theme="dark"] .iq-info-warn { background: #2a2418; border-color: #4a3d22; }
html[data-theme="dark"] .iq-info-warn h2 { color: #fbbf24; }

@media (max-width: 900px) {
  .iq-hero { grid-template-columns: 1fr; padding: 22px 18px 16px; }
  .iq-hero-art { min-height: 200px; }
  .iq-hero-art img { position: relative; inset: auto; width: min(100%, 420px); display: block; margin: 0 auto; }
  .iq-info { grid-template-columns: 1fr; }
  .iq-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .iq-cta-btn { justify-content: center; width: 100%; }
}
@media (max-width: 560px) {
  .iq-cats { grid-template-columns: 1fr; }
  .iq-hero-title { font-size: 2rem; }
}

/* —— Relatório final —— */
.iqtest-app .results-card {
  text-align: left;
  padding: 28px 28px 32px;
}
#iq-results-screen {
  scroll-margin-top: 96px;
}
#iq-results-screen.active {
  padding-top: 6px;
}
.iq-report-score,
.iq-profile,
.iq-index-legend,
.iq-report h3,
.iq-report-read,
.iq-report-items,
.iq-report .disclaimer,
.iq-report-actions,
.iq-curve-cap {
  max-width: 40rem;
}
.iqtest-app .iq-report,
.iqtest-app .iq-report * {
  font-variant-numeric: tabular-nums;
}
.iqtest-app .iq-report ::selection {
  background: color-mix(in srgb, var(--primary) 28%, transparent);
}
.iq-report-score {
  margin: 0 0 8px;
}
.iq-report-meta {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--text-light);
}
.iq-report-qi {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--text);
}
.iq-report-class {
  margin: 10px 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}
.iq-report-pct,
.iq-report-ci,
.iq-report-rare,
.iq-curve-cap,
.iq-index-legend,
.iq-report-read {
  margin: 0 0 10px;
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-light);
}
.iq-report-pct strong,
.iq-report-ci strong {
  color: var(--text);
  font-weight: 650;
}
.iq-report-rare {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--success) 12%, var(--card));
  color: var(--text);
}
.iqtest-app .bell-curve-container {
  margin: 18px 0 6px;
  max-width: 44rem;
  color: var(--text-light);
}
.iq-curve {
  display: block;
  width: 100%;
  height: auto;
}
.iq-curve-avg { fill: #dbe4fb; }
.iq-curve-low { fill: #eef1f6; }
.iq-curve-high { fill: #c9d6f7; }
.iq-curve-top { fill: #b7c8f4; }
.iq-curve-line { stroke: var(--primary); stroke-width: 2.4; }
.iq-curve-axis { stroke: var(--border); stroke-width: 1; }
.iq-curve-you { fill: var(--danger); stroke: var(--card); stroke-width: 2; }
.iq-curve-you-line { stroke: var(--danger); stroke-width: 2; stroke-dasharray: 4 3; }
.iq-curve-you-lab { fill: var(--danger); }
.iq-report h3 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
  border: 0;
  padding: 0;
  background: none;
}
.iq-profile {
  list-style: none;
  margin: 0;
  padding: 0;
}
.iq-profile li {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border);
}
.iq-profile li:first-child { padding-top: 2px; }
.iq-profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.iq-profile-row > div:first-child {
  min-width: 0;
  flex: 1;
}
.iq-profile-row strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}
.iq-profile-row span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-light);
}
.iq-profile-score {
  text-align: right;
  flex: none;
  min-width: 7.2rem;
}
.iq-profile-score b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}
.iq-profile-score em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-light);
  white-space: nowrap;
}
.iq-ibar-ticks {
  position: relative;
  height: 16px;
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--text-light);
}
.iq-ibar-ticks span {
  position: absolute;
  top: 0;
  white-space: nowrap;
  transform: translateX(-50%);
}
.iq-ibar-ticks span:first-child { transform: none; }
.iq-ibar-ticks span:last-child {
  left: auto !important;
  right: 0;
  transform: none;
}
.iq-ibar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--bg);
  overflow: visible;
}
.iq-ibar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 55%, var(--border));
  transition: opacity .4s ease;
}
.iq-ibar-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .2);
  transition: opacity .4s ease;
}
.iq-ibar-mean {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  margin-left: -0.5px;
  background: var(--text);
  opacity: .35;
}
.iq-index-legend {
  margin-top: 10px;
  font-size: 0.84rem;
}
.iq-report-items {
  margin: 22px 0 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.iq-report-items summary {
  cursor: pointer;
  font-weight: 650;
  padding: 10px 0;
  color: var(--text);
  list-style: none;
}
.iq-report-items summary::-webkit-details-marker { display: none; }
.iq-report-items summary::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  translate: 0 -1px;
}
.iq-report-items[open] summary::before { transform: rotate(45deg); }
.iq-report-items-table { overflow-x: auto; }
.iq-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.iq-report-actions .btn,
.iq-report-actions .btn-nav {
  min-height: 44px;
  padding: 10px 16px;
}
.iq-report-actions .btn-nav[hidden] {
  display: none !important;
}

html[data-theme="dark"] .iq-curve-avg { fill: #243056; }
html[data-theme="dark"] .iq-curve-low { fill: #1b2130; }
html[data-theme="dark"] .iq-curve-high { fill: #2c3d6e; }
html[data-theme="dark"] .iq-curve-top { fill: #3550a0; }
html[data-theme="dark"] .iq-ibar-fill {
  background: color-mix(in srgb, var(--accent) 50%, #1b2130);
}
html[data-theme="dark"] .iq-report-rare {
  background: color-mix(in srgb, var(--success) 16%, #1b2130);
}

.iq-abbr {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary);
}
.iq-h3-note {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
}
.iq-sub-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.iq-sub-table th,
.iq-sub-table td {
  padding: 8px 10px 8px 0;
  text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.iq-sub-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
}
.iq-sub-table tbody th { font-weight: 650; color: var(--text); }
.iq-sub-table th:nth-child(2),
.iq-sub-table td:nth-child(2) { width: 14%; }
.iq-sub-table th:nth-child(3),
.iq-sub-table td:nth-child(3),
.iq-sub-table th:nth-child(4),
.iq-sub-table td:nth-child(4) {
  width: 14%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.iq-sbar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  max-width: 9rem;
}
.iq-sbar-mean {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: calc((10 - 1) / 18 * 100%);
  width: 1px;
  background: var(--text);
  opacity: .35;
}
.iq-sbar-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--primary);
}
.iq-span {
  text-align: center;
  padding: 12px 0 8px;
  min-height: 140px;
}
.iq-span-digit {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  min-height: 4.4rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  opacity: 0;
}
.iq-span-digit.is-on { opacity: 1; }
.iq-span-hint {
  margin: 12px 0 0;
  color: var(--text-light);
  font-size: 0.92rem;
}
.iq-span-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.iq-span-input {
  width: 12rem;
  max-width: 100%;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.iq-module-done {
  margin: 16px 0 0;
  color: var(--text-light);
}
.iq-sym {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 8px;
}
.iq-sym-targets,
.iq-sym-pool {
  display: flex;
  gap: 6px;
}
.iq-sym-cell {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.iq-sym-sep {
  width: 1px;
  height: 36px;
  background: var(--text);
  opacity: .25;
}
.iq-sym-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
#iq-test-screen .iq-module-opts,
.iqtest-app .iq-module-opts {
  display: flex;
  justify-content: center;
  grid-template-columns: none;
  max-width: none;
}

@media (max-width: 640px) {
  .iqtest-app .results-card { padding: 18px 16px 22px; }
  .iq-profile-row { gap: 10px; }
  .iq-sub-table th:nth-child(4),
  .iq-sub-table td:nth-child(4) { display: none; }
}

@media print {
  body.iq-print-report .dica-header,
  body.iq-print-report .ff-highlights,
  body.iq-print-report .iqtest-intro,
  body.iq-print-report .footer,
  body.iq-print-report .site-footer,
  body.iq-print-report .iq-report-actions,
  body.iq-print-report .iq-landing,
  body.iq-print-report .post-content > p,
  body.iq-print-report .post-content > h2,
  body.iq-print-report .post-content > ul,
  body.iq-print-report .related-footer,
  body.iq-print-report .see-also,
  body.iq-print-report #iq-intro-screen,
  body.iq-print-report #iq-test-screen {
    display: none !important;
  }
  body.iq-print-report #iq-results-screen {
    display: block !important;
  }
  body.iq-print-report .iqtest-app {
    box-shadow: none;
    border: 0;
    overflow: visible;
  }
  body.iq-print-report .iq-report-items { display: none; }
}
