/**
 * Development work by David Lane
 */
.gse-desk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.gse-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d9488;
}

.gse-desk-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.gse-disclaimer {
  font-size: 0.88rem;
  color: #475569;
  max-width: 46rem;
  line-height: 1.45;
}

.gse-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gse-jumps a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 148, 136, 0.35);
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.gse-jumps a:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.gse-desk__rail {
  position: sticky;
  top: 0.75rem;
  align-self: start;
}

.gse-summary-card dd,
.gse-exhibit-counts dd,
.gse-scenario-card input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.gse-import {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.7rem;
  background: #fff;
}

.gse-import > summary {
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
}

.gse-import__body {
  padding: 0 0.85rem 0.85rem;
}

.gse-import__tech {
  font-size: 0.75rem;
  color: #64748b;
}

.gse-exhibit-more {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.gse-exhibit-more > summary {
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f766e;
}

.gse-reference .accordion-button {
  font-weight: 700;
  color: #0f172a;
}

.gse-reference .accordion-button:not(.collapsed) {
  color: #0f766e;
  background: #f0fdfa;
  box-shadow: none;
}

.gse-reference .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.28);
}

#gseProductsGrid,
#gseSuggestionsGrid {
  min-height: 200px;
}

.gse-summary-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.gse-pipeline-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.gse-scenario-card,
.gse-grid-card,
.gse-ai-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
}

.gse-scenario-card .card-header,
.gse-ai-card .card-header {
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

.gse-section-subtitle {
  line-height: 1.42;
}

.gse-inline-count {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.5rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.gse-form-group {
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 0.8rem;
  padding: 0.95rem;
  background: #f8fafc;
}

.gse-form-group__legend {
  float: none;
  width: auto;
  margin: 0 0 0.55rem 0;
  padding: 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #334155;
}

.gse-form-group .form-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.28rem;
}

#gseInputWarnings {
  background: #fef3c7;
  color: #854d0e;
  border: 1px solid #fcd34d;
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
}

.gse-summary-card dt {
  color: #475569;
  font-weight: 700;
}

