/* Connecticut LTCOP dashboard layer for the nursing home staffing suite. */
:root {
  --ltcop-navy: #173761;
  --ltcop-navy-deep: #102744;
  --ltcop-red: #e3212b;
  --ltcop-bg: #f4f7fb;
  --ltcop-card: #ffffff;
  --ltcop-border: #d8e1ee;
  --ltcop-muted: #5f6f85;
  --ltcop-info: #eaf4ff;
  --ltcop-warning: #fff7e6;
  --ltcop-danger-soft: #fff1f2;
  --ltcop-focus: #2f6fed;
}

body.ltcop-dashboard {
  color: var(--ltcop-navy-deep);
  background: var(--ltcop-bg);
}

body.ltcop-dashboard a {
  color: var(--ltcop-navy);
}

body.ltcop-dashboard a:focus,
body.ltcop-dashboard button:focus,
body.ltcop-dashboard input:focus,
body.ltcop-dashboard select:focus,
body.ltcop-dashboard summary:focus {
  outline: 3px solid var(--ltcop-focus);
  outline-offset: 3px;
}

body.ltcop-dashboard .skipLink {
  background: var(--ltcop-navy-deep);
  color: #fff;
}

.ltcop-masthead {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #fff;
  border-bottom: 1px solid var(--ltcop-border);
  box-shadow: 0 2px 12px rgba(16,39,68,0.08);
}

.ltcop-masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.ltcop-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(100%, 420px);
}

.ltcop-logo {
  display: block;
  width: clamp(180px, 28vw, 310px);
  height: auto;
}

.ltcop-suite-title {
  font-weight: 900;
  color: var(--ltcop-navy-deep);
  line-height: 1.15;
}

.ltcop-suite-subtitle {
  margin-top: 3px;
  color: var(--ltcop-muted);
  font-size: 13px;
}

.ltcop-official-link {
  white-space: nowrap;
  font-weight: 800;
  font-size: 13px;
}

.ltcop-suite-nav {
  background: var(--ltcop-navy-deep);
}

.ltcop-suite-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}

body.ltcop-dashboard .ltcop-suite-nav a {
  color: #f8fbff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid transparent;
}

body.ltcop-dashboard .ltcop-suite-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.34);
}

body.ltcop-dashboard .ltcop-suite-nav a:focus {
  color: #fff;
  background: rgba(255,255,255,0.16);
  border-color: #fff;
  outline-color: #fff;
}

body.ltcop-dashboard .ltcop-suite-nav a[aria-current="page"] {
  color: #fff;
  background: #244b7b;
  border-color: rgba(255,255,255,0.72);
  box-shadow: inset 0 -3px 0 var(--ltcop-red);
}

body.ltcop-dashboard .wrap {
  width: min(1180px, 94vw);
}

body.ltcop-dashboard .panel,
body.ltcop-dashboard .card {
  color: var(--ltcop-navy-deep);
  background: var(--ltcop-card);
  border: 1px solid var(--ltcop-border);
  box-shadow: 0 10px 24px rgba(16,39,68,0.06);
  backdrop-filter: none;
}

body.ltcop-dashboard .hero {
  min-height: auto;
}

body.ltcop-dashboard .subtle,
body.ltcop-dashboard .microcopy,
body.ltcop-dashboard .eyebrow {
  color: var(--ltcop-muted);
}

body.ltcop-dashboard h1,
body.ltcop-dashboard h2,
body.ltcop-dashboard h3 {
  color: var(--ltcop-navy-deep);
}

body.ltcop-dashboard .pill,
body.ltcop-dashboard .tag {
  color: var(--ltcop-navy);
  background: var(--ltcop-info);
  border-color: #c9def4;
}

body.ltcop-dashboard .notice {
  color: var(--ltcop-navy-deep);
  background: var(--ltcop-info);
  border-color: #c9def4;
}

body.ltcop-dashboard .notice.warning {
  background: var(--ltcop-warning);
  border-color: #f1d398;
}

