:root {
  --ink: #1e2528;
  --muted: #667175;
  --line: #d8dddf;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --soft: #eef4f1;
  --accent: #2f6f64;
  --accent-dark: #214f48;
  --warn: #b7791f;
  --danger: #b23b3b;
  --ready: #2d7c4f;
  --shadow: 0 18px 45px rgba(31, 44, 49, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
}

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

button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(47, 111, 100, 0.28);
  outline-offset: 2px;
}

button.ghost {
  color: var(--accent-dark);
  background: #ffffff;
}

button.ghost:hover {
  background: var(--soft);
}

button.primary {
  background: var(--accent-dark);
}

button.danger {
  border-color: var(--danger);
  color: var(--danger);
  background: #ffffff;
}

button.danger:hover {
  color: #ffffff;
  background: var(--danger);
}

button.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.9rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--line);
  padding: 22px;
  background: #f4f1ea;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  background: var(--accent-dark);
}

.brand h1 {
  margin: 0;
  font-size: 1.1rem;
}

.brand p,
.eyebrow {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.brand .app-version {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.brand .app-credit {
  max-width: 245px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.dashboard,
.side-panel,
.checker-panel,
.support-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard,
.side-panel {
  padding: 16px;
}

.dashboard-row,
.dashboard-grid {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-grid {
  margin-top: 14px;
}

.active-work-row {
  align-items: end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.active-work-row strong {
  max-width: 145px;
  text-align: right;
  font-size: 0.86rem;
}

.dashboard span,
.side-panel {
  color: var(--muted);
  font-size: 0.9rem;
}

#issueList {
  display: grid;
  gap: 9px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.issue-link {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fffdf7;
  color: var(--ink);
  text-align: left;
  line-height: 1.4;
}

.issue-link.red {
  border-left-color: var(--danger);
}

.issue-link:hover,
.issue-link:focus-visible {
  border-color: #936018;
  color: var(--ink);
  background: #f6ead4;
  outline: 3px solid rgba(183, 121, 31, 0.24);
  outline-offset: 2px;
}

.issue-link.red:hover,
.issue-link.red:focus-visible {
  border-color: var(--danger);
  background: #faeaea;
  outline-color: rgba(178, 59, 59, 0.22);
}

.issue-link-status,
.issue-link-action,
.needs-attention-label {
  font-size: 0.75rem;
  font-weight: 800;
}

.issue-link-status {
  color: #8a5400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.issue-link.red .issue-link-status {
  color: var(--danger);
}

.issue-link-action {
  color: var(--accent-dark);
}

.needs-attention-target {
  position: relative;
  border-radius: 6px;
  outline: 3px solid var(--danger);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(164, 48, 48, 0.12);
}

.needs-attention-label {
  display: block;
  width: fit-content;
  margin: 0 0 8px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--danger);
  color: #fff;
}

.dashboard strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6e2;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 180ms ease;
}

.stage-nav {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.stage-tab {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.stage-tab:hover,
.stage-tab.active {
  border-color: var(--line);
  background: #ffffff;
}

.stage-code {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent-dark);
  font-weight: 700;
  background: var(--soft);
}

.stage-label {
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}

.stage-label small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b6c0c4;
}

.status-dot.done {
  background: var(--ready);
}

.side-panel h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
}

.side-panel ul {
  margin: 0;
  padding-left: 18px;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
}

.top-actions,
.footer-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-note {
  padding: 14px 16px;
  line-height: 1.5;
  background: #eef6f4;
}

.migration-note {
  border: 1px solid #d5b36a;
  border-radius: 8px;
  padding: 12px 14px;
  color: #664d17;
  background: #fff8e6;
}

.app-feedback-panel {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.app-feedback-panel summary {
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}

.app-feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.app-feedback-comments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.compact-dialog {
  width: min(720px, calc(100vw - 32px));
}

.checkpoint-list {
  display: grid;
  gap: 10px;
  padding: 16px 0;
}

.checkpoint-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.checkpoint-item p {
  margin: 3px 0;
}

.team-contribution-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.team-contribution-panel > summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 700;
}

.team-contribution-content {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.confidential-label {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid #d9b56b;
  border-radius: 4px;
  color: #76520d;
  background: #fff8e7;
  font-size: .78rem;
  font-weight: 600;
}

.privacy-note {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #eef7f5;
}

.group-roster-warning {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--warn);
  background: #fff8e8;
}

.group-roster-warning p {
  margin: 6px 0 10px;
}

.contribution-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contribution-card h4 {
  margin: 0 0 2px;
  font-size: 1.05rem;
}

.contribution-behaviors {
  display: grid;
  gap: 6px;
  margin: 4px 0;
  padding: 10px;
  border: 1px solid var(--line);
}

.contribution-behaviors legend {
  padding: 0 4px;
  font-weight: 700;
}

.contribution-print-card {
  margin-top: 18px;
  break-inside: avoid;
}

.contribution-appendix {
  break-before: page;
}

.contribution-print-card table {
  font-size: 9pt;
}

.guided-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.guided-step > summary {
  padding: 16px;
  font-weight: 700;
  cursor: pointer;
}

.guided-step[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark);
}

.guided-step-content {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.question-card > summary {
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.question-card[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark);
}

.evidence-feedback {
  margin-top: 6px;
}

.evidence-feedback summary {
  cursor: pointer;
  font-weight: 700;
}

.evidence-grid {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
}

.stage-form {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field,
.output-box,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.field.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 8px;
  font-weight: 700;
}

.field-label label {
  margin: 0;
}

.help-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  min-height: 0;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #b8c8c5;
  border-radius: 50%;
  padding: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  background: #eef6f4;
  cursor: help;
}

.help-icon:focus {
  outline: 2px solid rgba(47, 111, 100, 0.35);
  outline-offset: 2px;
}

.help-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: none;
  width: min(360px, 82vw);
  padding: 10px 12px;
  border: 1px solid #b8c8c5;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.14);
}

.help-icon:hover + .help-tooltip,
.help-icon:focus + .help-tooltip {
  display: block;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c8d0d2;
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin-right: 8px;
}

textarea {
  min-height: 105px;
  resize: vertical;
}

.small-input {
  min-height: 40px;
}

.output-box h3,
.table-wrap h3,
.checker-panel h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.generated-text {
  min-height: 80px;
  white-space: pre-wrap;
  line-height: 1.55;
}

.framework-pathway {
  background: #f7fbfa;
}

.framework-write-intro {
  border-left: 4px solid var(--accent);
}

.editable-list {
  display: grid;
  gap: 10px;
}

.list-row,
.table-row {
  display: grid;
  gap: 8px;
}

.list-row {
  grid-template-columns: 1fr auto;
}

.question-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.question-row label,
.question-row textarea,
.question-row .hint,
.question-row .field-label {
  grid-column: 1 / -1;
}

