/* Local v0.8.1 adapter.
   The base design is the archived production Compass stylesheet served at
   /brand-styles.css. This file only maps the local questionnaire/report DOM
   onto that design system and preserves the Letter-print contract. */

:root {
  --preview-note: #fbf8ef;
  --preview-note-line: #dfc98a;
}

body {
  overflow-wrap: anywhere;
}

button,
select,
textarea,
input {
  font: inherit;
}

select,
textarea {
  color: var(--ink);
}

#view-title:focus-visible,
#form-title:focus-visible {
  outline: 3px solid rgba(28, 110, 140, 0.28);
  outline-offset: 6px;
}

.preview-mode {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.privacy-banner {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  border: 1px solid var(--preview-note-line);
  border-radius: var(--radius-md);
  color: #5f491e;
  background: var(--preview-note);
  font-size: 13px;
}

.privacy-banner strong {
  flex: 0 0 auto;
  color: var(--forest-900);
}

.intro-copy h1 {
  max-width: 780px;
}

.intro-text {
  font-size: 17px;
  line-height: 1.75;
}

.fixture-picker {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.fixture-picker select {
  width: 100%;
  min-height: 48px;
  padding: 10px 36px 10px 12px;
  border: 1px solid #aeb8b1;
  border-radius: var(--radius-sm);
  color: var(--forest-900);
  background: var(--white);
  cursor: pointer;
}

.fixture-picker select:hover {
  border-color: var(--forest-700);
}

.form-view {
  max-width: 920px;
}

.form-heading {
  margin-bottom: 32px;
}

.form-heading .section-helper {
  line-height: 1.72;
}

.button-compact {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}

.button-large {
  min-height: 54px;
  padding-inline: 28px;
}

.form-progress {
  margin: 0 0 34px;
}

.form-progress__copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--forest-900);
  font-size: 14px;
  font-weight: 750;
}

.form-progress__track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 71, 47, 0.12);
}

.form-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold-600);
  transition: width 180ms ease;
}

.questionnaire-section {
  display: grid;
  gap: 18px;
  margin: 0 0 46px;
}

.questionnaire-section > h2 {
  margin: 0;
  color: var(--forest-900);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.25;
}

.section-intro {
  max-width: 720px;
  margin: -8px 0 6px;
  color: var(--muted);
  line-height: 1.7;
}

.question-block {
  min-width: 0;
}

.question-label {
  display: block;
  margin: 0;
  color: var(--forest-900);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.question-helper,
.empty-guidance {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group > .choice-list {
  margin-top: 15px;
}

.choice {
  min-width: 0;
}

.choice span {
  min-width: 0;
  line-height: 1.5;
}

.question-block textarea {
  min-height: 124px;
}

.form-submit {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold-600);
  border-radius: var(--radius-md);
  background: var(--surface-lifted);
  box-shadow: var(--shadow);
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 72px;
}

.form-navigation .button {
  min-width: 132px;
}

.confirm-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--forest-900);
  font-weight: 700;
  cursor: pointer;
}

.confirm-row input {
  width: 19px;
  height: 19px;
  margin: 4px 0 0;
  accent-color: var(--forest-800);
}

