/* v218: one platform shell, with module colour reserved for details. */
:root {
  --lm-canvas: #f1f5f8;
  --lm-surface: #ffffff;
  --lm-soft: #f7fafc;
  --lm-line: #dce5ec;
  --lm-line-strong: #c4d3de;
  --lm-ink: #182b3b;
  --lm-muted: #526676;
  --lm-navy: #102e46;
  --lm-navy-light: #1b4a66;
  --lm-detail-accent: #2b789a;
  --lm-shadow: 0 20px 48px rgba(18, 47, 69, 0.08), 0 2px 9px rgba(18, 47, 69, 0.035);
}

body[data-active-module="hs"],
body[data-active-module="decision"],
body[data-active-module="battery"],
body[data-active-module="matrix"] {
  --lm-detail-accent: #288f84;
}

body[data-active-module="policy"],
body[data-active-module="trends"],
body[data-active-module="hotspots"],
body[data-active-module="risk-center"] {
  --lm-detail-accent: #b48143;
}

body[data-active-module="air"],
body[data-active-module="air-calc"],
body[data-active-module="air-market"],
body[data-active-module="air-fees"] {
  --lm-detail-accent: #5a85bc;
}

body:not([data-print-document]) {
  background: var(--lm-canvas);
  color: var(--lm-ink);
}

body.is-authenticated .app-shell {
  background: transparent !important;
}

body.is-authenticated .sidebar {
  border-color: #d6e1e9;
  border-radius: 16px;
  background: #fbfdfe;
  box-shadow: var(--lm-shadow);
}

body.is-authenticated .sidebar .brand {
  margin-bottom: 14px;
}

body.is-authenticated .sidebar .nav-groups a,
body.is-authenticated .sidebar .nav-case-button {
  border-radius: 10px;
}

body.is-authenticated .sidebar .nav-groups a.active {
  background: #e8f3f8;
  color: #134d69;
  box-shadow: inset 3px 0 0 var(--lm-detail-accent);
}

body[data-active-module].is-authenticated main {
  min-width: 0;
}

body[data-active-module]:not([data-active-module="dashboard"]).is-authenticated main > section:not(.workspace-hidden) {
  min-width: 0;
  padding: clamp(14px, 2vw, 24px) !important;
  border: 1px solid var(--lm-line) !important;
  border-radius: 20px !important;
  background: var(--lm-surface) !important;
  box-shadow: var(--lm-shadow) !important;
}

body[data-active-module].is-authenticated .workspace-title {
  position: relative;
  min-width: 0;
  min-height: 112px;
  margin: 0 0 18px !important;
  padding: 22px 26px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(116deg, #102e46 4%, #17445d 64%, #1b5369 100%) !important;
  box-shadow: 0 13px 28px rgba(16, 46, 70, 0.14) !important;
}

body[data-active-module].is-authenticated .workspace-title::before {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--lm-detail-accent);
  content: "";
}

body[data-active-module].is-authenticated .workspace-title::after {
  opacity: 0.18 !important;
  filter: brightness(1.4) grayscale(1);
}

body[data-active-module].is-authenticated .workspace-title > * {
  position: relative;
  z-index: 3;
}

body[data-active-module].is-authenticated .workspace-title .eyebrow {
  color: #acd5e3 !important;
  letter-spacing: 0.09em;
}

body[data-active-module].is-authenticated .workspace-title h2 {
  color: #ffffff !important;
  font-size: clamp(23px, 2.2vw, 31px) !important;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

body[data-active-module].is-authenticated .workspace-title span {
  color: #d0e2ea !important;
  font-size: 13px;
  line-height: 1.5;
}

body[data-active-module].is-authenticated main > section:not(.workspace-hidden)::before,
body[data-active-module].is-authenticated main > section:not(.workspace-hidden)::after {
  display: none !important;
}

body[data-active-module].is-authenticated main > section .panel,
body[data-active-module].is-authenticated main > section .freight-tool-panel,
body[data-active-module].is-authenticated main > section .risk-page-panel {
  min-width: 0;
  border-color: var(--lm-line) !important;
  border-radius: 14px !important;
  background: var(--lm-surface) !important;
  box-shadow: none !important;
}

body[data-active-module].is-authenticated main > section .panel-heading,
body[data-active-module].is-authenticated main > section .section-heading {
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lm-line);
}

