/*
 * SSBA companion site readability and interaction pass.
 * Loaded after the existing page styles so the original design and content remain intact.
 */

:root {
  --readable-control-border: #687887;
  --readable-success: #1f6b45;
  --readable-success-bg: #eaf5ee;
  --readable-error: #842f2f;
  --readable-error-bg: #faecec;
  --readable-focus: #d07a28;
  --readable-question-bg: #edf3f8;
  --readable-question-border: #7890a6;
}

body {
  font-size: 1.125rem;
  line-height: 1.6;
}

main p,
main li,
main dd,
main td,
main blockquote {
  line-height: 1.62;
}

.draft-banner,
.preview-banner {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.site-header .site-title,
.site-header h1 {
  font-size: 1.25rem;
}

.site-header p {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.site-nav a {
  font-size: 0.9375rem;
  line-height: 1.35;
  min-height: 44px;
}

.site-footer,
.site-footer .footer-title {
  font-size: 0.9375rem;
  line-height: 1.55;
}

.trust-strip strong,
.trust-strip span,
main .home-edition {
  font-size: 0.875rem;
  line-height: 1.45;
}

.btn,
.all-steps-button,
.all-areas-button,
.back-to-top,
.branch-choice,
.domain-buttons button,
.filter-clear,
.jump-close,
.match-item,
.prompt-copy,
.quiz-option,
.term-trigger,
main button,
main input,
main select,
main textarea {
  font-size: 1rem;
}

.btn,
.all-steps-button,
.all-areas-button,
.back-to-top,
.branch-choice,
.domain-buttons button,
.filter-clear,
.jump-close,
.match-item,
.prompt-copy,
.quiz-option,
.term-trigger,
main input:not([type="checkbox"]):not([type="radio"]),
main select {
  min-height: 44px;
}

main input:not([type="checkbox"]):not([type="radio"]),
main select,
main textarea,
.quiz-option,
.branch-choice,
.match-item,
.term-trigger,
.domain-buttons button,
.all-areas-button,
.all-steps-button,
.jump-close,
.order-controls button {
  border-color: var(--readable-control-border);
}

main input[type="checkbox"],
main input[type="radio"] {
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--readable-focus);
  outline-offset: 3px;
}

.hb-card h2,
.path-card h2,
.example-card h3,
.key-terms h2,
.continuum-dimensions h3 {
  line-height: 1.3;
}

.path-card > p:not(.card-eyebrow),
.hb-card p,
.example-card .annotation,
.edition-card p,
.prompt-body,
.branch-prompt,
.match-instructions,
.quiz-question,
.quiz-option,
.question-box ol,
.callout p,
.notice-strong p,
.statement-edit textarea {
  font-size: 1rem;
}

.path-card .card-eyebrow,
.page-title-kicker,
.course-card-num,
.course-card-status,
.edition-card-label,
.filters label,
.library-search-row label,
.search-field label,
.prompt-label,
.branch-lesson-label,
.key-terms p,
.term-trigger,
.deeper summary,
.continuum-access summary,
.continuum-crosswalk summary,
.drafting-note,
.drafting-note summary,
.field label,
.check-row .hint,
.principle-item p,
.review-note,
.sa-options,
.status-msg,
.cross-ref,
.progress-line,
.resume-actions .btn,
.jump-list button {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.download-list .dl-meta,
.file-list .dl-meta,
.prevnext .pn-label,
.prompt-note,
.branch-note,
.match-done-label,
.match-note,
.provenance,
.locate-hint,
.results-count,
.filters-label,
.badge-row,
.badge,
.section-refs,
.example-card .annotation strong {
  font-size: 0.875rem;
  line-height: 1.5;
}

.course-progress-copy .page-title-kicker,
.course-progress-copy p,
.library-search-row > div:last-child label,
.filters .filter-clear,
.filters .filters-label,
.filters > div:last-child .filters-label {
  font-size: 0.9375rem !important;
  line-height: 1.5;
}

.quiz-progress,
.quiz-note,
.source-line,
.example-card .pub-line,
.continuum-table caption,
.jump-meta,
.match-pair-join,
.statement-meta {
  font-size: 0.875rem;
  line-height: 1.5;
}

.example-card h3,
.principle-item h4,
.jump-head h2 {
  font-size: 1.125rem;
}

.callout h3,
.callout h4,
.callout h2,
.question-box h3,
.question-box h2,
.notice-strong h4 {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.key-terms h2 {
  font-size: 1.125rem;
}

.continuum-table {
  font-size: 1rem;
}

.continuum-table thead th,
.continuum-table tbody th {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.continuum-table th,
.continuum-table td {
  padding: 0.7rem 0.75rem;
}

.continuum-dimensions li > span,
.band-jump span,
.continuum-capabilities dt {
  font-size: 0.875rem;
  line-height: 1.4;
}

.continuum-dimensions h3,
.continuum-band header h2 {
  font-size: 1.125rem;
}

.continuum-dimensions p,
.band-jump a,
.continuum-band header p,
.continuum-band header span,
.continuum-capabilities dd,
.continuum-evidence aside li {
  font-size: 1rem;
  line-height: 1.55;
}

.continuum-crosswalk summary,
.continuum-access summary {
  font-size: 1rem;
  line-height: 1.45;
}

.continuum-crosswalk th,
.continuum-crosswalk td {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.quiz-options li,
.branch-choices li,
.match-list li {
  margin-block: 0.55rem;
}

/* Keep question prompts visually separate from directions and response choices. */
.quiz-question,
.branch-prompt,
.match-instructions {
  margin: 0.2rem 0 0.95rem;
  padding: 0.85rem 1rem;
  color: var(--navy, #1f3a5f);
  background: var(--readable-question-bg);
  border: 1px solid #c1cfdb;
  border-left: 5px solid var(--readable-question-border);
  border-radius: 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
}

.quiz-option,
.branch-choice,
.match-item {
  padding: 0.7rem 0.9rem;
}

.quiz-feedback,
.match-status,
.match-note,
.match-pair,
.term-def {
  font-size: 1rem;
  line-height: 1.55;
}

.quiz-feedback:not(:empty) {
  padding: 0.85rem 1rem;
  border: 1px solid currentColor;
  border-left-width: 5px;
  border-radius: 4px;
}

.quiz-feedback > strong {
  font-weight: 700;
}

.quiz-feedback.is-correct {
  color: var(--readable-success);
  background: var(--readable-success-bg);
}

.quiz-feedback.is-wrong {
  color: var(--readable-error);
  background: var(--readable-error-bg);
}

.quiz-option.correct {
  border-color: var(--readable-success);
  box-shadow: inset 5px 0 0 var(--readable-success);
  background: var(--readable-success-bg);
}

.quiz-option.correct .quiz-mark,
.quiz-feedback.is-correct,
.match-pair-check {
  color: var(--readable-success);
}

.quiz-option.wrong {
  border-color: var(--readable-error);
  box-shadow: inset 5px 0 0 var(--readable-error);
  background: var(--readable-error-bg);
}

.quiz-option.wrong .quiz-mark,
.quiz-feedback.is-wrong {
  color: var(--readable-error);
}

.match-done {
  background: var(--readable-success-bg);
  border-left-color: var(--readable-success);
}

.match-done-label,
.match-pair-num {
  color: var(--readable-success);
}

.match-pair-num {
  width: 1.6rem;
  height: 1.6rem;
  background: var(--readable-success);
  color: #fff;
  font-size: 0.875rem;
}

.statement-actions button,
.link-button,
.order-controls button,
.btn-quiet {
  min-height: 36px;
  font-size: 0.9375rem;
  padding: 0.35rem 0.45rem;
}

.field input[type="text"],
.statement-edit textarea {
  border-color: var(--readable-control-border);
}

.prevnext {
  align-items: stretch;
  gap: 0.85rem;
  padding-top: 1.2rem;
}

.prevnext a {
  display: flex;
  flex: 1 1 15rem;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.prevnext a:hover {
  background: var(--pale-blue);
}

.prevnext .pn-next {
  background: var(--navy);
  color: #fff;
}

.prevnext .pn-next:hover {
  background: var(--navy-light);
}

.prevnext .pn-next .pn-label {
  color: rgba(255, 255, 255, 0.85);
}

.module-introduction {
  margin: 1.35rem 0 1.6rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--navy-light);
  background: var(--pale-blue);
}

@media (max-width: 760px) {
  body {
    font-size: 1.0625rem;
  }

  .site-nav a {
    font-size: 1rem;
  }

  .continuum-table {
    font-size: 0.9375rem;
  }

  .prevnext {
    flex-direction: column;
  }

  .prevnext a {
    flex-basis: auto;
    width: 100%;
  }
}

@media (forced-colors: active) {
  .quiz-option.correct,
  .quiz-option.wrong,
  .match-done {
    border: 2px solid CanvasText;
  }
}

/* Site-wide hierarchy and secondary-text legibility */
main h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

main h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.7rem);
  line-height: 1.24;
}

main h3 {
  font-size: 1.2rem;
  line-height: 1.32;
}

.download-list .dl-meta,
.file-list .dl-meta,
.prevnext .pn-label,
.prompt-note,
.branch-note,
.match-done-label,
.match-note,
.provenance,
.locate-hint,
.results-count,
.filters-label,
.badge-row,
.badge,
.section-refs,
.example-card .annotation strong,
.quiz-progress,
.quiz-note,
.source-line,
.example-card .pub-line,
.continuum-table caption,
.jump-meta,
.match-pair-join,
.statement-meta,
.trust-strip strong,
.trust-strip span,
main .home-edition {
  font-size: 0.9375rem;
}

.area-bar a,
.area-bar-pos,
.quiet-links,
.file-list a,
.continuum-dimensions li > span,
.band-jump span,
.continuum-capabilities dt {
  font-size: 0.9375rem;
}

.continuum-commitments li,
.continuum-access li,
.continuum-roles p,
.continuum-crosswalk p,
.continuum-crosswalk li {
  font-size: 0.9375rem;
}

.continuum-evidence > div > ul li {
  font-size: 0.9375rem;
}

.callout h3,
.callout h4,
.callout h2,
.question-box h3,
.question-box h2,
.notice-strong h4 {
  font-size: 1.0625rem;
}

/* Policy-generator domain hierarchy */
.policy-domain-header {
  margin: 0 0 1.35rem;
  padding: 1.15rem 1.3rem 1.2rem;
  color: #fff;
  background: var(--navy, #1f3a5f);
  border-left: 7px solid var(--gold, #d07a28);
  border-radius: 0.45rem;
  box-shadow: 0 4px 16px rgba(22, 45, 75, 0.14);
}

.policy-domain-header h2 {
  margin: 0.18rem 0 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  line-height: 1.18;
}

.policy-domain-header p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
}

.policy-domain-label {
  display: block;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.policy-domain-screen > h3 {
  margin-top: 1.65rem;
  font-size: 1.22rem;
}

.domain-topic-nav {
  margin: 0.85rem 0 1.55rem;
  padding: 1rem 1.1rem;
  background: var(--pale-blue, #edf2f7);
  border: 1px solid #b9c6d3;
  border-radius: 0.4rem;
}

.domain-topic-nav-label {
  margin: 0 0 0.45rem;
  color: var(--navy, #1f3a5f);
  font-size: 0.9375rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.domain-topic-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding-left: 1.25rem;
}

.domain-topic-nav a {
  color: var(--navy, #1f3a5f);
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.domain-selection-count {
  margin: 0.8rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid #c8d2dc;
  color: #374f68;
  font-size: 0.9375rem;
  font-weight: 700;
}

.statement-topic-heading {
  scroll-margin-top: 1.25rem;
  margin: 2rem 0 0.85rem;
  padding: 0 0 0.5rem;
  color: var(--navy, #1f3a5f);
  font-size: 1.3rem;
  font-weight: 800;
  border-bottom: 3px solid var(--gold, #d07a28);
}

.statement-card button,
.statement-edit button {
  font-weight: 750;
}

.statement-card .btn-secondary,
.statement-edit .btn-secondary {
  background: #eef2f6;
  border-color: #60758a;
  color: var(--navy, #1f3a5f);
}

/* Appendix B self-check: segmented workflow and response profile */
[hidden] {
  display: none !important;
}

.segmented-self-check {
  --sa-border: #bac7d3;
}

.sa-sync-note {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1rem;
  background: #eef3f8;
  border-left: 4px solid var(--navy-light, #375d82);
  border-radius: 0.25rem;
}

.sa-segment-controls {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: #f5f7f9;
  border: 1px solid var(--sa-border);
  border-radius: 0.45rem;
}

.sa-segment-controls-bottom {
  margin-top: 1.4rem;
}

.sa-segment-progress {
  margin: 0 0 0.7rem;
  color: var(--navy, #1f3a5f);
  font-size: 1rem;
  font-weight: 800;
}

.sa-segment-actions {
  display: grid;
  grid-template-columns: auto minmax(14rem, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.sa-segment-actions label {
  display: grid;
  gap: 0.25rem;
  color: #334a61;
  font-size: 0.9375rem;
  font-weight: 700;
}

.sa-segment-actions select {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 2.1rem 0.55rem 0.7rem;
  background-color: #fff;
}

.segmented-self-check > fieldset {
  margin: 1.15rem 0 0;
  padding: 1.15rem 1.15rem 1.3rem;
  border: 2px solid var(--sa-border);
  border-radius: 0.5rem;
  background: #fff;
}

.segmented-self-check > fieldset > legend {
  max-width: calc(100% - 1rem);
  padding: 0 0.45rem;
  color: var(--navy, #1f3a5f);
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
}

.sa-evidence {
  margin: 0.35rem 0 1.1rem;
  padding: 0.7rem 0.85rem;
  background: #f2f5f8;
  border: 1px solid #c7d1db;
  border-radius: 0.35rem;
}

.sa-evidence summary {
  color: var(--navy, #1f3a5f);
  font-weight: 800;
  cursor: pointer;
}

.sa-evidence p {
  margin: 0.65rem 0 0;
  font-size: 1rem;
}

.segmented-self-check .sa-item {
  margin: 0.9rem 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #b8c6d2;
  border-radius: 0.45rem;
  box-shadow: 0 2px 7px rgba(23, 47, 79, 0.07);
}

.segmented-self-check .sa-item > p {
  margin: 0;
  padding: 0.9rem 1rem;
  color: var(--navy, #1f3a5f);
  background: var(--readable-question-bg);
  border-bottom: 1px solid #c8d3dd;
  border-left: 5px solid var(--readable-question-border);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
}

.segmented-self-check .sa-options {
  gap: 0.45rem 1.2rem;
  padding: 0.8rem 1rem 0.95rem;
  background: #fff;
}

.segmented-self-check .sa-options label {
  min-height: 44px;
  padding: 0.35rem 0.15rem;
}

.sa-results-summary {
  margin: 1.2rem 0;
  padding: 1.2rem;
  background: #fff;
  border: 2px solid var(--navy-light, #375d82);
  border-radius: 0.5rem;
}

.sa-results-summary > h3 {
  margin-top: 0;
  color: var(--navy, #1f3a5f);
  font-size: 1.55rem;
}

.sa-safeguard-summary {
  margin-top: 1.2rem;
  padding: 1rem;
  background: #f3f6f9;
  border-left: 5px solid var(--gold, #d07a28);
}

.sa-safeguard-summary h4,
.sa-priority-field label {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--navy, #1f3a5f);
  font-size: 1.125rem;
  font-weight: 800;
}

.sa-profile-wrap {
  max-width: 100%;
  margin: 1.35rem 0;
  overflow-x: auto;
  border: 1px solid var(--sa-border);
  border-radius: 0.35rem;
}

.sa-profile-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.sa-profile-table caption {
  padding: 0.8rem;
  color: var(--navy, #1f3a5f);
  font-size: 1.125rem;
  font-weight: 800;
  text-align: left;
}

.sa-profile-table th,
.sa-profile-table td {
  padding: 0.65rem 0.7rem;
  border-top: 1px solid #d1dae2;
  text-align: center;
  vertical-align: middle;
}

.sa-profile-table thead th {
  color: #fff;
  background: var(--navy, #1f3a5f);
  white-space: nowrap;
}

.sa-profile-table tbody th {
  min-width: 18rem;
  text-align: left;
}

.sa-profile-table tbody th span {
  display: block;
  color: #52677a;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.sa-profile-table tbody tr:nth-child(even) {
  background: #f5f7f9;
}

.sa-priority-field {
  margin-top: 1.4rem;
}

.sa-priority-field textarea {
  width: 100%;
  min-height: 10rem;
  padding: 0.8rem;
  resize: vertical;
  background: #fff;
  border: 2px solid var(--readable-control-border);
  border-radius: 0.35rem;
}

.sa-priority-field p {
  margin: 0.55rem 0 0;
  color: #52677a;
  font-size: 0.9375rem;
}

@media (max-width: 760px) {
  .domain-topic-nav ul {
    grid-template-columns: 1fr;
  }

  .sa-segment-actions {
    grid-template-columns: 1fr;
  }

  .sa-segment-actions .btn,
  .sa-segment-actions label {
    width: 100%;
  }

  .segmented-self-check > fieldset {
    padding-inline: 0.8rem;
  }

  .quiz-question,
  .branch-prompt,
  .match-instructions,
  .segmented-self-check .sa-item > p,
  .segmented-self-check .sa-options {
    padding-inline: 0.8rem;
  }

  .sa-profile-table {
    font-size: 0.875rem;
  }
}

@media (forced-colors: active) {
  .policy-domain-header,
  .sa-results-summary,
  .sa-segment-controls,
  .segmented-self-check > fieldset {
    border: 2px solid CanvasText;
  }
}

/* Continuum application area */
.continuum-roles > .continuum-board-use {
  display: block;
  max-width: none;
  margin: 1.1rem 0 2.25rem;
  padding: 1.15rem 1.3rem;
  background: var(--parchment);
  border: 0;
  border-top: 3px solid var(--navy);
  border-bottom: 1px solid var(--rule);
}

.continuum-board-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.continuum-board-actions li {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(31, 58, 95, 0.22);
}

.continuum-board-actions strong,
.continuum-board-actions span {
  display: block;
}

.continuum-board-actions strong {
  margin-bottom: 0.28rem;
  color: var(--navy);
  font-family: var(--sans);
  font-size: 1rem;
}

.continuum-board-actions span {
  line-height: 1.52;
}

.continuum-roles .continuum-boundary {
  max-width: 58rem;
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
}

.continuum-boundary strong {
  color: var(--navy);
  font-family: var(--sans);
}

.continuum-board-use + h2 {
  margin-top: 0;
}

.continuum-roles > .continuum-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.continuum-roles > .continuum-review {
  display: block;
  margin-top: 1rem;
  padding: 1.05rem 1.2rem;
  background: var(--pale-blue);
  border: 0;
  border-left: 5px solid var(--navy);
}

.continuum-review h3 {
  margin-top: 0;
}

.continuum-reading {
  margin-top: 3rem;
}

@media (max-width: 860px) {
  .continuum-board-actions,
  .continuum-roles > .continuum-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Streamlined continuum hierarchy */
.continuum-status {
  align-items: start;
  margin: 2.2rem 0 3.1rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.continuum-status > div > p:not(.page-title-kicker):not(.home-edition) {
  max-width: 49rem;
}

.continuum-board-section,
.continuum-audiences,
.continuum-local-review {
  margin-top: 3.25rem;
}

.continuum-board-section > h2,
.continuum-audiences > h2,
.continuum-local-review > h2 {
  margin-top: 0.2rem;
}

.continuum-board-section .continuum-board-actions {
  margin-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.continuum-board-section .continuum-board-actions li {
  padding: 1rem 0 0;
}

.continuum-audiences > .continuum-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.continuum-audiences article {
  padding: 1.2rem 1.25rem;
  background: #fff;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.continuum-audiences article h3,
.continuum-audiences article p {
  margin-top: 0;
}

.continuum-audiences article p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.continuum-local-review {
  margin-bottom: 3.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--pale-blue);
  border-left: 5px solid var(--navy);
}

.continuum-local-review p {
  margin-bottom: 0;
}

.continuum-reading {
  margin-top: 0;
}

.continuum-access-boundary {
  margin: 1.25rem 0;
}

@media (max-width: 860px) {
  .continuum-audiences > .continuum-role-grid {
    grid-template-columns: 1fr;
  }
}
