:root {
  --ink: #182634;
  --muted: #5b6b7a;
  --line: #d7dfe6;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --teal: #0b5563;
  --teal-2: #0f7a80;
  --hero-accent: #0b5563;
  --hero-accent-on-photo: #8fd8dc;
  --blue: #21507a;
  --green: #1e7a52;
  --amber: #92620a;
  --red: #a93434;
  --red-bg: #fff1f2;
  --amber-bg: #fff8e8;
  --grid-line: rgba(24, 38, 52, 0.09);
  --shadow: 0 16px 40px rgba(11, 30, 40, 0.12);
  --red-text: #a93434;
  --on-red-bg: #8d3030;
  --red-border: #f2b8b5;
  --amber-border: #f1d19a;
  --on-amber-bg: #4b3108;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --surface-glass-strong: rgba(255, 255, 255, 0.94);
  --surface-glass-muted: rgba(238, 243, 246, 0.96);
  --surface-glass-soft: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --input-bg: #fff;
  --tint: #e6f1f3;
  --tint-accent: #0b5563;
  --on-tint: #0e3a42;
  --info-tint: #eaf2f8;
  --on-info-tint: #1f3d58;
  --success-tint: #eaf6f0;
  --on-success-tint: #215b3d;
  --disabled-bg: #dfe6eb;
  --disabled-ink: #4f5e6b;
  --action-strong-bg: #182634;
  --on-action-strong: #fff;
  /* Homepage frame around the hero photo, and the text that sits on it. */
  --home-canvas: #fff;
  --brand-deep: #183c40;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eef1;
  --muted: #a6b5bc;
  --line: #35464e;
  --surface: #1b292f;
  --surface-2: #111b20;
  --teal: #12616b;
  --teal-2: #67cbd0;
  --blue: #8ab9e4;
  --green: #61c392;
  --amber: #e4b858;
  --red: #963b40;
  --red-bg: #392326;
  --amber-bg: #392f1c;
  --grid-line: rgba(255, 255, 255, 0.075);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  --red-text: #f19a9a;
  --on-red-bg: #f4b3b3;
  --red-border: #754447;
  --amber-border: #6b5524;
  --on-amber-bg: #f0d79e;
  --surface-glass: rgba(27, 41, 47, 0.9);
  --surface-glass-strong: rgba(27, 41, 47, 0.96);
  --surface-glass-muted: rgba(22, 34, 40, 0.96);
  --surface-glass-soft: rgba(17, 27, 32, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: #22343b;
  --tint: #173a40;
  --tint-accent: #8fd8dc;
  --on-tint: #d2eef0;
  --info-tint: #1b3245;
  --on-info-tint: #cfe2f3;
  --success-tint: #16352a;
  --on-success-tint: #9ddcb9;
  --disabled-bg: #2a3a41;
  --disabled-ink: #9aabb3;
  --action-strong-bg: #12616b;
  --on-action-strong: #fff;
  --home-canvas: var(--surface-2);
  --brand-deep: var(--ink);
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/fraunces-900-italic-latin.dc7002043fd0.woff2") format("woff2");
}

@font-face {
  font-family: "Marina Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/LiberationSerif-Bold.3b415ca87293.ttf") format("truetype");
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-2);
  scroll-padding-top: calc(64px + env(safe-area-inset-top));
  scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--surface-2);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.entry-screen,
.client-app {
  min-height: 100vh;
  background: var(--surface-2);
}

@supports (min-height: 100dvh) {
  .entry-screen,
  .client-app,
  .auth-screen { min-height: 100dvh; }
}

.client-app { scroll-padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

@supports (min-height: 100dvh) {
  .entry-screen,
  .client-app,
  .auth-screen { min-height: 100dvh; }
}

.entry-band {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 32px;
  background: transparent;
}

.insurer-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  background: #0b0e13;
}

.insurance-photo-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.insurance-photo-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #0b0e13;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  image-rendering: auto;
}

.insurance-photo-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 8, 12, 0.48), rgba(5, 8, 12, 0.12) 52%, rgba(5, 8, 12, 0.24)),
    linear-gradient(180deg, rgba(5, 8, 12, 0.04), rgba(5, 8, 12, 0.2));
}

.insurance-photo-caption {
  position: absolute;
  top: 50%;
  left: clamp(22px, 8vw, 128px);
  display: flex;
  width: min(360px, 68vw);
  flex-direction: column;
  gap: 8px;
  color: #fff;
  z-index: 2;
  transform: translateY(-50%);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.entry-band .insurance-photo-caption {
  display: none;
}

.insurance-photo-caption span {
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.insurance-photo-caption strong {
  font-size: clamp(1.3rem, 2.8vw, 2.7rem);
  line-height: 1.05;
}

.insurance-photo-caption small {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.82rem, 1.2vw, 1rem);
}

@media (prefers-reduced-motion: reduce) {
  .insurance-photo-stage { animation-duration: 0.01ms; }
}

@media (max-width: 650px) {
  .insurance-photo-caption { left: 22px; width: 52vw; }
}

.entry-content {
  width: min(860px, 100%);
  color: #fff;
}

.entry-content h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.entry-copy {
  max-width: 760px;
  margin: 28px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  line-height: 1.7;
}

.entry-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.entry-toolbar {
  min-height: 48px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 12px 0 0;
}

.client-install-row {
  min-height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.connection-status {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 10px 0 14px;
  padding: 9px 12px;
  border: 1px solid rgba(55, 126, 87, 0.24);
  border-radius: 8px;
  background: var(--success-tint);
  color: var(--on-success-tint);
  font-size: 0.82rem;
  line-height: 1.35;
}

.connection-status.offline {
  border-color: rgba(167, 71, 71, 0.3);
  background: var(--red-bg);
  color: var(--on-red-bg);
}

.connection-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d9a5f;
}

.connection-status.offline .connection-dot {
  background: #c74b4b;
}

.connection-retry {
  min-height: 38px;
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: var(--surface-glass);
  color: inherit;
  font-size: 0.82rem;
  font-weight: 750;
}

.connection-retry:disabled { opacity: 0.65; }

.saved-draft {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: var(--success-tint);
  color: var(--on-success-tint);
}

.saved-draft[hidden] { display: none; }

.access-band {
  align-items: end;
  background: transparent;
}

.access-band .entry-content { color: #fff; }
.access-band .entry-content .eyebrow { color: rgba(255, 255, 255, 0.88); }
.access-band .entry-copy { color: rgba(255, 255, 255, 0.9); }
.access-band .access-content { margin-bottom: clamp(20px, 5vh, 48px); }

@media (max-width: 650px) {
  .access-band .access-content { margin-bottom: 16px; }
}

.access-content {
  width: min(920px, 100%);
}

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

.access-card {
  min-height: 160px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  background: var(--surface-glass-strong);
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 18px 42px rgba(11, 30, 40, 0.16);
}

.access-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.access-card small {
  color: var(--muted);
  line-height: 1.45;
}

.broker-access-card {
  background: var(--surface-glass-muted);
}

.client-chat-band {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: transparent;
}

.client-chat-band > .insurer-backdrop { z-index: -2; }
.client-shell { position: relative; z-index: 1; }
.client-shell .assistant-panel,
.client-shell .workflow-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
}

.client-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.84fr) minmax(320px, 1.16fr);
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.assistant-panel,
.workflow-panel,
.auth-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.assistant-panel {
  min-height: calc(100vh - 36px);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    linear-gradient(180deg, rgba(11, 85, 99, 0.07), transparent),
    var(--surface);
}

.workflow-panel {
  min-height: calc(100vh - 36px);
  padding: 22px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
}

.icon {
  width: 1.3em;
  height: 1.3em;
  flex: 0 0 auto;
}

.brand-mark .icon { width: 24px; height: 24px; }
.tile-icon .icon { width: 22px; height: 22px; }

.eyebrow,
.panel-kicker {
  margin: 0 0 4px;
  color: var(--teal-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-content .eyebrow {
  color: rgba(255, 255, 255, 0.86);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 1.34rem;
}

h2 {
  margin: 0;
  font-size: 1.36rem;
}

h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 100%;
  padding: 13px 14px;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message.ai {
  background: var(--tint);
  color: var(--on-tint);
}

.message.client {
  align-self: flex-end;
  background: var(--info-tint);
  color: var(--on-info-tint);
}

.message.system {
  background: #f2f2f2;
  color: var(--muted);
}

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

.action-tile,
.choice-button {
  min-height: 104px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 16px;
  text-align: left;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.action-tile:hover,
.choice-button:hover {
  border-color: var(--teal-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(11, 85, 99, 0.14);
}

.action-tile strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.action-tile small {
  color: var(--muted);
  line-height: 1.35;
}

.tile-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--tint);
  color: var(--tint-accent);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.back-button,
.text-button,
.ghost-button {
  border: 0;
  background: transparent;
  color: var(--teal-2);
  font-weight: 800;
}

.back-button {
  padding: 8px 0;
}

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

.choice-button {
  min-height: 64px;
  align-items: center;
  font-weight: 800;
}

.choice-button.selected {
  border-color: var(--teal-2);
  background: var(--tint);
}

.progress-track {
  height: 9px;
  width: 100%;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 180ms ease;
}

.question-count,
.help-text,
.panel-copy,
.empty-state,
.source-text {
  color: var(--muted);
  line-height: 1.55;
}

.question-label {
  display: block;
  margin: 20px 0 8px;
  font-size: 1.1rem;
  font-weight: 850;
}

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

.question-field {
  min-width: 0;
}

.question-field-wide {
  grid-column: 1 / -1;
}

.question-grid .question-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 1rem;
}

.field-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.other-company-field {
  margin-top: 10px;
}

.question-field .help-text {
  margin: 0 0 7px;
}

.text-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  scroll-margin-top: calc(70px + env(safe-area-inset-top));
  scroll-margin-bottom: 38vh;
}

.client-app .workflow-panel .button-row {
  position: sticky;
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 5;
  padding: 9px 0 max(9px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
}

textarea.text-field {
  resize: vertical;
}

@media (max-width: 650px) {
  .question-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.text-field:focus {
  border-color: var(--teal-2);
  box-shadow: 0 0 0 3px rgba(116, 88, 184, 0.18);
}

.phone-field-group {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 8px;
}

.country-code-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal-2) 50%),
    linear-gradient(135deg, var(--teal-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  text-overflow: ellipsis;
}

@media (max-width: 420px) {
  .phone-field-group {
    grid-template-columns: 1fr;
  }
}

/* --- Skip link (WCAG 2.4.1 Bypass Blocks) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 0 0 8px 8px;
  background: var(--teal-2);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: 0;
}

/* --- Visible focus for every interactive element --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--teal-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* iOS zooms the page when a focused control is under 16px. Keeping controls at
   16px lets us drop maximum-scale=1 from the viewport without that side effect. */
.text-field,
.country-code-select,
.dashboard-filters input,
.dashboard-filters select {
  font-size: 16px;
}

/* --- Touch targets (WCAG 2.5.8) --- */
.dashboard-action-link,
.task-toggle,
.upload-button,
.password-toggle {
  min-height: 44px;
  min-width: 44px;
}

.dashboard-action-danger {
  color: var(--red-text);
}

.dashboard-btn-danger {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.dashboard-btn-danger:hover,
.dashboard-btn-danger:focus-visible {
  filter: brightness(0.92);
}

/* --- htmx loading indicators --- */
.htmx-indicator {
  display: none;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Service worker update prompt --- */
.sw-update-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.sw-update-banner[hidden] {
  display: none;
}

/* --- Form feedback --- */
.form-error-summary {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: var(--red-bg);
}

.help-text-warn {
  color: #8a5300;
}

.auth-forgot-link {
  margin-top: 14px;
  text-align: center;
  font-size: 0.95rem;
}

/* --- Broker case detail --- */
.breadcrumb {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.case-main,
.case-sidebar {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.case-status-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.case-action-stack {
  display: grid;
  gap: 10px;
}

.case-link {
  font-weight: 800;
}

.attachment-table,
.task-list,
.audit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.attachment-row,
.task-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.task-row-done strong {
  text-decoration: line-through;
  opacity: 0.65;
}

.attachment-meta small,
.task-row small {
  display: block;
  color: #5a6b73;
}

.attachment-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--teal-2);
}

.audit-action {
  font-weight: 700;
}

/* Segmented control panels span the full width of the two-column grid. */
.segmented-panel {
  grid-column: 1 / -1;
}

.task-toggle {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--teal-2);
  cursor: pointer;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--teal-2);
  border-radius: 4px;
}

.audit-list li {
  display: grid;
  grid-template-columns: minmax(130px, auto) 1fr auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.audit-time,
.audit-actor {
  color: #5a6b73;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination-status,
.dashboard-result-count {
  color: #5a6b73;
  font-size: 0.95rem;
}

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

  .audit-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Honour an OS-level request to reduce motion across the whole UI. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Saved views, bulk actions, assignment --- */
.saved-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.saved-view {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.saved-view.active {
  border-color: var(--teal-2);
  background: var(--teal-2);
  color: #fff;
}

.bulk-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--teal-2);
  border-radius: 10px;
  background: var(--surface-2);
}

.select-col {
  width: 40px;
  text-align: center;
}

.row-selected {
  background: var(--surface-2);
}

.muted-text {
  color: var(--muted);
}

/* --- Progress timeline --- */
.progress-timeline {
  display: grid;
  gap: 0;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.progress-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}

.progress-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.progress-step-done:not(:last-child)::before {
  background: var(--teal-2);
}

.progress-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--teal-2);
}

.progress-step-done .progress-marker {
  border-color: var(--teal-2);
  background: var(--teal-2);
  color: #fff;
}

.progress-step-current .progress-marker {
  border-color: var(--teal-2);
  box-shadow: 0 0 0 4px var(--surface-2);
}

.progress-step small {
  display: block;
  color: var(--muted);
}

.client-case-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-case-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.client-case-row small {
  display: block;
  color: var(--muted);
}

.session-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.session-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.session-row small {
  display: block;
  color: var(--muted);
}

.date-fallback {
  margin-top: 10px;
}

.date-fallback summary {
  cursor: pointer;
  color: var(--teal-2);
  font-size: 0.95rem;
}

.date-parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mfa-qr {
  display: grid;
  place-items: center;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.mfa-qr svg {
  width: 200px;
  height: 200px;
}

.mfa-manual summary {
  cursor: pointer;
  color: var(--teal-2);
  font-size: 0.95rem;
}

.mfa-secret {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  list-style: none;
}

.recovery-codes code {
  font-family: ui-monospace, monospace;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
}

.password-field-wrap {
  position: relative;
}

.password-field {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-2);
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--tint);
  outline: none;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.segmented > button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 850;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.segmented > button:hover {
  border-color: var(--teal-2);
}

.segmented > .active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 85, 99, 0.24);
}