body.ltcop-dashboard .notice.error {
  background: var(--ltcop-danger-soft);
  border-color: #f4b7bd;
}

.source-currency-card {
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--ltcop-navy-deep);
  background: #f8fbff;
  border: 1px solid var(--ltcop-border);
  border-left: 4px solid var(--ltcop-navy);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(16,39,68,0.05);
}

.source-currency-card p {
  margin: 4px 0 0;
}

.source-currency-kicker {
  color: var(--ltcop-navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-currency-link {
  font-size: 13px;
  font-weight: 800;
}

body.ltcop-dashboard input,
body.ltcop-dashboard select {
  color: var(--ltcop-navy-deep);
  background: #fff;
  border: 1px solid #b9c7d8;
}

body.ltcop-dashboard input::placeholder,
body.ltcop-dashboard textarea::placeholder {
  color: #65768c;
  opacity: 1;
}

.ltcop-dashboard-hero .panel {
  display: grid;
  gap: 14px;
  border-top: 5px solid var(--ltcop-red);
}

.ltcop-hero-actions,
.ltcop-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.ltcop-dashboard .btn,
body.ltcop-dashboard button.action-button {
  color: #fff;
  background: var(--ltcop-navy);
  border: 1px solid var(--ltcop-navy);
  border-radius: 7px;
  box-shadow: none;
}

body.ltcop-dashboard .btn.secondary,
body.ltcop-dashboard .linkBtn,
body.ltcop-dashboard button.action-button.secondary {
  color: var(--ltcop-navy);
  background: #fff;
  border: 1px solid #9fb3cb;
}

body.ltcop-dashboard .btn:hover,
body.ltcop-dashboard .linkBtn:hover,
body.ltcop-dashboard button.action-button:hover {
  transform: none;
  filter: brightness(0.98);
}

.ltcop-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.ltcop-tool-card {
  display: grid;
  gap: 10px;
  border-top: 4px solid var(--ltcop-navy);
}

.ltcop-tool-card.featured {
  border-top-color: var(--ltcop-red);
}

.ltcop-question {
  padding: 10px;
  border-radius: 8px;
  background: #f7fafd;
  border: 1px solid var(--ltcop-border);
}

.ltcop-provider-banner {
  display: grid;
  gap: 12px;
}

.ltcop-provider-heading {
  display: grid;
  gap: 6px;
}

.ltcop-provider-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 0;
}

.ltcop-provider-meta div,
body.ltcop-dashboard .staffing-summary-list div {
  background: #f8fbff;
  border-color: var(--ltcop-border);
}

.screening-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.screening-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid var(--ltcop-border);
  background: #fff;
}

.screening-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ltcop-navy);
}

.screening-badge.attention {
  color: #8a1f2d;
  background: #fff7f7;
  border-color: #f0b7bd;
}

.screening-badge.attention::before {
  background: var(--ltcop-red);
}

.screening-badge.context {
  color: #6b4a00;
  background: #fffbeb;
  border-color: #ead083;
}

.screening-badge.context::before {
  background: #b7791f;
}

.screening-note {
  margin-top: 8px;
  color: var(--ltcop-muted);
  font-size: 13px;
}

body.ltcop-dashboard .staffing-metrics {
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

body.ltcop-dashboard .staffing-metric {
  border-top: 4px solid #c9def4;
}

body.ltcop-dashboard .staffing-metric strong {
  color: var(--ltcop-navy);
}

body.ltcop-dashboard .ct-comparison-card {
  border-top-color: var(--ltcop-red);
}

body.ltcop-dashboard .comparison-note {
  color: var(--ltcop-navy-deep);
  background: #f8fbff;
  border-color: var(--ltcop-border);
}

body.ltcop-dashboard .care-compare-rating-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

body.ltcop-dashboard .rating-card {
  background: #fff;
  border-color: var(--ltcop-border);
  box-shadow: 0 4px 12px rgba(16,39,68,0.05);
}

body.ltcop-dashboard .rating-value {
  color: var(--ltcop-navy);
}

body.ltcop-dashboard .star-filled {
  color: #c47d00;
}

body.ltcop-dashboard .star-empty {
  color: #b4c0cf;
}

.ltcop-disclosure {
  background: #fff;
  border: 1px solid var(--ltcop-border);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 8px 20px rgba(16,39,68,0.05);
}

.ltcop-disclosure + .ltcop-disclosure {
  margin-top: 12px;
}

.ltcop-disclosure > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: var(--ltcop-navy-deep);
  list-style-position: inside;
}