.question-row .row-remove {
  width: 100%;
  min-height: 38px;
  grid-column: 1 / -1;
}

.list-row .hint {
  grid-column: 1 / -1;
}

.table-row {
  grid-template-columns: repeat(var(--cols), minmax(145px, 1fr)) auto;
  align-items: start;
  min-width: 820px;
}

.instrumentation-row {
  grid-template-columns: 1fr;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.instrumentation-row label:first-child {
  grid-column: auto;
}

.instrumentation-row textarea {
  min-height: 120px;
}

.instrumentation-row .row-remove {
  align-self: start;
  width: 100%;
  min-height: 38px;
}

.instrumentation-row .output-box {
  padding: 10px;
  background: #f7faf9;
}

.instrumentation-row .generated-text {
  min-height: 0;
}

.table-scroll {
  overflow-x: auto;
}

.row-remove {
  min-width: 40px;
  padding: 0;
}

.checker-panel {
  padding: 16px;
}

.checker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.feedback {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.feedback-item {
  border-left: 4px solid var(--line);
  padding: 8px 10px;
  background: #fafafa;
}

.feedback-item.green {
  border-color: var(--ready);
}

.feedback-item.yellow {
  border-color: var(--warn);
}

.feedback-item.red {
  border-color: var(--danger);
}

.footer-actions {
  position: static;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
  background: var(--paper);
}

dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: 90vh;
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(20, 28, 30, 0.45);
}

.dialog-header,
.dialog-actions {
  position: sticky;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  background: #ffffff;
}

.dialog-header {
  top: 0;
  border-bottom: 1px solid var(--line);
}

.dialog-actions {
  bottom: 0;
  border-top: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.submission {
  padding: 26px 34px;
  line-height: 1.55;
}

.print-submission {
  display: none;
}

.upload-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.about-content {
  display: grid;
  gap: 12px;
  padding: 20px;
  color: var(--ink);
  line-height: 1.55;
}

.about-content h3 {
  margin: 8px 0 0;
  font-size: 1rem;
}

.about-content p,
.about-content ul {
  margin: 0;
}

.about-content ul {
  padding-left: 22px;
}

.about-content li + li {
  margin-top: 8px;
}

.welcome-dialog {
  width: min(680px, calc(100vw - 28px));
}

.welcome-dialog .about-content h2 {
  margin: 0;
  font-size: 1.45rem;
}

.inline-actions {
  position: static;
  justify-content: flex-end;
  border-top: 0;
  padding: 8px 0 0;
}

.details-panel {
  padding: 20px;
}

.arrangement-picker {
  margin: 0;
}

.arrangement-picker legend {
  padding: 0 4px;
  font-weight: 700;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented-control label {
  margin: 0;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.segmented-control label:has(input:checked) {
  color: #ffffff;
  background: var(--accent);
}

.segmented-control input {
  width: auto;
  margin-right: 6px;
}

.group-details,
.group-member-list {
  display: grid;
  gap: 14px;
}

.group-person-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px 16px;
  background: #ffffff;
}

.group-person-card summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 700;
}

.group-person-card .danger {
  margin-top: 12px;
  color: var(--danger);
  border-color: var(--danger);
}

.update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #9bbab4;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #f4faf8;
}

.update-notice[hidden] {
  display: none;
}

.update-notice p {
  margin: 4px 0 0;
}

.update-notice .update-notes {
  flex-basis: 100%;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-line input {
  width: auto;
}

.design-guidance h3 + p {
  margin-top: 4px;
}

.study-example-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.study-example-choices button[aria-pressed="true"] {
  background: #1f5b50;
  color: #fff;
  border-color: #1f5b50;
}

#studyExampleAction {
  margin: 8px 0 12px;
}

.terms-comparison { width: 100%; border-collapse: collapse; table-layout: fixed; }
.terms-comparison caption { text-align: left; font-size: 0.85rem; margin-bottom: 10px; }
.terms-comparison th, .terms-comparison td { padding: 12px; border: 1px solid #c8d5d2; vertical-align: top; overflow-wrap: anywhere; text-align: left; }
.terms-comparison th { background: #f1f6f4; }
.terms-comparison th:first-child { width: 18%; }
.terms-comparison .selected-approach { background: #e5f2ee; }
.terms-comparison small { display: block; font-weight: normal; }
.terms-mobile-label { display: none; }
.adviser-workspace { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }
.adviser-proposal-list { display: grid; gap: 16px; margin-top: 24px; }
.adviser-proposal-card { background: white; border: 1px solid #c8d5d2; border-radius: 8px; padding: 20px; overflow-wrap: anywhere; }
.adviser-proposal-card .inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adviser-review-banner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 14px; margin-bottom: 16px; background: #e5f2ee; border-radius: 8px; }
.adviser-review-banner p { margin: 5px 0 0; overflow-wrap: anywhere; }
.adviser-mode .workspace.glance-open > .adviser-review-banner { display: flex !important; }
.adviser-mode #stageForm input:disabled, .adviser-mode #stageForm select:disabled { opacity: 1; color: #263c38; }
.adviser-mode textarea[readonly] { background: #fafcfb; }
.adviser-library .phase-journey { display: none; }
.adviser-library .status-separator { display: none; }
.adviser-library .journey-header { grid-template-columns: 1fr auto; }
@media (max-width: 700px) {
  .terms-comparison, .terms-comparison tbody, .terms-comparison tr { display: block; }
  .terms-comparison thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .terms-comparison tr { margin-bottom: 16px; }
  .terms-comparison th, .terms-comparison td { display: block; width: auto; }
  .terms-comparison th:first-child { width: auto; }
  .terms-comparison td { border-top: 0; }
  .terms-mobile-label { display: block; font-weight: 700; margin-bottom: 6px; }
}

.consent-preparation > summary {
  cursor: pointer;
  font-size: 1.08rem;
}

.erb-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #f0f7f5;
  color: #40565a;
  font-size: 0.88rem;
}

.erb-source-links > span {
  flex-basis: 100%;
}

.erb-checklist-list {
  display: grid;
  gap: 8px;
}

.erb-checklist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 220px);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e1e1;
  border-radius: 7px;
  background: #fbfcfb;
}

.erb-checklist-row p {
  margin: 4px 0 0;
}

.erb-document-status select {
  width: 100%;
  margin: 0;
}

.erb-reviewer-only {
  margin-top: 14px;
}

.erb-summary-list {
  margin: 12px 0;
  padding: 4px 12px;
  border-left: 3px solid #bd760f;
  background: #fffaf1;
}

.erb-summary-list p {
  margin: 7px 0;
}

.erb-packet-summary .button-link {
  margin-left: 8px;
}

.notice-box {
  padding: 14px;
  border-left: 4px solid #a31d1d;
  background: #fff7f7;
}

.notice-box p {
  margin-bottom: 0;
}

.adviser-review-block {
  margin: 18pt 0;
  padding: 12pt 0;
  border-top: 1px solid #777;
  break-inside: avoid;
}

.review-lines {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12pt;
  margin-top: 18pt;
}

.adviser-review-record td {
  height: 34pt;
}

.reflection-entry {
  break-inside: avoid;
  margin-bottom: 12pt;
}

.upload-panel input[type="file"] {
  border: 1px dashed var(--accent);
  background: var(--soft);
}

.upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.upload-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.upload-card pre {
  overflow: auto;
  max-height: 210px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  white-space: pre-wrap;
  background: #f8f8f8;
}

.submission h1,
.submission h2,
.submission h3 {
  margin: 0.8em 0 0.35em;
}

.readiness-summary,
.instrument-card {
  border: 1px solid #999;
  padding: 12px;
  margin: 12px 0;
}

.readiness-summary p,
.instrument-card p {
  margin: 0 0 8px;
}

.warning-list li,
.submission ol li {
  margin-bottom: 8px;
}

.chapter-template {
  display: grid;
  gap: 6px;
}

.chapter-template h3,
.chapter-template h4,
.chapter-template p {
  margin: 0;
}

.submission table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}

.submission th,
.submission td {
  border: 1px solid #999;
  padding: 7px;
  vertical-align: top;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 9px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
}

.pill.green {
  background: var(--ready);
}

.pill.yellow {
  background: var(--warn);
}

.pill.red {
  background: var(--danger);
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .stage-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0;
  }

  .stage-tab {
    grid-template-columns: 34px 1fr;
    min-height: 42px;
    padding: 6px;
  }

  .stage-tab .status-dot {
    display: none;
  }

  .brand {
    margin-bottom: 14px;
  }

  .dashboard,
  .side-panel {
    padding: 12px;
  }

  .workspace {
    padding: 20px;
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .field-grid,
  .app-feedback-grid,
  .app-feedback-comments {
    grid-template-columns: 1fr;
  }

  .stage-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-tab {
    min-width: 0;
  }

  .stage-label {
    overflow-wrap: anywhere;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .table-row {
    grid-template-columns: 1fr;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
  }

  .table-row label {
    margin-bottom: 0;
  }

  .table-row .row-remove {
    width: 100%;
    min-height: 38px;
  }

  .segmented-control {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .update-notice,
  .review-lines {
    display: grid;
    grid-template-columns: 1fr;
  }

  .top-actions,
  .footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .top-actions button,
  .footer-actions button {
    width: 100%;
  }

  button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .footer-actions {
    gap: 8px;
  }

  .field-label {
    flex-wrap: wrap;
  }

  .help-tooltip {
    position: static;
    order: 3;
    width: 100%;
    box-shadow: none;
  }

  .checkpoint-item {
    grid-template-columns: 1fr;
  }

}

/* v4.8.1 focused research journey and UI consistency */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.app-shell {
  display: block;
  min-height: 100vh;
  background: #f7f7f3;
}

.journey-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(520px, 2.1fr) minmax(250px, 0.9fr);
  align-items: center;
  gap: 24px;
  min-height: 88px;
  border-bottom: 1px solid #d8dddf;
  padding: 14px clamp(20px, 4vw, 64px);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 18px rgba(24, 38, 42, 0.05);
  backdrop-filter: blur(12px);
}

.journey-brand {
  margin: 0;
  min-width: 0;
}

.journey-brand img {
  flex: 0 0 auto;
}

.journey-brand h1 {
  font-size: 1rem;
  line-height: 1.25;
}

.journey-brand .app-version {
  margin-top: 2px;
  font-size: 0.72rem;
}

.phase-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
}

.phase-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 6px 12px;
  color: #647176;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  background: transparent;
}

.phase-step::after {
  position: absolute;
  right: -2px;
  left: 42px;
  bottom: 0;
  height: 2px;
  background: #d8dddf;
  content: "";
}

.phase-step:last-child::after {
  display: none;
}

.phase-step:hover {
  color: #214f48;
  background: #f3f7f5;
}

.phase-step.active {
  color: #183f39;
  background: #eef5f2;
}

.phase-step.active::after,
.phase-step.complete::after {
  background: #2f6f64;
}

.phase-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #b9c5c5;
  border-radius: 50%;
  font-size: 0.72rem;
  background: #ffffff;
}

