/* Governance Kompass — modern consultant workspace layer.
   Loaded after app.css so the legacy stylesheet remains reversible. */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --surface-muted: #f1f4f6;
  --text: #19212c;
  --muted: #687384;
  --line: #dfe4ea;
  --line-strong: #cfd6de;
  --brand-ink: #191d24;
  --ink: #191d24;
  --brand-primary: #cf262c;
  --brand-primary-dark: #aa1c22;
  --brand-accent: #187d89;
  --brand-trust: #315f7d;
  --red: #cf262c;
  --red-dark: #aa1c22;
  --teal: #187d89;
  --blue: #315f7d;
  --green: #2f7d57;
  --shadow: 0 18px 48px rgba(24, 33, 44, 0.075);
  --shadow-soft: 0 8px 24px rgba(24, 33, 44, 0.055);
  --radius: 14px;
  --radius-compact: 10px;
  --focus-ring: 0 0 0 3px rgba(24, 125, 137, 0.17);
}

html {
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(24, 125, 137, 0.18);
}

button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font-weight: 500;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.app-shell {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #191d24;
  box-shadow: 0 8px 24px rgba(18, 23, 31, 0.12);
}

.brandbar {
  width: min(1505px, 100%);
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  min-width: 248px;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: var(--red);
  box-shadow: 0 7px 16px rgba(207, 38, 44, 0.22);
  font-size: 17px;
  font-weight: 800;
}