.ltcop-disclosure-body {
  padding: 0 16px 16px;
}

body.ltcop-dashboard table {
  background: #fff;
}

body.ltcop-dashboard thead th {
  color: #fff;
  background: var(--ltcop-navy);
  border-top: 0;
}

body.ltcop-dashboard tbody th,
body.ltcop-dashboard td {
  color: var(--ltcop-navy-deep);
}

body.ltcop-dashboard .statewide-hero,
body.ltcop-dashboard .change-hero,
body.ltcop-dashboard .patterns-hero,
body.ltcop-dashboard .ownership-hero,
body.ltcop-dashboard .methodology-hero {
  padding-top: 26px;
}

body.ltcop-dashboard .statewide-hero .panel,
body.ltcop-dashboard .change-hero .panel,
body.ltcop-dashboard .patterns-hero .panel,
body.ltcop-dashboard .ownership-hero .panel,
body.ltcop-dashboard .methodology-hero .panel {
  border-top: 5px solid var(--ltcop-red);
}

body.ltcop-dashboard .summary-card,
body.ltcop-dashboard .dataset-fact,
body.ltcop-dashboard .summary-cell,
body.ltcop-dashboard .metric-card {
  color: var(--ltcop-navy-deep);
  background: #fff;
  border: 1px solid var(--ltcop-border);
  box-shadow: 0 6px 16px rgba(16,39,68,0.05);
}

body.ltcop-dashboard .summary-card strong,
body.ltcop-dashboard .dataset-fact strong,
body.ltcop-dashboard .summary-cell dd,
body.ltcop-dashboard .metric-card strong {
  color: var(--ltcop-navy);
}

body.ltcop-dashboard .summary-label,
body.ltcop-dashboard .summary-cell dt {
  color: var(--ltcop-muted);
  letter-spacing: 0.06em;
}

body.ltcop-dashboard .filter-grid,
body.ltcop-dashboard .field-row,
body.ltcop-dashboard .pattern-control-grid {
  align-items: end;
}

body.ltcop-dashboard .sort-row,
body.ltcop-dashboard .mode-row,
body.ltcop-dashboard .action-row,
body.ltcop-dashboard .report-actions,
body.ltcop-dashboard .pattern-mode-row {
  gap: 9px;
}

body.ltcop-dashboard button.sort-button,
body.ltcop-dashboard button.statewide-sort-button,
body.ltcop-dashboard button.mode-button,
body.ltcop-dashboard button.affiliation-pattern-mode-button,
body.ltcop-dashboard button.action-button {
  color: var(--ltcop-navy);
  background: #fff;
  border: 1px solid #9fb3cb;
  border-radius: 7px;
  box-shadow: none;
}

body.ltcop-dashboard button.sort-button[aria-pressed="true"],
body.ltcop-dashboard button.statewide-sort-button[aria-pressed="true"],
body.ltcop-dashboard button.mode-button[aria-pressed="true"],
body.ltcop-dashboard button.affiliation-pattern-mode-button[aria-pressed="true"] {
  color: #fff;
  background: var(--ltcop-navy);
  border-color: var(--ltcop-navy);
}

body.ltcop-dashboard button.action-button {
  color: #fff;
  background: var(--ltcop-navy);
  border-color: var(--ltcop-navy);
}

body.ltcop-dashboard button.action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.ltcop-dashboard button.link-button {
  color: var(--ltcop-navy);
}

