/* Curaize Health
   A focused interface for a serious tool. */

.health-page {
  --h-bg: #f6f7f9;
  --h-surface: #ffffff;
  --h-ink: #111318;
  --h-muted: #656b76;
  --h-faint: #9298a3;
  --h-line: #e2e5ea;
  --h-line-strong: #ccd1d9;
  --h-blue: #2457f5;
  --h-blue-dark: #1744d6;
  --h-blue-soft: #edf2ff;
  --h-red: #d92d20;
  --h-red-soft: #fff3f1;
  --h-green: #138a5b;
  --h-green-soft: #eef9f4;
  min-height: 100vh;
  color: var(--h-ink);
  background:
    linear-gradient(rgba(17, 19, 24, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.025) 1px, transparent 1px),
    var(--h-bg);
  background-size: 32px 32px;
  font-family: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.health-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(246, 247, 249, 0.2) 0, var(--h-bg) 680px);
  content: "";
  pointer-events: none;
}

.health-page .shell,
.health-shell {
  width: min(1120px, calc(100% - 48px));
}

.health-page .health-nav {
  position: relative;
  z-index: 10;
  height: 68px;
  border: 0;
  border-bottom: 1px solid var(--h-line);
}

.health-page .logo {
  gap: 9px;
  color: var(--h-ink);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.health-page .logo > span:first-child {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: white;
  background: var(--h-ink);
  font: 700 15px/1 "DM Sans", sans-serif;
  transform: none;
}

.health-page .wordmark {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  color: var(--h-ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  transform: none;
}

.health-page .product-name {
  margin-left: 0;
  padding-left: 9px;
  border-left: 1px solid var(--h-line-strong);
  color: var(--h-muted);
  font: 600 11px/1 "DM Sans", sans-serif;
  letter-spacing: 0;
  text-transform: lowercase;
}

.health-page .nav-links {
  gap: 24px;
}

.health-page .nav-links > a {
  color: var(--h-muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.health-page .nav-links > a:hover {
  color: var(--h-ink);
}

.health-page .language-button {
  min-height: 32px;
  border: 1px solid var(--h-line-strong);
  border-radius: 7px;
  padding: 6px 11px;
  color: var(--h-ink);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 1px rgba(17, 19, 24, 0.03);
  font-size: 10px;
}

.health-page .language-button:hover {
  border-color: #adb4c0;
  background: white;
}

.health-shell {
  margin: 0 auto 72px;
}

.voice-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 72px;
  align-items: end;
  padding: 76px 0 48px;
}

.health-page .kicker {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--h-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  display: block !important;
  width: 7px !important;
  height: 7px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--h-green) !important;
  box-shadow: 0 0 0 3px rgba(19, 138, 91, 0.12);
}

.voice-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--h-ink);
  font: 600 clamp(46px, 6vw, 72px)/0.98 "DM Sans", sans-serif;
  letter-spacing: -0.065em;
}

.voice-hero h1 em {
  color: var(--h-blue);
  font-style: normal;
}

.voice-hero > div > p:not(.kicker) {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--h-muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-signals span {
  padding: 5px 8px;
  border: 1px solid var(--h-line);
  border-radius: 5px;
  color: var(--h-muted);
  background: rgba(255, 255, 255, 0.55);
  font: 600 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.voice-emergency-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid #f1cbc6;
  border-radius: 9px;
  background: rgba(255, 243, 241, 0.72);
  box-shadow: 0 1px 2px rgba(75, 24, 18, 0.03);
}

.emergency-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--h-red);
  font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.voice-emergency-note b {
  color: #8b2018;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.voice-emergency-note p {
  margin: 8px 0 11px;
  color: #73524e;
  font-size: 11px;
  line-height: 1.6;
}

.voice-emergency-note a {
  color: var(--h-red);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.voice-emergency-note a::after {
  margin-left: 6px;
  content: "→";
}

.demo-banner {
  border: 1px dashed var(--h-line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.6);
}

.voice-consult-card {
  width: min(880px, 100%);
  margin: 18px auto 0;
  overflow: hidden;
  border: 1px solid var(--h-line-strong);
  border-radius: 12px;
  background: var(--h-surface);
  box-shadow:
    0 1px 2px rgba(17, 19, 24, 0.04),
    0 16px 48px rgba(17, 19, 24, 0.06);
}

.voice-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--h-line);
  background: #fafbfc;
}

