/* Additions to the original CasePilot design. Base typography and cards stay in index.html. */
/* Case Register: keep the count and every discipline readable on a phone. */
#pg-cases .rule-h {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px 20px;
  padding-bottom: 16px;
}
#pg-cases .rule-h h2 {
  min-width: 0;
  font-size: clamp(1.7rem, 5vw, 2.25rem);
  line-height: 1.16;
}
#pg-cases .rule-h .rh-note {
  margin: 0 0 2px;
  padding: 7px 11px;
  border: 1px solid #c9d9e8;
  border-radius: 8px;
  background: #fff;
  color: var(--navy-soft);
  font: 600 .8rem/1.3 Inter, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}
#pg-cases .sub {
  max-width: 62ch;
  margin: 14px 0 18px;
  font-size: .94rem;
  line-height: 1.55;
}
#pg-cases .ftwrap {
  margin: 0 0 16px;
}
#pg-cases .ftwrap::after,
#pg-cases .ftcue,
#pg-cases .ft-hint {
  display: none;
}
#pg-cases .filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
  scroll-snap-type: none;
}
#pg-cases .filter-tabs .ft {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--navy-soft);
  font: 600 .82rem/1.3 Inter, sans-serif;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
#pg-cases .filter-tabs .ft.on {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
#pg-cases .filter-tabs .ft:active {
  transform: scale(.96);
}
.register-access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 20px;
  padding: 16px 18px;
  border: 1px solid #c9d9e8;
  border-radius: 10px;
  background: #f8fbfe;
}
.register-access strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.3;
}
.register-access p {
  max-width: 58ch;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}
.register-access .btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 14px;
  font-size: .8rem;
}
.register-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 700px) {
  #pg-cases .rule-h {
    grid-template-columns: 1fr;
  }
  #pg-cases .rule-h .rh-note {
    justify-self: start;
  }
  #pg-cases .filter-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .register-access {
    align-items: stretch;
    flex-direction: column;
  }
  .register-access .btn {
    align-self: flex-start;
  }
}
html {
  scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px));
  touch-action: manipulation;
}
body { touch-action: manipulation; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 3px;
}
h2[tabindex="-1"]:focus,
h3[tabindex="-1"]:focus,
#dosFeedback[tabindex="-1"]:focus {
  outline: none;
}
.practice-mode {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.mode-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.practice-mode .mode-row {
  margin: 0;
  border-color: var(--line);
  width: auto;
}
.practice-mode .mode-row button {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.82rem;
}
.mode-row button span {
  font-size: 0.68rem;
  margin-left: 5px;
  opacity: 0.8;
}
.mode-row button.on {
  background: var(--navy);
  color: var(--gold-soft);
}
#homeStats .dl small {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}
#homeStats .dl-rank b {
  font-size: 1.25rem;
  line-height: 1.25;
}
.sample-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 26px;
  margin: 28px 0 40px;
}
.sample-banner h2 {
  font:
    600 1.65rem/1.2 "Playfair Display",
    serif;
  margin: 10px 0;
  color: #fff;
}
.sample-banner p {
  font-size: 0.9rem;
  color: #c3ccdf;
  max-width: 40ch;
}
.sample-banner .btn {
  flex-shrink: 0;
}
.practice-tools {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0;
}
.practice-tools label {
  flex: 1;
  min-width: 180px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}