body.ltcop-dashboard .table-scroll {
  background: #fff;
  border-color: var(--ltcop-border);
  box-shadow: 0 8px 20px rgba(16,39,68,0.04);
}

body.ltcop-dashboard caption {
  color: var(--ltcop-muted);
  background: #f8fbff;
}

body.ltcop-dashboard .status-pill,
body.ltcop-dashboard .small-group-label {
  color: var(--ltcop-navy);
  background: var(--ltcop-info);
  border: 1px solid #c9def4;
}

body.ltcop-dashboard .status-pill.warning,
body.ltcop-dashboard .small-group-label {
  color: #6b4a00;
  background: #fffbeb;
  border-color: #ead083;
}

body.ltcop-dashboard .positive {
  color: #0f6b3d;
}

body.ltcop-dashboard .negative {
  color: #9f1d2d;
}

body.ltcop-dashboard .briefing-summary-fallback textarea {
  background: #fff;
}

body.ltcop-dashboard .pattern-legend {
  color: var(--ltcop-muted);
}

body.ltcop-dashboard .pattern-marker,
body.ltcop-dashboard .legend-marker {
  color: var(--ltcop-navy-deep);
  background: #fff;
  border-color: var(--ltcop-border);
}

body.ltcop-dashboard .pattern-marker.match,
body.ltcop-dashboard .legend-marker.match {
  background: #fffbeb;
  border-color: #ead083;
}

body.ltcop-dashboard .pattern-marker.nonmatch,
body.ltcop-dashboard .legend-marker.nonmatch {
  background: #f0f8f4;
  border-color: #b8d9c5;
}

body.ltcop-dashboard .pattern-marker.unavailable,
body.ltcop-dashboard .legend-marker.unavailable {
  color: var(--ltcop-muted);
  background: #f7f8fa;
  border-color: #d7dde6;
}

body.ltcop-dashboard .formula-list li {
  color: var(--ltcop-navy-deep);
  background: #fff;
  border-color: var(--ltcop-border);
}

.ltcop-trend-chart {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--ltcop-border);
  border-radius: 10px;
  background: #fff;
}

.survey-snapshot-shell {
  display: grid;
  gap: 16px;
}

.survey-snapshot-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.survey-snapshot-intro h3,
.survey-snapshot-subheading,
.survey-snapshot-cautions h3 {
  margin: 0 0 6px;
}

.survey-snapshot-intro > div {
  flex: 1 1 420px;
}

.survey-snapshot-intro p {
  margin: 0;
}

.survey-snapshot-separation {
  display: inline-flex;
  max-width: 280px;
  padding: 6px 9px;
  border: 1px solid #c9def4;
  border-radius: 999px;
  color: var(--ltcop-navy);
  background: var(--ltcop-info);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}

.survey-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin: 0;
}

.survey-snapshot-dates {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.survey-snapshot-stat {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--ltcop-border);
  border-radius: 9px;
  background: #f8fbff;
}

.survey-snapshot-stat dt {
  color: var(--ltcop-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.survey-snapshot-stat dd {
  margin: 7px 0 0;
  color: var(--ltcop-navy-deep);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.survey-snapshot-stat span {
  display: block;
  margin-top: 5px;
  color: var(--ltcop-muted);
  font-size: 12px;
  line-height: 1.35;
}

.survey-snapshot-details {
  padding: 11px 12px;
  border: 1px solid var(--ltcop-border);
  border-radius: 9px;
  background: #fff;
}

.survey-snapshot-details > summary {
  color: var(--ltcop-navy);
  cursor: pointer;
  font-weight: 850;
}

.survey-snapshot-details[open] > summary {
  margin-bottom: 10px;
}

.survey-snapshot-cautions {
  padding: 12px 14px;
  border-left: 4px solid #d69e00;
  border-radius: 8px;
  background: var(--ltcop-warning);
}

.survey-snapshot-cautions ul {
  margin: 0;
  padding-left: 20px;
}

.survey-snapshot-cautions li {
  margin: 5px 0;
}

.survey-detail-launch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--ltcop-border);
}

.survey-detail-area[hidden] {
  display: none;
}

.survey-detail-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ltcop-border);
  border-radius: 10px;
  background: #f8fbff;
}