.voice-progress span {
  position: relative;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 13px 12px;
  border-right: 1px solid var(--h-line);
  color: var(--h-faint);
  background: transparent;
  font-size: 10px;
  letter-spacing: 0;
}

.voice-progress span:last-child {
  border-right: 0;
}

.voice-progress span i {
  color: inherit;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
}

.voice-progress span b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-progress span.active {
  color: var(--h-blue);
  background: var(--h-surface);
}

.voice-progress span.active::after {
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--h-blue);
  content: "";
}

.voice-progress span.done {
  color: var(--h-green);
  background: #fafbfc;
}

.voice-progress span.done i::after {
  content: " ✓";
}

.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 500px;
  padding: 58px 72px 32px;
  text-align: center;
}

.section-number {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--h-faint);
  background: transparent;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.section-number::before {
  content: "STEP / ";
}

.voice-stage h2 {
  max-width: 620px;
  margin: 16px 0 9px;
  color: var(--h-ink);
  font: 600 clamp(26px, 3.5vw, 36px)/1.15 "DM Sans", sans-serif;
  letter-spacing: -0.045em;
}

.voice-hint {
  max-width: 560px;
  margin: 0;
  color: var(--h-muted);
  font-size: 12px;
  line-height: 1.65;
}

.voice-mic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  align-items: center;
  justify-content: center;
  width: 126px;
  height: 126px;
  margin: 38px 0 16px;
  border: 1px solid #0d0f13;
  border-radius: 50%;
  color: white;
  background: var(--h-ink);
  box-shadow:
    0 0 0 5px var(--h-surface),
    0 0 0 6px var(--h-line);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.voice-mic::after {
  position: absolute;
  inset: -12px;
  border: 1px solid transparent;
  border-radius: 50%;
  content: "";
  transition: border-color 150ms ease;
}

.voice-mic:hover {
  background: #292d35;
  box-shadow:
    0 0 0 5px var(--h-surface),
    0 0 0 6px var(--h-blue);
  transform: translateY(-2px);
}

.voice-mic:focus-visible,
.voice-confirm:focus-visible,
.voice-replay:focus-visible,
.secondary-action:focus-visible,
.language-button:focus-visible {
  outline: 3px solid rgba(36, 87, 245, 0.25);
  outline-offset: 3px;
}

.voice-mic.listening {
  border-color: var(--h-blue-dark);
  background: var(--h-blue);
  box-shadow:
    0 0 0 5px var(--h-surface),
    0 0 0 6px rgba(36, 87, 245, 0.35);
  animation: health-listening 1.6s ease-in-out infinite;
}

.voice-mic:disabled {
  opacity: 0.38;
}

.mic-shape {
  width: 18px;
  height: 27px;
  border-width: 2px;
}

.mic-shape::before {
  right: -7px;
  bottom: -8px;
  left: -7px;
  height: 14px;
  border-width: 2px;
}

.mic-shape::after {
  bottom: -14px;
  width: 2px;
  height: 7px;
}

.voice-mic-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.voice-wave {
  gap: 3px;
  height: 18px;
}

.voice-wave i {
  width: 2px;
  border-radius: 0;
  background: var(--h-blue);
}

.voice-status {
  min-height: 22px;
  margin: 3px 0 0;
  color: var(--h-muted);
  font: 500 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.voice-review,
.voice-fallback {
  width: 100%;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--h-line);
  border-radius: 8px;
  background: #fafbfc;
  text-align: left;
}

.voice-review > p {
  margin: 0;
  color: var(--h-blue);
  font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.voice-review blockquote {
  margin: 11px 0 18px;
  color: var(--h-ink);
  font-size: 15px;
  line-height: 1.55;
}

.voice-review > div,
.voice-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-confirm,
.voice-replay,
.health-page .secondary-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--h-ink);
  border-radius: 7px;
  color: white;
  background: var(--h-ink);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.voice-confirm:hover,
.voice-replay:hover {
  background: #2a2e35;
}

.health-page .secondary-action {
  border-color: var(--h-line-strong);
  color: var(--h-ink);
  background: white;
}

.health-page .secondary-action:hover {
  border-color: #adb4c0;
  background: #fafbfc;
}