body[data-active-module].is-authenticated main > section .panel-heading h2,
body[data-active-module].is-authenticated main > section .section-heading h2 {
  color: var(--lm-ink) !important;
  font-size: clamp(18px, 1.8vw, 22px) !important;
  letter-spacing: -0.015em;
}

body[data-active-module].is-authenticated main > section .query-card {
  min-width: 0;
  border: 1px solid var(--lm-line) !important;
  border-radius: 12px !important;
  background: var(--lm-soft) !important;
  box-shadow: none !important;
}

body[data-active-module].is-authenticated main > section label {
  color: #314a5b;
  font-size: 13px;
  font-weight: 750;
}

body[data-active-module].is-authenticated main > section input,
body[data-active-module].is-authenticated main > section select,
body[data-active-module].is-authenticated main > section textarea {
  border-color: var(--lm-line-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--lm-ink);
  font-size: 14px;
}

body[data-active-module].is-authenticated main > section :is(input, select, textarea, button, a):focus-visible {
  outline: 3px solid rgba(40, 143, 132, 0.34);
  outline-offset: 2px;
}

body[data-active-module].is-authenticated main > section input[aria-invalid="true"] {
  border-color: #c66655 !important;
  box-shadow: 0 0 0 3px rgba(198, 102, 85, 0.13);
}

body[data-active-module].is-authenticated main > section .module-tabs {
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--lm-line);
  border-radius: 11px;
  background: #edf3f7;
}

body[data-active-module].is-authenticated main > section .module-tab {
  border-radius: 8px;
  font-size: 13px;
}

body[data-active-module].is-authenticated main > section .module-tab.active {
  box-shadow: 0 2px 8px rgba(24, 59, 79, 0.09);
}

body[data-active-module].is-authenticated main > section .primary-button {
  border-radius: 9px;
  background: var(--lm-navy) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(16, 46, 70, 0.14) !important;
}

body[data-active-module].is-authenticated main > section .primary-button:hover {
  background: var(--lm-navy-light) !important;
}

.risk-input-needed {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  padding: 19px 20px;
  border: 1px solid #bed9dc;
  border-radius: 13px;
  background: linear-gradient(120deg, #f0f9f8, #fbfdfd);
}

.risk-input-needed-step {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 7px;
  background: #dcefeb;
  color: #17695f;
  font-size: 11px;
  font-weight: 850;
}

.risk-input-needed h3 {
  margin: 0;
  color: #194b54;
  font-size: 17px;
}

.risk-input-needed p {
  margin: 6px 0 0;
  color: #526d71;
  font-size: 13px;
  line-height: 1.55;
}

.dg-executive-brief {
  margin: 16px 0 12px;
  padding: 16px 18px;
  border: 1px solid #cfe2e4;
  border-radius: 11px;
  background: #f3faf9;
}

.dg-executive-brief > strong {
  display: block;
  color: #173f49;
  font-size: clamp(16px, 1.65vw, 19px);
  line-height: 1.4;
}

.dg-executive-brief p {
  margin: 8px 0 0;
  color: #345765;
  line-height: 1.55;
}

.dg-decision-details {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--lm-line);
  border-radius: 9px;
  background: #fff;
}

.dg-decision-details summary {
  color: #27607c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.dg-decision-details[open] > strong {
  display: block;
  margin-top: 10px;
}

.dg-supporting-details {
  grid-column: 1 / -1;
  padding: 13px 15px;
  border: 1px solid var(--lm-line);
  border-radius: 11px;
  background: #fbfdfe;
}

.dg-supporting-details > summary {
  color: #25516a;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.dg-supporting-details[open] > .dg-result-grid {
  margin-top: 14px;
}

.battery-upload-help {
  margin-top: 7px;
  color: var(--lm-muted);
  font-size: 12px;
}

.battery-upload-help summary {
  color: #27607c;
  cursor: pointer;
  font-weight: 750;
}

.battery-upload-help p {
  margin: 8px 0 0;
  line-height: 1.5;
}

body[data-active-module="battery"].is-authenticated .battery-document-actions .document-upload-button {
  color: #ffffff !important;
}

.responsive-utility {
  min-width: 0;
}

.responsive-utility > summary {
  display: none;
  cursor: pointer;
}