.submit-boundary {
  margin: 14px 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.report-toolbar__actions {
  display: flex;
  gap: 10px;
}

.report-document {
  overflow: hidden;
}

.report-cover {
  min-height: 0;
}

.report-cover .report-title {
  max-width: 100%;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.report-title__segment {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

.report-cover .reader-label {
  display: inline-block;
  margin: 22px 0 28px;
  padding: 5px 10px;
  border: 1px solid rgba(35, 71, 47, 0.28);
  border-radius: 999px;
  color: var(--forest-700);
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 700;
}

.top-conclusion {
  max-width: 850px;
  padding: clamp(20px, 4vw, 28px);
  border-left: 4px solid var(--forest-800);
  background: rgba(255, 255, 255, 0.72);
}

.top-conclusion__label {
  margin: 0 0 8px;
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.top-conclusion p:last-child {
  margin: 0;
  color: var(--forest-900);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 600;
  line-height: 1.6;
}

.reading-note {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.quick-links {
  top: 88px;
  max-width: 980px;
  margin: 28px auto 0;
}

.quick-links a:focus-visible {
  outline: 3px solid rgba(28, 110, 140, 0.28);
  outline-offset: 2px;
}

.report-layout {
  max-width: 980px;
  margin: 0 auto;
}

#report-content {
  max-width: none;
  padding: clamp(30px, 7vw, 76px);
  letter-spacing: 0.01em;
}

#report-content p,
#report-content li,
#report-content dd,
#report-content [role="cell"],
#report-content [role="columnheader"] {
  font-size: 17px;
  line-height: 1.78;
}

.report-section {
  margin: 0;
  padding: 46px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 150px;
}

.report-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.report-section > h2 {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: var(--forest-900);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.25;
}

.module-number {
  color: var(--gold-600);
  font-family: Inter, "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 2.6;
}

.section-lead {
  max-width: 72ch;
  margin: 0 0 28px;
  color: #3f4b43;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 18px;
  line-height: 1.75;
}

.evidence-item {
  margin-top: 14px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--sage-200);
  border-radius: var(--radius-md);
  background: var(--white);
}

.evidence-item h3 {
  margin-top: 0;
}

.gap-card {
  border-radius: var(--radius-md);
}

.gap-card dl {
  margin: 0;
}

.gap-card dt,
.pb-panel dt {
  margin-top: 18px;
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.gap-card dd,
.pb-panel dd {
  margin: 4px 0 0;
}

.pb-headline-card {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 30px);
  border-left: 4px solid var(--forest-800);
  background: var(--forest-100);
}

.pb-headline-label {
  display: block;
  margin-bottom: 8px;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pb-headline {
  margin: 0 !important;
  color: var(--forest-900);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 600;
  line-height: 1.65;
}

.pb-panel {
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold-600);
  border-radius: var(--radius-md);
  background: #fbf8ef;
}

.pb-panel h3 {
  margin-top: 0;
}

.project-title {
  margin: 0 0 22px;
  padding: 22px 24px;
  border-top: 4px solid var(--forest-800);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--forest-100);
}

.project-outline {
  margin: 20px 0 30px;
}

.project-outline summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: var(--forest-800);
  font-weight: 800;
  cursor: pointer;
}

.project-outline[open] summary {
  border-bottom: 1px solid var(--line);
}

.project-outline__count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.project-outline__content {
  padding: 18px 20px 22px;
}

.project-outline__guidance {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.project-outline nav > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-outline nav ul ul {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding-left: 16px;
}

.project-outline a {
  color: var(--forest-700);
  text-decoration: none;
}

.project-outline a:hover {
  text-decoration: underline;
}

.project-subheading {
  scroll-margin-top: 150px;
}

.project-quote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--gold-600);
  color: #5f491e;
  background: var(--gold-100);
  font-family: Georgia, "Songti SC", "STSong", serif;
}

.data-table {
  margin: 20px 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
}