.phase-step.active .phase-number {
  border-color: #2f6f64;
  color: #ffffff;
  background: #2f6f64;
}

.phase-step.complete .phase-number {
  width: auto;
  min-width: 28px;
  border-color: #9bbab3;
  border-radius: 999px;
  padding: 0 7px;
  color: #214f48;
  background: #e4f0ec;
}

.phase-step:focus-visible,
.phase-menu-item:focus-visible,
.task-rail-add:focus-visible {
  outline: 3px solid rgba(47, 111, 100, 0.28);
  outline-offset: 2px;
}

.phase-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 4px;
  max-width: calc(100vw - 24px);
  max-height: min(520px, calc(100vh - 120px));
  overflow: auto;
  border: 1px solid #cbd5d5;
  border-radius: 7px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(24, 38, 42, 0.18);
}

.phase-menu-heading {
  padding: 7px 9px 5px;
  color: #687478;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.phase-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 5px;
  padding: 8px 10px;
  color: #263034;
  text-align: left;
  background: transparent;
}

.phase-menu-item:hover {
  background: #f1f6f4;
}

.phase-menu-item.active {
  color: #183f39;
  background: #e5f0ec;
}

.phase-menu-code {
  display: grid;
  min-height: 32px;
  place-items: center;
  border-radius: 4px;
  color: #214f48;
  font-weight: 800;
  background: #edf4f1;
}

.phase-menu-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.phase-menu-copy small {
  color: #748084;
  font-size: 0.66rem;
  font-weight: 700;
}

.phase-menu-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.3;
}

.phase-menu-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8c4c7;
}

.phase-menu-status.done {
  background: #2f8058;
}

.journey-utilities {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
}

.status-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.journey-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-menu-wrap {
  position: relative;
}

.status-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 220px;
  gap: 4px;
  border: 1px solid #cbd5d5;
  border-radius: 7px;
  padding: 7px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(24, 38, 42, 0.18);
}

.status-menu[hidden] {
  display: none;
}

.status-menu button {
  min-height: 42px;
  border: 0;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.status-menu button:hover,
.status-menu button:focus-visible {
  color: var(--accent-dark);
  background: var(--soft);
}

.save-state,
.active-time {
  color: #687478;
  font-size: 0.72rem;
  white-space: nowrap;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #43615c;
  font-weight: 700;
}

.save-state::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f7b59;
  content: "";
}

.status-separator {
  color: #a5adaf;
}

