:root {
  color-scheme: light;
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-soft: #eef0ed;
  --text: #1b1d1e;
  --muted: #646a66;
  --border: #d9ddd8;
  --primary: #3c5142;
  --primary-strong: #2d4034;
  --primary-soft: #e8ede9;
  --info: #456d7d;
  --info-accent: #6f98a8;
  --info-soft: #eaf1f3;
  --success: #59674f;
  --success-soft: #edf1ea;
  --warning: #8a6505;
  --warning-accent: #d7a719;
  --warning-soft: #f8efd2;
  --danger: #96002e;
  --danger-soft: #f7e8ec;
  --provence: #726580;
  --provence-accent: #9d91af;
  --provence-soft: #f0edf3;
  --balance-physiology: #62a744;
  --balance-safety: #27628d;
  --balance-connection: #d7a719;
  --balance-significance: #96002e;
  --teal: var(--primary);
  --teal-2: var(--primary-strong);
  --teal-soft: var(--primary-soft);
  --aqua: var(--info-accent);
  --green: var(--success);
  --green-soft: var(--success-soft);
  --gold: var(--warning);
  --gold-soft: var(--warning-soft);
  --radius: 8px;
  --shadow: 0 16px 34px rgb(27 29 30 / 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(16px, 3vw, 36px);
  background: rgb(244 244 242 / 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.brand,
.topbar-actions,
.mode-row,
.entry-head,
.entry-main,
.row-between,
.inline-actions,
.journal-head,
.journal-controls,
.entry-actions,
.journal-entry-controls,
.check-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle,
.section-eyebrow,
.muted,
.save-state,
.meta {
  color: var(--muted);
}

.brand-subtitle {
  font-size: 13px;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 12px;
}

.api-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.api-field input {
  width: min(40vw, 330px);
  height: 38px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(60 81 66 / 0.13);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(300px, 520px);
  justify-content: center;
  gap: 0;
  width: min(560px, calc(100vw - 32px));
  margin: 64px auto;
  align-items: stretch;
}

.auth-panel,
.passport-hero,
.panel,
.entry-card,
.history-card,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth-panel {
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-panel h1,
.passport-title,
.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.auth-panel h1 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.12;
}

.auth-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.compact-form {
  margin-top: 14px;
}

.stack-form label,
.form-grid label,
.entry-form label,
.journal-form label,
.compact-select {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.access-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-divider::before,
.access-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}


.grant-layout {
  width: min(760px, calc(100vw - 32px));
  margin: 32px auto 56px;
}

.grant-panel {
  display: grid;
  gap: 16px;
}

.grant-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
}

.grant-code-form {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.grant-list {
  display: grid;
  gap: 12px;
}

.grant-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 22px rgb(27 29 30 / 0.05);
}

.grant-card:hover {
  border-color: rgb(60 81 66 / 0.35);
  background: linear-gradient(90deg, rgb(232 237 233 / 0.82), #fff);
}

.grant-avatar {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 24px;
  font-weight: 850;
}

.grant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grant-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.grant-copy strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grant-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grant-arrow {
  color: var(--teal);
  font-size: 28px;
  font-weight: 800;
}

.grant-empty {
  padding: 22px;
}

@media (max-width: 720px) {
  .grant-code-form {
    grid-template-columns: 1fr;
  }
}


.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100vw - 32px));
  margin: 24px auto 56px;
  align-items: start;
}

.workspace.single-passport {
  grid-template-columns: minmax(0, 1fr);
  width: min(1240px, calc(100vw - 32px));
}

.section-eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.hero-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(89 103 79 / 0.55), rgb(111 152 168 / 0.45)),
    var(--teal-soft);
  color: var(--teal);
  font-weight: 850;
}

.hero-avatar {
  width: 118px;
  aspect-ratio: 1;
  border-radius: 8px;
  font-size: 46px;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.passport-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgb(232 237 233 / 0.9), rgb(255 255 255 / 0.96)),
    var(--surface);
}

.passport-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.hero-meta,
.pill-row,
.inline-actions,
.mode-row,
.row-between {
  gap: 10px;
  flex-wrap: wrap;
}

.pill-row {
  display: flex;
  margin-top: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.pill.green {
  color: #4b5d45;
  background: var(--green-soft);
}

.pill.gold {
  color: #8a6505;
  background: var(--gold-soft);
}

.pill.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.mode-row {
  justify-content: space-between;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.segmented button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--teal);
  color: white;
}

.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.main-stack,
.side-stack,
.section-stack,
.entry-list,
.history-list {
  display: grid;
  gap: 12px;
}

.panel {
  padding: 18px;
}

.panel h2 {
  font-size: 20px;
}

.panel h3 {
  font-size: 17px;
}