.survey-detail-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.survey-detail-heading > div {
  flex: 1 1 420px;
}

.survey-detail-heading h3,
.survey-detail-heading p {
  margin: 0;
}

.survey-detail-heading h3 {
  scroll-margin-top: 100px;
}

.survey-detail-heading p {
  margin-top: 5px;
}

.survey-detail-sections {
  display: grid;
  gap: 11px;
}

.survey-detail-section {
  border: 1px solid var(--ltcop-border);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}

.survey-detail-section > summary {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: var(--ltcop-navy-deep);
  cursor: pointer;
  font-weight: 850;
}

.survey-detail-section > summary span:last-child {
  color: var(--ltcop-muted);
  font-size: 13px;
  white-space: nowrap;
}

.survey-detail-section-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--ltcop-border);
}

.survey-detail-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.survey-detail-record {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--ltcop-border);
  border-radius: 8px;
  background: #fff;
}

.survey-detail-record header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--ltcop-muted);
  font-size: 13px;
}

.survey-detail-code {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  background: var(--ltcop-navy);
  font-weight: 850;
  letter-spacing: 0.02em;
}

.survey-detail-description,
.survey-detail-record .microcopy,
.survey-detail-record-note,
.survey-detail-empty {
  margin: 0;
}

.survey-detail-description {
  color: var(--ltcop-navy-deep);
  line-height: 1.45;
}

.survey-detail-record-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.survey-detail-record-meta div {
  min-width: 0;
}

.survey-detail-record-meta dt {
  color: var(--ltcop-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.survey-detail-record-meta dd {
  margin: 3px 0 0;
  color: var(--ltcop-navy-deep);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.survey-detail-record-note {
  padding: 8px 10px;
  border-left: 3px solid #d69e00;
  background: var(--ltcop-warning);
  line-height: 1.4;
}

.survey-detail-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ltcop-muted);
  font-size: 13px;
}

.survey-detail-progress span {
  margin-right: auto;
}

.survey-detail-retry {
  margin-top: 10px;
}

.survey-detail-caution {
  padding: 11px 13px;
  border-left: 4px solid #d69e00;
  border-radius: 8px;
  background: var(--ltcop-warning);
  line-height: 1.45;
}

.ltcop-trend-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-line-total {
  stroke: #5b7fa8;
}

.chart-line-direct {
  stroke: var(--ltcop-red);
}

.chart-line-reference {
  stroke: var(--ltcop-navy);
  stroke-dasharray: 5 5;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--ltcop-muted);
  font-size: 12px;
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
  background: var(--ltcop-navy);
}

.chart-legend .direct::before {
  background: var(--ltcop-red);
}

.chart-legend .total::before {
  background: #5b7fa8;
}

.ltcop-footer {
  margin-top: 18px;
  padding-bottom: 30px;
}

.ltcop-footer .panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.ltcop-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 760px) {
  .ltcop-masthead-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .ltcop-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .ltcop-logo {
    width: min(250px, 84vw);
  }

  .survey-snapshot-dates {
    grid-template-columns: 1fr;
  }

  .survey-detail-record-list,
  .survey-detail-record-meta {
    grid-template-columns: 1fr;
  }

  .survey-detail-panel {
    padding: 11px;
  }

  .survey-detail-heading h3 {
    scroll-margin-top: 190px;
  }
}

@media print {
  .ltcop-masthead,
  .ltcop-suite-nav,
  .ltcop-footer {
    display: none !important;
  }

  body.ltcop-dashboard {
    color: #111827;
    background: #fff;
  }

  body.ltcop-dashboard .panel,
  body.ltcop-dashboard .card,
  .ltcop-disclosure,
  .ltcop-trend-chart {
    box-shadow: none;
    border-color: #d1d5db;
  }
}
