/* Unit 4 Test Practice (Practice + Challenge). Shared by both pages; engine: assets/u4-test-practice.js. */
:root {
  --tp-navy: #15487f;
  --tp-navy-2: #1c5999;
  --tp-teal: #0369a1;
  --tp-teal-soft: #e0f2fe;
  --tp-gold: #8a5a00;
  --tp-gold-soft: #fef3c7;
  --tp-page: #f8fafc;
  --tp-paper: #ffffff;
  --tp-ink: #1e293b;
  --tp-muted: #475569;
  --tp-line: #cbd5e1;
  --tp-good: #18724b;
  --tp-good-bg: #edf8f2;
  --tp-bad: #a5403b;
  --tp-bad-bg: #fff1ef;
  --tp-radius: 14px;
  --tp-zoom: 1;
}
body.tp-challenge {
  --tp-navy: #0f3d4a;
  --tp-navy-2: #14566a;
  --tp-teal: #0b6b73;
  --tp-teal-soft: #dff4f3;
}
* {
  box-sizing: border-box;
}
html {
  font-size: calc(100% * var(--tp-zoom));
}
body {
  margin: 0;
  background: var(--tp-page);
  color: var(--tp-ink);
  font-family: "Hanken Grotesk", "Outfit", system-ui, sans-serif;
  line-height: 1.55;
}
h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.2;
  margin: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 10;
  border: 2px solid var(--tp-navy);
}
:focus-visible {
  outline: 3px solid var(--tp-teal);
  outline-offset: 2px;
}

.tp-top {
  background: var(--tp-navy);
  color: #fff;
  padding: 14px 16px;
}
.tp-top-in,
.tp-wrap {
  max-width: 980px;
  margin: 0 auto;
}
.tp-top-in {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}
.tp-top h1 {
  font-size: 1.45rem;
}
.tp-top small {
  display: block;
  opacity: 0.9;
}
.tp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tp-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid var(--tp-navy);
  background: var(--tp-paper);
  color: var(--tp-navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tp-btn:hover {
  background: var(--tp-teal-soft);
}
.tp-btn.primary {
  background: var(--tp-navy);
  color: #fff;
}
.tp-btn.primary:hover {
  background: var(--tp-navy-2);
}
.tp-top .tp-btn {
  border-color: #fff;
  background: transparent;
  color: #fff;
}
.tp-top .tp-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--tp-navy);
}
.tp-wrap {
  padding: 16px;
}
.tp-hero,
.tp-card,
.tp-tool {
  background: var(--tp-paper);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius);
  box-shadow: 0 4px 12px rgba(21, 72, 127, 0.06);
}
.tp-hero {
  padding: 18px 20px;
  margin-bottom: 14px;
}
.tp-hero p {
  margin: 8px 0 0;
}
.tp-note {
  color: var(--tp-muted);
  font-size: 0.92rem;
}
.tp-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 12px;
  font-weight: 700;
}
.tp-bar {
  flex: 1 1 200px;
  height: 12px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
}
.tp-bar span {
  display: block;
  height: 100%;
  background: var(--tp-teal);
  transition: width 0.3s;
}
.tp-tool {
  margin-bottom: 18px;
}
.tp-tool summary {
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}
.tp-tool ul {
  margin: 0;
  padding: 0 18px 14px 38px;
}
.tp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.tp-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--tp-line);
  background: var(--tp-paper);
  color: var(--tp-navy);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}
.tp-nav a.done {
  background: var(--tp-good-bg);
  border-color: var(--tp-good);
}
.tp-strand {
  margin: 26px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.tp-strand h2 {
  font-size: 1.25rem;
  color: var(--tp-navy);
}
.tp-strand .ico {
  font-size: 1.3rem;
}
.tp-card {
  padding: 18px 20px;
  margin-bottom: 14px;
}
.tp-card.solved {
  border-color: var(--tp-good);
  background: var(--tp-good-bg);
}
.tp-qhead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--tp-muted);
  font-weight: 700;
}
.tp-q {
  font-size: 1.05rem;
  margin: 0 0 12px;
}
.l-es {
  display: none;
}
body.lang-es .l-en {
  display: none;
}
body.lang-es .l-es {
  display: inline;
}
body.lang-both .l-en {
  display: inline;
}
body.lang-both .l-es {
  display: inline;
}
body.lang-both .l-es::before {
  content: " / ";
}
body.lang-both
  :is(
    .tp-q,
    .tp-step label,
    .tp-step legend,
    .tp-hero p,
    .tp-rubric span,
    .tp-tool li,
    .tp-strand h2,
    .tp-top h1,
    .tp-top small,
    .tp-sum h2,
    .tp-nav a
  )
  .l-en,