.metric-grid,
.priority-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric,
.priority-card,
.summary-item {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.priority-card {
  display: grid;
  align-content: space-between;
  min-height: 104px;
  background: linear-gradient(180deg, #f8f9f7, #eef0ed);
}

.priority-card.attention {
  background: linear-gradient(180deg, #fff8e3, #fff1c0);
  border-color: #f0d47a;
}

.priority-label {
  color: var(--muted);
  font-size: 14px;
}

.priority-value {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
}

.metric-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 850;
}

.summary-grid {
  margin-top: 14px;
}

.summary-item {
  min-height: 84px;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.summary-item strong {
  display: block;
  margin-top: 7px;
  line-height: 1.25;
}

.compact-clinical-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.compact-row,
.action-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.compact-row {
  grid-template-columns: 1fr auto;
}

.compact-row span {
  color: var(--muted);
  font-size: 13px;
}

.action-list,
.attachment-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-document-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.document-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.document-preview-head h2 {
  margin: 0;
  font-size: 20px;
}

.document-zoom-controls {
  display: flex;
  gap: 6px;
}

.document-zoom-value {
  min-width: 72px;
}

.document-preview-body {
  min-height: min(720px, 78vh);
  max-height: min(820px, 82vh);
  overflow: auto;
  background: var(--surface-soft);
}

.document-preview-canvas {
  display: inline-block;
  min-width: max-content;
  padding: 18px;
  transform: scale(var(--document-zoom, 1));
  transform-origin: top left;
}

.document-preview-frame,
.document-preview-media {
  display: block;
  width: min(1120px, calc(100vw - 120px));
  height: min(720px, 78vh);
  min-height: 520px;
  border: 0;
  background: var(--surface);
}

.document-preview-image {
  display: block;
  width: auto;
  max-width: none;
  max-height: none;
}

.document-preview-audio {
  width: min(620px, calc(100% - 32px));
  margin: 24px 16px;
}

.document-preview-text {
  width: min(980px, calc(100vw - 140px));
  min-height: 620px;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
  color: var(--text);
}

.document-preview-empty {
  display: grid;
  place-items: center;
  align-content: center;
  width: min(760px, calc(100vw - 140px));
  min-height: 420px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.document-preview-empty h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.journal-panel {
  display: grid;
  gap: 16px;
}

.journal-head {
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.journal-controls,
.entry-actions,
.journal-entry-controls {
  gap: 8px;
  flex-wrap: wrap;
}

.journal-controls {
  justify-content: flex-end;
}

.compact-select {
  min-width: 150px;
}

.compact-select span {
  font-size: 12px;
  text-transform: uppercase;
}

.journal-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  min-height: 44px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.journal-group {
  display: grid;
  gap: 10px;
}

.journal-entry {
  background: var(--surface);
}

.journal-entry.pinned {
  border-color: rgb(60 81 66 / 0.28);
  background: linear-gradient(180deg, #fafbf9, #f0f8fa);
}

.journal-entry.important {
  border-color: #efd98b;
}

.journal-entry.critical {
  border-color: #e7c6d0;
}

.journal-entry-controls {
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.attachment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.entry-card {
  padding: 16px;
  transition: border-color 160ms ease, background 160ms ease;
}

.entry-head {
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.entry-main {
  min-width: 0;
  gap: 12px;
  align-items: flex-start;
}

.entry-type-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 900;
}

.entry-title {
  font-weight: 850;
  font-size: 17px;
}

.entry-notes {
  margin-top: 10px;
  color: var(--muted);
  white-space: pre-wrap;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.detail {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-key {
  color: var(--muted);
  font-size: 12px;
}

.detail-value {
  margin-top: 3px;
  font-weight: 750;
}

.history-card {
  padding: 12px;
}

.count-pill {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
}

.history-card strong {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .wide,
.entry-form .wide {
  grid-column: 1 / -1;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.entry-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.editable-entry {
  border-color: var(--border);
}

.editable-entry.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 850;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: white;
  padding: 0 16px;
}

.primary-button:hover {
  background: var(--teal-2);
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--teal);
  padding: 0 14px;
}

.danger-button {
  border: 1px solid var(--danger-soft);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 0 14px;
}

.icon-button {
  width: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--teal);
}

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  border-radius: var(--radius);
  color: white;
  background: var(--text);
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
}

@media (max-width: 980px) {
  .workspace,
  .auth-layout,
  .body-grid {
    grid-template-columns: 1fr;
  }

  .passport-hero {
    grid-template-columns: auto 1fr;
  }

  .hero-actions {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .priority-grid,
  .summary-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .journal-head,
  .journal-controls,
  .journal-entry-controls,
  .attachment-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .journal-head,
  .journal-controls,
  .journal-entry-controls {
    display: grid;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .api-field,
  .api-field input,
  .segmented {
    width: 100%;
  }


  .form-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }


  .passport-hero {
    grid-template-columns: 1fr;
  }
}


/* Doctor passport dashboard polish */
.workspace.single-passport {
  width: min(1240px, calc(100vw - 48px));
}

.passport-hero {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 24px;
  border-color: #d9ddd8;
  background:
    linear-gradient(100deg, rgb(232 237 233 / 0.98) 0%, rgb(246 251 252 / 0.96) 44%, #fff 100%);
  box-shadow: 0 14px 34px rgb(27 29 30 / 0.06);
}

.passport-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-left: 4px solid rgb(60 81 66 / 0.55);
}

.passport-hero > * {
  position: relative;
  z-index: 1;
}

.passport-hero .hero-avatar {
  width: 126px;
  border: 1px solid rgb(255 255 255 / 0.7);
  box-shadow: 0 14px 28px rgb(60 81 66 / 0.14);
}

.passport-title {
  max-width: 720px;
  font-size: clamp(36px, 4vw, 48px);
}

.hero-meta {
  margin-top: 4px;
  font-size: 15px;
}

.pill-row {
  gap: 8px;
  margin-top: 12px;
}

.pill {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgb(60 81 66 / 0.06);
}

.hero-actions .secondary-button {
  min-width: 150px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 8px 18px rgb(27 29 30 / 0.04);
}

.body-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.panel {
  border-color: #d9ddd8;
  box-shadow: 0 10px 26px rgb(27 29 30 / 0.045);
}

.panel > .row-between:first-child {
  align-items: center;
  margin-bottom: 10px;
}

.panel h2 {
  line-height: 1.18;
}

.priority-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.priority-card,
.summary-item {
  border-color: #d9ddd8;
  background: #fafbf9;
}

.priority-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 16px;
}

.priority-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(60 81 66 / 0.35);
}

.priority-card.attention::before {
  background: var(--gold);
}

.priority-label,
.summary-item span {
  font-size: 13px;
  font-weight: 700;
}

.priority-value {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.summary-item {
  min-height: 86px;
  padding: 13px 14px;
}

.summary-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-row,
.action-card,
.history-card {
  border-color: #d9ddd8;
  background: #fafbf9;
}

.action-card {
  align-items: center;
}

.side-stack {
  gap: 16px;
}

.side-stack .panel {
  position: sticky;
  top: 88px;
}

.history-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
}

#historyPanel .empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  border-style: dashed;
  background: #fafbf9;
}

.journal-panel {
  gap: 14px;
}

.journal-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 980px) {
  .workspace.single-passport {
    width: min(100%, calc(100vw - 24px));
  }

  .passport-hero {
    min-height: 0;
    padding: 18px;
  }

  .passport-hero .hero-avatar {
    width: 92px;
  }

  .passport-title {
    font-size: clamp(30px, 9vw, 42px);
  }

  .side-stack .panel {
    position: static;
  }
}

.timeline-panel {
  overflow: visible;
}

.timeline-subtitle {
  margin-top: 2px;
  font-size: 14px;
}

.timeline-track {
  position: relative;
  height: 116px;
  margin-top: 16px;
  border: 1px solid #d9ddd8;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgb(232 237 233 / 0.48), rgb(255 255 255 / 0.92)),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(25% - 1px), rgb(60 81 66 / 0.07) calc(25% - 1px), rgb(60 81 66 / 0.07) 25%);
}

.timeline-line {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(60 81 66 / 0.2), rgb(60 81 66 / 0.58), rgb(60 81 66 / 0.2));
}

.timeline-dot {
  position: absolute;
  top: calc(16px + var(--lane) * 22px);
  width: 15px;
  height: 15px;
  transform: translateX(-50%);
  border: 3px solid white;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 4px 10px rgb(27 29 30 / 0.16);
}

.timeline-dot.visit,
.timeline-legend-dot.visit {
  background: var(--teal);
}

.timeline-dot.green,
.timeline-legend-dot.green {
  background: var(--green);
}

.timeline-dot.gold,
.timeline-legend-dot.gold {
  background: var(--gold);
}

.timeline-dot.danger,
.timeline-legend-dot.danger {
  background: var(--danger);
}

.timeline-dot.muted,
.timeline-legend-dot.muted {
  background: #7d847f;
}

.timeline-tooltip {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: none;
  width: max-content;
  max-width: 260px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.timeline-tooltip strong,
.timeline-tooltip small {
  display: block;
}

.timeline-tooltip small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-dot:hover .timeline-tooltip {
  display: block;
}

.timeline-scale,
.metric-spark-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.timeline-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.timeline-hint {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fafbf9;
  color: var(--muted);
  font-size: 14px;
}

.metric-spark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric-spark-card {
  padding: 14px;
  border: 1px solid #d9ddd8;
  border-radius: var(--radius);
  background: #fafbf9;
}

.metric-spark-card strong {
  color: var(--teal);
  font-size: 20px;
}

.spark-title {
  font-weight: 850;
}

.sparkline {
  display: block;
  width: 100%;
  height: 86px;
  margin-top: 8px;
  color: var(--teal);
  overflow: visible;
}

.sparkline circle {
  fill: white;
  stroke: currentColor;
  stroke-width: 3;
}

@media (max-width: 720px) {
  .metric-spark-grid {
    grid-template-columns: 1fr;
  }

  .timeline-tooltip {
    max-width: 210px;
  }
}

.doctor-profile-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d9ddd8;
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, rgb(232 237 233 / 0.92), rgb(255 255 255 / 0.96)),
    var(--surface);
  box-shadow: 0 12px 28px rgb(27 29 30 / 0.055);
}

.doctor-profile-card.editing {
  display: block;
}

.doctor-profile-avatar {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(60 81 66 / 0.12);
  border-radius: 50%;
  background: white;
  color: var(--teal);
  font-size: 24px;
  font-weight: 900;
}

.doctor-profile-copy {
  min-width: 0;
}

.doctor-profile-copy h2 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 24px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doctor-profile-line {
  margin-top: 4px;
  color: var(--teal);
  font-weight: 800;
}

.doctor-profile-note {
  margin-top: 6px;
  color: var(--muted);
}

.doctor-profile-form {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.doctor-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.doctor-profile-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.doctor-profile-fields .wide,
.doctor-profile-actions {
  grid-column: 1 / -1;
}

.doctor-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .doctor-profile-card,
  .doctor-profile-form,
  .doctor-profile-fields {
    grid-template-columns: 1fr;
  }

  .doctor-profile-card > .secondary-button {
    width: 100%;
  }

  .doctor-profile-avatar {
    width: 56px;
  }
}
.care-context-heading {
  align-items: flex-start;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cfe4d8;
  border-radius: 999px;
  background: #edf8f1;
  color: #4b5d45;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.care-context-overview {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.care-context-overview-row,
.care-context-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.care-context-overview-row span {
  color: var(--muted);
  font-size: 13px;
}

.care-context-overview-row strong {
  line-height: 1.45;
}

.care-context-list {
  margin-top: 8px;
}

.care-context-title {
  color: var(--teal);
  font-weight: 850;
}

.care-context-copy {
  color: var(--text);
  line-height: 1.5;
}

.care-context-points {
  display: grid;
  gap: 10px;
}

.care-context-point {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  line-height: 1.45;
}

.care-context-point i {
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.care-context-point strong,
.care-context-point span {
  display: block;
}

.care-context-point span {
  color: var(--muted);
}

.care-context-date {
  margin-top: 12px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .care-context-heading {
    display: grid;
    gap: 10px;
  }

  .care-context-heading .source-pill {
    justify-self: start;
  }

  .care-context-overview-row,
  .care-context-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* Public landing */

html {
  scroll-behavior: smooth;
}

.landing-page {
  --landing-ink: #1b1d1e;
  --landing-teal: #3c5142;
  --landing-teal-dark: #2d4034;
  --landing-mint: #e8ede9;
  --landing-cream: #f4f4f2;
  --landing-gold: #d7a719;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgb(89 103 79 / 0.12), transparent 23rem),
    radial-gradient(circle at 4% 30%, rgb(111 152 168 / 0.09), transparent 26rem),
    var(--landing-cream);
  color: var(--landing-ink);
}

.landing-page a {
  color: inherit;
  text-decoration: none;
}

.landing-header {
  position: relative;
  z-index: 20;
  display: flex;
  width: min(1240px, calc(100vw - 48px));
  min-height: 92px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--landing-ink);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.landing-brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.landing-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
  color: #646a66;
  font-size: 14px;
  font-weight: 750;
}

.landing-nav > a:not(.landing-cabinet-link) {
  padding: 12px 0;
  transition: color 160ms ease;
}

.landing-nav > a:not(.landing-cabinet-link):hover {
  color: var(--landing-teal);
}

.landing-cabinet-link {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgb(60 81 66 / 0.24);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.72);
  color: var(--landing-teal) !important;
  box-shadow: 0 8px 22px rgb(27 29 30 / 0.045);
}

.landing-cabinet-link svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  width: min(1240px, calc(100vw - 48px));
  min-height: 690px;
  margin: 0 auto;
  padding: 72px 0 82px;
  align-items: center;
  gap: clamp(44px, 7vw, 104px);
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--landing-teal);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.landing-kicker > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--landing-gold);
  box-shadow: 0 0 0 5px rgb(215 167 25 / 0.15);
}