.primary-button,
.secondary-button,
.danger-button,
.upload-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 850;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 85, 99, 0.28);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(11, 85, 99, 0.34);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(11, 85, 99, 0.22);
}

.primary-button:disabled,
.auth-box .primary-button:disabled,
.danger-button:disabled,
.dashboard-btn-primary:disabled,
.dashboard-btn-danger:disabled {
  opacity: 1;
  border-color: transparent;
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

/* .secondary-button is styled for photos; on the portal card it needs card colours. */
.client-install-row .secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--tint-accent);
}

.secondary-local-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--teal);
  font-weight: 850;
}

.danger-button {
  background: var(--red);
  color: #fff;
}

.full-width {
  width: 100%;
}

.upload-box {
  margin: 16px 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface-2);
}

.upload-button {
  width: 100%;
  background: var(--tint);
  color: var(--tint-accent);
}

.upload-progress {
  margin-top: 14px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.attachment-list,
.mini-form,
.summary-block {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.quote-selection {
  display: grid;
  gap: 4px;
}

.attachment-row,
.summary-row,
.answer-box,
.warning-box,
.emergency-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.attachment-row {
  align-items: center;
}

.attachment-row span {
  flex: 1;
  overflow-wrap: anywhere;
}

.attachment-row small {
  color: var(--muted);
}

.summary-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-row {
  justify-content: space-between;
  padding: 0;
  border: 0;
}

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

.summary-row strong {
  max-width: 58%;
  text-align: right;
}

.warning-box {
  margin: 14px 0;
  border-color: var(--amber-border);
  background: var(--amber-bg);
  color: var(--on-amber-bg);
}

.emergency-box {
  border-color: var(--red-border);
  background: var(--red-bg);
}

.emergency-contact-link {
  color: var(--teal-2);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.emergency-selected-contact {
  display: grid;
  gap: 4px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--red-border);
  border-radius: 8px;
  background: var(--red-bg);
}

.emergency-selected-contact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.location-picker {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.location-picker-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--teal);
}

.location-picker-heading strong {
  display: block;
  color: var(--ink);
}

.location-picker-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.location-picker .secondary-button {
  width: 100%;
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.location-link {
  color: var(--teal-2);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.answer-box {
  margin-top: 16px;
  background: var(--surface-2);
}

.error-text {
  color: var(--red-text);
  font-weight: 750;
}

.plain-list {
  margin: 16px 0;
  padding-left: 22px;
  line-height: 1.65;
}

.secondary-actions {
  width: min(1180px, 100%);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin: 0 auto 28px;
  padding: 0 18px;
}

.confirmation-panel {
  display: grid;
  gap: 10px;
  place-items: start;
}

.dashboard-shell,
.auth-screen {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.auth-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  place-items: end center;
  padding: max(32px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left));
  background: transparent;
}

.auth-screen .auth-box {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(20px, 5vh, 48px);
}

.auth-box {
  width: min(440px, 100%);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 60px rgba(31, 20, 52, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.auth-box .brand-row {
  margin-bottom: 6px;
}

.auth-box .button-row {
  margin-top: 24px;
}

.auth-box .button-row .primary-button {
  width: 100%;
}

.auth-box form > .primary-button {
  margin-top: 12px;
}

.admin-login-box .panel-copy {
  margin: 8px 0 6px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.admin-login-form .question-label {
  margin: 8px 0 6px;
  font-size: 0.92rem;
}

.admin-login-form .text-field {
  min-height: 40px;
  padding: 8px 11px;
}

.admin-login-form > .primary-button {
  min-height: 42px;
}

.admin-login-box .auth-signup-link {
  margin-top: 8px;
}

.auth-box .segmented {
  margin-top: 18px;
}

.auth-return-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal-2);
  font-weight: 850;
}

.verification-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.verification-actions .auth-return-link {
  margin-bottom: 0;
  min-height: 48px;
}

.verification-actions #resend-panel {
  flex: 1 1 230px;
  min-width: 0;
}

.auth-signup-link {
  margin: 20px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-signup-link a {
  color: var(--teal-2);
  font-weight: 850;
}

.google-login-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  border: 1px solid #c9c2d9;
  border-radius: 10px;
  padding: 12px 18px;
  background: #fff;
  color: #2d243c;
  font-weight: 850;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

#google-signin-panel,
#google-signin-button,
#google-signin-button > div,
#google-signin-button iframe {
  width: 100% !important;
  max-width: 100%;
}

.google-login-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.google-login-button:hover:not(:disabled),
.google-login-button:focus-visible:not(:disabled) {
  border-color: var(--teal-2);
  outline: none;
  box-shadow: 0 8px 20px rgba(116, 88, 184, 0.18);
  transform: translateY(-1px);
}

.google-login-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

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

  .assistant-panel,
  .workflow-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .entry-band,
  .dashboard-shell,
  .auth-screen {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .client-chat-band {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .assistant-panel,
  .workflow-panel,
  .auth-box {
    padding: 16px;
    box-shadow: none;
  }

  .auth-screen .auth-box { margin-bottom: 16px; }
  .auth-screen .admin-login-box {
    margin-bottom: 16px;
    transform: translateY(-20px);
  }

  .action-grid,
  .access-grid,
  .choice-list {
    grid-template-columns: 1fr;
  }

  .action-tile {
    min-height: 88px;
  }

  .summary-row {
    display: grid;
  }

  .summary-row strong {
    max-width: none;
    text-align: left;
  }
}

/* --- Translucent Django message toasts --- */
.toast-stack {
  position: fixed;
  z-index: 100;
  top: 66px;
  right: 18px;
  display: grid;
  width: min(420px, calc(100vw - 36px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: start;
  padding: 12px 12px 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-left: 4px solid var(--teal-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(11, 30, 40, 0.17);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-message { min-width: 0; overflow-wrap: anywhere; }

.toast-dismiss {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.toast-dismiss:hover,
.toast-dismiss:focus-visible {
  background: rgba(24, 38, 52, 0.08);
  color: var(--ink);
}

.toast-dismiss .icon { width: 16px; height: 16px; }
.toast-dismissed { opacity: 0; transform: translateY(-6px); }
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-warning { border-left-color: #c18a16; }
.flash-info { border-left-color: var(--blue); }

@media (max-width: 520px) {
  .toast-stack { top: 60px; right: 10px; width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

[x-cloak] {
  display: none !important;
}

.client-consent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: var(--surface-glass-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.consent-box input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.client-consent small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.disabled-overlay {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.3);
}

.landing-section {
  padding: clamp(48px, 8vh, 96px) 32px;
  background: var(--surface);
}

.landing-section-alt {
  background: var(--surface-2);
}

.landing-section-grid {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Faded graph-paper grid behind the section content. */
.landing-section-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 45%, transparent 100%);
}

.landing-container {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.section-eyebrow {
  margin: 0 0 6px;
  color: var(--teal-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.section-lede {
  max-width: 640px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.how-column-label {
  margin: 0 0 16px;
  color: var(--teal);
  font-weight: 850;
  font-size: 1.05rem;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.how-steps strong {
  display: block;
  margin-bottom: 4px;
}

.how-steps small {
  color: var(--muted);
  line-height: 1.5;
}

.how-step-num {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 850;
  font-size: 0.9rem;
}

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

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-card strong {
  font-size: 1.05rem;
}

.feature-card small {
  color: var(--muted);
  line-height: 1.5;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 760px;
}

.contact-section {
  scroll-margin-top: 76px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.contact-method .tile-icon {
  flex: 0 0 auto;
}

.contact-method > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.contact-method small {
  color: var(--muted);
}

.contact-method strong {
  overflow-wrap: anywhere;
}

.contact-method:hover strong,
.contact-method:focus-visible strong {
  color: var(--teal-2);
}

.contact-section-actions {
  margin-top: 28px;
}

/* --- Standalone "Get in touch" page --- */
.contact-page {
  padding: clamp(40px, 7vh, 88px) 24px clamp(56px, 9vh, 104px);
  background: var(--surface-2);
}

.contact-page-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.contact-page-head {
  margin-bottom: clamp(36px, 6vh, 64px);
  text-align: center;
}

.contact-page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
}

.contact-page-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.contact-column-title {
  margin: 0 0 24px;
  font-size: 1.3rem;
  text-align: center;
}

.contact-card-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(11, 30, 40, 0.05);
  text-align: center;
}

.contact-card-icon .icon {
  width: 26px;
  height: 26px;
}

.contact-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.contact-card-link {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.contact-card-link:hover,
.contact-card-link:focus-visible {
  color: var(--teal-2);
}

.contact-form {
  display: grid;
  gap: 26px;
}

.contact-field {
  position: relative;
  min-width: 0;
}

/* Sits on the border line, so its background must match the page behind it. */
.contact-field-label {
  position: absolute;
  top: -9px;
  left: 16px;
  padding: 0 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
}

.contact-input {
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.contact-input::placeholder {
  color: var(--muted);
}

.contact-input:focus {
  border-color: var(--teal-2);
}

.contact-textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: start;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--action-strong-bg);
  color: var(--on-action-strong);
  font-size: 1rem;
  font-weight: 800;
  transition: transform 150ms ease, opacity 150ms ease;
}

.contact-submit:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.contact-submit-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 800px) {
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .contact-submit {
    justify-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-submit {
    transition: none;
  }

  .contact-submit:hover {
    transform: none;
  }
}

.cta-band {
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff;
  text-align: center;
}

.cta-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-title {
  color: #fff;
}

.cta-lede {
  color: rgba(255, 255, 255, 0.88);
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  justify-content: center;
}

.cta-band .secondary-local-button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.cta-band .secondary-local-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 800px) {
  .how-it-works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .contact-methods {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  padding: 18px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
}

.cookie-consent-banner {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.cookie-consent-banner .button-row {
  margin-top: 10px;
  justify-content: flex-end;
}

/* --- Site-wide AI assistant --- */
/* Scopes the Alpine component only; the button and panel position themselves. */
.ai-assistant {
  display: contents;
}

.ai-nav-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(11, 85, 99, 0.26);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.ai-nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(11, 85, 99, 0.32);
}

.ai-nav-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #7ee0c4;
}

.site-header-mobile-panel .ai-nav-button {
  justify-content: center;
}

.ai-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 85, 99, 0.38);
  transition: transform 160ms ease;
}

.ai-fab:hover {
  transform: scale(1.05);
}

.ai-fab .icon {
  width: 25px;
  height: 25px;
}

.ai-panel {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 68px);
  z-index: 71;
  display: grid;
  gap: 12px;
  width: min(384px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 140px));
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 48px rgba(11, 30, 40, 0.26);
}

.ai-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.ai-panel-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--tint);
  color: var(--tint-accent);
}

.ai-panel-head h2 {
  margin: 0;
  font-size: 1rem;
}

.ai-panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.ai-panel-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.ai-panel-close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.ai-panel-close .icon {
  width: 17px;
  height: 17px;
}

.ai-panel-log {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ai-message {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.ai-message p {
  margin: 0;
  white-space: pre-line;
}

.ai-message-bot {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: var(--surface-2);
  color: var(--ink);
}

.ai-message-user {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--teal);
  color: #fff;
}

.ai-message-action {
  display: inline-block;
  margin-top: 8px;
  color: var(--teal-2);
  font-weight: 800;
  text-decoration: underline;
}

.ai-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 1.5em;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: ai-typing-bounce 1.1s infinite ease-in-out;
}

.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-typing-bounce {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: min(160px, 24vh);
  overflow-y: auto;
}

.ai-chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

.ai-chip:hover {
  border-color: var(--teal-2);
  color: var(--teal-2);
}

.ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.ai-form input {
  min-height: 44px;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.ai-form button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
}

.ai-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ai-form button .icon {
  width: 18px;
  height: 18px;
}

.ai-panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .ai-panel {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    width: auto;
  }
}

/* Keep the cookie banner clear of the floating assistant button. */
@media (max-width: 700px) {
  .cookie-consent-banner {
    bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-nav-button,
  .ai-fab {
    transition: none;
  }

  .ai-nav-button:hover,
  .ai-fab:hover {
    transform: none;
  }

  .ai-typing span {
    animation: none;
  }
}

/* Site header + mobile nav */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header-home {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header-home .site-header-logo,
.site-header-home .site-header-nav a,
.site-header-home .site-header-menu-toggle {
  color: #fff;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.site-header-home .site-header-logo .icon {
  color: #fff;
}

.site-header-home .site-header-menu-toggle {
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.site-header-home.site-header-scrolled {
  background: var(--surface);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 22px rgba(11, 30, 40, 0.12);
}

.site-header-home.site-header-scrolled .site-header-logo,
.site-header-home.site-header-scrolled .site-header-nav a,
.site-header-home.site-header-scrolled .site-header-menu-toggle {
  color: var(--ink);
}

.site-header-home.site-header-scrolled .site-header-logo .icon {
  color: var(--teal);
}

.site-header-home.site-header-scrolled .site-header-menu-toggle {
  border-color: var(--line);
  background: var(--surface);
}

.site-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  font-size: 1.05rem;
}

.site-header-logo .icon {
  width: 26px;
  height: 26px;
  color: var(--teal);
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-header-nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.site-header-nav .site-header-app-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.theme-toggle-track {
  width: 32px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #9aa8ae;
  transition: background-color 160ms ease;
}

.theme-toggle-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.theme-toggle[aria-checked="true"] .theme-toggle-track {
  background: var(--teal-2);
}

.theme-toggle[aria-checked="true"] .theme-toggle-thumb {
  transform: translateX(14px);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--teal-2);
  outline-offset: 2px;
}

.site-header-home:not(.site-header-scrolled) .theme-toggle {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(9, 24, 29, 0.9);
  color: #fff;
}

.site-header-mobile-panel .theme-toggle {
  justify-content: flex-start;
  width: 100%;
  margin-top: 4px;
  border-radius: 6px;
}

.site-header-app-link .icon {
  width: 18px;
  height: 18px;
}

.site-header-nav a:hover,
.site-header-nav a:focus-visible {
  color: var(--teal);
}

.site-header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.site-header-mobile-panel {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  left: auto;
  display: flex;
  width: min(340px, calc(100vw - 40px));
  max-height: calc(100dvh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(11, 30, 40, 0.2);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.site-header-mobile-panel a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
}

.site-header-mobile-panel a:hover,
.site-header-mobile-panel a:focus-visible {
  background: var(--tint);
  color: var(--tint-accent);
  outline: none;
}

@media (max-width: 780px) {
  .site-header-nav {
    display: none;
  }

  .site-header-menu-toggle {
    display: inline-flex;
  }
}

/* Legal pages (privacy, terms, cookies) */
.legal-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: clamp(24px, 5vw, 56px) 20px 64px;
  background: var(--surface-2);
  min-height: calc(100vh - 64px);
}

.legal-panel {
  width: min(760px, 100%);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.legal-panel h1 {
  margin: 4px 0 14px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.legal-panel h2 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
}

.legal-panel p {
  color: var(--ink);
  line-height: 1.6;
}

.legal-panel .source-text {
  margin-top: 10px;
}

.cookie-table {
  width: 100%;
  margin: 12px 0 8px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.cookie-table th,
.cookie-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.cookie-table th {
  background: var(--surface-2);
  font-weight: 800;
}

.error-panel {
  text-align: center;
}

.error-panel-mark {
  margin: 0 auto 18px;
}

.error-panel-actions {
  justify-content: center;
}

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  color: var(--ink);
}

.error-page-header,
.error-page-footer {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.error-page-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.error-page-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.error-page-brand .icon {
  width: 34px;
  height: 40px;
  color: var(--brand-deep);
}

.error-page-brand span {
  display: grid;
  gap: 1px;
}

.error-page-brand strong {
  font-family: "Marina Serif", Georgia, serif;
  font-size: 1.1rem;
}

.error-page-brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.error-page-contact,
.error-page-footer a {
  color: var(--tint-accent);
  font-weight: 700;
  text-decoration: none;
}

.error-page-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.error-page-main .error-panel {
  width: min(680px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.error-page-main .error-panel h1 {
  margin: 4px 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.error-page-main .error-panel .panel-copy {
  max-width: 48ch;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.65;
}

.error-page-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .error-page-header,
  .error-page-footer {
    padding-inline: 16px;
  }

  .error-page-main {
    padding: 24px 16px;
  }

  .error-page-main .button-row {
    flex-direction: column;
    align-items: stretch;
  }
}


/* --- Broker dashboard --- */
.dashboard-shell {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: clamp(20px, 4vw, 40px) 20px 64px;
  display: grid;
  gap: 22px;
}

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

.dashboard-heading h1 {
  margin: 0 0 4px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.dashboard-subtitle {
  margin: 0;
  color: var(--muted);
}

.dashboard-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-btn .icon {
  width: 1.1em;
  height: 1.1em;
}

.dashboard-btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.dashboard-btn-secondary {
  background: var(--surface);
  color: var(--ink);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.dashboard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dashboard-card .icon {
  width: 1.6em;
  height: 1.6em;
  color: var(--teal-2);
  flex-shrink: 0;
}

.dashboard-card-urgent {
  border-color: var(--red);
  background: var(--red-bg);
}

.dashboard-card-urgent .icon {
  color: var(--red-text);
}

.dashboard-card-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.dashboard-card-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.dashboard-panel {
  padding: clamp(16px, 3vw, 24px);
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dashboard-panel h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.onboarding-eyebrow {
  margin: 0 0 6px;
  color: var(--teal-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.onboarding-steps,
.onboarding-notes {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--muted);
}

.onboarding-steps {
  display: grid;
  gap: 18px;
}

.onboarding-steps li {
  padding-left: 5px;
}

.onboarding-steps h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.onboarding-steps p,
.onboarding-notes li {
  line-height: 1.6;
}

.onboarding-steps p {
  margin: 0 0 8px;
}

.onboarding-steps a {
  color: var(--teal-2);
  font-weight: 750;
  text-underline-offset: 3px;
}

.onboarding-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.onboarding-notes {
  display: grid;
  gap: 8px;
}

.dashboard-chart {
  display: grid;
  gap: 10px;
}

.dashboard-chart-row {
  display: grid;
  grid-template-columns: 90px 1fr 32px;
  align-items: center;
  gap: 10px;
}

.dashboard-chart-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.dashboard-chart-track {
  height: 12px;
  border-radius: 6px;
  background: var(--surface-2);
  overflow: hidden;
}

.dashboard-chart-bar {
  height: 100%;
  border-radius: 6px;
  background: var(--teal-2);
  transition: width 0.3s ease;
}

.dashboard-chart-bar-urgent {
  background: var(--red);
}

.dashboard-chart-bar-high {
  background: var(--amber);
}

.dashboard-chart-bar-low {
  background: var(--green);
}

.dashboard-chart-value {
  font-weight: 700;
  text-align: right;
}

.dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.dashboard-filters input[type="search"] {
  flex: 1 1 220px;
}

.dashboard-filters input,
.dashboard-filters select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  background: var(--surface);
  color: var(--ink);
}

.dashboard-table-wrap {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dashboard-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.dashboard-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.dashboard-actions {
  display: flex;
  gap: 4px;
}

.dashboard-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-action-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--teal-2);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.dashboard-action-link:hover {
  color: var(--teal);
}

.dashboard-empty {
  color: var(--muted);
  padding: 20px 0;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink);
  white-space: nowrap;
}

.status-pill-urgent {
  background: var(--red-bg);
  color: var(--red-text);
}

.status-pill-high {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill-low,
.status-pill-completed,
.status-pill-closed {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-new,
.status-pill-normal {
  background: var(--tint);
  color: var(--tint-accent);
}

@media (max-width: 700px) {
  .dashboard-chart-row {
    grid-template-columns: 70px 1fr 28px;
  }

  .dashboard-table th:nth-child(3),
  .dashboard-table td:nth-child(3) {
    display: none;
  }
}

/* --- Landing page reviews --- */
.reviews-carousel {
  margin-top: 24px;
}

.reviews-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Room for the cards' drop shadow, which would otherwise be clipped. */
  padding: 6px 2px 18px;
}

.reviews-track::-webkit-scrollbar {
  display: none;
}

.reviews-track > .review-card {
  scroll-snap-align: start;
}

.reviews-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.reviews-arrow {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 150ms ease, color 150ms ease;
}

.reviews-arrow:hover:not(:disabled) {
  border-color: var(--teal-2);
  color: var(--teal-2);
}

.reviews-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reviews-arrow-icon-back {
  transform: rotate(180deg);
}

.reviews-position {
  margin: 0;
  min-width: 64px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.review-card {
  padding: 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  align-content: start;
}

@media (max-width: 900px) {
  .reviews-track {
    grid-auto-columns: calc((100% - 18px) / 2);
  }
}

@media (max-width: 620px) {
  .reviews-track {
    grid-auto-columns: 100%;
  }
}

.review-stars {
  display: flex;
  gap: 2px;
  color: var(--amber);
}

.review-star {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

.review-quote {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.review-attribution {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- Custom system administration --- */
.admin-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: calc(100vh - 64px); background: #f4f7f8; }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: #fff; }
.admin-sidebar-home { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; color: var(--ink); }
.admin-sidebar-home strong, .admin-sidebar-home small { display: block; }
.admin-sidebar-home small { margin-top: 3px; color: var(--muted); font-size: 0.78rem; }
.admin-sidebar-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--teal); color: #fff; font-size: 1.05rem; font-weight: 850; }
.admin-sidebar-nav { display: grid; gap: 4px; }
.admin-sidebar-nav a { padding: 10px 12px; border-radius: 6px; color: #53636d; font-size: 0.92rem; font-weight: 650; }
.admin-sidebar-nav a:hover, .admin-sidebar-nav a.active { background: var(--tint); color: var(--tint-accent); }
.admin-sidebar-footer { display: grid; gap: 8px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; overflow-wrap: anywhere; }
.admin-sidebar-footer a, .admin-inline-link { color: var(--teal-2); font-weight: 750; }
.admin-main { min-width: 0; padding: 30px clamp(18px, 3vw, 42px) 38px; }
.admin-page-heading, .admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-page-heading { margin-bottom: 24px; }
.admin-page-heading h1 { margin: 2px 0 0; font-size: clamp(1.7rem, 3vw, 2.15rem); }
.admin-eyebrow { margin: 0; color: var(--teal-2); font-size: 0.76rem; font-weight: 800; text-transform: uppercase; }
.admin-subtitle, .admin-panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.admin-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-metric { position: relative; display: grid; min-height: 112px; align-content: space-between; gap: 12px; overflow: hidden; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); transition: border-color 160ms ease, transform 160ms ease; }
a.admin-metric:hover { transform: translateY(-2px); border-color: #93bfc2; }
.admin-metric-label { color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.admin-metric strong { font-size: 1.8rem; line-height: 1; }
.admin-metric-urgent strong { color: #a93434; }
.admin-metric-warning strong { color: #92620a; }
.admin-metric-mark { position: absolute; right: 18px; bottom: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.admin-metric-urgent .admin-metric-mark { background: #a93434; }
.admin-metric-warning .admin-metric-mark { background: #d39b27; }
.admin-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.admin-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.admin-directory-panel { padding-top: 14px; }
.admin-panel h2 { margin: 0; font-size: 1.02rem; }
.admin-bars { display: grid; gap: 13px; margin-top: 22px; }
.admin-bar-row { display: grid; grid-template-columns: minmax(110px, 0.8fr) minmax(70px, 1.8fr) 32px; gap: 10px; align-items: center; color: #53636d; font-size: 0.82rem; }
.admin-bar-track, .admin-volume-track { overflow: hidden; border-radius: 999px; background: #eaf0f2; }
.admin-bar-track { height: 9px; }
.admin-bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--teal-2); }
.admin-bar-row strong { color: var(--ink); text-align: right; }
.admin-volume-chart { display: grid; height: 172px; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; margin-top: 15px; }
.admin-volume-column { display: grid; height: 100%; grid-template-rows: 20px 1fr 18px; gap: 6px; justify-items: center; color: var(--muted); font-size: 0.74rem; }
.admin-volume-column strong { color: var(--ink); font-size: 0.78rem; }
.admin-volume-track { display: flex; width: min(28px, 100%); height: 100%; align-items: flex-end; }
.admin-volume-track i { display: block; width: 100%; min-height: 4px; border-radius: 999px; background: var(--green); }
.admin-recent-panel { margin-top: 14px; }
.admin-table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.77rem; text-align: left; text-transform: uppercase; white-space: nowrap; }
.admin-table td { padding: 12px; border-bottom: 1px solid #edf1f2; color: #34434c; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td a, .admin-row-actions a, .admin-row-actions button { color: var(--teal-2); font-weight: 750; }
.admin-status, .admin-priority { display: inline-block; padding: 4px 7px; border-radius: 4px; background: var(--surface-2); color: var(--ink); font-size: 0.76rem; }
.admin-priority-urgent, .admin-priority-high { background: var(--red-bg); color: var(--red-text); }
.admin-row-actions { display: flex; gap: 12px; }
.admin-row-actions form { display: inline; }
.admin-row-actions button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.admin-result-count { margin: 14px 0 10px; color: var(--muted); font-size: 0.86rem; }
.admin-filter-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-filter-form input, .admin-filter-form select, .admin-form-field input:not([type="checkbox"]), .admin-form-field select, .admin-form-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--input-bg); color: var(--ink); }
.admin-filter-form select, .admin-filter-form input { width: auto; min-width: 150px; }
.admin-filter-form .admin-search-field { flex: 1 1 220px; }
.admin-filter-form .admin-search-field input { width: 100%; }
.admin-inline-link { font-size: 0.85rem; }
.admin-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
.admin-pagination a { color: var(--teal-2); font-weight: 750; }
.admin-empty { display: grid; gap: 5px; padding: 28px 12px; color: var(--muted); text-align: center; }
.admin-empty strong { color: var(--ink); }
.admin-main-footer { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 0.8rem; }
.admin-form-panel, .admin-delete-panel { max-width: 900px; }
.admin-link-issued { max-width: 720px; }
.admin-link-issued > p:not(.admin-eyebrow) { color: var(--muted); line-height: 1.5; }
.admin-link-issued > label { display: block; margin: 18px 0 6px; font-size: 0.86rem; font-weight: 700; }
.admin-form-panel form:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-form-field { display: grid; min-width: 0; align-content: start; gap: 6px; }
.admin-form-field label { color: #34434c; font-size: 0.87rem; font-weight: 700; }
.admin-form-field small { color: var(--muted); font-size: 0.77rem; }
.admin-form-field textarea { min-height: 96px; resize: vertical; }
.admin-form-checkbox { grid-template-columns: 18px minmax(0, 1fr); align-items: center; }
.admin-form-checkbox input { width: 18px; height: 18px; }
.admin-form-checkbox small, .admin-form-checkbox .admin-field-error { grid-column: 1 / -1; }
.admin-agency-detail > .admin-panel { margin-bottom: 20px; }
.admin-field-error, .admin-form-errors { color: #a93434; font-size: 0.82rem; }
.admin-form-actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.admin-delete-record { display: flex; justify-content: flex-end; margin-top: 14px; }
.admin-delete-panel h1 { margin-top: 8px; }
.admin-delete-panel form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@media (max-width: 1000px) { .admin-shell { grid-template-columns: 190px minmax(0, 1fr); } .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-sidebar-home { padding-bottom: 10px; }
  .admin-sidebar-nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
  .admin-sidebar-nav a { flex: 0 0 auto; padding: 8px 10px; font-size: 0.82rem; }
  .admin-sidebar-footer { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; margin-top: 8px; }
  .admin-main { padding: 22px 14px 30px; }
  .admin-chart-grid { grid-template-columns: 1fr; }
  .admin-page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) {
  .admin-metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-metric { min-height: 96px; padding: 12px; }
  .admin-metric strong { font-size: 1.5rem; }
  .admin-panel { padding: 14px 12px; }
  .admin-form-panel form:first-child { grid-template-columns: 1fr; }
  .admin-form-actions { grid-column: 1; }
  .admin-filter-form label, .admin-filter-form select, .admin-filter-form .dashboard-btn { width: 100%; }
}

:root[data-theme="dark"] .action-tile,
:root[data-theme="dark"] .choice-button,
:root[data-theme="dark"] .text-field,
:root[data-theme="dark"] .secondary-local-button,
:root[data-theme="dark"] .sw-update-banner,
:root[data-theme="dark"] .attachment-row,
:root[data-theme="dark"] .task-row,
:root[data-theme="dark"] .summary-row,
:root[data-theme="dark"] .answer-box,
:root[data-theme="dark"] .saved-view,
:root[data-theme="dark"] .progress-marker,
:root[data-theme="dark"] .client-case-row,
:root[data-theme="dark"] .session-row,
:root[data-theme="dark"] .mfa-qr,
:root[data-theme="dark"] .admin-sidebar,
:root[data-theme="dark"] .admin-metric,
:root[data-theme="dark"] .admin-panel {
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  border-color: var(--line);
  background-color: var(--input-bg);
  color: var(--ink);
  color-scheme: dark;
}

:root[data-theme="dark"] .auth-box {
  border-color: var(--line);
  background: rgba(27, 41, 47, 0.94);
}

:root[data-theme="dark"] .google-login-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .segmented > button:not(.active) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

:root[data-theme="dark"] .upload-button {
  border-color: #3d6268;
  background: #263e43;
  color: #b2e7e8;
}

:root[data-theme="dark"] .skip-link {
  background: #12616b;
  color: #fff;
}

:root[data-theme="dark"] .help-text-warn,
:root[data-theme="dark"] .admin-metric-warning strong {
  color: #f0c96d;
}

:root[data-theme="dark"] .attachment-meta small,
:root[data-theme="dark"] .task-row small,
:root[data-theme="dark"] .admin-metric-urgent strong,
:root[data-theme="dark"] .admin-field-error,
:root[data-theme="dark"] .admin-form-errors {
  color: var(--red-text);
}

:root[data-theme="dark"] .admin-form-field label,
:root[data-theme="dark"] .admin-table td,
:root[data-theme="dark"] .admin-sidebar-nav a,
:root[data-theme="dark"] .admin-bars .admin-bar-row {
  color: var(--ink);
}

:root[data-theme="dark"] .admin-priority-urgent,
:root[data-theme="dark"] .admin-priority-high {
  background: #392326;
}

:root[data-theme="dark"] .site-header-mobile-panel {
  border-color: var(--line);
  background: rgba(27, 41, 47, 0.97);
}

:root[data-theme="dark"] .client-app .workflow-panel .button-row {
  background: rgba(27, 41, 47, 0.96);
}

:root[data-theme="dark"] .admin-shell {
  background: var(--surface-2);
}

:root[data-theme="dark"] .admin-sidebar-nav a,
:root[data-theme="dark"] .admin-bars .admin-bar-row,
:root[data-theme="dark"] .admin-table td,
:root[data-theme="dark"] .admin-form-field label {
  color: var(--ink);
}

:root[data-theme="dark"] .admin-sidebar-nav a:hover,
:root[data-theme="dark"] .admin-sidebar-nav a.active,
:root[data-theme="dark"] .admin-bar-track,
:root[data-theme="dark"] .admin-volume-track,
:root[data-theme="dark"] .admin-status {
  background: var(--surface-2);
}

:root[data-theme="dark"] .admin-table td {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .site-header-home:not(.site-header-scrolled) .theme-toggle {
  color: #fff;
}

:root[data-theme="dark"] .secondary-local-button,
:root[data-theme="dark"] .how-column-label,
:root[data-theme="dark"] .location-picker-heading,
:root[data-theme="dark"] .site-header-home.site-header-scrolled .site-header-logo .icon,
:root[data-theme="dark"] .site-header-nav a:hover,
:root[data-theme="dark"] .site-header-nav a:focus-visible,
:root[data-theme="dark"] .dashboard-action-link:hover {
  color: var(--teal-2);
}

:root[data-theme="dark"] .cta-band .secondary-local-button {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

:root[data-theme="dark"] .saved-view.active,
:root[data-theme="dark"] .progress-step-done .progress-marker {
  border-color: #12616b;
  background: #12616b;
  color: #fff;
}

:root[data-theme="dark"] .error-text,
:root[data-theme="dark"] .dashboard-card-urgent .icon {
  color: var(--red-text);
}

:root[data-theme="dark"] .audit-time,
:root[data-theme="dark"] .audit-actor,
:root[data-theme="dark"] .pagination-status,
:root[data-theme="dark"] .dashboard-result-count {
  color: var(--muted);
}

:root[data-theme="dark"] .emergency-selected-contact {
  border-color: #754447;
  background: #302225;
}

:root[data-theme="dark"] .message.system {
  background: var(--surface-2);
  color: var(--muted);
}

/* Left border is left alone so the .flash-* accent survives. */
:root[data-theme="dark"] .toast {
  border-top-color: rgba(255, 255, 255, 0.12);
  border-right-color: rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: rgba(27, 41, 47, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .flash-warning {
  border-left-color: var(--amber);
}

:root[data-theme="dark"] .toast-dismiss:hover,
:root[data-theme="dark"] .toast-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

/* Stays transparent so the notched label blends with the page, not the field.
   Needs the extra specificity to beat the generic dark-mode input fill above. */
:root[data-theme="dark"] .contact-field input.contact-input,
:root[data-theme="dark"] .contact-field textarea.contact-input {
  background-color: transparent;
}

/* Welcome badge shown at the top of the client, broker, and admin dashboards. */
.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(11, 30, 40, 0.06);
}

.welcome-badge .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--teal-2);
}

.welcome-badge strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Signed-in user shown in the site header on every page. */
.site-header-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.9rem;
}

.site-header-home .site-header-user {
  color: #fff;
}

.site-header-home.site-header-scrolled .site-header-user {
  color: var(--ink);
}

/* The unscrolled homepage nav is a light pill over the photo in both themes. */
.site-header.site-header-home:not(.site-header-scrolled) .site-header-nav .site-header-user {
  color: #183c40;
}

.site-header-avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

.site-header-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header-mobile-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 750;
}

/* Section navigation shared by the broker-area pages. */
.broker-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.broker-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.broker-nav a:hover,
.broker-nav a:focus-visible,
.broker-nav a[aria-current="page"] {
  border-color: var(--teal-2);
  background: var(--surface-2);
  color: var(--ink);
}

/* Broker-area detail pages (policies, invoices, clients). */
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-actions form {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 24px;
  margin: 0;
}

.detail-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-item dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-item dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.activity-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.status-pill-active,
.status-pill-paid,
.status-pill-settled,
.status-pill-sent {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-lapsed,
.status-pill-expired,
.status-pill-overdue,
.status-pill-suspended,
.status-pill-void,
.status-pill-failed,
.status-pill-disputed {
  background: var(--red-bg);
  color: var(--red-text);
}

.status-pill-draft,
.status-pill-invited,
.status-pill-pending,
.status-pill-issued,
.status-pill-part_paid,
.status-pill-partial {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-bound {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-quoted {
  background: #e7efff;
  color: #244d9b;
}

.status-pill-renewed {
  background: #f1e9fc;
  color: #69359a;
}

.status-pill-cancelled,
.status-pill-revoked,
.status-pill-neutral {
  background: #edf0f3;
  color: #465363;
}

[data-theme="dark"] .status-pill-quoted {
  background: #1b3054;
  color: #adcbff;
}

[data-theme="dark"] .status-pill-renewed {
  background: #382348;
  color: #dbb8ff;
}

[data-theme="dark"] .status-pill-cancelled,
[data-theme="dark"] .status-pill-revoked,
[data-theme="dark"] .status-pill-neutral {
  background: #303943;
  color: #d3dce5;
}

/* --- Billing --- */
.amount-cell,
.dashboard-table th.amount-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* The shared narrow-screen rule hides every table's third column. Billing tables keep all of
   their columns and scroll sideways instead, because an amount must never disappear. */
.dashboard-table.billing-table th:nth-child(3),
.dashboard-table.billing-table td:nth-child(3) {
  display: table-cell;
}

/* A grid item never shrinks below the width of its contents, so a wide table would stretch the
   whole page. Size the wrapper without looking at its contents so the table scrolls inside it. */
.dashboard-table-wrap:has(> .billing-table) {
  contain: inline-size;
}

.billing-table tbody th,
.billing-table tfoot th {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.billing-table .table-total-row th,
.billing-table .table-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 800;
}

.billing-warning p {
  margin: 0;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 14px 0 0;
}

.inline-form .admin-form-field {
  min-width: 180px;
}

.admin-form-wide {
  grid-column: 1 / -1;
}

.billing-fieldset {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 6px;
  border: 0;
}

.billing-fieldset legend {
  padding: 0;
  margin-bottom: 6px;
  color: #34434c;
  font-size: 0.87rem;
  font-weight: 700;
}

.billing-fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-weight: 500;
}

.billing-fieldset input[type="radio"] {
  width: 18px;
  height: 18px;
}

:root[data-theme="dark"] .billing-fieldset legend {
  color: var(--ink);
}

/* --- Commissions --- */
.status-pill-matched {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-unmatched,
.status-pill-needs_review {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill-uploaded,
.status-pill-upcoming {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-ignored,
.status-pill-ended {
  background: var(--surface-2);
  color: var(--muted);
}

.variance-negative {
  color: var(--red-text);
}

.variance-positive {
  color: var(--green);
}

/* Like the billing tables: keep every column on narrow screens and scroll sideways instead, and
   size the wrapper without looking at its contents so a wide table cannot stretch the page. */
.dashboard-table.commission-table th:nth-child(3),
.dashboard-table.commission-table td:nth-child(3) {
  display: table-cell;
}

.dashboard-table-wrap:has(> .commission-table) {
  contain: inline-size;
}

.commission-table tbody th,
.commission-table tfoot th {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.commission-table .table-total-row th,
.commission-table .table-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 800;
}

.commission-table .inline-form {
  margin: 0;
}

.commission-table .inline-form select,
.commission-table .inline-form input[type="text"] {
  min-width: 180px;
  max-width: 340px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
}

.commission-warning p,
.commission-note {
  margin: 0;
}

.commission-filters {
  align-items: center;
}

.commission-filters label:not(.visually-hidden) {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.commission-record {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.commission-record .dashboard-btn {
  justify-self: start;
}

.commission-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 18px;
}

/* --- M-Pesa payments --- */
.status-pill-success,
.status-pill-allocated {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-timed_out,
.status-pill-unresolved,
.status-pill-suspense {
  background: var(--amber-bg);
  color: var(--amber);
}

.payment-action {
  margin-top: 8px;
}

.payment-notice {
  margin-bottom: 16px;
}

.payment-notice p {
  margin: 0;
}

.payment-status {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal-2);
  border-radius: 10px;
  background: var(--surface-2);
}

.payment-status p {
  margin: 0;
}

.payment-status-success {
  border-left-color: var(--green);
}

.payment-status-cancelled,
.payment-status-failed {
  border-left-color: var(--red);
}

.payment-status-timed_out,
.payment-status-unresolved {
  border-left-color: var(--amber);
}

.payment-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.payment-status-title .icon {
  width: 1.3em;
  height: 1.3em;
  flex: none;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.billing-fieldset input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Inline resolve forms sit in a table cell, so they carry no top margin and their input stays compact. */
.billing-table .inline-form {
  margin: 8px 0 0;
}

.billing-table .inline-form input[type="text"] {
  min-width: 180px;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
}

.payment-log-payload {
  max-width: 340px;
  max-height: 260px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 0.78rem;
}

/* --- Documents and e-signature --- */
.status-pill-generated {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-sent_for_signature {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill-signed {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-declined {
  background: var(--red-bg);
  color: var(--red-text);
}

/* Like the billing tables, document tables keep every column and scroll sideways instead of hiding the third. */
.dashboard-table.documents-table th:nth-child(3),
.dashboard-table.documents-table td:nth-child(3) {
  display: table-cell;
}

.dashboard-table-wrap:has(> .documents-table) {
  contain: inline-size;
}

.documents-table .inline-form {
  margin: 6px 0 0;
}

.hash-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.code-field {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  tab-size: 2;
}

.link-box {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.variable-list {
  columns: 2 240px;
  gap: 24px;
  margin: 0;
  padding-left: 18px;
}

.variable-list li {
  break-inside: avoid;
  padding: 2px 0;
}

.sign-shell {
  max-width: 980px;
  margin-inline: auto;
}

.sign-frame {
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.sign-pad[hidden] {
  display: none;
}

.sign-pad-canvas {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 3 / 1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: crosshair;
  touch-action: none;
}

.sign-consent {
  align-items: start;
}

.sign-consent label {
  font-weight: 600;
}

.sign-consent small {
  grid-column: 1 / -1;
}

/* --- Endorsements --- */
.status-pill-requested,
.status-pill-pending_insurer {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill-approved {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-applied {
  background: var(--success-tint);
  color: var(--green);
}

/* Like the billing tables: keep every column on narrow screens and scroll sideways instead of hiding the third. */
.dashboard-table.endorsement-table th:nth-child(3),
.dashboard-table.endorsement-table td:nth-child(3) {
  display: table-cell;
}

.dashboard-table-wrap:has(> .endorsement-table) {
  contain: inline-size;
}

.endorsement-table tbody th,
.endorsement-table tfoot th {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.endorsement-table .table-total-row th,
.endorsement-table .table-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 800;
}

.endorsement-changes {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 8px;
  border: 0;
}

.endorsement-changes legend {
  padding: 0;
  margin-bottom: 6px;
  color: #34434c;
  font-size: 0.87rem;
  font-weight: 700;
}

:root[data-theme="dark"] .endorsement-changes legend {
  color: var(--ink);
}

.endorsement-change-table input,
.endorsement-change-table select {
  width: 100%;
  min-width: 150px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.endorsement-warning p {
  margin: 0;
}

.endorsement-warning ul {
  margin: 4px 0 0;
  padding-left: 20px;
}

.change-old {
  color: var(--muted);
}

.change-new {
  font-weight: 700;
}

.scale-bands {
  margin: 0;
  padding-left: 18px;
}

.as-at-grid {
  margin-top: 14px;
}

/* --- Reports --- */
.report-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.report-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.report-card:hover,
.report-card:focus-visible {
  border-color: var(--teal-2);
}

.report-card .icon {
  width: 1.8em;
  height: 1.8em;
  flex: none;
  color: var(--teal-2);
}

.report-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-filters {
  align-items: flex-end;
}

.report-filter {
  display: grid;
  min-width: 170px;
  gap: 4px;
}

.report-filter label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.report-notes ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.report-links {
  margin: 0;
}

/* Like the billing tables: keep every column on narrow screens and scroll sideways instead of hiding the third. */
.dashboard-table.report-table th:nth-child(3),
.dashboard-table.report-table td:nth-child(3) {
  display: table-cell;
}

.dashboard-table-wrap:has(> .report-table) {
  contain: inline-size;
}

.report-table tbody th,
.report-table tfoot th {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.report-table .table-total-row th,
.report-table .table-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 800;
}

.claim-figures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px 18px;
  margin-top: 14px;
}

/* --- CRM --- */
.broker-nav-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
}

.broker-nav-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.broker-nav-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.status-pill-open {
  background: var(--tint);
  color: var(--tint-accent);
}

.status-pill-won {
  background: var(--success-tint);
  color: var(--green);
}

.status-pill-lost {
  background: var(--red-bg);
  color: var(--red-text);
}

/* Like the billing tables: keep every column on narrow screens and scroll sideways instead of hiding the third. */
.dashboard-table.crm-table th:nth-child(3),
.dashboard-table.crm-table td:nth-child(3) {
  display: table-cell;
}

.dashboard-table-wrap:has(> .crm-table) {
  contain: inline-size;
}

.crm-table tbody th,
.crm-table tfoot th {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  white-space: normal;
}

.crm-table .table-total-row th,
.crm-table .table-total-row td {
  border-top: 2px solid var(--line);
  border-bottom: 0;
  font-weight: 800;
}

/* A period such as "Oct 2026" is short and reads best on one line. */
.crm-forecast tbody th,
.crm-forecast tfoot th {
  white-space: nowrap;
}

/* The board scrolls sideways inside itself, so a wide pipeline cannot stretch the page. */
.crm-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 300px);
  gap: 14px;
  padding-bottom: 8px;
  overflow-x: auto;
  contain: inline-size;
}

.crm-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.crm-column h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 1rem;
}

.crm-count {
  min-width: 1.8em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.crm-totals,
.crm-cards {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-totals {
  font-weight: 700;
}

.crm-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.crm-move {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.crm-move select {
  flex: 1 1 120px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
}

.crm-prompts {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.crm-prompt-body {
  display: grid;
  flex: 1 1 260px;
  gap: 2px;
  min-width: 0;
}

.crm-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.crm-prompt-actions form,
.crm-prompt-actions .inline-form {
  margin: 0;
}

.crm-message {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}

.crm-stage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.crm-stage-controls form {
  margin: 0;
}

/* A grid item never shrinks below the width of its contents, and an absolutely positioned child (such as a
   visually hidden label) of a scrolling container escapes the clipping unless the container is positioned.
   Between them a wide table or board stretched the whole page on a phone; these two rules keep the scrolling
   inside the table wrapper or the board. */
.dashboard-shell > * {
  min-width: 0;
}

.dashboard-table-wrap,
.crm-board {
  position: relative;
}

/* A signed-in client's header runs to a dozen links, more than fit on one line between the phone menu
   breakpoint and about 1300px. Let them wrap onto a second line rather than widen the whole page. */
.site-header-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
  min-width: 0;
}

.entry-screen:has(.home-hero) {
  background: var(--surface-2);
}

.entry-band.home-hero {
  min-height: min(820px, calc(100svh - 24px));
  margin: 12px;
  padding: 132px clamp(28px, 6vw, 88px) 68px;
  align-items: end;
  overflow: hidden;
  border-radius: 30px;
  background: #183c40;
}

.home-hero .insurance-photo-scrim {
  background:
    linear-gradient(90deg, rgba(8, 28, 33, 0.78), rgba(8, 28, 33, 0.34) 58%, rgba(8, 28, 33, 0.06)),
    linear-gradient(0deg, rgba(8, 28, 33, 0.42), transparent 62%);
}

.home-hero-content {
  position: relative;
  z-index: 3;
  width: min(920px, 100%);
  padding: 0;
}

.home-hero-eyebrow {
  margin: 0 0 18px;
  color: #d7ed8b;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
}

.home-hero-content h1 {
  max-width: 900px;
  color: #fff;
  font-size: 76px;
  font-weight: 850;
  line-height: 0.94;
  text-transform: uppercase;
}

.home-hero-content h1 span {
  color: #d7ed8b;
}

.home-hero-copy {
  max-width: 520px;
  margin: 22px 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.55;
}

.home-hero-actions {
  gap: 16px;
}

.home-hero-actions .primary-button {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: none;
}

.home-hero-actions .primary-button span {
  margin-left: 8px;
}

.home-hero-actions .secondary-button {
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.home-client-link {
  padding: 10px 4px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.6);
  text-underline-offset: 4px;
}

.home-hero-note {
  position: absolute;
  z-index: 3;
  top: 142px;
  right: clamp(24px, 5vw, 72px);
  display: flex;
  width: min(280px, 28vw);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(24, 60, 64, 0.14);
  border-radius: 16px;
  background: #f8fbf8;
  color: #183c40;
  -webkit-mask-image: radial-gradient(circle 24px at 100% 0, transparent 0 23px, #000 24px);
  mask-image: radial-gradient(circle 24px at 100% 0, transparent 0 23px, #000 24px);
}

.home-hero-note-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #183c40;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.home-hero-note strong,
.home-hero-note small {
  display: block;
}

.home-hero-note strong {
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.home-hero-note small {
  color: #526266;
  font-size: 0.76rem;
  line-height: 1.4;
}

.home-hero-notch-star {
  position: absolute;
  z-index: 4;
  top: 126px;
  right: calc(clamp(24px, 5vw, 72px) - 18px);
  color: #111918;
}

.home-hero-notch-star .icon {
  width: 26px;
  height: 26px;
}

.home-hero-categories {
  position: absolute;
  z-index: 3;
  right: clamp(28px, 6vw, 88px);
  bottom: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
}

.home-hero-categories span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d7ed8b;
}

.site-header.site-header-home {
  top: 20px;
  right: 30px;
  left: 30px;
  width: auto;
  padding: 9px 12px 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(248, 251, 249, 0.88);
  box-shadow: 0 8px 28px rgba(8, 28, 33, 0.08);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.site-header.site-header-home .site-header-logo,
.site-header.site-header-home .site-header-nav a {
  color: #183c40;
}

.site-header.site-header-home .site-header-logo .icon {
  color: #0f7a80;
}

.site-header.site-header-home .site-header-nav {
  gap: 20px;
}

.site-header.site-header-home .site-header-nav > a {
  font-size: 0.84rem;
}

.site-header.site-header-home .site-header-nav > .site-header-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
}

.site-header.site-header-home .ai-nav-button {
  display: none;
}

.site-header.site-header-home .theme-toggle {
  min-height: 38px;
  padding: 4px 9px;
  border-color: rgba(24, 60, 64, 0.18);
  background: #eef4f1;
  color: #183c40;
  font-size: 0.78rem;
}

.site-header.site-header-home.site-header-scrolled {
  top: 0;
  right: 0;
  left: 0;
  padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.site-header-home.site-header-scrolled .site-header-nav > .site-header-cta {
  color: #fff;
}

@media (max-width: 900px) {
  .home-hero-content h1 {
    font-size: 58px;
  }

  .home-hero-note {
    right: 28px;
    width: 250px;
  }

  .home-hero-categories {
    display: none;
  }
}

@media (max-width: 640px) {
  .entry-band.home-hero {
    min-height: min(780px, calc(100svh - 16px));
    margin: 8px;
    padding: 146px 22px 40px;
    border-radius: 24px;
  }

  .home-hero .insurance-photo-image {
    object-position: 58% center;
  }

  .home-hero .insurance-photo-scrim {
    background:
      linear-gradient(90deg, rgba(8, 28, 33, 0.7), rgba(8, 28, 33, 0.18)),
      linear-gradient(0deg, rgba(8, 28, 33, 0.72), transparent 82%);
  }

  .home-hero-content h1 {
    font-size: 48px;
  }

  .home-hero-copy {
    margin: 16px 0 20px;
    font-size: 0.98rem;
  }

  .home-hero-actions {
    gap: 10px;
  }

  .home-hero-actions .primary-button,
  .home-hero-actions .secondary-button {
    min-height: 48px;
    padding: 0 15px;
    font-size: 0.86rem;
  }

  .home-client-link {
    flex-basis: 100%;
    padding-left: 2px;
  }

  .home-hero-note {
    top: 98px;
    right: 18px;
    width: min(230px, calc(100% - 36px));
    padding: 10px 12px;
    border-radius: 12px;
  }

  .home-hero-notch-star {
    top: 84px;
    right: 8px;
  }

  .home-hero-note-mark {
    width: 40px;
    height: 40px;
  }

  .site-header.site-header-home {
    top: 14px;
    right: 20px;
    left: 20px;
    padding: 7px 10px 7px 14px;
  }

  .site-header.site-header-home .site-header-logo {
    font-size: 0.92rem;
  }

  .site-header.site-header-home.site-header-scrolled {
    top: 0;
    right: 0;
    left: 0;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }
}

@media (max-width: 390px) {
  .home-hero-content h1 {
    font-size: 42px;
  }
}

.site-header-login-menu {
  position: relative;
  color: var(--ink);
}

.site-header-login-menu > summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 750;
  list-style: none;
}

.site-header-login-menu > summary::-webkit-details-marker {
  display: none;
}

.site-header-login-menu > summary:focus-visible {
  border-radius: 6px;
  outline: 3px solid var(--teal-2);
  outline-offset: 3px;
}

.site-header-login-menu > summary .icon {
  width: 16px;
  height: 16px;
  transition: transform 150ms ease;
}

.site-header-login-menu[open] > summary .icon {
  transform: rotate(180deg);
}

.site-header-login-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: 190px;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-header-login-options a {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.site-header-login-options a:hover,
.site-header-login-options a:focus-visible {
  background: var(--surface-2);
  color: var(--teal-2);
  outline: none;
}

/* The dropdown is a themed surface, unlike the light nav pill it opens from. */
.site-header.site-header-home .site-header-nav .site-header-login-options a {
  color: var(--ink);
}

.site-header.site-header-home .site-header-nav .site-header-login-options a:hover,
.site-header.site-header-home .site-header-nav .site-header-login-options a:focus-visible {
  color: var(--teal-2);
}

.site-header.site-header-home .site-header-login-menu > summary {
  color: #183c40;
}

.site-header.site-header-home .site-header-login-menu > summary .icon {
  color: inherit;
}

.site-header.site-header-home .site-header-nav > .theme-toggle {
  width: 42px;
  height: 42px;
  min-height: 42px;
  justify-content: center;
  padding: 0;
  border-color: rgba(24, 60, 64, 0.18);
  border-radius: 50%;
  background: #eef4f1;
  color: #183c40;
}

.site-header.site-header-home .theme-toggle-label {
  display: none;
}

.theme-toggle-icons {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
}

.theme-toggle-icons .icon {
  position: absolute;
  width: 19px;
  height: 19px;
  transition: opacity 150ms ease, transform 150ms ease;
}

.theme-toggle-icon-dark {
  opacity: 0;
  transform: rotate(-35deg) scale(0.7);
}

.theme-toggle[aria-checked="true"] .theme-toggle-icon-light {
  opacity: 0;
  transform: rotate(35deg) scale(0.7);
}

.theme-toggle[aria-checked="true"] .theme-toggle-icon-dark {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.site-header-mobile-panel .site-header-login-menu {
  padding: 0 12px;
}

.site-header-mobile-panel .site-header-login-menu > summary {
  min-height: 44px;
}

.site-header-mobile-panel .site-header-login-options {
  position: static;
  width: 100%;
  padding: 0 0 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.site-header-home .site-header-mobile-panel .theme-toggle-label {
  display: inline;
}

.home-page .primary-button {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: none;
}

.home-page .primary-button:hover:not(:disabled) {
  border-color: var(--teal-2);
  background: var(--teal-2);
  box-shadow: 0 8px 20px rgba(11, 85, 99, 0.22);
}

.home-page .secondary-local-button {
  border-color: currentColor;
  background: transparent;
  color: var(--ink);
}

.home-page .cta-band .secondary-local-button {
  border-color: rgba(255, 255, 255, 0.75);
  background: transparent;
  color: #fff;
}

.home-page .home-hero-copy {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.home-page #how-it-works,
.home-page [aria-label="Client and broker feedback"] {
  background: var(--surface);
}

.home-page #coverage,
.home-page #contact {
  background: var(--surface-2);
}

.home-page .coverage-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: 48px;
}

.home-page .coverage-story {
  min-width: 0;
}

.home-page .coverage-story .section-title {
  max-width: 480px;
  font-size: 42px;
}

.home-page .coverage-story .section-lede {
  margin-bottom: 0;
}

.home-page .coverage-image {
  position: relative;
  min-height: 300px;
  margin: 28px 0 0;
  overflow: hidden;
  border-radius: 22px;
  background: #173a3d;
}

.home-page .coverage-image img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.home-page .coverage-image figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 6px;
  padding: 48px 20px 20px;
  background: linear-gradient(transparent, rgba(8, 28, 33, 0.85));
  color: #fff;
}

.home-page .coverage-image figcaption span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-page .coverage-image figcaption strong {
  max-width: 300px;
  font-size: 1.2rem;
  line-height: 1.2;
}

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

.home-page .feature-card {
  min-height: 205px;
  padding: 22px;
}

.home-page .feature-card .tile-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--teal-2);
}

.home-page .feature-card .tile-icon .icon {
  width: 23px;
  height: 23px;
}

.home-page .feature-card::before,
.home-page .how-column::before,
.home-page .review-card::before,
.home-page .contact-method::before {
  display: none;
}

:root[data-theme="dark"] .site-header.site-header-home .site-header-login-menu > summary {
  color: #edf5f1;
}

:root[data-theme="dark"] .site-header.site-header-home .site-header-nav > .theme-toggle {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 1000px) {
  .home-page .coverage-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .home-page .coverage-story {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0 28px;
  }

  .home-page .coverage-story .section-eyebrow,
  .home-page .coverage-story .section-title,
  .home-page .coverage-story .section-lede {
    grid-column: 1 / -1;
  }

  .home-page .coverage-image {
    width: min(560px, 100%);
  }
}

@media (max-width: 780px) {
  .site-header.site-header-home .site-header-menu-toggle {
    position: fixed;
    top: 4px;
    right: 18px;
    z-index: 36;
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
  }

  .site-header.site-header-home .theme-toggle-label {
    display: inline;
  }

  .site-header.site-header-home .site-header-nav > .theme-toggle {
    width: auto;
    height: 40px;
    min-height: 40px;
    justify-content: flex-start;
    padding: 5px 9px;
    border-radius: 999px;
  }

  .home-page .coverage-story {
    display: block;
  }

  .home-page .coverage-story .section-title {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .home-page .coverage-image,
  .home-page .coverage-image img {
    min-height: 0;
    height: 270px;
  }

  .home-page .feature-grid {
    grid-template-columns: 1fr;
  }

  .home-page .feature-card {
    min-height: 0;
  }
}

.home-page {
  background: var(--surface-2);
  color: var(--ink);
}

.home-page .landing-section {
  position: relative;
  padding: 76px clamp(20px, 5vw, 72px);
  background: var(--surface);
  color: var(--ink);
}

.home-page .landing-section-alt {
  background: var(--surface-2);
}

.home-page .section-eyebrow {
  color: var(--teal-2);
}

.home-page .section-title {
  max-width: 780px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.08;
}

.home-page .section-lede {
  color: var(--muted);
}

.home-page .how-it-works-grid {
  gap: 18px;
}

.home-page .how-column,
.home-page .feature-card,
.home-page .review-card,
.home-page .contact-method {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.home-page .how-column,
.home-page .review-card {
  background: var(--surface-2);
}

.home-page .how-column {
  padding: 26px;
}

.home-page .how-column-label {
  color: var(--teal-2);
}

.home-page .how-step-num {
  background: var(--teal);
}

.home-page .feature-card {
  min-height: 220px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(18, 42, 45, 0.07);
}

.home-page .feature-card::before,
.home-page .how-column::before,
.home-page .review-card::before,
.home-page .contact-method::before {
  position: absolute;
  top: 13px;
  right: 34px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal-2);
  content: "";
}

.home-page .feature-card strong {
  color: var(--ink);
}

.home-page .feature-card small,
.home-page .how-steps small {
  color: var(--muted);
}

.home-page .reviews-track > .review-card {
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(18, 42, 45, 0.06);
}

.home-page .contact-methods {
  gap: 16px;
  max-width: 900px;
}

.home-page .contact-method {
  min-height: 104px;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.home-page .contact-method .tile-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--teal-2);
}

.home-page .cta-band {
  padding-top: 74px;
  padding-bottom: 74px;
  background: linear-gradient(135deg, #173a3d, #0f666a);
}

.home-page .cta-band .section-title {
  color: #fff;
}

.home-page + .site-footer {
  min-height: 80px;
  padding: 26px 32px;
  background: #122e31;
  color: rgba(255, 255, 255, 0.82);
}

.home-page + .site-footer a {
  color: #fff;
}

:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(20, 32, 36, 0.92);
}

:root[data-theme="dark"] .site-header.site-header-home .site-header-logo,
:root[data-theme="dark"] .site-header.site-header-home .site-header-nav > a:not(.site-header-cta) {
  color: #edf5f1;
}

:root[data-theme="dark"] .site-header.site-header-home .site-header-logo .icon {
  color: #79d3cd;
}

:root[data-theme="dark"] .site-header.site-header-home .theme-toggle {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 900px) {
  .home-page .landing-section {
    padding: 60px 24px;
  }

  .home-page .feature-card {
    min-height: 190px;
  }

  .site-header.site-header-home .site-header-nav {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .home-page .landing-section {
    padding: 52px 20px;
  }

  .home-page .section-title {
    font-size: 30px;
  }

  .home-page .how-column {
    padding: 20px;
  }

  .home-page .feature-card {
    min-height: 0;
    padding: 20px;
  }

  .home-page .contact-methods {
    gap: 10px;
  }

  .home-page .cta-band {
    padding-top: 58px;
    padding-bottom: 58px;
  }
}

.home-page .entry-band.home-hero {
  display: block;
  min-height: min(820px, calc(100svh - 24px));
  margin: 12px;
  padding: 0;
  isolation: isolate;
  background: transparent;
}

.home-hero-clip-defs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.home-page .home-hero .insurance-photo-scrim {
  background:
    linear-gradient(90deg, rgba(8, 28, 33, 0.42), rgba(8, 28, 33, 0.16) 58%, rgba(8, 28, 33, 0.02)),
    linear-gradient(0deg, rgba(8, 28, 33, 0.3), rgba(8, 28, 33, 0.04) 48%, transparent 76%);
}

.home-page .home-hero-image-card {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: var(--surface);
  -webkit-clip-path: url(#home-hero-card-clip);
  clip-path: url(#home-hero-card-clip);
}

.home-page .home-hero .insurer-backdrop {
  z-index: 0;
  pointer-events: none;
}

.home-page .home-hero-content {
  position: absolute;
  top: clamp(220px, 36vh, 340px);
  left: clamp(30px, 6vw, 88px);
  width: min(920px, calc(100% - 60px));
}

.home-page .home-hero-content h1 {
  font-size: 82px;
  line-height: 0.92;
}

.home-page .home-hero-eyebrow {
  margin-bottom: 16px;
}

.home-page .home-hero-bottom-panel {
  position: absolute;
  z-index: 4;
  bottom: 0;
  left: clamp(300px, 25vw, 360px);
  display: grid;
  width: min(680px, calc(100% - clamp(300px, 25vw, 360px)));
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 10px;
  padding: 20px 28px 18px;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  -webkit-mask-image: radial-gradient(circle var(--home-hero-bottom-notch, 145px) at 0 100%, transparent 0 calc(var(--home-hero-bottom-notch, 145px) - 1px), #000 var(--home-hero-bottom-notch, 145px));
  mask-image: radial-gradient(circle var(--home-hero-bottom-notch, 145px) at 0 100%, transparent 0 calc(var(--home-hero-bottom-notch, 145px) - 1px), #000 var(--home-hero-bottom-notch, 145px));
}

.home-page .home-hero-assurance {
  display: flex;
  position: absolute;
  z-index: 6;
  bottom: 16px;
  left: 16px;
  width: min(104px, calc(100% - 32px));
  align-items: center;
  gap: 7px;
}

.home-page .home-hero-assurance strong,
.home-page .home-hero-assurance small {
  display: block;
}

.home-page .home-hero-assurance strong {
  margin-bottom: 2px;
  font-size: 0.64rem;
  line-height: 1.1;
}

.home-page .home-hero-assurance small {
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.1;
}

.home-page .home-hero-assurance > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-page .home-hero-note-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background: #173a3d;
  color: #fff;
  font-size: 0.62rem;
}

.home-page .home-hero-copy {
  max-width: 450px;
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.45;
  text-shadow: none;
}

.home-page .home-hero-actions {
  gap: 10px;
}

.home-page .home-hero-actions .primary-button,
.home-page .home-hero-actions .secondary-button {
  min-height: 44px;
  padding: 0 17px;
  font-size: 0.85rem;
}

.home-page .home-hero-actions .secondary-button {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.home-page .home-hero-categories {
  right: clamp(28px, 5vw, 64px);
  bottom: 32px;
}

.site-header.site-header-home {
  z-index: 25;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header.site-header-home .site-header-logo {
  color: var(--ink);
  text-shadow: none;
}

.site-header.site-header-home .site-header-logo .icon {
  color: var(--teal);
}

.site-header.site-header-home .site-header-nav {
  margin-right: auto;
  margin-left: clamp(16px, 3vw, 44px);
  padding: 5px 12px;
  border: 1px solid rgba(24, 60, 64, 0.12);
  border-radius: 999px;
  background: rgba(248, 251, 249, 0.94);
  box-shadow: 0 8px 26px rgba(8, 28, 33, 0.1);
}

.site-header.site-header-home .site-header-nav > a,
.site-header.site-header-home .site-header-login-menu > summary {
  color: #183c40;
}

.site-header.site-header-home .site-header-nav > .site-header-cta {
  display: none;
}

.site-header.site-header-home .home-hero-theme-toggle {
  position: fixed;
  top: 54px;
  right: 54px;
  z-index: 35;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: #101516;
  color: #fff;
  box-shadow: none;
}

.site-header.site-header-home .home-hero-theme-toggle .theme-toggle-icons {
  width: 22px;
  height: 22px;
}

.site-header.site-header-home .home-hero-theme-toggle .theme-toggle-icons .icon {
  width: 22px;
  height: 22px;
}

.site-header.site-header-home.site-header-scrolled {
  background: var(--surface);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 22px rgba(11, 30, 40, 0.12);
}

.site-header.site-header-home.site-header-scrolled .site-header-logo {
  max-width: calc(100% - 128px);
  min-width: 0;
  color: var(--ink);
  text-shadow: none;
}

.site-header.site-header-home.site-header-scrolled .site-header-logo .icon {
  color: var(--teal);
}

.site-header.site-header-home.site-header-scrolled .site-header-nav {
  margin-right: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.site-header-home.site-header-scrolled .site-header-nav > a,
.site-header.site-header-home.site-header-scrolled .site-header-login-menu > summary {
  color: var(--ink);
}

.site-header.site-header-home.site-header-scrolled .home-hero-theme-toggle {
  top: 10px;
  right: 18px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.home-page .home-hero-bottom-panel .primary-button {
  background: var(--teal);
  color: #fff;
}

@media (max-width: 900px) {
  .home-page .home-hero-content {
    top: clamp(210px, 34vh, 290px);
    left: 32px;
    width: calc(100% - 64px);
  }

  .home-page .home-hero-content h1 {
    font-size: 64px;
  }

  .home-page .home-hero-bottom-panel {
    left: clamp(260px, 30vw, 320px);
    width: min(560px, calc(100% - clamp(260px, 30vw, 320px)));
    padding-right: 22px;
  }

  .site-header.site-header-home .site-header-nav {
    margin-right: 68px;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .home-page .entry-band.home-hero {
    min-height: min(780px, calc(100svh - 16px));
    margin: 8px;
    border-radius: 24px;
  }

  .home-page .home-hero .insurance-photo-scrim {
    background:
      linear-gradient(90deg, rgba(8, 28, 33, 0.4), rgba(8, 28, 33, 0.08)),
      linear-gradient(0deg, rgba(8, 28, 33, 0.52), rgba(8, 28, 33, 0.08) 52%, transparent 86%);
  }

  .home-page .home-hero-content {
    top: 190px;
    left: 22px;
    width: calc(100% - 44px);
  }

  .home-page .home-hero-content h1 {
    font-size: 48px;
  }

  .home-page .home-hero-bottom-panel {
    left: 0;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 22px 104px;
    border-radius: 0;
  }

  .home-page .home-hero-assurance {
    grid-row: auto;
  }

  .home-page .home-hero-copy {
    max-width: 100%;
    font-size: 0.86rem;
  }

  .home-page .home-hero-actions {
    gap: 8px;
  }

  .home-page .home-hero-actions .primary-button,
  .home-page .home-hero-actions .secondary-button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  .home-page .home-hero-categories {
    display: none;
  }

  .site-header.site-header-home {
    top: 14px;
    right: 16px;
    left: 16px;
    padding: 7px 10px;
  }

  .site-header.site-header-home .site-header-nav {
    margin-right: 50px;
  }

  .site-header.site-header-home:not(.site-header-scrolled) .home-hero-theme-toggle {
    top: 50px;
    right: 50px;
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
}

@media (max-width: 390px) {
  .home-page .home-hero-content h1 {
    font-size: 42px;
  }

  .home-page .home-hero-bottom-panel {
    gap: 9px;
    padding-right: 16px;
    padding-left: 18px;
  }
}

@media (max-width: 340px) {
  .home-page .home-hero-assurance {
    width: 98px;
    gap: 5px;
  }

  .home-page .home-hero-note-mark {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }
}

.home-page .entry-band.home-hero {
  display: block;
  width: auto;
  min-height: min(820px, calc(100svh - 24px));
  margin: 12px;
  padding: 112px clamp(24px, 5vw, 72px) 48px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-page .home-hero-layout {
  display: grid;
  width: min(1240px, 100%);
  min-height: 580px;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 64px;
  margin: 0 auto;
}

.home-page .home-hero-copy-panel {
  min-width: 0;
  padding: 20px 0;
}

.home-page .home-hero-kicker {
  margin: 0 0 18px;
  color: var(--teal-2);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-page .home-hero-kicker span {
  padding: 0 5px;
  color: var(--muted);
}

.home-page .home-hero-copy-panel h1 {
  max-width: 580px;
  margin: 0;
  color: var(--ink);
  font-size: 64px;
  font-weight: 800;
  line-height: 1.02;
  text-transform: none;
}

.home-page .home-hero-copy-panel h1 span {
  color: var(--teal);
}

.home-page .home-hero-lede {
  max-width: 500px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.home-page .home-hero-buttons {
  gap: 12px;
}

.home-page .home-hero-buttons .primary-button,
.home-page .home-hero-buttons .secondary-local-button {
  min-height: 48px;
}

.home-page .home-hero-support-line {
  display: flex;
  max-width: 440px;
  align-items: center;
  gap: 13px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.home-page .home-hero-support-badge {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.home-page .home-hero-support-line strong,
.home-page .home-hero-support-line small {
  display: block;
}

.home-page .home-hero-support-line strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.home-page .home-hero-support-line small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.home-page .home-hero-visual {
  position: relative;
  min-width: 0;
  height: min(620px, calc(100svh - 190px));
  min-height: 460px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  isolation: isolate;
  background: var(--surface-2);
}

.home-page .home-hero-clip-defs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.home-page .home-hero-photo-clip {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  clip-path: url(#home-hero-card-clip);
  -webkit-clip-path: url(#home-hero-card-clip);
}

.home-page .home-hero-visual .insurer-backdrop {
  z-index: 0;
}

.home-page .home-hero-visual .insurance-photo-scrim {
  background: linear-gradient(0deg, rgba(10, 31, 39, 0.5), rgba(10, 31, 39, 0.02) 42%, transparent 72%);
}

.home-page .home-hero-visual-caption {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.home-page .home-hero-visual-caption span {
  color: var(--teal-2);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.home-page .home-hero-visual-caption strong {
  font-size: 1rem;
}

@media (max-width: 980px) {
  .home-page .entry-band.home-hero {
    padding-right: 32px;
    padding-left: 32px;
  }

  .home-page .home-hero-layout {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .home-page .home-hero-copy-panel h1 {
    font-size: 58px;
  }

  .home-page .home-hero-visual {
    height: 500px;
    min-height: 380px;
  }
}

@media (max-width: 700px) {
  .home-page .entry-band.home-hero {
    min-height: 0;
    margin: 8px;
    padding: 116px 22px 32px;
  }

  .home-page .home-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .home-page .home-hero-copy-panel {
    padding: 12px 0 0;
  }

  .home-page .home-hero-copy-panel h1 {
    font-size: 42px;
  }

  .home-page .home-hero-lede {
    margin: 16px 0 20px;
    font-size: 1rem;
  }

  .home-page .home-hero-support-line {
    margin-top: 24px;
  }

  .home-page .home-hero-visual {
    height: 380px;
    min-height: 300px;
  }
}

@media (max-width: 390px) {
  .home-page .home-hero-copy-panel h1 {
    font-size: 38px;
  }

  .home-page .home-hero-visual {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
    height: 320px;
  }
}

body:has(.home-page),
.entry-screen.home-page {
  background: var(--home-canvas);
}

.home-page .entry-band.home-hero {
  position: relative;
  width: auto;
  height: min(820px, calc(100svh - 24px));
  min-height: 680px;
  margin: 12px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 30px;
  background: var(--home-canvas);
}

.home-page .home-hero-clip-defs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.home-page .home-hero-photo-clip {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  clip-path: url(#home-hero-card-clip);
  -webkit-clip-path: url(#home-hero-card-clip);
}

.home-page .home-hero-photo-clip .insurer-backdrop {
  z-index: 0;
}

.home-page .home-hero-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  clip-path: url(#home-hero-card-clip);
  -webkit-clip-path: url(#home-hero-card-clip);
  background: linear-gradient(90deg, rgba(7, 27, 31, 0.6), rgba(7, 27, 31, 0.22) 58%, rgba(7, 27, 31, 0.08)), linear-gradient(0deg, rgba(7, 27, 31, 0.28), transparent 55%);
}

.home-page .home-hero-upper-copy {
  position: absolute;
  z-index: 3;
  top: clamp(145px, 17vh, 190px);
  left: clamp(30px, 6vw, 88px);
  width: min(480px, calc(100% - 60px));
  color: #fff;
}

.home-page .home-hero-kicker {
  margin: 0 0 14px;
  color: var(--hero-accent-on-photo);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-page .home-hero-kicker span {
  padding: 0 5px;
  color: inherit;
}

.home-page .home-hero-intro {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.45;
}

.home-page .home-hero-title-row {
  position: absolute;
  z-index: 3;
  top: clamp(265px, 34vh, 350px);
  left: clamp(30px, 6vw, 88px);
  display: grid;
  width: min(820px, calc(100% - 60px));
  gap: 26px;
}

.home-page .home-hero-title-row h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 850;
  line-height: 0.94;
  text-transform: uppercase;
}

.home-page .home-hero-title-row h1 span {
  color: var(--hero-accent-on-photo);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 900;
}

.home-page .home-hero-categories {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.home-page .home-hero-categories span {
  width: auto;
  height: auto;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-page .home-hero-categories span.is-active {
  border-color: #fff;
  background: #fff;
  color: #183c40;
}

.home-page .home-hero-offer {
  position: absolute;
  z-index: 4;
  top: 132px;
  right: clamp(30px, 8vw, 116px);
  display: grid;
  width: min(248px, calc(100% - 60px));
  gap: 9px;
  padding: 17px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--surface-glass-strong);
  box-shadow: 0 14px 36px rgba(8, 28, 33, 0.18);
  color: var(--brand-deep);
}

.home-page .home-hero-offer > span {
  color: var(--teal-2);
  font-size: 0.66rem;
  font-weight: 850;
}

.home-page .home-hero-offer strong {
  font-size: 0.96rem;
  line-height: 1.3;
}

.home-page .home-hero-offer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.home-page .home-hero-assurance {
  position: absolute;
  z-index: 5;
  right: auto;
  bottom: 0;
  left: 0;
  display: flex;
  width: min(calc(100% - 24px), max(300px, 25%));
  min-height: 112px;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border: 1px solid var(--home-canvas);
  border-radius: 8px;
  background: var(--home-canvas);
  box-shadow: none;
  color: var(--ink);
}

.home-page .home-hero-assurance strong {
  margin-bottom: 5px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.home-page .home-hero-assurance small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.home-page .home-hero-note-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--hero-accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 850;
}

.site-header.site-header-home {
  z-index: 25;
  justify-content: flex-start;
  gap: 14px;
  padding: 22px clamp(24px, 4vw, 58px) 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header.site-header-home .site-header-logo {
  flex: 0 0 auto;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}

.site-header.site-header-home .site-header-logo .icon {
  color: var(--hero-accent-on-photo);
}

.site-header.site-header-home .site-header-nav {
  flex: 0 1 auto;
  margin: 0 auto 0 clamp(18px, 3vw, 44px);
  padding: 5px 12px;
  border: 1px solid rgba(24, 60, 64, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 249, 0.94);
  box-shadow: 0 8px 26px rgba(8, 28, 33, 0.1);
}

.site-header.site-header-home .site-header-nav > a,
.site-header.site-header-home .site-header-login-menu > summary {
  color: #183c40;
}

.site-header.site-header-home .site-header-nav > .site-header-cta {
  display: none;
}

.site-header.site-header-home .site-header-story-link,
.site-header.site-header-home .site-header-book-call {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.site-header.site-header-home .site-header-story-link {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.site-header.site-header-home .site-header-story-link .icon {
  width: 16px;
  height: 16px;
}

.site-header.site-header-home .site-header-book-call {
  margin-right: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  color: #183c40;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(8, 28, 33, 0.18);
}

.site-header.site-header-home .home-hero-theme-toggle {
  position: fixed;
  z-index: 35;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: #101516;
  color: #fff;
  box-shadow: none;
}

.site-header.site-header-home:not(.site-header-scrolled) .home-hero-theme-toggle,
.site-header.site-header-home:not(.site-header-scrolled) .site-header-menu-toggle {
  position: fixed;
  top: var(--home-notch-top);
  right: auto;
  left: var(--home-notch-left);
  z-index: 35;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--teal-2);
  box-shadow: none;
}

@media (max-width: 780px) {
  .site-header.site-header-home .home-hero-theme-toggle {
    display: none;
  }

  .site-header.site-header-home:not(.site-header-scrolled) .site-header-mobile-panel {
    top: calc(var(--home-notch-top) + 56px);
  }
}

.site-header.site-header-home.site-header-scrolled {
  top: 0;
  right: 0;
  left: 0;
  padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(11, 30, 40, 0.12);
}

.site-header.site-header-home.site-header-scrolled .site-header-logo {
  color: var(--ink);
  text-shadow: none;
}

.site-header.site-header-home.site-header-scrolled .site-header-logo .icon {
  color: var(--teal);
}

.site-header.site-header-home.site-header-scrolled .site-header-story-link {
  color: var(--ink);
  text-shadow: none;
}

.site-header.site-header-home.site-header-scrolled .site-header-nav {
  margin-right: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.site-header-home.site-header-scrolled .home-hero-theme-toggle {
  top: 10px;
  right: 18px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 1100px) {
  .site-header.site-header-home .site-header-story-link {
    display: none;
  }
}

@media (max-width: 900px) {
  .home-page .entry-band.home-hero {
    height: min(820px, calc(100svh - 16px));
    min-height: 650px;
    margin: 8px;
  }

  .home-page .home-hero-upper-copy {
    width: min(330px, calc(100% - 60px));
  }

  .home-page .home-hero-title-row h1 {
    font-size: clamp(52px, 8vw, 76px);
  }

  .site-header.site-header-home {
    gap: 12px;
    padding: 18px 26px 10px;
  }

  .site-header.site-header-home .site-header-nav {
    margin-left: 18px;
  }
}

@media (max-width: 700px) {
  .home-page .entry-band.home-hero {
    height: min(820px, calc(100svh - 16px));
    min-height: 700px;
  }

  .home-page .home-hero-upper-copy {
    top: 154px;
    left: 22px;
    width: min(180px, calc(100% - 44px));
  }

  .home-page .home-hero-kicker {
    font-size: 0.64rem;
  }

  .home-page .home-hero-intro {
    font-size: 0.9rem;
  }

  .home-page .home-hero-title-row {
    top: 286px;
    left: 22px;
    width: calc(100% - 44px);
    gap: 20px;
  }

  .home-page .home-hero-title-row h1 {
    font-size: clamp(42px, 11vw, 62px);
  }

  .home-page .home-hero-categories {
    gap: 6px;
  }

  .home-page .home-hero-categories span {
    padding: 7px 10px;
    font-size: 0.62rem;
  }

  .home-page .home-hero-offer {
    top: 144px;
    right: 14px;
    width: min(162px, calc(100% - 44px));
    gap: 6px;
    padding: 11px 12px;
  }

  .home-page .home-hero-offer strong {
    font-size: 0.82rem;
  }

  .home-page .home-hero-offer a {
    font-size: 0.68rem;
  }

  .home-page .home-hero-assurance {
    width: min(300px, calc(100% - 24px));
    min-height: 94px;
    padding: 14px 18px;
  }

  .site-header.site-header-home {
    top: 10px;
    right: 12px;
    left: 12px;
    gap: 8px;
    padding: 7px 8px;
  }

  .site-header.site-header-home .site-header-logo {
    font-size: 0.84rem;
  }

  .site-header.site-header-home .site-header-nav {
    display: none;
  }

  .site-header.site-header-home .site-header-book-call {
    min-height: 38px;
    margin-right: 46px;
    margin-left: auto;
    padding: 0 11px;
    font-size: 0.72rem;
  }

  .site-header.site-header-home:not(.site-header-scrolled) .site-header-book-call {
    position: fixed;
    top: calc(var(--home-notch-top) + 60px);
    right: 22px;
    margin: 0;
  }

  .site-header.site-header-home.site-header-scrolled {
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }
}

@media (max-width: 480px) {
  .home-page .home-hero-upper-copy {
    width: calc(100% - 44px);
  }

  .home-page .home-hero-offer {
    display: none;
  }

  .site-header.site-header-home.site-header-scrolled .site-header-book-call {
    position: static;
    width: 38px;
    margin: 0 52px 0 auto;
    padding: 0;
    gap: 0;
    font-size: 0;
  }
}

@media (max-width: 390px) {
  .home-page .home-hero-title-row h1 {
    font-size: 42px;
  }

  .home-page .home-hero-categories span {
    padding: 6px 8px;
    font-size: 0.58rem;
  }

  .home-page .home-hero-assurance {
    min-height: 86px;
    padding: 12px 14px;
  }

  .home-page .home-hero-assurance strong {
    font-size: 0.82rem;
  }

  .home-page .home-hero-assurance small {
    font-size: 0.68rem;
  }
}

@media (max-width: 340px) {
  .site-header.site-header-home .site-header-logo {
    font-size: 0.72rem;
  }

  .site-header.site-header-home .site-header-book-call {
    position: absolute;
    top: 7px;
    right: 58px;
    width: 38px;
    min-height: 38px;
    margin: 0;
    padding: 0;
    gap: 0;
    font-size: 0;
  }

  .site-header.site-header-home .site-header-book-call .icon {
    width: 17px;
    height: 17px;
  }

  .home-page .home-hero-upper-copy {
    width: calc(100% - 44px);
  }

  .home-page .home-hero-offer {
    display: none;
  }

  .home-page .home-hero-title-row {
    top: 330px;
    gap: 14px;
  }

  .home-page .home-hero-title-row h1 {
    font-size: 36px;
  }
}

.site-header.site-header-home {
  --home-notch-top: 30px;
  --home-notch-left: calc(100vw - 94px);
}

.home-page .home-hero-bottom-panel {
  --home-hero-bottom-notch: 145px;
}

.site-header-login-menu-mobile > summary {
  width: 100%;
}

.site-header.site-header-home .site-header-nav {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.site-header.site-header-home:not(.site-header-scrolled) .site-header-logo {
  max-width: calc(100% - 128px);
  min-width: 0;
  color: var(--hero-accent-on-photo);
}

.site-header.site-header-home .site-header-logo span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-header.site-header-home .site-header-book-call .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #183c40;
}

.home-page .home-hero-assurance {
  color: var(--ink);
}

.home-page .home-hero-assurance small {
  color: var(--muted);
}

.home-page .home-hero-offer > span {
  color: var(--tint-accent);
}

.home-page .cta-band .section-lede {
  color: #edf5f1;
}

:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) {
  border: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) .site-header-logo {
  color: var(--hero-accent-on-photo);
}

.site-header.site-header-home:not(.site-header-scrolled) .site-header-logo .icon,
:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) .site-header-logo .icon {
  color: var(--hero-accent-on-photo);
}

:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) .site-header-nav {
  border-color: var(--line);
  background: var(--surface-glass-strong);
}

:root[data-theme="dark"] .site-header.site-header-home .site-header-nav > a:not(.site-header-cta),
:root[data-theme="dark"] .site-header.site-header-home .site-header-login-menu > summary {
  color: var(--ink);
}

:root[data-theme="dark"] .site-header.site-header-home.site-header-scrolled .site-header-nav > a:not(.site-header-cta),
:root[data-theme="dark"] .site-header.site-header-home.site-header-scrolled .site-header-login-menu > summary,
:root[data-theme="dark"] .site-header.site-header-home .site-header-mobile-panel .site-header-login-menu > summary {
  color: var(--ink);
}

:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) .home-hero-theme-toggle,
:root[data-theme="dark"] .site-header.site-header-home:not(.site-header-scrolled) .site-header-menu-toggle {
  background: var(--surface);
  color: var(--teal-2);
}

.site-header.site-header-home .site-header-mobile-panel .theme-toggle .icon {
  color: currentColor;
}

@media (max-width: 1100px) {
  .site-header.site-header-home .site-header-nav,
  .site-header.site-header-home .home-hero-theme-toggle {
    display: none;
  }

  .site-header.site-header-home .site-header-menu-toggle {
    display: inline-flex;
  }

  .site-header.site-header-home:not(.site-header-scrolled) .site-header-mobile-panel {
    top: calc(var(--home-notch-top) + 56px);
  }

  .site-header.site-header-home.site-header-scrolled .site-header-menu-toggle {
    position: fixed;
    top: 8px;
    right: 18px;
    left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
  }

  .site-header.site-header-home.site-header-scrolled .site-header-book-call {
    margin-right: 58px;
  }
}

.site-header.site-header-home.site-header-compact .site-header-nav,
.site-header.site-header-home.site-header-compact .home-hero-theme-toggle,
.site-header.site-header-home.site-header-compact .site-header-story-link {
  display: none;
}

.site-header.site-header-home.site-header-compact .site-header-menu-toggle {
  display: inline-flex;
}

.site-header.site-header-home.site-header-compact .site-header-book-call {
  margin-left: auto;
  margin-right: 58px;
}

.site-header.site-header-home.site-header-compact:not(.site-header-scrolled) .site-header-mobile-panel {
  top: calc(var(--home-notch-top) + 56px);
}

.site-header.site-header-home.site-header-compact.site-header-scrolled .site-header-menu-toggle {
  position: fixed;
  top: 8px;
  right: 18px;
  left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

@media (max-width: 480px) {
  .site-header.site-header-home.site-header-scrolled .site-header-book-call .icon {
    flex-basis: 18px;
  }
}
@media (max-width: 340px) {
  .home-page .home-hero-categories {
    gap: 4px;
  }

  .home-page .home-hero-categories span {
    padding: 6px 7px;
    font-size: 0.56rem;
  }
}

.site-footer.site-footer-home {
  display: block;
  padding: 0 32px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  text-align: left;
}

.footer-main,
.footer-bottom {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-main > * {
  min-width: 0;
}

.site-footer.site-footer-home a {
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-footer.site-footer-home a:hover {
  color: var(--teal-2);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer.site-footer-home a:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
}

.footer-brand .icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  color: var(--teal-2);
}

.footer-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer-contact,
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-main h2 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.footer-contact > a,
.footer-links > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  line-height: 1.4;
}

.footer-contact .icon,
.footer-links .icon,
.footer-return .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.footer-contact > a > span,
.footer-links > a > span {
  min-width: 0;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.footer-social .icon {
  width: 22px;
  height: 22px;
  color: var(--teal-2);
}

.home-page .contact-section .section-eyebrow,
.home-page .contact-section > .landing-container > .section-title {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.home-page .contact-section .contact-page-grid {
  max-width: 1000px;
  margin: 40px auto 0;
}

.home-page .contact-section .contact-card,
.home-page .contact-section .contact-input,
.home-page .contact-section .contact-submit {
  border-radius: 8px;
}

.home-page .contact-section .contact-input,
:root[data-theme="dark"] .home-page .contact-section .contact-input {
  border-color: var(--muted);
}

.home-page .contact-section .contact-input:focus,
:root[data-theme="dark"] .home-page .contact-section .contact-input:focus {
  border-color: var(--teal-2);
}

.home-page .contact-section .contact-card h4 {
  margin: 0;
  font-size: 0.98rem;
}

.contact-card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

.contact-card-link .icon {
  width: 16px;
  height: 16px;
}

.home-page .contact-section .contact-card-icon {
  color: var(--teal-2);
}

.contact-form-notice {
  margin: 0;
  line-height: 1.5;
}

.contact-input:focus-visible,
.contact-submit:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 2px;
}

.contact-submit:disabled {
  cursor: progress;
  opacity: 0.65;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.footer-bottom small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.footer-return {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.footer-return .icon {
  transform: rotate(-90deg);
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding-top: 40px;
  }
}

@media (max-width: 600px) {
  .site-footer.site-footer-home {
    padding: 0 24px;
  }

  .footer-identity,
  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-main {
    gap: 28px 20px;
    padding-bottom: 32px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 0;
}

.auth-back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-back-link .icon {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
}

.auth-topbar a:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 4px;
}

.auth-screen.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  place-items: stretch;
  width: min(1180px, calc(100% - 48px));
  min-height: 660px;
  margin: 32px auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: clip;
}

.auth-screen .auth-box,
:root[data-theme="dark"] .auth-screen .auth-box {
  width: min(520px, 100%);
  max-height: none;
  margin: 0;
  padding: 40px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
}

.auth-layout .auth-box,
:root[data-theme="dark"] .auth-layout .auth-box {
  width: 100%;
  min-width: 0;
  padding: 40px 48px;
  border: 0;
  border-radius: 0;
  animation: auth-form-enter 450ms ease-out both;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 40px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.4;
}

.auth-brand .icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: var(--teal-2);
}

.auth-box .brand-row {
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.auth-box .brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--teal-2);
}

.auth-box h1 {
  margin: 4px 0 0;
  font-size: 2rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.auth-box .eyebrow {
  margin: 0;
  color: var(--teal-2);
  font-size: 0.72rem;
}

.auth-box .segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.auth-box .segmented > button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
}

.auth-box .segmented > button.active,
:root[data-theme="dark"] .auth-box .segmented > button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.auth-box .segmented-panel {
  grid-column: 1 / -1;
  margin-top: 12px;
  min-width: 0;
  animation: auth-form-enter 240ms ease-out;
}

.auth-box .text-field,
.auth-native-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1rem;
}

.auth-native-form input:not([type="hidden"]) {
  padding: 12px 14px;
  font-family: inherit;
}

.auth-box .text-field::placeholder,
.auth-native-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.auth-native-form .password-field-wrap input {
  padding-right: 52px;
}

.auth-layout .auth-box .text-field,
.auth-layout .auth-native-form input:not([type="hidden"]),
:root[data-theme="dark"] .auth-layout .auth-box .text-field,
:root[data-theme="dark"] .auth-layout .auth-native-form input:not([type="hidden"]) {
  border-color: var(--muted);
}

.auth-layout .auth-box .text-field:focus,
.auth-layout .auth-native-form input:focus,
:root[data-theme="dark"] .auth-layout .auth-box .text-field:focus,
:root[data-theme="dark"] .auth-layout .auth-native-form input:focus {
  border-color: var(--teal-2);
}

.auth-box .question-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-box .text-field:focus-visible,
.auth-native-form input:focus-visible,
.auth-box button:focus-visible,
.auth-box a:focus-visible {
  outline: 2px solid var(--teal-2);
  outline-offset: 3px;
}

.auth-box .primary-button {
  min-height: 48px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
}

.auth-box .panel-copy,
.auth-box .auth-signup-link {
  font-size: 0.86rem;
  line-height: 1.6;
}

.auth-box .client-consent {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-box .consent-box {
  color: var(--ink);
  font-size: 0.84rem;
}

.auth-box .consent-box > span {
  min-width: 0;
}

.auth-box .consent-box a {
  color: var(--teal-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-box .google-login-button {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.auth-visual {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 660px;
  overflow: hidden;
  background: #173a3d;
}

.auth-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: auth-photo-enter 700ms ease-out both;
}

.auth-visual::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 28, 32, 0.85), rgba(5, 28, 32, 0.05) 80%);
  content: "";
}

.auth-visual-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 48px;
  color: #fff;
}

.auth-visual-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.auth-visual-mark .icon {
  width: 24px;
  height: 24px;
}

.auth-visual-eyebrow {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-visual-copy h2 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.12;
}

.auth-visual-copy > p:last-child {
  margin: 20px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

@keyframes auth-form-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-photo-enter {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .auth-screen.auth-layout {
    width: min(580px, calc(100% - 32px));
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    margin: 24px auto;
  }

  .auth-visual {
    display: none;
  }

  .auth-layout .auth-box,
  :root[data-theme="dark"] .auth-layout .auth-box {
    padding: 32px;
  }

  .auth-brand {
    margin-bottom: 28px;
  }
}

@media (max-width: 480px) {
  .auth-layout .auth-box,
  :root[data-theme="dark"] .auth-layout .auth-box,
  .auth-screen .auth-box {
    padding: 24px 20px;
  }

  .auth-box h1 {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-layout .auth-box,
  :root[data-theme="dark"] .auth-layout .auth-box,
  .auth-box .segmented-panel,
  .auth-visual-image {
    animation: none;
  }
}

.brand-signature-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-signature-name {
  font-family: "Marina Serif", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.brand-signature-descriptor {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-header-logo,
.auth-brand,
.footer-brand {
  min-width: 0;
}

.site-header-logo > .icon,
.auth-brand > .icon,
.footer-brand > .icon {
  flex: 0 0 42px;
  width: 42px;
  height: 49px;
}

@media (max-width: 480px) {
  .site-header-logo .brand-signature-name,
  .auth-brand .brand-signature-name {
    font-size: 17px;
  }

  .site-header-logo > .icon,
  .auth-brand > .icon {
    flex-basis: 34px;
    width: 34px;
    height: 40px;
  }
}
