:root {
  color-scheme: light;
  --green-950: #0d3424;
  --green-900: #174f35;
  --green-800: #1d6443;
  --green-700: #237951;
  --green-100: #dceee4;
  --green-50: #f0f8f3;
  --ink: #17231d;
  --muted: #5a6860;
  --line: #d7dfda;
  --surface: #ffffff;
  --canvas: #f6f8f6;
  --warning: #75500b;
  --warning-bg: #fff7df;
  --danger: #9b2d2d;
  --danger-bg: #fff0f0;
  --shadow: 0 12px 32px rgba(21, 54, 39, 0.08);
  --radius-lg: 20px;
  --radius-md: 12px;
  --content-width: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--green-800);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--green-950);
}

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

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #f1b82d;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: #fff;
  background: var(--green-950);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  color: #fff;
  background: var(--green-950);
  border-bottom: 4px solid #7fc242;
}

.header-inner,
.page-shell,
.site-footer p {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #93ce5d;
  border-radius: 50% 50% 50% 18%;
  color: #b8e58f;
  font-weight: 800;
  line-height: 1;
}

.brand-name,
.brand-product {
  display: block;
  line-height: 1.15;
}

.brand-name {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-product {
  font-size: 1.04rem;
  font-weight: 650;
}

.pilot-label {
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.portal-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  color: #e8f1ec;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 720;
  text-decoration: none;
}

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

.portal-nav a[aria-current="page"] {
  color: var(--green-950);
  background: #b8e58f;
}

.page-shell {
  padding-block: 3.5rem 4.5rem;
}

.intro {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.35rem;
  color: var(--green-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 760;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

.intro-copy {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.search-panel {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.search-field {
  position: relative;
  display: block;
}

.search-field input {
  width: 100%;
  min-height: 56px;
  padding: 0.75rem 1rem 0.75rem 3rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid #aebbb4;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
}

.search-field input::placeholder {
  color: #6d7972;
}

.search-field input:focus {
  background: #fff;
  border-color: var(--green-700);
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 1.1rem;
  width: 15px;
  height: 15px;
  border: 2px solid var(--green-800);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: var(--green-800);
  transform: rotate(45deg);
  transform-origin: left center;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 720;
}

.primary-button {
  padding: 0.75rem 1.4rem;
  color: #fff;
  background: var(--green-800);
  border: 1px solid var(--green-800);
}

.primary-button:hover {
  background: var(--green-950);
  border-color: var(--green-950);
}

.secondary-button {
  padding: 0.6rem 1rem;
  color: var(--green-900);
  background: var(--surface);
  border: 1px solid #a6b8ad;
}

.secondary-button:hover:not(:disabled) {
  background: var(--green-50);
  border-color: var(--green-700);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-link:hover {
  color: #fff;
}

.filter-row {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  margin-top: 1rem;
}

.filter-field {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.filter-field select {
  min-height: 44px;
  padding: 0.45rem 2.2rem 0.45rem 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #b8c3bd;
  border-radius: 9px;
  font-size: 0.92rem;
}

.text-button {
  padding: 0.4rem 0.2rem;
  color: var(--green-800);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

.review-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  color: #5d410b;
  background: var(--warning-bg);
  border: 1px solid #ead69a;
  border-radius: var(--radius-md);
}

.notice-symbol {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
}

.review-notice p {
  margin: 0.1rem 0 0;
  font-size: 0.9rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 2.25rem;
  align-items: start;
  margin-top: 3rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.state-panel {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed #b9c5be;
  border-radius: var(--radius-lg);
}

.state-panel p {
  max-width: 52ch;
  margin: 0;
}

.state-panel.error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: #e5b9b9;
}

.state-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--green-100);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spinner {
    animation-duration: 1.8s;
  }
}

.results-list {
  display: grid;
  gap: 1rem;
}

.result-card {
  position: relative;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.result-card:hover {
  border-color: #9eb7a8;
  box-shadow: 0 8px 22px rgba(21, 54, 39, 0.07);
  transform: translateY(-1px);
}

.result-card h3 {
  margin-bottom: 0.35rem;
}

.result-card h3 a {
  color: var(--green-950);
  text-decoration: none;
}

.result-heading {
  margin: 0 0 0.65rem;
  color: var(--green-700);
  font-size: 0.88rem;
  font-weight: 700;
}

.result-snippet {
  margin: 0;
  color: #3f4d45;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin-top: 1rem;
}

.result-actions a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 750;
}

.result-open-link::after {
  content: " →";
}

.result-download-link {
  color: var(--muted);
}

.result-source-link {
  color: var(--green-800);
}

.result-source-link::after,
.source-origin-link::after {
  content: " ↗";
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.result-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.8rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pagination span {
  color: var(--muted);
  font-size: 0.9rem;
}

.source-panel {
  position: sticky;
  top: 1rem;
  padding: 1.35rem;
  background: var(--green-50);
  border: 1px solid #cce1d4;
  border-radius: var(--radius-lg);
}

.source-panel h2,
.document-toc h2 {
  font-size: 1.2rem;
}

.source-loading,
.source-error {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.source-error {
  color: var(--danger);
}

.source-list {
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.source-list li {
  padding-block: 0.85rem;
  border-top: 1px solid #cce1d4;
}

.source-list strong,
.source-list span {
  display: block;
}

.source-list .source-scope {
  margin: 0.5rem 0 0;
  color: #45564c;
  font-size: 0.82rem;
  line-height: 1.45;
}

.source-origin-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  font-weight: 750;
}

.source-list span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.source-footnote {
  margin: 1rem 0 0;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid #cce1d4;
  font-size: 0.82rem;
}

.site-footer {
  padding-block: 1.5rem;
  color: #d6e5dc;
  background: var(--green-950);
  font-size: 0.82rem;
}

.site-footer p {
  margin-block: 0;
}

.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb a {
  font-weight: 700;
}

.document-state {
  min-height: 300px;
}

.document-header {
  max-width: 870px;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.document-header h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.document-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0;
}

.meta-chip,
.review-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.meta-chip {
  color: var(--green-900);
  background: var(--green-50);
  border: 1px solid #c6ddcf;
}

.review-chip {
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #ead69a;
}

.document-details {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.document-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  margin-top: 2.5rem;
}

.document-toc {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.document-toc ol {
  padding-left: 1.25rem;
  margin: 1rem 0 0;
}

.document-toc li + li {
  margin-top: 0.65rem;
}

.document-toc a {
  color: #405047;
  font-size: 0.88rem;
}

.passages {
  display: grid;
  gap: 1.2rem;
}

.passage {
  scroll-margin-top: 1rem;
  padding: 1.5rem clamp(1.1rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.passage:target {
  border-color: #d4a727;
  box-shadow: 0 0 0 3px #ffedb8;
}

.passage h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.passage-text {
  margin: 0;
  color: #303d36;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.72;
  white-space: pre-wrap;
}

.question-workspace {
  max-width: 900px;
  margin-top: 2rem;
}

.question-form,
.entry-form {
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.question-form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.question-form-heading h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.compact-filter {
  flex: 0 0 auto;
}

.question-field {
  display: block;
}

.question-field textarea {
  width: 100%;
  min-height: 138px;
  resize: vertical;
  padding: 0.9rem 1rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid #aebbb4;
  border-radius: var(--radius-md);
  line-height: 1.55;
}

.question-field textarea::placeholder {
  color: #6d7972;
}

.question-field textarea:focus {
  background: #fff;
  border-color: var(--green-700);
}

.form-actions,
.entry-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.form-notes {
  display: grid;
  gap: 0.15rem;
}

.answer-mode {
  width: fit-content;
  margin: 0;
  color: var(--green-800);
  font-size: 0.8rem;
  font-weight: 800;
}

.question-state {
  min-height: 180px;
  margin-top: 1.5rem;
}

.question-state .secondary-button {
  margin-top: 0.35rem;
}

.answer-history {
  margin-top: 2.5rem;
  scroll-margin-top: 1rem;
}

.answer-history-heading {
  align-items: center;
}

.answer-list,
.citation-list,
.recommendation-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.answer-card {
  padding: clamp(1.1rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.answer-question-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-question {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.answer-title {
  margin-bottom: 0.75rem;
  color: var(--green-950);
  font-size: 1.25rem;
}

.answer-message,
.answer-text {
  max-width: 72ch;
  margin: 0 0 1rem;
}

.answer-text {
  color: #2f3c35;
  font-size: 1.04rem;
  white-space: pre-wrap;
}

.answer-table-section {
  margin-top: 1.25rem;
}

.answer-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.answer-table-hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.answer-table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
  color: #2f3c35;
  font-size: 0.92rem;
}

.answer-table caption {
  padding: 0.85rem 1rem;
  color: var(--green-950);
  background: var(--green-50);
  font-size: 1rem;
  font-weight: 800;
  text-align: left;
}

.answer-table th,
.answer-table td {
  min-width: 8rem;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.answer-table th {
  color: var(--green-950);
  background: #f6faf7;
  font-size: 0.82rem;
}

.answer-table tbody tr:nth-child(even) {
  background: #fbfdfb;
}

.answer-table .answer-table-evidence {
  width: 1%;
  white-space: nowrap;
}

.citations {
  margin-top: 1.75rem;
}

.citations > h4,
.answer-limitations h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.citation-list {
  display: grid;
  gap: 0.75rem;
}

.citation-card {
  padding: 1rem;
  background: var(--green-50);
  border: 1px solid #cce1d4;
  border-radius: var(--radius-md);
}

.citation-label {
  margin: 0 0 0.35rem;
  color: var(--green-800);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.citation-quote {
  margin: 0;
  color: #2f3c35;
  font-size: 0.95rem;
}

.citation-quote::before {
  content: "„";
}

.citation-quote::after {
  content: "“";
}

.citation-source {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.citation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.65rem;
}

.citation-actions a {
  font-size: 0.84rem;
  font-weight: 750;
}

.citation-meta {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.answer-actions {
  margin-top: 1.25rem;
}

.answer-limitations {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.answer-limitations ul {
  margin: 0;
  padding-left: 1.2rem;
}

.chat-workspace {
  display: grid;
  gap: 1rem;
}

.chat-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.chat-toolbar h2,
.chat-empty h3 {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
}

.chat-empty {
  padding: clamp(1.1rem, 4vw, 1.75rem);
  color: #35443c;
  background: var(--green-50);
  border: 1px solid #cce1d4;
  border-radius: var(--radius-lg);
}

.chat-empty p {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
}

.starter-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.starter-question {
  padding: 0.65rem 0.85rem;
  color: var(--green-900);
  background: var(--surface);
  border: 1px solid #a9c9b6;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.starter-question:hover {
  background: #e8f5ed;
  border-color: var(--green-700);
}

.starter-question:focus-visible {
  outline: 3px solid #f4cb55;
  outline-offset: 2px;
}

.chat-transcript {
  display: grid;
  gap: 1.4rem;
}

.chat-exchange {
  display: grid;
  gap: 0.75rem;
  scroll-margin-block: 1rem 14rem;
}

.chat-message {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
}

.chat-message-user {
  width: fit-content;
  max-width: min(78%, 42rem);
  justify-self: end;
  color: #fff;
  background: var(--green-800);
  border-bottom-right-radius: 0.35rem;
}

.chat-message-assistant {
  width: min(92%, 48rem);
  justify-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 0.35rem;
  box-shadow: 0 8px 24px rgba(19, 63, 42, 0.06);
}

.chat-speaker {
  margin: 0 0 0.35rem;
  color: var(--green-800);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-message-user .chat-speaker {
  color: #dff2e7;
}

.chat-message-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message .answer-title {
  margin-bottom: 0.65rem;
  font-size: 1.08rem;
}

.resolved-question {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  background: var(--green-50);
  border-left: 3px solid #9ac5aa;
  border-radius: 0.25rem;
  font-size: 0.86rem;
}

.clarification-message {
  font-weight: 650;
}

.answer-evidence {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.answer-evidence > summary {
  padding: 0.85rem 0 0;
  color: var(--green-800);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.answer-evidence > summary:focus-visible {
  outline: 3px solid #f4cb55;
  outline-offset: 3px;
}

.answer-evidence-content {
  padding-top: 0.2rem;
}

.answer-evidence .citations {
  margin-top: 1rem;
}

.answer-evidence h5 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.answer-evidence .answer-limitations {
  margin-top: 1rem;
  padding-top: 1rem;
}

.chat-workspace .question-state {
  min-height: 0;
  margin-top: 0;
  padding: 0.9rem 1rem;
}

.chat-composer {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 38px rgba(13, 52, 36, 0.16);
}

.composer-heading,
.composer-notes {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.composer-heading > label:first-child {
  color: var(--green-950);
  font-weight: 800;
}

.composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  margin-top: 0.55rem;
}

.composer-row textarea {
  width: 100%;
  min-height: 3.2rem;
  max-height: 180px;
  resize: none;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid #aebbb4;
  border-radius: var(--radius-md);
  line-height: 1.45;
  overflow-y: auto;
}

.composer-row textarea:focus {
  background: #fff;
  border-color: var(--green-700);
}

.composer-submit {
  min-height: 3.2rem;
}

.composer-notes {
  align-items: start;
  margin-top: 0.55rem;
}

.composer-notes .form-hint {
  max-width: 55ch;
  text-align: right;
}

.entry-form {
  margin-top: 2rem;
}

.inline-status {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.inline-status.error {
  color: var(--danger);
}

.entry-step,
.interest-fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.entry-step > legend {
  width: 100%;
  padding: 0;
  margin-bottom: 1rem;
  color: var(--green-950);
  font-size: 1.22rem;
  font-weight: 760;
}

.entry-step > legend > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 0.45rem;
  color: #fff;
  background: var(--green-800);
  border-radius: 50%;
  font-size: 0.85rem;
}

.entry-step > legend small {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.optional-step {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.path-card {
  position: relative;
  cursor: pointer;
}

.path-card input {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green-700);
}

.path-card-body {
  min-height: 116px;
  display: block;
  padding: 0.95rem 1rem 0.95rem 3rem;
  background: var(--canvas);
  border: 1px solid #bcc7c1;
  border-radius: var(--radius-md);
}

.path-card-body strong,
.path-card-body > span {
  display: block;
}

.path-card-body strong {
  color: var(--green-950);
  line-height: 1.3;
}

.path-card-body > span {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.path-card input:checked + .path-card-body {
  background: var(--green-50);
  border-color: var(--green-700);
  box-shadow: inset 0 0 0 1px var(--green-700);
}

.path-card input:focus-visible + .path-card-body {
  outline: 3px solid #f1b82d;
  outline-offset: 3px;
}

.preference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 1.5rem;
  align-items: start;
}

.interest-fieldset > legend,
.time-field > span {
  padding: 0;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-options label {
  position: relative;
  cursor: pointer;
}

.chip-options input {
  position: absolute;
  opacity: 0;
}

.chip-options span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  color: #405047;
  background: var(--surface);
  border: 1px solid #b8c3bd;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.chip-options input:checked + span {
  color: var(--green-950);
  background: var(--green-100);
  border-color: var(--green-700);
}

.chip-options input:focus-visible + span {
  outline: 3px solid #f1b82d;
  outline-offset: 3px;
}

.time-field {
  display: grid;
}

.time-field select {
  min-height: 44px;
  width: 100%;
  padding: 0.45rem 0.75rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #b8c3bd;
  border-radius: 9px;
}

.recommendations {
  margin-top: 3rem;
  scroll-margin-top: 1rem;
}

.recommendations-intro {
  max-width: 72ch;
  margin: 0.6rem 0 1.25rem;
  color: var(--muted);
}

.recommendation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.recommendation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.recommendation-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--green-950);
  background: var(--green-100);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
}

.recommendation-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.recommendation-card p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.recommendation-link {
  font-size: 0.87rem;
  font-weight: 750;
}

.recommendation-link::after {
  content: " →";
}

.plan-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

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

.plan-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.plan-action-status {
  min-height: 1.3em;
  color: var(--green-800) !important;
  font-weight: 700;
}

.plan-action-status.error {
  color: var(--danger) !important;
}

.copy-helper {
  position: fixed;
  width: 1px;
  height: 1px;
  top: 0;
  left: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.availability-note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--green-50);
  border: 1px solid #cce1d4;
  border-radius: var(--radius-md);
}

.availability-note p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.official-resources {
  margin-top: 2.5rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.official-resources > h2 {
  margin-top: 0.15rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.official-resources > p:not(.section-kicker) {
  max-width: 66ch;
  margin: 0.45rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.official-resource-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.official-resource-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0.9rem;
  background: var(--green-50);
  border: 1px solid #cce1d4;
  border-radius: 10px;
}

.official-resource-list a {
  width: fit-content;
  font-weight: 750;
}

.official-resource-kind {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.available-tasks {
  margin-top: 1.5rem;
}

.task-list {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.task-card {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.task-card h4,
.task-card p {
  margin: 0 0 0.4rem;
}

.task-card .task-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.task-detail-label {
  margin-top: 0.8rem !important;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.task-prerequisites {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.task-card a {
  font-size: 0.87rem;
  font-weight: 750;
}

.onboarding-source {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .page-shell {
    padding-block: 2.5rem 3.5rem;
  }

  .content-grid,
  .document-layout {
    grid-template-columns: 1fr;
  }

  .source-panel,
  .document-toc {
    position: static;
  }

  .document-toc {
    max-height: none;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand spacer pilot"
      "nav nav nav";
    gap: 0.5rem 1rem;
    padding-block: 0.65rem 0.75rem;
  }

  .brand {
    grid-area: brand;
  }

  .portal-nav {
    grid-area: nav;
    width: 100%;
  }

  .portal-nav a {
    flex: 1 1 0;
  }

  .pilot-label {
    grid-area: pilot;
  }

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

@media (max-width: 560px) {
  .portal-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner,
  .page-shell,
  .site-footer p {
    width: min(calc(100% - 1.25rem), var(--content-width));
  }

  .header-inner {
    min-height: 68px;
  }

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

  .portal-nav a {
    min-height: 38px;
    padding-inline: 0.55rem;
    font-size: 0.84rem;
  }

  .pilot-label {
    padding-inline: 0.5rem;
    font-size: 0.72rem;
  }

  .page-shell {
    padding-top: 2rem;
  }

  h1 {
    font-size: 2.15rem;
  }

  .search-panel {
    padding: 0.8rem;
    border-radius: 15px;
  }

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

  .primary-button {
    width: 100%;
  }

  .filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .filter-field select {
    width: 100%;
  }

  .text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .review-notice {
    padding: 0.8rem;
  }

  .content-grid {
    gap: 1.5rem;
    margin-top: 2.25rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .result-card {
    padding: 1.15rem;
  }

  .pagination {
    justify-content: space-between;
    gap: 0.5rem;
  }

  .pagination span {
    font-size: 0.8rem;
  }

  .document-header .primary-button {
    width: 100%;
  }

  .passage {
    padding: 1.2rem 1rem;
  }

  .question-form-heading,
  .form-actions,
  .entry-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-filter select,
  .entry-actions .primary-button {
    width: 100%;
  }

  .path-grid,
  .preference-grid {
    grid-template-columns: 1fr;
  }

  .path-card-body {
    min-height: 0;
  }

  .answer-history-heading {
    align-items: flex-start;
  }

  .chat-toolbar,
  .composer-heading,
  .composer-notes {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-toolbar {
    gap: 0.6rem;
  }

  .chat-toolbar .text-button {
    align-self: start;
  }

  .starter-questions {
    display: grid;
  }

  .chat-message-user,
  .chat-message-assistant {
    max-width: 94%;
  }

  .chat-composer {
    bottom: 0.4rem;
    padding: 0.8rem;
  }

  .composer-heading {
    flex-direction: row;
    align-items: end;
    gap: 0.45rem;
  }

  .composer-heading .compact-filter {
    max-width: 11rem;
  }

  .composer-heading select {
    min-height: 2.4rem;
    padding-block: 0.35rem;
  }

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

  .composer-submit {
    width: auto;
    padding-inline: 1rem;
  }

  .composer-notes {
    gap: 0.25rem;
  }

  .composer-notes .form-hint {
    text-align: left;
  }

  .answer-actions .secondary-button {
    width: 100%;
  }

  .official-resource-list {
    grid-template-columns: 1fr;
  }

  .plan-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.coverage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; margin-block: 2rem; }
.coverage-card { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.coverage-card h2 { font-size: 1.4rem; }
.coverage-card h3 { font-size: 1rem; }
.coverage-badge, .coverage-warning { padding: .65rem .8rem; border-radius: .5rem; font-weight: 650; font-size: .9rem; }
.coverage-badge { color: var(--green-950); background: var(--green-100); }
.coverage-warning { color: var(--warning); background: var(--warning-bg); }
.coverage-metrics { margin-block: 1rem; }
.coverage-metrics div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; border-bottom: 1px solid var(--line); }
.coverage-metrics dd { margin: 0; text-align: right; font-weight: 650; flex: 0 0 auto; max-width: 65%; overflow-wrap: normal; }
.coverage-boundaries { max-width: 850px; margin-block: 2rem 3rem; }
@media (max-width: 700px) { .coverage-grid { grid-template-columns: 1fr; } .coverage-card { padding: 1.1rem; } }

/* Project register reuses the search and source components. */
#projects-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.project-query { flex: 1 1 12rem; min-width: 0; padding: .8rem; border: 1px solid var(--line, #cad4ce); border-radius: .5rem; font: inherit; }
#projects-list > article { margin: 1.5rem 0; padding: 1.5rem; border: 1px solid #cad4ce; border-radius: 1rem; background: white; overflow-wrap: anywhere; }
#projects-list details section { margin: 1rem 0; }
#projects-list blockquote { margin-inline: 0; white-space: pre-wrap; font-size: .9rem; }