.landing-kicker.light {
  color: #cdd9cf;
}

.landing-hero h1 {
  max-width: 720px;
  margin: 24px 0 22px;
  font-size: clamp(54px, 6.1vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.066em;
}

.landing-hero h1 em {
  color: var(--landing-teal);
  font-style: normal;
}

.landing-lead {
  max-width: 650px;
  margin: 0;
  color: #646a66;
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.48;
}

.landing-hero-actions {
  display: flex;
  margin-top: 34px;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-button {
  display: inline-flex;
  min-height: 54px;
  padding: 0 23px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.landing-button:hover {
  transform: translateY(-2px);
}

.landing-button.primary {
  background: var(--landing-teal);
  color: white;
  box-shadow: 0 14px 30px rgb(60 81 66 / 0.2);
}

.landing-button.primary:hover {
  background: var(--landing-teal-dark);
  box-shadow: 0 18px 34px rgb(60 81 66 / 0.26);
}

.landing-button.secondary {
  border-color: #d9ddd8;
  background: rgb(255 255 255 / 0.82);
  color: var(--landing-teal);
}

.landing-button.white {
  background: white;
  color: var(--landing-teal);
  box-shadow: 0 14px 30px rgb(27 29 30 / 0.18);
}

.landing-trust-list {
  display: flex;
  margin: 28px 0 0;
  padding: 0;
  gap: 16px 22px;
  flex-wrap: wrap;
  color: #646a66;
  font-size: 13px;
  list-style: none;
}

.landing-trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.landing-trust-list span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #edf1ea;
  color: #59674f;
  font-size: 11px;
  font-weight: 900;
}

.landing-product-stage {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
}

.landing-orbit {
  position: absolute;
  border: 1px solid rgb(60 81 66 / 0.11);
  border-radius: 50%;
}

.orbit-one {
  width: 520px;
  height: 520px;
}

.orbit-two {
  width: 640px;
  height: 640px;
  border-style: dashed;
}

.landing-phone {
  position: relative;
  z-index: 2;
  width: 338px;
  padding: 10px;
  border: 7px solid #252826;
  border-radius: 52px;
  background: #252826;
  box-shadow: 0 38px 70px rgb(27 29 30 / 0.22), 0 8px 18px rgb(27 29 30 / 0.1);
  transform: rotate(1.5deg);
}

.landing-phone-speaker {
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 50%;
  width: 88px;
  height: 24px;
  border-radius: 999px;
  background: #1b1d1e;
  transform: translateX(-50%);
}

.landing-phone-screen {
  min-height: 582px;
  padding: 14px 14px 20px;
  overflow: hidden;
  border-radius: 38px;
  background: #f4f4f2;
}

.phone-status {
  display: flex;
  height: 28px;
  padding: 0 5px;
  align-items: flex-start;
  justify-content: space-between;
  color: #2d312e;
  font-size: 10px;
  font-weight: 850;
}

.phone-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 8px 0 14px;
}

.phone-heading > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.phone-heading b {
  font-size: 19px;
}

.phone-heading small,
.phone-care-level-card small,
.phone-balance-card small {
  color: #707670;
}

.phone-pet-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-weight: 900;
}

