/* static/css/tests/test-info-pages.css
   Shared by /tests/<slug>/what-it-measures and /tests/<slug>/how-it-works.
   Same palette and type as about.css and the test detail page (Inter +
   Libre Baskerville, #274285 primary, #1b2740 ink). Scoped under `.tp` so it
   cannot leak into the quiz, which shares a base layout with these pages. */

.tp {
  --ink: #1b2740; --body: #525f79; --muted: #7a879f; --soft: #94a1bc;
  --primary: #274285; --primary-2: #2f4c97; --line: #e6ebf6; --wash: #f7faff;
  font-family: "Inter", system-ui, sans-serif;
  color: #2b3242;
  padding-bottom: 72px;
  padding-left: 20px;
  padding-right: 20px;
}
.tp .container { max-width: 1000px; }

/* ── Type ─────────────────────────────────────────────────── */
.tp-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); margin: 0; }
.tp-title { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 800; line-height: 1.07; letter-spacing: -.03em; color: var(--ink); margin: 16px 0 0; text-wrap: balance; }
.tp-h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 10px 0 0; text-wrap: balance; }
.tp-lead { font-size: 1.12rem; line-height: 1.62; color: var(--body); margin: 20px auto 28px; max-width: 58ch; text-wrap: pretty; }
.tp-lead p { margin: 0; }
.tp-sub { font-size: .98rem; line-height: 1.6; color: var(--muted); margin: 14px auto 0; max-width: 60ch; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.tp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 26px 0 0; font-size: 12.5px; color: var(--soft); }
.tp-crumbs a { color: var(--muted); text-decoration: none; }
.tp-crumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────── */
.tp-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 28px;
  border-radius: 12px; background: var(--primary); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 15px; box-shadow: 0 10px 26px rgba(39,66,133,.24);
  transition: background .18s ease, transform .18s ease; text-wrap: pretty;
}
.tp-btn:hover { background: var(--primary-2); color: #fff; transform: translateY(-1px); }
.tp-btn.ghost { background: #fff; color: var(--primary); border: 1px solid var(--line); box-shadow: none; }
.tp-btn.ghost:hover { background: #eef2fb; color: var(--primary); }
.tp-btn.light { background: #fff; color: var(--primary); box-shadow: none; }
.tp-btn.light:hover { background: #eef2fb; color: var(--primary); }
.tp-btn.small { height: 44px; padding: 0 22px; font-size: 14px; }

/* ── Hero ─────────────────────────────────────────────────── */
.tp-hero { text-align: center; max-width: 740px; margin: 0 auto; padding: 44px 0 8px; }
.tp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Facts strip ──────────────────────────────────────────── */
.tp-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; margin: 44px 0 8px;
}
.tp-fact { background: #fff; padding: 22px 16px; text-align: center; }
.tp-fact-v { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary); }
.tp-fact-l { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Section rhythm ───────────────────────────────────────── */
.tp-section { margin-top: 64px; }
.tp-head { text-align: center; max-width: 660px; margin: 0 auto 40px; }

/* ── Dimensions ───────────────────────────────────────────── */
.tp-measures { display: flex; flex-direction: column; gap: 28px; }
.tp-measure {
  display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; box-shadow: 0 6px 20px rgba(39,66,133,.05);
  scroll-margin-top: 90px;
}
.tp-measure-media { position: relative; border-radius: 14px; overflow: hidden; background: var(--wash); aspect-ratio: 4 / 3; }
.tp-measure-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* An unfinished test still reads: the picture collapses to a tinted panel
   with the index in it rather than a broken-image icon. */
.tp-measure-media.is-empty img { display: none; }
.tp-measure-index {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255,255,255,.92); color: var(--primary);
  padding: 4px 9px; border-radius: 999px;
}
.tp-measure-media.is-empty .tp-measure-index { left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 22px; background: none; }

.tp-measure-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 2px 0 0; }
.tp-measure-alias { font-size: 12.5px; color: var(--soft); margin: 6px 0 0; }
.tp-measure-desc { font-size: .98rem; line-height: 1.68; color: var(--body); margin: 14px 0 0; }

.tp-measure-long { margin: 14px 0 0; font-size: .97rem; line-height: 1.72; color: var(--body); max-width: 70ch; }
.tp-measure-long p { margin: 0 0 10px; }
.tp-measure-long p:last-child { margin-bottom: 0; }
.tp-measure-example {
  margin: 16px 0 0; padding: 13px 16px; border-radius: 10px;
  background: var(--wash); border-left: 3px solid #cfdcf3;
  font-size: .9rem; line-height: 1.6; color: var(--body);
}
.tp-measure-example span { font-weight: 700; color: var(--ink); }

.tp-bands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.tp-band { background: var(--wash); border: 1px solid #e9eff9; border-left: 3px solid var(--soft); border-radius: 10px; padding: 14px 15px; }
.tp-band.band-low { border-left-color: #d98a86; }
.tp-band.band-medium { border-left-color: #d9b26a; }
.tp-band.band-high { border-left-color: #6aa88b; }
.tp-band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tp-band-title { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.tp-band-range { font-size: 11px; color: var(--soft); white-space: nowrap; }
.tp-band p { margin: 7px 0 0; font-size: 13px; line-height: 1.55; color: var(--body); }

.tp-domains { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 18px; }
.tp-domains-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); margin-right: 4px; }
.tp-chip { font-size: 12px; font-weight: 600; color: var(--primary); background: #eef2fb; border-radius: 999px; padding: 4px 11px; }

/* Domain lines — the prose version of the chip row */
.tp-domain-lines { margin-top: 20px; padding-top: 18px; border-top: 1px solid #f0f4fb; }
.tp-domain-lines dl { margin: 10px 0 0; }
.tp-domain-row { display: grid; grid-template-columns: 132px 1fr; gap: 16px; padding: 9px 0; border-bottom: 1px solid #f5f8fd; }
.tp-domain-row:last-child { border-bottom: 0; }
.tp-domain-row dt { font-size: 12.5px; font-weight: 700; color: var(--primary); padding-top: 1px; }
.tp-domain-row dd { margin: 0; font-size: .9rem; line-height: 1.62; color: var(--body); }

/* Test-level overview + long-form body, both lifted from fields that render
   nowhere on the public site today. */
.tp-overview { background: var(--wash); border: 1px solid #e9eff9; border-radius: 20px; padding: 34px 38px; margin-top: 44px; }
.tp-overview-body { margin-top: 10px; font-size: 1.02rem; line-height: 1.72; color: var(--body); }
.tp-overview-body p { margin: 0 0 12px; }
.tp-overview-body p:last-child { margin-bottom: 0; }

.tp-longform { margin-top: 64px; font-size: .99rem; line-height: 1.75; color: var(--body); }
.tp-longform h2 { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 32px 0 12px; }
.tp-longform h3 { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin: 26px 0 10px; }
.tp-longform p { margin: 0 0 14px; }
.tp-longform ul, .tp-longform ol { margin: 0 0 14px; padding-left: 22px; }
.tp-longform li { margin-bottom: 6px; }
.tp-longform a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ── Inline CTA between dimensions ────────────────────────── */
.tp-inline-cta {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--wash); border: 1px dashed #cfdcf3; border-radius: 16px; padding: 22px 26px;
}
.tp-inline-cta p { margin: 0; font-size: .95rem; color: var(--body); max-width: 52ch; }

/* ── Formats / rules / steps ──────────────────────────────── */
.tp-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.tp-format { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 26px 0; box-shadow: 0 6px 20px rgba(39,66,133,.05); overflow: hidden; display: flex; flex-direction: column; }
.tp-format-icon { display: block; width: 52px; height: 52px; margin: 0 0 14px; }
.tp-format h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 0 0 10px; letter-spacing: -.01em; }
.tp-format p { margin: 0; margin-bottom: 16px; font-size: .92rem; line-height: 1.62; color: var(--body); }
/* Blue footer band — bleeds to card edges via negative margin, clipped by overflow:hidden */
.tp-format-advice { margin: auto -26px 0 !important; padding: 14px 26px 22px; background: #eef2fb; border-top: 1px solid #d4e0f5 !important; color: var(--muted) !important; font-size: .88rem !important; min-height: 106px;}
.tp-format-advice strong { color: #274285; }


/* ── Answering well ────────────────────────────────────────── */
.tp-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .tp-rules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tp-rules { grid-template-columns: 1fr; } }
.tp-rule { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px 22px; box-shadow: 0 4px 16px rgba(39,66,133,.06); display: flex; flex-direction: column; }
.tp-rule-img { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 0 18px; }
.tp-rule-img img { width: 96px; height: 96px; object-fit: contain; display: block; }
.tp-rule-num { position: absolute; top: -6px; right: calc(50% - 62px); font-size: 11px; font-weight: 800; color: var(--primary); background: #eef2fb; border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(39,66,133,.12); }
.tp-rule h3 { font-size: .95rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.tp-rule p { margin: 0; font-size: .875rem; line-height: 1.65; color: var(--muted); }
.tp-steps { display: flex; flex-direction: column; counter-reset: tpstep; }

.tp-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: flex-start;
  counter-increment: tpstep;
}

/* Track: dot + vertical connector line */
.tp-step-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
  gap: 0;
  /* Extend to fill full step height so the line runs to the next dot */
  align-self: stretch;
}

.tp-step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3f6fc4;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tp-step-dot::before { content: counter(tpstep); }

/* Vertical connector — hidden on the last step */
.tp-step-track::after {
  content: '';
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, #d4e0f5, #e9eff9);
  margin: 6px 0 0;
  min-height: 20px;
}
.tp-step:last-child .tp-step-track::after { display: none; }

/* Card */
.tp-step-body {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(39,66,133,.06);
}
.tp-step:last-child .tp-step-body { margin-bottom: 0; }

/* Icon badge in top-right of card */
.tp-step-icon {
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef2fb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3f6fc4;
  margin: 0 0 8px 12px;
  flex-shrink: 0;
}

.tp-step-body h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; line-height: 1.3; }
.tp-step-body p { margin: 0; font-size: .93rem; line-height: 1.66; color: var(--body); }
.tp-step-body p + p { margin-top: 8px; }

/* ── Scale list ───────────────────────────────────────────── */
.tp-scale { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 520px; margin-inline: auto; }
.tp-scale-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: center; padding: 15px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.tp-scale-row:last-child { border-bottom: 0; }
.tp-scale-dot { width: 16px; height: 16px; border-radius: 50%; background: #cfdcf3; box-shadow: inset 0 0 0 2px #fff; }
/* 5-point — matches quiz .dot-of-5 palette */
.tp-scale-dot.dot-0.of-5 { background: #b9bfca; }
.tp-scale-dot.dot-1.of-5 { background: #cdd9f0; }
.tp-scale-dot.dot-2.of-5 { background: #9fb6e4; }
.tp-scale-dot.dot-3.of-5 { background: #5d7fca; }
.tp-scale-dot.dot-4.of-5 { background: #2f5bd1; }
/* 7-point — matches quiz .dot-of-7 palette */
.tp-scale-dot.dot-0.of-7 { background: #cdd9f0; }
.tp-scale-dot.dot-1.of-7 { background: #a8bfe8; }
.tp-scale-dot.dot-2.of-7 { background: #86a1db; }
.tp-scale-dot.dot-3.of-7 { background: #b9bfca; }
.tp-scale-dot.dot-4.of-7 { background: #6a8ad0; }
.tp-scale-dot.dot-5.of-7 { background: #f1948a; }
.tp-scale-dot.dot-6.of-7 { background: #e74c3c; }
.tp-scale-label { font-size: .95rem; font-weight: 600; color: var(--ink); }
.tp-scale-value { font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; }

/* ── Callout / honesty note ───────────────────────────────── */
.tp-callout { background: var(--wash); border: 1px solid #e9eff9; border-radius: 20px; padding: 36px 40px; margin-top: 56px; }
.tp-callout h2 { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin: 0 0 12px; letter-spacing: -.02em; }
.tp-callout p { margin: 0 0 10px; font-size: .96rem; line-height: 1.68; color: var(--body); }
.tp-callout p:last-child { margin-bottom: 0; }

.tp-bullets { list-style: none; margin: 14px 0 0; padding: 0; }
.tp-bullets li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: .96rem; line-height: 1.62; color: var(--body); }
.tp-bullets li::before { content: ''; position: absolute; left: 4px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.tp-bullets li:last-child { margin-bottom: 0; }

.tp-note { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 32px; }
.tp-note h2 { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.tp-note p { margin: 0; font-size: .9rem; line-height: 1.7; color: var(--muted); }

/* ── Final CTA ────────────────────────────────────────────── */
.tp-final { background: linear-gradient(135deg, #274285, #3357a0); border-radius: 20px; padding: 52px 40px; text-align: center; box-shadow: 0 18px 44px rgba(39,66,133,.28); margin-top: 56px;     display: flex;
    flex-direction: column;
    align-items: center; }
.tp-final h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 0; }
.tp-final > p { font-size: 15px; color: rgba(255,255,255,.75); margin: 12px auto 26px; max-width: 46ch; line-height: 1.6; }
.tp-final-alt { margin: 20px 0 0 !important; font-size: 13px !important; }
.tp-final-alt a { color: rgba(255,255,255,.82); text-decoration: underline; text-underline-offset: 3px; }
.tp-final-alt a:hover { color: #fff; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .tp-measure { grid-template-columns: 1fr; gap: 20px; }
  .tp-measure-media { aspect-ratio: 16 / 9; }
  .tp-bands { grid-template-columns: 1fr; }
  .tp-domain-row { grid-template-columns: 1fr; gap: 3px; }
  .tp-facts { grid-template-columns: repeat(2, 1fr); }
  .tp-format-advice { min-height: auto; }
  .tp-hero { padding-top: 28px; }
  .tp-cta-row { flex-direction: column; align-items: stretch; }
  .tp-btn { justify-content: center; }
  .tp-measure, .tp-callout, .tp-final { padding: 24px 20px; }
  .tp-inline-cta { flex-direction: column; align-items: stretch; }
}