.icon-text-button,
.text-action {
  min-height: 34px;
  border: 0;
  padding: 0 10px;
  color: #214f48;
  font-size: 0.82rem;
  font-weight: 700;
  background: transparent;
}

.icon-text-button:hover,
.text-action:hover {
  background: #eef5f2;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 22px 0 28px;
}

.stage-context-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: #647176;
  font-size: 0.82rem;
}

.stage-context-bar p {
  margin: 0;
  font-weight: 700;
}

.stage-context-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-intro {
  max-width: 830px;
}

.stage-intro .eyebrow {
  margin: 0 0 8px;
  color: #a45f25;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage-intro h2 {
  margin: 0;
  color: #182226;
  font-size: clamp(1.65rem, 2.35vw, 2.15rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.stage-support {
  max-width: 760px;
  margin: 10px 0 0;
  color: #5e6b70;
  font-size: 1rem;
  line-height: 1.55;
}

.focus-support {
  max-width: 1180px;
  border: 0;
  border-left: 3px solid #5a9288;
  border-radius: 0 6px 6px 0;
  padding: 11px 14px;
  color: #3f5653;
  font-size: 0.78rem;
  background: #edf4f1;
}

.focus-layout {
  display: block;
}

.stage-form {
  min-width: 0;
}

.terms-definition-list { padding-left: 1.25rem; }
.terms-definition-list li { margin: 0.6rem 0; overflow-wrap: anywhere; }
.terms-literature textarea { width: 100%; }

.focus-task-item.is-current-task,
.focus-task-root:not([hidden]) {
  animation: focus-enter 180ms ease-out;
}

@keyframes focus-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage-form > .field-grid,
.stage-form > .table-wrap,
.stage-form > .group-details {
  border: 0;
  padding: 0;
  background: transparent;
}

.stage-form .field,
.stage-form .output-box,
.stage-form .table-row,
.stage-form .guided-step,
.stage-form .personal-declaration,
.stage-form .consent-preparation {
  border-color: #d2dadb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(35, 52, 56, 0.055);
}

.stage-form .is-current-task {
  border-color: #8eb2aa;
  box-shadow: 0 12px 30px rgba(35, 79, 72, 0.09);
}

.stage-form .focus-task-item.is-current-task {
  width: 100%;
  max-width: 1180px;
  grid-column: 1 / -1;
}

.stage-form .field,
.stage-form .output-box,
.stage-form .guided-step-content,
.stage-form .personal-declaration {
  padding: clamp(18px, 3vw, 28px);
}

.stage-form label,
.stage-form .field-label {
  color: #263034;
  font-size: 0.93rem;
  line-height: 1.4;
}

.stage-form textarea,
.stage-form input,
.stage-form select {
  border-color: #bdc9cb;
  padding: 13px 14px;
  font-size: 1rem;
  line-height: 1.45;
}

.stage-form textarea {
  min-height: 140px;
}

.stage-form .hint {
  font-size: 0.78rem;
}

.stage-form .generated-text {
  min-height: 0;
}

.focus-secondary-context {
  display: none !important;
}

.task-rail {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  border-left: 1px solid #d8dddf;
  padding-left: 16px;
}

.task-rail-heading {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
  color: #536166;
  font-size: 0.75rem;
  line-height: 1.35;
}

.task-rail-heading > span {
  display: grid;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  color: #214f48;
  font-weight: 800;
  background: #e9f1ee;
}

.task-rail-item {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 7px 8px;
  color: #647176;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  background: transparent;
}

.task-rail-item:hover {
  color: #214f48;
  background: #edf4f1;
}

.task-rail-item.active {
  color: #183f39;
  font-weight: 800;
  background: #e5f0ec;
}

.task-rail-item > span:first-child {
  display: grid;
  height: 22px;
  place-items: center;
  border: 1px solid #cad4d4;
  border-radius: 50%;
  font-size: 0.68rem;
  background: #ffffff;
}

.task-rail-add {
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid #8fb1aa;
  border-radius: 5px;
  padding: 7px 9px;
  color: #214f48;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: left;
  background: #f7fbfa;
}

.task-rail-add:hover {
  background: #e9f3f0;
}

.stage-form > .table-wrap > button[data-add-row] {
  display: inline-flex;
  min-height: 38px;
  margin-top: 12px;
  align-items: center;
}

.stage-form .table-wrap,
.stage-form .table-scroll,
.stage-form .editable-list {
  min-width: 0;
  max-width: 100%;
}

.stage-form .a3Gaps-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 1180px;
  padding: clamp(18px, 3vw, 26px);
}

.stage-form .a3Gaps-row > *,
.stage-form .a3Gaps-row label,
.stage-form .a3Gaps-row textarea {
  min-width: 0;
  max-width: 100%;
}

.stage-form .a3Gaps-row textarea {
  width: 100%;
}

.protected-pattern-field {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.protected-pattern-value {
  display: flex;
  min-height: 54px;
  align-items: center;
  border: 1px solid #c8d3d4;
  border-radius: 6px;
  padding: 12px 14px;
  color: #263034;
  background: #f3f7f5;
}

.protected-pattern-field small {
  color: #6d787c;
  font-size: 0.72rem;
}

.stage-form .table-row .row-remove {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  min-height: 34px;
  border-color: #b85454;
  padding: 0 11px;
  color: #a62f2f;
  font-size: 0.76rem;
  background: #ffffff;
}

.stage-form .table-row .row-remove:hover {
  color: #ffffff;
  background: #b33b3b;
}

.focused-navigation {
  position: sticky;
  z-index: 30;
  bottom: 0;
  margin: auto -12px -28px;
  border-top: 1px solid #d8dddf;
  background: rgba(247, 247, 243, 0.97);
  backdrop-filter: blur(10px);
}

.section-task-path {
  display: flex;
  min-height: 42px;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-bottom: 1px solid #e0e4e4;
  padding: 4px 12px 2px;
  scrollbar-width: thin;
  scrollbar-color: #b8c3c2 transparent;
}

.section-task-node {
  position: relative;
  display: inline-flex;
  min-width: max-content;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 0;
  padding: 0 12px 6px 0;
  color: #7b8588;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.section-task-node::after {
  width: clamp(18px, 2.4vw, 42px);
  height: 1px;
  margin-left: 5px;
  background: #cbd3d4;
  content: "";
}

.section-task-node:last-child::after {
  display: none;
}

.section-task-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #b9c2c4;
}

.section-task-node:hover {
  color: #284f49;
  background: transparent;
}

.section-task-node.is-current {
  color: #1f5b50;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 #267565;
}

.section-task-node.is-current .section-task-dot {
  background: #267565;
}

.section-task-node:focus-visible {
  outline: 3px solid var(--focus, #d0911d);
  outline-offset: -2px;
}

.focused-actions {
  position: static;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 10px 12px 12px;
  background: transparent;
  backdrop-filter: none;
}

.focused-actions #allTasksBtn {
  display: none !important;
}

.focused-actions #nextBtn {
  min-width: 132px;
  justify-self: end;
}