input[type="search"],
textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  font-size: 16px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  min-height: 44px;
}
textarea {
  min-height: 110px;
}
.review-filter {
  display: flex;
  gap: 8px;
}
.filter-pill {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  padding: 8px 13px;
}
.filter-pill.on {
  background: var(--navy);
  color: var(--gold-soft);
  border-color: var(--navy);
}
#caseRows .row {
  grid-template-columns: 86px 1fr auto;
}
#caseRows .ct {
  min-width: 0;
}
#caseRows .ct span {
  white-space: normal;
}
#caseRows .open-mark {
  white-space: nowrap;
}
.case-context {
  margin: 12px 0 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.8rem;
}
.case-context summary {
  display: list-item;
  min-height: 44px;
  align-content: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.case-context p {
  margin: 8px 0 12px;
  line-height: 1.6;
}
.case-context a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.evidence-card {
  display: block;
  padding: 14px;
  margin: 0;
}
.evidence-card p {
  margin: 0 0 12px;
  padding-top: 4px;
  line-height: 1.5;
}
.evidence-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.evidence-choices .tag {
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 0.72rem;
  letter-spacing: 0;
  background: var(--white);
}
.evidence-choices .tag.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--gold-soft);
}
.evidence-card.classified {
  border-color: var(--gold);
}
.evidence-card.classified::before {
  background: var(--gold);
}
.evidence-choices .tag:disabled {
  opacity: 0.7;
  cursor: default;
}
.evidence-choices .tag.selected:disabled {
  opacity: 1;
}
.filter-tabs .ft {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 8px;
  text-align: center;
}
.home-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0 0 8px;
  color: var(--navy);
  font-size: .86rem;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
#pg-how .wrap { max-width: 760px; padding-top: 32px; padding-bottom: 72px; }
#pg-how h2 {
  color: var(--navy);
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 7vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 20px;
}
#pg-how h3 {
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 30px 0 10px;
  padding-top: 22px;
}
#pg-how p, #pg-how li { font-size: .94rem; line-height: 1.7; }
#pg-how p { margin: 0 0 12px; }
#pg-how ol { padding-left: 24px; }
#pg-how li { margin-bottom: 10px; padding-left: 2px; }
.orow.chosen,
.dec-opt.chosen {
  border-color: var(--navy);
  background: var(--gold-pale);
  color: var(--navy);
}
.orow.chosen .dot {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: inset 0 0 0 3px var(--white);
}
.stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  font-size: 0.86rem;
}
.stamp.chosen {
  background: var(--navy);
  color: var(--gold-soft);
}
.stamp .dot {
  display: none;
}
.case-continue {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}
.case-continue .btn {
  min-height: 44px;
}
.dk-head .meta {
  margin: 0;
  width: auto;
}
.dk-head .timer {
  margin-top: 0;
}
.dk-body > .stage-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.dk-body > p {
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 10px 0;
}
.dk-body > .dk-note {
  font-size: 0.82rem;
  margin: 6px 0 12px;
}
.dk-sec,
#dosFeedback {
  scroll-margin-top: calc(84px + env(safe-area-inset-top, 0px));
}
.dk-body details:not(.case-context) {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 0.85rem;
}
.dk-body details:not(.case-context) summary {
  min-height: 44px;
  align-content: center;
  cursor: pointer;
}
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.play-actions .btn {
  min-height: 44px;
}
.result-head { display: block; }
.result-head h2 { margin: 8px 0 12px; }
.result-head .result-score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--gold-soft);
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
}
.result-head .result-score span {
  color: white;
  font-family: "Inter", sans-serif;
  font-size: .86rem;
  font-weight: 600;
}
.result-head .meta { margin-top: 8px; }
.result-section + .result-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 28px;
}
.result-section > h3 {
  margin: 0 0 16px;
  color: var(--navy);
  font-family: "Playfair Display", serif;
  font-size: 1.32rem;
  line-height: 1.3;
}
.result-section > p { margin: 12px 0; line-height: 1.65; }
.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}
.result-metrics > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9fb;
}
.result-metrics strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.result-metrics span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
}
.result-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.result-comparison p {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9fb;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.result-comparison .result-expected {
  background: #eef5fa;
  border-color: #b9d4e8;
}
.result-label {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.result-reason {
  margin-top: 16px !important;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--gold);
}
.result-evidence-list { display: grid; gap: 10px; }
.result-evidence {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f9fb;
}
.result-evidence h4 {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: .95rem;
  line-height: 1.45;
}
.result-evidence p { margin: 9px 0 0; font-size: .86rem; line-height: 1.5; }
.result-evidence .result-explanation {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
@media (max-width: 430px) {
  .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-metrics > div:first-child { grid-column: 1 / -1; }
  .result-comparison { grid-template-columns: 1fr; }
}
.gate p {
  margin: 12px 0;
  font-size: 0.9rem;
}
.gate .btn {
  margin: 8px 8px 0 0;
}
.gate .btn-navy {
  background: var(--gold);
  color: var(--navy);
}
.gate .btn-line {
  border-color: var(--gold);
  color: var(--gold-soft);
}
.gate .store-badges{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin:20px 0 4px}
.gate .store-badge{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0;border:0;background:none;box-shadow:none;line-height:0;transition:none}
.gate .store-badge img{display:block;height:44px;width:auto;max-width:100%}
.gate .store-badge:hover,.gate .store-badge:active{transform:none;box-shadow:none}
.gate .store-badge:focus-visible{outline:3px solid var(--gold);outline-offset:3px)}
.dos-row {
  min-height: 70px;
  gap: 12px;
}
.dos-row > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
#saveWarning {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #fff0d5;
  color: #642908;
}
#appNotice {
  position: fixed;
  z-index: 90;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  width: fit-content;
  max-width: min(560px, calc(100vw - 32px));
  margin-inline: auto;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 28px rgba(27, 42, 74, .24);
  font-size: .86rem;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#appNotice[hidden] { display: none; }