.voice-fallback p {
  margin: 0 0 12px;
  color: var(--h-muted);
  font-size: 11px;
  line-height: 1.6;
}

.voice-fallback textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--h-line-strong);
  border-radius: 7px;
  color: var(--h-ink);
  background: white;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.voice-fallback textarea:focus {
  border-color: var(--h-blue);
  outline: 3px solid rgba(36, 87, 245, 0.1);
}

.voice-fallback .voice-confirm {
  margin-top: 9px;
}

.voice-loading {
  display: grid;
  min-height: 220px;
  padding-top: 46px;
  justify-items: center;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--h-line);
  border-top-color: var(--h-blue);
}

.voice-loading b {
  margin-top: 18px;
  color: var(--h-ink);
  font-size: 13px;
}

.voice-loading p {
  color: var(--h-muted);
  font-size: 10px;
}

.voice-consent {
  max-width: 630px;
  margin: auto 0 0;
  padding-top: 26px;
  color: var(--h-faint);
  font-size: 9px;
  line-height: 1.6;
}

.result-shell {
  width: min(880px, 100%);
  margin: 24px auto 0;
  scroll-margin-top: 24px;
}

.urgency-banner {
  padding: 27px 28px;
  border: 1px solid #153fbf;
  border-radius: 11px 11px 0 0;
  color: white;
  background: var(--h-blue);
}

.urgency-banner.self_care,
.urgency-banner.routine {
  border-color: #0e6a45;
  background: var(--h-green);
}

.urgency-banner.soon,
.urgency-banner.same_day {
  border-color: #4f2aa6;
  background: #6d3fd7;
}

.urgency-banner.emergency {
  border-color: #a82016;
  background: var(--h-red);
}

