.ctc-app,
.ctc-report-shell {
  --ctc-accent: #35adc7;
  --ctc-ink: #23333a;
  --ctc-gold: #b58a45;
  --ctc-cream: #f4f0e8;
  --ctc-line: #dce3e5;
  --ctc-muted: #64747a;
  color: var(--ctc-ink);
  font-family: inherit;
  max-width: 980px;
  margin: 28px auto;
}

.ctc-app *,
.ctc-report-shell * { box-sizing: border-box; }

.ctc-app button,
.ctc-app input,
.ctc-report-shell button,
.ctc-report-shell input { font: inherit; }

.ctc-loading {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--ctc-line);
  border-radius: 20px;
}

.ctc-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dcecef;
  border-top-color: var(--ctc-accent);
  border-radius: 50%;
  animation: ctc-spin .8s linear infinite;
}

@keyframes ctc-spin { to { transform: rotate(360deg); } }

.ctc-welcome,
.ctc-complete,
.ctc-report-shell {
  background: linear-gradient(145deg, #fff 0%, #fbfcfc 100%);
  border: 1px solid var(--ctc-line);
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(35, 51, 58, .08);
  padding: clamp(26px, 5vw, 62px);
}

.ctc-eyebrow {
  margin: 0 0 10px;
  color: var(--ctc-gold);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ctc-welcome h1,
.ctc-complete h1,
.ctc-report-head h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin: 0 0 22px;
  color: var(--ctc-ink);
}

.ctc-lead,
.ctc-report-head > p {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  color: var(--ctc-muted);
  max-width: 760px;
}

.ctc-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 34px 0;
}

.ctc-feature-grid > div {
  border: 1px solid var(--ctc-line);
  border-radius: 14px;
  padding: 20px;
  background: #fff;
}

.ctc-feature-grid strong {
  display: block;
  font-size: 25px;
  line-height: 1.2;
}

.ctc-feature-grid span { color: var(--ctc-muted); font-size: 14px; }

.ctc-rules {
  background: var(--ctc-cream);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 26px 0;
}

.ctc-rules h2 { margin: 0 0 14px; font-size: 21px; }
.ctc-rules ul,
.ctc-paywall ul { margin: 0; padding-left: 22px; }
.ctc-rules li,
.ctc-paywall li { margin: 8px 0; line-height: 1.5; }

.ctc-disclaimer {
  border-left: 4px solid var(--ctc-gold);
  padding: 12px 16px;
  margin: 24px 0 30px;
  background: #fffaf1;
  color: #65563c;
  font-size: 14px;
  line-height: 1.55;
}

.ctc-primary,
.ctc-secondary,
.ctc-link-button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  min-height: 50px;
  padding: 13px 22px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.ctc-primary,
.ctc-link-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--ctc-ink);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(35, 51, 58, .18);
}

.ctc-primary:hover,
.ctc-link-button:hover { transform: translateY(-1px); box-shadow: 0 11px 25px rgba(35, 51, 58, .22); }
.ctc-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.ctc-secondary {
  background: #fff;
  color: var(--ctc-ink);
  border: 1px solid var(--ctc-line);
}

.ctc-test-screen { max-width: 860px; margin: 0 auto; }