@media (min-width: 681px) { #appNotice { bottom: 24px; } }
button:disabled {
  cursor: default;
}
@media (max-width: 640px) {
  #homeStats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  #homeStats .dl {
    min-width: 0;
    padding: 18px 14px;
  }
  #homeStats .dl:nth-child(2) {
    border-right: 0;
  }
  #homeStats .dl-rank {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  #caseRows .row {
    grid-template-columns: 1fr auto;
  }
  .practice-mode {
    gap: 8px;
  }
  .practice-mode .mode-row {
    flex: 1;
    display: flex;
  }
  .practice-mode .mode-row button {
    flex: 1;
    padding: 8px 10px;
  }
  .mode-label {
    flex-basis: 100%;
  }
  .sample-banner {
    display: block;
    padding: 22px;
  }
  .sample-banner .btn {
    margin-top: 18px;
  }
  .case-continue .btn {
    width: 100%;
  }
  .dos-row {
    display: flex;
    flex-wrap: wrap;
  }
  .dk-head h2 {
    font-size: 1.5rem;
  }
  .dk-head .meta {
    font-size: 0.72rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  #introScreen {
    display: none !important;
  }
}
h1[tabindex="-1"]:focus {
  outline: none;
}
#dosBody > h3 {
  font:
    600 1.2rem/1.3 "Playfair Display",
    serif;
  color: var(--navy);
  margin: 24px 0 12px;
}
.dos-row b {
  font-family: "Playfair Display", serif;
  font-size: 1.02rem;
}
@media (max-width: 640px) {
  #pg-dossiers .rule-h {
    display: block;
  }
  #pg-dossiers .rh-note {
    display: block;
    margin-top: 6px;
  }
}

/* Compact home hero and plain-language learning controls, scoped to their components. */
#pg-home .investigation-hero {
  padding: 32px 0 24px;
  gap: 32px;
  align-items: center;
}
#pg-home .hero-eyebrow {
  font-family: "Azeret Mono", monospace;
  font-size: 0.69rem;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--muted);
}
#pg-home .investigation-hero h1 {
  font-size: clamp(2.45rem, 5vw, 3.65rem);
  line-height: 1.07;
  margin: 16px 0 18px;
  letter-spacing: -0.035em;
}
#pg-home .investigation-hero h1 em {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: #c9a84c;
  text-underline-offset: 9px;
  text-decoration-thickness: 3px;
}
#pg-home .investigation-hero .plain {
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  max-width: 470px;
  margin: 0 0 22px;
}
.hero-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}
.hero-actions .btn {
  min-height: 52px;
  width: 100%;
  max-width: 350px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 1rem;
  padding: 14px 20px;
}
.hero-text-link {
  border: 0;
  background: none;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 12px 0;
  min-height: 44px;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}