.hs-advanced-panel > .hs-smart-panel {
  margin-top: 0;
}

#hsAdvancedPanel {
  order: 2;
  grid-column: 1 / -1;
}

.global-examples-toggle {
  display: none !important;
}

.personal-workspace-details > summary {
  display: none;
}

@media (max-width: 720px) {
  body[data-active-module="dashboard"] .topbar,
  body.is-public-home .topbar {
    gap: 0 !important;
    padding: 15px !important;
  }

  body[data-active-module="dashboard"] .topbar .hero-main,
  body.is-public-home .topbar .hero-main {
    padding: 0 !important;
  }

  body[data-active-module="dashboard"] .topbar .eyebrow,
  body.is-public-home .topbar .eyebrow,
  body[data-active-module="dashboard"] .topbar .hero-copy,
  body.is-public-home .topbar .hero-copy,
  body[data-active-module="dashboard"] .home-command-panel,
  body.is-public-home .home-command-panel {
    display: none !important;
  }

  body[data-active-module="dashboard"] .topbar h1,
  body.is-public-home .topbar h1 {
    margin: 0 !important;
    font-size: 23px !important;
    line-height: 1.18;
  }

  body[data-active-module="dashboard"] .hero-subtitle,
  body.is-public-home .hero-subtitle {
    margin: 7px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.45;
  }

  body[data-active-module="dashboard"] .global-query-panel,
  body.is-public-home .global-query-panel {
    gap: 8px !important;
    padding: 12px !important;
  }

  body[data-active-module="dashboard"] .global-search-form,
  body.is-public-home .global-search-form {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 11px !important;
    animation: none !important;
  }

  body[data-active-module="dashboard"] .global-search-form::before,
  body[data-active-module="dashboard"] .global-search-form::after,
  body.is-public-home .global-search-form::before,
  body.is-public-home .global-search-form::after {
    display: none !important;
  }

  body[data-active-module="dashboard"] .global-search-form input,
  body.is-public-home .global-search-form input {
    min-height: 42px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }

  body[data-active-module="dashboard"] .global-search-form button,
  body.is-public-home .global-search-form button {
    min-width: 78px !important;
    min-height: 42px !important;
    padding: 7px 9px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }

  body[data-active-module="dashboard"] .global-search-chips,
  body.is-public-home .global-search-chips {
    gap: 6px !important;
    margin-top: 2px !important;
  }

  body[data-active-module="dashboard"] .global-search-chips button,
  body.is-public-home .global-search-chips button {
    min-height: 33px !important;
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  body[data-active-module="dashboard"] .global-search-chips button[data-global-query]:nth-child(n+4):not(:last-child),
  body.is-public-home .global-search-chips button[data-global-query]:nth-child(n+4):not(:last-child) {
    display: none !important;
  }

  body[data-active-module="dashboard"] .global-search-chips[data-expanded="true"] button[data-global-query]:nth-child(n+4):not(:last-child),
  body.is-public-home .global-search-chips[data-expanded="true"] button[data-global-query]:nth-child(n+4):not(:last-child) {
    display: inline-flex !important;
  }

  body[data-active-module="dashboard"] .global-examples-toggle,
  body.is-public-home .global-examples-toggle {
    display: inline-flex !important;
    justify-content: center;
  }

  body[data-active-module="dashboard"] .home-helper-grid,
  body.is-public-home .home-helper-grid,
  body[data-active-module="dashboard"] .intelligence-copilot {
    display: none !important;
  }

  body[data-active-module="dashboard"] .personal-workspace-home {
    padding: 13px !important;
  }

  body[data-active-module="dashboard"] .personal-workspace-head {
    gap: 8px;
  }

  body[data-active-module="dashboard"] .personal-workspace-head h2 {
    font-size: 19px;
  }

  body[data-active-module="dashboard"] .personal-workspace-head p,
  body[data-active-module="dashboard"] .personal-kicker,
  body[data-active-module="dashboard"] .personal-identity {
    display: none;
  }

  body[data-active-module="dashboard"] .personal-workspace-details > summary {
    display: list-item;
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid var(--lm-line);
    border-radius: 9px;
    background: #f7fafc;
    color: #2d586e;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
  }

  body.is-authenticated .sidebar,
  body[data-active-module].is-authenticated .sidebar {
    top: 4px !important;
    margin-bottom: 4px !important;
    padding: 4px !important;
    border-radius: 11px !important;
  }

  body.is-authenticated .sidebar .brand,
  body[data-active-module].is-authenticated .sidebar .brand {
    width: 144px;
    min-height: 43px;
    margin: 0 !important;
    padding: 5px 7px !important;
    border-radius: 8px;
    box-shadow: none;
  }

  body.is-authenticated .sidebar .brand .brand-mark,
  body[data-active-module].is-authenticated .sidebar .brand .brand-mark {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
  }

  body.is-authenticated .sidebar .brand > div:last-child span,
  body[data-active-module].is-authenticated .sidebar .brand > div:last-child span {
    display: none;
  }

  body.is-authenticated .sidebar .brand strong,
  body[data-active-module].is-authenticated .sidebar .brand strong {
    font-size: 14px;
  }

  body.is-authenticated .workspace-view-control,
  body[data-active-module].is-authenticated .workspace-view-control {
    top: 9px;
    right: 76px;
    width: 86px;
  }

  body.is-authenticated .workspace-view-control select,
  body[data-active-module].is-authenticated .workspace-view-control select {
    min-height: 31px;
    font-size: 10px;
  }

  body.is-authenticated .logout-button.top-logout-button {
    top: 13px;
    right: 12px;
    min-width: 58px;
    min-height: 29px;
    padding: 0 7px;
    font-size: 10px;
  }

  body.is-authenticated .mobile-quick-nav {
    top: 55px !important;
    margin-bottom: 4px;
    padding: 3px;
    border-radius: 9px;
    box-shadow: 0 7px 18px rgba(16, 46, 70, 0.1);
  }

  body.is-authenticated .mobile-quick-nav a,
  body.is-authenticated .mobile-quick-nav button {
    min-height: 43px;
    gap: 1px;
    padding: 3px 2px;
    font-size: 9px;
  }

  body.is-authenticated .mobile-quick-nav .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  body.is-authenticated .lmw-current-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    margin-bottom: 6px !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 14px rgba(16, 46, 70, 0.06);
  }

  body.is-authenticated .lmw-current-copy {
    grid-column: 1;
    min-width: 0;
  }

  body.is-authenticated .lmw-current-copy span,
  body.is-authenticated .lmw-current-bar[data-has-case="no"] .lmw-gate-pill {
    display: none;
  }

  body.is-authenticated .lmw-current-copy strong {
    font-size: 12px;
  }

  body.is-authenticated .lmw-current-bar[data-has-case="no"] .lmw-current-actions {
    grid-column: 2;
    width: auto;
  }

  body.is-authenticated .lmw-current-bar select {
    grid-column: 1 / -1;
    min-height: 32px;
    height: 32px;
  }

  body.is-authenticated .lmw-current-actions {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }

  body.is-authenticated .lmw-current-actions .lmw-button {
    min-height: 31px;
    padding: 5px 8px;
    font-size: 11px;
  }

  body.is-authenticated .lmw-gate-pill {
    grid-column: 2;
    min-height: 24px;
    padding: 3px 7px;
    font-size: 10px;
  }

  body[data-active-module]:not([data-active-module="dashboard"]).is-authenticated main > section:not(.workspace-hidden) {
    padding: 8px !important;
    border-radius: 13px !important;
  }

  body[data-active-module].is-authenticated .workspace-title {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 5px;
    margin-bottom: 8px !important;
    padding: 13px 15px !important;
    border-radius: 10px !important;
  }

  body[data-active-module].is-authenticated .workspace-title .eyebrow {
    display: none;
  }

  body[data-active-module].is-authenticated .workspace-title h2 {
    font-size: 21px !important;
  }

  body[data-active-module].is-authenticated .workspace-title span {
    font-size: 11px;
  }

  body[data-active-module].is-authenticated main > section .panel {
    padding: 12px !important;
  }

  body[data-active-module].is-authenticated .workspace-title span {
    text-align: left !important;
  }

  body[data-active-module].is-authenticated main > section .panel,
  body[data-active-module].is-authenticated main > section .freight-tool-panel,
  body[data-active-module].is-authenticated main > section .risk-page-panel {
    border-radius: 11px !important;
  }

  body[data-active-module].is-authenticated main > section .query-card {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    padding: 12px !important;
  }

  body[data-active-module].is-authenticated main > section .module-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body[data-active-module].is-authenticated main > section .module-tab {
    flex: 0 0 auto;
  }

  body[data-active-module="hs"].is-authenticated #productForm > .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-active-module="hs"].is-authenticated #productForm > .panel-heading .eyebrow {
    display: none;
  }

  body[data-active-module="hs"].is-authenticated #productForm > .panel-heading h2 {
    font-size: 17px !important;
  }

  body[data-active-module="hs"].is-authenticated .hs-case-tools,
  body[data-active-module="hs"].is-authenticated .hs-advanced-panel,
  body[data-active-module="battery"].is-authenticated .battery-utility-tools {
    border: 1px solid var(--lm-line);
    border-radius: 9px;
    background: var(--lm-soft);
  }

  body[data-active-module="hs"].is-authenticated .hs-case-tools > summary,
  body[data-active-module="hs"].is-authenticated .hs-advanced-panel > summary,
  body[data-active-module="battery"].is-authenticated .battery-utility-tools > summary {
    display: list-item;
    padding: 9px 11px;
    color: #2d586e;
    font-size: 12px;
    font-weight: 750;
  }

  body[data-active-module="hs"].is-authenticated .hs-case-tools[open] > .hs-case-strip,
  body[data-active-module="hs"].is-authenticated .hs-advanced-panel[open] > .hs-smart-panel {
    margin: 6px;
    width: calc(100% - 12px);
  }

  body[data-active-module="hs"].is-authenticated .hs-advanced-panel {
    overflow: hidden;
  }

  body[data-active-module="hs"].is-authenticated .hs-advanced-panel > summary {
    list-style-position: inside;
  }

  body[data-active-module="battery"].is-authenticated #batteryForm > .panel-heading {
    display: flex !important;
    justify-content: flex-end;
    gap: 0;
    margin-bottom: 7px;
    padding: 0;
    border: 0;
  }

  body[data-active-module="battery"].is-authenticated #batteryForm > .panel-heading > div:first-child {
    display: none;
  }

  body[data-active-module="battery"].is-authenticated .battery-utility-tools {
    width: 100%;
  }

  body[data-active-module="battery"].is-authenticated #batteryForm > .panel-heading .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
    padding: 6px;
  }

  body[data-active-module="battery"].is-authenticated #batteryForm > .panel-heading .action-row button {
    width: 100%;
    min-height: 35px;
    padding: 5px 7px;
    font-size: 11px;
  }

  body[data-active-module="battery"].is-authenticated .battery-document-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  body[data-active-module="battery"].is-authenticated .battery-document-actions > * {
    min-width: 0;
    min-height: 40px;
    padding: 8px 6px;
    font-size: 12px;
  }

  body[data-active-module="battery"].is-authenticated .battery-document-actions > [hidden] {
    display: none !important;
  }

  body[data-active-module="battery"].is-authenticated .battery-document-uploader {
    gap: 7px;
    padding: 11px !important;
  }

  body[data-active-module="battery"].is-authenticated .battery-step-label {
    display: none;
  }

  body[data-active-module="battery"].is-authenticated .battery-document-list:has(> span:only-child) {
    min-height: 0;
    padding: 6px 9px;
    font-size: 11px;
  }

  body[data-active-module="battery"].is-authenticated #batteryResultPanel[data-empty="true"] {
    padding: 10px 12px !important;
  }

  body[data-active-module="battery"].is-authenticated #batteryResultPanel[data-empty="true"] .panel-heading {
    padding-bottom: 8px;
  }

  body[data-active-module="battery"].is-authenticated #batteryResultPanel[data-empty="true"] .eyebrow,
  body[data-active-module="battery"].is-authenticated #batteryResultPanel[data-empty="true"] .decision-box p:last-child {
    display: none;
  }

  body[data-active-module="battery"].is-authenticated #batteryResultPanel[data-empty="true"] .decision-box {
    padding: 8px 0;
  }

  body[data-active-module="hs"].is-authenticated #productForm > .panel-heading > .ghost-button {
    align-self: flex-start;
    max-width: 100%;
    white-space: normal;
  }

  .risk-input-needed {
    flex-direction: column;
    gap: 9px;
    padding: 15px;
  }
}