.data-table__row {
  display: grid;
  grid-template-columns: repeat(var(--table-columns, 5), minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.data-table--cols-1 { --table-columns: 1; }
.data-table--cols-2 { --table-columns: 2; }
.data-table--cols-3 { --table-columns: 3; }
.data-table--cols-4 { --table-columns: 4; }
.data-table--cols-5 { --table-columns: 5; }

.data-table__row:first-child {
  border-top: 0;
}

.data-table__row > div {
  min-width: 0;
  padding: 12px;
  border-left: 1px solid var(--line);
}

.data-table__row > div:first-child {
  border-left: 0;
}

.data-table__row--header {
  color: var(--white);
  background: var(--forest-800);
  font-weight: 800;
}

.action-list {
  margin-top: 18px;
  padding: 20px 22px;
  border-left: 4px solid var(--forest-800);
  background: var(--forest-100);
}

.action-list h3 {
  margin-top: 0;
}

.mission-line {
  color: var(--forest-800);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 700;
}

.status-message {
  min-height: 24px;
  width: min(920px, calc(100% - 40px));
  margin: 20px auto 32px;
  color: var(--muted);
  font-size: 14px;
}

.status-message:empty {
  display: none;
}

.status-message[data-tone="success"] {
  color: var(--forest-700);
}

.status-message[data-tone="warning"] {
  color: #8a5a2c;
}

.status-message[data-tone="error"] {
  color: var(--error);
}

@media (max-width: 760px) {
  .preview-mode {
    font-size: 12px;
  }

  .privacy-banner {
    width: min(100% - 28px, 920px);
    display: grid;
    gap: 2px;
  }

  .form-heading {
    margin-bottom: 26px;
  }

  .button-compact {
    width: auto;
  }

  .questionnaire-section {
    margin-bottom: 38px;
  }

  .form-submit {
    margin-bottom: 56px;
  }

  .report-toolbar__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-links {
    position: static;
    display: flex;
    margin: 18px 16px 0;
    overflow-x: auto;
  }

  #report-content {
    padding: 32px 22px;
  }

  #report-content p,
  #report-content li,
  #report-content dd,
  #report-content [role="cell"],
  #report-content [role="columnheader"] {
    font-size: 16px;
  }

  .report-section {
    padding: 38px 0;
  }

  .report-section > h2 {
    grid-template-columns: 30px minmax(0, 1fr);
    font-size: 26px;
  }

  .module-number {
    line-height: 2.5;
  }

  .project-outline nav > ul {
    grid-template-columns: 1fr;
  }

  .data-table {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .data-table__row--header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .data-table__row {
    display: block;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
  }

  .data-table__row > div {
    display: grid;
    grid-template-columns: minmax(112px, 0.4fr) minmax(0, 1fr);
    gap: 12px;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .data-table__row > div:first-child {
    border-top: 0;
  }

  .data-table__row > div::before {
    content: attr(data-label);
    color: var(--gold-600);
    font-size: 12px;
    font-weight: 800;
  }
}

@media (max-width: 390px) {
  .form-progress__copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .form-navigation .button {
    flex: 1;
    min-width: 0;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .preview-mode {
    max-width: 92px;
    text-align: right;
    white-space: normal;
  }

  .privacy-banner {
    width: min(100% - 20px, 920px);
  }

  .intro-copy h1 {
    font-size: 38px;
  }

  .question-block,
  .form-submit,
  .top-conclusion,
  .gap-card,
  .pb-panel {
    padding: 18px;
  }

  .report-toolbar__actions {
    grid-template-columns: 1fr;
  }

  .report-section > h2 {
    grid-template-columns: 26px minmax(0, 1fr);
    font-size: 23px;
  }

  .report-cover .report-title {
    font-size: 1.55rem;
  }

  .report-title__segment {
    display: block;
    white-space: normal;
  }

  .data-table__row > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@page {
  size: Letter;
  margin: 0.55in 0.58in 0.6in;
}

@media print {
  :root {
    font-size: 10pt;
  }

  body {
    background: #fff;
    color: #111;
    line-height: 1.55;
  }

  .site-header,
  .privacy-banner,
  .intro-view,
  .form-view,
  .report-toolbar,
  .quick-links,
  .status-message,
  body > footer,
  .skip-link {
    display: none !important;
  }

  .report-view,
  .report-layout,
  #report-content,
  .report-cover {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-inline: 0;
  }

  .report-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-cover {
    min-height: 9in;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    break-after: page;
  }

  .report-title {
    font-size: 22pt;
  }

  #report-content p,
  #report-content li,
  #report-content dd,
  #report-content [role="cell"],
  #report-content [role="columnheader"] {
    font-size: 10pt;
    line-height: 1.5;
  }

  .section-lead {
    font-size: 11pt;
    line-height: 1.5;
  }

  .project-outline {
    overflow: visible;
    border: 0;
  }

  .project-outline summary {
    display: none;
  }

  .project-outline:not([open]) > :not(summary) {
    display: block !important;
  }

  .project-outline__content {
    padding: 0;
  }

  .project-outline nav > ul {
    display: block;
    columns: 2;
  }

  .top-conclusion,
  .gap-card,
  .pb-panel,
  .action-list,
  .project-quote,
  .project-title,
  .evidence-item {
    background: transparent;
  }

  .report-section {
    padding: 0.18in 0;
  }

  .report-section > h2,
  .report-section h3,
  .report-section h4,
  .project-subheading {
    break-after: avoid;
    page-break-after: avoid;
  }

  .gap-card,
  .pb-panel,
  .action-list,
  .evidence-item,
  .data-table__row,
  .project-title {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  p,
  li,
  dd {
    orphans: 3;
    widows: 3;
  }

  .data-table {
    border: 0;
    background: transparent;
    font-size: 8.5pt;
  }

  .data-table__row--header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .data-table__row {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    background: transparent;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .data-table__row > div {
    display: grid;
    grid-template-columns: minmax(7rem, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .data-table__row > div:first-child {
    border-top: 0;
  }

  .data-table__row > div::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