#pg-home .hero-proof {
  font-family: "Azeret Mono", monospace;
  font-size: 0.68rem;
  line-height: 1.8;
  margin: 14px 0 8px;
  color: var(--navy);
}
.hero-proof span {
  padding: 0 4px;
  color: #8b7230;
}
#pg-home .hero-mentor {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 430px;
  margin: 0;
}
.hero-case-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid #c9a84c;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 12px 28px rgba(27, 42, 74, 0.07);
}
.hero-case-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-case-id {
  font-family: "Azeret Mono", monospace;
  font-size: 0.68rem;
  color: var(--muted);
}
#pg-home .hero-case-preview h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--navy);
  margin: 22px 0 12px;
  border: 0;
  padding: 0;
}
#pg-home .hero-case-preview > p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 22px;
}
.hero-case-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.hero-case-figures strong {
  display: block;
  font-family: "Playfair Display", serif;
  color: var(--navy);
  font-size: 1.65rem;
}
.hero-case-figures span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.5;
  margin-top: 7px;
  color: var(--muted);
}
.hero-case-question {
  display: flex;
  gap: 12px;
  margin: 20px 0 8px;
  align-items: flex-start;
}
.hero-case-question > span {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f5edd7;
  color: #725a17;
  text-align: center;
  font-weight: 700;
}
#pg-home .hero-case-question p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--navy);
}
.hero-case-open {
  font: inherit;
  color: var(--navy);
  font-weight: 700;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 16px 0 0;
  margin-top: 16px;
  width: 100%;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.case-context h4 {
  font:
    700 0.9rem/1.4 Inter,
    sans-serif;
  margin: 20px 0 7px;
  color: var(--navy);
}
.case-context p,
.term-list dd {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 12px;
}
.term-list {
  margin: 10px 0;
}
.term-list dt {
  font-weight: 700;
  color: var(--navy);
  margin: 14px 0 5px;
}
.term-list dd {
  margin-left: 0;
}
.evidence-guide,
.action-guide {
  margin: 12px 0 22px;
  font-size: 0.86rem;
  line-height: 1.6;
  background: #f7f9fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.evidence-guide summary,
.action-guide summary {
  cursor: pointer;
  color: var(--navy);
  min-height: 28px;
  font-weight: 600;
}
.evidence-guide p,
.action-guide p {
  margin: 12px 0 0;
}
.evidence-choices {
  gap: 6px;
}
.evidence-choices .tag {
  font-size: 0.75rem;
  min-height: 44px;
  padding: 8px 5px;
  white-space: normal;
}
.evidence-choices .tag[data-value="concern"].selected {
  background: #fff0ed;
  border-color: #a43c32;
  color: #872d25;
}
.evidence-choices .tag[data-value="context"].selected {
  background: #fbf4df;
  border-color: #91701c;
  color: #674d0c;
}
.evidence-choices .tag[data-value="support"].selected {
  background: #edf5f0;
  border-color: #47705b;
  color: #29533c;
}
@media (max-width: 820px) {
  #pg-home .investigation-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 26px;
  }
  .hero-case-preview {
    max-width: 520px;
  }
  #pg-home .hero-copy {
    max-width: 520px;
  }
  #pg-home .investigation-hero h1 {
    font-size: clamp(2.4rem, 9.5vw, 3.3rem);
  }
  #pg-home .investigation-hero .plain {
    margin-bottom: 20px;
  }
  .hero-actions .btn {
    max-width: none;
  }
}
@media (max-width: 360px) {
  .evidence-choices .tag {
    font-size: 0.68rem;
  }
  .hero-case-preview {
    padding: 18px;
  }
  .hero-case-figures {
    gap: 10px;
  }
}