.ctc-progress-wrap { margin: 0 0 18px; }
.ctc-progress-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 8px; font-size: 13px; color: var(--ctc-muted); }
.ctc-progress-meta span:first-child { font-weight: 750; color: var(--ctc-ink); }
.ctc-progress { height: 7px; background: #e7edef; overflow: hidden; border-radius: 99px; }
.ctc-progress span { display: block; height: 100%; background: var(--ctc-accent); border-radius: inherit; transition: width .3s ease; }

.ctc-question-card {
  background: #fff;
  border: 1px solid var(--ctc-line);
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(35, 51, 58, .07);
  min-height: 520px;
  padding: clamp(24px, 5vw, 52px);
  display: flex;
  flex-direction: column;
}

.ctc-question-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.ctc-instruction { margin: 0; color: var(--ctc-muted); font-size: 15px; line-height: 1.55; max-width: 680px; }
.ctc-timer { flex: 0 0 auto; border: 1px solid var(--ctc-line); border-radius: 99px; padding: 6px 11px; font-variant-numeric: tabular-nums; font-weight: 750; background: #fafcfc; }
.ctc-timer.is-urgent { color: #a83a36; border-color: #e3b0ad; background: #fff4f3; }

.ctc-question-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ctc-prompt { margin: 34px 0 30px; font-size: clamp(22px, 3vw, 32px); line-height: 1.4; font-weight: 700; text-align: center; }

.ctc-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0 0 24px; }
.ctc-option {
  width: 100%;
  min-height: 68px;
  padding: 14px 17px;
  border-radius: 12px;
  border: 1px solid var(--ctc-line);
  background: #fff;
  color: var(--ctc-ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
}
.ctc-option:hover { border-color: var(--ctc-accent); background: #f7fcfd; }
.ctc-option.is-selected { border: 2px solid var(--ctc-accent); background: #effafd; padding: 13px 16px; }
.ctc-option-marker { width: 17px; height: 17px; border: 2px solid #9ba9ae; border-radius: 50%; flex: 0 0 auto; }
.ctc-option.is-selected .ctc-option-marker { border: 5px solid var(--ctc-accent); }
.ctc-option-label { flex: 1; text-align: center; font-weight: 650; }

.ctc-submit-answer { align-self: center; min-width: 220px; }
.ctc-answer-status,
.ctc-form-status,
.ctc-purchase-status { min-height: 22px; text-align: center; color: var(--ctc-muted); margin: 10px 0 0; }
.ctc-autosave { text-align: center; color: var(--ctc-muted); font-size: 12px; margin: 13px 0 0; }

.ctc-memory-stage { text-align: center; padding: 46px 10px; }
.ctc-memory-label { display: block; color: var(--ctc-gold); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 750; }
.ctc-memory-stimulus { font-size: clamp(30px, 6vw, 54px); font-weight: 750; letter-spacing: .08em; margin: 36px 0; }
.ctc-memory-countdown { color: var(--ctc-muted); font-variant-numeric: tabular-nums; }

.ctc-mini-grid {
  --ctc-cols: 3;
  display: inline-grid;
  grid-template-columns: repeat(var(--ctc-cols), 17px);
  gap: 2px;
  padding: 5px;
  border: 1px solid #b9c3c6;
  background: #fff;
  vertical-align: middle;
}
.ctc-mini-cell { width: 17px; height: 17px; background: #fff; border: 1px solid #d5dddf; }
.ctc-mini-cell.is-filled { background: var(--ctc-ink); border-color: var(--ctc-ink); }

.ctc-matrix {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  border: 2px solid var(--ctc-ink);
  vertical-align: middle;
}
.ctc-matrix-cell { min-width: 74px; min-height: 65px; display: grid; place-content: center; border: 1px solid var(--ctc-ink); font-size: 28px; background: #fff; }
.ctc-targets { display: inline-block; background: var(--ctc-cream); border-radius: 8px; padding: 8px 14px; font-size: 19px; }
.ctc-symbol-line { display: inline-block; font-size: clamp(25px, 5vw, 40px); letter-spacing: .25em; margin-top: 18px; }
.ctc-net { display: inline-block; white-space: pre; line-height: .85; letter-spacing: .1em; font-size: 25px; font-family: monospace; }
.ctc-paper-fold { font-size: 28px; letter-spacing: .1em; }

.ctc-code-key { display: inline-flex; gap: 4px; border: 1px solid var(--ctc-ink); background: #fff; }
.ctc-code-key > span { display: grid; grid-template-rows: 1fr 1fr; min-width: 52px; border-right: 1px solid var(--ctc-ink); }
.ctc-code-key > span:last-child { border-right: 0; }
.ctc-code-key b,
.ctc-code-key em { display: grid; place-content: center; min-height: 34px; font-style: normal; }
.ctc-code-key b { border-bottom: 1px solid var(--ctc-ink); }

.ctc-complete { text-align: center; }
.ctc-complete-mark { width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-content: center; background: #e5f7f1; color: #16755b; font-size: 30px; }
.ctc-partial-card { max-width: 680px; margin: 30px auto; padding: 28px; background: var(--ctc-cream); border-radius: 18px; }
.ctc-partial-card h2 { margin: 7px 0 13px; font-size: clamp(25px, 4vw, 38px); }
.ctc-muted { color: var(--ctc-muted); font-size: 14px; }

.ctc-email-panel,
.ctc-paywall { max-width: 700px; margin: 28px auto 0; padding: 28px; border: 1px solid var(--ctc-line); border-radius: 18px; background: #fff; text-align: left; }
.ctc-email-panel h2,
.ctc-paywall h2 { margin-top: 0; }
.ctc-email-form label:not(.ctc-check) { display: block; font-weight: 700; }
.ctc-email-form input[type="email"] { display: block; width: 100%; margin-top: 8px; min-height: 50px; border: 1px solid #b9c5c8; border-radius: 9px; padding: 10px 13px; }
.ctc-check { display: flex; align-items: flex-start; gap: 10px; margin: 17px 0; color: var(--ctc-muted); font-size: 13px; line-height: 1.45; }
.ctc-check input { margin-top: 3px; }
.ctc-email-panel .ctc-primary,
.ctc-paywall .ctc-primary { width: 100%; }

.ctc-error-card { padding: 40px; background: #fff; border: 1px solid #e0b6b3; border-radius: 18px; text-align: center; }

.ctc-report-shell { text-align: left; }
.ctc-report-head { border-bottom: 1px solid var(--ctc-line); padding-bottom: 28px; margin-bottom: 30px; }
.ctc-notice { padding: 13px 16px; border-radius: 9px; background: #e7f7f1; color: #16664f; margin-bottom: 22px; }
.ctc-domain-icon { font-size: 32px; color: var(--ctc-gold); }

.ctc-score-hero { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: center; padding: 28px; border-radius: 18px; background: var(--ctc-ink); color: #fff; }
.ctc-score-hero > div { text-align: center; border-right: 1px solid rgba(255,255,255,.18); padding-right: 26px; }
.ctc-score-hero span { display: block; font-size: 13px; color: rgba(255,255,255,.72); }
.ctc-score-hero strong { display: block; font-size: 70px; line-height: 1; margin-top: 7px; }
.ctc-score-hero p { margin: 5px 0; line-height: 1.55; }
.ctc-score-hero .ctc-percentile { color: #c9dfe4; font-size: 14px; }

.ctc-report-section { margin-top: 42px; }
.ctc-report-section h2 { font-size: 27px; margin-bottom: 22px; }
.ctc-chart { display: grid; gap: 18px; }
.ctc-chart-label { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 7px; }
.ctc-chart-label strong { font-variant-numeric: tabular-nums; }
.ctc-bar { height: 14px; background: #e7edef; border-radius: 99px; overflow: hidden; }
.ctc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--ctc-accent), var(--ctc-gold)); border-radius: inherit; }

.ctc-domain-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 34px; }
.ctc-domain-cards article { position: relative; padding: 24px; border: 1px solid var(--ctc-line); border-radius: 16px; background: #fff; }
.ctc-domain-cards h3 { margin: 0 58px 12px 0; font-size: 20px; }
.ctc-domain-cards p { color: var(--ctc-muted); line-height: 1.55; }
.ctc-domain-score { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; display: grid; place-content: center; border-radius: 50%; background: var(--ctc-cream); font-weight: 800; }
.ctc-band { display: inline-block; margin-top: 6px; padding: 5px 9px; border-radius: 99px; background: #edf8fa; color: #26798b; font-size: 12px; font-weight: 750; }

.ctc-subtests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ctc-line); border-radius: 14px; overflow: hidden; }
.ctc-subtests > div { display: flex; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid var(--ctc-line); }
.ctc-subtests > div:nth-child(odd) { border-right: 1px solid var(--ctc-line); }
.ctc-subtests > div:nth-last-child(-n+2) { border-bottom: 0; }
.ctc-methodology { background: var(--ctc-cream); padding: 25px; border-radius: 16px; color: #536267; line-height: 1.6; }
.ctc-report-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

@media (max-width: 700px) {
  .ctc-app,
  .ctc-report-shell { margin: 12px auto; }
  .ctc-welcome,
  .ctc-complete,
  .ctc-report-shell { border-radius: 16px; padding: 24px 18px; }
  .ctc-feature-grid,
  .ctc-options,
  .ctc-domain-cards,
  .ctc-subtests { grid-template-columns: 1fr; }
  .ctc-subtests > div,
  .ctc-subtests > div:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--ctc-line); }
  .ctc-subtests > div:last-child { border-bottom: 0; }
  .ctc-question-card { min-height: 520px; padding: 23px 16px; }
  .ctc-question-top { flex-direction: column; }
  .ctc-timer { align-self: flex-end; }
  .ctc-prompt { margin-top: 22px; }
  .ctc-option { min-height: 60px; }
  .ctc-score-hero { grid-template-columns: 1fr; text-align: center; }
  .ctc-score-hero > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding: 0 0 22px; }
}

@media print {
  body * { visibility: hidden !important; }
  .ctc-report-shell,
  .ctc-report-shell * { visibility: visible !important; }
  .ctc-report-shell { position: absolute; inset: 0; max-width: none; margin: 0; border: 0; box-shadow: none; padding: 18px; }
  .ctc-report-actions,
  .ctc-paywall,
  .ctc-email-panel { display: none !important; }
  .ctc-domain-cards article,
  .ctc-report-section { break-inside: avoid; }
}