.phone-care-level-card {
  padding: 13px;
  border: 1px solid #d9ddd8;
  border-radius: 22px;
  background: white;
}

.phone-care-level-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.phone-care-level-head img {
  width: 48px;
  height: 48px;
}

.phone-care-level-head > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.phone-care-level-head small,
.phone-level-progress small,
.phone-level-progress em {
  font-size: 10px;
}

.phone-care-level-head b {
  font-size: 15px;
}

.phone-level {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid #d9ddd8;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-size: 10px;
  font-weight: 900;
}

.phone-level-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #e3e6e2;
  border-radius: 15px;
  background: #f8f9f7;
}

.phone-level-progress > span {
  display: grid;
  gap: 2px;
}

.phone-level-progress > span:nth-child(2) {
  justify-items: end;
}

.phone-level-progress b {
  font-size: 13px;
}

.phone-level-progress em {
  color: #707670;
  font-style: normal;
}

.phone-level-progress > div {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #d9ddd8;
}

.phone-level-progress > div span {
  display: block;
  width: 71%;
  height: 100%;
  border-radius: inherit;
  background: var(--balance-physiology);
}

.phone-balance-card {
  margin-top: 11px;
  padding: 13px;
  border: 1px solid #d9ddd8;
  border-radius: 20px;
  background: white;
}

