:root {
  --branding-dark: #0aa3bd;
  --branding-light: #73c8d6;
  --text: #4f4f4f;
  --text-strong: #2f2f2f;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-muted: #f8fbfc;
  --border: #d9e7eb;
  --border-strong: #c8dbe1;
  --success-bg: #eef8fa;
  --warning-bg: #fff5ef;
  --warning-border: #f1d2bf;
  --shadow: 0 8px 24px rgba(10, 163, 189, 0.08);
  --radius: 8px;
  --container: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--branding-light);
  text-decoration: none;
}

a:hover {
  color: var(--branding-dark);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 96px;
}

.hero {
  padding: 16px 0 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--branding-dark);
}

.topbar-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-links a {
  color: var(--text);
  font-weight: 500;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  padding: 32px 0 8px;
}

.hero-copy,
.hero-summary,
.info-card,
.panel,
.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-summary {
  padding: 32px;
}

.hero-copy h1,
.section-heading h2,
.modal-header h2,
.crisis-panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.2;
}

.hero-copy h1 {
  font-size: 2.5rem;
  max-width: 12ch;
}

.eyebrow,
.card-kicker,
.summary-label,
.badge {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--branding-dark);
}

.hero-text,
.section-note,
.modal-header p,
.support-toggle p,
.form-heading p,
.info-card p,
.summary-card p,
.result-copy p {
  color: var(--text);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.button-primary {
  background: var(--branding-dark);
  border-color: var(--branding-dark);
  color: #fff;
}

.button-primary:hover {
  background: #08879c;
  border-color: #08879c;
  color: #fff;
}

.button-secondary {
  background: #fff;
  border-color: var(--branding-dark);
  color: var(--branding-dark);
}

.button-secondary:hover {
  background: #eef8fa;
}

.hero-summary {
  display: grid;
  gap: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.summary-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.accent-card {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfd 100%);
}

.summary-metric {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--branding-dark);
}

.content {
  display: grid;
  gap: 24px;
}

.insight-strip,
.dashboard-grid,
.operations-grid,
.journey-layout {
  display: grid;
  gap: 20px;
}

.insight-strip {
  grid-template-columns: repeat(3, 1fr);
}

.info-card,
.panel {
  padding: 24px;
}

.panel-section {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.section-heading h2 {
  font-size: 2rem;
}

.section-note {
  max-width: 44ch;
  margin: 0;
}

.journey-layout {
  grid-template-columns: 1.3fr 0.82fr;
}

.dashboard-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.operations-grid {
  grid-template-columns: repeat(3, 1fr);
}

.panel-heading,
.form-heading,
.support-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-heading {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.form-heading h3,
.panel h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.25rem;
}

.form-group {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

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

label,
fieldset {
  display: grid;
  gap: 8px;
}

label > span,
legend {
  font-weight: 600;
  color: var(--text-strong);
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--text-strong);
}

input:focus,
textarea:focus {
  outline: 0;
  border-color: var(--branding-light);
  box-shadow: 0 0 0 3px rgba(115, 200, 214, 0.18);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.support-callout,
.status-card,
.metric-row,
.consent-panel,
.result-card,
.category-group {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.support-callout {
  padding: 20px;
}

.switch-row,
.consent-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.switch-row input,
.consent-panel input,
.category-group input {
  width: auto;
  margin-top: 3px;
}

.support-section,
.category-columns {
  display: grid;
  gap: 16px;
}

.category-columns {
  grid-template-columns: repeat(3, 1fr);
}

.category-group {
  padding: 16px;
}

.category-group label {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--text);
}

.consent-panel {
  padding: 16px;
}

.check-list,
.timeline {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.check-list li,
.timeline li {
  margin-bottom: 10px;
}

.badge {
  margin: 0;
  padding: 6px 10px;
  background: #eef8fa;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.badge-soft {
  color: var(--branding-dark);
}

.status-card,
.metric-row {
  padding: 16px;
}

.status-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--text);
}

.metric-stack {
  display: grid;
  gap: 12px;
}

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

.metric-row strong,
.status-card strong {
  color: var(--text-strong);
}

.result-card {
  margin-top: 18px;
  padding: 20px;
}

.result-card.success {
  background: var(--success-bg);
}

.result-card.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

pre {
  margin: 0;
  min-height: 240px;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  background: #fff;
  color: var(--text-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.floating-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
  padding: 14px 18px;
  border: 1px solid var(--branding-dark);
  border-radius: 4px;
  background: var(--branding-dark);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal.hidden,
.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 47, 47, 0.45);
}

.modal-panel {
  position: relative;
  width: min(960px, calc(100% - 24px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 24px;
  overflow: auto;
}

.modal-header {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text-strong);
  cursor: pointer;
}

.crisis-panel {
  width: min(640px, calc(100% - 24px));
}

.resource-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--branding-dark);
  border-radius: 4px;
  color: var(--branding-dark);
  background: #fff;
}

@media (max-width: 1120px) {
  .hero-grid,
  .journey-layout,
  .dashboard-grid,
  .operations-grid,
  .insight-strip {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 20px, 100%);
  }

  .topbar,
  .topbar-links,
  .summary-grid,
  .category-columns,
  .grid-two,
  .status-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-summary,
  .panel,
  .info-card,
  .modal-panel {
    padding: 20px;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: 2rem;
  }

  .floating-widget {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
  }
}