/* Service Record: compact scorecard, original navy/serif styling. */
#pg-progress .rule-h {
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 22px;
}
#pg-progress .rule-h .rh-note {
  font:
    400 0.8rem/1.5 Inter,
    sans-serif;
  letter-spacing: 0;
}
#progBody {
  max-width: 880px;
  margin: 0 auto;
  padding-bottom: 24px;
}
#progBody .record-overview,
#progBody .record-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 20px;
}
#progBody .record-rank {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--navy);
  color: white;
}
#progBody .record-eyebrow {
  display: block;
  font: 500 0.64rem/1.6 var(--mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}
#progBody .record-rank .record-eyebrow {
  color: #d9c384;
}
#progBody .record-rank h3 {
  font:
    600 1.65rem/1.25 "Playfair Display",
    serif;
  color: white;
  margin: 7px 0 0;
}
#progBody .record-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 58px;
  font: 500 1.55rem/1.1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: #e6cd83;
}
#progBody .record-points small {
  font:
    400 0.72rem/1.5 Inter,
    sans-serif;
  color: #d7deea;
  margin-top: 6px;
}
#progBody .record-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}
#progBody .record-stat {
  padding: 22px 18px;
  min-width: 0;
  border-right: 1px solid var(--line);
}
#progBody .record-stat:last-child {
  border-right: 0;
}
#progBody .record-stat dt {
  font:
    600 0.78rem/1.4 Inter,
    sans-serif;
  color: var(--navy);
}
#progBody .record-stat dd {
  font:
    600 2.1rem/1.2 "Playfair Display",
    serif;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  margin: 9px 0 5px;
}
#progBody .record-stat dd small {
  font:
    400 0.78rem/1.4 Inter,
    sans-serif;
  color: var(--muted);
}
#progBody .record-stat > span {
  display: block;
  font:
    0.7rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
}
#progBody .record-scoring {
  border-top: 1px solid var(--line);
  padding: 0 20px;
}
#progBody .record-scoring summary {
  font:
    500 0.75rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
  cursor: pointer;
  min-height: 44px;
  align-content: center;
  padding: 12px 0;
}
#progBody .record-scoring p {
  font:
    0.8rem/1.7 Inter,
    sans-serif;
  margin: 0 0 16px;
  color: var(--muted);
}
#progBody .record-panel {
  padding: 22px 24px;
}
#progBody .record-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
#progBody .record-section-head h3 {
  font:
    600 1.3rem/1.25 "Playfair Display",
    serif;
  color: var(--navy);
  margin: 0;
}
#progBody .record-section-head > span {
  font:
    0.72rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
  white-space: nowrap;
}
#progBody .record-discipline + .record-discipline {
  margin-top: 20px;
}
#progBody .record-discipline-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 8px;
}
#progBody .record-discipline-label b {
  font:
    500 0.84rem/1.5 Inter,
    sans-serif;
  color: var(--navy);
}
#progBody .record-discipline-label > span {
  font: 500 0.8rem/1.5 var(--mono);
  color: var(--navy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#progBody .record-discipline-label small {
  color: var(--muted);
  font: inherit;
}
#progBody .record-discipline progress {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #edf0f4;
  color: #a58636;
}
#progBody .record-discipline progress::-webkit-progress-bar {
  background: #edf0f4;
  border-radius: 8px;
}
#progBody .record-discipline progress::-webkit-progress-value {
  background: #a58636;
  border-radius: 8px;
}
#progBody .record-discipline progress::-moz-progress-bar {
  background: #a58636;
  border-radius: 8px;
}
#progBody .record-mastery {
  display: block;
  font:
    0.68rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
  margin-top: 6px;
}
#progBody .record-count {
  background: #f1f4f8;
  padding: 4px 9px;
  border-radius: 20px;
}
#progBody .record-empty {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 6px 0 18px;
}
#progBody .record-check {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: #edf4ef;
  color: #346349;
  border-radius: 50%;
  font:
    600 1rem/30px Inter,
    sans-serif;
  text-align: center;
}
#progBody .record-empty h4,
#progBody .record-review h4 {
  font:
    600 0.88rem/1.5 Inter,
    sans-serif;
  color: var(--navy);
  margin: 0 0 5px;
}
#progBody .record-empty p,
#progBody .record-note,
#progBody .record-review p {
  font:
    0.82rem/1.65 Inter,
    sans-serif;
  color: var(--muted);
  margin: 0 0 14px;
}
#progBody .record-empty p {
  margin: 0;
}
#progBody .record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font:
    600 0.8rem/1.4 Inter,
    sans-serif;
  padding: 11px 16px;
  text-align: center;
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
}
#progBody .record-button-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
#progBody .record-button:hover {
  border-color: var(--navy);
}
#progBody .record-review + .record-review {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}
#progBody .record-review h4 {
  margin-top: 6px;
}
#progBody .record-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#progBody .record-tools {
  padding: 0;
}
#progBody .record-tools > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  color: var(--navy);
  font:
    600 0.94rem/1.4 Inter,
    sans-serif;
}
#progBody .record-tools > summary::-webkit-details-marker {
  display: none;
}
#progBody .record-tools summary small {
  display: block;
  font:
    400 0.75rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
  margin-top: 5px;
}
#progBody .record-disclosure {
  font:
    400 1.5rem/1 Inter,
    sans-serif;
}
#progBody .record-tools[open] .record-disclosure {
  transform: rotate(45deg);
}
#progBody .record-tools-body {
  padding: 0 24px 22px;
  border-top: 1px solid var(--line);
}
#progBody .record-tools-body > .record-note {
  margin-top: 18px;
}
#progBody .record-tool-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 12px;
}
#progBody .record-tool-buttons .record-button:last-child {
  grid-column: 1/-1;
}
#progBody .record-caption {
  font:
    0.72rem/1.6 Inter,
    sans-serif;
  color: var(--muted);
  margin: 10px 0 0;
}
#progBody .record-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  font:
    500 0.84rem/1.5 Inter,
    sans-serif;
  color: var(--navy);
  cursor: pointer;
}
#progBody .record-reminder small {
  display: block;
  font:
    0.72rem/1.5 Inter,
    sans-serif;
  color: var(--muted);
}
#progBody .record-reminder input {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--navy);
  margin: 0;
}
#progBody .record-reset {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#progBody .record-button-danger {
  color: #a53b30;
  border-color: #e8c5bf;
  background: #fff;
}
@media (max-width: 600px) {
  #progBody .record-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #progBody .record-stat {
    padding: 18px;
  }
  #progBody .record-stat:nth-child(2) {
    border-right: 0;
  }
  #progBody .record-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  #progBody .record-rank {
    padding: 20px;
  }
  #progBody .record-rank h3 {
    font-size: 1.45rem;
  }
  #progBody .record-panel {
    padding: 20px;
  }
  #progBody .record-tools {
    padding: 0;
  }
  #progBody .record-tools > summary {
    padding: 18px 20px;
  }
  #progBody .record-tools-body {
    padding: 0 20px 20px;
  }
  #progBody .record-stat dt {
    font-size: 0.75rem;
  }
  #progBody .record-scoring {
    padding: 0 18px;
  }
}
@media (max-width: 360px) {
  #progBody .record-stat {
    padding: 16px 13px;
  }
  #progBody .record-panel {
    padding: 18px 16px;
  }
  #progBody .record-rank {
    padding: 18px 16px;
  }
  #progBody .record-tools {
    padding: 0;
  }
  #progBody .record-tool-buttons {
    grid-template-columns: 1fr;
  }
  #progBody .record-tool-buttons .record-button:last-child {
    grid-column: auto;
  }
}
@media(max-width:600px){#pg-progress .rule-h .rh-note{flex-basis:100%;margin-left:0;text-align:left}}

/* Investigation hierarchy: clear headings, readable facts, and distinct feedback. */
.dk-body .dk-sec {
  color: var(--navy);
  font: 700 1.05rem/1.35 Inter, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  margin: 30px 0 8px;
}
.dk-body .dk-sec::after { background: var(--gold); opacity: .65; }
.dk-body > .stage-title {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 12px;
}
.dk-body > p { font-size: .98rem; line-height: 1.65; }
.dk-body > .dk-note { font-size: .88rem; line-height: 1.5; }
.dk-body .detail { gap: 6px 18px; }
.dk-body .detail dt {
  color: var(--navy-soft);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.dk-body .detail dd {
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.55;
  padding-bottom: 12px;
}
.dk-body .detail dd:first-of-type {
  border-left: 3px solid var(--gold);
  padding-left: 12px;
  font-weight: 600;
}
.case-context summary { color: var(--navy); font-size: .96rem; }
.case-context h4 {
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.35;
  margin: 22px 0 8px;
}
.case-context p { font-size: .94rem; }
.evidence-card p { font-size: .96rem; line-height: 1.5; }
.evidence-choices .tag { font-size: .8rem; font-weight: 700; }
.reveal h3 { color: var(--navy); font-size: 1.12rem; line-height: 1.3; margin: 4px 0 10px; }
.reveal .rl { display: block; font-size: .72rem; letter-spacing: .1em; }
.reveal p { font-size: .96rem; }
.reveal .reveal-cta { margin-top: 18px; }
.evidence-trail article { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.evidence-trail .stage-index {
  display: block;
  color: var(--navy-soft);
  font: 700 .74rem/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.evidence-trail article p { font-size: .94rem; line-height: 1.65; margin: 6px 0 10px; }

/* Queue cards distinguish the case, metadata, and next action. */
#queueBody .alrt {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}
#queueBody .alrt h3 {
  color: var(--navy);
  font: 700 1.18rem/1.3 "Playfair Display", serif;
  margin: 6px 0 8px;
}
#queueBody .alrt p { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 4px 0; }
#queueBody .alrt p:first-of-type { color: var(--navy-soft); font-weight: 600; }
#queueBody .alrt .btn { min-height: 44px; }

@media (max-width: 640px) {
  #pg-home .rule-h, #pg-queue .rule-h { display: block; }
  #pg-home .rule-h .rh-note, #pg-queue .rule-h .rh-note {
    display: block;
    margin: 5px 0 0;
    font-size: .76rem;
    line-height: 1.45;
  }
  #queueBody .alrt { gap: 12px; }
}

/* Monetary figures are visual callouts throughout cases, dossiers and the home preview. */
.money-amount,
#pg-home .hero-case-figures strong {
  color: var(--seal);
  font-weight: 700;
}
#pg-home .hero-case-figures strong > .money-amount {
  display: inline;
  color: inherit;
  font: inherit;
  margin: 0;
}
.dk-head .money-amount,
.btn-navy .money-amount,
.gate .money-amount { color: #ffaba3; }

/* The six disciplines are information, not clickable filters. */
#pg-home .disc-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 4px;
  counter-reset: discipline;
}
#pg-home .disc-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid #c9a84c;
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font: 600 .91rem/1.35 Inter, sans-serif;
  letter-spacing: 0;
  white-space: normal;
  counter-increment: discipline;
}
#pg-home .disc-pill::before {
  content: counter(discipline, decimal-leading-zero);
  color: var(--gold-deep);
  font: 600 .68rem/1 var(--mono);
  letter-spacing: .04em;
  flex-shrink: 0;
}
#pg-home .disc-pill:hover { background: var(--white); }
@media (max-width: 760px) {
  #pg-home .disc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  #pg-home .disc-strip { grid-template-columns: 1fr; }
}