.stage-form textarea,
.stage-form input,
.stage-form select,
.stage-form button {
  scroll-margin-block-end: 112px;
}

.gap-refinement {
  margin-bottom: 16px;
  border: 1px solid #d2dadb;
  border-radius: 7px;
  background: #f8fbfa;
}

.gap-refinement > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  color: #3f5653;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.gap-refinement-status {
  color: #728084;
  font-size: 0.7rem;
  font-weight: 600;
}

.gap-refinement.has-saved-refinement .gap-refinement-status {
  color: #216b5b;
}

.gap-refinement-content {
  border-top: 1px solid #dce3e2;
  padding: 12px;
}

.gap-refinement-content textarea {
  min-height: 118px;
}
}

.all-tasks-compact-label {
  display: none;
}

.journey-dialog {
  width: min(760px, calc(100vw - 28px));
}

.journey-dialog .stage-nav,
.journey-dialog .all-task-list,
.journey-dialog .dashboard,
.journey-dialog .side-panel,
.journey-dialog .checker-panel,
.journey-dialog .tool-groups {
  margin: 0;
  padding: 20px;
}

.stage-group {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.stage-group h3 {
  margin: 0 0 4px;
  color: #667175;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.all-task-list,
.tool-groups {
  display: grid;
  gap: 10px;
}

.all-task-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  min-height: 56px;
  border: 1px solid #d5dddd;
  padding: 11px 12px;
  color: #263034;
  text-align: left;
  background: #ffffff;
}

.all-task-item.active {
  border-color: #6d9f95;
  background: #edf5f2;
}

.all-task-item small {
  display: block;
  margin-top: 3px;
  color: #687478;
  font-weight: 400;
}

.task-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #214f48;
  background: #e8f1ee;
}

.tool-groups section {
  border-bottom: 1px solid #e1e5e5;
  padding-bottom: 16px;
}

.tool-groups h3 {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app-feedback-panel {
  max-width: 1180px;
}

.section-heading,
.field-heading,
.row-example-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-heading {
  align-items: center;
  margin-bottom: 8px;
}

.field-heading .field-label {
  margin-bottom: 0;
}

.example-control {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.row-example-action {
  grid-column: 1 / -1;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 4px 0 10px;
}

.row-example-action strong {
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.gap-comparison {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f7fbfa;
}

.gap-comparison h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.gap-choice-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.gap-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: center;
  gap: 16px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #ffffff;
}

.gap-choice-row span {
  display: grid;
  gap: 5px;
}

.gap-choice-row small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}

.gap-route {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.synthesis-checks {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: #ffffff;
}

.synthesis-checks legend {
  padding: 0 6px;
  font-weight: 700;
}

.synthesis-checks label {
  margin: 0;
  font-weight: 500;
}

.synthesis-readiness {
  margin-top: 12px;
  border-left: 4px solid var(--warn);
  padding: 10px 12px;
  line-height: 1.45;
  background: #fff8e8;
}

.synthesis-readiness.ready {
  border-color: var(--ready);
  background: #edf8f1;
}

.example-dialog {
  width: min(780px, calc(100vw - 28px));
  color: var(--ink);
  background: #ffffff;
}

.example-dialog-body {
  display: grid;
  gap: 16px;
  max-height: calc(90vh - 148px);
  overflow-y: auto;
  padding: 20px;
  color: var(--ink);
  background: #ffffff;
}

.example-origin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.example-badge {
  border: 1px solid #a8c5bf;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent-dark);
  font-weight: 700;
  background: var(--soft);
}

.example-warning,
.example-caution {
  border-left: 4px solid var(--warn);
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  background: #fff8e8;
}

.example-section {
  display: grid;
  gap: 8px;
}

.example-section h3,
.example-section p,
.example-details ul {
  margin-top: 0;
  margin-bottom: 0;
}

.example-model {
  margin: 0;
  border-left: 4px solid var(--accent);
  padding: 16px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
  background: #f7fbfa;
}

.example-frame {
  border: 1px dashed #a8c5bf;
  border-radius: 7px;
  padding: 12px;
  line-height: 1.55;
}

.example-details {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  background: #ffffff;
}

.example-details summary {
  cursor: pointer;
  font-weight: 700;
}

.example-reasoning {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.example-reasoning li {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  background: #fbfcfb;
}

.example-reasoning p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.example-source-prompt {
  color: var(--muted);
  font-size: 0.88rem;
}

.example-dialog .dialog-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 1180px) {
  .active-time,
  .status-separator {
    display: none;
  }
}

@media (max-width: 1080px) {
  .journey-header {
    grid-template-columns: minmax(210px, 0.8fr) minmax(440px, 2fr) auto;
    gap: 12px;
    padding-inline: 20px;
  }

  .phase-step {
    grid-template-columns: 26px 1fr;
    padding-inline: 7px;
  }

  .focus-layout {
    display: block;
  }
}

@media (max-width: 820px) {
  .journey-header {
    position: sticky;
    grid-template-columns: 1fr auto;
    min-height: auto;
    padding: 10px 16px;
  }

  .journey-brand img {
    width: 28px;
    height: 28px;
  }

  .phase-journey {
    grid-column: 1 / -1;
    order: 3;
  }

  .phase-step {
    grid-template-columns: 24px 1fr;
    min-height: 40px;
    font-size: 0.7rem;
  }

  .phase-number {
    width: 23px;
    height: 23px;
    font-size: 0.62rem;
  }

  .workspace {
    width: min(100% - 28px, 760px);
    min-height: calc(100vh - 116px);
    padding-top: 16px;
  }

  .focus-layout {
    display: block;
  }

  .task-rail {
    display: none;
  }

  .stage-form > .table-wrap > button[data-add-row] {
    display: inline-flex;
    min-height: 38px;
    margin-top: 12px;
    align-items: center;
    padding: 0 13px;
  }

  .stage-form .a2Patterns-row,
  .stage-form .a3Gaps-row {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .stage-intro h2 {
    font-size: clamp(1.45rem, 5vw, 1.9rem);
  }

  .focused-navigation {
    margin-bottom: -28px;
  }
}

@media (max-width: 560px) {
  .journey-brand h1 {
    font-size: 0.9rem;
  }

  .journey-brand .app-version {
    font-size: 0.64rem;
  }

  .phase-journey {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .phase-step {
    flex: 0 0 auto;
    width: 128px;
  }

  .journey-utilities .icon-text-button {
    padding-inline: 7px;
  }

  .status-summary {
    display: inline-flex;
    gap: 4px;
    font-size: 0.64rem;
    white-space: nowrap;
  }

  .status-summary .status-separator,
  .status-summary .active-time {
    display: none;
  }

  .workspace {
    width: calc(100% - 20px);
    gap: 14px;
  }

  .stage-context-bar {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 0.72rem;
  }

  .stage-context-actions {
    gap: 6px;
    margin-left: auto;
  }

  .stage-context-actions #stageTaskCounter {
    display: inline;
    white-space: nowrap;
  }

  .stage-intro .eyebrow {
    font-size: 0.69rem;
  }

  .stage-support {
    font-size: 0.92rem;
  }

  .focus-support {
    font-size: 0.76rem;
  }

  .stage-form .field,
  .stage-form .output-box,
  .stage-form .guided-step-content,
  .stage-form .personal-declaration,
  .stage-form .table-row {
    padding: 16px;
  }

  .stage-form textarea {
    min-height: 130px;
  }

  .focused-navigation {
    margin-right: 0;
    margin-left: 0;
  }

  .section-task-path {
    min-height: 40px;
    padding-right: 0;
    padding-left: 0;
  }

  .section-task-node {
    min-height: 32px;
    gap: 4px;
    padding-right: 8px;
    font-size: 0.64rem;
  }

  .section-task-node::after {
    width: 18px;
    margin-left: 3px;
  }

  .focused-actions {
    grid-template-columns: auto 1fr auto;
    gap: 6px;
  }

  .focused-actions #skipBtn {
    white-space: nowrap;
    padding-inline: 5px;
    font-size: 0.72rem;
  }

  .focused-actions #nextBtn {
    min-width: 118px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .help-tooltip {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
  }

  .section-heading,
  .field-heading,
  .row-example-action,
  .example-dialog .dialog-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .example-control {
    width: auto;
    align-self: flex-start;
  }

  .gap-choice-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .example-dialog-body {
    padding: 16px;
  }
}

.workspace.glance-open {
  width: min(1440px, calc(100% - 40px));
}

.workspace.glance-open > :not(#proposalGlanceView) {
  display: none !important;
}

.proposal-glance-view {
  display: grid;
  gap: 26px;
  width: 100%;
  padding-bottom: 24px;
}

.proposal-glance-view[hidden] {
  display: none;
}

.proposal-glance-header {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}

.proposal-glance-header > div:first-child {
  max-width: 850px;
}

.proposal-glance-header .stage-breadcrumb {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.proposal-glance-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.15;
}

.proposal-glance-header p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.proposal-glance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.proposal-glance-notice {
  margin: -10px 0 0;
  border-left: 3px solid #8ba9a3;
  padding: 10px 14px;
  color: var(--muted);
  background: #f7f9f8;
  line-height: 1.45;
}

.proposal-glance-section {
  display: grid;
  gap: 12px;
}

.proposal-glance-section h2 {
  margin: 0;
  font-size: 1.12rem;
}

.proposal-logic {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  scrollbar-gutter: stable;
  list-style: none;
}

.proposal-logic-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  border: 1px solid #cbd3d5;
  border-radius: 5px;
  padding: 14px;
  background: #ffffff;
}

.proposal-logic-card h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.3;
}