.urgency-banner > p:first-child {
  margin: 0 0 8px;
  font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.urgency-banner h2 {
  margin: 0;
  font: 600 26px/1.2 "DM Sans", sans-serif;
  letter-spacing: -0.035em;
}

.urgency-banner p:last-child {
  max-width: 700px;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.6;
}

.report-card {
  padding: 24px;
  border: 1px solid var(--h-line-strong);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  background: var(--h-surface);
  box-shadow: 0 14px 40px rgba(17, 19, 24, 0.06);
}

.care-destination {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 3px 18px;
  align-items: baseline;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid #cbd6f7;
  border-radius: 8px;
  background: var(--h-blue-soft);
}

.care-destination span {
  grid-row: 1 / 3;
  color: var(--h-blue);
  font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.care-destination h3,
.care-destination p {
  margin: 0;
}

.care-destination h3 {
  color: var(--h-ink);
  font: 600 18px/1.25 "DM Sans", sans-serif;
}

.care-destination p {
  color: var(--h-muted);
  font-size: 10px;
}

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

.report-section {
  padding: 18px;
  border: 1px solid var(--h-line);
  border-radius: 8px;
  background: #fafbfc;
}

.report-section.wide {
  grid-column: span 2;
}

.report-section > span {
  display: block;
  margin-bottom: 9px;
  color: var(--h-faint);
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.report-section h3 {
  margin: 0 0 10px;
  color: var(--h-ink);
  font: 600 15px/1.3 "DM Sans", sans-serif;
  letter-spacing: -0.02em;
}

.report-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 17px;
  color: var(--h-muted);
  font-size: 11px;
  line-height: 1.55;
}

.report-section p {
  margin: 0;
  color: var(--h-muted);
  font-size: 11px;
  line-height: 1.6;
}

.report-priority {
  border-color: #cbd6f7;
  background: #f5f7ff;
}

.warning-section {
  border-color: #f1cbc6;
  background: var(--h-red-soft);
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.sources a {
  padding: 7px 9px;
  border: 1px solid var(--h-line);
  border-radius: 6px;
  color: var(--h-blue);
  background: white;
  font-size: 9px;
  text-decoration: none;
}

.report-disclaimer {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 7px;
  color: var(--h-muted);
  background: #f1f3f6;
  font-size: 9px;
  line-height: 1.55;
}

.report-actions {
  margin-top: 14px;
}

.voice-replay {
  border-color: var(--h-blue);
  background: var(--h-blue);
}

.voice-replay:hover {
  background: var(--h-blue-dark);
}

.emergency-report .button.primary {
  min-height: 38px;
  border-radius: 7px;
  background: var(--h-red);
  font-size: 10px;
}

.health-method {
  margin-top: 88px;
  padding-top: 34px;
  border-top: 1px solid var(--h-line-strong);
}

.health-method > div:first-child {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
}

.health-method h2 {
  max-width: 650px;
  margin: 0;
  color: var(--h-ink);
  font: 600 clamp(27px, 3.5vw, 40px)/1.1 "DM Sans", sans-serif;
  letter-spacing: -0.05em;
}

.health-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
  border-block: 1px solid var(--h-line);
}

.health-method-grid article {
  padding: 22px 22px 22px 0;
}

.health-method-grid article + article {
  padding-left: 22px;
  border-left: 1px solid var(--h-line);
}

.health-method-grid b {
  color: var(--h-blue);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.health-method-grid h3 {
  margin: 14px 0 6px;
  color: var(--h-ink);
  font-size: 14px;
}

.health-method-grid p {
  margin: 0;
  color: var(--h-muted);
  font-size: 10px;
  line-height: 1.6;
}

.health-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 18px;
  color: var(--h-muted);
  font: 500 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.health-source-note > span {
  color: var(--h-ink);
  font-weight: 700;
}

.health-source-note a {
  color: var(--h-blue);
  text-underline-offset: 3px;
}

.health-page .footer {
  min-height: 94px;
  border-top: 1px solid var(--h-line);
  color: var(--h-muted);
}

.health-page .footer .logo > span:first-child {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.health-page .footer p,
.health-page .footer a {
  color: var(--h-muted);
  font-size: 9px;
}

.health-page .toast {
  border: 1px solid var(--h-line-strong);
  border-radius: 8px;
  color: white;
  background: var(--h-ink);
  box-shadow: 0 12px 40px rgba(17, 19, 24, 0.18);
  font-size: 10px;
}

@keyframes health-listening {
  0%,
  100% {
    box-shadow:
      0 0 0 5px var(--h-surface),
      0 0 0 6px rgba(36, 87, 245, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 5px var(--h-surface),
      0 0 0 11px rgba(36, 87, 245, 0.13);
  }
}

@media (max-width: 820px) {
  .voice-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 0 38px;
  }

  .voice-emergency-note {
    max-width: 620px;
  }

  .health-method > div:first-child {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .health-page .shell,
  .health-shell {
    width: calc(100% - 28px);
  }

  .health-page .health-nav {
    height: 60px;
  }

  .health-page .nav-links {
    gap: 7px;
  }

  .health-page .nav-links > a {
    display: none;
  }

  .voice-hero {
    padding-top: 38px;
  }

  .voice-hero h1 {
    font-size: clamp(40px, 12vw, 53px);
  }

  .voice-hero > div > p:not(.kicker) {
    font-size: 13px;
  }

  .voice-stage {
    min-height: 480px;
    padding: 42px 20px 24px;
  }

  .voice-progress span {
    gap: 5px;
    padding-inline: 6px;
  }

  .voice-progress span i {
    display: none;
  }

  .voice-progress span b {
    font-size: 8px;
  }

  .voice-mic {
    width: 116px;
    height: 116px;
    margin-top: 32px;
  }

  .voice-review > div,
  .voice-report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .voice-confirm,
  .voice-replay,
  .voice-review .secondary-action {
    width: 100%;
  }

  .care-destination,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .care-destination span {
    grid-row: auto;
  }

  .report-section.wide {
    grid-column: auto;
  }

  .report-card {
    padding: 14px;
  }

  .health-method-grid {
    grid-template-columns: 1fr;
  }

  .health-method-grid article,
  .health-method-grid article + article {
    padding: 18px 0;
    border-left: 0;
  }

  .health-method-grid article + article {
    border-top: 1px solid var(--h-line);
  }

  .health-page .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .health-page *,
  .health-page *::before,
  .health-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .health-page {
    background: white;
  }

  .health-page .health-nav,
  .voice-health-page .voice-hero,
  .voice-health-page .voice-consult-card,
  .health-page .health-method,
  .health-page .footer,
  .health-page .report-actions,
  .health-page .toast {
    display: none !important;
  }

  .result-shell,
  .report-card {
    width: 100%;
    border: 0;
    box-shadow: none;
  }
}