/* Paid investigation workbook: a distinct teaching layer after the basic case. */
#pg-dosplay .investigation-workbook,
#pg-dosplay .investigation-review,
#pg-dosplay .investigation-synthesis {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
#pg-dosplay .investigation-workbook {
  background: #f9f8f4;
  border-left: 4px solid var(--gold);
}
#pg-dosplay .workbook-kicker {
  display: block;
  color: var(--gold-deep);
  font: 700 .69rem/1.45 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
#pg-dosplay .investigation-workbook h4,
#pg-dosplay .investigation-review h4 {
  color: var(--navy);
  font: 700 1.15rem/1.35 Inter, sans-serif;
  margin: 0 0 14px;
}
#pg-dosplay .investigation-workbook > p {
  margin: 12px 0;
  line-height: 1.55;
}
#pg-dosplay .investigation-workbook > p strong {
  display: block;
  color: var(--navy);
  font-size: .78rem;
  margin-bottom: 4px;
}
#pg-dosplay .investigation-workbook .case-context {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
#pg-dosplay .investigation-review {
  background: #f6f9fc;
  border-color: #d5e0eb;
}
#pg-dosplay .investigation-review > p,
#pg-dosplay .workbook-note {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}
#pg-dosplay .investigation-review h4:not(:first-of-type) {
  margin-top: 26px;
}
#pg-dosplay .workbook-evidence {
  border-top: 1px solid #d5e0eb;
}
#pg-dosplay .workbook-evidence > div {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid #d5e0eb;
  font-size: .9rem;
  line-height: 1.45;
}
#pg-dosplay .workbook-evidence small {
  color: var(--navy-soft);
  font-size: .78rem;
  line-height: 1.5;
}
#pg-dosplay .workbook-evidence small strong { color: var(--navy); }
#pg-dosplay .workbook-evidence .is-review {
  border-left: 3px solid var(--seal);
  padding-left: 12px;
}
#pg-dosplay .workbook-evidence .is-review small { color: var(--seal); }
#pg-dosplay .workbook-choices {
  display: grid;
  gap: 8px;
}
#pg-dosplay .workbook-choices details {
  border: 1px solid #d5e0eb;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
}
#pg-dosplay .workbook-choices summary {
  cursor: pointer;
  padding: 13px 0;
  color: var(--navy);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.45;
}
#pg-dosplay .workbook-choices details p {
  margin: 0 0 14px;
  font-size: .88rem;
  line-height: 1.55;
}
#pg-dosplay .workbook-preferred {
  display: inline-block;
  margin-left: 5px;
  color: #355c37;
  font-size: .73rem;
  font-weight: 700;
}
#pg-dosplay .workbook-takeaway {
  margin-top: 18px;
  border-left: 3px solid var(--gold);
  padding: 3px 0 3px 14px;
}
#pg-dosplay .workbook-takeaway strong {
  display: block;
  color: var(--navy);
  font-size: .85rem;
}
#pg-dosplay .workbook-takeaway p {
  margin: 7px 0 0;
  font-size: .9rem;
  line-height: 1.6;
}
#pg-dosplay .stage-continue { margin: 20px 0 0; }
#pg-dosplay .investigation-synthesis ol {
  list-style: none;
  counter-reset: work-stage;
  margin: 18px 0;
  padding: 0;
}
#pg-dosplay .investigation-synthesis li {
  counter-increment: work-stage;
  border-top: 1px solid var(--line);
  padding: 16px 0 16px 36px;
  position: relative;
}
#pg-dosplay .investigation-synthesis li::before {
  content: counter(work-stage, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 17px;
  color: var(--gold-deep);
  font: 700 .75rem/1.4 var(--mono);
}
#pg-dosplay .investigation-synthesis li strong,
#pg-dosplay .investigation-synthesis li span,
#pg-dosplay .investigation-synthesis li small { display: block; }
#pg-dosplay .investigation-synthesis li strong { color: var(--navy); }
#pg-dosplay .investigation-synthesis li span {
  margin: 5px 0;
  font-size: .88rem;
  line-height: 1.55;
}
#pg-dosplay .investigation-synthesis li small {
  color: var(--muted);
  font-size: .78rem;
}
#pg-dosplay .workbook-reference { margin-top: 18px; font-size: .85rem; }
@media (max-width: 600px) {
  #pg-dosplay .investigation-workbook,
  #pg-dosplay .investigation-review,
  #pg-dosplay .investigation-synthesis { padding: 18px; }
}