.brand .brand-copy strong {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand .brand-copy span {
  margin-top: 1px;
  color: #aeb7c3;
  font-size: 11px;
  font-weight: 500;
}

.portal-nav {
  flex-wrap: nowrap;
  gap: 6px;
}

.portal-nav a {
  position: relative;
  min-height: 42px;
  border-radius: 9px;
  padding: 0 14px;
  color: #c8d0da;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.005em;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.portal-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.portal-nav a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--red);
}

.portal-nav a.session-logout {
  min-height: 40px;
  margin-left: 10px;
  padding-inline: 13px;
  border-color: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.workspace {
  width: min(1505px, calc(100% - 48px));
  padding: 32px 0 64px;
  gap: 22px;
}

.topbar {
  align-items: center;
}

.topbar h1,
.decision-wizard-head h1 {
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.topbar p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.panel,
.metric-grid article,
.search-area,
.quality-hero,
.wizard-entry-panel,
.wizard-section,
.wizard-recent-decisions,
.report-cover {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.primary-action,
.secondary-action,
.search-row button,
.question-form button,
.composer-actions button,
.wizard-submit-bar button {
  min-height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.primary-action:hover,
.search-row button:hover,
.question-form button:hover,
.composer-actions button:hover,
.wizard-submit-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(207, 38, 44, 0.18);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  padding: 0 14px;
}

input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: var(--focus-ring);
  outline: 0;
}

/* Primary consultant workspace */
.page-chat .workspace {
  padding-top: 30px;
}

.chat-workbench {
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 32px;
}

.chat-rail {
  top: 102px;
  gap: 18px;
  padding-top: 7px;
}

.chat-rail > div:first-child {
  padding: 0 2px 2px;
}

.chat-rail h1 {
  max-width: 11ch;
  margin-top: 8px;
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.chat-context-actions {
  display: grid;
  gap: 10px;
}

.chat-context-actions .new-chat-link,
.chat-context-actions form,
.chat-context-actions button {
  width: 100%;
}

.new-chat-link,
.chat-thread-header a,
.composer-actions a {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 10px;
  color: #263241;
  font-weight: 650;
}

.new-chat-link:hover,
.chat-thread-header a:hover,
.composer-actions a:hover {
  border-color: #aeb8c4;
  background: var(--surface-soft);
}

.chat-context-actions button,
.chat-thread-actions button {
  min-height: 44px;
  border-color: rgba(207, 38, 44, 0.46);
  border-radius: 10px;
  color: #b51f25;
  font-weight: 650;
}

.source-health-card,
.recent-chat-list {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.source-health-card summary {
  min-height: 54px;
  padding: 12px 14px;
}

.source-health-card summary span:nth-child(2) {
  font-weight: 650;
}

.source-health-card summary b {
  color: var(--teal);
  font-weight: 650;
}

.recent-chat-list {
  padding: 12px;
}

.recent-chat-list h2 {
  font-size: 12px;
  font-weight: 700;
}

.recent-chat-list > a,
.recent-chat-more a {
  border-radius: 9px;
  background: var(--surface-soft);
}

.chat-panel {
  min-height: calc(100vh - 134px);
  border-color: var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.chat-panel.is-empty {
  min-height: calc(100vh - 134px);
  grid-template-rows: auto auto minmax(360px, 1fr);
}

.chat-thread-header {
  min-height: 104px;
  padding: 24px 38px;
  border-bottom-color: var(--line);
}

.chat-thread-header span {
  margin-bottom: 7px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 650;
}

.chat-thread-header h2 {
  color: var(--ink);
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.chat-thread {
  gap: 22px;
  padding: 28px 36px;
  background: #fff;
}

.chat-panel.is-empty .chat-thread {
  padding: 24px 38px 0;
}

.empty-chat-state {
  max-width: none;
  padding: 25px 26px;
  border-color: var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.empty-chat-state strong {
  color: #263241;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.42;
}

.empty-chat-state p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.chat-composer {
  gap: 15px;
  padding: 22px 38px 34px;
  border-top-color: var(--line);
}

.chat-panel.is-empty .chat-composer {
  align-content: start;
}

.research-scope-toggle {
  gap: 10px;
}

.research-scope-toggle label {
  min-height: 42px;
  border-color: var(--line-strong);
  border-radius: 10px;
  padding: 0 14px;
  color: #3a4654;
  font-size: 13px;
  font-weight: 600;
}

.research-scope-toggle label:has(input:checked) {
  border-color: rgba(24, 125, 137, 0.5);
  background: rgba(24, 125, 137, 0.065);
  color: #145f69;
}

.research-scope-toggle input {
  width: 16px;
  height: 16px;
}

.starter-prompts {
  gap: 10px;
}

.starter-prompts button {
  min-height: 42px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #3a4654;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.starter-prompts button:hover,
.starter-prompts button:focus-visible {
  border-color: #9bb0bd;
  background: var(--surface-soft);
  color: var(--ink);
}

.chat-composer label span {
  margin-bottom: 8px;
  color: #3e4a59;
  font-size: 12px;
  font-weight: 650;
}

.chat-composer textarea {
  min-height: 132px;
  max-height: 280px;
  padding: 15px 16px;
  font-size: 15px;
  line-height: 1.52;
  resize: vertical;
}

.chat-panel.is-empty .chat-composer textarea {
  min-height: 172px;
}

.composer-actions button,
.chat-composer button[type="submit"] {
  min-height: 46px;
  border-radius: 10px;
  padding: 0 19px;
  background: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.chat-message > span {
  color: var(--muted);
  font-weight: 650;
}

.user-message p {
  border-radius: 12px 12px 4px 12px;
  background: #252c36;
  box-shadow: 0 8px 18px rgba(25, 33, 44, 0.09);
}

.assistant-answer {
  border-color: var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-soft);
}

.answer-lead {
  padding: 26px 30px 23px;
}

.answer-decision-hero {
  margin: 18px 22px 0;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}

.answer-decision-hero-head h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.answer-decision-hero-head strong {
  border: 1px solid rgba(24, 125, 137, 0.22);
  border-radius: 9px;
  background: rgba(24, 125, 137, 0.07);
  font-weight: 650;
}

.case-status-card {
  border-color: var(--line);
}

.assistant-answer > .answer-disclosure {
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
}

.assistant-answer > .answer-disclosure[open] {
  border-color: var(--line-strong);
  box-shadow: 0 8px 22px rgba(24, 33, 44, 0.045);
}

.answer-disclosure summary span {
  font-weight: 650;
}

.answer-disclosure summary::after {
  border-color: var(--line);
  background: var(--surface-soft);
}

.answer-followups,
.conversation-report-card {
  border-color: rgba(24, 125, 137, 0.24);
  border-radius: 11px;
  background: #f7fbfc;
  box-shadow: none;
}

/* Requirements as a calm, expandable working list */
.page-requirements .workspace {
  max-width: 1505px;
}

.requirements-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.requirements-metrics article {
  min-width: 0;
  min-height: 116px;
  padding: 20px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.requirements-metrics article:last-child {
  border-right: 0;
}

.requirements-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.requirements-metrics strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.requirements-metrics p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.page-requirements .search-area {
  position: sticky;
  top: 88px;
  z-index: 30;
  padding: 18px;
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(24, 33, 44, 0.07);
}

.search-area label {
  color: #3e4a59;
  font-weight: 650;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-row input {
  min-height: 46px;
  padding-inline: 14px;
}

.search-row button {
  min-width: 104px;
}

.requirements-filter-row {
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
  scrollbar-width: thin;
}

.requirements-filter-row a {
  min-height: 34px;
  flex: 0 0 auto;
  border-color: var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.requirements-filter-row a.is-active {
  border-color: rgba(24, 125, 137, 0.42);
  background: rgba(24, 125, 137, 0.07);
  color: #145f69;
}

.requirements-orientation,
.requirements-coverage {
  overflow: visible;
  border-color: var(--line);
  box-shadow: none;
}

.requirements-orientation {
  padding: 0;
  background: #f8fafb;
}

.requirements-coverage {
  padding: 0;
  border-left: 4px solid var(--teal);
}

.requirements-orientation > summary,
.requirements-coverage > summary {
  display: grid;
  align-items: center;
  min-height: 64px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.requirements-orientation > summary {
  grid-template-areas:
    "eyebrow icon"
    "title icon";
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 2px 14px;
}

.requirements-orientation > summary .eyebrow {
  grid-area: eyebrow;
}

.requirements-orientation > summary > strong {
  grid-area: title;
}

.requirements-orientation > summary::-webkit-details-marker,
.requirements-coverage > summary::-webkit-details-marker {
  display: none;
}

.requirements-orientation > summary::after,
.requirements-coverage > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 2px solid #667384;
  border-bottom: 2px solid #667384;
  transform: rotate(45deg) translateY(-2px);
}

.requirements-orientation > summary::after {
  grid-area: icon;
  align-self: center;
}

.requirements-orientation[open] > summary::after,
.requirements-coverage[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.requirements-orientation > summary .eyebrow,
.requirements-orientation > summary strong,
.requirements-coverage > summary .eyebrow,
.requirements-coverage > summary strong {
  display: block;
}

.requirements-orientation > summary strong,
.requirements-coverage > summary > div:first-child > strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.requirements-orientation > p,
.coverage-body {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.requirements-coverage > summary {
  grid-template-columns: minmax(250px, 1fr) minmax(330px, 0.75fr) 18px;
  gap: 18px;
}

.requirements-coverage > summary .coverage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.requirements-coverage > summary .coverage-summary span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.requirements-coverage > summary .coverage-summary strong {
  display: inline;
  margin-right: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.coverage-body > p {
  margin-bottom: 12px;
}

.requirements-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.requirement-card {
  margin: 0;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.requirement-card:last-child {
  border-bottom: 0;
}

.requirement-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.48fr) 18px;
  gap: 22px;
  align-items: center;
  min-height: 122px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms ease;
}

.requirement-summary::-webkit-details-marker {
  display: none;
}

.requirement-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 2px solid #667384;
  border-bottom: 2px solid #667384;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.requirement-card[open] > .requirement-summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.requirement-summary:hover {
  background: #fafbfc;
}

.requirement-summary-copy {
  min-width: 0;
}

.requirement-topline {
  gap: 8px;
  margin-bottom: 8px;
}

.requirement-topline span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.requirement-summary h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.requirement-summary p {
  max-width: 82ch;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.requirement-summary .requirement-source-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.requirement-summary .requirement-source-strip span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #526071;
  font-size: 11px;
  font-weight: 600;
}

.requirement-card-body {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}

.requirement-card-body .fact-grid > div,
.requirement-card-body .split-area > section,
.requirement-card-body .action-area,
.requirement-card-body .requirement-sources {
  border-color: var(--line);
  border-radius: 10px;
  background: #fff;
}

/* Decision workflow */
.decision-wizard-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  gap: 22px;
}

.decision-wizard-head {
  min-height: 72px;
  align-items: center;
}

.decision-wizard-head > a,
.wizard-recent-head > a {
  min-height: 42px;
  border-color: var(--line-strong);
  border-radius: 10px;
  font-weight: 650;
}

.wizard-entry-panel,
.wizard-section,
.wizard-recent-decisions {
  padding: 22px;
}

.wizard-entry-panel {
  border-top: 0;
}

.wizard-choice,
.wizard-checkbox-grid label,
.wizard-process-map div,
.wizard-decision-preview-grid article,
.wizard-recent-item {
  border-color: var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.wizard-choice:hover,
.wizard-checkbox-grid label:hover {
  border-color: #aeb9c5;
  background: var(--surface-soft);
}

.wizard-stepper {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.wizard-step {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.wizard-step:last-child {
  border-right: 0;
}

.wizard-step.is-active,
.wizard-step.is-active-step {
  background: rgba(24, 125, 137, 0.075);
  box-shadow: inset 0 -3px 0 var(--teal);
}

.wizard-submit-bar {
  z-index: 40;
  margin: 0 -8px;
  padding: 14px 8px 8px;
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(14px);
}

/* Quality and reporting surfaces */
.quality-hero {
  border-left-width: 4px;
  padding: 22px 24px;
}

.quality-metrics,
.report-grid,
.metric-grid {
  gap: 14px;
}

.quality-metrics article,
.metric-grid article {
  min-height: 132px;
  padding: 20px;
}

.quality-metrics strong,
.metric-grid strong {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.quality-panel,
.report-grid .panel {
  box-shadow: none;
}

.quality-check-list article,
.quality-source-list article,
.list-row {
  border-color: var(--line);
}

.report-cover {
  border-top: 0;
  padding: 26px;
}

/* Login follows the same product language. */
.access-page {
  background: #f4f6f8;
}

.access-shell {
  padding: 32px;
}

.access-card {
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.access-card h1 {
  letter-spacing: -0.035em;
}

@media (max-width: 1100px) {
  .workspace {
    width: min(100% - 32px, 1505px);
  }

  .chat-workbench {
    grid-template-columns: minmax(205px, 230px) minmax(0, 1fr);
    gap: 20px;
  }

  .chat-rail h1 {
    font-size: 23px;
  }

  .requirement-summary {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .requirement-summary .requirement-source-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .requirements-metrics article:nth-child(2) {
    border-right: 0;
  }

  .requirements-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .quality-metrics,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: relative;
    min-height: 68px;
    padding-inline: 18px;
  }

  .brandbar {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand .brand-copy span {
    display: none;
  }

  .portal-nav {
    max-width: 60vw;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .portal-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-nav a {
    flex: 0 0 auto;
    padding-inline: 11px;
  }

  .chat-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-panel,
  .chat-panel.is-empty {
    min-height: auto;
  }

  .chat-thread-header {
    min-height: auto;
  }

  .page-requirements .search-area {
    top: 10px;
  }

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

@media (max-width: 720px) {
  .sidebar {
    padding: 10px 14px 8px;
  }

  .brandbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand .brand-copy strong {
    font-size: 14px;
  }

  .portal-nav {
    order: 2;
    width: 100%;
    max-width: none;
  }

  .portal-nav a {
    min-height: 38px;
    font-size: 12px;
  }

  .workspace {
    width: 100%;
    padding: 22px 14px 44px;
  }

  .topbar {
    display: grid;
    gap: 14px;
  }

  .topbar h1,
  .decision-wizard-head h1 {
    font-size: 28px;
  }

  .topbar .secondary-action {
    width: 100%;
  }

  .chat-panel {
    border-radius: 12px;
  }

  .chat-thread-header {
    display: flex;
    padding: 18px;
  }

  .chat-thread-header h2 {
    font-size: 22px;
  }

  .chat-thread,
  .chat-panel.is-empty .chat-thread {
    padding: 16px;
  }

  .empty-chat-state {
    padding: 18px;
  }

  .empty-chat-state strong {
    max-width: none;
    font-size: 17px;
  }

  .empty-chat-state p {
    max-width: none;
    font-size: 14px;
  }

  .chat-composer,
  .chat-panel.is-empty .chat-composer {
    padding: 18px 16px;
  }

  .chat-panel.is-empty .chat-composer textarea,
  .chat-composer textarea {
    min-height: 120px;
    font-size: 16px;
  }

  .starter-prompts {
    grid-template-columns: 1fr;
  }

  .starter-prompts button,
  .research-scope-toggle label,
  .composer-actions button,
  .chat-composer button[type="submit"] {
    min-height: 46px;
  }

  .composer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .requirements-metrics,
  .quality-metrics,
  .metric-grid {
    grid-template-columns: 1fr;
  }

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

  .requirements-metrics article,
  .requirements-metrics article:nth-child(2),
  .requirements-metrics article:nth-child(-n + 2) {
    min-width: 0;
    min-height: 146px;
    padding: 17px 16px;
    border-bottom: 1px solid var(--line);
  }

  .requirements-metrics article:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .requirements-metrics article:nth-child(even) {
    border-right: 0;
  }

  .requirements-metrics article:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .requirements-metrics strong {
    font-size: 24px;
  }

  .page-requirements .search-area {
    position: static;
    padding: 14px;
  }

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

  .search-row button {
    width: 100%;
  }

  .requirements-orientation,
  .requirements-coverage {
    grid-template-columns: 1fr;
  }

  .requirements-coverage > summary {
    grid-template-columns: minmax(0, 1fr) 16px;
  }

  .requirements-coverage > summary .coverage-summary {
    grid-column: 1 / -1;
  }

  .requirement-summary {
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 12px;
    min-height: auto;
    padding: 17px 16px;
  }

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

  .requirement-card-body {
    padding: 16px;
  }

  .wizard-stepper {
    grid-template-columns: 1fr;
  }

  .wizard-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wizard-step:last-child {
    border-bottom: 0;
  }

  .wizard-entry-panel,
  .wizard-section,
  .wizard-recent-decisions {
    padding: 16px;
  }

  .access-shell {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .sidebar,
  .chat-rail,
  .page-requirements .search-area {
    position: static !important;
    box-shadow: none !important;
  }

  body,
  .workspace,
  .panel,
  .chat-panel,
  .assistant-answer,
  .report-cover {
    background: #fff !important;
    box-shadow: none !important;
  }
}

/* Governance Kompass — portal consistency v4.
   Shared workbench grammar for operational, report and document surfaces. */

:root {
  --gk-focus: 0 0 0 3px rgba(229, 31, 37, 0.16);
  --gk-red-wash: #fff5f5;
  --gk-teal-wash: #eff9fa;
  --gk-orange-wash: #fff8ed;
  --gk-disabled: #f3f5f7;
}

.page-report .workspace,
.page-quality .workspace,
.page-review .workspace,
.page-measures .workspace,
.page-decision-export .workspace,
.page-decision-export-prepare .workspace,
.page-decision-pdf-prepare .workspace {
  gap: 0;
}

.page-report .workspace,
.page-quality .workspace,
.page-review .workspace,
.page-measures .workspace,
.page-decision-export .workspace {
  padding-top: 44px;
}

.page-intro,
.topbar.page-intro {
  display: flex;
  min-height: 0;
  padding: 0 0 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--gk-line);
}

.page-intro__copy,
.page-intro-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.page-intro__copy h1,
.page-intro-copy h1 {
  margin: 0;
}

.page-intro__copy p,
.page-intro-copy p {
  margin: 0;
}

.page-intro__actions,
.page-intro-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.page-intro .primary-action,
.page-intro .secondary-action,
.export-loader-actions a {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
}

.page-intro .secondary-action {
  border: 1px solid var(--gk-line);
  background: #fff;
}

.page-intro .secondary-action:hover {
  border-color: #b8c4cf;
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}

.data-strip {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--gk-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.data-strip__items {
  display: grid;
  width: 100%;
  margin: 0;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.data-strip__item,
.data-strip-item {
  min-width: 0;
  margin: 0;
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.data-strip__item:last-child,
.data-strip-item:last-child {
  border-right: 0;
}

.data-strip__item dt,
.data-strip-item > span {
  margin: 0;
  color: var(--gk-muted);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-transform: uppercase;
}

.data-strip__item dd,
.data-strip-item > strong,
.data-strip-item > p {
  margin: 0;
}

.data-strip__value,
.data-strip-item > strong {
  display: block;
  margin-top: 5px !important;
  color: var(--gk-ink);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
}

.data-strip__note,
.data-strip-item > p {
  margin-top: 7px !important;
  color: var(--gk-muted);
  font-size: 11px;
  line-height: 1.45;
}

.workbench-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  align-items: start;
  gap: 0 36px;
}

.workbench-primary,
.workbench-secondary {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 0;
}

.workbench-secondary {
  padding-left: 32px;
  border-left: 1px solid var(--gk-line);
}

.workbench-section {
  min-width: 0;
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workbench-section__header,
.workbench-section-heading {
  display: flex;
  min-height: 0;
  margin: 0 0 16px;
  padding: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  background: transparent;
}

.workbench-section__header h2,
.workbench-section-heading h2 {
  margin: 0;
  color: var(--gk-ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.workbench-section__header p,
.workbench-section-heading p {
  margin: 4px 0 0;
  color: var(--gk-muted);
  font-size: 12px;
}

.workbench-section__header > span,
.workbench-section-heading > span {
  flex: 0 0 auto;
  color: var(--gk-muted);
  font-size: 11px;
  font-weight: 700;
}

.work-list {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  list-style: none;
  border-top: 1px solid var(--gk-line-soft);
}

.work-item {
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.work-item__header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.work-item__title,
.work-item__body {
  min-width: 0;
}

.work-item__title h3,
.work-item__header h3 {
  margin: 0;
  color: var(--gk-ink);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.work-item__title p,
.work-item__body p,
.work-item > p {
  margin: 6px 0 0;
  color: var(--gk-muted);
  font-size: 12px;
  line-height: 1.5;
}

.work-item__date,
.work-item__header > span {
  flex: 0 0 auto;
  color: var(--gk-muted);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.work-item__topline {
  margin: 0 0 5px;
}

.work-item__meta {
  display: grid;
  margin: 14px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--gk-line-soft);
}

.work-item__meta > div {
  min-width: 0;
  padding: 11px 13px;
  border-right: 1px solid var(--gk-line-soft);
  border-bottom: 1px solid var(--gk-line-soft);
}

.work-item__meta > div:nth-child(2n) {
  border-right: 0;
}

.work-item__meta > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.work-item__meta dt,
.work-item__meta dd {
  margin: 0;
}

.work-item__meta dt {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.work-item__meta dd {
  margin-top: 3px;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.work-item--compact {
  padding: 12px 0;
}

.work-item--compact strong {
  color: var(--gk-ink);
  font-size: 12px;
}

.work-item--compact span {
  color: var(--gk-muted);
  font-size: 10px;
}

.disclosure {
  border: 0;
  background: transparent;
}

.work-item__disclosure {
  margin-top: 14px;
  border-top: 1px solid var(--gk-line-soft);
}

.work-item__disclosure > summary,
.workbench-section.disclosure > summary {
  display: flex;
  min-height: 48px;
  padding: 12px 2px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--gk-text);
  font-size: 12px;
  font-weight: 740;
  cursor: pointer;
  list-style: none;
}

.work-item__disclosure > summary::-webkit-details-marker,
.workbench-section.disclosure > summary::-webkit-details-marker {
  display: none;
}

.work-item__disclosure > summary::after,
.workbench-section.disclosure > summary::after {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 1.5px solid var(--gk-muted);
  border-bottom: 1.5px solid var(--gk-muted);
  content: "";
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.work-item__disclosure[open] > summary::after,
.workbench-section.disclosure[open] > summary::after {
  transform: rotate(225deg);
}

.work-item__disclosure > summary small {
  margin-left: auto;
  color: var(--gk-muted);
  font-size: 10px;
  font-weight: 650;
}

.notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(11, 139, 152, 0.22);
  border-radius: 8px;
  background: var(--gk-teal-wash);
  color: #075f68;
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--gk-muted);
}

.status-dot.is-green {
  background: var(--gk-teal);
}

.status-dot.is-yellow {
  background: var(--gk-orange);
}

.status-dot.is-red {
  background: var(--gk-red);
}

/* Report */

.report-workbench {
  display: grid;
  width: min(100%, 1420px);
  margin: 0 auto;
  gap: 0;
}

.report-brief {
  display: grid;
  padding: 26px 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
  border-top: 0;
}

.report-brief-copy {
  max-width: 880px;
}

.report-brief h2 {
  max-width: 800px;
  margin: 4px 0 0;
  color: var(--gk-ink);
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 770;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.report-brief-copy > p {
  max-width: 840px;
  margin: 12px 0 0;
  color: var(--gk-text);
  font-size: 13px;
  line-height: 1.6;
}

.section-kicker {
  color: var(--gk-teal);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.report-next-action {
  display: grid;
  margin-top: 18px;
  padding: 13px 15px;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid rgba(229, 31, 37, 0.2);
  border-radius: 7px;
  background: var(--gk-red-wash);
}

.report-next-action span {
  color: var(--gk-red);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.report-next-action strong {
  color: var(--gk-text);
  font-size: 12px;
  font-weight: 720;
}

.report-brief-meta {
  display: grid;
  min-width: 200px;
  margin: 2px 0 0;
  gap: 0;
  border-top: 1px solid var(--gk-line);
}

.report-brief-meta > div {
  padding: 11px 0;
  border-bottom: 1px solid var(--gk-line-soft);
}

.report-brief-meta dt,
.report-brief-meta dd {
  margin: 0;
}

.report-brief-meta dt {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.report-brief-meta dd {
  margin-top: 3px;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
}

.report-data-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-section-list {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.82fr);
  gap: 0 36px;
}

.report-section-list .report-section:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.report-section-list .report-section:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  padding-left: 28px;
  border-left: 1px solid var(--gk-line);
}

.report-section-list .report-section:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.report-section-list .report-section:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
  padding-left: 28px;
  border-left: 1px solid var(--gk-line);
}

.report-list {
  border-top-color: var(--gk-line);
}

.report-list-item {
  display: grid;
  padding: 13px 0;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.25fr) minmax(120px, auto);
  align-items: start;
  gap: 16px;
}

.report-list-item strong {
  color: var(--gk-ink);
  font-size: 12px;
  line-height: 1.4;
}

.report-list-item p {
  margin: 0;
  color: var(--gk-muted);
  font-size: 11px;
  line-height: 1.45;
}

.report-list-item > span {
  color: var(--gk-muted);
  font-size: 9px;
  line-height: 1.45;
  text-align: right;
}

.report-section-list .report-section:nth-child(even) .report-list-item {
  grid-template-columns: 1fr;
  gap: 4px;
}

.report-section-list .report-section:nth-child(even) .report-list-item > span {
  text-align: left;
}

.report-list-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--gk-muted);
  font-size: 12px;
}

/* Quality and operational workspaces */

.quality-topbar {
  margin-bottom: 0;
}

.quality-hero {
  display: flex;
  min-height: 88px;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 0;
  border-bottom: 0;
  background: #fff;
}

.quality-hero .data-strip__lead {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
}

.quality-hero .data-strip__lead strong {
  display: block;
  margin-top: 1px;
  color: var(--gk-ink);
  font-size: 16px;
  font-weight: 760;
}

.quality-hero .data-strip__lead p {
  margin: 4px 0 0;
  color: var(--gk-muted);
  font-size: 11px;
}

.quality-hero .data-strip__label {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.quality-hero .data-strip__meta {
  display: flex;
  margin: 0;
}

.quality-hero .data-strip__meta .data-strip__item {
  min-width: 150px;
  padding: 4px 18px;
}

.quality-hero .data-strip__meta dt,
.quality-hero .data-strip__meta dd {
  margin: 0;
}

.quality-hero .data-strip__meta dt {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 700;
}

.quality-hero .data-strip__meta dd {
  margin-top: 2px;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
}

.quality-metrics {
  border-top: 1px solid var(--gk-line);
}

.quality-workbench {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
}

.quality-panel:first-child {
  border-top: 0;
}

.quality-workbench .workbench-secondary {
  margin-top: 24px;
}

.quality-source-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
}

.quality-source-item .status-dot {
  margin-top: 5px;
}

.quality-source-item small {
  display: block;
  margin-top: 5px;
  color: var(--gk-muted);
  font-size: 10px;
}

.quality-check-list .work-item--compact {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.work-item__status {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.is-passed .work-item__status {
  color: var(--gk-teal);
}

.is-open .work-item__status {
  color: var(--gk-red);
}

.quality-event-tags {
  display: flex;
  margin-bottom: 14px;
  gap: 6px;
  flex-wrap: wrap;
}

.quality-event-tags span {
  padding: 5px 8px;
  border: 1px solid var(--gk-line);
  border-radius: 6px;
  background: #fff;
  color: var(--gk-muted);
  font-size: 9px;
}

.review-data-strip,
.measures-data-strip,
.quality-metrics {
  margin-top: 20px;
}

.review-board {
  padding-top: 26px;
  border-top: 0;
}

.review-work-list {
  border-top-color: var(--gk-line);
}

.review-work-item {
  display: grid;
  padding: 22px 0;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 34px;
}

.review-card-side {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--gk-line-soft);
}

.work-item__group + .work-item__group {
  margin-top: 18px;
}

.work-item__group-heading {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-item__group-heading h4 {
  margin: 0;
  color: var(--gk-ink);
  font-size: 11px;
  font-weight: 750;
}

.work-item__group-heading span {
  color: var(--gk-muted);
  font-size: 9px;
}

.compact-list {
  border-top-color: var(--gk-line-soft);
}

a.work-item--compact {
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

a.work-item--compact:hover {
  padding-left: 6px;
  background: #fafbfd;
}

.muted-text {
  color: var(--gk-muted);
  font-size: 11px;
}

.review-form,
.measure-form {
  display: grid;
  padding: 16px 0 4px;
  gap: 14px;
}

.review-form-grid,
.measure-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-form > label,
.measure-form > label,
.review-form-grid > label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.review-form > label {
  grid-column: 1 / -1;
}

.review-form label > span,
.measure-form label > span {
  color: var(--gk-text);
  font-size: 10px;
  font-weight: 720;
}

.review-form input,
.review-form select,
.review-form textarea,
.measure-form input,
.measure-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd6e1;
  border-radius: 7px;
  background: #fff;
  color: var(--gk-ink);
  box-shadow: none;
}

.review-form textarea {
  min-height: 96px;
  resize: vertical;
}

.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus,
.measure-form input:focus,
.measure-form select:focus {
  border-color: var(--gk-red);
  outline: 0;
  box-shadow: var(--gk-focus);
}

.review-form .form-actions,
.measure-form .form-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.review-form button,
.measure-form button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--gk-red);
  border-radius: 7px;
  background: var(--gk-red);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}

.measures-layout {
  margin-top: 24px;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
}

.measures-layout > .workbench-section {
  padding-top: 0;
  border-top: 0;
}

.measure-work-item {
  padding: 20px 0;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

.review-work-item {
  content-visibility: auto;
  contain-intrinsic-size: 520px;
}

.measure-progress {
  display: grid;
  width: 116px;
  flex: 0 0 116px;
  justify-items: end;
  gap: 6px;
}

.measure-progress strong {
  color: var(--gk-ink);
  font-size: 16px;
  font-weight: 770;
}

.measure-progress progress {
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
}

.measure-progress progress::-webkit-progress-bar {
  background: var(--gk-line-soft);
}

.measure-progress progress::-webkit-progress-value {
  background: var(--gk-teal);
}

.measure-progress progress::-moz-progress-bar {
  background: var(--gk-teal);
}

.recommendation-item .work-item__meta {
  grid-template-columns: 1fr;
}

.recommendation-item .work-item__meta > div {
  border-right: 0;
}

@media (min-width: 1181px) {
  .review-work-list,
  .measure-list {
    max-height: calc(100vh - 330px);
    min-height: 620px;
    padding-right: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .measures-layout > .workbench-secondary {
    position: sticky;
    top: 28px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
}

/* Modern checkbox and radio system */

.wizard-checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wizard-checkbox-grid.is-evidence {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-choice,
.wizard-checkbox-grid label {
  min-height: 56px;
  padding: 12px 14px;
  gap: 12px;
  border: 1px solid #cbd6e1;
  border-radius: 8px;
  background: #fff;
  color: var(--gk-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.wizard-choice:hover,
.wizard-checkbox-grid label:hover {
  border-color: #aebdca;
  background: #fbfcfd;
  box-shadow: none;
}

.wizard-checkbox-grid input[type="checkbox"],
.wizard-choice input[type="radio"],
.research-scope-toggle input[type="radio"] {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  place-content: center;
  border: 1.5px solid #9eacbb;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.wizard-checkbox-grid input[type="checkbox"] {
  border-radius: 6px;
}

.wizard-checkbox-grid input[type="checkbox"]::before {
  width: 10px;
  height: 6px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 120ms ease;
}

.wizard-checkbox-grid input[type="checkbox"]:checked {
  border-color: var(--gk-red);
  background: var(--gk-red);
}

.wizard-checkbox-grid input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.wizard-choice input[type="radio"],
.research-scope-toggle input[type="radio"] {
  border-radius: 50%;
}

.wizard-choice input[type="radio"]:checked,
.research-scope-toggle input[type="radio"]:checked {
  border-color: var(--gk-red);
  background: var(--gk-red);
  box-shadow: inset 0 0 0 4.5px #fff;
}

.wizard-choice:has(input:checked),
.wizard-checkbox-grid label:has(input:checked) {
  border-color: rgba(229, 31, 37, 0.55);
  background: var(--gk-red-wash);
  color: var(--gk-ink);
}

.wizard-choice:has(input:focus-visible),
.wizard-checkbox-grid label:has(input:focus-visible) {
  border-color: var(--gk-red);
  box-shadow: var(--gk-focus);
}

.wizard-checkbox-grid input[type="checkbox"]:focus-visible,
.wizard-choice input[type="radio"]:focus-visible,
.research-scope-toggle input[type="radio"]:focus-visible {
  outline: 0;
  box-shadow: var(--gk-focus);
}

.wizard-choice:has(input:disabled),
.wizard-checkbox-grid label:has(input:disabled) {
  border-color: #dde3e8;
  background: var(--gk-disabled);
  color: #8b96a4;
  cursor: not-allowed;
}

.wizard-checkbox-grid input[type="checkbox"]:disabled,
.wizard-choice input[type="radio"]:disabled {
  border-color: #cfd7df;
  background: #e7ebef;
  cursor: not-allowed;
}

.research-scope-toggle input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
}

.research-scope-toggle input[type="radio"]:checked {
  box-shadow: inset 0 0 0 3.5px #fff;
}

/* Decision document and loaders */

.decision-document-workbench {
  display: grid;
  width: min(100%, 1180px);
  margin: 0 auto;
  gap: 0;
}

.decision-export-intro {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: -44px 0 0;
  padding: 24px 0 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.decision-export-intro .eyebrow {
  margin-bottom: 2px;
}

.document-shell.decision-export-document {
  display: grid;
  width: min(100%, 980px);
  margin: 30px auto 0;
  gap: 0;
  border: 1px solid var(--gk-line);
  background: #fff;
  box-shadow: 0 18px 54px rgba(20, 32, 46, 0.08);
}

.decision-export-document .workbench-section {
  padding: 28px 34px;
  border-top: 1px solid var(--gk-line);
  background: #fff;
}

.decision-export-document .document-cover {
  padding: 42px 42px 34px;
  border-top: 0;
}

.document-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.42fr);
  gap: 36px;
}

.document-cover-copy h2,
.document-cover-copy h1 {
  margin: 6px 0 0;
  color: var(--gk-ink);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.decision-document-subtitle,
.decision-export-lead {
  margin: 13px 0 0;
  color: var(--gk-text);
  font-size: 13px;
  line-height: 1.6;
}

.document-meta,
.decision-export-facts,
.document-fact-grid,
.document-summary-facts {
  display: grid;
  margin: 0;
  gap: 0;
  border-top: 1px solid var(--gk-line);
}

.document-meta > div,
.decision-export-facts > div,
.document-fact-grid > div,
.document-summary-facts > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--gk-line-soft);
}

.document-meta dt,
.document-meta dd,
.decision-export-facts dt,
.decision-export-facts dd,
.document-fact-grid dt,
.document-fact-grid dd,
.document-summary-facts dt,
.document-summary-facts dd {
  margin: 0;
}

.document-meta dt,
.decision-export-facts dt,
.document-fact-grid dt,
.document-summary-facts dt {
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-meta dd,
.decision-export-facts dd,
.document-fact-grid dd,
.document-summary-facts dd {
  margin-top: 3px;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
}

.document-data-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-right: 0;
  border-left: 0;
}

.document-data-strip .is-status strong {
  color: var(--gk-teal);
}

.document-data-strip .is-next-step {
  background: var(--gk-red-wash);
}

.document-data-strip .is-next-step > span {
  color: var(--gk-red);
}

.document-section-heading {
  margin-bottom: 16px;
}

.document-section-heading h2,
.document-summary h2,
.document-case h2 {
  margin: 0;
  color: var(--gk-ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.document-section-intro,
.document-summary-lead {
  margin: 8px 0 0;
  color: var(--gk-muted);
  font-size: 12px;
  line-height: 1.6;
}

.document-section-list {
  display: grid;
  gap: 0;
}

.document-section.is-priority {
  border-left: 3px solid var(--gk-red);
}

.document-section.is-supporting {
  background: #fcfdfe;
}

.document-detail-grid,
.decision-export-practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.document-detail-section,
.document-practice-example {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--gk-line-soft);
  border-radius: 7px;
  background: #fff;
}

.document-source,
.document-turn {
  padding: 14px 0;
  border-bottom: 1px solid var(--gk-line-soft);
}

.document-source:last-child,
.document-turn:last-child {
  border-bottom: 0;
}

.decision-export-source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.decision-export-source-url,
.decision-export-source-locator {
  color: var(--gk-muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.decision-export-source-pill {
  padding: 4px 7px;
  border: 1px solid var(--gk-line);
  border-radius: 5px;
  background: #fff;
  color: var(--gk-muted);
  font-size: 9px;
  font-weight: 740;
}

.decision-export-test-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gk-line);
}

.decision-export-test-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.decision-export-test-table th,
.decision-export-test-table td {
  padding: 10px 12px;
  border-right: 1px solid var(--gk-line-soft);
  border-bottom: 1px solid var(--gk-line-soft);
  text-align: left;
  vertical-align: top;
}

.decision-export-test-table th {
  background: #f7f9fb;
  color: var(--gk-muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-export-disclaimer {
  margin: 0;
  padding: 16px 34px 28px;
  color: var(--gk-muted);
  font-size: 10px;
  line-height: 1.5;
}

.decision-export-empty {
  padding: 24px 0;
  border-top: 0;
}

.export-loader-shell {
  display: grid;
  width: 100%;
  min-height: calc(100vh - 104px);
  padding: 48px 24px;
  place-items: center;
}

.export-loader-panel {
  display: grid;
  width: min(100%, 680px);
  padding: 36px 40px;
  gap: 24px;
  border: 1px solid var(--gk-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--gk-shadow-float);
}

.export-loader-head h1 {
  margin: 5px 0 0;
  color: var(--gk-ink);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.export-loader-head p {
  margin: 10px 0 0;
  color: var(--gk-muted);
  font-size: 13px;
  line-height: 1.6;
}

.export-loader-progress {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--gk-line-soft);
}

.export-loader-progress span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--gk-red);
}

.export-loader-steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--gk-line);
}

.export-loader-steps li {
  position: relative;
  min-height: 48px;
  padding: 14px 4px 14px 34px;
  border-bottom: 1px solid var(--gk-line-soft);
  color: var(--gk-muted);
  font-size: 12px;
}

.export-loader-steps li::before {
  position: absolute;
  top: 13px;
  left: 2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #aeb9c5;
  border-radius: 50%;
  color: var(--gk-muted);
  content: "";
}

.export-loader-steps li.is-active {
  color: var(--gk-ink);
  font-weight: 720;
}

.export-loader-steps li.is-active::before {
  border-color: var(--gk-red);
  box-shadow: inset 0 0 0 5px #fff;
  background: var(--gk-red);
}

.export-loader-steps li.is-done::before {
  border-color: var(--gk-teal);
  background: var(--gk-teal);
  color: #fff;
  content: "✓";
  font-size: 11px;
}

.export-loader-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--gk-line-soft);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--gk-muted);
  font-size: 11px;
}

.export-loader-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.export-loader-actions .primary-action {
  border: 1px solid var(--gk-red);
  background: var(--gk-red);
  color: #fff;
}

.export-loader-actions > a:not(.primary-action) {
  color: var(--gk-muted);
  font-size: 11px;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .report-data-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-data-strip .data-strip-item:nth-child(3n) {
    border-right: 0;
  }

  .report-data-strip .data-strip-item:nth-child(-n + 3) {
    border-bottom: 1px solid var(--gk-line);
  }

  .workbench-layout,
  .quality-workbench,
  .measures-layout,
  .report-section-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-secondary,
  .quality-workbench .workbench-secondary,
  .report-section-list .report-section:nth-child(2),
  .report-section-list .report-section:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
    padding-left: 0;
    border-left: 0;
  }

  .report-section-list .report-section:nth-child(1),
  .report-section-list .report-section:nth-child(2),
  .report-section-list .report-section:nth-child(3),
  .report-section-list .report-section:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .review-work-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .review-card-side {
    padding: 18px 0 0;
    border-top: 1px solid var(--gk-line-soft);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .page-report .workspace,
  .page-quality .workspace,
  .page-review .workspace,
  .page-measures .workspace,
  .page-decision-export .workspace {
    padding-top: 26px;
  }

  .page-intro,
  .topbar.page-intro {
    padding-bottom: 20px;
    flex-direction: column;
    gap: 16px;
  }

  .page-intro__actions,
  .page-intro-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .data-strip__items,
  .report-data-strip,
  .document-data-strip {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-strip__item,
  .data-strip-item,
  .report-data-strip .data-strip-item:nth-child(3n) {
    border-right: 1px solid var(--gk-line);
    border-bottom: 1px solid var(--gk-line);
  }

  .data-strip__item:nth-child(2n),
  .data-strip-item:nth-child(2n) {
    border-right: 0;
  }

  .data-strip__item:nth-last-child(-n + 2),
  .data-strip-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .quality-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .quality-hero .data-strip__meta {
    width: 100%;
  }

  .quality-hero .data-strip__meta .data-strip__item {
    flex: 1 1 0;
  }

  .report-brief,
  .document-cover {
    grid-template-columns: 1fr;
  }

  .report-brief-meta {
    min-width: 0;
  }

  .report-next-action {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .report-list-item,
  .report-section-list .report-section:nth-child(even) .report-list-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .report-list-item > span {
    text-align: left;
  }

  .wizard-checkbox-grid,
  .wizard-checkbox-grid.is-evidence,
  .wizard-choice-grid,
  .wizard-choice-grid.is-two {
    grid-template-columns: 1fr;
  }

  .wizard-choice,
  .wizard-checkbox-grid label {
    min-height: 54px;
  }

  .review-form-grid,
  .measure-form,
  .document-detail-grid,
  .decision-export-practice-grid {
    grid-template-columns: 1fr;
  }

  .work-item__meta {
    grid-template-columns: 1fr;
  }

  .work-item__meta > div,
  .work-item__meta > div:nth-child(2n),
  .work-item__meta > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--gk-line-soft);
  }

  .work-item__meta > div:last-child {
    border-bottom: 0;
  }

  .measure-progress {
    width: 90px;
    flex-basis: 90px;
  }

  .decision-export-intro {
    position: static;
    margin-top: -26px;
    backdrop-filter: none;
  }

  .document-shell.decision-export-document {
    width: 100%;
    margin-top: 22px;
    box-shadow: none;
  }

  .decision-export-document .workbench-section,
  .decision-export-document .document-cover {
    padding: 22px 18px;
  }

  .decision-export-disclaimer {
    padding: 14px 18px 22px;
  }

  .export-loader-shell {
    min-height: calc(100vh - 136px);
    padding: 24px 0;
  }

  .export-loader-panel {
    padding: 28px 20px;
  }

  .export-loader-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .page-report .workspace,
  .page-decision-export .workspace {
    padding: 0;
  }

  .page-intro-actions,
  .page-intro__actions,
  .decision-export-intro {
    display: none !important;
  }

  .report-workbench,
  .decision-document-workbench,
  .document-shell.decision-export-document {
    width: 100%;
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  .workbench-section,
  .decision-export-document .workbench-section {
    break-inside: avoid;
  }
}

/* Governance Kompass — decision workbench v3.
   A structural product-UI layer: vertical app rail, contextual workspace and
   open content canvases. Functional selectors remain inherited from app.css. */

:root {
  --gk-canvas: #ffffff;
  --gk-context: #f4f7fa;
  --gk-context-strong: #edf2f6;
  --gk-rail: #0e151d;
  --gk-rail-soft: #151e28;
  --gk-ink: #101722;
  --gk-text: #263244;
  --gk-muted: #68758a;
  --gk-line: #d8e0e8;
  --gk-line-soft: #e9eef3;
  --gk-red: #e51f25;
  --gk-red-dark: #bd151b;
  --gk-teal: #0b8b98;
  --gk-orange: #e98a17;
  --gk-focus: 0 0 0 4px rgba(11, 139, 152, 0.16);
  --gk-shadow-command: 0 18px 50px rgba(20, 32, 46, 0.12), 0 2px 8px rgba(20, 32, 46, 0.05);
  --gk-shadow-float: 0 12px 32px rgba(20, 32, 46, 0.09);
  --gk-radius: 18px;
  --gk-rail-width: 104px;
}

html,
body {
  min-height: 100%;
  background: var(--gk-canvas);
}

body {
  color: var(--gk-text);
  font-size: 14px;
  line-height: 1.55;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 0;
  box-shadow: var(--gk-focus);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--gk-rail-width) minmax(0, 1fr);
  grid-template-rows: minmax(100vh, auto);
  min-height: 100vh;
  align-content: stretch;
  background: var(--gk-canvas);
}

.sidebar {
  position: sticky;
  inset: 0 auto auto 0;
  z-index: 100;
  width: var(--gk-rail-width);
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--gk-rail);
  box-shadow: none;
}

.brandbar {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex-direction: column;
  align-items: stretch;
}

.brand {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 108px;
  padding: 20px 0;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--gk-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(229, 31, 37, 0.28);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.brand .brand-mark {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
}

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

.portal-nav {
  display: flex;
  width: 100%;
  max-width: none;
  padding: 14px 0;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.portal-nav a,
.portal-nav-footer a {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 98px;
  padding: 14px 8px 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b6c0cc;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.portal-nav a::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
  content: "";
  transition: background-color 160ms ease;
}

.portal-nav a:hover,
.portal-nav-footer a:hover {
  background: var(--gk-rail-soft);
  color: #fff;
}

.portal-nav a.is-active {
  background: var(--gk-rail-soft);
  color: #fff;
  box-shadow: none;
}

.portal-nav a.is-active::before {
  background: var(--gk-red);
}

.portal-nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: currentColor;
}

.portal-nav-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.portal-nav a.is-active .portal-nav-icon {
  color: var(--gk-red);
}

.portal-nav-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.portal-nav-footer {
  width: 100%;
  margin-top: auto;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.portal-nav-footer a {
  min-height: 76px;
}

.workspace {
  display: flex;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 40px clamp(28px, 3.5vw, 58px) 64px;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  background: var(--gk-canvas);
}

.page-chat .workspace {
  padding: 0;
}

.topbar {
  align-items: flex-start;
}

.topbar h1,
.decision-wizard-head h1 {
  color: var(--gk-ink);
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.topbar p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--gk-muted);
  font-size: 15px;
}

.eyebrow {
  color: var(--gk-teal);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-action,
.search-row button,
.question-form button,
.composer-actions button,
.wizard-submit-bar button {
  border-color: var(--gk-red);
  background: var(--gk-red);
  color: #fff;
}

.primary-action:hover,
.search-row button:hover,
.question-form button:hover,
.composer-actions button:hover,
.wizard-submit-bar button:hover {
  border-color: var(--gk-red-dark);
  background: var(--gk-red-dark);
  box-shadow: 0 10px 24px rgba(229, 31, 37, 0.2);
}

.secondary-action {
  border-color: var(--gk-line);
  background: #fff;
  color: var(--gk-text);
}

/* Chat workbench */

.chat-workbench {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  grid-template-columns: 286px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  background: var(--gk-canvas);
}

.chat-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  min-height: 100vh;
  padding: 34px 24px 26px;
  flex-direction: column;
  gap: 22px;
  overflow: auto;
  border: 0;
  border-right: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: var(--gk-context);
  box-shadow: none;
}

.chat-rail > div:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.chat-context-actions {
  display: grid;
  gap: 12px;
}

.chat-context-actions .new-chat-link,
.chat-context-actions form,
.chat-context-actions button {
  width: 100%;
}

.chat-context-actions .new-chat-link,
.chat-context-actions button {
  display: flex;
  min-height: 54px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gk-line);
  border-radius: 12px;
  background: #fff;
  color: var(--gk-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.chat-context-actions .new-chat-link::before {
  margin-right: 9px;
  color: var(--gk-muted);
  content: "+";
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.chat-context-actions button {
  border-color: rgba(229, 31, 37, 0.3);
  color: var(--gk-red);
}

.chat-context-actions button:hover,
.chat-context-actions .new-chat-link:hover {
  border-color: #b9c5d1;
  background: #fff;
  transform: none;
  box-shadow: var(--gk-shadow-float);
}

.chat-clear-notice {
  margin: -10px 0 0;
  color: var(--gk-muted);
  font-size: 12px;
}

.source-health-card {
  border: 0;
  border-top: 1px solid #cbd5df;
  border-bottom: 1px solid #cbd5df;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.source-health-card > summary {
  min-height: 78px;
  padding: 18px 0;
}

.source-health-card > summary::after {
  display: none;
}

.source-health-card > summary > span:nth-child(2) {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--gk-ink);
  font-size: 13px;
  font-weight: 700;
}

.source-health-card > summary b {
  color: var(--gk-teal);
  font-size: 12px;
}

.source-health-body {
  padding: 0 0 18px;
  border: 0;
  background: transparent;
}

.source-health-note,
.source-health-list {
  font-size: 11px;
}

.recent-chat-list {
  margin-top: 4px;
}

.recent-chat-list-head {
  margin-bottom: 10px;
}

.recent-chat-list-head h2 {
  color: var(--gk-ink);
  font-size: 13px;
  font-weight: 750;
}

.recent-chat-list > a,
.recent-chat-more a {
  display: grid;
  padding: 10px 0;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--gk-text);
  text-decoration: none;
}

.recent-chat-list > a:hover,
.recent-chat-more a:hover {
  padding-left: 5px;
  background: transparent;
}

.recent-chat-list strong {
  font-size: 12px;
  line-height: 1.35;
}

.recent-chat-list span,
.recent-chat-more summary {
  color: var(--gk-muted);
  font-size: 11px;
}

.chat-panel,
.chat-panel.is-empty {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}

.chat-panel.is-empty {
  display: grid;
  padding: 64px clamp(34px, 5vw, 86px);
  grid-template-rows: auto auto auto;
  align-content: center;
}

.chat-thread-header {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.chat-panel.is-empty .chat-thread-header {
  display: flex;
  max-width: 1040px;
  margin: 0 auto;
  justify-content: center;
  text-align: center;
}

.chat-panel.is-empty .chat-thread-header span {
  display: none;
}

.chat-panel.is-empty .chat-thread-header h2 {
  max-width: 900px;
  margin: 0 auto;
  color: var(--gk-ink);
  font-size: clamp(42px, 4.4vw, 62px);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.chat-thread,
.chat-panel.is-empty .chat-thread {
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.empty-chat-state {
  max-width: 730px;
  margin: 14px auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.empty-chat-state strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.empty-chat-state p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--gk-muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.6;
}

.chat-composer,
.chat-panel.is-empty .chat-composer {
  display: grid;
  width: min(100%, 1020px);
  margin: 40px auto 0;
  padding: 20px;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  grid-template-areas:
    "field field field"
    "scope prompts action"
    "status status status";
  align-items: center;
  gap: 16px 18px;
  border: 1px solid #ccd6e0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--gk-shadow-command);
}

.chat-composer > label {
  display: grid;
  grid-area: field;
  gap: 7px;
}

.chat-composer > label > span {
  color: var(--gk-text);
  font-size: 12px;
  font-weight: 750;
}

.chat-composer textarea,
.chat-panel.is-empty .chat-composer textarea {
  width: 100%;
  min-height: 154px;
  padding: 16px;
  border: 1px solid #cbd6e1;
  border-radius: 12px;
  background: #fff;
  color: var(--gk-ink);
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

.chat-composer textarea:focus {
  border-color: var(--gk-teal);
  box-shadow: var(--gk-focus);
}

.research-scope-toggle {
  display: flex;
  grid-area: scope;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  border: 0;
  background: transparent;
}

.research-scope-toggle::before {
  margin-right: 4px;
  color: var(--gk-muted);
  content: "Quellen";
  font-size: 11px;
  font-weight: 700;
}

.research-scope-toggle label {
  min-height: 36px;
  padding: 0 7px;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.research-scope-toggle label:hover {
  background: var(--gk-context);
}

.research-scope-toggle label:has(input:checked) {
  border-color: transparent;
  background: var(--gk-context);
  color: var(--gk-ink);
  box-shadow: none;
}

.research-scope-toggle input {
  accent-color: var(--gk-teal);
}

.starter-prompts {
  display: flex;
  min-width: 0;
  grid-area: prompts;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.starter-prompts button {
  width: auto;
  min-width: 0;
  min-height: 36px;
  padding: 0 5px;
  flex: 1 1 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
}

.starter-prompts button:hover {
  background: var(--gk-context);
  color: var(--gk-ink);
  transform: none;
  box-shadow: none;
}

.composer-actions {
  display: flex;
  grid-area: action;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.composer-actions button,
.chat-composer button[type="submit"] {
  min-width: 166px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  background: var(--gk-red);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
}

.composer-actions a {
  color: var(--gk-muted);
  font-size: 12px;
}

.composer-status {
  grid-area: status;
  margin: -4px 0 0;
}

.chat-panel:not(.is-empty) .chat-thread-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 88px;
  padding: 22px clamp(28px, 4vw, 60px);
  align-items: center;
  border-bottom: 1px solid var(--gk-line-soft);
  background: #fff;
}

.chat-panel:not(.is-empty) .chat-thread-header h2 {
  color: var(--gk-ink);
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.chat-panel:not(.is-empty) .chat-thread-header span {
  color: var(--gk-teal);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chat-thread-actions a,
.chat-thread-actions button {
  border: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 11px;
}

.chat-panel:not(.is-empty) .chat-thread {
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 34px clamp(22px, 3vw, 46px) 18px;
}

.chat-panel:not(.is-empty) .chat-composer {
  position: sticky;
  bottom: 22px;
  z-index: 9;
  padding: 14px 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "field field"
    "scope action"
    "status status";
  gap: 10px 14px;
  margin: 18px auto 26px;
}

.chat-panel:not(.is-empty) .chat-composer textarea {
  height: 64px;
  min-height: 64px;
  max-height: 110px;
  padding: 11px 13px;
}

.chat-panel:not(.is-empty) .chat-composer > label {
  gap: 4px;
}

.chat-panel:not(.is-empty) .composer-actions button {
  min-height: 44px;
}

.user-message {
  width: min(74%, 690px);
  margin-left: auto;
}

.user-message p {
  border-color: var(--gk-line);
  border-radius: 14px;
  background: var(--gk-context);
  color: var(--gk-text);
  box-shadow: none;
}

.assistant-message {
  width: 100%;
}

.assistant-answer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.answer-lead {
  color: var(--gk-ink);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.answer-decision-hero,
.case-status-card,
.answer-section.supplier-decision {
  border-color: var(--gk-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.answer-decision-hero {
  background: #fff;
}

.answer-disclosure,
.answer-quality,
.source-details.answer-disclosure {
  margin-top: 0;
  border: 0;
  border-top: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.answer-disclosure > summary,
.answer-quality > summary {
  min-height: 54px;
  padding: 13px 4px;
  background: transparent;
}

.answer-disclosure[open] > summary,
.answer-quality[open] > summary {
  border-bottom: 1px solid var(--gk-line-soft);
  background: transparent;
}

.answer-disclosure-body,
.answer-quality > div {
  padding: 18px 4px 24px;
  background: transparent;
}

.conversation-report-card {
  border-color: var(--gk-line);
  border-radius: 16px;
  background: var(--gk-context);
  box-shadow: none;
}

/* Regelbasis as a data workspace */

.page-requirements .workspace {
  display: grid;
  width: 100%;
  padding: 42px clamp(26px, 3vw, 46px) 64px;
  grid-template-columns: minmax(0, 1fr) 270px;
  grid-template-rows: auto auto auto auto 1fr;
  align-items: start;
  gap: 22px 36px;
}

.page-requirements .topbar,
.page-requirements .requirements-metrics,
.page-requirements .search-area,
.page-requirements .requirements-orientation,
.page-requirements .requirements-list {
  grid-column: 1;
}

.page-requirements .requirements-coverage {
  position: sticky;
  top: 30px;
  grid-column: 2;
  grid-row: 1 / span 4;
}

.page-requirements .topbar .secondary-action {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--gk-muted);
}

.requirements-metrics {
  display: grid;
  min-height: 64px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--gk-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.requirements-metrics article,
.requirements-metrics article:nth-child(n) {
  display: flex;
  min-width: 0;
  min-height: 64px;
  padding: 14px 18px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.requirements-metrics article:last-child {
  border-right: 0;
}

.requirements-metrics strong {
  order: 1;
  margin: 0;
  color: var(--gk-teal);
  font-size: 17px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.requirements-metrics span {
  order: 2;
  color: var(--gk-text);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.requirements-metrics p {
  display: none;
}

.page-requirements .search-area {
  position: static;
  display: grid;
  padding: 0;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-requirements .search-area > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.page-requirements .search-row {
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 12px;
}

.page-requirements .search-row input {
  min-height: 56px;
  padding-inline: 20px;
  border-color: #cbd6e1;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
}

.page-requirements .search-row button {
  min-height: 56px;
  border-radius: 12px;
}

.requirements-filter-row {
  display: flex;
  min-width: 0;
  padding: 0 2px 13px;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--gk-line);
  scrollbar-width: thin;
}

.requirements-filter-row a {
  position: relative;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 12px;
}

.requirements-filter-row a::after {
  position: absolute;
  inset: auto 14px -14px;
  height: 2px;
  background: transparent;
  content: "";
}

.requirements-filter-row a:hover,
.requirements-filter-row a.is-active {
  border: 0;
  background: transparent;
  color: var(--gk-red);
  box-shadow: none;
}

.requirements-filter-row a.is-active::after {
  background: var(--gk-red);
}

.requirements-orientation,
.requirements-coverage {
  border: 1px solid var(--gk-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.requirements-orientation {
  margin-top: -8px;
}

.requirements-orientation > summary,
.requirements-coverage > summary {
  padding: 16px 18px;
  background: transparent;
}

.requirements-orientation > summary .eyebrow {
  display: none;
}

.requirements-orientation > summary > strong,
.requirements-coverage > summary strong {
  color: var(--gk-ink);
  font-size: 13px;
}

.requirements-coverage {
  display: block;
}

.requirements-coverage > summary {
  display: grid;
  min-height: 0;
  gap: 12px;
}

.requirements-coverage .coverage-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.requirements-coverage .coverage-summary span {
  display: flex;
  padding: 8px 0;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--gk-line-soft);
  color: var(--gk-muted);
  font-size: 11px;
}

.requirements-coverage .coverage-summary strong {
  color: var(--gk-teal);
  font-size: 17px;
}

.coverage-body {
  padding: 0 18px 18px;
  background: transparent;
}

.coverage-source-grid {
  grid-template-columns: 1fr;
}

.requirements-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--gk-line);
}

.requirement-card,
.requirements-list .panel {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.requirement-summary {
  display: grid;
  min-height: 94px;
  padding: 18px 42px 18px 14px;
  grid-template-columns: minmax(0, 1fr) minmax(350px, auto);
  align-items: center;
  gap: 22px;
  background: transparent;
}

.requirement-summary:hover {
  background: #f8fafc;
}

.requirement-summary::after {
  right: 12px;
}

.requirement-summary-copy {
  min-width: 0;
}

.requirement-topline {
  margin-bottom: 5px;
}

.requirement-topline span {
  border: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.requirement-topline span:first-child {
  color: var(--gk-red);
}

.requirement-summary h2 {
  color: var(--gk-ink);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.018em;
}

.requirement-summary p {
  max-width: 720px;
  margin-top: 4px;
  color: var(--gk-muted);
  font-size: 12px;
  line-height: 1.45;
}

.requirement-summary .requirement-source-strip {
  display: grid;
  min-width: 350px;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 0;
  border: 0;
}

.requirement-source-strip span {
  padding: 4px 10px;
  border: 0;
  border-left: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 10px;
  text-align: center;
}

.requirement-card[open] .requirement-summary {
  background: #f8fafc;
}

.requirement-card-body {
  padding: 24px 20px 30px;
  border-top: 1px solid var(--gk-line);
  background: #fff;
}

.fact-grid > div,
.split-area > section,
.action-area,
.requirement-sources,
.requirement-citation-list article {
  border-color: var(--gk-line-soft);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

/* Decision wizard as a focused split-pane flow */

.page-decision-wizard .workspace {
  background: var(--gk-canvas);
}

.decision-wizard-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.decision-wizard-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gk-line);
}

.decision-wizard-head > div .eyebrow {
  display: none;
}

.decision-wizard-head > a,
.wizard-recent-head > a {
  border: 0;
  background: transparent;
  color: var(--gk-muted);
}

.wizard-entry-panel,
.wizard-recent-decisions {
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-entry-panel > div:first-child .eyebrow,
.wizard-recent-head .eyebrow {
  display: none;
}

.wizard-entry-panel h2,
.wizard-recent-head h2 {
  color: var(--gk-ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.wizard-entry-grid {
  gap: 12px;
}

.wizard-entry-grid button {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--gk-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.wizard-entry-grid button:hover,
.wizard-entry-grid button.is-active {
  border-color: #aebdca;
  background: var(--gk-context);
  box-shadow: var(--gk-shadow-float);
  transform: translateY(-1px);
}

.wizard-template-row button {
  border: 0;
  background: transparent;
  color: var(--gk-muted);
}

.wizard-process-map {
  display: grid;
  padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--gk-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.wizard-process-map > div {
  padding: 16px;
  border-right: 1px solid var(--gk-line);
}

.wizard-process-map > div:last-child {
  border-right: 0;
}

.decision-wizard-form:not([hidden]) {
  display: grid;
  margin-top: 28px;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  gap: 20px 32px;
}

.wizard-form-context {
  grid-column: 1 / -1;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-form-context button {
  border: 0;
  background: transparent;
  color: var(--gk-muted);
}

.wizard-readiness {
  position: sticky;
  top: 24px;
  grid-column: 1;
  grid-row: 2;
  padding: 20px;
  border: 1px solid var(--gk-line);
  border-radius: 14px;
  background: var(--gk-context);
  box-shadow: none;
}

.decision-wizard-form .wizard-readiness {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 16px;
}

.decision-wizard-form .wizard-readiness > div:first-child,
.decision-wizard-form .wizard-readiness-meter,
.decision-wizard-form .wizard-readiness > ul {
  width: 100%;
  min-width: 0;
  grid-column: 1;
}

.decision-wizard-form .wizard-readiness > ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.decision-wizard-form .wizard-readiness > ul li {
  padding: 9px 0;
  border: 0;
  border-top: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  font-size: 11px;
}

.wizard-stepper {
  display: grid;
  grid-column: 1;
  grid-row: 3 / span 2;
  grid-template-columns: 1fr;
  gap: 0;
  border: 0;
  border-top: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-step {
  min-height: 58px;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  background: transparent;
}

.wizard-step.is-active {
  background: transparent;
  color: var(--gk-red);
}

.wizard-section:not([hidden]) {
  display: block;
  grid-column: 2;
  grid-row: 2 / span 2;
  padding: 28px;
  border: 1px solid var(--gk-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--gk-shadow-float);
}

.wizard-section-title > span {
  background: var(--gk-red);
}

.sap-interview-panel {
  border: 1px solid var(--gk-line);
  border-radius: 12px;
  background: var(--gk-context);
  box-shadow: none;
}

.sap-interview-head small {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sap-interview-panel ol {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.sap-interview-panel li {
  display: grid;
  min-height: 74px;
  padding: 14px 0;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  gap: 3px 12px;
  border: 0;
  border-top: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sap-interview-panel li > span {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
}

.sap-interview-panel li strong,
.sap-interview-panel li p {
  grid-column: 2;
}

.sap-interview-panel li p {
  margin: 0;
}

.wizard-submit-bar {
  position: sticky;
  bottom: 18px;
  z-index: 5;
  grid-column: 2;
  grid-row: 4;
  border: 1px solid var(--gk-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--gk-shadow-float);
}

.wizard-recent-list {
  gap: 0;
  border-top: 1px solid var(--gk-line);
}

.wizard-recent-item {
  border: 0;
  border-bottom: 1px solid var(--gk-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Other authenticated surfaces inherit the rail and use quieter panels. */

.panel,
.metric-grid article,
.search-area,
.quality-hero,
.report-cover {
  border-color: var(--gk-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.quality-grid,
.report-grid {
  gap: 16px;
}

.access-page {
  background: var(--gk-context);
}

.access-card {
  border: 1px solid var(--gk-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--gk-shadow-command);
}

.access-card::before {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 14px;
  background: var(--gk-red);
  color: #fff;
  content: "G";
  font-size: 25px;
  font-weight: 800;
}

.page-requirements .requirements-coverage {
  border-radius: 0;
}

.page-requirements .requirements-coverage > summary {
  grid-template-columns: minmax(0, 1fr);
}

.page-requirements .requirements-coverage > summary::after {
  display: none;
}

.page-requirements .requirements-coverage .coverage-summary {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.page-requirements .requirements-list {
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.page-requirements .requirement-card {
  padding: 0;
}

.page-requirements .requirement-summary .requirement-source-strip span {
  border: 0;
  border-left: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1380px) {
  .page-requirements .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-requirements .requirements-coverage {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  .page-requirements .requirements-coverage .coverage-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  :root {
    --gk-rail-width: 90px;
  }

  .portal-nav a {
    min-height: 88px;
  }

  .chat-workbench {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .chat-composer,
  .chat-panel.is-empty .chat-composer {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "field field"
      "scope action"
      "prompts prompts"
      "status status";
  }

  .starter-prompts {
    justify-content: flex-start;
  }

  .page-requirements .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-requirements .requirements-coverage {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  .requirements-coverage .coverage-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .requirement-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .requirement-summary .requirement-source-strip {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  body {
    padding-bottom: 72px;
  }

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

  .sidebar {
    position: relative;
    width: 100%;
    height: 64px;
    min-height: 64px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .brandbar {
    height: 64px;
    min-height: 64px;
  }

  .brand {
    width: auto;
    min-height: 64px;
    padding: 0 18px;
    justify-content: flex-start;
    gap: 11px;
    border: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 19px;
  }

  .brand-copy {
    position: static;
    display: grid;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .brand .brand-copy strong {
    color: #fff;
    font-size: 13px;
  }

  .brand .brand-copy span {
    color: #99a7b6;
    font-size: 9px;
  }

  .portal-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    display: flex;
    width: 100%;
    height: 72px;
    padding: 0;
    flex-direction: row;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--gk-rail);
  }

  .portal-nav a {
    width: auto;
    min-width: 0;
    min-height: 72px;
    padding: 8px 4px 7px;
    flex: 1 1 0;
    gap: 4px;
  }

  .portal-nav a::before {
    inset: auto 16% 0;
    width: auto;
    height: 3px;
  }

  .portal-nav-icon {
    width: 23px;
    height: 23px;
  }

  .portal-nav-label {
    font-size: 9px;
  }

  .portal-nav-footer {
    position: absolute;
    inset: 0 8px auto auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .portal-nav-footer a {
    width: 58px;
    min-height: 64px;
    padding: 8px;
  }

  .portal-nav-footer .portal-nav-label {
    display: none;
  }

  .workspace,
  .page-requirements .workspace {
    display: flex;
    width: 100%;
    padding: 28px 20px 44px;
    flex-direction: column;
    align-items: stretch;
  }

  .page-chat .workspace {
    padding: 0;
  }

  .chat-workbench {
    display: block;
    min-height: calc(100vh - 136px);
  }

  .chat-rail {
    position: static;
    display: grid;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 18px;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr);
    align-items: center;
    gap: 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--gk-line);
  }

  .chat-context-actions {
    display: flex;
    min-width: 0;
    gap: 8px;
  }

  .chat-context-actions .new-chat-link,
  .chat-context-actions form,
  .chat-context-actions button {
    min-width: 0;
  }

  .chat-context-actions .new-chat-link,
  .chat-context-actions button {
    min-height: 42px;
    padding: 0 12px;
    font-size: 11px;
  }

  .source-health-card {
    border: 0;
  }

  .source-health-card > summary {
    min-height: 42px;
    padding: 0;
  }

  .source-health-body {
    position: absolute;
    z-index: 30;
    right: 18px;
    width: min(340px, calc(100vw - 36px));
    padding: 16px;
    border: 1px solid var(--gk-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--gk-shadow-float);
  }

  .recent-chat-list,
  .chat-clear-notice {
    display: none;
  }

  .chat-panel,
  .chat-panel.is-empty {
    min-height: calc(100vh - 200px);
  }

  .chat-panel.is-empty {
    padding: 54px 24px 40px;
  }

  .chat-panel.is-empty .chat-thread-header h2 {
    font-size: clamp(36px, 7vw, 50px);
  }

  .chat-composer,
  .chat-panel.is-empty .chat-composer {
    padding: 16px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "field"
      "scope"
      "prompts"
      "action"
      "status";
  }

  .composer-actions {
    justify-content: stretch;
  }

  .composer-actions button,
  .chat-composer button[type="submit"] {
    width: 100%;
  }

  .starter-prompts {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .page-requirements .workspace {
    display: flex;
    flex-direction: column;
  }

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

  .requirements-metrics article:nth-child(2) {
    border-right: 0;
  }

  .requirements-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--gk-line);
  }

  .decision-wizard-form:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wizard-form-context,
  .wizard-readiness,
  .wizard-stepper,
  .wizard-section:not([hidden]),
  .wizard-submit-bar {
    position: static;
    grid-column: 1;
    grid-row: auto;
  }

  .wizard-stepper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: auto;
  }

  .wizard-process-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-process-map > div:nth-child(2) {
    border-right: 0;
  }

  .wizard-process-map > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--gk-line);
  }
}

@media (max-width: 620px) {
  .brand .brand-copy span {
    display: none;
  }

  .portal-nav-footer a {
    width: 48px;
  }

  .workspace,
  .page-requirements .workspace {
    padding: 24px 14px 38px;
  }

  .chat-rail {
    grid-template-columns: 1fr;
  }

  .source-health-card {
    display: none;
  }

  .chat-panel.is-empty {
    padding: 42px 15px 28px;
  }

  .chat-panel.is-empty .chat-thread-header h2 {
    font-size: 34px;
  }

  .empty-chat-state p {
    font-size: 14px;
  }

  .chat-composer,
  .chat-panel.is-empty .chat-composer {
    margin-top: 28px;
    border-radius: 16px;
  }

  .chat-composer textarea,
  .chat-panel.is-empty .chat-composer textarea {
    min-height: 128px;
    font-size: 16px;
  }

  .research-scope-toggle {
    flex-wrap: wrap;
  }

  .starter-prompts button {
    border: 1px solid var(--gk-line);
  }

  .chat-panel:not(.is-empty) .chat-thread-header {
    padding: 18px 16px;
  }

  .chat-panel:not(.is-empty) .chat-thread {
    padding-inline: 14px;
  }

  .chat-panel:not(.is-empty) .chat-composer {
    bottom: 82px;
    width: calc(100% - 20px);
    margin-inline: auto;
  }

  .topbar h1,
  .decision-wizard-head h1 {
    font-size: 32px;
  }

  .requirements-metrics article,
  .requirements-metrics article:nth-child(n) {
    min-height: 70px;
    padding: 12px;
  }

  .requirements-metrics strong {
    font-size: 15px;
  }

  .requirements-metrics span {
    font-size: 9px;
  }

  .page-requirements .search-row {
    grid-template-columns: 1fr;
  }

  .requirement-summary {
    padding: 16px 38px 16px 10px;
  }

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

  .requirement-source-strip span {
    border-bottom: 1px solid var(--gk-line-soft);
  }

  .wizard-entry-grid,
  .wizard-process-map {
    grid-template-columns: 1fr;
  }

  .wizard-process-map > div,
  .wizard-process-map > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--gk-line);
  }

  .wizard-section:not([hidden]) {
    padding: 20px 16px;
  }
}

/* Source identity: local publisher recognition without another card layer. */

.source-identity {
  position: relative;
  display: inline-grid !important;
  width: 26px;
  height: 26px;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 26px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d7e0e8 !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 31, 46, 0.06);
  color: #526777 !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.source-identity__fallback,
.source-identity__image {
  grid-area: 1 / 1;
}

.source-identity__fallback {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #526777 !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-transform: uppercase;
}

.source-identity__image {
  z-index: 1;
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  object-fit: contain;
}

.source-identity-line {
  display: flex;
  min-width: 0;
  margin: 0;
  align-items: flex-start;
  gap: 10px;
}

.source-identity-copy {
  min-width: 0;
}

.source-identity-copy > :first-child {
  margin-top: 0 !important;
}

.source-identity-line--compact {
  align-items: center;
  gap: 8px;
}

.source-identity-line--compact .source-identity {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px !important;
}

.source-identity-line--compact .source-identity__image {
  width: 15px;
  height: 15px;
}

.source-identity-line--compact .source-identity__fallback {
  font-size: 7px !important;
}

.basis-card-head > .source-identity-line,
.decision-export-source-head > .source-identity-line {
  min-width: 0;
  flex: 1 1 auto;
}

.source-rank-list .source-identity-line {
  margin-top: 6px;
}

.source-rank-list .source-identity-line strong {
  margin-top: 0;
}

.source-health-list article {
  grid-template-columns: 9px 22px minmax(0, 1fr);
  gap: 8px;
}

.source-health-list .source-identity {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px !important;
}

.source-health-list .source-identity__image {
  width: 15px;
  height: 15px;
}

.context-source-list li {
  padding: 9px 0;
}

.context-source-list .source-identity-line {
  align-items: center;
}

.context-source-list .source-identity-copy strong {
  font-size: 12px;
  font-weight: 620;
}

.quality-source-item {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
}

.quality-source-identity {
  position: relative;
  width: 28px;
  height: 28px;
  align-self: start;
}

.quality-source-identity .source-identity {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.quality-source-identity .source-identity__image {
  width: 19px;
  height: 19px;
}

.quality-source-identity .status-dot {
  position: absolute;
  z-index: 2;
  right: -2px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  margin: 0;
  border: 2px solid #fff;
  box-sizing: content-box;
}

.coverage-source-grid .source-identity-line {
  align-items: center;
}

.coverage-source-grid .source-identity-copy {
  display: grid;
  gap: 2px;
}

.coverage-source-grid .source-identity-copy > span {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
}

.requirement-citation-list .source-identity-copy > span {
  display: block;
  margin-top: 2px;
  color: var(--gk-muted);
  font-size: 10px;
}

.requirement-source-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
  border-top: 1px solid var(--gk-line-soft);
}

.requirement-source-tags .source-tag-entry {
  display: flex;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 8px 0 !important;
  align-items: center;
  gap: 9px;
  border: 0 !important;
  border-bottom: 1px solid var(--gk-line-soft) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--gk-text);
  text-decoration: none;
}

.requirement-source-tags .source-tag-entry:hover {
  color: var(--gk-teal);
  transform: none;
}

.requirement-source-tags .source-tag-entry .source-identity {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px !important;
}

.requirement-source-tags .source-tag-entry .source-identity__image {
  width: 15px;
  height: 15px;
}

.requirement-source-tags .source-tag-entry .source-identity__fallback {
  padding: 0 !important;
}

.requirement-source-tags .source-tag-label {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit;
  font-size: 11px;
  font-weight: 680;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.review-meta dd.source-identity-line {
  display: flex;
  align-items: center;
}

.review-meta dd.source-identity-line > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-work-item {
  overflow: visible;
}

.review-work-list {
  grid-auto-rows: max-content;
  align-content: start;
}

.report-list-item > .report-source-meta {
  display: flex;
  margin: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.report-source-meta > .source-identity {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px !important;
}

.report-source-meta > .source-identity .source-identity__image {
  width: 15px;
  height: 15px;
}

.report-source-meta > span:last-child {
  display: block;
  margin: 0;
  color: var(--gk-muted);
  font-size: 9px;
  line-height: 1.45;
}

.report-section-list .report-section:nth-child(even) .report-source-meta {
  justify-content: flex-start;
}

.decision-export-source-head .source-identity-copy > span {
  margin-top: 4px;
}

.decision-export-primary-source > .source-identity-line {
  align-items: flex-start;
}

.decision-export-primary-source-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.decision-export-primary-source-copy > span {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.quality-source-item.quality-status-item {
  grid-template-columns: 10px minmax(0, 1fr);
}

@media (max-width: 720px) {
  .requirement-source-tags {
    grid-template-columns: 1fr;
  }

  .report-list-item > .report-source-meta {
    justify-content: flex-start;
  }
}

@media print {
  .source-identity {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    border-color: #d4dce3 !important;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .source-identity__image {
    width: 14px;
    height: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  body {
    padding: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar,
  .chat-rail {
    display: none !important;
  }

  .workspace,
  .page-requirements .workspace {
    display: block;
    padding: 0;
  }
}
/* Governance Kompass — open surfaces v5.
   Cards are reserved for command surfaces, documents and modal states. */

:root {
  --gk-open-hover: #f7f9fb;
  --gk-open-rule: #dce3e9;
}

/* Shared page language: bands, sections and lists instead of loose tiles. */

.panel.workbench-section,
.decision-export-document .panel.workbench-section {
  border: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-cover.panel.workbench-section,
.review-board.panel.workbench-section,
.measures-layout > .panel.workbench-section {
  border-top: 0;
}

.data-strip,
.requirements-metrics,
.wizard-process-map {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.data-strip .data-strip__item,
.data-strip .data-strip-item,
.metric-grid.data-strip > article {
  border: 0;
  border-right: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.data-strip .data-strip__item:last-child,
.data-strip .data-strip-item:last-child,
.metric-grid.data-strip > article:last-child {
  border-right: 0;
}

.quality-hero {
  border-top: 1px solid var(--gk-open-rule);
  border-bottom: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
}

.work-item__meta {
  border: 0;
  border-top: 1px solid var(--gk-line-soft);
}

.work-item__meta > div {
  padding: 11px 13px 11px 0;
  border-bottom: 1px solid var(--gk-line-soft);
}

.quality-event-tags {
  gap: 0;
  border-top: 1px solid var(--gk-line-soft);
}

.quality-event-tags span {
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
}

.report-next-action {
  padding-left: 16px;
  border: 0;
  border-left: 3px solid var(--gk-red);
  border-radius: 0;
  background: var(--gk-red-wash);
}

/* Chat: calm progress, open context and fewer nested card grids. */

.page-chat .assistant-answer-loading,
.page-chat .assistant-answer-working {
  display: grid;
  gap: 0;
  padding: 6px 4px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-chat .assistant-message {
  scroll-margin-top: 20px;
}

.page-chat .ai-working-overlay,
.page-chat.ai-is-working .chat-composer {
  display: none !important;
}

.page-chat .assistant-answer-working h2,
.page-chat .assistant-answer-loading h2 {
  margin: 0;
  color: var(--gk-ink);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.page-chat .assistant-answer-working .answer-phase,
.page-chat .assistant-answer-loading .answer-phase {
  max-width: 980px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.page-chat .work-steps {
  display: grid;
  margin: 24px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-bottom: 1px solid var(--gk-open-rule);
  list-style: none;
  counter-reset: working-step;
}

.page-chat .work-steps li {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 16px 18px 16px 48px;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gk-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  counter-increment: working-step;
}

.page-chat .work-steps li + li {
  border-left: 1px solid var(--gk-line-soft);
}

.page-chat .work-steps li::before {
  position: absolute;
  left: 18px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #aab6c2;
  border-radius: 50%;
  background: #fff;
  color: var(--gk-muted);
  content: counter(working-step);
  font-size: 9px;
  font-weight: 760;
}

.page-chat .work-steps li.is-done {
  color: var(--gk-text);
}

.page-chat .work-steps li.is-done::before {
  border-color: var(--gk-teal);
  background: var(--gk-teal);
  color: #fff;
}

.page-chat .work-steps li.is-active {
  color: var(--gk-ink);
  font-weight: 740;
}

.page-chat .work-steps li.is-active::before {
  border-color: var(--gk-red);
  color: var(--gk-red);
  box-shadow: 0 0 0 4px rgba(229, 31, 37, 0.07);
}

.page-chat .working-context {
  display: grid;
  margin: 28px 0 0;
  padding: 24px 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 38px;
  border-top: 1px solid var(--gk-open-rule);
}

.page-chat .working-context h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--gk-ink);
  font-size: 17px;
  font-weight: 740;
  letter-spacing: -0.015em;
}

.context-list-group,
.context-chip-group {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.context-list-label,
.context-list-group > strong,
.context-chip-group > strong {
  color: var(--gk-muted);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.context-list,
.context-chips {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  border-top: 1px solid var(--gk-line-soft);
  list-style: none;
}

.context-list li,
.context-chips span {
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--gk-text);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.page-chat .assistant-answer-working .working-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--gk-line-soft);
  color: var(--gk-muted);
  font-size: 11px;
  font-weight: 500;
}

.page-chat .answer-decision-hero {
  padding-left: 18px;
  border: 0;
  border-left: 3px solid var(--gk-red);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-chat .case-status-card {
  border: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-bottom: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-chat .answer-followups,
.page-chat .conversation-report-card {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

.page-chat .assistant-answer > .answer-disclosure,
.page-chat .assistant-answer > .answer-quality,
.page-chat .assistant-answer > .source-details.answer-disclosure {
  margin-top: 0;
  border: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-chat .assistant-answer > .answer-disclosure[open],
.page-chat .assistant-answer > .answer-quality[open],
.page-chat .assistant-answer > .source-details.answer-disclosure[open] {
  border-color: var(--gk-open-rule);
  box-shadow: none;
}

.page-chat .answer-disclaimer {
  padding-left: 14px;
  border-left: 2px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
}

.page-chat .answer-followups {
  padding-right: 4px;
  padding-left: 4px;
  background: transparent;
}

.page-chat .conversation-report-card {
  background: var(--gk-context);
}

.assistant-answer :is(
  .answer-decision-hero-grid,
  .concrete-guide-grid,
  .supplier-decision-grid,
  .decision-readiness-grid,
  .audit-perspective-grid,
  .deviation-logic-grid,
  .testing-checklist-grid,
  .practice-grid,
  .basis-list,
  .source-rank-list
) {
  gap: 0 24px;
  border-top: 1px solid var(--gk-line-soft);
}

.assistant-answer .answer-decision-hero-grid > article,
.assistant-answer .concrete-guide-grid > article,
.assistant-answer .supplier-decision-grid > div,
.assistant-answer .decision-readiness-grid > div,
.assistant-answer .audit-perspective-grid > article,
.assistant-answer .deviation-logic-grid > article,
.assistant-answer .testing-checklist-grid > .testing-check-card,
.assistant-answer .practice-grid > div,
.assistant-answer .practice-example-card,
.assistant-answer .basis-list > article,
.assistant-answer .source-rank-list > article {
  min-width: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.assistant-answer .audit-perspective-grid > article.is-red-flag,
.assistant-answer .deviation-logic-grid > article.is-stop {
  padding-left: 14px;
  border-left: 3px solid var(--gk-red);
  background: transparent;
}

.assistant-answer .deviation-logic-grid > article.is-conditional {
  padding-left: 14px;
  border-left: 3px solid var(--gk-orange);
  background: transparent;
}

.assistant-answer .basis-list > article {
  padding-left: 14px;
  border-left: 3px solid var(--gk-open-rule);
}

.assistant-answer .basis-list > article.is-binding {
  border-left-color: var(--gk-teal);
}

.assistant-answer .basis-list > article.is-supervisory,
.assistant-answer .basis-list > article.is-standard {
  border-left-color: #4a7da4;
}

.assistant-answer .basis-list > article.is-audit {
  border-left-color: #7a5af8;
}

.assistant-answer .basis-list > article.is-internal,
.assistant-answer .basis-list > article.is-open {
  border-left-color: var(--gk-orange);
}

.page-chat .answer-section.supplier-decision,
.page-chat .decision-brief {
  border: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-chat .decision-readiness-next,
.page-chat .audit-focus,
.page-chat .basis-locator {
  border: 0;
  border-left: 2px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
}

/* Decision flow: keep controls modern, remove the tile around each choice. */

.wizard-entry-grid,
.wizard-choice-grid,
.wizard-checkbox-grid {
  gap: 0 24px;
  border-top: 1px solid var(--gk-open-rule);
}

.wizard-process-map > div {
  border: 0;
  border-right: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-process-map > div:last-child {
  border-right: 0;
}

.wizard-stepper {
  gap: 0;
  border-top: 1px solid var(--gk-open-rule);
}

.wizard-stepper li,
.wizard-stepper li.is-done,
.wizard-stepper li.is-current {
  min-height: 48px;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-stepper li.is-done {
  color: #34746f;
}

.wizard-stepper li.is-current {
  padding-left: 12px;
  color: var(--gk-red);
  box-shadow: inset 3px 0 0 var(--gk-red);
}

.wizard-entry-grid button {
  min-height: 88px;
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-entry-grid button:hover,
.wizard-entry-grid button.is-active {
  padding-left: 14px;
  border-color: var(--gk-open-rule);
  background: var(--gk-open-hover);
  box-shadow: inset 3px 0 0 var(--gk-red);
  transform: none;
}

.wizard-choice,
.wizard-checkbox-grid label {
  min-height: 56px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-choice:hover,
.wizard-checkbox-grid label:hover {
  border-color: var(--gk-open-rule);
  background: var(--gk-open-hover);
}

.wizard-choice:has(input:checked),
.wizard-checkbox-grid label:has(input:checked) {
  padding-left: 12px;
  border-color: var(--gk-open-rule);
  background: var(--gk-red-wash);
  box-shadow: inset 3px 0 0 var(--gk-red);
}

.wizard-choice:has(input:focus-visible),
.wizard-checkbox-grid label:has(input:focus-visible) {
  box-shadow: inset 3px 0 0 var(--gk-red), var(--gk-focus);
}

.wizard-readiness,
.wizard-section:not([hidden]),
.sap-interview-panel,
.wizard-decision-preview {
  border: 0;
  border-top: 1px solid var(--gk-open-rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.wizard-readiness,
.wizard-section:not([hidden]) {
  padding-right: 0;
  padding-left: 0;
}

.sap-interview-panel {
  border-bottom: 1px solid var(--gk-open-rule);
}

/* Regelbasis: open detail sections and source rows. */

.page-requirements .requirements-orientation,
.page-requirements .requirements-coverage {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.page-requirements .requirements-coverage .coverage-summary span {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.requirement-card-body .fact-grid > div,
.requirement-card-body .split-area > section,
.requirement-card-body .action-area,
.requirement-card-body .requirement-sources,
.requirement-card-body .requirement-citation-list article {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.requirement-source-tags span {
  padding: 4px 8px 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Decision documents retain the outer paper metaphor, not nested cards. */

.decision-export-document .document-section,
.decision-export-document .document-summary,
.decision-export-document .document-case {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.decision-export-document .document-detail-section,
.decision-export-document .document-practice-example {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--gk-line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 900px) {
  .page-chat .assistant-message {
    scroll-margin-top: 82px;
  }

  .page-chat .work-steps {
    grid-template-columns: 1fr;
  }

  .page-chat .work-steps li {
    min-height: 54px;
  }

  .page-chat .work-steps li + li {
    border-top: 1px solid var(--gk-line-soft);
    border-left: 0;
  }

  .page-chat .working-context {
    grid-template-columns: 1fr;
  }

  .workbench-secondary {
    padding-left: 0;
    border-left: 0;
  }

  .wizard-section:not([hidden]) {
    padding: 24px 0;
  }

  .wizard-stepper {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--gk-open-rule);
    scrollbar-width: thin;
  }

  .wizard-stepper li,
  .wizard-stepper li.is-done,
  .wizard-stepper li.is-current {
    min-width: 118px;
    padding: 12px 10px;
    flex: 0 0 auto;
    border-bottom: 0;
  }

  .wizard-stepper li.is-current {
    box-shadow: inset 0 -3px 0 var(--gk-red);
  }
}

@media (max-width: 620px) {
  .page-chat .assistant-answer-loading,
  .page-chat .assistant-answer-working {
    padding: 2px 0 20px;
  }

  .page-chat .assistant-answer-working h2,
  .page-chat .assistant-answer-loading h2 {
    font-size: 22px;
  }

  .data-strip__items,
  .report-data-strip {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .data-strip__item,
  .data-strip-item {
    display: grid;
    padding: 13px 0;
    grid-template-columns: minmax(104px, 0.45fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--gk-line-soft);
  }

  .data-strip__item dt,
  .data-strip-item > span {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .data-strip__value,
  .data-strip-item > strong {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0 !important;
    font-size: 20px;
  }

  .data-strip__note,
  .data-strip-item > p {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0 !important;
  }

  .requirements-metrics {
    grid-template-columns: 1fr;
  }

  .requirements-metrics article,
  .requirements-metrics article:nth-child(n) {
    min-height: 52px;
    padding: 11px 0;
    border-right: 0;
    border-bottom: 1px solid var(--gk-line-soft);
  }

  .wizard-entry-grid,
  .wizard-choice-grid,
  .wizard-checkbox-grid,
  .wizard-checkbox-grid.is-evidence {
    grid-template-columns: 1fr;
  }

  .assistant-answer :is(
    .answer-decision-hero-grid,
    .concrete-guide-grid,
    .supplier-decision-grid,
    .decision-readiness-grid,
    .audit-perspective-grid,
    .deviation-logic-grid,
    .testing-checklist-grid,
    .practice-grid
  ) {
    grid-template-columns: 1fr;
  }
}