.phone-balance-title {
  display: grid;
  gap: 2px;
}

.phone-balance-title b {
  font-size: 14px;
}

.phone-balance-title small {
  font-size: 10px;
}

.phone-balance-content {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}

.phone-balance-legend {
  display: grid;
  gap: 8px;
}

.phone-balance-legend > span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 20px;
  gap: 6px;
  align-items: center;
  color: #4f5551;
  font-size: 9px;
}

.phone-balance-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.phone-balance-legend i.physiology { background: var(--balance-physiology); }
.phone-balance-legend i.safety { background: var(--balance-safety); }
.phone-balance-legend i.connection { background: var(--balance-connection); }
.phone-balance-legend i.significance { background: var(--balance-significance); }

.phone-balance-legend b {
  text-align: right;
  font-size: 9px;
}

.mini-wheel {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
}

.mini-wheel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wheel-sector {
  fill: none;
  stroke-linecap: butt;
}

.mini-wheel .physiology { stroke: var(--balance-physiology); stroke-width: 20; }
.mini-wheel .safety { stroke: var(--balance-safety); stroke-width: 8.9; }
.mini-wheel .connection { stroke: var(--balance-connection); stroke-width: 11.1; }
.mini-wheel .significance { stroke: var(--balance-significance); stroke-width: 8.9; }

.mini-wheel circle {
  fill: white;
  stroke: #d9ddd8;
  stroke-width: 1.5;
}

.mini-wheel span {
  position: relative;
  z-index: 1;
  color: var(--landing-teal);
  font-size: 18px;
  font-weight: 900;
}

.phone-checklist-link {
  display: block;
  margin-top: 12px;
  color: var(--landing-teal);
  font-size: 10px;
  font-weight: 900;
}

.landing-proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 24px 0;
  border-top: 1px solid rgb(60 81 66 / 0.13);
  border-bottom: 1px solid rgb(60 81 66 / 0.13);
}

.landing-proof-strip > div {
  display: grid;
  padding: 8px 26px;
  border-right: 1px solid rgb(60 81 66 / 0.13);
}

.landing-proof-strip > div:first-child {
  padding-left: 0;
}

.landing-proof-strip > div:last-child {
  border: 0;
}