body.lang-both
  :is(
    .tp-q,
    .tp-step label,
    .tp-step legend,
    .tp-hero p,
    .tp-rubric span,
    .tp-tool li,
    .tp-strand h2,
    .tp-top h1,
    .tp-top small,
    .tp-sum h2,
    .tp-nav a
  )
  .l-es {
  display: block;
}
body.lang-both
  :is(
    .tp-q,
    .tp-step label,
    .tp-step legend,
    .tp-hero p,
    .tp-rubric span,
    .tp-tool li,
    .tp-strand h2,
    .tp-top h1,
    .tp-top small,
    .tp-sum h2,
    .tp-nav a
  )
  .l-es {
  color: var(--tp-muted);
  font-style: italic;
}
body.lang-both .tp-top .l-es {
  color: #dbeafe;
}
body.lang-both
  :is(
    .tp-q,
    .tp-step label,
    .tp-step legend,
    .tp-hero p,
    .tp-rubric span,
    .tp-tool li,
    .tp-strand h2,
    .tp-top h1,
    .tp-top small,
    .tp-sum h2,
    .tp-nav a
  )
  .l-es::before {
  content: none;
}
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  line-height: 1.05;
  font-size: 0.88em;
  margin: 0 0.12em;
}
.frac span:first-child {
  border-bottom: 1.5px solid currentColor;
  padding: 0 0.15em;
}
.tp-tape {
  display: block;
  max-width: 460px;
  width: 100%;
  height: auto;
  margin: 4px 0 14px;
}
.tp-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tp-answer input[type="text"] {
  min-height: 44px;
  width: 9.5rem;
  padding: 8px 12px;
  border: 2px solid var(--tp-line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--tp-ink);
}
.tp-answer .unit {
  font-weight: 700;
  color: var(--tp-muted);
}
.tp-opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.tp-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border: 2px solid var(--tp-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.tp-opt:hover {
  border-color: var(--tp-teal);
}
.tp-opt input {
  width: 20px;
  height: 20px;
  flex: none;
}
.tp-opt.ok {
  border-color: var(--tp-good);
  background: var(--tp-good-bg);
}
.tp-opt.no {
  border-color: var(--tp-bad);
  background: var(--tp-bad-bg);
}
.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tp-fb {
  margin-top: 10px;
  padding: 0;
  border-radius: 10px;
}
.tp-fb:not(:empty) {
  padding: 10px 14px;
  border: 1px solid var(--tp-line);
  background: #fff;
}
.tp-fb.good {
  border-color: var(--tp-good);
  background: var(--tp-good-bg);
  color: #0d4a2f;
}
.tp-fb.bad {
  border-color: var(--tp-bad);
  background: var(--tp-bad-bg);
  color: #7a2b27;
}
.tp-fb.hint {
  border-color: var(--tp-gold);
  background: var(--tp-gold-soft);
  color: #5c3b00;
}
.tp-fb p {
  margin: 0 0 4px;
}
.tp-table {
  border-collapse: collapse;
  margin: 8px 0 14px;
  min-width: 260px;
}
.tp-table th,
.tp-table td {
  border: 1px solid var(--tp-line);
  padding: 6px 14px;
  text-align: left;
}
.tp-table th {
  background: var(--tp-teal-soft);
}
.tp-table td:last-child {
  text-align: right;
}
.tp-step {
  margin: 12px 0;
  padding-top: 10px;
  border-top: 1px dashed var(--tp-line);
}
.tp-step label,
.tp-step legend {
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.tp-claim {
  border: 0;
  padding: 0;
  margin: 0;
}
.tp-draw {
  border: 2px solid var(--tp-line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  max-width: 600px;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  display: block;
}
.tp-text {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 2px solid var(--tp-line);
  border-radius: 10px;
  font: inherit;
  color: var(--tp-ink);
  background: #fff;
}
.tp-rubric {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.tp-rubric label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 36px;
  font-weight: 400;
  cursor: pointer;
}
.tp-rubric input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex: none;
}
.tp-sum {
  margin-top: 26px;
  padding: 20px;
}
.tp-sum ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.tp-sum li {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
}
.tp-sum .tp-bar {
  flex: 1 1 120px;
}
.tp-links {
  margin-top: 18px;
  color: var(--tp-muted);
  font-size: 0.95rem;
}
.tp-links a {
  color: var(--tp-navy);
  font-weight: 700;
}
@media (max-width: 560px) {
  .tp-wrap {
    padding: 12px;
  }
  .tp-card {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tp-bar span {
    transition: none;
  }
}
@media print {
  .tp-top .tp-tools,
  .tp-nav,
  .tp-actions,
  .tp-links,
  .skip-link {
    display: none;
  }
  .tp-card {
    break-inside: avoid;
    box-shadow: none;
  }
  .tp-top {
    background: #fff;
    color: #000;
  }
}
