:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --ink: #111820;
  --muted: #687480;
  --line: #dfe5eb;
  --dark: #0c1117;
  --teal: #0e9e96;
  --green: #138a5b;
  --blue: #165dce;
  --amber: #b87312;
  --red: #c94b4b;
  --shadow: 0 8px 22px rgba(17, 24, 32, 0.06);
  --radius: 6px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Professional Services Workspace */
.professional-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.professional-product-panel {
  border-top: 3px solid #165dce;
}

.professional-application-catalog {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.professional-application {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
}

.professional-application.available {
  border-color: #9fbbe8;
  background: #f5f9ff;
}

.professional-application.planned {
  background: #f7f8fa;
}

.professional-application-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: #165dce;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.professional-application.planned .professional-application-mark {
  background: #829ab1;
}

.professional-application strong,
.professional-application p {
  overflow-wrap: anywhere;
}

.professional-application strong {
  color: #102a43;
  font-size: 14px;
}

.professional-application p {
  margin: 5px 0 0;
  color: #627d98;
  font-size: 12px;
  line-height: 1.45;
}

.professional-application .status {
  grid-column: 1 / -1;
  justify-self: start;
}

.professional-boundary-panel {
  border-left: 3px solid #b7791f;
}

.professional-boundary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #d9e2ec;
}

.professional-boundary-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  background: #fff;
}

.professional-boundary-grid strong,
.professional-boundary-grid span {
  overflow-wrap: anywhere;
}

.professional-boundary-grid span {
  color: #52606d;
  font-size: 13px;
  line-height: 1.55;
}

.professional-two-column,
.professional-case-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.professional-case-layout {
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
}

.professional-row-list,
.professional-capability-list,
.professional-review-list {
  display: grid;
  gap: 10px;
}

.professional-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #e4e7eb;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.professional-row {
  cursor: pointer;
}

button.professional-row:hover,
button.professional-row:focus-visible,
button.professional-row.active {
  padding-inline: 10px;
  border-color: #9fb3c8;
  background: #f0f7ff;
  outline: none;
}

.professional-row-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.professional-row-copy strong,
.professional-row-copy small,
.professional-row-copy span {
  overflow-wrap: anywhere;
}

.professional-row-copy strong {
  color: #102a43;
  font-size: 15px;
}

.professional-row-copy small {
  color: #486581;
  font-size: 12px;
}

.professional-row-copy span {
  color: #52606d;
  font-size: 13px;
  line-height: 1.5;
}

.professional-definition-list {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
}

.professional-definition-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e4e7eb;
}

.professional-definition-list dt {
  color: #627d98;
  font-size: 12px;
}

.professional-definition-list dd {
  min-width: 0;
  margin: 0;
  color: #102a43;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.professional-capability {
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-left: 3px solid #00897b;
  border-radius: 6px;
}

.professional-capability span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.professional-capability small {
  color: #486581;
  text-transform: uppercase;
}

.professional-capability p,
.professional-case-detail p,
.professional-review-item p {
  margin: 8px 0 0;
  color: #52606d;
  font-size: 13px;
  line-height: 1.6;
}

.professional-case-detail {
  display: grid;
  gap: 16px;
}

.professional-detail-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: #627d98;
}

.investment-boundary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.investment-boundary-strip > * {
  padding: 5px 8px;
  border: 1px solid #b8c9dc;
  border-radius: 4px;
  color: #243b53;
  background: #f4f8fc;
  font-size: 11px;
}

.investment-case-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
}

.investment-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.investment-section-head h4 {
  margin: 0;
  color: #102a43;
  font-size: 14px;
}

.investment-section-head span {
  color: #627d98;
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.investment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.investment-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  margin-bottom: 0;
}

.investment-status-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.investment-status-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
}

.investment-status-list li:last-child {
  border-bottom: 0;
}

.investment-status-list li > span {
  overflow-wrap: anywhere;
}

.investment-report-draft {
  padding: 10px 0;
  border-bottom: 1px solid #e4e7eb;
}

.investment-report-draft strong,
.investment-report-draft small {
  display: block;
  overflow-wrap: anywhere;
}

.investment-report-draft p {
  margin: 6px 0;
  color: #52606d;
  font-size: 12px;
}

.investment-report-draft small,
.investment-review-event small {
  color: #829ab1;
}

.investment-review-event {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
}

.professional-inline-boundary {
  display: block;
  padding: 12px 14px;
  border-left: 3px solid #b7791f;
  background: #fff8e6;
  color: #7c4a03;
  font-size: 12px;
  line-height: 1.55;
}

.professional-submission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.professional-submission-form .full {
  grid-column: 1 / -1;
}

.professional-review-item {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #d9e2ec;
}