.proposal-logic-card p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.proposal-source-link {
  min-height: 30px;
  margin-top: auto;
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  background: transparent;
}

.proposal-source-link:hover {
  color: #173c36;
  text-decoration: underline;
  background: transparent;
}

.context-task-link {
  display: inline;
  min-height: 0;
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.12em;
  background: transparent;
  cursor: pointer;
}

.context-task-link:hover {
  color: #173c36;
  background: transparent;
}

.context-task-link:focus-visible {
  outline: 3px solid var(--focus, #d0911d);
  outline-offset: 3px;
  border-radius: 2px;
}

.context-return-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #eef7f5;
  color: var(--ink);
  line-height: 1.45;
}

.proposal-not-entered {
  color: #7b8589;
  font-style: italic;
}

.proposal-review-label {
  display: block;
  margin: 4px 0 6px;
  color: #965f13;
  font-size: 0.78rem;
  font-weight: 700;
}

.proposal-alignment-scroll {
  overflow-x: auto;
  border: 1px solid #cbd3d5;
  border-radius: 5px;
  background: #ffffff;
}

.proposal-alignment-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.proposal-alignment-table th,
.proposal-alignment-table td {
  width: 20%;
  border-right: 1px solid #d8dddf;
  border-bottom: 1px solid #d8dddf;
  padding: 13px 14px;
  vertical-align: top;
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.proposal-alignment-table th:last-child,
.proposal-alignment-table td:last-child {
  border-right: 0;
}

.proposal-alignment-table tbody tr:last-child td {
  border-bottom: 0;
}

.proposal-alignment-table th {
  color: var(--ink);
  background: #f7f8f7;
  font-size: 0.82rem;
}

.proposal-alignment-table p {
  margin: 0 0 8px;
}

.proposal-alignment-table .proposal-source-link {
  display: block;
  margin-top: 8px;
}

.proposal-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #cbd3d5;
  border-radius: 5px;
  background: #ffffff;
}

.proposal-summary-item {
  min-width: 0;
  border-right: 1px solid #d8dddf;
  padding: 14px 16px;
}

.proposal-summary-item:last-child {
  border-right: 0;
}

.proposal-summary-item h3 {
  margin: 0 0 7px;
  font-size: 0.86rem;
}

.proposal-summary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .proposal-logic {
    grid-template-columns: repeat(6, minmax(135px, 1fr));
    gap: 7px;
  }

  .proposal-logic-card {
    min-height: 180px;
    padding: 10px;
  }

  .proposal-logic-card h3 {
    font-size: clamp(0.72rem, 1.25vw, 0.84rem);
  }

  .proposal-logic-card p {
    font-size: clamp(0.72rem, 1.2vw, 0.84rem);
    line-height: 1.38;
  }

  .proposal-logic-card .proposal-source-link {
    font-size: 0.72rem;
  }

  .proposal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proposal-summary-item:nth-child(2n) {
    border-right: 0;
  }

  .proposal-summary-item:nth-child(n + 3) {
    border-top: 1px solid #d8dddf;
  }
}