.gse-summary-card dd {
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.gse-exhibit-section {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 1.4rem;
}

.gse-exhibit-card {
  height: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: linear-gradient(165deg, #fafbfc 0%, #f1f5f9 100%);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.gse-exhibit-card--gov {
  border-color: rgba(13, 148, 136, 0.35);
  background: linear-gradient(165deg, #f0fdfa 0%, #ecfdf5 55%, #f8fafc 100%);
}

.gse-exhibit-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.gse-exhibit-context {
  color: #475569;
}

.gse-exhibit-links-label,
.gse-exhibit-verify-label,
.gse-exhibit-evidence-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.gse-exhibit-links {
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.gse-exhibit-links li + li {
  margin-top: 0.28rem;
}

.gse-exhibit-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: #0d9488;
  text-decoration: none;
  font-weight: 600;
}

.gse-exhibit-link:hover {
  color: #0f766e;
  text-decoration: underline;
}

.gse-exhibit-link-icon {
  font-size: 0.62rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.gse-exhibit-context a {
  color: #0d9488;
  font-weight: 600;
}

.gse-exhibit-verify {
  color: #0f766e;
  font-style: italic;
  line-height: 1.42;
}

.gse-exhibit-counts dt {
  font-weight: 600;
  color: #64748b;
}

.gse-exhibit-counts dd {
  text-align: right;
}

.gse-pooling-section {
  margin-top: 0.25rem;
}

.gse-pooling-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(13, 148, 136, 0.28);
  background: linear-gradient(165deg, #f0fdfa 0%, #f8fafc 50%, #f1f5f9 100%);
  padding: 1rem 1.15rem 1.2rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.gse-pooling-card .gse-exhibit-kicker {
  color: #0d9488;
}

.gse-pooling-card .gse-exhibit-verify {
  color: #0f766e;
}

.gse-pooling-card .gse-exhibit-link {
  color: #0f766e;
}

.gse-pooling-card .gse-exhibit-link:hover {
  color: #115e59;
}

.gse-pooling-card .gse-exhibit-context a,
.gse-pooling-card .gse-pooling-list a {
  color: #0f766e;
}

.gse-pooling-step {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.75rem 0.85rem;
}

.gse-pooling-step__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  background: #0d9488;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.gse-pooling-list {
  padding-left: 1.1rem;
  margin-bottom: 0;
  line-height: 1.45;
}

.gse-pooling-list li + li {
  margin-top: 0.45rem;
}

.gse-pooling-glossary > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.35rem 0.65rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.gse-pooling-glossary dt {
  font-weight: 700;
  color: #334155;
  margin: 0;
}

.gse-pooling-glossary dd {
  margin: 0;
  color: #475569;
}

.gse-explainer {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.78);
}

.gse-explainer > summary {
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f766e;
}

.gse-explainer > summary:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
  border-radius: 0.65rem;
}

.gse-explainer__body {
  padding: 0 0.85rem 0.75rem;
  font-size: 0.85rem;
}

.gse-explainer__body a {
  color: #0f766e;
}

.gse-arm-reset-block {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.85rem 1rem;
}

.gse-arm-cutoff-table {
  margin-bottom: 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
}

.gse-arm-cutoff-table th,
.gse-arm-cutoff-table td {
  padding: 0.45rem 0.65rem;
  vertical-align: middle;
}

.gse-arm-cutoff-table thead th {
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

@media (max-width: 576px) {
  .gse-pooling-glossary > div {
    grid-template-columns: 1fr;
  }
}

.gse-delivery-section {
  margin-top: 0.25rem;
}

.gse-delivery-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: linear-gradient(165deg, #eff6ff 0%, #f8fafc 55%, #f1f5f9 100%);
  padding: 1rem 1.15rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.gse-delivery-card .gse-exhibit-kicker {
  color: #3b82f6;
}

.gse-delivery-card .gse-exhibit-verify {
  color: #1d4ed8;
}

.gse-delivery-card .gse-exhibit-link {
  color: #2563eb;
}

.gse-delivery-card .gse-exhibit-link:hover {
  color: #1d4ed8;
}

.gse-delivery-card .gse-exhibit-context a {
  color: #2563eb;
}

.gse-knowledge-canvas-wrap {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.75rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(13, 148, 136, 0.12), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.1), transparent 40%),
    #f8fafc;
  padding: 0.55rem;
}

.gse-knowledge-graph {
  width: 100%;
  height: auto;
  display: block;
  min-height: 180px;
}

.gse-knowledge-constellation {
  width: 100%;
  height: 240px;
  display: block;
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  background: #0b1220;
}

.gse-knowledge-bars {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gse-knowledge-bar-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.gse-knowledge-bar-row span {
  font-size: 0.78rem;
  color: #475569;
}

.gse-knowledge-bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.gse-knowledge-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488, #2563eb);
}

.gse-knowledge-hits li {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
}

.gse-knowledge-hits .gse-hit-meta {
  color: #64748b;
  font-size: 0.72rem;
}

.gse-ai-mode-tabs .nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.gse-ai-mode-tabs .nav-link.active {
  background: #0f766e;
}

.gse-chat-thread {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.75rem;
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gse-chat-bubble {
  max-width: 92%;
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.gse-chat-bubble--user {
  align-self: flex-end;
  background: #0f766e;
  color: #fff;
}

.gse-chat-bubble--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.gse-ai-chip {
  white-space: normal;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.45rem 0.7rem;
}

.gse-ai-result {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 0.95rem;
}

.gse-ai-result h4 {
  margin-bottom: 0.42rem;
}

.gse-ai-result ul {
  margin-bottom: 0;
  padding-left: 1.05rem;
  line-height: 1.5;
}

.gse-ai-subcard {
  height: 100%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.7rem;
  background: #f8fafc;
  padding: 0.7rem 0.8rem;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.gse-ai-chip:focus-visible,
.gse-jumps a:focus-visible,
.gse-import > summary:focus-visible,
.gse-exhibit-more > summary:focus-visible,
.gse-reference .accordion-button:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  .gse-desk__rail {
    position: static;
  }
}

@media (max-width: 768px) {
  .gse-scenario-card .card-header .btn-group {
    width: 100%;
  }

  .gse-scenario-card .card-header .btn-group .btn {
    flex: 1 1 auto;
  }

  .gse-ai-chip {
    width: 100%;
  }
}

body.dark-mode {
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .gse-desk-head {
  border-bottom-color: rgba(148, 163, 184, 0.25);
}

body.dark-mode .gse-desk-head h1,
body.dark-mode .gse-summary-card dd,
body.dark-mode .gse-reference .accordion-button {
  color: #f8fafc;
}

body.dark-mode .gse-disclaimer,
body.dark-mode .gse-summary-card dt,
body.dark-mode .gse-section-subtitle,
body.dark-mode .gse-exhibit-context,
body.dark-mode .text-muted {
  color: #94a3b8 !important;
}

body.dark-mode .gse-kicker,
body.dark-mode .gse-jumps a,
body.dark-mode .gse-import > summary,
body.dark-mode .gse-exhibit-more > summary {
  color: #5eead4;
}

body.dark-mode .gse-jumps a {
  background: rgba(13, 148, 136, 0.15);
  border-color: rgba(94, 234, 212, 0.35);
}

body.dark-mode .card,
body.dark-mode .gse-summary-card,
body.dark-mode .gse-scenario-card,
body.dark-mode .gse-grid-card,
body.dark-mode .gse-ai-card,
body.dark-mode .gse-form-group,
body.dark-mode .gse-import,
body.dark-mode .gse-exhibit-card,
body.dark-mode .gse-pooling-card,
body.dark-mode .gse-delivery-card,
body.dark-mode .gse-reference .accordion-item,
body.dark-mode .gse-ai-subcard,
body.dark-mode .gse-knowledge-hits li,
body.dark-mode .gse-explainer,
body.dark-mode .gse-arm-reset-block {
  background: #1e293b;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.22);
}

body.dark-mode .gse-scenario-card .card-header,
body.dark-mode .gse-ai-card .card-header,
body.dark-mode .gse-reference .accordion-button,
body.dark-mode .gse-reference .accordion-button:not(.collapsed) {
  background: #162032;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.22);
}

body.dark-mode .gse-form-group__legend,
body.dark-mode .gse-form-group .form-label,
body.dark-mode .gse-pooling-glossary dt {
  color: #cbd5e1;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.35);
}

body.dark-mode .gse-pooling-step,
body.dark-mode .gse-knowledge-canvas-wrap,
body.dark-mode .gse-chat-thread,
body.dark-mode .gse-chat-bubble--assistant {
  background: #0f172a;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.22);
}

body.dark-mode .gse-arm-cutoff-table,
body.dark-mode .gse-arm-cutoff-table thead th {
  background: #0f172a;
  color: #e2e8f0;
}