.landing-proof-strip strong {
  color: var(--landing-teal);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.landing-proof-strip span {
  margin-top: 3px;
  color: #646a66;
  font-size: 12px;
}

.landing-section {
  width: min(1240px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 112px 0;
}

.landing-section-heading {
  max-width: 780px;
}

.landing-section-heading.centered {
  margin: 0 auto;
  text-align: center;
}

.landing-section-heading.centered .landing-kicker {
  justify-content: center;
}

.landing-section-heading h2,
.balance-copy h2,
.professional-copy h2,
.landing-final-cta h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 4.7vw, 61px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.landing-section-heading p,
.balance-copy > p,
.professional-copy > p,
.landing-final-cta p {
  margin: 0;
  color: #646a66;
  font-size: 18px;
  line-height: 1.58;
}

.landing-question-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.landing-question-grid article {
  min-height: 250px;
  padding: 28px;
  border: 1px solid #d9ddd8;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.76);
  box-shadow: 0 16px 40px rgb(27 29 30 / 0.045);
}

.question-number {
  color: #7d8983;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.landing-question-grid h3,
.bento-card h3,
.journey-grid h3,
.principles-grid h3 {
  margin: 48px 0 10px;
  font-size: 25px;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.landing-question-grid p,
.bento-card p,
.journey-grid p,
.principles-grid p {
  margin: 0;
  color: #646a66;
  line-height: 1.55;
}

.balance-story {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
  width: min(1380px, calc(100vw - 32px));
  padding: 72px clamp(38px, 6vw, 88px);
  align-items: center;
  gap: clamp(60px, 8vw, 120px);
  border-radius: 48px;
  background:
    radial-gradient(circle at 15% 20%, rgb(255 255 255 / 0.14), transparent 16rem),
    linear-gradient(135deg, #3c5142, #2d4034);
  color: white;
  box-shadow: 0 34px 80px rgb(45 64 52 / 0.18);
}

.balance-visual {
  display: grid;
  min-height: 420px;
  place-items: center;
}

.balance-wheel-card {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: 30px;
  background: #fafbf9;
  color: var(--landing-ink);
  box-shadow: 0 28px 54px rgb(0 0 0 / 0.22);
  transform: rotate(-1.2deg);
}

.balance-wheel-heading {
  display: grid;
  gap: 4px;
}

.balance-wheel-heading strong {
  font-size: 22px;
}

.balance-wheel-heading span {
  color: #707670;
  font-size: 15px;
}

.balance-wheel-content {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  margin-top: 22px;
  align-items: center;
  gap: 20px;
}

.balance-wheel {
  position: relative;
  display: grid;
  width: 210px;
  height: 210px;
  place-items: center;
}

.balance-wheel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.balance-wheel .physiology { stroke: var(--balance-physiology); stroke-width: 93; }
.balance-wheel .safety { stroke: var(--balance-safety); stroke-width: 41.3; }
.balance-wheel .connection { stroke: var(--balance-connection); stroke-width: 51.7; }
.balance-wheel .significance { stroke: var(--balance-significance); stroke-width: 41; }

.balance-wheel circle {
  fill: #fff;
  stroke: #d9ddd8;
  stroke-width: 2;
}

.balance-wheel > strong {
  position: relative;
  z-index: 1;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.balance-legend {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 15px;
  list-style: none;
}

.balance-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.balance-legend li > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.balance-legend li > span.physiology { background: var(--balance-physiology); }
.balance-legend li > span.safety { background: var(--balance-safety); }
.balance-legend li > span.connection { background: var(--balance-connection); }
.balance-legend li > span.significance { background: var(--balance-significance); }

.balance-legend b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-legend strong {
  color: #707670;
}

.level-progress-demo {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  margin-top: 22px;
  padding-top: 20px;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #e3e6e2;
}

.level-progress-badge {
  width: 48px;
  height: 48px;
}

.level-progress-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.level-progress-copy small,
.level-progress-demo > strong {
  color: #707670;
  font-size: 11px;
}

.level-progress-copy b {
  font-size: 14px;
}

.level-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e3e6e2;
}

.level-progress-track span {
  display: block;
  width: 71%;
  height: 100%;
  background: var(--balance-physiology);
}

.level-progress-demo > strong {
  max-width: 92px;
  color: var(--landing-teal);
  line-height: 1.35;
  text-align: right;
}

.balance-copy h2,
.professional-copy h2 {
  color: white;
}

.balance-copy > p,
.professional-copy > p {
  color: #cbd4cd;
}

.landing-check-list {
  display: grid;
  margin: 30px 0 0;
  padding: 0;
  gap: 18px;
  list-style: none;
}

.landing-check-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
}

.landing-check-list li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: rgb(255 255 255 / 0.11);
  color: #9cddaf;
  font-weight: 900;
}

.landing-check-list li > div {
  display: grid;
  gap: 3px;
}

.landing-check-list b {
  font-size: 16px;
}

.landing-check-list small {
  color: #b9c8bd;
  font-size: 13px;
}

.landing-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.bento-card {
  grid-column: span 4;
  min-height: 290px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #d9ddd8;
  border-radius: 30px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 18px 44px rgb(27 29 30 / 0.045);
}

.bento-card h3 {
  margin: 18px 0 10px;
}

.bento-ai {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 0.8fr);
  grid-column: span 8;
  gap: 20px;
  align-items: start;
  background: linear-gradient(135deg, #edf1ea, #f8fcfa);
}

.bento-partners {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) 1fr;
  grid-column: span 8;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, #e8ede9, #fafbf9);
}

.bento-family {
  grid-column: span 5;
}

.bento-care-map {
  grid-column: span 7;
}

.bento-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: var(--landing-teal);
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.bento-icon.outline {
  background: #eaf1f3;
  color: var(--landing-teal);
}

.bento-overline {
  color: var(--landing-teal);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.assistant-demo {
  display: grid;
  padding: 18px;
  gap: 8px;
  border: 1px solid rgb(89 103 79 / 0.25);
  border-radius: 22px;
  background: white;
  box-shadow: 0 15px 34px rgb(89 103 79 / 0.09);
}

.assistant-demo span {
  color: #59674f;
  font-size: 11px;
  font-weight: 850;
}

.assistant-demo strong {
  line-height: 1.35;
}

.assistant-demo small {
  color: #707670;
  font-size: 11px;
}

.partner-catalog-demo {
  min-width: 280px;
  padding: 18px;
  border: 1px solid #d9ddd8;
  border-radius: 20px;
  background: white;
  box-shadow: 0 15px 34px rgb(60 81 66 / 0.08);
}

.catalog-demo-head,
.catalog-demo-row {
  display: grid;
  align-items: center;
}

.catalog-demo-head {
  grid-template-columns: 1fr auto;
  padding-bottom: 12px;
  gap: 12px;
}

.catalog-demo-head span {
  color: var(--landing-teal);
  font-size: 11px;
  font-weight: 800;
}

.catalog-demo-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 11px 0;
  gap: 10px;
  border-top: 1px solid #edf0ec;
}

.catalog-demo-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-weight: 900;
}

.catalog-demo-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.catalog-demo-row b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-demo-row small {
  color: #707670;
  font-size: 10px;
}

.catalog-demo-row > strong {
  color: var(--landing-teal);
  font-size: 20px;
}

.journey-section {
  padding-top: 72px;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 48px;
  border-top: 1px solid #d9ddd8;
}

.journey-grid article {
  display: grid;
  grid-template-columns: 50px 1fr;
  min-height: 210px;
  padding: 30px 28px 0 0;
  gap: 15px;
  border-right: 1px solid #d9ddd8;
}

.journey-grid article + article {
  padding-left: 28px;
}

.journey-grid article:last-child {
  border-right: 0;
}

.journey-grid article > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  background: var(--landing-teal);
  color: white;
  font-weight: 900;
}