@media (max-width: 640px) {
  .erb-checklist-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .erb-packet-summary .button-link {
    margin: 8px 0 0;
  }

  .all-tasks-full-label {
    display: none;
  }

  .all-tasks-compact-label {
    display: inline;
  }

  .workspace.glance-open {
    width: calc(100% - 20px);
  }

  .proposal-glance-header {
    display: grid;
  }

  .proposal-glance-actions {
    justify-content: flex-start;
  }

  .proposal-summary-strip {
    grid-template-columns: 1fr;
  }

  .proposal-logic {
    grid-template-columns: repeat(6, minmax(220px, 1fr));
  }

  .proposal-logic-card {
    min-height: 180px;
  }

  .proposal-alignment-scroll {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .proposal-alignment-table {
    display: block;
    min-width: 0;
  }

  .proposal-alignment-table thead {
    display: none;
  }

  .proposal-alignment-table tbody,
  .proposal-alignment-table tr,
  .proposal-alignment-table td {
    display: block;
    width: 100%;
  }

  .proposal-alignment-table tr {
    overflow: hidden;
    border: 1px solid #cbd3d5;
    border-radius: 5px;
    background: #ffffff;
  }

  .proposal-alignment-table tr + tr {
    margin-top: 12px;
  }

  .proposal-alignment-table td,
  .proposal-alignment-table td:last-child {
    border-right: 0;
    border-bottom: 1px solid #d8dddf;
    padding: 13px 14px;
  }

  .proposal-alignment-table td:last-child {
    border-bottom: 0;
  }

  .proposal-alignment-table td::before {
    display: block;
    margin-bottom: 8px;
    content: attr(data-label);
    font-size: 0.8rem;
    font-weight: 700;
  }

  .proposal-summary-item,
  .proposal-summary-item:nth-child(2n) {
    border-right: 0;
  }

  .proposal-summary-item + .proposal-summary-item {
    border-top: 1px solid #d8dddf;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .app-shell,
  .sidebar,
  .workspace,
  .topbar,
  .support-note,
  .stage-form,
  .checker-panel,
  .focused-navigation,
  .footer-actions,
  dialog,
  .dialog-header,
  .dialog-actions {
    display: none !important;
  }

  body.printing-submission .print-submission {
    display: block !important;
    position: static;
    width: auto;
    max-height: none;
    box-shadow: none;
  }

  body.printing-glance .app-shell,
  body.printing-glance .workspace {
    display: block !important;
  }

  body.printing-glance .journey-header,
  body.printing-glance .workspace > :not(#proposalGlanceView),
  body.printing-glance .proposal-glance-actions,
  body.printing-glance .proposal-source-link {
    display: none !important;
  }

  body.printing-glance .proposal-glance-view {
    display: grid !important;
    gap: 14pt;
    padding: 0;
    color: #000000;
  }

  body.printing-glance .proposal-glance-header h1 {
    font-size: 20pt;
  }

  body.printing-glance .proposal-logic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5pt;
    overflow: visible;
  }

  body.printing-glance .proposal-logic-card {
    min-height: 0;
    padding: 6pt;
    break-inside: avoid;
  }

  body.printing-glance .proposal-logic-card h3,
  body.printing-glance .proposal-logic-card p {
    font-size: 7pt;
    line-height: 1.25;
  }

  body.printing-glance .proposal-alignment-scroll {
    overflow: visible;
  }

  body.printing-glance .proposal-alignment-table {
    min-width: 0;
    font-size: 8pt;
  }

  body.printing-glance .proposal-alignment-table th,
  body.printing-glance .proposal-alignment-table td {
    padding: 5pt;
    font-size: 8pt;
  }

  body.printing-glance .proposal-summary-strip {
    grid-template-columns: repeat(5, 1fr);
    break-inside: avoid;
  }

  body.printing-submission .submission {
    display: block;
    padding: 0;
    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.5;
  }

  body.printing-submission .submission h1 {
    margin: 0 0 12pt;
    font-size: 18pt;
    line-height: 1.25;
  }

  body.printing-submission .submission h2 {
    margin: 18pt 0 8pt;
    font-size: 16pt;
    line-height: 1.25;
    font-weight: 700;
  }

  body.printing-submission .submission h3 {
    margin: 12pt 0 6pt;
    font-size: 13pt;
    line-height: 1.25;
    font-weight: 700;
  }

  body.printing-submission .chapter-template {
    display: block;
  }

  body.printing-submission .chapter-template h3 {
    margin: 12pt 0 6pt;
    font-size: 13pt;
  }

  body.printing-submission .chapter-template h4 {
    margin: 8pt 0 3pt;
    font-size: 11pt;
    font-weight: 700;
  }

  body.printing-submission .chapter-template p {
    margin: 0 0 4pt 14pt;
    line-height: 1.4;
  }

  body.printing-submission .submission p {
    margin: 0 0 6pt;
  }

  body.printing-submission .submission ol,
  body.printing-submission .submission ul {
    margin-top: 0;
    margin-bottom: 12pt;
    padding-left: 24pt;
  }

  body.printing-submission .submission li {
    margin-bottom: 8pt;
    break-inside: avoid;
  }

  body.printing-submission .submission .major-section {
    break-before: page;
    page-break-before: always;
  }

  body.printing-submission .submission table {
    margin: 12pt 0 16pt;
    font-size: 9pt;
    line-height: 1.35;
    page-break-inside: auto;
  }

  body.printing-submission .submission thead {
    display: table-header-group;
  }

  body.printing-submission .submission tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.printing-submission .submission th,
  body.printing-submission .submission td {
    padding: 6pt;
  }

  body.printing-submission .submission tbody tr:nth-child(even) {
    background: #f2f2f2;
  }

  body.printing-submission .submission pre {
    white-space: pre-wrap;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    line-height: 1.45;
  }

  body.printing-submission .readiness-summary,
  body.printing-submission .instrument-card {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 10pt;
    margin: 10pt 0;
  }

  body.printing-submission footer {
    margin-top: 18pt;
    border-top: 1px solid #999;
    padding-top: 8pt;
    font-size: 9pt;
  }

  @page {
    size: Letter;
    margin: 1in;
  }
}
:root { --adviser-matrix-text-size: 12px; }
.adviser-matrix-options { margin: 16px 0; }
.adviser-matrix-options summary { cursor: pointer; }
.adviser-matrix-select-all { font-weight: 400; padding-bottom: 4px; border-bottom: 1px solid #cbd7d8; }
.task-meta-row { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.task-meta-row .eyebrow { margin: 0; }
.compact-draft-reminder { display: block; color: #647176; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: normal; }
.compact-draft-reminder summary { cursor: pointer; padding: 6px 0; list-style: none; }
.compact-draft-reminder summary::-webkit-details-marker { display: none; }
.compact-draft-reminder summary:focus-visible { outline: 2px solid var(--focus, #d0911d); outline-offset: 3px; border-radius: 2px; }
.compact-draft-reminder p { position: absolute; left: 0; top: 100%; z-index: 40; width: min(380px, 100%); box-sizing: border-box; margin: 4px 0 0; padding: 12px; border: 1px solid #cbd7d8; border-radius: 6px; background: #fff; color: #34484c; line-height: 1.5; box-shadow: 0 4px 16px #183f3920; }
.focus-support { display: none; }
.journey-header { min-height: 72px; padding-block: 8px; gap: 16px; }
.journey-brand h1 { font-size: 18px; }
.journey-brand .app-version { font-size: 11px; }
.journey-brand img { width: 30px; height: 30px; }
.phase-step { font-size: 13px; min-height: 44px; padding-block: 4px; }
.journey-utilities { font-size: 12px; }
.journey-utilities .icon-text-button { font-size: 13px; min-height: 32px; padding-block: 4px; }
.stage-support { font-size: 13px; line-height: 1.5; }
.stage-form .hint, .stage-form .example-control, #studyExampleAction .example-control { font-size: 12px; line-height: 1.5; }
.compact-a1-construct .stage-intro h2 { font-size: 24px; line-height: 1.25; }
.compact-a1-construct .stage-support { font-size: 13px; margin-top: 6px; }
.compact-a1-construct .field-label { font-size: 14px; }
.construct-prompt-guidance { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.construct-prompt-guidance > summary { cursor: pointer; color: var(--accent-dark); width: fit-content; padding: 5px 0; }
.construct-prompt-guidance p { margin: 8px 0; max-width: 760px; }
.source-reference { font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
.source-reference summary { cursor: pointer; padding-block: 6px; color: #20574e; }
.source-reference p { white-space: pre-wrap; overflow-wrap: anywhere; }
.section-task-path { min-height: 26px; padding-block: 0; }
.section-task-node { font-size: 11px; min-height: 26px; padding-bottom: 3px; }
.section-task-dot { width: 6px; height: 6px; flex-basis: 6px; }
.focused-actions { padding-block: 3px; gap: 8px; }
.focused-actions button { width: auto; font-size: 12px; min-height: 32px; padding: 4px 12px; }
.focused-actions #nextBtn { min-width: 108px; max-width: 160px; justify-self: end; }
@media (max-width: 820px) {
  .journey-header { min-height: auto; }
}
@media (max-width: 560px) {
  .journey-header { gap: 8px; }
  .journey-brand h1 { font-size: 14px; }
  .phase-step { font-size: 12px; }
  .journey-utilities .icon-text-button { min-height: 44px; }
  .section-task-node { min-height: 32px; font-size: 11px; }
  .compact-a1-construct .stage-intro h2 { font-size: 22px; }
  .focused-actions button { min-height: 44px; font-size: 13px; }
  .focused-actions #nextBtn { min-width: 96px; }
}
.compact-a4-problem .stage-intro h2 { font-size: 24px; line-height: 1.25; }
.compact-a4-problem .stage-support { font-size: 13px; margin-top: 6px; }
.compact-a4-problem .a4-problem-task > summary { display: none; }
.a4-problem-task .field-label { font-size: 14px; }
.a4-prompt-guidance { font-size: 13px; line-height: 1.5; }
.a4-prompt-guidance > summary { cursor: pointer; color: var(--accent-dark); width: fit-content; padding: 5px 0; }
.a4-prompt-guidance p { margin: 8px 0; max-width: 760px; }
.a4-problem-task .gap-refinement > summary { font-size: 13px; }
@media (max-width: 600px) { .compact-a4-problem .stage-intro h2 { font-size: 22px; } }
.adviser-comparison-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 8px; align-items: start; --matrix-panel-height: 70vh; font-size: 12px; font-weight: 400; }
.adviser-comparison-layout summary, #adviserMatrixChoices legend { font-size: 12px; font-weight: 400; }
.adviser-comparison-layout .adviser-matrix-options { margin: 0; max-height: var(--matrix-panel-height); overflow: auto; scrollbar-gutter: stable; padding: 8px; border: 1px solid #cbd7d8; border-radius: 6px; }
.adviser-comparison-content { min-width: 0; }
.adviser-comparison-content > [role="status"] { margin: 0 0 8px; font-size: 12px; }
#adviserMatrixChoices { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 6px; }
#adviserMatrixChoices fieldset { min-width: 0; padding: 6px; }
#adviserMatrixChoices label { display: block; font-size: 12px; font-weight: 400; line-height: 1.25; margin: 1px 0; padding: 2px 0; overflow-wrap: anywhere; }
#adviserMatrixChoices input[type="checkbox"] { margin: 0 5px 0 0; padding: 0; vertical-align: middle; }
#adviserMatrixChoices small { display: block; font-size: 12px; margin-left: 24px; }
.adviser-matrix-scroll { max-height: calc(var(--matrix-panel-height, 70vh) - 26px); overflow: auto; position: relative; isolation: isolate; margin-bottom: 24px; }
.adviser-matrix { --matrix-label-width: 75px; --matrix-column-min: 260px; border-collapse: separate; border-spacing: 0; width: 100%; min-width: calc(var(--matrix-label-width) + var(--proposal-count) * var(--matrix-column-min)); table-layout: fixed; font-size: var(--adviser-matrix-text-size); }
.adviser-matrix-single { min-width: 100%; }
.adviser-matrix caption { text-align: left; font-size: 12px; font-weight: 400; padding: 4px; }
.adviser-matrix th, .adviser-matrix td { box-sizing: border-box; font-size: 12px; font-weight: 400; border-right: 1px solid #cbd7d8; border-bottom: 1px solid #cbd7d8; padding: 6px; vertical-align: top; overflow-wrap: anywhere; background: #fff; }
.adviser-matrix thead th { position: sticky; top: 0; z-index: 2; background: #eaf3f1; font-size: var(--adviser-matrix-text-size); }
.adviser-matrix th:first-child { width: var(--matrix-label-width); white-space: normal; overflow-wrap: anywhere; position: sticky; left: 0; z-index: 1; background: #eaf3f1; }
.adviser-matrix thead th:first-child { z-index: 3; }
.adviser-matrix th small { display: block; font-size: 12px; font-weight: normal; margin-top: 6px; }
.adviser-matrix-entry { white-space: pre-wrap; font-size: var(--adviser-matrix-text-size); line-height: 1.55; margin: 0; }
.adviser-source-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 0 6px auto; color: #20574e; position: relative; border-radius: 4px; }
.adviser-source-icon:hover, .adviser-source-icon:focus-visible { background: #e2efeb; outline: 2px solid #20574e; }
.adviser-source-tooltip { display: none; position: absolute; right: 0; top: 100%; z-index: 4; width: max-content; padding: 4px 8px; background: #173f38; color: white; font-size: 12px; }
.adviser-source-icon:hover .adviser-source-tooltip, .adviser-source-icon:focus-visible .adviser-source-tooltip { display: block; }
@media (max-width: 800px) {
  .adviser-comparison-layout { grid-template-columns: 1fr; }
  .adviser-comparison-layout .adviser-matrix-options { max-height: 35vh; }
}
@media (max-width: 600px) {
  :root { --adviser-matrix-text-size: 12px; }
  #adviserMatrixChoices { grid-template-columns: 1fr; }
  .adviser-matrix { --matrix-label-width: 50px; --matrix-column-min: 240px; }
  .adviser-source-icon { width: 44px; height: 44px; }
}
