:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-light: #ffffff;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 0.75rem;
  --font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --medical-blue-bg: #e0f2fe;
  --medical-blue-text: #0284c7;
  --gauge-color: #22c55e;
  /* Default to green */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: #eff6ff;
  color: #475569;
  /* Soft slate */
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.02em;
  /* Tight & Modern */
  color: #1e293b;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none !important;
}

/* Header */
/* Header */
header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1rem 0;
  position: relative;
  /* Changed from sticky */
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sidebar Button Spacing Override */
.sidebar-widget .btn-primary {
  margin-top: 3.5rem !important;
  /* Increase spacing from text significantly */
}

.sidebar-widget p {
  margin-bottom: 1.5rem !important;
  /* Ensure paragraph has breathing room */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  padding: 0.5rem;
}

.mobile-menu-toggle:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.nav-links {
  display: none;
  /* Hidden by default on mobile */
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem 2rem 3rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 999;
  gap: 1.5rem;
  /* Increased spacing */
}

/* Specific Mobile Enhancements */
@media (max-width: 768px) {
  .nav-link {
    font-size: 1.125rem;
    /* Larger text for touch */
    color: #334155;
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: 1px solid transparent;
  }

  .nav-link:hover {
    color: var(--primary);
    padding-left: 0.5rem;
    /* Subtle slide interaction */
  }

  .nav-links .btn-sm {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    padding: 0.875rem;
    font-size: 1rem;
  }
}

.nav-links.active {
  display: flex !important;
  /* Show when active */
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    /* Always show on desktop */
    position: static;
    flex-direction: row;
    width: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border: none;
    gap: 2.5rem;
  }
}

.nav-link {
  font-family: 'Inter', sans-serif;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.nav-link:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

.nav-link.active {
  color: #0f172a;
  background-color: #f1f5f9;
  padding: 0.5rem 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

/* System Status Indicator */
.system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
  border-radius: 99px;
  background: #f8fafc;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
  }
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Pulse Animation for Logo */
.pulse-icon {
  animation: pulse-heart 2s infinite ease-in-out;
}

/* -------------------------------------------------------------------------
   BATTLE MODE STYLES
   ------------------------------------------------------------------------- */
.mode-toggle-container {
  display: inline-flex;
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: 99px;
  gap: 0;
  margin-bottom: 2rem;
}

.mode-btn {
  background: transparent;
  color: #64748b;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: none;
  border-radius: 99px;
  transition: all 0.2s;
  cursor: pointer;
  font-weight: 500;
}

.mode-btn:hover {
  color: #334155;
}

.mode-btn.active {
  background: white;
  color: #2563eb;
  /* Brand Blue */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 0.5rem;
  flex-shrink: 0;
  align-self: center;
}

/* Battle Grid */
.battle-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.battle-vs {
  font-weight: 900;
  color: #cbd5e1;
  font-size: 1.5rem;
}

.battle-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.battle-card.winner {
  border: 2px solid #fbbf24;
  background: linear-gradient(to bottom, #fffbeb, #ffffff);
  transform: scale(1.02);
  box-shadow: 0 10px 25px -5px rgba(251, 191, 36, 0.2);
  z-index: 10;
}

.battle-header h3 {
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.battle-url {
  font-weight: 700;
  color: #1e293b;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  word-break: break-all;
}

.battle-score-box {
  margin: 1.5rem 0;
}

.battle-score-box span:first-child {
  display: block;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
}

.battle-score-label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.battle-metrics {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #475569;
}

.stat-row strong {
  color: #1e293b;
}

.winner-banner {
  background: #1e293b;
  color: #fbbf24;
  /* Gold */
  padding: 1rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  animation: popIn 0.5s ease;
}

.crown-icon {
  font-size: 2.5rem;
}

.winner-text {
  text-align: left;
}

.winner-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.winner-text h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}

@keyframes popIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .battle-grid {
    grid-template-columns: 1fr;
  }

  .battle-vs {
    display: none;
  }

  .mode-toggle-container {
    flex-direction: column;
  }
}

/* -------------------------------------------------------------------------
   BATCH MODE STYLES
   ------------------------------------------------------------------------- */
#batchUrlInput {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-family: monospace;
  /* Monospace for URLs */
  font-size: 0.9rem;
  background-color: #f8fafc;
  resize: vertical;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

#batchUrlInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #fff;
}

.batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.batch-results-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.batch-results-table th,
.batch-results-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.batch-results-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.batch-results-table tr:last-child td {
  border-bottom: none;
}

.batch-row-pass {
  background-color: rgba(34, 197, 94, 0.05);
  /* Soft Green */
}

.batch-row-pass strong {
  color: #166534;
}

.batch-row-fail {
  background-color: rgba(239, 68, 68, 0.05);
  /* Soft Red */
}

.batch-row-fail strong {
  color: #991b1b;
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-outline:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #2563eb;
}


/* -------------------------------------------------------------------------
   ADVANCED PANEL
   ------------------------------------------------------------------------- */
.advanced-panel {
  background: transparent;
  border: none;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  text-align: center;
}

.mode-pills {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.mode-pill {
  background: white;
  border: 1px solid #cbd5e1;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  font-weight: 600;
}

.mode-pill:hover {
  background-color: #f1f5f9;
  color: #334155;
}

.mode-pill.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* Hide utility */
.hidden {
  display: none !important;
}

@keyframes pulse-heart {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hero Section */
.hero {
  padding: 4rem 1rem 2rem;
  text-align: center;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px), radial-gradient(circle at 50% 0%, #dbeafe 0%, #eff6ff 100%);
  background-size: 20px 20px, 100% 100%;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.mobile-block {
  display: inline;
}

@media (max-width: 768px) {
  .mobile-block {
    display: block;
  }
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

@media (min-width: 1024px) {
  .subtitle {
    max-width: 100%;
    white-space: nowrap;
  }
}

/* Inputs & Forms */
.input-group {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  display: flex;
  gap: 0.5rem;
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.input-wrapper input {
  padding-right: 4rem !important;
  /* Make room for paste button */
}

input[type="url"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

input[type="url"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: var(--text-light);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(1px);
  background-color: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Desktop: Larger input and CTA button */
@media (min-width: 768px) {
  .input-group {
    max-width: 950px;
    justify-content: center;
  }

  .input-group .input-wrapper {
    min-width: 700px;
    flex: none;
  }

  .input-group input[type="url"] {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
  }

  .input-group .btn-primary {
    padding: 1.25rem 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  }

  .input-group .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
  }
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
  display: inline-block;
}

.btn-secondary:hover {
  background-color: #eff6ff;
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(1px);
}

.btn-large {
  font-size: 1.125rem;
  padding: 1rem 2rem;
}

/* Action Buttons (Report & Email) */
.btn-action-primary,
.btn-action-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.5rem;
  margin: 0.5rem;
}

.btn-action-primary {
  border: 2px solid #2563eb;
  background: white;
  color: #2563eb;
}

.btn-action-primary:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

.btn-action-soft {
  border: 2px solid transparent;
  background: #f1f5f9;
  color: #475569;
}

.btn-action-soft:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: translateY(-1px);
}

/* Cards & Containers */
.card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 4px solid var(--gauge-color);
}

.card h3 {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* Badges & Trust Signals */
.badges-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.badge {
  background-color: #ffffff;
  color: #2563eb;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.badge:hover {
  transform: scale(1.05);
}

.badge svg {
  width: 16px;
  height: 16px;
}

/* Waiting Room */
.waiting-room {
  background-color: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 2.5rem;
  margin: 3rem auto;
  max-width: 800px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.waiting-room-text {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Loading & Spinners (Replaced by Stepper) */
#statusText {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 1rem;
}

.waiting-tip {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.9rem;
  font-style: italic;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  animation: FadeIn 0.5s ease;
}

@keyframes FadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Visibility Toggle */
.hero-hidden {
  display: none !important;
}

.loading-container {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  padding: 3rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  z-index: 50;
  text-align: left;
}

.scan-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.step .icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

.step.active {
  opacity: 1;
  color: var(--primary);
  font-weight: 700;
}

.step.active .icon {
  animation: pulse-step 1s infinite;
}

.step.done {
  opacity: 1;
  color: var(--text-green);
}

@keyframes pulse-step {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Patient Identity Card (Screenshot) */
.patient-identity-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Alignment Fix */
  flex-direction: column;
  text-align: center;
}

.patient-identity-card .patient-photo-frame {
  margin: 0 auto 1.5rem auto;
  /* Center photo */
}

.patient-info {
  width: 100%;
  text-align: center;
  /* Force center text */
}

.patient-photo-frame {
  width: 200px;
  height: auto;
  border: 4px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#scan-screenshot {
  width: 100%;
  display: block;
}

.patient-info h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.25rem;
}

#scan-url-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

#scan-url-display:hover {
  text-decoration: underline;
  color: #2563eb;
}

.scan-time {
  font-size: 0.875rem;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .patient-identity-card {
    flex-direction: column;
    text-align: center;
  }
}

/* Library / Blog Grid */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.article-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.tag-revenue {
  background: #ecfdf5;
  color: #047857;
}

.tag-speed {
  background: #eff6ff;
  color: #1d4ed8;
}

.tag-tech {
  background: #f5f3ff;
  color: #7c3aed;
}

.article-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: #1e293b;
  line-height: 1.4;
}

.article-item p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.article-item p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Article Template Layout */
.article-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Remove side-by-side grid */
@media (min-width: 1024px) {
  .article-layout {
    /* Reset to stack */
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .article-sidebar {
    position: static;
    width: 100%;
    margin-top: 4rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
  }
}

.article-main {
  text-align: center;
  width: 100%;
}

.article-sidebar {
  width: 100%;
  margin-top: 3rem;
}

.sidebar-widget {
  min-width: 300px;
  flex: 1;
  max-width: 400px;
  /* Prevent being too wide in bottom layout */
  margin: 0 auto 1rem;
  /* Center on mobile if stacked */
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center breadcrumbs */
  gap: 0.5rem;
}

.breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.1s;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.breadcrumb .separator,
.breadcrumb .current {
  color: #94a3b8;
}

/* Article Typography (Readability Focused) */
.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
}

.article-meta {
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 3rem;
  justify-content: center;
  /* Center meta */
  align-items: center;
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #334155;
  font-family: 'Inter', sans-serif;
  text-align: center;
  /* Center all body text */
}

.article-body p {
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.article-body .lead {
  font-size: 1.25rem;
  color: #1e293b;
  margin-bottom: 2rem;
  font-weight: 500;
}

.article-body h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

/* Highlight Box (Clinical Note) */
.highlight-box {
  background: #f0f9ff;
  /* Keep original background */
  border-left: 4px solid #0ea5e9;
  /* Keep original border */
  padding: 2rem;
  margin: 3rem auto;
  /* Center with margin auto */
  border-radius: 8px;
  /* Full radius since not side-attached */
  max-width: 700px;
  /* Constrain width */
  text-align: center;
}

/* Sidebar Widget */
.sidebar-widget {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rx-icon {
  font-size: 1.5rem;
  color: #2563eb;
  font-weight: 700;
}

.widget-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-bottom: 3rem;
  justify-items: center;
  /* Center cards in grid cells */
  justify-content: center;
  /* Center grid columns */
}

/* Gauges */
.gauge-wrapper {
  width: 120px;
  height: 60px;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.gauge-svg {
  width: 120px;
  height: 60px;
  overflow: visible;
}

.gauge-track {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  /* Stroke color is handled by SVG attribute url(#gaugeGradient) */
}

.gauge-value {
  fill: none;
  stroke: var(--gauge-color, #ef4444);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 100 200;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.5s ease-out, stroke 0.5s;
}

.needle {
  transform-origin: 60px 60px;
  transform: rotate(-90deg);
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gauge-color);
}

.metric-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Diagnosis Labels */
.diagnosis-label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.grade-optimal {
  color: #22c55e;
}

.grade-stable {
  color: #0ea5e9;
}

.grade-symptomatic {
  color: #eab308;
}

.grade-critical {
  color: #f97316;
}

.grade-flatline {
  color: #ef4444;
}

/* Patient History */
.history-container {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.history-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1rem;
}

.history-item {
  width: 100%;
  background: white;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.history-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left-width: 5px;
  /* Thicker accent line */
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.history-info {
  display: flex;
  flex-direction: column;
}

.history-url {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0f172a;
  display: block;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.score-badge {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

/* Dynamic Borders */
.border-critical {
  border-left-color: #ef4444;
}

.border-stable {
  border-left-color: #f59e0b;
}

.border-optimal {
  border-left-color: #22c55e;
}

/* Dynamic Badge Backgrounds */
.bg-critical {
  background-color: #ef4444;
}

.bg-stable {
  background-color: #f59e0b;
}

.bg-optimal {
  background-color: #22c55e;
}

/* Calculator Specifics */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.input-label {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.input-value-display {
  color: var(--primary);
  font-weight: 700;
}

input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: #dbeafe;
  /* Fallback */
  margin: 0.5rem 0;
  border-radius: 99px;
  /* Rounded track */
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  margin-top: -8px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: transparent;
  /* Changed from #dbeafe to transparent */
  border-radius: 2px;
}

.card-diagnosis {
  border-top: 4px solid #ef4444 !important;
}

.burn-container {
  background-color: #fef2f2;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
}

.burn-amount {
  font-size: 3rem;
  font-weight: 800;
  color: #dc2626;
  line-height: 1;
  letter-spacing: -0.05em;
}

.burn-label {
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Revenue Chart */
.chart-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin-bottom: 2rem;
}

.bar {
  width: 60px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.bar-green {
  background-color: #22c55e;
}

.bar-red {
  background-color: #ef4444;
}

.bar-label {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  font-weight: 600;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.pulsing {
  animation: pulse-red 1.5s infinite;
}

.rx-pad {
  background-color: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  text-align: left;
  position: relative;
}

.rx-header {
  font-family: "Georgia", serif;
  font-style: italic;
  font-weight: 900;
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 1rem;
  line-height: 1;
}

.rx-body {
  margin-bottom: 1.5rem;
  color: #334155;
}

/* Vision Test Specifics */
.toggle-switch-medical {
  position: relative;
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 99px;
  padding: 4px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch-medical input {
  display: none;
}

.toggle-slider-medical {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-option {
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.toggle-switch-medical input:checked~.toggle-slider-medical .opt-mobile {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toggle-switch-medical input:not(:checked)~.toggle-slider-medical .opt-desktop {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.google-card {
  font-family: arial, sans-serif;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  max-width: 600px;
  margin: 0 auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.preview-wrapper {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
}

.mobile-mode-container {
  max-width: 375px !important;
  margin: 0 auto;
}

.google-link-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-favicon-wrap {
  background-color: #f1f3f4;
  border-radius: 50%;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-site-name {
  font-size: 14px;
  color: #202124;
  line-height: 1.3;
}

.google-cite {
  font-size: 12px;
  color: #4d5156;
  line-height: 1.3;
}

.google-title {
  font-size: 20px;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 3px;
  cursor: pointer;
}

.google-title:hover {
  text-decoration: underline;
}

.google-desc {
  font-size: 14px;
  line-height: 1.58;
  color: #4d5156;
}

.vision-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.vision-match {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.vision-blur {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Glossary Specifics */
.glossary-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #334155;
  background-color: #f8fafc;
  /* Slight tint for clinical feel */
}

/* Grid Layout */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card Design ("Medical File") */
.medical-card {
  background: #ffffff;
  border-top: 5px solid #2563eb;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;

  /* Flexbox for Equal Height Alignment */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.medical-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-top-color: #0ea5e9;
  /* Lighten strip on hover */
}

.term-title {
  color: #1e293b;
  font-weight: 800;
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.term-subtitle {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.term-definition {
  margin-bottom: 2rem;
  font-size: 1.05rem;
  color: #475569;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

/* Push Symptom Section to Bottom */
.symptom-section {
  margin-top: auto;
  /* Vital for alignment */
  background-color: #f1f5f9;
  border-radius: 8px;
  padding: 1.25rem;
  font-size: 0.95rem;
  border: 1px solid #e2e8f0;
}

.symptom-warning {
  color: #ef4444;
  /* Red for symptoms */
}

.rx-treatment {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #cbd5e1;
  color: #334155;
  background-color: transparent !important;
  /* Override inline styles if any */

}


/* About & Contact Specifics */
.department-card {
  border-top: 4px solid #2563eb;
  padding: 2rem;
  text-align: left;
  height: 100%;
}

.philosophy-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

.icon-blue {
  color: #2563eb;
  flex-shrink: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Footer */
/* Footer - The "Fat Footer" */
footer {
  margin-top: auto;
  background-color: #0f172a;
  /* Dark Slate */
  color: #94a3b8;
  padding: 4rem 0 2rem;
  border-top: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    /* Brand col wider */
  }
}

.footer-col-brand h4 {
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 300px;
}

.made-in {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.footer-col h5 {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 20px;
  height: 20px;
  color: #64748b;
  transition: color 0.2s;
}

.social-icon:hover {
  color: #fff;
}

/* Hide legacy elements if present */
.footer-links,
.footer-link.active {
  display: none;
}

/* How It Works / Process Section */
.how-it-works {
  padding-top: 4rem;
  padding-bottom: 2rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 2rem;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .process-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-card {
  background: transparent;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Resetting card styles */
  box-shadow: none;
  border: none;
}

.process-icon {
  width: 48px;
  height: 48px;
  color: #2563eb;
  margin-bottom: 1.5rem;
  /* Pulse effect specific for icons if needed, or reuse pulse-icon class */
}

.process-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.75rem;
}

.process-card p {
  line-height: 1.6;
  font-size: 1rem;
}

/* FAQ Section */
.faq-section {
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-container h2 {
  text-align: center;
  font-size: 2rem;
  color: #334155;
  font-weight: 800;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.faq-item {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-toggle-icon {
  width: 24px;
  height: 24px;
  color: #94a3b8;
  transition: transform 0.3s ease, color 0.2s;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #f8fafc;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: #475569;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  /* Arbitrary large height for animation */
}


.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Utilities */
.text-green {
  color: #22c55e;
  --gauge-color: #22c55e;
}

.text-orange {
  color: #f97316;
  --gauge-color: #f97316;
}

.text-red {
  color: #ef4444;
  --gauge-color: #ef4444;
}

/* Clinical Data Accordion */
.btn-text-simple {
  text-align: center;
  width: 100%;
  color: #64748b;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-text-simple:hover {
  color: #2563eb;
}

.medical-table-wrapper {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.clinical-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.clinical-data-table th,
.clinical-data-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  color: #334155;
}

.clinical-data-table th {
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.status-critical {
  color: #ef4444;
  font-weight: 700;
}

.status-healthy {
  color: #22c55e;
  font-weight: 700;
}

/* 404 Specifics */
.error-container {
  padding: 4rem 0;
  overflow: hidden;
}

.bg-text {
  font-size: 8rem;
  font-weight: 800;
  color: #cbd5e1;
  opacity: 0.3;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  white-space: nowrap;
}

.ekg-line {
  color: #ef4444;
  max-width: 300px;
  margin: 0 auto 2rem;
  display: block;
}

/* Resource Composition Card (Pie Chart) */
.composition-card {
  background-color: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0 auto 2rem auto;
  max-width: 600px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.composition-card h3 {
  font-size: 1.125rem;
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.chart-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .chart-container {
    flex-direction: column;
    gap: 1.5rem;
  }
}

.pie-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #f1f5f9;
  /* Fallback */
  position: relative;
  flex-shrink: 0;
  border: 4px solid white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Optional: Inner Hole for Donut Effect */
.pie-chart::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-val {
  font-weight: 600;
  color: #1e293b;
  margin-left: auto;
  padding-left: 1rem;
}

.chart-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
}

/* Motion X-Ray (Filmstrip) */
.filmstrip-container {
  overflow: hidden;
}

.filmstrip-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  justify-content: flex-start;
  /* Allow scrolling */
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.filmstrip-track::-webkit-scrollbar {
  height: 6px;
}

.filmstrip-track::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.filmstrip-track::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.filmstrip-frame {
  min-width: 100px;
  max-width: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filmstrip-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
  object-position: top;
}

.frame-time {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.75rem;
  text-align: center;
  padding: 4px;
  border-top: 1px solid #e2e8f0;
  font-weight: 600;
}

.ekg-anim {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dash 2.5s linear forwards;
}

@keyframes dash {
  to {
    stroke-dashoffset: 0;
  }
}

/* Clean Bill of Health Badge */
.health-badge {
  background-color: #ecfdf5;
  border: 2px solid #34d399;
  color: #047857;
  padding: 1rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Contact Form Styles */
.contact-form-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-cheader {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 0;
}

.contact-card {
  background-color: #ffffff;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-top: 4px solid #2563eb;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background-color: #f8fafc;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
}

/* Paste Button (inside input-wrapper) */

.paste-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 4px 10px;
  background-color: transparent;
  border: 1px solid transparent;
  /* Invisible border prevents layout shift */
  border-radius: 99px;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paste-btn:hover {
  background-color: #f1f5f9;
  color: #2563eb;
  border-color: #e2e8f0;
}

.demo-row {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

.trust-signal {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  /* Darker slate for accessibility */
  margin-top: 1.5rem;
  letter-spacing: 0.02em;
}

.demo-row span {
  margin-right: 0.5rem;
}

.demo-link {
  color: #64748b;
  text-decoration: none;
  margin: 0 0.25rem;
  transition: color 0.2s;
}

.demo-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* Button Pulse when Ready */
@keyframes soft-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.btn-pulse-ready {
  animation: soft-pulse 2s infinite;
}

/* ... existing code ... */

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 99px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-weight: 600;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-error {
  background-color: #ef4444;
}

.toast-info {
  background-color: #1e293b;
}

.toast-success {
  background-color: #22c55e;
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
}

/* Print Styles: The "Discharge Paper" */
@media print {
  @page {
    margin: 0.5cm;
    size: A4;
  }

  /* Minimizes browser headers/footers */

  /* HIDE EVERYTHING ELSE */
  body>*:not(main),
  nav,
  footer,
  .hero,
  .input-group,
  #loadingSection,
  #waiting-room,
  .action-bar,
  .history-section,
  .lab-results-container,
  .referral-card,
  .rx-btn,
  #reportContainer,
  .toast-notification,
  .mobile-menu-toggle,
  #exitModal {
    display: none !important;
  }

  /* SHOW & STYLE THE REPORT */
  main,
  #resultsSection {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  /* THE CUSTOM PRINT HEADER */
  .print-header {
    display: flex !important;
    /* Visible only in print */
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 20px;
    margin-bottom: 30px;
  }

  .print-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #1e293b;
  }

  .pulse-icon-print {
    margin-right: 8px;
  }

  .print-meta h1 {
    font-size: 1.4rem;
    margin: 0;
  }

  .highlight-url {
    color: #2563eb;
    text-decoration: underline;
  }

  /* LAYOUT FIXES FOR PAPER */
  #benchmarkContainer {
    break-inside: avoid;
    margin-bottom: 2rem;
  }

  #patient-identity {
    break-inside: avoid;
    border: 1px solid #ccc;
    display: flex !important;
    margin: 20px auto !important;
  }

  .results-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    /* 2-Column Grid for paper */
    gap: 20px;
    break-inside: avoid;
  }

  .card {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* FORCE GRAPHICS */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* HIDE ON SCREEN */
#print-only-header {
  display: none;
}

/* Contextual Internal Links */
.text-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* House Ad Fallback */
.house-ad {
  background: linear-gradient(to right, #1e293b, #0f172a);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  border-radius: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.house-ad:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.house-ad-text {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  max-width: 400px;
  line-height: 1.4;
}

.house-ad-btn {
  background: white;
  color: #1e293b;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
}

.house-ad-btn:hover {
  transform: scale(1.05);
}

/* Prescription Cards (Affiliate Recommendations) */
.rx-prescription-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-top: 4px solid #dc2626;
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
}

.rx-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.rx-symbol {
  font-size: 1.5rem;
  color: #dc2626;
  font-weight: 700;
}

.rx-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
}

.rx-card-body {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.btn-fill-rx {
  display: inline-block;
  background: #22c55e;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.btn-fill-rx:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

/* Device Toggle (Mobile/Desktop Selector) */
.device-toggle {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.device-option {
  cursor: pointer;
}

.device-option input[type="radio"] {
  display: none;
}

.device-pill {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
  border: 2px solid #e2e8f0;
  transition: all 0.2s;
}

.device-option input[type="radio"]:checked+.device-pill {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.device-pill:hover {
  border-color: #94a3b8;
}

/* Live Scan Counter */
.live-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
  background: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
  cursor: default;
}

.live-counter:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.counter-pulse {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Benchmark Bar */
.benchmark-bar-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.benchmark-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.benchmark-label span:last-child {
  font-weight: 700;
  color: #1e293b;
}

.benchmark-track {
  position: relative;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: visible;
}

.benchmark-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #2563eb);
  border-radius: 6px;
  transition: width 0.8s ease-out;
}

.benchmark-average-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 20px;
  background: #f97316;
  border-radius: 1px;
  z-index: 2;
}

.benchmark-average-marker::after {
  content: 'Avg';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #f97316;
  font-weight: 600;
}

.benchmark-user-marker {
  position: absolute;
  top: -6px;
  width: 24px;
  height: 24px;
  background: #1e293b;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  transition: left 0.8s ease-out;
  z-index: 3;
}

.benchmark-context {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

#benchmarkContainer {
  margin-bottom: 2rem;
  width: 100%;
}

.benchmark-bar-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.benchmark-verdict {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

@media print {

  /* Hide UI Elements */
  header,
  footer,
  .hero,
  .input-group,
  #loadingSection,
  #waiting-room,
  #reportContainer,
  .demo-row,
  .trust-signal,
  .how-it-works,
  .faq-section {
    display: none !important;
  }

  /* Reset Layout for Paper */
  body,
  main {
    background: white;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  #resultsSection {
    display: block !important;
    padding: 20px;
  }

  /* Expand Graphs for Print */
  .results-grid {
    grid-template-columns: 1fr 1fr;
    /* 2x2 Grid for paper */
    gap: 20px;
  }

  /* Add Brand Header to Print */
  #resultsSection::before {
    content: "SiteSpeed Scan - Clinical Report";
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1e293b;
    border-bottom: 2px solid #1e293b;
  }
}

/* Clinical Summary (TOC) Styles */
.clinical-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.summary-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  margin-bottom: 0.5rem;
}

.summary-list a {
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  transition: color 0.2s;
}

.summary-list a:hover {
  color: #2563eb;
}

/* Auto-Linked Keywords */
.text-link {
  color: #2563eb;
  border-bottom: 1px dotted #2563eb;
  text-decoration: none;
  cursor: help;
}

/* Navigation Dropdowns */
.dropdown {
  position: relative;
  display: inline-block;
  height: 100%;
  /* Match nav height */
  display: flex;
  align-items: center;
}

.dropdown-toggle {
  display: flex !important;
  /* Force flex for alignment */
  align-items: center;
  gap: 0.25rem;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 200px;
  padding: 0.5rem;
  flex-direction: column;
  z-index: 100;
  animation: fadeIn 0.1s ease-out;
}

.dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.dropdown-menu a:hover {
  color: #2563eb;
  transform: translateX(4px);
}

/* Scan Progress Bar */
.scan-progress-container {
  width: 100%;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: 99px;
  margin-top: 1rem;
  overflow: hidden;
}


.scan-progress-fill {
  height: 100%;
  background-color: #2563eb;
  width: 0%;
  border-radius: 99px;
  transition: width 0.5s linear;
}

/* Exit Intent Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-content.medical-file {
  background: white;
  width: 90%;
  max-width: 450px;
  padding: 2rem;
  border-top: 6px solid #ef4444;
  /* Code Red */
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.hidden {
  display: none !important;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.close-icon {
  font-size: 1.5rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.close-icon:hover {
  color: #1e293b;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sticky Triage Bar (Mobile Only) */
.sticky-triage-bar {
  display: none;
}

@media (max-width: 768px) {
  .sticky-triage-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 12px 16px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
  }
}

.triage-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Urgent CTA Button */
.btn-urgent {
  background: #dc2626;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
  animation: gentle-pulse 2s infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-urgent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
  background: #b91c1c;
  color: white;
}

@keyframes gentle-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

/* Triage Section (Surgery vs First Aid) */
.triage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.triage-col {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Surgery = Red */
.surgery-col {
  border-top: 4px solid #ef4444;
}

/* First Aid = Green */
.first-aid-col {
  border-top: 4px solid #22c55e;
}

.triage-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
}

.triage-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
}

.triage-header .icon {
  font-size: 1.5rem;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-item {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-item:last-child {
  border-bottom: none;
}

.action-item .severity-val {
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .triage-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Hero Optimizations */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
    padding: 0 1rem;
  }

  .input-group {
    flex-direction: column;
    gap: 1rem;
    width: 90%;
    /* 90% of view width */
    max-width: 90%;
    margin: 0 auto;
    padding: 0;
  }

  .input-wrapper,
  .input-group .btn-primary {
    width: 100%;
    min-width: 0;
  }

  .input-wrapper input[type="url"] {
    width: 100%;
    font-size: 1rem;
    padding: 1rem;
  }

  /* Make text fit 85% of button visual width (Approx via font size) */
  /* Make text fit 85% of button visual width (Approx via font size) */
  .input-group .btn-primary {
    padding: 0.6rem;
    /* Reduced to offset large font increase */
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .trust-signal {
    white-space: nowrap;
    font-size: 0.65rem;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
  }
}

/* Doctor's Note Card */
.doctors-note-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.note-avatar {
  font-size: 2rem;
  background: #ffffff;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

.note-content h5 {
  margin: 0 0 0.25rem 0;
  color: #1e40af;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.note-content p {
  margin: 0;
  color: #1e293b;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
}

/* Forensic Evidence Cards */
.forensic-card {
  margin-top: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.forensic-card h4 {
  font-size: 0.85rem;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.evidence-item {
  display: flex;
  justify-content: space-between;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.evidence-item:last-child {
  border-bottom: none;
}

.evidence-file {
  color: #ef4444;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.evidence-save {
  color: #1e293b;
  font-weight: 600;
}

/* Third Party Tax Bill */
.tax-bill-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 1rem 0;
}

.tax-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #eff6ff;
  padding: 1rem;
  border-radius: 8px;
  min-width: 100px;
}

#taxTotalTime {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2563eb;
}

.tax-list {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tax-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.tax-item:last-child {
  border-bottom: none;
}

/* Critical Request Chain */
.chain-wrapper {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #cbd5e1;
}

.chain-list {
  list-style: none;
  padding-left: 0;
}

.chain-item {
  font-family: monospace;
  font-size: 0.75rem;
  color: #475569;
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chain-time {
  color: #ef4444;
  font-weight: bold;
  margin-right: 8px;
}

/* Article Charts */
.article-chart {
  width: 100%;
  max-width: 450px;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 12px;
}

/* Refactored Progress Bar (Unified) */
.progress-bar-unified {
  width: 100%;
  max-width: 400px;
  height: 12px;
  background-color: #e2e8f0;
  /* The Track */
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  margin: 0.5rem 0;
  /* Align with layout */
  border: 1px solid #cbd5e1;
  /* High Contrast Border */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.progress-bar-unified::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress);
  /* Controlled by CSS Variable */
  background-color: #2563eb;
  /* The Fill */
  transition: width 0.2s linear;
}

/* Patient Consent (Cookie) */
.consent-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.consent-clipboard {
  background: white;
  border: 1px solid #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  width: 340px;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.consent-header {
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.consent-text {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.consent-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.consent-footer {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
}

.consent-footer a {
  color: #94a3b8;
  text-decoration: underline;
}

.btn-primary-sm {
  background-color: #2563eb;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary-sm:hover {
  background-color: #1d4ed8;
}

.btn-text-sm {
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-text-sm:hover {
  color: #ef4444;
  /* Red on hover */
}

@media (max-width: 640px) {
  .consent-overlay {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
  }

  .consent-clipboard {
    width: 100%;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
  }
}

/* CSS Vaccine (Protocol Omega) */
.article-chart {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

#scan-screenshot {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* -------------------------------------------------------------------------
   VIRAL GROWTH PACK
   ------------------------------------------------------------------------- */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

.btn-share.twitter {
  background-color: #000;
  color: #fff;
}

.btn-share.linkedin {
  background-color: #0a66c2;
  /* LinkedIn Blue */
  color: #fff;
}

.embed-badge-box {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.badge-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-preview h3 {
  margin-bottom: 0.25rem;
  color: #166534;
  /* Success Green */
}

.badge-preview p {
  color: #64748b;
  font-size: 0.9rem;
}

.code-wrapper {
  position: relative;
}

.code-snippet {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #334155;
  resize: none;
  height: 60px;
  cursor: pointer;
  outline: none;
}

.code-snippet:focus {
  border-color: #2563eb;
  background: #fff;
}

.code-hint {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 0.7rem;
  color: #94a3b8;
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   LOGO CARDS & RX PAD STYLES
   ------------------------------------------------------------------------- */
.demo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.logo-cards {
  display: flex;
  gap: 0.75rem;
}

.logo-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.logo-text {
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1;
}

.logo-text.google {
  color: #4285F4;
}

.logo-text.amazon {
  color: #FF9900;
}

.logo-text.cnn {
  color: #CC0000;
  letter-spacing: -1px;
}

.logo-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

/* RX PRESCRIPTION PAD */
.rx-card {
  background: #fff;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.6s ease-out;
}

.rx-icon {
  font-size: 2.5rem;
  background: #eff6ff;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.rx-content h3 {
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.rx-content p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.rx-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.rx-link:hover {
  text-decoration: underline;
}