.professional-review-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.professional-review-item > header > div,
.professional-review-evidence,
.professional-review-receipt {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.data-authorization-center {
  border-top: 3px solid #165dce;
}

.data-authorization-list {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.data-authorization-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #fff;
}

.data-authorization-item > header,
.data-authorization-statuses,
.data-authorization-actions,
.data-authorization-artifacts,
.data-authorization-audit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.data-authorization-item > header > div,
.data-authorization-state,
.data-authorization-artifact,
.data-authorization-audit-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.data-authorization-item h4 {
  margin: 0;
  color: #102a43;
  font-size: 15px;
}

.data-authorization-item p,
.data-authorization-item small {
  margin: 0;
  color: #52606d;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.data-authorization-item small {
  font-size: 11px;
}

.data-authorization-statuses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-authorization-state {
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  background: #f7f9fb;
}

.data-authorization-state strong {
  color: #334e68;
  font-size: 12px;
}

.data-authorization-artifacts {
  align-items: stretch;
}

.data-authorization-artifact {
  flex: 1 1 0;
  padding: 10px;
  border-left: 3px solid #9fb3c8;
  background: #f7f9fb;
}

.data-authorization-details {
  border-top: 1px solid #e4e7eb;
  padding-top: 12px;
}

.data-authorization-details > summary {
  color: #165dce;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.data-authorization-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.data-authorization-form .full {
  grid-column: 1 / -1;
}

.data-authorization-audit {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.data-authorization-audit-row {
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 12px;
}

.data-authorization-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.data-authorization-item.test-only {
  border-color: #f0b429;
}

.acceptance-test-banner {
  padding: 9px 12px;
  border: 1px solid #f0b429;
  border-radius: 4px;
  background: #fff8e6;
  color: #7a4d00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.data-authorization-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.acceptance-demonstration {
  display: grid;
  gap: 13px;
  padding: 14px 0;
  border-top: 1px solid #d9e2ec;
  border-bottom: 1px solid #d9e2ec;
}

.acceptance-section-head,
.acceptance-conclusion,
.acceptance-fixture > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.acceptance-section-head > div,
.acceptance-fixture {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.acceptance-section-head h5,
.acceptance-section-head p,
.acceptance-fixture span,
.acceptance-fixture small,
.acceptance-conclusion span {
  margin: 0;
}

.acceptance-section-head h5 {
  color: #102a43;
  font-size: 14px;
}

.acceptance-section-head p,
.acceptance-fixture small,
.acceptance-conclusion span {
  color: #52606d;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.acceptance-layers,
.acceptance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.acceptance-layer,
.acceptance-metric {
  display: grid;
  gap: 4px;
  padding: 10px 0 10px 12px;
  border-left: 3px solid #f0b429;
}

.acceptance-layer.complete,
.acceptance-metric:has(.status.green) {
  border-left-color: #16815f;
}

.acceptance-layer strong,
.acceptance-metric strong,
.acceptance-conclusion strong {
  color: #334e68;
  font-size: 12px;
}

.acceptance-layer span,
.acceptance-metric span {
  color: #102a43;
  font-size: 13px;
  font-weight: 700;
}

.acceptance-layer small,
.acceptance-metric small {
  color: #627d98;
  font-size: 10px;
  line-height: 1.4;
}

.acceptance-fixture {
  padding: 10px 12px;
  border-left: 3px solid #165dce;
  background: #f3f7fc;
}

.acceptance-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acceptance-checklist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f3;
}

.acceptance-checklist li > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #334e68;
  font-size: 12px;
}

.acceptance-checklist li > span b {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e7eef7;
  color: #165dce;
  font-size: 10px;
}

.acceptance-checklist li > small {
  grid-column: 1 / -1;
  color: #7b8794;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.acceptance-conclusion {
  padding: 10px 12px;
  border: 1px solid #f0b429;
  border-radius: 4px;
  background: #fffaf0;
}

.professional-review-item > header span,
.professional-review-evidence span,
.professional-review-receipt span {
  color: #52606d;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.professional-review-receipt {
  padding: 12px 14px;
  border: 1px solid #b7ebd0;
  border-radius: 6px;
  background: #f1fbf6;
}

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

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

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

@media (max-width: 820px) {
  .professional-two-column,
  .professional-case-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-submission-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-submission-form .full {
    grid-column: auto;
  }

  .professional-application-catalog,
  .investment-detail-grid,
  .investment-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .professional-metrics,
  .professional-boundary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-row,
  .professional-review-item > header,
  .professional-capability span {
    flex-direction: column;
  }

  .professional-definition-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .investment-section-head,
  .investment-status-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .investment-section-head span {
    text-align: left;
  }

  .data-authorization-item > header,
  .data-authorization-actions,
  .data-authorization-artifacts,
  .data-authorization-audit-row {
    flex-direction: column;
  }

  .data-authorization-statuses,
  .data-authorization-form,
  .acceptance-layers,
  .acceptance-metrics,
  .acceptance-checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-authorization-form .full {
    grid-column: auto;
  }

  .data-authorization-artifact,
  .data-authorization-actions button {
    width: 100%;
  }

  .acceptance-section-head,
  .acceptance-conclusion,
  .acceptance-fixture > div {
    flex-direction: column;
  }
}

@media print {
  body.printing-data-authorization * {
    visibility: hidden !important;
  }

  body.printing-data-authorization .data-authorization-item.print-target,
  body.printing-data-authorization .data-authorization-item.print-target * {
    visibility: visible !important;
  }

  body.printing-data-authorization .data-authorization-item.print-target {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  body.printing-data-authorization .data-authorization-actions,
  body.printing-data-authorization .data-authorization-form,
  body.printing-data-authorization .data-authorization-item > .field,
  body.printing-data-authorization .data-authorization-item > details:first-of-type {
    display: none !important;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.connectivity-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 140;
  min-height: 48px;
  padding: 11px 20px;
  border-top: 1px solid #e5b96f;
  background: #fff7e6;
  color: #6b470d;
  box-shadow: 0 -6px 20px rgba(17, 24, 32, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

html[data-connectivity="offline"] body {
  padding-bottom: 56px;
}

html[data-connectivity="offline"] .login-screen,
html[data-connectivity="offline"] .workspace-screen,
html[data-connectivity="offline"] .app-shell {
  min-height: calc(100vh - 56px);
}

/* Swordfish Workspace application entry */
.workspace-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f2f5f7;
}

.workspace-entry-header {
  min-height: 78px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid #d8e0e6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.workspace-entry-header .brand-row strong {
  display: block;
  color: #10263c;
  font-size: 18px;
}

.workspace-entry-header .brand-row span:not(.swordfish-brand-mark) {
  display: block;
  margin-top: 3px;
  color: #637280;
  font-size: 12px;
}

.workspace-brand-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.workspace-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.workspace-locale {
  min-width: 148px;
}

.workspace-entry-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vh, 76px) 0 48px;
}

.workspace-entry-intro {
  max-width: 760px;
}

.workspace-entry-intro .eyebrow {
  color: #0e7770;
}

.workspace-entry-intro h1 {
  margin: 10px 0 0;
  color: #101c2a;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.workspace-entry-intro p {
  margin: 14px 0 0;
  color: #5c6b78;
  font-size: 15px;
  line-height: 1.65;
}

.workspace-account-context {
  margin: 30px 0 20px;
  padding: 15px 0;
  border-top: 1px solid #d7e0e7;
  border-bottom: 1px solid #d7e0e7;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 8px 16px;
}

.workspace-account-context span {
  color: #74818c;
  font-size: 12px;
  font-weight: 700;
}

.workspace-account-context strong {
  min-width: 0;
  color: #182532;
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.workspace-card-shell {
  min-width: 0;
  min-height: 188px;
}

.workspace-card {
  width: 100%;
  height: 100%;
  min-height: 188px;
  padding: 24px;
  border: 1px solid #d7e0e7;
  border-radius: 6px;
  background: #fff;
  color: #162433;
  box-shadow: 0 4px 14px rgba(18, 38, 57, 0.04);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 18px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.workspace-card.available:hover,
.workspace-card.available:focus-visible {
  border-color: #2a69bd;
  box-shadow: 0 10px 26px rgba(22, 93, 206, 0.11);
  transform: translateY(-2px);
}

.workspace-card:focus-visible {
  outline: 3px solid rgba(22, 93, 206, 0.24);
  outline-offset: 2px;
}

.workspace-card.unavailable {
  background: #f8fafb;
  color: #586674;
  box-shadow: none;
  cursor: default;
}

.workspace-card-icon {
  width: 52px;
  aspect-ratio: 1 / 1;
  border: 1px solid #bfd2e8;
  border-radius: 6px;
  background: #edf4fc;
  color: #174f98;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 850;
}

.workspace-card[data-workspace-id="zwatt-ecosystem"] .workspace-card-icon {
  border-color: #b8d9cc;
  background: #eaf6f1;
  color: #176b43;
}

.workspace-card[data-workspace-id="professional-services"] .workspace-card-icon {
  border-color: #e6d3aa;
  background: #fff7e6;
  color: #8b5b12;
}

.workspace-card[data-workspace-id="internal-governance"] .workspace-card-icon {
  border-color: #ccd3da;
  background: #eff2f4;
  color: #364858;
}

.workspace-card-copy,
.workspace-card-heading {
  min-width: 0;
  display: flex;
}

.workspace-card-copy {
  flex-direction: column;
  gap: 12px;
}

.workspace-card-heading {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-card-heading strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.workspace-card-description,
.workspace-card-reason {
  display: block;
  line-height: 1.55;
}

.workspace-card-description {
  color: #5b6976;
  font-size: 13px;
}

.workspace-card-reason {
  color: #77838e;
  font-size: 11px;
  font-weight: 680;
}

.workspace-card-arrow {
  color: #2a69bd;
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.workspace-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

.owner-ecosystem-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
}

.owner-ecosystem-shortcut > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.owner-ecosystem-shortcut strong {
  color: var(--ink);
  font-size: 13px;
}

.owner-ecosystem-shortcut span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.owner-ecosystem-shortcut button span:last-child {
  color: inherit;
  font-size: inherit;
}

.workspace-card.unavailable .workspace-card-arrow {
  color: #a5afb7;
}

.workspace-entry-boundary {
  margin-top: 20px;
  padding: 13px 0 0;
  border-top: 1px solid #d7e0e7;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: #667581;
  font-size: 11px;
}

.workspace-entry-boundary span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #16835b;
  display: inline-block;
  vertical-align: 1px;
}

.workspace-entry-footer {
  min-height: 52px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-top: 1px solid #d8e0e6;
  color: #6b7883;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.workspace-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 760px) {
  .workspace-entry-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-entry-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .workspace-entry-main {
    width: min(100% - 28px, 620px);
    padding: 34px 0 38px;
  }

  .workspace-entry-intro h1 {
    font-size: 32px;
  }

  .workspace-account-context {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .workspace-cards {
    grid-template-columns: 1fr;
  }

  .workspace-card,
  .workspace-card-shell {
    min-height: 0;
  }

  .workspace-card {
    padding: 19px;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    gap: 13px;
  }

  .workspace-card-icon {
    width: 44px;
  }

  .workspace-card-heading {
    flex-direction: column;
  }

  .workspace-entry-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #132027, #0f4b4b 62%, #1d6b61);
}

.login-panel {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row.compact {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.login-brand-logo {
  width: 86px;
  height: 86px;
}

.sidebar-brand-logo {
  width: 72px;
  height: 72px;
}

.mobile-brand-logo {
  display: none;
  width: 48px;
  height: 48px;
}

.brand-row h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.15;
}

.brand-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand-row p {
  color: rgba(236, 244, 241, 0.7);
}

.login-copy {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: grid;
  gap: 4px;
}

.login-copy strong {
  font-size: 16px;
}

.login-copy span,
.field span {
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(0, 139, 132, 0.22);
  outline-offset: 2px;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.primary-action,
.secondary-action {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 750;
}

.primary-action {
  background: var(--teal);
  color: white;
}

.primary-action.small {
  min-height: 34px;
  padding: 7px 11px;
}

.secondary-action {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

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

.sidebar {
  background: var(--dark);
  color: #ecf4f1;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 10px;
  background: transparent;
  color: rgba(236, 244, 241, 0.76);
  text-align: left;
  font-weight: 680;
}

.nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-status span,
.sidebar-status small {
  color: rgba(236, 244, 241, 0.68);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  display: grid;
  align-content: start;
}

.topbar {
  min-height: 84px;
  padding: 18px 24px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 760;
  background: #eef4f2;
  color: #27524e;
}

.status.green {
  background: #e8f5ef;
  color: #176b43;
}

.status.blue {
  background: #e9f0fd;
  color: #214e9a;
}

.status.amber {
  background: #fff4df;
  color: #8b560f;
}

.status.red {
  background: #fdecec;
  color: #9b2f2f;
}

.metrics {
  padding: 18px 24px 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 12px;
}

.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metrics article {
  min-height: 102px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.metrics span,
.metrics small {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  font-size: 26px;
  letter-spacing: 0;
}

.view {
  display: none;
  padding: 18px 24px 28px;
}

.view.active {
  display: block;
}

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

.span-2 {
  grid-column: 1 / -1;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel.highlight {
  border-color: rgba(45, 110, 211, 0.28);
}

.panel-head {
  min-height: 68px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.panel-head .status {
  margin-top: 0;
}

.panel-body,
.wallet-panel,
.boundary-panel {
  padding: 16px;
}

.summary-grid,
.portfolio-grid,
.wallet-grid,
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
  gap: 5px;
}

.summary-item label,
.portfolio-item label,
.wallet-item label,
.boundary-item label {
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong,
.portfolio-item strong,
.wallet-item strong,
.boundary-item strong {
  font-size: 15px;
}

.resource-strip,
.resource-list,
.task-list,
.service-market,
.timeline {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.resource-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.resource-card,
.task-card,
.service-card,
.log-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  padding: 12px;
}

.resource-card {
  min-height: 140px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.resource-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: left;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.resource-button.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 139, 132, 0.12);
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 900;
}

.resource-card h4,
.resource-button h4,
.task-card h4,
.service-card h4,
.log-card h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.resource-card p,
.resource-button p,
.task-card p,
.service-card p,
.log-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quality {
  min-width: 58px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.bar {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 6px;
  border: 0;
  border-radius: 99px;
  appearance: none;
  overflow: hidden;
}

.bar::-webkit-progress-bar {
  background: #e6edf0;
  border-radius: 99px;
}

.bar::-webkit-progress-value {
  background: var(--teal);
  border-radius: 99px;
}

.bar::-moz-progress-bar {
  background: var(--teal);
  border-radius: 99px;
}

.passport-detail {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.passport-visual {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 139, 132, 0.12), rgba(45, 110, 211, 0.1)),
    repeating-linear-gradient(90deg, transparent, transparent 25px, rgba(23, 33, 43, 0.04) 26px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
}

.passport-visual strong {
  display: block;
  font-size: 20px;
}

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

.service-form {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.route-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.route-switch button {
  min-height: 38px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font-weight: 750;
}

.route-switch button.active {
  background: var(--teal);
  color: #fff;
}

.quote-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  display: grid;
}

.quote-row {
  min-height: 36px;
  padding: 9px 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.quote-row:last-child {
  border-bottom: 0;
}

.quote-row span {
  color: var(--muted);
}

.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.task-card button {
  min-width: 86px;
}

.wallet-note {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ffe3ad;
  border-radius: var(--radius);
  background: #fff9ee;
  color: #765018;
  line-height: 1.5;
  font-size: 13px;
}

.service-market {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  min-height: 160px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.unit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unit-list span {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
}

.log-card {
  display: grid;
  gap: 4px;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .resource-strip,
  .service-market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px;
  }

  .brand-row.compact,
  .sidebar-status {
    display: none;
  }

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

  .nav button {
    text-align: center;
    white-space: nowrap;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .mobile-brand-logo {
    display: block;
  }

  .metrics,
  .view {
    padding-left: 16px;
    padding-right: 16px;
  }

  .metrics,
  .dashboard-grid,
  .resource-strip,
  .service-market,
  .summary-grid,
  .portfolio-grid,
  .wallet-grid,
  .boundary-grid,
  .passport-kv {
    grid-template-columns: 1fr;
  }
}

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

  .resource-button,
  .task-card {
    grid-template-columns: 1fr;
  }

  .quality {
    text-align: left;
  }
}

/* V1.1-S owner live operations workspace */
.live-operations-head {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.live-operations-head h3,
.live-operations-head p {
  margin: 0;
}

.live-operations-head h3 {
  font-size: 16px;
}

.live-operations-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.live-operations-actions {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 10px;
}

.live-project-filter {
  width: min(280px, 34vw);
}

.live-project-filter select {
  min-height: 36px;
}

.live-operations-actions .status {
  min-height: 36px;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.live-operations-boundary {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #f7f9fb;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}

.live-operations-boundary span {
  min-width: max-content;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-operations-boundary span:first-child {
  padding-left: 0;
  color: var(--blue);
}

.live-operations-boundary span:last-child {
  border-right: 0;
}

.live-operations-metrics {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--line);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
}

.live-operations-metrics article {
  min-width: 0;
  min-height: 94px;
  padding: 15px 16px;
  background: #fff;
  display: grid;
  align-content: space-between;
  gap: 7px;
}

.live-operations-metrics span,
.live-operations-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.live-operations-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.live-operations-metrics small {
  font-size: 9px;
  font-weight: 800;
}

.live-operations-message {
  min-height: 20px;
  margin: 8px 0 0;
}

.live-operations-stations {
  display: grid;
  gap: 14px;
}

.live-station {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.live-station-head {
  min-height: 84px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(440px, 1.4fr);
  align-items: center;
  gap: 20px;
}

.live-station-head h4,
.live-station-head p,
.live-station-summary,
.live-station-summary dd {
  margin: 0;
}

.live-station-head h4 {
  margin-top: 5px;
  font-size: 15px;
}

.live-station-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.live-station-kind {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.live-station-kind.solar {
  color: var(--amber);
}

.live-station-kind.storage {
  color: var(--green);
}

.live-station-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.live-station-summary div {
  min-width: 0;
  padding: 4px 14px;
  border-left: 1px solid var(--line);
}

.live-station-summary dt {
  color: var(--muted);
  font-size: 10px;
}

.live-station-summary dd {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-station-weather {
  min-width: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 18px;
}

.live-weather-source {
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 8px;
}

.live-weather-source span,
.live-weather-source small,
.live-weather-source em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.live-weather-source span {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

.live-weather-source strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.live-weather-source small,
.live-weather-source em {
  grid-column: 2;
}

.live-weather-source em {
  color: #8b6600;
  font-weight: 700;
}

.live-weather-metrics {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.live-weather-metrics div {
  min-width: 0;
  padding: 2px 10px;
  border-left: 1px solid #dfe8e4;
}

.live-weather-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.live-weather-metrics dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-asset-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 7px;
}

.live-asset {
  min-width: 0;
  min-height: 76px;
  padding: 10px;
  border: 1px solid #e2e7ec;
  border-radius: 4px;
  background: #fff;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.live-asset-title,
.live-asset-values {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-asset-title i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
}

.live-asset-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.live-asset-title span {
  margin-left: auto;
  color: var(--green);
  font-size: 9px;
}

.live-asset-values {
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

.live-asset-values span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 800;
}

.live-asset-values small {
  color: var(--muted);
  font-size: 9px;
}

.live-asset-anomaly {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid #f4c8c8;
  color: #9f2424;
  font-size: 11px;
  line-height: 1.35;
}

.live-asset-anomaly strong,
.live-asset-anomaly span {
  display: block;
}

.live-asset-anomaly span {
  color: #7a3b3b;
}

.live-asset[data-status="idle"] .live-asset-title i,
.live-asset[data-status="curtailed"] .live-asset-title i {
  background: var(--amber);
}

.live-asset[data-status="idle"] .live-asset-title span,
.live-asset[data-status="curtailed"] .live-asset-title span {
  color: var(--amber);
}

.live-asset[data-status="degraded"],
.live-asset[data-status="alarm"] {
  border-color: #e9c9a5;
  background: #fffaf3;
}

.live-asset[data-status="degraded"] .live-asset-title i,
.live-asset[data-status="alarm"] .live-asset-title i {
  background: var(--red);
}

.live-asset[data-status="degraded"] .live-asset-title span,
.live-asset[data-status="alarm"] .live-asset-title span {
  color: var(--red);
}

.live-asset[data-status="offline"] {
  background: #f3f5f7;
  color: var(--muted);
}

.live-asset[data-status="offline"] .live-asset-title i {
  background: #8a96a3;
}

.live-asset[data-status="offline"] .live-asset-title span {
  color: var(--muted);
}

@media (max-width: 1280px) {
  .live-asset-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .live-operations-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .live-operations-metrics article:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .live-station-head {
    grid-template-columns: 1fr;
  }

  .live-station-summary div:first-child {
    border-left: 0;
  }

  .live-station-weather {
    grid-template-columns: 1fr;
  }

  .live-weather-metrics div:first-child {
    border-left: 0;
  }

  .live-asset-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .live-operations-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-operations-boundary {
    padding: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-weather-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 10px;
  }

  .live-weather-metrics div:nth-child(4) {
    border-left: 0;
  }

  .live-operations-boundary span {
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .live-operations-boundary span:first-child {
    padding-left: 10px;
  }

  .live-operations-boundary span:nth-child(2n),
  .live-operations-boundary span:last-child {
    border-right: 0;
  }

  .live-operations-boundary span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .live-operations-actions {
    width: 100%;
    align-items: end;
  }

  .live-project-filter {
    width: auto;
    min-width: 0;
    flex: 1;
  }

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

  .live-operations-metrics article:last-child {
    grid-column: span 2;
  }

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

  .live-station-summary div:nth-child(3) {
    border-left: 0;
  }

  .live-station-summary div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

.asset-os-job-panel {
  margin-top: 14px;
}

.optimization-review-queue-panel {
  margin-top: 14px;
}

.optimization-review-queue {
  display: grid;
}

.optimization-review-queue-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}

.optimization-review-queue-item > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.optimization-review-queue-item strong,
.optimization-review-queue-item span {
  overflow-wrap: anywhere;
}

.optimization-review-queue-item > div span {
  color: var(--muted);
  font-size: 11px;
}

.asset-os-job-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 1fr);
  min-height: 260px;
}

.asset-os-job-controls {
  padding: 18px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 13px;
  align-content: start;
}

.asset-os-job-result {
  min-width: 0;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.asset-os-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.asset-os-result-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  gap: 5px;
}

.asset-os-result-grid span,
.asset-os-result-meta {
  color: var(--muted);
  font-size: 11px;
}

.asset-os-result-grid strong {
  overflow-wrap: anywhere;
}

.asset-os-parameter-group {
  border-top: 1px solid var(--line);
  padding-top: 13px;
  display: grid;
  gap: 11px;
}

.asset-os-parameter-head,
.asset-os-check-grid,
.asset-os-inline-check,
.optimization-boundary {
  display: flex;
  align-items: center;
}

.asset-os-parameter-head {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.asset-os-parameter-head strong,
.asset-os-parameter-label {
  font-size: 12px;
}

.asset-os-parameter-head span,
.asset-os-workload-legend,
.optimization-boundary span {
  color: var(--muted);
  font-size: 11px;
}

.asset-os-parameter-grid,
.asset-os-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.asset-os-check-grid {
  flex-wrap: wrap;
  gap: 8px 18px;
}

.asset-os-check-grid label,
.asset-os-inline-check {
  min-height: 28px;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.asset-os-check-grid input,
.asset-os-inline-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.asset-os-workload-list {
  display: grid;
  gap: 7px;
}

.asset-os-workload-row,
.asset-os-workload-legend {
  display: grid;
  grid-template-columns: minmax(88px, 1.25fr) repeat(3, minmax(58px, 0.72fr)) minmax(86px, 0.9fr) minmax(72px, 0.78fr);
  gap: 6px;
  align-items: center;
}

.asset-os-workload-row {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.asset-os-workload-row input,
.asset-os-workload-row select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.asset-os-workload-field {
  min-width: 0;
}

.asset-os-workload-field > span {
  display: none;
}

.optimization-table {
  display: grid;
  border-top: 1px solid var(--line);
}

.optimization-table-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.35fr) repeat(2, minmax(90px, 0.85fr)) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.optimization-table-row strong,
.optimization-table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.optimization-table-row > span:not(.status) {
  color: var(--muted);
}

.optimization-boundary {
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  background: #f7faf9;
}

.optimization-boundary strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.asset-os-domain-output {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}

.asset-os-domain-head,
.asset-os-attention-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-os-domain-head strong {
  font-size: 14px;
}

.asset-os-attention-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.asset-os-attention-list div {
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.asset-os-attention-list strong {
  overflow-wrap: anywhere;
}

.asset-os-attention-list span {
  color: var(--muted);
}

.report-decision-controls,
.report-approval-record {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.report-decision-controls {
  display: grid;
  gap: 12px;
}

.report-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.secondary-action.small {
  min-height: 34px;
  padding: 7px 11px;
}

.report-approval-record {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  font-size: 12px;
}

.report-approval-record span,
.report-approval-record small {
  color: var(--muted);
}

.report-approval-record small {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.notification-outbox-panel {
  margin-top: 14px;
}

.notification-outbox {
  display: grid;
}

.notification-outbox-row {
  min-width: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.notification-outbox-copy,
.notification-outbox-actions {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.notification-outbox-copy span,
.notification-outbox-copy small,
.notification-outbox-actions small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.notification-outbox-actions {
  justify-items: end;
  text-align: right;
}

.organization-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.organization-directory {
  max-height: 700px;
  overflow-y: auto;
}

.organization-directory-row {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.organization-directory-row:hover,
.organization-directory-row.active {
  background: #f5f8fd;
}

.organization-directory-row.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.organization-directory-main,
.organization-directory-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.organization-directory-main strong,
.organization-directory-main small {
  overflow-wrap: anywhere;
}

.organization-directory-main small,
.organization-directory-meta small {
  color: var(--muted);
  font-size: 11px;
}

.organization-directory-meta {
  justify-items: end;
  text-align: right;
}

.organization-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

@media (max-width: 980px) {
  .asset-os-job-layout,
  .organization-admin-layout {
    grid-template-columns: 1fr;
  }

  .asset-os-job-controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .asset-os-result-grid,
  .organization-form .form-grid {
    grid-template-columns: 1fr;
  }

  .organization-form-actions button {
    width: 100%;
  }

  .report-decision-actions,
  .report-decision-actions button {
    width: 100%;
  }

  .optimization-review-queue-item {
    grid-template-columns: 1fr auto;
  }

  .optimization-review-queue-item button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .asset-os-parameter-grid,
  .asset-os-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-os-parameter-grid {
    grid-template-columns: 1fr;
  }

  .asset-os-workload-legend {
    display: none;
  }

  .asset-os-workload-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 9px;
    padding: 12px 0;
  }

  .asset-os-workload-field {
    display: grid;
    gap: 5px;
  }

  .asset-os-workload-field > span {
    display: block;
    color: var(--muted);
    font-size: 11px;
  }

  .asset-os-inline-check {
    align-self: end;
    min-height: 34px;
  }

  .optimization-table-row {
    grid-template-columns: minmax(110px, 1fr) minmax(90px, 0.8fr);
  }

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

  .notification-outbox-actions {
    justify-items: start;
    text-align: left;
  }
}

.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.operations-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.operations-head-actions .icon-action {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}

.operations-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.operations-metrics > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 18px 16px;
  border-right: 1px solid var(--line);
}

.operations-metrics > div:last-child {
  border-right: 0;
}

.operations-metrics span,
.operations-metrics small,
.operations-details dt,
.operations-boundary span {
  color: var(--muted);
}

.operations-metrics span {
  font-size: 12px;
  font-weight: 700;
}

.operations-metrics strong {
  font-size: 24px;
  line-height: 1.15;
}

.operations-metrics strong[data-status="ok"] {
  color: var(--green);
}

.operations-metrics strong[data-status="warning"],
.operations-metrics strong[data-status="not_configured"] {
  color: #9a6800;
}

.operations-metrics strong[data-status="critical"] {
  color: var(--red);
}

.operations-metrics small {
  min-height: 30px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.45;
}

#operationsMessage:not(:empty) {
  margin-top: 12px;
}

.operations-details {
  display: grid;
  margin: 12px 0 0;
}

.operations-details > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.operations-details dt,
.operations-details dd {
  margin: 0;
  font-size: 12px;
}

.operations-details dd {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-weight: 750;
}

.operations-boundary {
  display: grid;
  gap: 6px;
  padding-top: 16px;
}

.operations-boundary strong {
  font-size: 12px;
}

.operations-boundary span {
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1060px) {
  .operations-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .owner-ecosystem-shortcut {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-ecosystem-shortcut button {
    justify-content: center;
    width: 100%;
  }
  .operations-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-metrics > div:nth-child(2) {
    border-right: 0;
  }

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

@media (max-width: 420px) {
  .operations-metrics {
    grid-template-columns: 1fr;
  }

  .operations-metrics > div,
  .operations-metrics > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .operations-metrics > div:last-child {
    border-bottom: 0;
  }

  .operations-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .operations-details dd {
    text-align: left;
  }
}

/* V0.9 ZWATT append-only demo ledger */
.ledger-workspace,
.ledger-correction-panel {
  margin-top: 14px;
}

#view-wallet .timeline,
#view-wallet .log-card {
  min-width: 0;
}

#view-wallet .log-card h4,
#view-wallet .log-card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wallet-overview-panel,
.audit-workspace {
  grid-column: 1 / -1;
}

.audit-filters {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.audit-filters input,
.audit-filters select {
  min-width: 0;
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

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

.audit-filter-actions button {
  min-height: 36px;
  white-space: nowrap;
}

#auditMessage {
  min-height: 0;
  padding: 0 16px;
}

#auditMessage:not(:empty) {
  padding-top: 12px;
}

.audit-entries {
  padding: 14px 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.audit-entry-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.audit-entry-head h4 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ledger-filters {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.ledger-filters input,
.ledger-filters select {
  min-width: 0;
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.ledger-filter-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
}

.ledger-filter-actions button {
  min-height: 36px;
  white-space: nowrap;
}

#ledgerMessage {
  min-height: 0;
  padding: 0 16px;
}

#ledgerMessage:not(:empty) {
  padding-top: 12px;
}

.ledger-entries {
  padding: 14px 16px 16px;
  display: grid;
  gap: 9px;
}

.ledger-entry {
  min-width: 0;
  border: 1px solid #e1e7ed;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 13px 14px;
  background: #fff;
  display: grid;
  gap: 11px;
}

.ledger-entry.correction {
  border-left-color: var(--amber);
  background: #fffdf7;
}

.ledger-entry-head,
.ledger-entry-foot {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ledger-entry-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ledger-entry-head strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.ledger-entry-head span,
.ledger-entry-foot span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ledger-entry-head .status {
  color: inherit;
  flex: 0 0 auto;
}

.ledger-entry-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.ledger-entry-values > div {
  min-width: 0;
  min-height: 54px;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
  align-content: center;
}

.ledger-entry-values > div:last-child {
  border-right: 0;
}

.ledger-entry-values span {
  color: var(--muted);
  font-size: 10px;
}

.ledger-entry-values strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ledger-correction-form {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.7fr));
  gap: 12px;
  align-items: end;
}

.correction-reason-field,
.ledger-correction-actions,
#ledgerCorrectionMessage {
  grid-column: 1 / -1;
}

.ledger-correction-form textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  font: inherit;
}

.ledger-correction-form textarea:focus {
  outline: 3px solid rgba(0, 139, 132, 0.22);
  outline-offset: 2px;
}

.ledger-correction-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

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

  .ledger-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-filter-actions {
    align-self: end;
  }

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

  .correction-reference-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .audit-filters,
  .audit-entries {
    grid-template-columns: 1fr;
  }

  .audit-filter-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-filter-actions button {
    white-space: normal;
  }

  .audit-entry-head {
    display: grid;
  }

  .ledger-filters,
  .ledger-correction-form,
  .ledger-entry-values {
    grid-template-columns: 1fr;
  }

  .correction-reference-field,
  .correction-reason-field,
  .ledger-correction-actions,
  #ledgerCorrectionMessage {
    grid-column: auto;
  }

  .ledger-filter-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-filter-actions button {
    white-space: normal;
  }

  .ledger-entry-head,
  .ledger-entry-foot {
    display: grid;
  }

  .ledger-entry-values > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ledger-entry-values > div:last-child {
    border-bottom: 0;
  }

  .ledger-correction-actions {
    display: grid;
  }
}

/* V0.9 task management */
.task-management-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(560px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.task-directory-panel .panel-head,
.task-editor-panel .panel-head,
.task-directory-panel .panel-head > div,
.task-editor-panel .panel-head > div {
  min-width: 0;
}

.task-directory-panel .panel-head span,
.task-editor-panel .panel-head span {
  overflow-wrap: anywhere;
}

.task-filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.project-filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.business-query-filters .business-search-field,
.business-query-filters .business-filter-actions,
.business-query-filters .filter-message {
  grid-column: 1 / -1;
}

.compact-field input {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.business-filter-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.business-filter-actions button {
  min-width: 0;
  width: 100%;
}

.filter-message {
  min-height: 0;
  margin: 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

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

.filter-message.success {
  color: var(--green);
}

.task-directory-panel .task-list {
  max-height: 760px;
  overflow-y: auto;
}

.task-directory-row {
  width: 100%;
  min-height: 102px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.task-directory-row:hover {
  border-color: #b8c9dd;
  background: #f8fafd;
}

.task-directory-row.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.task-directory-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.task-directory-main strong {
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task-directory-main small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-directory-meta {
  min-width: 62px;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.task-directory-meta .status {
  min-width: 54px;
  text-align: center;
  font-style: normal;
}

.task-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

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

.task-form-grid textarea {
  width: 100%;
  resize: vertical;
  min-height: 104px;
}

.task-governance-boundary {
  border-left: 3px solid var(--blue);
  background: #f3f7fc;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.5;
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 1080px) {
  .task-management-layout {
    grid-template-columns: 1fr;
  }

  .task-directory-panel .task-list {
    max-height: 460px;
  }
}

@media (max-width: 620px) {
  .project-filters,
  .task-filters,
  .task-form-grid {
    grid-template-columns: 1fr;
  }

  .task-form-grid .span-2 {
    grid-column: auto;
  }

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

  .task-directory-meta {
    grid-template-columns: repeat(2, auto);
    justify-items: start;
    justify-content: start;
  }

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

/* V0.9 resource passport management */
.resource-management-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(560px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.resource-directory-panel .panel-head,
.resource-editor-panel .panel-head {
  min-width: 0;
}

.resource-directory-panel .panel-head > div,
.resource-editor-panel .panel-head > div {
  min-width: 0;
}

.resource-directory-panel .panel-head span,
.resource-editor-panel .panel-head span {
  overflow-wrap: anywhere;
}

.resource-filters {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.compact-field {
  gap: 5px;
}

.compact-field span {
  font-size: 10px;
}

.compact-field select {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.resource-directory-panel .resource-list {
  max-height: 760px;
  overflow-y: auto;
}

.resource-button {
  min-height: 88px;
  grid-template-columns: 60px minmax(0, 1fr) auto;
}

.resource-button .resource-icon {
  width: 54px;
  height: 38px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.resource-button:hover {
  border-color: #b8c9dd;
  background: #f8fafd;
}

.resource-button.active {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.resource-row-meta {
  min-width: 76px;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.resource-row-meta .bar {
  width: 72px;
}

.resource-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

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

.resource-history-band {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}

.resource-dq-band {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}

.resource-dq-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-dq-summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resource-dq-summary > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.resource-dq-summary > div:last-child {
  border-right: 0;
}

.resource-dq-summary span,
.resource-dq-components span,
.resource-dq-history span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.resource-dq-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.resource-dq-summary .resource-dq-score strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.resource-dq-components {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.resource-dq-component {
  min-width: 0;
  padding: 10px 0;
}

.resource-dq-component strong {
  display: block;
  margin: 4px 0 7px;
  font-size: 13px;
}

.resource-dq-component progress {
  width: 100%;
}

.resource-dq-history {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  overflow-x: auto;
}

.resource-dq-deductions {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.resource-dq-deductions strong {
  color: var(--ink);
}

.resource-dq-history strong {
  flex: 0 0 auto;
  font-size: 11px;
}

.resource-dq-history ol {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-dq-history li {
  min-width: 52px;
  padding-left: 8px;
  border-left: 2px solid var(--line);
}

.resource-dq-history li.good {
  border-color: var(--green);
}

.resource-dq-history li.watch {
  border-color: var(--amber);
}

.resource-dq-history li.poor {
  border-color: var(--red);
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-heading-row h4 {
  margin: 0 0 4px;
  font-size: 14px;
  letter-spacing: 0;
}

.section-heading-row span:not(.status) {
  color: var(--muted);
  font-size: 11px;
}

.resource-history {
  max-height: 390px;
  overflow-y: auto;
  display: grid;
  gap: 9px;
}

.resource-history-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
  overflow: hidden;
}

.resource-history-head {
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.resource-history-head strong {
  font-size: 13px;
}

.resource-history-head span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.resource-history-changes {
  display: grid;
}

.resource-history-changes > div {
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.resource-history-changes > div:last-child {
  border-bottom: 0;
}

.resource-history-changes span {
  color: var(--muted);
  font-size: 11px;
}

.resource-history-changes strong {
  min-width: 0;
  font-size: 11px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .resource-management-layout {
    grid-template-columns: 1fr;
  }

  .resource-directory-panel .resource-list {
    max-height: 460px;
  }
}

@media (max-width: 620px) {
  .resource-filters,
  .resource-form-grid {
    grid-template-columns: 1fr;
  }

  .resource-form-grid .span-2 {
    grid-column: auto;
  }

  .resource-button {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .resource-row-meta {
    grid-column: 2;
    justify-items: start;
  }

  .resource-history-head,
  .section-heading-row {
    align-items: flex-start;
  }

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

  .resource-dq-summary > div:nth-child(2) {
    border-right: 0;
  }

  .resource-dq-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .resource-dq-components {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-history-head {
    display: grid;
  }

  .resource-history-head span {
    text-align: left;
  }

  .resource-history-changes > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* V0.9 user administration and account security */
button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.text-action {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.password-change-layout {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(30, 55, 87, 0.14);
}

.password-change-context {
  padding: 42px;
  background: #eaf2ff;
  display: grid;
  align-content: center;
  gap: 20px;
}

.password-change-context h2 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.password-change-context > p {
  margin: -8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.password-rule-list {
  border-top: 1px solid #cbd8e9;
  display: grid;
}

.password-rule-list span {
  min-height: 42px;
  padding: 11px 0;
  border-bottom: 1px solid #cbd8e9;
  color: #52677f;
  font-size: 13px;
}

.password-change-form {
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.account-context {
  margin-bottom: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 5px;
}

.account-context span {
  color: var(--muted);
  font-size: 12px;
}

.account-context strong {
  overflow-wrap: anywhere;
}

.user-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(480px, 1.2fr);
  gap: 14px;
  align-items: start;
}

.user-directory {
  max-height: 690px;
  overflow-y: auto;
}

.user-directory-row {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  text-align: left;
}

.user-directory-row:last-child {
  border-bottom: 0;
}

.user-directory-row:hover,
.user-directory-row.active {
  background: #f5f8fd;
}

.user-directory-row.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #edf3fc;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 850;
}

.user-directory-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.user-directory-copy strong,
.user-directory-copy small {
  overflow-wrap: anywhere;
}

.user-directory-copy small,
.user-directory-flags small {
  color: var(--muted);
  font-size: 11px;
}

.user-directory-flags {
  max-width: 150px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  text-align: right;
}

.user-directory-flags i {
  font-style: normal;
}

.user-admin-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

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

.form-section {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 13px;
}

.form-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.form-section-head strong {
  font-size: 14px;
}

.form-section-head span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.project-assignments {
  border-top: 1px solid var(--line);
}

.project-assignment-row {
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
}

.project-assignment-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.project-assignment-row select {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.inline-notice {
  padding: 11px 12px;
  border-left: 3px solid var(--amber);
  background: #fff8ea;
  color: #765018;
  font-size: 13px;
  line-height: 1.5;
}

.form-error.success {
  color: var(--green);
}

.password-reset-section {
  padding: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.password-reset-section > div:first-child {
  display: grid;
  gap: 5px;
}

.password-reset-section span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.password-reset-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.danger-action {
  color: #9b2f2f;
  border-color: #efcaca;
}

/* V1.3 service identities and one-time API credentials */
.usage-event-readiness {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.usage-event-readiness-head {
  min-height: 70px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.usage-event-readiness-head > div,
.usage-event-readiness-state {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.usage-event-readiness-head h3 {
  margin: 0;
  font-size: 16px;
}

.usage-event-readiness-head span,
.usage-event-readiness-state small {
  color: var(--muted);
  font-size: 11px;
}

.usage-event-readiness-state {
  justify-items: end;
  text-align: right;
}

.usage-event-readiness-metrics {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.usage-event-readiness-metrics > div {
  min-width: 0;
  min-height: 74px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 7px;
}

.usage-event-readiness-metrics > div:last-child {
  border-right: 0;
}

.usage-event-readiness-metrics span,
.usage-event-readiness-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.usage-event-readiness-metrics span {
  color: var(--muted);
  font-size: 10px;
}

.usage-event-readiness-metrics strong {
  font-size: 15px;
}

.usage-event-readiness-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.usage-event-readiness-check {
  min-width: 0;
  min-height: 68px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px 7px;
  align-content: center;
}

.usage-event-readiness-check:nth-child(4n) {
  border-right: 0;
}

.usage-event-readiness-check:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.usage-event-readiness-check > span {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.usage-event-readiness-check.passed > span {
  color: #15705e;
}

.usage-event-readiness-check.pending > span {
  color: #9b6a1d;
}

.usage-event-readiness-check strong,
.usage-event-readiness-check small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.usage-event-readiness-check strong {
  font-size: 11px;
}

.usage-event-readiness-check small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.usage-event-readiness-blockers {
  padding: 12px 16px;
  background: #fff9ef;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  font-size: 11px;
}

.usage-event-readiness-blockers strong {
  color: #8a5a16;
}

.usage-event-readiness-blockers span {
  color: #68563a;
}

.usage-event-readiness-boundary {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid #bfe2dc;
  background: #edf9f6;
  color: #46645f;
  font-size: 10px;
  line-height: 1.55;
}

.service-account-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
  gap: 14px;
  align-items: start;
}

.service-account-boundary {
  padding: 13px 16px;
  border-bottom: 1px solid #bfe2dc;
  background: #edf9f6;
  display: grid;
  gap: 4px;
}

.service-account-boundary strong {
  color: #126f64;
  font-size: 12px;
}

.service-account-boundary span {
  color: #46645f;
  font-size: 11px;
  line-height: 1.55;
}

.service-account-directory {
  max-height: 690px;
  overflow-y: auto;
}

.service-account-directory-row {
  width: 100%;
  min-height: 78px;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.service-account-directory-row:hover,
.service-account-directory-row.active {
  background: #f4f8fd;
}

.service-account-directory-row.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.service-account-directory-main,
.service-account-directory-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.service-account-directory-main strong,
.service-account-directory-main small,
.service-account-directory-meta small {
  overflow-wrap: anywhere;
}

.service-account-directory-main small,
.service-account-directory-meta small {
  color: var(--muted);
  font-size: 11px;
}

.service-account-directory-meta {
  justify-items: end;
  text-align: right;
}

.service-account-directory-meta i {
  font-style: normal;
}

.service-account-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.service-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.service-scope-grid fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.service-scope-grid legend {
  margin-left: 10px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.service-scope-options {
  max-height: 230px;
  padding: 5px 10px;
  overflow-y: auto;
}

.service-scope-option {
  min-height: 50px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.service-scope-option:last-child {
  border-bottom: 0;
}

.service-scope-option.disabled {
  opacity: 0.46;
}

.service-scope-option input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.service-scope-option span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.service-scope-option strong,
.service-scope-option small {
  overflow-wrap: anywhere;
}

.service-scope-option strong {
  font-size: 12px;
  font-weight: 650;
}

.service-scope-option small,
.service-scope-empty {
  color: var(--muted);
  font-size: 10px;
}

.service-scope-empty {
  display: block;
  padding: 16px 4px;
}

.service-token-reveal {
  margin: 18px 18px 0;
  padding: 15px;
  border: 1px solid #e6bd6d;
  background: #fff8e8;
  display: grid;
  gap: 12px;
}

.service-token-reveal > div:first-child {
  display: grid;
  gap: 4px;
}

.service-token-reveal strong {
  color: #80540e;
  font-size: 14px;
}

.service-token-reveal span,
.service-token-reveal small {
  color: #735f38;
  font-size: 11px;
  line-height: 1.5;
}

.service-token-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.service-token-copy-row input {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.service-token-management {
  margin: 0 18px 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.service-token-history {
  border-top: 1px solid var(--line);
}

.service-token-row {
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.service-token-row > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-token-row > div:last-child {
  justify-items: end;
  text-align: right;
}

.service-token-row strong,
.service-token-row span,
.service-token-row small {
  overflow-wrap: anywhere;
}

.service-token-row strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.service-token-row span,
.service-token-row small {
  color: var(--muted);
  font-size: 10px;
}

.service-token-row i {
  font-style: normal;
}

.service-token-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.service-metering-section {
  margin: 22px 24px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.service-metering-head,
.service-metering-section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.service-metering-head > div,
.service-metering-section-head {
  min-width: 0;
}

.service-metering-head strong,
.service-metering-head span,
.service-metering-section-head strong,
.service-metering-section-head span {
  display: block;
}

.service-metering-head strong {
  font-size: 15px;
}

.service-metering-head span,
.service-metering-section-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.service-metering-boundary {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: #edf8f3;
}

.service-metering-boundary strong,
.service-metering-boundary span {
  display: block;
}

.service-metering-boundary strong {
  color: #126345;
  font-size: 12px;
}

.service-metering-boundary span {
  margin-top: 4px;
  color: #3e6256;
  font-size: 11px;
  line-height: 1.55;
}

.service-metering-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
}

.service-metering-metrics > div {
  min-width: 0;
  min-height: 94px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.service-metering-metrics > div:last-child {
  border-right: 0;
}

.service-metering-metrics span,
.service-metering-metrics strong,
.service-metering-metrics small {
  display: block;
}

.service-metering-metrics span {
  color: var(--muted);
  font-size: 10px;
}

.service-metering-metrics strong {
  margin-top: 7px;
  font-size: 21px;
}

.service-metering-metrics small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.service-metering-data-grid,
.service-metering-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-execution-trace-section {
  margin-top: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-execution-trace-list {
  max-height: 440px;
  margin-top: 10px;
  overflow: auto;
}

.service-execution-trace {
  min-width: 0;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
}

.service-execution-trace:last-child {
  border-bottom: 0;
}

.service-execution-trace-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.service-execution-trace-head > div {
  min-width: 0;
}

.service-execution-trace-head strong,
.service-execution-trace-head span,
.service-execution-trace-head small {
  display: block;
  overflow-wrap: anywhere;
}

.service-execution-trace-head strong {
  font-size: 12px;
}

.service-execution-trace-head span,
.service-execution-trace-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.service-execution-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  margin-top: 10px;
  border: 1px solid var(--line);
}

.service-execution-stage {
  min-width: 0;
  min-height: 82px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.service-execution-stage:last-child {
  border-right: 0;
}

.service-execution-stage > span,
.service-execution-stage > strong,
.service-execution-stage > small {
  display: block;
  overflow-wrap: anywhere;
}

.service-execution-stage > span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.service-execution-stage > strong {
  margin-top: 5px;
  font-size: 10px;
}

.service-execution-stage > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.service-metering-data-section,
.service-metering-form {
  min-width: 0;
  padding: 16px;
}

.service-metering-data-section + .service-metering-data-section,
.service-metering-form + .service-metering-form {
  border-left: 1px solid var(--line);
}

.service-metering-list {
  max-height: 330px;
  margin-top: 10px;
  overflow: auto;
}

.service-metering-row {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.service-metering-row:last-child {
  border-bottom: 0;
}

.service-metering-row > div {
  min-width: 0;
}

.service-metering-row strong,
.service-metering-row span,
.service-metering-row small {
  display: block;
  overflow-wrap: anywhere;
}

.service-metering-row strong {
  font-size: 12px;
}

.service-metering-row span,
.service-metering-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.service-metering-row-meta {
  text-align: right;
}

.service-metering-action-grid {
  margin-top: 0;
  border-top: 0;
}

.service-metering-form-grid {
  margin: 12px 0;
}

.service-metering-form .secondary-action {
  width: 100%;
}

@media (max-width: 980px) {
  .user-admin-layout {
    grid-template-columns: 1fr;
  }

  .user-directory {
    max-height: 430px;
  }

  .service-account-layout {
    grid-template-columns: 1fr;
  }

  .service-account-directory {
    max-height: 360px;
  }

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

  .usage-event-readiness-metrics > div {
    border-bottom: 1px solid var(--line);
  }

  .usage-event-readiness-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .usage-event-readiness-metrics > div:last-child {
    border-bottom: 0;
  }

  .usage-event-readiness-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-event-readiness-check:nth-child(2n) {
    border-right: 0;
  }

  .usage-event-readiness-check:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .usage-event-readiness-check:last-child {
    border-bottom: 0;
  }

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

  .service-metering-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .service-metering-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .service-metering-data-grid,
  .service-metering-action-grid {
    grid-template-columns: 1fr;
  }

  .service-execution-stages {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .service-execution-stage:nth-child(3) {
    border-right: 0;
  }

  .service-execution-stage:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .service-metering-data-section + .service-metering-data-section,
  .service-metering-form + .service-metering-form {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .password-change-layout {
    grid-template-columns: 1fr;
  }

  .password-change-context,
  .password-change-form {
    padding: 28px;
  }

  .password-change-context .password-rule-list {
    display: none;
  }

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

  .service-scope-grid,
  .service-token-copy-row,
  .service-token-actions {
    grid-template-columns: 1fr;
  }

  .usage-event-readiness-head {
    align-items: flex-start;
  }

  .usage-event-readiness-metrics,
  .usage-event-readiness-checklist {
    grid-template-columns: 1fr;
  }

  .usage-event-readiness-metrics > div,
  .usage-event-readiness-check,
  .usage-event-readiness-check:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-metering-section {
    margin-left: 14px;
    margin-right: 14px;
  }

  .service-metering-metrics {
    grid-template-columns: 1fr;
  }

  .service-metering-metrics > div,
  .service-metering-metrics > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-metering-metrics > div:last-child {
    border-bottom: 0;
  }

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

  .service-execution-trace-section {
    padding-left: 0;
    padding-right: 0;
  }

  .service-execution-trace-head {
    display: block;
  }

  .service-execution-trace-head .status {
    display: inline-block;
    margin-top: 8px;
  }

  .service-execution-stages {
    grid-template-columns: 1fr;
  }

  .service-execution-stage,
  .service-execution-stage:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-execution-stage:last-child {
    border-bottom: 0;
  }

  .service-metering-row-meta {
    text-align: left;
  }

  .service-scope-options {
    max-height: 180px;
  }

  .service-token-copy-row button,
  .service-token-actions button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .password-change-layout {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .password-change-context {
    padding: 22px;
  }

  .password-change-context h2 {
    font-size: 24px;
  }

  .password-change-form {
    padding: 24px 22px 30px;
  }

  .user-directory-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }

  .user-directory-flags {
    grid-column: 2;
    max-width: none;
    justify-content: flex-start;
    text-align: left;
  }

  .project-assignment-row,
  .password-reset-controls {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .project-assignment-row select {
    grid-column: 2;
  }

  .password-reset-controls .field,
  .password-reset-controls button {
    grid-column: 1 / -1;
  }

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

/* V0.7 financial control-room layout */
.login-screen {
  min-height: 100vh;
  padding: 32px;
  background: var(--dark);
}

.login-layout {
  width: min(1120px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.65fr);
  overflow: hidden;
  border: 1px solid #26313d;
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.login-stage {
  min-width: 0;
  padding: 48px;
  color: #fff;
  border-right: 1px solid #26313d;
  display: flex;
  flex-direction: column;
}

.login-stage-brand {
  align-items: center;
}

.stage-brand-logo {
  width: 58px;
  height: 58px;
}

.login-stage-brand strong,
.login-stage-brand span {
  display: block;
}

.login-stage-brand strong {
  font-size: 18px;
}

.login-stage-brand span {
  margin-top: 3px;
  color: #9daab7;
  font-size: 12px;
}

.login-stage-brand .ecosystem-tagline {
  color: #0b58bd;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.login-stage-brand .brand-descriptor {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.2;
}

.login-stage-copy {
  max-width: 620px;
  margin: auto 0 40px;
}

.eyebrow {
  color: #58d4cc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-stage-copy h1 {
  max-width: 620px;
  margin: 14px 0 16px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
  text-wrap: balance;
}

.login-stage-copy p {
  margin: 0;
  color: #aeb9c4;
  font-size: 16px;
  line-height: 1.65;
}

.login-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #31404e;
  border-bottom: 1px solid #31404e;
}

.login-data-grid article {
  min-width: 0;
  padding: 22px 18px;
  border-right: 1px solid #31404e;
  display: grid;
  gap: 7px;
}

.login-data-grid article:first-child {
  padding-left: 0;
}

.login-data-grid article:last-child {
  border-right: 0;
}

.login-data-grid strong {
  font-size: 26px;
}

.login-live-stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.3;
  color: #425b73;
  font-size: 11px;
  font-weight: 700;
}

.login-live-stat-label::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0aa89e;
  box-shadow: 0 0 0 3px rgba(10, 168, 158, 0.12);
}

.login-estimate-status {
  margin: 10px 0 0;
  color: #58d4cc;
  font-size: 11px;
  line-height: 1.4;
}

.login-estimate-status[data-status="unavailable"],
.login-estimate-status[data-status="stale"] {
  color: #c7a35e;
}

.login-data-grid span {
  color: #9daab7;
  font-size: 12px;
}

.login-boundary {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #8f9ca8;
  font-size: 11px;
  text-transform: uppercase;
}

.login-panel {
  width: auto;
  padding: 48px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  align-content: center;
  gap: 18px;
}

.login-form-brand {
  margin-bottom: 8px;
}

.login-brand-logo {
  width: 64px;
  height: 64px;
}

.login-copy {
  padding: 16px 0;
}

.login-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.login-legal {
  margin: -10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8b98a8;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease;
}

.login-legal:hover {
  color: var(--primary);
}

.login-legal:focus-visible {
  color: var(--primary);
  outline: 2px solid color-mix(in srgb, var(--primary) 48%, transparent);
  outline-offset: 3px;
  border-radius: 4px;
}

.login-legal-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}

.app-shell {
  display: block;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px;
  padding: 0 24px;
  background: var(--dark);
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.brand-row.compact {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
}

.brand-row.compact h1 {
  color: #fff;
  font-size: 15px;
}

.sidebar .brand-row p {
  color: #8f9ca8;
  font-size: 10px;
}

.nav {
  min-width: 0;
  display: flex;
  align-self: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar,
.status-ticker::-webkit-scrollbar,
.metrics::-webkit-scrollbar {
  display: none;
}

.nav button {
  width: auto;
  min-height: 64px;
  padding: 0 13px;
  border-radius: 0;
  color: #aeb9c4;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}

.nav button.active {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--blue);
}

.sidebar-status {
  min-width: max-content;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-status strong,
.sidebar-status small {
  color: #c2ccd5;
  font-size: 11px;
}

@media (max-width: 1320px) {
  .sidebar-status small {
    display: none;
  }
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 50%;
  background: #23c483;
  box-shadow: 0 0 0 3px rgba(35, 196, 131, 0.14);
}

.workspace {
  min-height: calc(100vh - 64px);
}

.topbar {
  min-height: 94px;
  padding: 22px 32px;
}

.topbar h2 {
  font-size: 26px;
}

.mobile-brand-logo {
  display: none;
}

.primary-action {
  background: var(--blue);
}

.primary-action:hover {
  background: #0f4fb5;
}

.status-ticker {
  min-height: 42px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.status-ticker span {
  min-width: max-content;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.status-ticker span:first-child {
  padding-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-ticker strong {
  color: var(--ink);
}

.metrics {
  margin: 20px 32px 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metrics article {
  min-height: 98px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

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

.metrics strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.metrics small {
  font-size: 10px;
  font-weight: 800;
}

.view {
  padding: 18px 32px 32px;
}

#view-overview > .metrics {
  margin: 0 0 18px;
}

.view-overview,
#view-overview .dashboard-grid {
  min-width: 0;
}

#view-overview .dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

.metrics article,
.panel {
  box-shadow: none;
}

.panel {
  border-color: #dfe5eb;
}

.panel.highlight {
  border-color: #bdd0f5;
}

.portfolio-panel .panel-head {
  background: #f3f7fd;
  box-shadow: inset 3px 0 0 var(--blue);
}

.portfolio-panel .portfolio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-head {
  min-height: 64px;
}

.panel-head h3 {
  font-size: 15px;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item,
.resource-card,
.task-card,
.service-card,
.log-card {
  border-color: #e2e7ec;
  background: #fff;
}

.summary-item,
.portfolio-item,
.wallet-item,
.boundary-item {
  min-height: 70px;
}

.resource-card {
  min-height: 132px;
}

.resource-icon {
  background: #edf3fc;
  color: var(--blue);
}

.resource-button.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 93, 206, 0.1);
}

.bar::-webkit-progress-value,
.bar::-moz-progress-bar {
  background: var(--blue);
}

.passport-visual {
  background: #f3f7fd;
}

.route-switch button.active {
  background: var(--blue);
}

.pill,
.status {
  border-radius: 4px;
}

@media (max-width: 1040px) {
  .sidebar {
    gap: 14px;
  }

  .brand-row.compact p,
  .sidebar-status small {
    display: none;
  }

  .nav button {
    padding: 0 10px;
  }

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

@media (max-width: 820px) {
  .sidebar {
    z-index: 1000;
  }

  .login-screen {
    padding: 18px;
  }

  .login-layout {
    max-width: 540px;
    grid-template-columns: 1fr;
  }

  .login-stage {
    padding: 26px;
    border-right: 0;
    border-bottom: 1px solid #26313d;
  }

  .login-stage-copy {
    margin: 40px 0 28px;
  }

  .login-stage-copy h1 {
    font-size: 30px;
  }

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

  .login-data-grid article:nth-child(2) {
    border-right: 0;
  }

  .login-data-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid #cbd8e9;
  }

  .login-data-grid article:nth-child(3) {
    padding-left: 0;
  }

  .login-panel {
    padding: 30px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: 58px;
    padding: 8px 14px;
    display: flex;
    flex-wrap: nowrap;
  }

  .brand-row.compact {
    display: flex;
  }

  .sidebar-brand-logo {
    width: 38px;
    height: 38px;
  }

  .sidebar-status {
    display: none;
  }

  .nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-self: auto;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: var(--dark);
    border-top: 1px solid #26313d;
    overflow-x: auto;
  }

  .nav button {
    min-width: 92px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12px;
  }

  .nav button.active {
    background: #1a2530;
    box-shadow: inset 0 -2px 0 var(--blue);
  }

  .workspace {
    min-height: calc(100vh - 58px);
    padding-bottom: 66px;
  }

  .topbar {
    padding: 18px;
  }

  .mobile-brand-logo {
    display: none;
  }

  .status-ticker {
    padding: 0 18px;
  }

  .metrics {
    margin: 16px 18px 0;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .metrics article {
    min-width: 152px;
  }

  .view {
    padding: 16px 18px 24px;
  }

  #view-overview .dashboard-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .login-screen {
    padding: 0;
    place-items: stretch;
  }

  .login-layout {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .login-stage {
    padding: 22px;
  }

  .login-stage-copy {
    margin: 30px 0 24px;
  }

  .login-stage-copy h1 {
    font-size: 24px;
  }

  .login-stage-copy p {
    font-size: 14px;
  }

  .login-data-grid article {
    padding: 16px 10px;
  }

  .login-data-grid article:first-child {
    padding-left: 0;
  }

  .login-data-grid strong {
    font-size: 19px;
  }

  .login-boundary {
    gap: 10px;
  }

  .login-panel {
    padding: 24px 22px 30px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .portfolio-panel .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* V0.8 light Swordfish product system */
:root {
  --bg: #f4f7fb;
  --surface-soft: #edf4ff;
  --ink: #172033;
  --muted: #65758a;
  --line: #dbe4ef;
  --dark: #ffffff;
  --teal: #008f87;
  --shadow: 0 10px 30px rgba(24, 49, 83, 0.08);
}

.login-screen {
  background: #f1f5fa;
}

.login-layout {
  border-color: #d7e1ed;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(30, 55, 87, 0.14);
}

.login-stage {
  color: var(--ink);
  border-color: #cfdaea;
  background: #eaf2ff;
}

.login-stage-brand span,
.login-stage-copy p,
.login-data-grid span,
.login-boundary {
  color: #60738a;
}

.eyebrow {
  color: #087f79;
}

.login-data-grid {
  border-color: #cbd8e9;
}

.login-data-grid article {
  border-color: #cbd8e9;
}

.login-boundary span {
  padding: 6px 8px;
  border: 1px solid #c7d6e9;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
}

.login-panel {
  background: #ffffff;
}

.sidebar {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 3px 16px rgba(24, 49, 83, 0.06);
}

.brand-row.compact h1 {
  color: var(--ink);
}

.sidebar .brand-row p,
.sidebar-status strong,
.sidebar-status small {
  color: var(--muted);
}

.nav button {
  color: #5d6d80;
}

.nav button:hover {
  color: var(--blue);
  background: #f5f8fd;
}

.nav button.active {
  color: var(--blue);
  background: #f7faff;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
}

.status-ticker {
  background: #fbfcfe;
}

@media (max-width: 820px) {
  .login-stage {
    border-color: #cfdaea;
  }

  .nav {
    border-color: var(--line);
    background: #ffffff;
    box-shadow: 0 -6px 20px rgba(24, 49, 83, 0.08);
  }

  .nav button.active {
    color: var(--blue);
    background: #edf4ff;
  }
}

@media (max-width: 520px) {
  .login-stage {
    background: #eef5ff;
  }

  .login-form-brand h1 {
    font-size: 17px;
  }

  .login-form-brand p {
    font-size: 12px;
  }
}

/* V0.9 project management */
.nav button {
  padding-left: 11px;
  padding-right: 11px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

textarea:focus {
  outline: 3px solid rgba(0, 139, 132, 0.22);
  outline-offset: 2px;
}

.project-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(500px, 1.18fr);
  gap: 14px;
  align-items: start;
}

.project-directory {
  max-height: 720px;
  overflow-y: auto;
}

.project-directory-row {
  width: 100%;
  min-height: 96px;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.project-directory-row:last-child {
  border-bottom: 0;
}

.project-directory-row:hover,
.project-directory-row.active {
  background: #f5f8fd;
}

.project-directory-row.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.project-directory-main,
.project-directory-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.project-directory-main strong,
.project-directory-main small {
  overflow-wrap: anywhere;
}

.project-directory-main small,
.project-directory-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.project-directory-meta {
  justify-items: end;
  text-align: right;
}

.project-form {
  padding: 18px;
  display: grid;
  gap: 18px;
}

.project-editor-panel .panel-head > div {
  min-width: 0;
}

.project-editor-panel .panel-head span {
  overflow-wrap: anywhere;
}

.project-form-grid .span-field {
  grid-column: 1 / -1;
}

.project-linked-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.project-linked-summary:empty {
  display: none;
}

.project-linked-summary .summary-item {
  min-height: 68px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcfe;
}

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

.project-form-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.confirmation-dialog {
  width: min(500px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.2);
}

.confirmation-dialog::backdrop {
  background: rgba(23, 32, 51, 0.42);
}

.confirmation-dialog-body {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.confirmation-dialog-body h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.confirmation-dialog-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.confirmation-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.danger-primary {
  background: #b83d3d;
}

.danger-primary:hover {
  background: #9d3030;
}

@media (max-width: 980px) {
  .project-management-layout {
    grid-template-columns: 1fr;
  }

  .project-directory {
    max-height: 430px;
  }
}

@media (max-width: 700px) {
  .project-linked-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .project-linked-summary .summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .project-directory-row {
    grid-template-columns: 1fr;
  }

  .project-directory-meta {
    justify-items: start;
    text-align: left;
  }

  .project-form-grid .span-field {
    grid-column: auto;
  }

  .project-form-actions,
  .confirmation-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* V0.9 OP-012 management workspace states */
.global-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  height: 3px;
  overflow: hidden;
  background: rgba(22, 93, 206, 0.12);
}

.global-progress i {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--blue);
  transform: translateX(-110%);
  animation: request-progress 1s ease-in-out infinite;
}

@keyframes request-progress {
  50% { transform: translateX(140%); }
  100% { transform: translateX(350%); }
}

html[data-loading="true"] {
  cursor: progress;
}

button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.72;
}

.toast-region {
  position: fixed;
  top: 78px;
  right: 18px;
  z-index: 110;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 0;
  padding: 13px 12px 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.16);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 10px;
  pointer-events: auto;
}

.toast.success {
  border-left-color: var(--green);
}

.toast.error {
  border-left-color: var(--red);
}

.toast strong,
.toast span {
  display: block;
  overflow-wrap: anywhere;
}

.toast strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.toast span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast-close,
.icon-action {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.toast-close {
  width: 30px;
  height: 30px;
  border: 0;
  color: var(--muted);
  font-size: 18px;
}

.mobile-actions-trigger {
  display: none;
}

.empty-state {
  min-height: 112px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--muted);
  text-align: left;
}

.empty-state-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #f6f9fd;
  font-weight: 800;
}

.empty-state strong,
.empty-state p {
  display: block;
  overflow-wrap: anywhere;
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.empty-state .compact-action {
  min-width: max-content;
  margin-left: auto;
}

.portfolio-grid,
.summary-grid,
.wallet-grid,
.boundary-grid {
  gap: 0;
}

.portfolio-grid .summary-item,
.summary-grid .summary-item,
.wallet-grid .summary-item,
.boundary-grid .summary-item {
  min-height: 72px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.topbar {
  min-height: 78px;
  padding-top: 15px;
  padding-bottom: 15px;
}

.metrics article {
  min-height: 88px;
}

.project-directory-row,
.resource-button,
.task-directory-row,
.user-directory-row {
  min-height: 76px;
}

.project-form,
.resource-form,
.task-form,
.user-admin-form {
  gap: 15px;
}

@media (max-width: 820px) {
  .topbar {
    min-height: 78px;
    padding: 13px 16px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .topbar-heading {
    min-width: 0;
  }

  .topbar-heading > div {
    min-width: 0;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .topbar p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-actions-trigger {
    display: inline-grid;
  }

  .top-actions {
    position: absolute;
    top: calc(100% - 4px);
    right: 14px;
    z-index: 70;
    width: min(310px, calc(100vw - 28px));
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(23, 32, 51, 0.18);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .top-actions.open {
    display: grid;
  }

  .top-actions .pill {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

  .nav button {
    min-width: 82px;
  }

  .toast-region {
    top: 72px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    min-height: 54px;
  }

  .sidebar-brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-row.compact h1 {
    font-size: 14px;
  }

  .topbar {
    min-height: 72px;
    padding: 11px 14px;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar p {
    font-size: 11px;
  }

  .status-ticker {
    min-height: 36px;
    padding: 0 14px;
  }

  .metrics {
    margin: 12px 14px 0;
  }

  .metrics article {
    min-width: 132px;
    min-height: 82px;
    padding: 12px 14px;
  }

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

  .view {
    padding: 12px 14px 22px;
  }

  .panel-head {
    min-height: 58px;
    padding: 13px 14px;
  }

  .panel-head h3 {
    font-size: 14px;
  }

  .panel-body,
  .project-form,
  .resource-form,
  .task-form,
  .user-admin-form,
  .service-account-form {
    padding-left: 14px;
    padding-right: 14px;
  }

  .service-token-reveal,
  .service-token-management {
    margin-left: 14px;
    margin-right: 14px;
  }

  .empty-state {
    min-height: 128px;
    padding: 20px 14px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .empty-state .compact-action {
    width: 100%;
    margin: 4px 0 0;
  }

  .toast-region {
    inset: auto 10px calc(68px + env(safe-area-inset-bottom));
    width: auto;
  }
}

/* V1.1-S ZGA-SIM governance workspace */
.zga-sim-head {
  min-height: 76px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.zga-sim-head h3,
.zga-sim-head .eyebrow,
.zga-sim-register-head h3 {
  margin: 0;
}

.zga-sim-head h3 {
  margin-top: 5px;
  font-size: 17px;
}

.zga-sim-head-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zga-sim-boundary {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #f7f9fb;
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.zga-sim-boundary span {
  min-width: max-content;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.zga-sim-boundary span:first-child {
  padding-left: 0;
  color: var(--amber);
}

.zga-sim-boundary span:last-child {
  border-right: 0;
}

.zga-sim-metrics {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.zga-sim-metrics article {
  min-width: 0;
  min-height: 92px;
  padding: 15px 16px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: space-between;
  gap: 7px;
}

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

.zga-sim-metrics span,
.zga-sim-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.zga-sim-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.zga-sim-message {
  min-height: 20px;
  margin: 8px 0 0;
}

.zga-sim-governance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.zga-sim-control {
  min-width: 0;
}

.zga-sim-form {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.zga-sim-form .span-2 {
  grid-column: 1 / -1;
}

.zga-sim-divider {
  height: 1px;
  margin: 0 16px;
  background: var(--line);
}

.zga-sim-register {
  min-width: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.zga-sim-register-head {
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zga-sim-register-head h3 {
  font-size: 14px;
}

.zga-sim-register-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.zga-sim-run-list,
.zga-sim-record-list {
  padding: 12px;
  display: grid;
  gap: 9px;
}

.zga-sim-run {
  min-width: 0;
  border: 1px solid #e2e7ec;
  border-left: 3px solid var(--green);
  border-radius: 4px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(460px, 1.4fr);
  align-items: center;
}

.zga-sim-run[data-status="paused"] {
  border-left-color: var(--amber);
  background: #fffaf3;
}

.zga-sim-run-main {
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.zga-sim-run-main div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.zga-sim-run-main strong,
.zga-sim-run-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zga-sim-run-main strong {
  font-size: 13px;
}

.zga-sim-run-main small,
.zga-sim-run footer {
  color: var(--muted);
  font-size: 10px;
}

.zga-sim-run dl {
  min-width: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.zga-sim-run dl div {
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.zga-sim-run dt {
  color: var(--muted);
  font-size: 9px;
}

.zga-sim-run dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.zga-sim-run footer {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 0 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zga-sim-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.zga-sim-record {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e7ec;
  border-radius: 4px;
  background: #fff;
  display: grid;
  gap: 9px;
}

.zga-sim-record header,
.zga-sim-record footer,
.zga-sim-record-value {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.zga-sim-record header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.zga-sim-record-value strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.zga-sim-record-value span,
.zga-sim-record p,
.zga-sim-record footer {
  color: var(--muted);
  font-size: 9px;
}

.zga-sim-record p {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .zga-sim-governance,
  .zga-sim-register-grid {
    grid-template-columns: 1fr;
  }

  .zga-sim-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zga-sim-metrics article:nth-child(3) {
    border-right: 0;
  }

  .zga-sim-run {
    grid-template-columns: 1fr;
  }

  .zga-sim-run dl div:first-child {
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .zga-sim-head {
    align-items: flex-start;
  }

  .zga-sim-boundary {
    padding: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zga-sim-boundary span {
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .zga-sim-boundary span:first-child {
    padding-left: 10px;
  }

  .zga-sim-boundary span:nth-child(2n) {
    border-right: 0;
  }

  .zga-sim-boundary span:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

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

  .zga-sim-metrics article,
  .zga-sim-metrics article:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

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

  .zga-sim-metrics article:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .zga-sim-form {
    grid-template-columns: 1fr;
  }

  .zga-sim-form .span-2 {
    grid-column: auto;
  }

  .zga-sim-run dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zga-sim-run dl div:nth-child(odd) {
    border-left: 0;
  }

  .zga-sim-run dl div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .zga-sim-run footer {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* Keep the single workspace grid track inside narrow viewports. */
.workspace {
  grid-template-columns: minmax(0, 1fr);
}

/* V1.2 locale controls */
.locale-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.locale-control {
  width: max-content;
  display: inline-grid;
  grid-template-columns: auto minmax(92px, auto);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.locale-control select {
  width: auto;
  min-width: 96px;
  min-height: 34px;
  padding: 5px 28px 5px 9px;
  color: var(--ink);
  background-color: #fff;
}

.top-locale {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.top-locale select {
  min-height: 30px;
  border: 0;
  padding-top: 3px;
  padding-bottom: 3px;
}

@media (max-width: 820px) {
  .nav button {
    min-width: max-content;
  }

  .top-actions .top-locale {
    width: 100%;
    grid-column: 1 / -1;
    grid-template-columns: 1fr minmax(112px, auto);
  }
}

@media (max-width: 520px) {
  .login-panel .locale-control,
  .password-change-form .locale-control {
    width: 100%;
    grid-template-columns: 1fr minmax(112px, auto);
  }
}

/* Floating governed AI assistant */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.assistant-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 88;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 12px 28px rgba(9, 83, 194, 0.28);
  overflow: visible;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(9, 83, 194, 0.34);
}

.assistant-launcher:focus-visible {
  outline: 3px solid rgba(10, 108, 255, 0.3);
  outline-offset: 4px;
}

.swordfish-brand-mark,
.assistant-product-mark {
  display: block;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: visible;
  border-radius: 0;
  clip-path: none;
  background-color: transparent;
  background-image: url("/swordfish-mark-v2.png?v=1.6.0-dev.120");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.assistant-launcher .assistant-product-mark {
  width: 100%;
  height: 100%;
}

.assistant-launcher-status {
  position: absolute;
  right: 1px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #20a874;
}

.assistant-launcher.unavailable .assistant-launcher-status {
  background: var(--amber);
}

.assistant-panel {
  position: fixed;
  right: 24px;
  bottom: 98px;
  z-index: 90;
  width: min(420px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 122px));
  min-height: 460px;
  overflow: hidden;
  border: 1px solid #cbd8eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 64px rgba(20, 42, 72, 0.24);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto auto;
}

.assistant-panel-header {
  min-height: 72px;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assistant-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-product .assistant-product-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.assistant-product h2 {
  margin: 0;
  color: #0b3473;
  font-size: 16px;
  line-height: 1.25;
}

.assistant-product p {
  max-width: 230px;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-panel-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.assistant-close-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #526579;
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.assistant-close-button:hover {
  background: #e8eef7;
  color: #153f78;
}

.assistant-close-button:focus-visible {
  outline: 3px solid rgba(10, 108, 255, 0.24);
  outline-offset: 1px;
}

.assistant-context {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.assistant-case-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.assistant-case-field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.assistant-case-field select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #c7d4e5;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.assistant-scope {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.assistant-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #f7f9fc;
  display: grid;
  align-content: start;
  gap: 11px;
}

.assistant-welcome {
  padding: 18px 4px;
}

.assistant-welcome strong {
  color: #163d70;
  font-size: 15px;
}

.assistant-welcome p,
.assistant-privacy-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.assistant-message {
  width: 88%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.assistant-message.user {
  justify-self: end;
  border-color: #b8d5ff;
  background: #eaf3ff;
}

.assistant-message > span,
.assistant-message header > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-message header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.assistant-message header small {
  color: #7a5800;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  text-align: right;
}

.assistant-message p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-knowledge-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0 4px;
}

.assistant-knowledge-labels span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #b8d5c3;
  background: #f0f8f3;
  color: #245b39;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

.assistant-knowledge-labels span[data-basis="uncertainty"],
.assistant-knowledge-labels span[data-basis="external-model-unverified-current"],
.assistant-knowledge-labels span[data-basis="calculated-result"] {
  border-color: #e6ca91;
  background: #fff8e8;
  color: #624b10;
}

.assistant-citation-disclosure {
  margin: 9px 0 0;
  border-radius: 6px;
  background: #f1f5fa;
  color: var(--muted);
}

.assistant-citation-disclosure summary {
  padding: 7px 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.assistant-citation-disclosure[open] summary {
  border-bottom: 1px solid var(--line);
}

.assistant-citations {
  padding: 7px;
  display: grid;
  gap: 6px;
  font-size: 11px;
  line-height: 1.5;
}

.assistant-citation-card {
  padding: 8px;
  border: 1px solid #d5dfec;
  border-radius: 5px;
  background: #fff;
}

.assistant-citation-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.assistant-citation-card > div strong {
  min-width: 0;
  color: #163d70;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.assistant-citation-card > div span {
  flex: 0 0 auto;
  color: #8a6100;
  font-size: 8px;
  font-weight: 700;
}

.assistant-citation-card p {
  margin: 5px 0;
  font-size: 11px;
  font-weight: 700;
}

.assistant-citation-card dl,
.assistant-intake-summary dl {
  margin: 0;
  display: grid;
  gap: 3px;
}

.assistant-citation-card dl > div,
.assistant-intake-summary dl > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 6px;
}

.assistant-citation-card dt,
.assistant-intake-summary dt {
  color: var(--muted);
}

.assistant-citation-card dd,
.assistant-intake-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.assistant-citation-card a {
  display: inline-block;
  margin-top: 5px;
  color: var(--blue);
  font-weight: 700;
}

.assistant-refusal,
.assistant-missing-evidence {
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 3px solid var(--amber);
  background: #fff8e8;
  color: #624b10;
  font-size: 10px;
  line-height: 1.45;
}

.assistant-missing-evidence ul {
  margin: 5px 0 0;
  padding-left: 17px;
}

.assistant-message-warnings,
.assistant-governance-notice {
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 3px solid #b42318;
  background: #fff1f0;
  color: #7a271a;
  font-size: 10px;
  line-height: 1.45;
}

.assistant-message-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.assistant-message-warnings strong {
  flex-basis: 100%;
}

.assistant-governance-notice {
  display: grid;
  gap: 3px;
  width: 100%;
}

.assistant-governance-notice small {
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-message-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assistant-intake-summary {
  max-height: 240px;
  overflow-y: auto;
  padding: 10px 12px;
  border-top: 1px solid #b9d2f4;
  border-bottom: 1px solid #b9d2f4;
  background: #f2f7ff;
  font-size: 10px;
}

.assistant-intake-summary > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.assistant-intake-summary > header > div {
  display: grid;
  gap: 5px;
}

.assistant-intake-summary > p {
  margin: 7px 0;
  color: #163d70;
  font-size: 11px;
  font-weight: 700;
}

.assistant-intake-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #526579;
  font-size: 20px;
}

.assistant-intake-financial {
  margin: 8px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.assistant-intake-financial span {
  padding: 5px;
  border: 1px solid #cfdaea;
  border-radius: 4px;
  background: #fff;
  color: #53687d;
  font-size: 9px;
  text-align: center;
}

.assistant-agent-run {
  max-height: none;
  overflow: visible;
  padding: 11px 12px;
  border-top: 1px solid #b8cce8;
  border-bottom: 1px solid #b8cce8;
  background: #f7f9fc;
  font-size: 10px;
}

.assistant-agent-run > header,
.assistant-agent-run > header > div,
.assistant-agent-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-agent-run > header > div {
  justify-content: flex-start;
}

.assistant-agent-run-name {
  margin: 8px 0 4px;
  color: #153d70;
  font-size: 12px;
  font-weight: 700;
}

.assistant-agent-blockers {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  margin: 7px 0;
  padding: 7px 8px;
  border-left: 3px solid #c88100;
  background: #fff8e7;
  color: #624b10;
  line-height: 1.4;
}

.assistant-agent-blockers span {
  overflow-wrap: anywhere;
}

.assistant-agent-run-details {
  max-height: 270px;
  margin-top: 9px;
  padding-top: 9px;
  overflow-y: auto;
  border-top: 1px solid #cfdaea;
}

.assistant-agent-authority-status {
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.assistant-agent-authority-status strong {
  color: #314861;
}

.assistant-agent-run-id {
  margin: 0 0 9px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px;
  color: var(--muted);
}

.assistant-agent-run-id code {
  overflow-wrap: anywhere;
  color: #314861;
}

.assistant-review-bridge {
  margin: 0 16px 12px;
  padding: 14px;
  border: 1px solid #d8e2eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #273548;
}

.assistant-review-bridge > header,
.assistant-review-routes > div,
.assistant-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assistant-review-bridge > p,
.assistant-review-bridge > small {
  display: block;
  margin: 8px 0;
  color: #5d6b7d;
  line-height: 1.5;
}

.assistant-review-routes {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.assistant-review-routes > div span {
  color: #5d6b7d;
  text-align: right;
}

.assistant-review-bridge label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.assistant-review-bridge textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
}

.assistant-review-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

.assistant-agent-progress progress {
  width: 100%;
  height: 6px;
  margin-top: 5px;
  accent-color: #087f5b;
}

.assistant-agent-timeline {
  margin: 10px 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.assistant-agent-timeline li {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.assistant-agent-timeline .assistant-agent-layer {
  display: block;
  margin: 10px 0 4px;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.assistant-agent-timeline .assistant-agent-layer > span {
  display: inline;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
}

.assistant-agent-permissions {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.assistant-agent-permissions > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.assistant-agent-permissions small {
  color: var(--muted);
  line-height: 1.45;
}

.assistant-agent-timeline li > span {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border: 2px solid #a8b4c3;
  border-radius: 50%;
  background: #fff;
}

.assistant-agent-timeline li.completed > span {
  border-color: #087f5b;
  background: #087f5b;
}

.assistant-agent-timeline li.pending_human > span,
.assistant-agent-timeline li.current > span {
  border-color: #c88100;
  background: #fff3c4;
}

.assistant-agent-timeline strong,
.assistant-agent-timeline small {
  display: block;
  overflow-wrap: anywhere;
}

.assistant-agent-timeline strong {
  color: #25384d;
  font-size: 9px;
}

.assistant-agent-timeline small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
}

.assistant-agent-analysis-blocked {
  padding: 7px 8px;
  border-left: 3px solid #c88100;
  background: #fff8e7;
  color: #624b10;
}

.assistant-agent-analysis-blocked strong,
.assistant-agent-analysis-blocked span {
  display: block;
  line-height: 1.4;
}

.assistant-agent-analysis-blocked span {
  margin-top: 3px;
  font-size: 9px;
}

.assistant-agent-analysis-blocked code {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #765b16;
  font-size: 8px;
}

.assistant-agent-analysis-ready {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #9bc8b8;
  background: #f2fbf7;
}

.assistant-agent-trace-only {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #d6bd78;
  background: #fffaf0;
}

.assistant-agent-trace-only > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-agent-trace-only > p,
.assistant-agent-trace-boundary span {
  margin: 0;
  color: #65521e;
  font-size: 9px;
  line-height: 1.45;
}

.assistant-agent-trace-boundary {
  display: grid;
  gap: 3px;
  padding-left: 7px;
  border-left: 2px solid #c88100;
}

.assistant-agent-metrics-summary article {
  border-color: #dfcfaa;
}

.assistant-agent-analysis-ready > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-agent-analysis-proof,
.assistant-agent-missing {
  display: grid;
  gap: 4px;
  color: #405a52;
}

.assistant-agent-analysis-proof span {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 5px;
}

.assistant-agent-analysis-proof code,
.assistant-agent-missing span {
  overflow-wrap: anywhere;
}

.assistant-agent-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.assistant-agent-metrics article {
  min-width: 0;
  padding: 7px;
  border: 1px solid #c8ded6;
  background: #fff;
}

.assistant-agent-metrics span,
.assistant-agent-metrics strong,
.assistant-agent-metrics small,
.assistant-agent-metrics code {
  display: block;
  overflow-wrap: anywhere;
}

.assistant-agent-metrics strong {
  margin: 3px 0;
  color: #075a43;
  font-size: 11px;
}

.assistant-agent-metrics small,
.assistant-agent-metrics code,
.assistant-agent-analysis-ready > small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.assistant-agent-analysis-actions {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #cad7e5;
  background: #fff;
}

.assistant-agent-analysis-actions label,
.assistant-agent-analysis-actions label span {
  display: grid;
  gap: 4px;
}

.assistant-agent-analysis-actions textarea {
  min-height: 58px;
  resize: vertical;
  font-size: 10px;
}

.assistant-agent-analysis-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assistant-agent-analysis-actions > small {
  color: var(--muted);
  line-height: 1.45;
}

.assistant-suggestions {
  padding: 10px 12px 0;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.assistant-suggestions::-webkit-scrollbar {
  display: none;
}

.assistant-suggestions button {
  min-width: max-content;
  min-height: 32px;
  padding: 6px 9px;
  text-align: left;
  font-size: 11px;
}

.assistant-boundary {
  border-top: 1px solid var(--line);
  background: #fff;
}

.assistant-boundary summary {
  padding: 8px 14px;
  color: #526579;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.assistant-boundary[open] {
  max-height: 210px;
  overflow-y: auto;
  background: #fbfcfe;
}

.assistant-boundaries {
  padding: 0 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

.assistant-boundaries > div {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.assistant-boundaries strong,
.assistant-boundaries span {
  display: block;
}

.assistant-boundaries strong {
  font-size: 11px;
}

.assistant-boundaries span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.assistant-privacy-note {
  margin: 4px 14px 12px;
  padding: 8px 9px;
  border-left: 3px solid var(--amber);
  background: #fff9ed;
}

.assistant-form {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.assistant-question-field {
  grid-column: 1 / -1;
}

.assistant-form textarea {
  width: 100%;
  min-height: 68px;
  max-height: 148px;
  resize: vertical;
  border: 1px solid #b9c9dc;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.assistant-form textarea:focus {
  border-color: #0a6cff;
  outline: 3px solid rgba(10, 108, 255, 0.16);
  outline-offset: 1px;
}

.assistant-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.assistant-form-actions button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.assistant-form .form-error {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
  font-size: 11px;
}

@media (max-width: 820px) {
  .assistant-launcher {
    right: 16px;
    bottom: 76px;
  }

  .assistant-panel {
    inset: 8px 8px 68px;
    z-index: 1010;
    width: auto;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .assistant-launcher {
    width: 56px;
    height: 56px;
  }

  .assistant-panel {
    inset: 0 0 60px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .assistant-panel-header {
    min-height: 66px;
    padding: 10px 9px 10px 12px;
  }

  .assistant-product .assistant-product-mark {
    width: 38px;
    height: 38px;
  }

  .assistant-product p {
    max-width: 48vw;
  }

  .assistant-messages {
    padding: 12px;
  }

  .assistant-message {
    width: 94%;
  }

  .assistant-context {
    padding: 8px;
  }

  .assistant-case-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .assistant-intake-summary {
    max-height: 200px;
    padding: 9px;
  }

  .assistant-agent-run {
    padding: 9px;
  }

  .assistant-agent-run-details {
    max-height: 210px;
  }

  .assistant-agent-timeline {
    grid-template-columns: 1fr;
  }

  .assistant-agent-metrics {
    grid-template-columns: 1fr;
  }

  .assistant-citation-card dl > div,
  .assistant-intake-summary dl > div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .assistant-boundaries {
    grid-template-columns: 1fr;
  }

  .assistant-form {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-launcher:hover {
    transform: none;
  }
}

/* V1.5 ZWATT-SIM real-time projection and 15-minute settlement */
.zwatt-sim-boundary span:first-child {
  color: var(--green);
}

.zwatt-sim-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.zwatt-sim-current {
  margin-top: 2px;
  border: 1px solid var(--line);
  background: #fff;
}

.zwatt-sim-current .zga-sim-register-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.zwatt-sim-current .zga-sim-register-head > div:first-child span {
  overflow-wrap: anywhere;
}

.zwatt-sim-countdown {
  min-width: 120px;
  display: grid;
  justify-items: end;
  gap: 3px;
}

.zwatt-sim-countdown span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.zwatt-sim-countdown strong {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.zwatt-sim-projects {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.zwatt-sim-project {
  min-width: 0;
  border: 1px solid #dce4e2;
  border-left: 3px solid var(--green);
  border-radius: 4px;
  background: #fff;
}

.zwatt-sim-project > header {
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.zwatt-sim-project > header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.zwatt-sim-project > header div span {
  color: var(--muted);
  font-size: 9px;
}

.zwatt-sim-project > header strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.zwatt-sim-flow {
  min-width: 0;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.zwatt-sim-flow div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.zwatt-sim-flow span {
  color: var(--muted);
  font-size: 9px;
}

.zwatt-sim-flow strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.zwatt-sim-flow i {
  color: var(--muted);
  font-style: normal;
}

.zwatt-sim-project dl {
  min-width: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.zwatt-sim-project dl div {
  min-width: 0;
  padding: 9px 14px;
  border-right: 1px solid var(--line);
}

.zwatt-sim-project dl div:last-child {
  border-right: 0;
}

.zwatt-sim-project dt {
  color: var(--muted);
  font-size: 8px;
}

.zwatt-sim-project dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.zwatt-sim-policy {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.zwatt-sim-policy div {
  min-width: 0;
  min-height: 64px;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 5px;
}

.zwatt-sim-policy div:last-child {
  border-right: 0;
}

.zwatt-sim-policy span {
  color: var(--muted);
  font-size: 9px;
}

.zwatt-sim-policy strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.zwatt-sim-window-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zwatt-sim-window-values div {
  min-width: 0;
  padding: 3px 8px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.zwatt-sim-window-values div:first-child {
  padding-left: 0;
}

.zwatt-sim-window-values div:last-child {
  padding-right: 0;
  border-right: 0;
}

.zwatt-sim-window-values span {
  color: var(--muted);
  font-size: 8px;
}

.zwatt-sim-window-values strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .zwatt-sim-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .zwatt-sim-metrics article:nth-child(3) {
    border-right: 0;
  }

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

  .zwatt-sim-policy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zwatt-sim-policy div:nth-child(2) {
    border-right: 0;
  }

  .zwatt-sim-policy div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .zwatt-sim-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zwatt-sim-metrics article,
  .zwatt-sim-metrics article:nth-child(3),
  .zwatt-sim-metrics article:last-child {
    grid-column: auto;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

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

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

  .zwatt-sim-flow {
    grid-template-columns: 1fr;
  }

  .zwatt-sim-flow i {
    display: none;
  }

  .zwatt-sim-project dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zwatt-sim-project dl div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .zwatt-sim-project dl div:nth-child(2n) {
    border-right: 0;
  }

  .zwatt-sim-project dl div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .zwatt-sim-policy {
    grid-template-columns: 1fr;
  }

  .zwatt-sim-policy div,
  .zwatt-sim-policy div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .zwatt-sim-policy div:last-child {
    border-bottom: 0;
  }
}

/* V1.6 DEV platform-admin station GIS */
.station-gis-shell {
  display: grid;
  gap: 14px;
}

.station-gis-summary {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.station-gis-summary > div {
  min-width: 0;
  min-height: 92px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: center;
  gap: 5px;
}

.station-gis-summary > div:last-child {
  border-right: 0;
}

.station-gis-summary span,
.station-gis-summary small {
  color: var(--muted);
  font-size: 11px;
}

.station-gis-summary strong {
  color: #172033;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.station-gis-summary-joined strong {
  color: #b91c1c;
}

.station-gis-summary-reference strong {
  color: #1d4ed8;
}

.station-gis-toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(120px, 0.32fr) minmax(140px, 0.4fr) minmax(120px, 0.3fr) 42px;
  gap: 10px;
  align-items: end;
}

.station-gis-toolbar label,
.station-gis-status-filter {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 6px;
}

.station-gis-toolbar label > span,
.station-gis-status-filter legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.station-gis-toolbar input,
.station-gis-toolbar select {
  min-height: 38px;
}

.segmented-control {
  min-height: 38px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f6fa;
  display: flex;
}

.segmented-control button {
  min-width: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.segmented-control button.active {
  background: #fff;
  color: #172033;
  box-shadow: 0 1px 3px rgba(23, 32, 51, 0.12);
}

.station-gis-refresh {
  width: 42px;
  height: 38px;
}

.station-gis-message {
  padding: 11px 13px;
  border: 1px solid #d7a3a3;
  background: #fff5f5;
  color: #9f2424;
  font-size: 12px;
}

.station-gis-workspace {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.station-gis-map-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.station-gis-map-head {
  min-height: 46px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.station-gis-map-head > strong {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.station-gis-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.station-gis-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #445166;
  font-size: 11px;
}

.station-gis-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.station-gis-dot.joined {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.station-gis-dot.owned {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.station-gis-dot.not-joined {
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.13);
}

.station-gis-map {
  width: 100%;
  height: 640px;
  min-height: 640px;
  background: #eaf0f6;
}

.station-gis-detail {
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.station-gis-detail-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.station-gis-detail .eyebrow {
  color: var(--blue);
  font-size: 9px;
}

.station-gis-detail h3 {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.35;
}

.station-gis-detail > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.station-gis-detail-list {
  margin: 6px 0 0;
  border-top: 1px solid var(--line);
}

.station-gis-detail-list > div {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
}

.station-gis-detail-list dt {
  color: var(--muted);
  font-size: 10px;
}

.station-gis-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #28364c;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.station-gis-opportunity-actions {
  padding: 13px;
  border: 1px solid #b8d4fa;
  background: #f4f8ff;
  display: grid;
  gap: 8px;
}

.station-gis-opportunity-actions strong,
.station-gis-opportunity-actions p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.station-gis-opportunity-actions strong {
  color: #123f86;
  font-size: 12px;
}

.station-gis-opportunity-actions p {
  color: #50617b;
  font-size: 10px;
  line-height: 1.5;
}

.station-gis-opportunity-actions .primary-action {
  justify-self: start;
}

.station-gis-boundary-stack {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.station-gis-boundary {
  padding: 13px;
  border-left: 3px solid #b7791f;
  background: #fff9eb;
  display: grid;
  gap: 5px;
}

.station-gis-boundary strong {
  color: #875514;
  font-size: 11px;
}

.station-gis-boundary span {
  color: #725c39;
  font-size: 10px;
  line-height: 1.55;
}

.station-gis-boundary.public-layer {
  border-left-color: #0a7a61;
  background: #eefaf6;
}

.station-gis-boundary.public-layer strong {
  color: #075f4c;
}

.station-gis-boundary.public-layer span {
  color: #3b665d;
}

.station-gis-popup {
  display: grid;
  gap: 5px;
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.station-gis-popup strong {
  font-size: 13px;
  line-height: 1.35;
}

.station-gis-popup span {
  color: #5e6b7d;
  font-size: 10px;
  line-height: 1.4;
}

.station-gis-popup-status {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 800;
}

.station-gis-popup-status.joined {
  background: #fee2e2;
  color: #991b1b;
}

.station-gis-popup-status.owned {
  background: #dcfce7;
  color: #166534;
}

.station-gis-popup-status.not-joined {
  background: #dbeafe;
  color: #1d4ed8;
}

.station-gis-map .leaflet-control-zoom a {
  color: #172033;
}

.station-gis-map .leaflet-control-attribution {
  color: #6a7789;
  font-size: 8px;
}

@media (max-width: 1180px) {
  .station-gis-toolbar {
    grid-template-columns: minmax(210px, 1fr) auto minmax(120px, 0.42fr) minmax(140px, 0.5fr) 42px;
  }

  .station-gis-toolbar label:has(#stationGisMinimumCapacity) {
    display: none;
  }

  .station-gis-workspace {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 820px) {
  .station-gis-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .station-gis-summary > div:nth-child(2) {
    border-right: 0;
  }

  .station-gis-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .station-gis-toolbar {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .station-gis-status-filter,
  .station-gis-toolbar label:has(#stationGisEnergyType),
  .station-gis-toolbar label:has(#stationGisGridRegion) {
    grid-column: 1 / -1;
  }

  .station-gis-search {
    grid-column: 1;
  }

  .station-gis-refresh {
    grid-column: 2;
    grid-row: 1;
  }

  .station-gis-workspace {
    grid-template-columns: 1fr;
  }

  .station-gis-map-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .station-gis-map {
    height: 500px;
    min-height: 500px;
  }

  .station-gis-detail {
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .station-gis-summary > div {
    min-height: 82px;
    padding: 13px;
  }

  .station-gis-summary strong {
    font-size: 20px;
  }

  .station-gis-toolbar {
    padding: 10px;
  }

  .segmented-control button {
    flex: 1 1 0;
    padding-inline: 5px;
    white-space: normal;
  }

  .station-gis-map-head {
    align-items: flex-start;
  }

  .station-gis-legend {
    display: grid;
    gap: 6px;
  }

  .station-gis-map {
    height: 460px;
    min-height: 460px;
  }

  .station-gis-detail {
    min-height: 390px;
    padding: 16px;
  }
}

/* Owner-facing AI OS Control Room */
.ai-os-view {
  --ai-os-navy: #0c1d2e;
  --ai-os-blue: #165dce;
  --ai-os-cyan: #2ca8a0;
  --ai-os-mint: #d9f4ed;
  --ai-os-ice: #eef5ff;
  --ai-os-warm: #fff7e8;
  display: none;
  gap: 16px;
}

.ai-os-view.active {
  display: grid;
}

.ai-os-hero {
  min-height: 278px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.85fr);
  overflow: hidden;
  border: 1px solid #17354f;
  border-radius: 10px;
  background:
    radial-gradient(circle at 82% 10%, rgba(56, 169, 194, 0.2), transparent 34%),
    linear-gradient(135deg, #0b1b2b 0%, #102e49 60%, #124c5e 100%);
  color: #fff;
}

.ai-os-hero-copy {
  position: relative;
  padding: 38px 38px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ai-os-hero-copy::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -72px;
  top: -94px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.03),
    0 0 0 68px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.ai-os-hero .eyebrow {
  color: #7ad8d1;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.ai-os-hero h3 {
  max-width: 620px;
  margin: 13px 0 10px;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.ai-os-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: #c4d5e4;
  font-size: 16px;
  line-height: 1.65;
}

.ai-os-hero-status {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-os-hero-status > span {
  min-height: 30px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e5ef;
  font-size: 11px;
  font-weight: 700;
}

.ai-os-operational i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #49d5a5;
  box-shadow: 0 0 0 4px rgba(73, 213, 165, 0.15);
}

.ai-os-operational.limited i {
  background: #efb04b;
  box-shadow: 0 0 0 4px rgba(239, 176, 75, 0.15);
}

.ai-os-owner-metrics {
  margin: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 22, 36, 0.24);
}

.ai-os-owner-metrics > div {
  min-width: 0;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  column-gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-os-owner-metrics > div:last-child {
  border-bottom: 0;
}

.ai-os-owner-metrics dt,
.ai-os-owner-metrics small {
  color: #a7bdce;
  font-size: 11px;
}

.ai-os-owner-metrics dd {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.ai-os-owner-metrics small {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.ai-os-boundary {
  min-height: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d9e3ec;
  border-radius: 8px;
  background: #fff;
}

.ai-os-boundary span {
  min-width: 0;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e2e9ef;
  color: #40566b;
  font-size: 11px;
  font-weight: 720;
  text-align: center;
}

.ai-os-boundary span::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ai-os-cyan);
}

.ai-os-boundary span:last-child {
  border-right: 0;
}

.ai-os-section,
.ai-os-technical {
  min-width: 0;
  border: 1px solid #dfe6ec;
  border-radius: 10px;
  background: #fff;
}

.ai-os-section-head {
  min-height: 84px;
  padding: 19px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e4eaf0;
}

.ai-os-section-head.compact {
  min-height: 72px;
  padding-block: 15px;
}

.ai-os-section-head h3 {
  margin: 3px 0 0;
  color: #172b3d;
  font-size: 18px;
  letter-spacing: -0.012em;
}

.ai-os-section-head p {
  margin: 6px 0 0;
  color: #6c7d8d;
  font-size: 12px;
}

.ai-os-section-head .section-label {
  color: var(--ai-os-blue);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.12em;
}

.ai-os-scenario-tabs {
  padding: 14px 20px 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ai-os-scenario-tabs::-webkit-scrollbar {
  display: none;
}

.ai-os-scenario-tabs button {
  min-height: 36px;
  padding: 7px 12px;
  flex: 0 0 auto;
  border: 1px solid #dbe4ec;
  border-radius: 4px;
  background: #f7f9fb;
  color: #526678;
  font-size: 12px;
  font-weight: 720;
}

.ai-os-scenario-tabs button:hover,
.ai-os-scenario-tabs button:focus-visible {
  border-color: #9fbce8;
  background: #f0f5fd;
  color: #154f9f;
}

.ai-os-scenario-tabs button.active {
  border-color: var(--ai-os-blue);
  background: var(--ai-os-blue);
  color: #fff;
}

.ai-os-decision-grid {
  padding: 14px 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(210px, 0.72fr) minmax(0, 1fr);
  gap: 10px;
}

.ai-os-decision-grid article {
  min-width: 0;
  min-height: 210px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  background: #f9fbfc;
}

.ai-os-signal-card {
  border-color: #c8d9ef !important;
  background: var(--ai-os-ice) !important;
}

.ai-os-impact-card {
  background: #f4faf8 !important;
}

.ai-os-action-card {
  border-color: #ead8b8 !important;
  background: var(--ai-os-warm) !important;
}

.ai-os-card-label {
  margin-bottom: 13px;
  color: #637688;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ai-os-decision-grid h4,
.ai-os-decision-grid article > strong {
  margin: 0;
  color: #142b3e;
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.ai-os-decision-grid article > p {
  margin: 10px 0 0;
  color: #526779;
  font-size: 13px;
  line-height: 1.65;
}

.ai-os-evidence-row {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 10px;
}

.ai-os-evidence-row > span {
  min-width: 0;
  padding-top: 10px;
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(22, 93, 206, 0.16);
}

.ai-os-evidence-row small {
  color: #708399;
  font-size: 10px;
}

.ai-os-evidence-row strong {
  overflow: hidden;
  color: #1a4168;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-os-impact-card > strong {
  color: #166a57 !important;
  font-size: 28px !important;
  font-variant-numeric: tabular-nums;
}

.ai-os-action-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-os-flow {
  margin: 0;
  padding: 24px 22px 25px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
}

.ai-os-flow li {
  position: relative;
  min-width: 0;
  padding: 0 22px 0 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.ai-os-flow li > i {
  position: absolute;
  right: 7px;
  top: 16px;
  width: 22px;
  height: 1px;
  background: #b9c9d8;
}

.ai-os-flow li > i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid #b9c9d8;
  border-right: 1px solid #b9c9d8;
  transform: rotate(45deg);
}

.ai-os-flow-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #b9d0e9;
  border-radius: 50%;
  background: #f0f6fd;
  color: #1758ad;
  font-size: 10px;
  font-weight: 820;
}

.ai-os-flow li:nth-child(4) .ai-os-flow-index {
  border-color: #e6c98f;
  background: #fff7e8;
  color: #936013;
}

.ai-os-flow li:nth-child(5) .ai-os-flow-index {
  border-color: #9fd8c8;
  background: #edf9f5;
  color: #14705b;
}

.ai-os-flow li div {
  min-width: 0;
  display: grid;
  align-content: start;
}

.ai-os-flow small {
  color: #7c8e9e;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.ai-os-flow strong {
  margin-top: 6px;
  color: #21384b;
  font-size: 12px;
}

.ai-os-flow p {
  margin: 5px 0 0;
  color: #748595;
  font-size: 10px;
  line-height: 1.5;
}

.ai-os-lower-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.ai-os-gate-list {
  margin: 0;
  padding: 4px 20px 12px;
  list-style: none;
}

.ai-os-gate-list li {
  min-height: 66px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e7edf2;
}

.ai-os-gate-list li:last-child {
  border-bottom: 0;
}

.ai-os-gate-list > li > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.ai-os-gate-list i.pass {
  background: #27a97e;
  box-shadow: 0 0 0 4px rgba(39, 169, 126, 0.1);
}

.ai-os-gate-list i.hold {
  background: #e2a02c;
  box-shadow: 0 0 0 4px rgba(226, 160, 44, 0.1);
}

.ai-os-gate-list i.closed {
  background: #7d8c9a;
  box-shadow: 0 0 0 4px rgba(125, 140, 154, 0.1);
}

.ai-os-gate-list span {
  display: grid;
  gap: 4px;
}

.ai-os-gate-list strong {
  color: #263b4c;
  font-size: 12px;
}

.ai-os-gate-list small {
  color: #788998;
  font-size: 10px;
}

.ai-os-gate-list em {
  color: #617486;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.ai-os-shortcut-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ai-os-shortcut-grid button {
  min-height: 104px;
  padding: 14px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-content: center;
  column-gap: 10px;
  border: 1px solid #e0e7ed;
  border-radius: 7px;
  background: #f9fbfc;
  color: #263d50;
  text-align: left;
}

.ai-os-shortcut-grid button:hover,
.ai-os-shortcut-grid button:focus-visible {
  border-color: #a9c5eb;
  background: #f1f6fd;
}

.ai-os-shortcut-grid button > span {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f1fc;
  color: #1c5cae;
  font-size: 9px;
  font-weight: 820;
}

.ai-os-shortcut-grid strong {
  font-size: 12px;
}

.ai-os-shortcut-grid small {
  margin-top: 4px;
  color: #748696;
  font-size: 10px;
  line-height: 1.4;
}

.ai-os-technical {
  overflow: hidden;
}

.ai-os-technical summary {
  min-height: 64px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.ai-os-technical summary::-webkit-details-marker {
  display: none;
}

.ai-os-technical summary > span {
  display: grid;
  gap: 3px;
}

.ai-os-technical summary strong {
  color: #31475a;
  font-size: 12px;
}

.ai-os-technical summary small {
  color: #7d8d9b;
  font-size: 10px;
}

.ai-os-technical summary > i {
  width: 9px;
  height: 9px;
  border-right: 2px solid #768897;
  border-bottom: 2px solid #768897;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.ai-os-technical[open] summary > i {
  transform: rotate(225deg);
}

.ai-os-technical-grid {
  padding: 0 14px 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #e5ebf0;
}

.ai-os-technical-grid article {
  min-width: 0;
  padding: 16px 14px;
  display: grid;
  align-content: start;
  gap: 6px;
  border-right: 1px solid #e4eaf0;
}

.ai-os-technical-grid article:last-child {
  border-right: 0;
}

.ai-os-technical-grid span {
  color: #1d63bd;
  font-size: 9px;
  font-weight: 820;
}

.ai-os-technical-grid strong {
  overflow: hidden;
  color: #283f51;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-os-technical-grid small {
  color: #7b8b99;
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .ai-os-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.9fr);
  }

  .ai-os-decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-os-action-card {
    grid-column: 1 / -1;
    min-height: 180px !important;
  }

  .ai-os-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 22px;
  }

  .ai-os-flow li:nth-child(3) > i {
    display: none;
  }

  .ai-os-technical-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-os-technical-grid article:nth-child(3) {
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .ai-os-hero {
    grid-template-columns: 1fr;
  }

  .ai-os-owner-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .ai-os-owner-metrics > div {
    grid-template-columns: 1fr;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 0;
  }

  .ai-os-owner-metrics dd {
    grid-column: 1;
    grid-row: auto;
    margin: 7px 0;
  }

  .ai-os-boundary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-os-boundary span:nth-child(2) {
    border-right: 0;
  }

  .ai-os-boundary span:nth-child(-n + 2) {
    border-bottom: 1px solid #e2e9ef;
  }

  .ai-os-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .ai-os-hero-copy {
    padding: 28px 22px 24px;
  }

  .ai-os-hero h3 {
    font-size: 29px;
  }

  .ai-os-owner-metrics {
    grid-template-columns: 1fr;
  }

  .ai-os-owner-metrics > div {
    padding: 15px 22px;
    grid-template-columns: minmax(0, 1fr) auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .ai-os-owner-metrics dd {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .ai-os-section-head {
    min-height: 0;
    padding: 17px;
    align-items: flex-start;
  }

  .ai-os-decision-grid {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .ai-os-decision-grid article,
  .ai-os-action-card {
    min-height: 190px !important;
    grid-column: auto;
  }

  .ai-os-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ai-os-flow li {
    min-height: 88px;
    padding: 0 0 20px;
  }

  .ai-os-flow li > i {
    left: 16px;
    right: auto;
    top: 38px;
    width: 1px;
    height: 42px;
  }

  .ai-os-flow li > i::after {
    right: -3px;
    top: auto;
    bottom: 0;
    transform: rotate(135deg);
  }

  .ai-os-flow li:nth-child(3) > i {
    display: block;
  }

  .ai-os-technical-grid {
    grid-template-columns: 1fr;
  }

  .ai-os-technical-grid article,
  .ai-os-technical-grid article:nth-child(3) {
    border-right: 0;
    border-bottom: 1px solid #e4eaf0;
  }
}

@media (max-width: 480px) {
  .ai-os-boundary,
  .ai-os-shortcut-grid {
    grid-template-columns: 1fr;
  }

  .ai-os-boundary span,
  .ai-os-boundary span:nth-child(2) {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #e2e9ef;
  }

  .ai-os-boundary span:last-child {
    border-bottom: 0;
  }

  .ai-os-action-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-os-action-footer button {
    width: 100%;
  }
}

.owner-investment-shell {
  display: grid;
  gap: 18px;
  color: #142a3d;
}

.owner-investment-hero {
  min-height: 138px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #cfdde8;
  border-left: 4px solid #0c6d61;
  border-radius: 6px;
  background: #f7fbfa;
}

.owner-investment-hero h3 {
  margin: 5px 0 8px;
  font-size: 25px;
  letter-spacing: 0;
}

.owner-investment-hero p { max-width: 760px; color: #4f6678; }
.owner-investment-hero-actions { display: flex; align-items: center; gap: 10px; }

.owner-investment-boundary {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border-left: 3px solid #147b6f;
  background: #eef8f5;
  color: #315d59;
  font-size: 12px;
}

.owner-investment-progress {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(88px, 1fr));
  gap: 0;
  overflow-x: auto;
  list-style: none;
  border-top: 1px solid #d9e3eb;
  border-bottom: 1px solid #d9e3eb;
}

.owner-investment-progress li {
  min-height: 82px;
  padding: 13px 10px;
  display: grid;
  align-content: center;
  gap: 7px;
  border-right: 1px solid #e4ebf0;
  color: #708294;
  font-size: 10px;
}

.owner-investment-progress li:last-child { border-right: 0; }
.owner-investment-progress li span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #9fb0bf;
  border-radius: 50%;
  font-weight: 800;
}
.owner-investment-progress li.completed { color: #176b5e; background: #f3faf8; }
.owner-investment-progress li.completed span { border-color: #176b5e; background: #176b5e; color: #fff; }
.owner-investment-progress li.current { color: #0b479b; background: #f2f7fd; }
.owner-investment-progress li.current span { border-color: #0b479b; color: #0b479b; }

.owner-investment-asset-band {
  padding: 19px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px) auto;
  gap: 20px;
  align-items: end;
  border: 1px solid #d8e3eb;
  border-radius: 6px;
  background: #fff;
}

.owner-investment-asset-band h4 { margin: 5px 0; font-size: 18px; letter-spacing: 0; }
.owner-investment-asset-band p { color: #667b8d; }
.owner-investment-station-select { margin: 0; }
.owner-investment-asset-actions { display: flex; justify-content: flex-end; }

.owner-investment-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.owner-investment-grid > section,
.owner-investment-scenarios {
  padding: 21px;
  border: 1px solid #d8e3eb;
  border-radius: 6px;
  background: #fff;
}

.owner-investment-goal-options {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.owner-investment-goal-options label {
  min-height: 46px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #d8e3eb;
  border-radius: 4px;
  background: #f8fafc;
  color: #294358;
  font-size: 11px;
  font-weight: 720;
}

.owner-investment-goal-options input { width: 17px; height: 17px; accent-color: #0b6d61; }
.owner-investment-plan-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.owner-investment-plan-actions button { min-width: 164px; }
.owner-investment-completeness { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.owner-investment-completeness .summary-item { min-height: 72px; }

.owner-investment-gaps { margin-top: 14px; display: grid; gap: 8px; }
.owner-investment-gaps > div { display: flex; flex-wrap: wrap; gap: 6px; }
.owner-investment-gaps code {
  padding: 5px 7px;
  border: 1px solid #ead6aa;
  border-radius: 3px;
  background: #fffaf0;
  color: #755516;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.owner-investment-evidence-panel {
  margin-top: 18px;
  padding-top: 18px;
  display: grid;
  gap: 14px;
  border-top: 1px solid #d8e3eb;
}
.owner-investment-evidence-panel h5 { margin: 0 0 4px; font-size: 13px; }
.owner-investment-evidence-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.owner-investment-evidence-form .span-field,
.owner-investment-evidence-form button { grid-column: 1 / -1; }
.owner-investment-evidence-form button { width: 100%; }
.owner-investment-evidence-boundary { color: #745b22; font-size: 9px; }
.owner-investment-evidence-list { display: grid; border-top: 1px solid #e5ebf0; }
.owner-investment-evidence-list article {
  min-width: 0;
  padding: 10px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  border-bottom: 1px solid #e5ebf0;
}
.owner-investment-evidence-list article > div { min-width: 0; display: grid; gap: 3px; }
.owner-investment-evidence-list article span { color: #667b8d; font-size: 9px; overflow-wrap: anywhere; }
.owner-investment-evidence-list article code { grid-column: 1 / -1; color: #65798a; font-size: 9px; overflow-wrap: anywhere; }
.owner-investment-evidence-empty { padding: 10px 0; display: grid; gap: 7px; }
.owner-investment-evidence-empty .status { justify-self: start; }
.owner-investment-evidence-empty p { color: #667b8d; font-size: 10px; }

.owner-investment-scenario-list {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}
.owner-investment-scenario-list article {
  min-height: 66px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 130px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e5ebf0;
}
.owner-investment-scenario-list article:last-child { border-bottom: 0; }
.owner-investment-scenario-list article > div { min-width: 0; display: grid; gap: 4px; }
.owner-investment-scenario-list article span { color: #708294; font-size: 9px; }
.owner-investment-scenario-list article code { overflow-wrap: anywhere; color: #5d7182; font-size: 9px; text-align: right; }

.owner-investment-financial { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e5ebf0; }
.owner-investment-financial > p { margin-top: 10px; color: #7b612b; font-size: 10px; }
.owner-investment-financial-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.owner-investment-financial-summary article {
  min-height: 72px;
  padding: 11px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #e9d8ad;
  border-radius: 4px;
  background: #fffaf0;
}
.owner-investment-financial-summary span { color: #806626; font-size: 9px; }
.owner-investment-financial-summary strong { color: #6b4f11; font-size: 11px; }

.owner-investment-output-grid { align-items: start; }
.owner-investment-output { margin-top: 16px; display: grid; gap: 9px; }
.owner-investment-reference {
  min-width: 0;
  padding: 11px 0;
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(0, 1.4fr) 110px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #e5ebf0;
  font-size: 10px;
}
.owner-investment-reference span { color: #718395; }
.owner-investment-reference strong,
.owner-investment-reference code { overflow-wrap: anywhere; }
.owner-investment-reference code { color: #65798a; font-size: 9px; text-align: right; }
.owner-investment-output-state { padding: 12px 0; display: grid; gap: 7px; }
.owner-investment-output-state .status { justify-self: start; }
.owner-investment-output-state p { color: #667b8d; font-size: 10px; }
.owner-investment-authorization-note { margin: 8px 0 14px; padding: 12px 14px; display: grid; gap: 4px; border-left: 3px solid #0b479b; background: #f2f7fd; color: #3f607d; font-size: 10px; }
.owner-investment-advisor-field { margin-top: 12px; }
.owner-investment-grants { display: grid; border-top: 1px solid #e5ebf0; }
.owner-investment-grants article {
  min-width: 0;
  padding: 11px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid #e5ebf0;
}
.owner-investment-grants article > div { min-width: 0; display: grid; gap: 3px; }
.owner-investment-grants article strong,
.owner-investment-grants article span { overflow-wrap: anywhere; }
.owner-investment-grants article span { color: #667b8d; font-size: 9px; }
.owner-investment-grants .secondary-action { min-height: 34px; padding: 7px 10px; }
.owner-investment-output-grid .primary-action { width: 100%; margin-top: 12px; }

.owner-investment-trace { border-top: 1px solid #d8e3eb; border-bottom: 1px solid #d8e3eb; }
.owner-investment-trace summary { padding: 14px 3px; cursor: pointer; color: #31546d; font-size: 11px; font-weight: 760; }
.owner-investment-trace > div { padding: 0 3px 14px; display: grid; gap: 2px; }

@media (max-width: 1100px) {
  .owner-investment-progress { grid-template-columns: repeat(8, minmax(104px, 1fr)); }
  .owner-investment-asset-band { grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); }
  .owner-investment-asset-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .owner-investment-hero { min-height: auto; padding: 20px; align-items: flex-start; flex-direction: column; }
  .owner-investment-hero h3 { font-size: 21px; }
  .owner-investment-boundary { grid-template-columns: 1fr; gap: 5px; }
  .owner-investment-asset-band,
  .owner-investment-grid { grid-template-columns: 1fr; }
  .owner-investment-asset-actions { grid-column: auto; }
  .owner-investment-goal-options { grid-template-columns: 1fr; }
  .owner-investment-evidence-form { grid-template-columns: 1fr; }
  .owner-investment-evidence-form .span-field,
  .owner-investment-evidence-form button { grid-column: auto; }
  .owner-investment-plan-actions,
  .owner-investment-plan-actions button { width: 100%; }
  .owner-investment-financial-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-investment-scenario-list article { grid-template-columns: minmax(0, 1fr) auto; }
  .owner-investment-scenario-list article code { grid-column: 1 / -1; text-align: left; }
  .owner-investment-grants article { grid-template-columns: minmax(0, 1fr) auto; }
  .owner-investment-grants article button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 420px) {
  .owner-investment-shell { gap: 13px; }
  .owner-investment-hero,
  .owner-investment-asset-band,
  .owner-investment-grid > section,
  .owner-investment-scenarios { padding: 16px; }
  .owner-investment-completeness,
  .owner-investment-financial-summary { grid-template-columns: 1fr; }
  .owner-investment-reference { grid-template-columns: 1fr; gap: 3px; }
  .owner-investment-reference code { text-align: left; }
}

/* Asset Intelligence fixture workspace */
.institution-application-layout {
  width: min(1160px, calc(100% - 32px));
  min-height: min(760px, calc(100vh - 40px));
  margin: 20px auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  border: 1px solid #cfdae5;
  background: #fff;
  box-shadow: 0 18px 48px rgb(26 55 84 / 12%);
  box-sizing: border-box;
}

.institution-application-layout * { box-sizing: border-box; }

.institution-application-context {
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  align-content: center;
  gap: 18px;
  color: #17354e;
  background: #edf7f5;
  border-right: 1px solid #cbdedb;
}

.institution-application-context h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.institution-application-context p { margin: 0; color: #526a7a; line-height: 1.7; }
.institution-application-form { padding: clamp(24px, 4vw, 48px); align-self: center; }
.institution-application-context .brand-row > div { min-width: 0; display: grid; gap: 2px; }
.institution-application-context .brand-row strong,
.institution-application-context .brand-row span { display: block; overflow-wrap: anywhere; }
.institution-application-form { min-width: 0; }
.institution-form-grid,
.deal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.institution-form-grid .full,
.deal-form-grid .full { grid-column: 1 / -1; }
.deal-declaration { display: flex; gap: 10px; align-items: flex-start; color: #405c72; font-size: 12px; line-height: 1.55; }
.deal-declaration input { flex: 0 0 auto; margin-top: 3px; }
.deal-declaration span { min-width: 0; overflow-wrap: anywhere; }
.deal-boundary-list { display: grid; gap: 8px; }
.deal-boundary-list span { padding-left: 14px; border-left: 2px solid #148177; color: #315b5b; font-size: 12px; }

.deal-hero-panel,
.deal-workspace-shell { min-height: 480px; }
.deal-target-summary {
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  border-top: 1px solid #e0e8ee;
  background: #f2f8f7;
  color: #4d6878;
  font-size: 10px;
  line-height: 1.5;
}

.deal-target-summary strong { color: #126d66; font-size: 12px; }
.deal-target-summary span:last-child { flex: 1 1 420px; }
.deal-filter-bar {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid #e0e8ee;
  border-bottom: 1px solid #e0e8ee;
  background: #f7fafc;
}

.deal-filter-bar label,
.deal-decision-box label,
.deal-decision-reason,
.deal-grant label { display: grid; gap: 6px; color: #5c7082; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.deal-filter-bar input,
.deal-filter-bar select { width: 100%; }
.deal-opportunity-grid { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.deal-opportunity-card {
  min-width: 0;
  min-height: 292px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #d5e0e8;
  border-radius: 6px;
  background: #fff;
}

.deal-opportunity-card h4 { margin: 0; color: #162c42; font-size: 17px; }
.deal-opportunity-card p { margin: 0; color: #5c7182; font-size: 11px; line-height: 1.6; }
.deal-opportunity-card > button { margin-top: auto; align-self: flex-start; }
.deal-row-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.deal-row-heading > :first-child { min-width: 0; overflow-wrap: anywhere; }
.deal-energy-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #9fc7c2;
  background: #eff8f6;
  color: #08746b;
  font-size: 10px;
  font-weight: 850;
}

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

.deal-fact-grid div,
.deal-detail-list div { min-width: 0; display: grid; gap: 2px; }
.deal-fact-grid dt,
.deal-detail-list dt { color: #758697; font-size: 9px; text-transform: uppercase; }
.deal-fact-grid dd,
.deal-detail-list dd { margin: 0; color: #203a52; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.deal-fact-grid.compact { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.deal-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.deal-tag-list span { padding: 4px 7px; border: 1px solid #d4e1e7; background: #f8fbfc; color: #496476; font-size: 9px; }

.deal-two-column { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 16px; }
.deal-two-column > .panel { min-width: 0; }
.deal-request-row,
.deal-admin-row { padding: 16px 18px; display: grid; gap: 10px; border-bottom: 1px solid #e3e9ee; }
.deal-request-row:last-child,
.deal-admin-row:last-child { border-bottom: 0; }
.deal-request-row p,
.deal-admin-row p { margin: 0; color: #536c7f; font-size: 11px; line-height: 1.55; }
.deal-admin-row { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr); }
.deal-admin-main { min-width: 0; display: grid; gap: 7px; }
.deal-decision-box { min-width: 0; display: grid; gap: 10px; }
.deal-decision-box textarea,
.deal-decision-reason textarea,
.deal-grant textarea { min-height: 72px; resize: vertical; }
.deal-inline-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.compact-action { min-height: 34px; padding: 7px 10px; }
.secondary-action.danger { border-color: #d8a5aa; color: #8c2f37; }
.deal-review-note { padding: 8px 10px; border-left: 2px solid #b7801c; background: #fff9ed; color: #684e20 !important; }

.ecosystem-evaluation-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.ecosystem-evaluation-panel > .deal-form-grid {
  padding: 18px;
  border-top: 1px solid #dfe7ec;
  background: #f8fbfc;
}

.ecosystem-permission-request {
  min-width: 0;
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  border: 1px solid #d8e3e9;
}

.ecosystem-permission-request legend {
  padding: 0 6px;
  color: #516b7d;
  font-size: 10px;
  font-weight: 780;
}

.ecosystem-permission-request label {
  min-width: 0;
  min-height: 52px;
  padding: 10px 11px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #dce5ea;
  background: #fff;
  color: #38566a;
  font-size: 11px;
  line-height: 1.45;
}

.ecosystem-permission-request input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 1px;
  padding: 0;
}
.ecosystem-permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ecosystem-permission-card { min-width: 0; padding: 11px; display: grid; align-content: start; gap: 8px; border: 1px solid #dce5ea; background: #fbfcfd; }
.ecosystem-permission-card strong { color: #26465c; font-size: 10px; }
.ecosystem-permission-card input { width: 100%; min-width: 0; }

.deal-selector { padding: 12px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-bottom: 1px solid #dce5eb; background: #f7fafc; }
.deal-selector-item {
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #d4dfe7;
  border-radius: 4px;
  background: #fff;
  color: #27445c;
  text-align: left;
}

.deal-selector-item:hover,
.deal-selector-item:focus-visible { border-color: #148177; }
.deal-selector-item.active { border-color: #148177; box-shadow: inset 3px 0 #148177; }
.deal-selector-item > span { min-width: 0; display: grid; gap: 4px; }
.deal-selector-item > span:last-child { justify-items: end; text-align: right; }
.deal-selector-item strong,
.deal-selector-item small { overflow-wrap: anywhere; }
.deal-selector-item small { color: #738596; font-size: 8px; }
.deal-selector-item .deal-sample-report-marker { color: #0b766e; font-weight: 800; }
.deal-detail { min-width: 0; }
.deal-detail-head { padding: 22px 24px; display: flex; justify-content: space-between; gap: 24px; background: #fff; }
.deal-detail-head h3 { margin: 4px 0 6px; color: #162c42; font-size: 20px; }
.deal-detail-head p { max-width: 760px; margin: 0; color: #607485; font-size: 11px; line-height: 1.6; }
.deal-boundary-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 5px; }
.deal-boundary-badges span { padding: 5px 7px; border: 1px solid #d6a761; color: #76511a; background: #fff9ef; font-size: 8px; font-weight: 800; }

.deal-stage-track {
  margin: 0;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  list-style: none;
  border-top: 1px solid #e0e7ec;
  border-bottom: 1px solid #e0e7ec;
  background: #f8fafb;
}

.deal-stage-track li { min-width: 0; position: relative; display: grid; justify-items: center; gap: 5px; text-align: center; color: #7d8b97; }
.deal-stage-track li:not(:last-child)::after { content: ""; position: absolute; top: 11px; left: calc(50% + 13px); right: calc(-50% + 13px); height: 1px; background: #cdd8df; }
.deal-stage-track li.complete::after { background: #148177; }
.deal-stage-track span { position: relative; z-index: 1; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #c4d1da; border-radius: 50%; background: #fff; font-size: 8px; font-weight: 800; }
.deal-stage-track li.complete span { border-color: #148177; background: #148177; color: #fff; }
.deal-stage-track li.current span { border-color: #b57a16; color: #8a5b10; box-shadow: 0 0 0 3px #f8ecd5; }
.deal-stage-track small { min-height: 24px; font-size: 7px; line-height: 1.35; overflow-wrap: anywhere; }
.deal-stage-track.package-track li.package span { border-color: #176f88; color: #176f88; }
.deal-stage-track.package-track li.package small { display: grid; gap: 2px; }
.deal-stage-track.package-track li.package b { color: #34576a; font-size: 7px; }

.deal-tablist { display: flex; gap: 0; padding: 0 22px; border-bottom: 1px solid #dce5eb; background: #fff; overflow-x: auto; }
.deal-tablist button { min-width: max-content; padding: 13px 15px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #607486; font-size: 10px; font-weight: 750; }
.deal-tablist button.active { border-bottom-color: #148177; color: #0b675f; }
.deal-tab-panel { padding: 20px 22px; background: #fff; }
.deal-summary-grid,
.deal-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deal-summary-grid > section,
.deal-analysis-grid > div,
.deal-grant,
.deal-dd-layout > section,
.deal-terms-section { min-width: 0; padding: 15px; border: 1px solid #dbe4ea; background: #fbfcfd; }
.deal-summary-grid h4,
.deal-analysis-grid h4,
.deal-grant h4,
.deal-dd-layout h4,
.deal-terms-section h4,
.deal-timeline h4 { margin: 0 0 12px; color: #213f57; font-size: 12px; }
.deal-summary-grid p { color: #536c7e; font-size: 11px; line-height: 1.6; }
.deal-sample-report {
  margin-bottom: 16px;
  border: 1px solid #b9d8d2;
  border-top: 4px solid #148177;
  background: #fff;
  box-shadow: 0 10px 26px rgba(26, 72, 85, 0.08);
}

.deal-sample-report-head {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(120deg, #f1faf8 0%, #fff 62%, #fff8e9 100%);
}

.deal-sample-report-head h4 { margin: 5px 0 7px; color: #153b4e; font-size: 18px; }
.deal-sample-report-head p { max-width: 720px; margin: 0; color: #587183; font-size: 11px; line-height: 1.6; }
.deal-sample-report-status { flex: 0 0 auto; display: grid; justify-items: end; align-content: start; gap: 7px; }
.deal-sample-report-status small { color: #718391; font-size: 9px; font-weight: 750; }
.deal-sample-report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #dce8e5;
  border-bottom: 1px solid #dce8e5;
}

.deal-sample-report-kpis > div { min-width: 0; padding: 15px 17px; display: grid; gap: 4px; border-right: 1px solid #e1e9e7; }
.deal-sample-report-kpis > div:last-child { border-right: 0; }
.deal-sample-report-kpis span { color: #778995; font-size: 8px; font-weight: 760; text-transform: uppercase; }
.deal-sample-report-kpis strong { color: #183d4e; font-size: 18px; overflow-wrap: anywhere; }
.deal-sample-report-kpis small { color: #5c7481; font-size: 9px; }
.deal-sample-report-summary { padding: 18px 20px; background: #fbfdfd; }
.deal-sample-report h5 { margin: 0 0 10px; color: #26485a; font-size: 11px; }
.deal-sample-report-summary p,
.deal-sample-financial-boundary p { margin: 0; color: #506b7b; font-size: 10px; line-height: 1.7; }
.deal-sample-report-columns { padding: 0 20px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deal-sample-report-columns > section { min-width: 0; padding: 14px; border: 1px solid #dbe5e8; background: #fbfcfd; }
.deal-sample-report-list { margin: 0; padding: 0; display: grid; gap: 8px; list-style: none; }
.deal-sample-report-list li { min-width: 0; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: start; gap: 9px; }
.deal-sample-report-list li p { margin: 0; color: #405f70; font-size: 9px; line-height: 1.55; }
.deal-sample-report-list.numbered li { grid-template-columns: 24px minmax(0, 1fr); }
.deal-sample-report-list.numbered li > b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #148177; color: #fff; font-size: 8px; }
.deal-sample-report-list.numbered p { display: grid; gap: 3px; }
.deal-sample-report-list.numbered strong { color: #294d5f; font-size: 10px; }
.deal-sample-report-list.numbered small { color: #718693; font-size: 8px; text-transform: uppercase; }
.deal-sample-risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.deal-sample-risk-grid > div { min-width: 0; padding: 9px; display: grid; gap: 5px; border: 1px solid #e0e8eb; background: #fff; }
.deal-sample-risk-grid strong { color: #345365; font-size: 9px; }
.deal-sample-risk-grid .status { justify-self: start; }
.deal-sample-risk-grid small { color: #718694; font-size: 8px; }
.deal-sample-financial-boundary { border-left: 3px solid #b7801c !important; background: #fffaf1 !important; }
.deal-sample-financial-boundary .status { display: inline-flex; margin-bottom: 10px; }
.deal-sample-report-footer { padding: 16px 20px; display: grid; gap: 12px; border-top: 1px solid #dce6e8; background: #f7fafb; }
.deal-sample-report-footer > div > strong { display: block; margin-bottom: 8px; color: #345468; font-size: 9px; }
.deal-sample-report-footer > p { margin: 0; padding: 9px 11px; border-left: 3px solid #b7801c; background: #fff8ea; color: #6c511e; font-size: 9px; line-height: 1.6; }
.deal-sample-report-footer code { overflow-wrap: anywhere; }
.deal-case-package {
  margin-bottom: 16px;
  border: 1px solid #b9d8d2;
  border-top: 4px solid #176f88;
  background: #fff;
  box-shadow: 0 10px 26px rgba(26, 72, 85, 0.08);
}
.deal-case-package-head {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: #f3f9fb;
}
.deal-case-package-head h4 { margin: 5px 0 7px; color: #153b4e; font-size: 18px; }
.deal-case-package-head p { max-width: 760px; margin: 0; color: #587183; font-size: 11px; line-height: 1.6; }
.deal-case-package-status { flex: 0 0 auto; display: grid; justify-items: end; align-content: start; gap: 7px; }
.deal-case-package-status small { max-width: 240px; color: #718391; font-size: 9px; overflow-wrap: anywhere; }
.deal-case-package-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #dce8e5;
  border-bottom: 1px solid #dce8e5;
}
.deal-case-package-kpis > div { min-width: 0; padding: 15px 17px; display: grid; gap: 4px; border-right: 1px solid #e1e9e7; }
.deal-case-package-kpis > div:last-child { border-right: 0; }
.deal-case-package-kpis span { color: #778995; font-size: 8px; font-weight: 760; text-transform: uppercase; }
.deal-case-package-kpis strong { color: #183d4e; font-size: 18px; overflow-wrap: anywhere; }
.deal-case-package-kpis small { color: #5c7481; font-size: 9px; overflow-wrap: anywhere; }
.deal-case-package-stages {
  margin: 0;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(9, minmax(88px, 1fr));
  gap: 7px;
  overflow-x: auto;
  list-style: none;
}
.deal-case-package-stages li { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 7px; align-items: start; }
.deal-case-package-stages li > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #176f88; color: #fff; font-size: 8px; }
.deal-case-package-stages strong,
.deal-case-package-stages small { display: block; overflow-wrap: anywhere; }
.deal-case-package-stages strong { color: #33566a; font-size: 9px; }
.deal-case-package-stages small { margin-top: 3px; color: #718693; font-size: 8px; }
.deal-case-package-grid { padding: 0 20px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deal-case-package-grid > section { min-width: 0; padding: 14px; border: 1px solid #dbe5e8; background: #fbfcfd; }
.deal-case-package-grid h5 { margin: 0 0 10px; color: #26485a; font-size: 11px; }
.deal-case-package-grid p { margin: 9px 0 0; color: #506b7b; font-size: 9px; line-height: 1.6; }
.deal-case-package-grid code { overflow-wrap: anywhere; }
.deal-case-package > footer { padding: 14px 20px; border-top: 1px solid #dce6e8; background: #fff8ea; }
.deal-case-package > footer strong { color: #6c511e; font-size: 10px; }
.deal-case-package > footer p { margin: 5px 0 0; color: #6c511e; font-size: 9px; line-height: 1.6; }
.deal-case-package-dd { padding: 15px; display: grid; gap: 12px; border: 1px solid #d7e3e7; background: #f8fbfc; }
.deal-case-package-dd h4 { margin: 0; color: #213f57; font-size: 12px; }
.deal-detail-list { margin: 0; display: grid; gap: 9px; }
.deal-detail-list div { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.deal-remote-proof.connected { border-left: 3px solid #148177; background: #f5fbf9; }
.deal-remote-proof.local-only { border-left: 3px solid #b57a16; background: #fffaf1; }
.deal-hash-proof { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.deal-hash-proof span { color: #758697; font-size: 9px; text-transform: uppercase; }
.deal-hash-proof code { max-width: 100%; padding: 4px 6px; color: #20485e; background: #edf4f7; font-size: 9px; overflow-wrap: anywhere; }

.deal-authorization-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deal-grant { display: grid; gap: 12px; }
.deal-grant.approved { border-left: 3px solid #148177; }
.deal-grant.revoked { border-left: 3px solid #a9424b; background: #fff8f8; }
.deal-grant p { margin: 0; color: #536b7d; font-size: 11px; }
.deal-gate-banner { margin-top: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 16px; border-left: 3px solid #a9424b; background: #fff6f6; color: #71363b; font-size: 10px; }
.deal-gate-banner.open { border-left-color: #148177; background: #f1f9f7; color: #1b625d; }
.deal-advisor-governance { margin-top: 12px; padding: 15px; display: grid; gap: 12px; border: 1px solid #d7e2e9; background: #f8fbfc; }
.deal-advisor-governance h4,
.deal-advisor-governance p { margin: 0; }
.deal-advisor-governance .deal-review-note { display: block; line-height: 1.6; }
.deal-advisor-governance .deal-review-note button { margin-top: 8px; }
.deal-advisor-invitation { border-left: 3px solid #276dba; }
.deal-dd-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 12px; }
.deal-rfi-list { display: grid; gap: 10px; }
.deal-rfi-item { padding: 12px; border: 1px solid #d8e2e8; background: #fff; }
.deal-rfi-item > p { color: #526c7e; font-size: 10px; }
.deal-rfi-item > small { color: #7b8c99; font-size: 8px; }
.deal-rfi-item ol { margin: 10px 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.deal-rfi-item li { padding: 7px 9px; display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 5px 10px; border-left: 2px solid #b7cbd3; background: #f7fafb; font-size: 9px; }
.deal-rfi-item li p { margin: 0; }
.deal-rfi-item li code { grid-column: 2; overflow-wrap: anywhere; font-size: 8px; }
.deal-rfi-update-form,
.deal-inline-form { display: grid; grid-template-columns: 150px minmax(140px, 1fr) minmax(120px, 0.8fr) auto; gap: 7px; align-items: center; }

.deal-financial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.deal-financial-grid > div { min-height: 90px; padding: 9px; display: grid; align-content: center; gap: 2px; border: 1px solid #e1d4af; background: #fffaf0; }
.deal-financial-grid strong { color: #6d4e17; }
.deal-financial-grid span,
.deal-financial-grid small { color: #816936; font-size: 8px; }
.deal-financial-grid b { color: #9a6813; font-size: 17px; }
.deal-remote-analysis { margin-top: 12px; padding: 15px; display: grid; gap: 10px; border: 1px solid #b8d9ce; background: #f5fbf9; }
.deal-remote-analysis.empty { border-color: #e1d4af; background: #fffaf0; }
.deal-remote-analysis > small { color: #5f776f; font-size: 9px; line-height: 1.5; }
.deal-remote-analysis-run { min-width: 0; padding: 12px; border: 1px solid #c8ddd6; background: #fff; }
.deal-remote-analysis-run > header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.deal-remote-analysis-run > header strong,
.deal-remote-analysis-run > header small { display: block; overflow-wrap: anywhere; }
.deal-remote-analysis-run > header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.deal-detail-list.compact { margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deal-detail-list.compact div { min-width: 0; grid-template-columns: 110px minmax(0, 1fr); }
.deal-detail-list.compact code { overflow-wrap: anywhere; }
.deal-remote-metrics { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.deal-remote-metrics > div { min-width: 0; padding: 9px; border: 1px solid #d6e5df; background: #f8fcfa; }
.deal-remote-metrics span,
.deal-remote-metrics strong,
.deal-remote-metrics small,
.deal-remote-metrics code { display: block; overflow-wrap: anywhere; }
.deal-remote-metrics strong { margin: 4px 0; color: #0b6755; }
.deal-remote-metrics small,
.deal-remote-metrics code { color: var(--muted); font-size: 8px; }
.deal-terms-section { margin-top: 12px; }
.deal-terms-section .deal-row-heading p { margin: 3px 0 0; color: #8a6327; font-size: 9px; }
.deal-term-grid { margin: 12px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.deal-term-grid div { min-width: 0; padding: 9px; border: 1px solid #e1e7eb; background: #fff; }
.deal-term-grid dt { color: #718493; font-size: 8px; }
.deal-term-grid dd { margin: 4px 0 0; color: #29455c; font-size: 10px; overflow-wrap: anywhere; }
.deal-term-actions-history { display: grid; gap: 5px; margin-bottom: 10px; }
.deal-term-actions-history p { margin: 0; padding: 8px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; background: #f6f9fa; color: #536b7c; font-size: 9px; }
.deal-term-editor { margin-top: 14px; border-top: 1px solid #dce5ea; padding-top: 12px; }
.deal-term-editor summary { cursor: pointer; color: #126e67; font-size: 10px; font-weight: 800; }
.deal-term-editor form { margin-top: 12px; }
.deal-timeline { padding: 18px 22px 24px; border-top: 1px solid #dce5eb; background: #f8fafb; }
.deal-timeline ol { margin: 0; padding: 0; display: grid; gap: 0; list-style: none; }
.deal-timeline li { min-width: 0; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; padding-bottom: 12px; }
.deal-timeline li > span { width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: #148177; box-shadow: 0 0 0 3px #dff1ee; }
.deal-timeline li div { min-width: 0; }
.deal-timeline li strong { color: #2d4b62; font-size: 10px; }
.deal-timeline li p { margin: 3px 0; color: #5c7282; font-size: 9px; overflow-wrap: anywhere; }
.deal-timeline li small { color: #81909c; font-size: 8px; }

@media (max-width: 900px) {
  .institution-application-layout { grid-template-columns: 1fr; }
  .institution-application-context { border-right: 0; border-bottom: 1px solid #cbdedb; }
  .deal-two-column,
  .deal-dd-layout { grid-template-columns: 1fr; }
  .ecosystem-permission-grid { grid-template-columns: 1fr; }
  .deal-admin-row { grid-template-columns: 1fr; }
  .deal-rfi-update-form,
  .deal-inline-form { grid-template-columns: 1fr; }
  .deal-sample-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-sample-report-kpis > div:nth-child(2) { border-right: 0; }
  .deal-sample-report-columns { grid-template-columns: 1fr; }
  .deal-case-package-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal-case-package-kpis > div:nth-child(2) { border-right: 0; }
  .deal-case-package-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .institution-application-layout { width: 100%; margin: 0; min-height: 100vh; border: 0; }
  .institution-application-context,
  .institution-application-form { padding: 22px 16px; }
  .institution-form-grid,
  .deal-form-grid,
  .deal-filter-bar,
  .deal-opportunity-grid,
  .deal-selector,
  .deal-summary-grid,
  .deal-analysis-grid,
  .deal-authorization-grid,
  .deal-term-grid { grid-template-columns: 1fr; }
  .ecosystem-permission-request { grid-template-columns: 1fr; }
  .deal-opportunity-grid,
  .deal-tab-panel { padding: 14px; }
  .deal-detail-head { padding: 18px 14px; flex-direction: column; gap: 12px; }
  .deal-boundary-badges { justify-content: flex-start; }
  .deal-stage-track { padding: 12px 8px; grid-template-columns: repeat(9, 56px); overflow-x: auto; justify-content: start; }
  .deal-tablist { padding: 0 8px; }
  .deal-detail-list div { grid-template-columns: 90px minmax(0, 1fr); }
  .deal-gate-banner { flex-direction: column; gap: 5px; }
  .deal-financial-grid { grid-template-columns: 1fr; }
  .deal-detail-list.compact,
  .deal-remote-metrics { grid-template-columns: 1fr; }
  .deal-financial-grid > div { min-height: 64px; }
  .deal-term-actions-history p { grid-template-columns: 1fr; }
  .deal-timeline { padding: 16px 14px 20px; }
  .deal-sample-report-head { padding: 16px; flex-direction: column; }
  .deal-sample-report-status { justify-items: start; }
  .deal-sample-report-kpis { grid-template-columns: 1fr; }
  .deal-sample-report-kpis > div { border-right: 0; border-bottom: 1px solid #e1e9e7; }
  .deal-sample-report-kpis > div:last-child { border-bottom: 0; }
  .deal-sample-report-columns { padding: 0 14px 14px; }
  .deal-sample-report-summary,
  .deal-sample-report-footer { padding: 14px; }
  .deal-sample-risk-grid { grid-template-columns: 1fr; }
  .deal-sample-report-list li { grid-template-columns: 1fr; }
  .deal-case-package-head { padding: 16px; flex-direction: column; }
  .deal-case-package-status { justify-items: start; }
  .deal-case-package-kpis { grid-template-columns: 1fr; }
  .deal-case-package-kpis > div { border-right: 0; border-bottom: 1px solid #e1e9e7; }
  .deal-case-package-kpis > div:last-child { border-bottom: 0; }
  .deal-case-package-grid { padding: 0 14px 14px; }
  .deal-case-package-stages { padding: 14px; grid-template-columns: repeat(9, 110px); }
  .deal-case-package > footer { padding: 14px; }
}

/* Consolidated primary navigation and contextual workspace tabs */
.context-nav {
  min-height: 46px;
  padding: 0 32px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #dce4eb;
  background: #f7f9fb;
  scrollbar-width: none;
}

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

.context-nav button {
  min-width: max-content;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #617486;
  font-size: 12px;
  font-weight: 720;
}

.context-nav button:hover,
.context-nav button:focus-visible {
  background: #edf3f9;
  color: #174f98;
}

.context-nav button.active {
  border-bottom-color: var(--blue);
  color: #174f98;
}

@media (max-width: 820px) {
  .context-nav {
    min-height: 44px;
    padding: 0 18px;
  }

  .context-nav button {
    padding: 0 12px;
  }
}

/* Swordfish AI product workspace */
.swordfish-ai-product {
  display: grid;
  gap: 0;
  min-height: calc(100vh - 152px);
  border: 1px solid #d8e2eb;
  background: #fff;
}

.swordfish-ai-product-head {
  min-height: 104px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d8e2eb;
  background: #f8fbfd;
}

.swordfish-ai-product-identity,
.swordfish-ai-product-state,
.swordfish-ai-section-head,
.swordfish-ai-evidence-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swordfish-ai-product-identity .assistant-product-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.swordfish-ai-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #0b6c63;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.swordfish-ai-product-identity h3 {
  margin: 0;
  color: #102035;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.swordfish-ai-product-identity p,
.swordfish-ai-section-head p,
.swordfish-ai-welcome p {
  margin: 4px 0 0;
  color: #64778a;
  font-size: 12px;
}

.swordfish-ai-contract-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(220px, 1.15fr);
  border-bottom: 1px solid #d8e2eb;
  background: #fff;
}

.swordfish-ai-contract-strip > div {
  min-width: 0;
  padding: 13px 18px;
  display: grid;
  gap: 3px;
  border-right: 1px solid #e1e8ee;
}

.swordfish-ai-contract-strip > div:last-child {
  border-right: 0;
}

.swordfish-ai-contract-strip span {
  color: #708295;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.swordfish-ai-contract-strip strong {
  min-width: 0;
  overflow: hidden;
  color: #22364b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swordfish-ai-contract-strip .swordfish-ai-contract-boundary {
  background: #fffaf0;
}

.swordfish-ai-contract-boundary span,
.swordfish-ai-contract-boundary strong {
  color: #915d05;
}

.swordfish-ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  min-height: 630px;
}

.swordfish-ai-chat {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(280px, 1fr) auto auto;
  border-right: 1px solid #d8e2eb;
}

.swordfish-ai-mode-control {
  padding: 14px 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid #e2e9ef;
  background: #f7f9fb;
}

.swordfish-ai-mode-control button {
  min-width: max-content;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #627488;
  font-size: 12px;
  font-weight: 750;
}

.swordfish-ai-mode-control button.active {
  border-bottom-color: #0f65c6;
  color: #0f4f9c;
  background: #eaf3ff;
}

.swordfish-ai-messages {
  min-height: 300px;
  max-height: 54vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: #fff;
}

.swordfish-ai-welcome {
  max-width: 620px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #203449;
}

.swordfish-ai-welcome .assistant-product-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.swordfish-ai-message {
  max-width: min(760px, 92%);
  padding: 14px 16px;
  border: 1px solid #dce5ed;
  border-radius: 6px;
  background: #f8fafc;
}

.swordfish-ai-message.user {
  align-self: flex-end;
  border-color: #bfd7f4;
  background: #edf5ff;
}

.swordfish-ai-message.assistant {
  align-self: flex-start;
  border-left: 3px solid #0a756b;
  background: #fff;
}

.swordfish-ai-message header,
.swordfish-ai-message-actions,
.swordfish-ai-form-actions,
.swordfish-ai-form-actions > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.swordfish-ai-message header strong {
  color: #17304a;
  font-size: 11px;
}

.swordfish-ai-answer-status {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.swordfish-ai-answer-status.ready { color: #087267; }
.swordfish-ai-answer-status.refused { color: #9b6200; }

.swordfish-ai-answer-text {
  margin-top: 9px;
  color: #25394d;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.swordfish-ai-message-warnings {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swordfish-ai-message-warnings span {
  padding: 3px 7px;
  border: 1px solid #ecd5a7;
  background: #fff9ed;
  color: #8a5b08;
  font-size: 9px;
  font-weight: 750;
}

.swordfish-ai-message-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.swordfish-ai-asset-choice {
  display: grid;
  gap: 3px;
  min-width: min(100%, 220px);
  text-align: left;
}

.swordfish-ai-asset-choice span {
  font-size: 0.76rem;
  opacity: 0.74;
}

.swordfish-ai-assessment-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: rgba(240, 253, 250, 0.72);
}

.swordfish-ai-assessment-preview h4,
.swordfish-ai-assessment-preview p { margin: 0; }

.swordfish-ai-assessment-preview dl { display: grid; gap: 8px; margin: 0; }
.swordfish-ai-assessment-preview dl div { display: grid; gap: 2px; }
.swordfish-ai-assessment-preview dt { color: #64748b; font-size: 0.76rem; }
.swordfish-ai-assessment-preview dd { margin: 0; overflow-wrap: anywhere; }
.swordfish-ai-assessment-confirm { display: flex; gap: 8px; align-items: flex-start; }

@media (max-width: 390px) {
  .swordfish-ai-assessment-preview { padding: 12px; }
  .swordfish-ai-message-actions .swordfish-ai-asset-choice { width: 100%; }
}

.swordfish-ai-suggestions {
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid #e2e9ef;
  background: #fafcfd;
}

.swordfish-ai-suggestion {
  min-width: max-content;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cad7e2;
  border-radius: 4px;
  background: #fff;
  color: #36536f;
  font-size: 11px;
  font-weight: 680;
}

.swordfish-ai-form {
  padding: 16px 20px;
  border-top: 1px solid #d8e2eb;
  background: #fff;
}

.swordfish-ai-form textarea {
  min-height: 78px;
  resize: vertical;
}

.swordfish-ai-form-actions {
  margin-top: 10px;
}

.swordfish-ai-form-actions > span {
  color: #728396;
  font-size: 10px;
}

.swordfish-ai-context {
  min-width: 0;
  background: #f8fafc;
}

.swordfish-ai-context-section {
  padding: 20px;
  border-bottom: 1px solid #d8e2eb;
}

.swordfish-ai-section-head {
  justify-content: space-between;
  align-items: flex-start;
}

.swordfish-ai-section-head h3 {
  margin: 0;
  color: #1d3349;
  font-size: 14px;
}

.swordfish-ai-cases,
.swordfish-ai-evidence {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.swordfish-ai-case-shell {
  width: 100%;
  min-width: 0;
  display: grid;
  border: 1px solid #d7e1e9;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.swordfish-ai-case {
  width: 100%;
  min-width: 0;
  padding: 13px;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #385169;
}

.swordfish-ai-case:hover,
.swordfish-ai-case:focus-visible,
.swordfish-ai-case-shell.active .swordfish-ai-case {
  outline: 0;
  background: #f2f7fd;
}

.swordfish-ai-case-shell:hover,
.swordfish-ai-case-shell:focus-within,
.swordfish-ai-case-shell.active {
  border-color: #2d79ce;
}

.swordfish-ai-intake-start {
  min-height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-top: 1px solid #dfe7ee;
  border-radius: 0;
  background: #f8fbfd;
  color: #0b5fae;
  font-size: 10px;
  font-weight: 780;
  text-align: left;
}

.swordfish-ai-intake-start:hover,
.swordfish-ai-intake-start:focus-visible {
  background: #eaf3ff;
}

.swordfish-ai-case-type {
  color: #087267;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.swordfish-ai-case strong {
  overflow-wrap: anywhere;
  color: #19334e;
  font-size: 12px;
}

.swordfish-ai-case span,
.swordfish-ai-case small {
  font-size: 10px;
}

.swordfish-ai-case small { color: #7a5b18; }

.swordfish-ai-evidence-section {
  min-height: 320px;
}

.swordfish-ai-evidence-card {
  padding: 13px;
  border-left: 3px solid #268377;
  background: #fff;
  box-shadow: 0 1px 0 #dce4eb;
}

.swordfish-ai-evidence-card > div:first-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.swordfish-ai-evidence-card h4 {
  margin: 9px 0;
  color: #20384f;
  font-size: 12px;
  line-height: 1.45;
}

.swordfish-ai-evidence-card dl {
  margin: 0;
  display: grid;
  gap: 5px;
}

.swordfish-ai-evidence-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  font-size: 10px;
}

.swordfish-ai-evidence-card dt { color: #78899a; }
.swordfish-ai-evidence-card dd { margin: 0; color: #334b61; overflow-wrap: anywhere; }

.swordfish-ai-evidence-card a {
  margin-top: 10px;
  display: inline-flex;
  color: #0b62b5;
  font-size: 10px;
  font-weight: 750;
}

.swordfish-ai-empty {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  color: #758596;
  font-size: 11px;
}

.swordfish-ai-missing-evidence {
  margin-top: 14px;
  color: #725214;
  font-size: 11px;
}

.swordfish-ai-missing-evidence ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.swordfish-ai-intake {
  border-top: 1px solid #cfdbe5;
  background: #f7f9fb;
}

.swordfish-ai-intake-head {
  min-height: 92px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d8e2eb;
  background: #fff;
}

.swordfish-ai-intake-head h3,
.swordfish-ai-intake-title h4,
.swordfish-ai-intake-panel h4 {
  margin: 0;
  color: #172f47;
  letter-spacing: 0;
}

.swordfish-ai-intake-head h3 { font-size: 19px; }

.swordfish-ai-intake-head p,
.swordfish-ai-intake-title p,
.swordfish-ai-intake-boundary p {
  margin: 5px 0 0;
  color: #667a8e;
  font-size: 11px;
  line-height: 1.5;
}

.swordfish-ai-intake-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.swordfish-ai-intake-content {
  padding: 20px 26px 26px;
  display: grid;
  gap: 16px;
}

.swordfish-ai-intake-summary {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid #d9e2e9;
}

.swordfish-ai-intake-title {
  display: grid;
  gap: 7px;
}

.swordfish-ai-intake-title .status { justify-self: start; }
.swordfish-ai-intake-title h4 { font-size: 16px; }

.swordfish-ai-intake-identity,
.swordfish-ai-intake-panel dl {
  margin: 0;
  display: grid;
  gap: 7px;
}

.swordfish-ai-intake-identity > div,
.swordfish-ai-intake-panel dl > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(90px, 0.38fr) minmax(0, 1fr);
  gap: 10px;
  font-size: 10px;
}

.swordfish-ai-intake-identity dt,
.swordfish-ai-intake-panel dt { color: #74869a; }
.swordfish-ai-intake-identity dd,
.swordfish-ai-intake-panel dd {
  margin: 0;
  color: #2e465d;
  overflow-wrap: anywhere;
}

.swordfish-ai-intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.swordfish-ai-intake-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  background: #fff;
}

.swordfish-ai-intake-panel h4 {
  margin-bottom: 13px;
  font-size: 12px;
}

.swordfish-ai-intake-statusline { margin-bottom: 12px; }

.swordfish-ai-reference-row {
  min-height: 34px;
  padding: 6px 0;
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) auto minmax(100px, 1fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  color: #526a80;
  font-size: 10px;
}

.swordfish-ai-reference-row:last-child { border-bottom: 0; }
.swordfish-ai-reference-row code,
.swordfish-ai-reference-row strong { overflow-wrap: anywhere; font-size: 9px; }

.swordfish-ai-intake-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.swordfish-ai-intake-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334d66;
  font-size: 10px;
}

.swordfish-ai-intake-list li > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.swordfish-ai-intake-list small { color: #7c8d9d; font-size: 8px; }

.swordfish-ai-financial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.swordfish-ai-financial-grid > div {
  min-height: 82px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #e3d5ae;
  background: #fffaf0;
}

.swordfish-ai-financial-grid strong { color: #805a12; font-size: 12px; }
.swordfish-ai-financial-grid span { color: #614c25; font-size: 9px; font-weight: 750; }
.swordfish-ai-financial-grid small { color: #8c7b5e; font-size: 8px; }

.swordfish-ai-intake-boundary {
  padding: 13px 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
  border-left: 3px solid #b57a16;
  background: #fffaf0;
}

.swordfish-ai-intake-boundary > div {
  min-width: 0;
  display: flex;
  gap: 8px;
  color: #634a1e;
  font-size: 10px;
}

.swordfish-ai-intake-boundary > div span { overflow-wrap: anywhere; }
.swordfish-ai-intake-boundary p { grid-column: 1 / -1; color: #765d31; }
.swordfish-ai-intake > .form-error { margin: 0; padding: 0 26px 18px; }
.swordfish-ai-intake-open #assistantLauncher { display: none; }

@media (max-width: 1080px) {
  .swordfish-ai-contract-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swordfish-ai-contract-strip > div:nth-child(2) { border-right: 0; }
  .swordfish-ai-contract-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e1e8ee; }

  .swordfish-ai-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 820px) {
  .swordfish-ai-product {
    min-height: auto;
    border-left: 0;
    border-right: 0;
  }

  .swordfish-ai-product-head {
    padding: 18px;
    align-items: flex-start;
  }

  .swordfish-ai-product-state {
    flex-direction: column;
    align-items: flex-end;
  }

  .swordfish-ai-contract-strip {
    grid-template-columns: 1fr;
  }

  .swordfish-ai-contract-strip > div,
  .swordfish-ai-contract-strip > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #e1e8ee;
  }

  .swordfish-ai-layout {
    grid-template-columns: 1fr;
  }

  .swordfish-ai-chat {
    border-right: 0;
    border-bottom: 1px solid #d8e2eb;
  }

  .swordfish-ai-messages {
    min-height: 360px;
    max-height: none;
    padding: 18px;
  }

  .swordfish-ai-context {
    background: #fff;
  }

  .swordfish-ai-intake-summary,
  .swordfish-ai-intake-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .swordfish-ai-product-identity .assistant-product-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .swordfish-ai-product-identity h3 { font-size: 20px; }
  .swordfish-ai-product-state .status { max-width: 120px; white-space: normal; text-align: right; }
  .swordfish-ai-mode-control { padding: 11px 14px; }
  .swordfish-ai-message { max-width: 100%; }
  .swordfish-ai-suggestions { padding: 10px 14px; }
  .swordfish-ai-form { padding: 14px; }
  .swordfish-ai-form-actions { align-items: flex-start; flex-direction: column; }
  .swordfish-ai-form-actions > div { width: 100%; }
  .swordfish-ai-form-actions button { flex: 1; }
  .swordfish-ai-context-section { padding: 18px 14px; }
  .swordfish-ai-intake-head {
    padding: 16px 14px;
    align-items: flex-start;
    flex-direction: column;
  }
  .swordfish-ai-intake-actions { width: 100%; }
  .swordfish-ai-intake-actions .primary-action { flex: 1; }
  .swordfish-ai-intake-content { padding: 16px 14px 20px; }
  .swordfish-ai-intake-identity > div,
  .swordfish-ai-intake-panel dl > div { grid-template-columns: 82px minmax(0, 1fr); }
  .swordfish-ai-reference-row { grid-template-columns: minmax(90px, 1fr) auto; }
  .swordfish-ai-reference-row code,
  .swordfish-ai-reference-row strong { grid-column: 1 / -1; }
  .swordfish-ai-financial-grid { grid-template-columns: 1fr; }
  .swordfish-ai-financial-grid > div { min-height: 62px; }
  .swordfish-ai-intake-boundary { grid-template-columns: 1fr; }
  .swordfish-ai-intake-boundary p { grid-column: 1; }
  .swordfish-ai-intake > .form-error { padding: 0 14px 16px; }
}