.journey-grid h3 {
  margin: 3px 0 9px;
}

.professional-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  width: min(1380px, calc(100vw - 32px));
  padding: 80px clamp(38px, 6vw, 88px);
  align-items: center;
  gap: clamp(52px, 7vw, 100px);
  border-radius: 48px;
  background: #2d4034;
  color: white;
}

.professional-actions {
  display: flex;
  margin-top: 32px;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.professional-actions > span {
  max-width: 180px;
  color: #b9c8bd;
  font-size: 12px;
}

.doctor-preview {
  padding: 22px;
  border-radius: 30px;
  background: #fafbf9;
  color: var(--landing-ink);
  box-shadow: 0 28px 54px rgb(0 0 0 / 0.22);
  transform: rotate(1.2deg);
}

.doctor-preview-head,
.doctor-pet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.doctor-preview-head {
  padding-bottom: 18px;
  border-bottom: 1px solid #e3e6e2;
}

.doctor-preview-head > div,
.doctor-pet > div,
.doctor-note > div {
  display: grid;
}

.doctor-preview small {
  color: #707670;
}

.doctor-cross,
.doctor-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-size: 22px;
  font-weight: 900;
}

.secure-pill,
.access-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf1ea;
  color: #59674f;
  font-size: 10px;
  font-weight: 850;
}

.doctor-pet {
  padding: 20px 0;
}

.doctor-pet b {
  font-size: 21px;
}

.access-pill {
  background: #eaf1f3;
  color: var(--landing-teal);
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.doctor-grid > div {
  display: grid;
  min-height: 78px;
  padding: 12px;
  align-content: center;
  gap: 4px;
  border-radius: 17px;
  background: #eef0ed;
}

.doctor-grid b {
  font-size: 13px;
}

.doctor-note {
  display: grid;
  grid-template-columns: 34px 1fr;
  margin-top: 10px;
  padding: 13px;
  align-items: center;
  gap: 10px;
  border-radius: 17px;
  background: #f8efd2;
}

.doctor-note > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: white;
  color: #8a6505;
  font-weight: 900;
}

.principles-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(50px, 8vw, 120px);
}

.principles-grid {
  display: grid;
  gap: 10px;
}

.principles-grid article {
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: 22px 0;
  gap: 0 15px;
  border-bottom: 1px solid #d9ddd8;
}

.principles-grid article > span {
  grid-row: 1 / 3;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-size: 22px;
  font-weight: 900;
}

.principles-grid h3 {
  margin: 0 0 6px;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  padding-top: 64px;
  gap: clamp(40px, 8vw, 110px);
}

.landing-section-heading.compact h2 {
  font-size: 46px;
}

.landing-faq {
  border-top: 1px solid #d9ddd8;
}

.landing-faq details {
  border-bottom: 1px solid #d9ddd8;
}

.landing-faq summary {
  position: relative;
  padding: 23px 50px 23px 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  list-style: none;
}

.landing-faq summary::-webkit-details-marker {
  display: none;
}

.landing-faq summary::after {
  content: "+";
  position: absolute;
  top: 20px;
  right: 4px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: #eaf1f3;
  color: var(--landing-teal);
  font-size: 21px;
}

.landing-faq details[open] summary::after {
  content: "−";
}

.landing-faq details p {
  margin: -6px 56px 24px 0;
  color: #646a66;
  line-height: 1.55;
}

.landing-final-cta {
  display: grid;
  width: min(1240px, calc(100vw - 48px));
  min-height: 500px;
  margin: 36px auto 0;
  padding: 70px 32px;
  place-items: center;
  border: 1px solid #d9ddd8;
  border-radius: 48px;
  background:
    radial-gradient(circle at 50% 0%, rgb(89 103 79 / 0.18), transparent 22rem),
    rgb(255 255 255 / 0.75);
  text-align: center;
}

.landing-final-cta > div {
  max-width: 850px;
}

.final-paw {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: #edf1ea;
  color: #59674f;
  box-shadow: 0 12px 28px rgb(89 103 79 / 0.13);
}

.landing-final-cta p {
  max-width: 670px;
  margin: 0 auto;
}

.centered-actions {
  justify-content: center;
}

.landing-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  width: min(1240px, calc(100vw - 48px));
  min-height: 160px;
  margin: 0 auto;
  align-items: center;
  gap: 28px;
  color: #646a66;
}

.footer-brand {
  color: var(--landing-ink) !important;
}

.landing-footer p {
  margin: 0;
}

.landing-footer > div {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 750;
}

.landing-footer > div a:hover {
  color: var(--landing-teal);
}

.landing-footer small {
  white-space: nowrap;
}

.ghost-link {
  display: inline-flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--teal);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 1040px) {
  .landing-nav > a:not(.landing-cabinet-link) {
    display: none;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 30px;
  }

  .landing-hero h1 {
    font-size: clamp(48px, 7vw, 68px);
  }

  .landing-product-stage {
    transform: scale(0.88);
  }

  .landing-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-proof-strip > div:nth-child(2) {
    border-right: 0;
  }

  .landing-proof-strip > div:nth-child(n + 3) {
    border-top: 1px solid rgb(60 81 66 / 0.13);
  }

  .landing-proof-strip > div:nth-child(3) {
    padding-left: 0;
  }

  .landing-question-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .balance-story,
  .professional-section {
    grid-template-columns: 1fr;
  }

  .balance-visual {
    order: 2;
  }

  .bento-card,
  .bento-ai,
  .bento-partners,
  .bento-family {
    grid-column: span 6;
  }

  .bento-ai,
  .bento-partners {
    grid-template-columns: 1fr;
  }

  .partner-catalog-demo {
    min-width: 0;
  }

  .principles-section {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .landing-footer {
    grid-template-columns: auto 1fr auto;
  }

  .landing-footer > div {
    display: none;
  }
}

@media (max-width: 760px) {
  .landing-header,
  .landing-hero,
  .landing-proof-strip,
  .landing-section,
  .landing-final-cta,
  .landing-footer {
    width: min(100% - 28px, 620px);
  }

  .landing-header {
    min-height: 76px;
  }

  .landing-brand {
    font-size: 20px;
  }

  .landing-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .landing-cabinet-link {
    min-height: 40px;
    padding: 0 13px;
    font-size: 12px;
  }

  .landing-cabinet-link svg {
    display: none;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 54px 0 62px;
  }

  .landing-hero h1 {
    margin-top: 19px;
    font-size: clamp(44px, 14vw, 62px);
  }

  .landing-lead {
    font-size: 18px;
  }

  .landing-hero-actions,
  .landing-button {
    width: 100%;
  }

  .landing-trust-list {
    display: grid;
  }

  .landing-product-stage {
    min-height: 590px;
    margin: -30px 0 -45px;
    transform: scale(0.82);
  }

  .landing-proof-strip {
    grid-template-columns: 1fr;
  }

  .landing-proof-strip > div,
  .landing-proof-strip > div:first-child,
  .landing-proof-strip > div:nth-child(3) {
    padding: 16px 0;
    border-right: 0;
    border-top: 1px solid rgb(60 81 66 / 0.13);
  }

  .landing-proof-strip > div:first-child {
    border-top: 0;
  }

  .landing-section {
    padding: 82px 0;
  }

  .landing-section-heading h2,
  .balance-copy h2,
  .professional-copy h2,
  .landing-final-cta h2 {
    font-size: clamp(35px, 10.5vw, 48px);
  }

  .landing-section-heading p,
  .balance-copy > p,
  .professional-copy > p,
  .landing-final-cta p {
    font-size: 16px;
  }

  .landing-question-grid,
  .journey-grid,
  .doctor-grid {
    grid-template-columns: 1fr;
  }

  .landing-question-grid article {
    min-height: 220px;
  }

  .balance-story,
  .professional-section {
    width: 100%;
    padding: 70px 22px;
    border-radius: 36px;
  }

  .balance-visual {
    min-height: 310px;
    margin: 0;
  }

  .balance-wheel-card {
    padding: 22px 18px;
    transform: none;
  }

  .balance-wheel-content {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 10px;
  }

  .balance-wheel {
    width: 145px;
    height: 145px;
  }

  .balance-legend {
    gap: 11px;
  }

  .balance-legend li {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 6px;
    font-size: 11px;
  }

  .balance-legend li > span {
    width: 8px;
    height: 8px;
  }

  .level-progress-demo {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .level-progress-badge {
    width: 44px;
    height: 44px;
  }

  .level-progress-demo > strong {
    grid-column: 2;
    max-width: none;
    text-align: left;
  }

  .landing-bento {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bento-card,
  .bento-ai,
  .bento-partners,
  .bento-family {
    grid-column: auto;
    min-height: auto;
  }

  .assistant-demo {
    margin-top: 4px;
  }

  .journey-grid {
    border-top: 0;
  }

  .journey-grid article,
  .journey-grid article + article {
    min-height: auto;
    padding: 24px 0;
    border-top: 1px solid #d9ddd8;
    border-right: 0;
  }

  .doctor-preview {
    padding: 15px;
    transform: none;
  }

  .doctor-preview-head,
  .doctor-pet {
    grid-template-columns: auto 1fr;
  }

  .secure-pill,
  .access-pill {
    grid-column: 2;
    justify-self: start;
  }

  .principles-grid article {
    grid-template-columns: 40px 1fr;
  }

  .faq-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .landing-final-cta {
    min-height: 490px;
    padding: 62px 20px;
    border-radius: 36px;
  }

  .landing-footer {
    grid-template-columns: 1fr auto;
    padding: 42px 0;
  }

  .landing-footer p {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    display: grid;
    justify-items: end;
  }

  .ghost-link {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .landing-button {
    transition: none;
  }
}
