/* ==========================================================================
   WELLS SCORE CALCULATOR DEDICATED STYLESHEET
   Heart Score Calculator - Pulmonary Embolism & DVT Stratification
   ========================================================================== */

/* Breadcrumb Navigation */
.wells-breadcrumb {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
  color: #64748b;
  font: 500 13px/1.4 'Inter', sans-serif;
}
.wells-breadcrumb a {
  color: #1d3557;
  text-decoration: none;
  transition: color 0.15s ease;
}
.wells-breadcrumb a:hover {
  color: #e63946;
  text-decoration: underline;
}

/* Hero Section */
.wells-hero-grid {
  align-items: start;
}
.wells-hero .update-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  font: 600 12px 'Inter', sans-serif;
  margin-bottom: 12px;
}
.wells-hero .update-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: wellsPulse 2s infinite ease-in-out;
}
@keyframes wellsPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.15); }
}

.wells-lead {
  font-size: 16px;
  line-height: 1.75;
  color: #334155;
}
.wells-direct {
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #1d4ed8;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font: 13.5px/1.65 'Inter', sans-serif;
}
.wells-stats {
  margin-bottom: 20px;
}

/* Calculator Card */
.wells-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
.wells-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 15px;
}
.wells-card-head span {
  color: #e63946;
  font: 700 11px 'Inter', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wells-card-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
  font-family: 'Lexend', sans-serif;
  color: #1d3557;
}
.wells-card-head > b {
  padding: 5px 10px;
  border-radius: 99px;
  background: #dcfce7;
  color: #166534;
  font: 700 10px 'Lexend', sans-serif;
}

/* Clinical Model Toggle Bar */
.wells-toggle-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 10px;
}
.wells-toggle-btn {
  flex: 1;
  padding: 9px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font: 600 12px 'Lexend', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.wells-toggle-btn.is-active {
  background: #ffffff;
  color: #1d3557;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

/* Preset Buttons */
.wells-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.wells-presets > span {
  color: #475569;
  font: 600 10.5px 'Lexend', sans-serif;
}
.wells-presets button {
  padding: 5px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 99px;
  background: #ffffff;
  color: #1d3557;
  cursor: pointer;
  font: 600 10px 'Lexend', sans-serif;
  transition: all 0.15s ease;
}
.wells-presets button:hover {
  border-color: #1d3557;
  background: #eff6ff;
  color: #1d4ed8;
}

/* Age Row for D-Dimer */
.wells-age-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 14px;
}
.wells-age-row label {
  font: 700 12px 'Lexend', sans-serif;
  color: #1d3557;
}
.wells-age-row label small {
  display: block;
  font: 400 10px 'Inter', sans-serif;
  color: #64748b;
  margin-top: 1px;
}
.wells-age-row input {
  width: 90px;
  padding: 8px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 7px;
  font: 600 14px 'Lexend', sans-serif;
  color: #1d3557;
  text-align: center;
}

/* Checklist Items */
.wells-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wells-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid #dbe3ed;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.wells-check-item:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.wells-check-item.is-checked {
  border-color: #1d3557;
  background: #f0f7ff;
  box-shadow: 0 2px 6px rgba(29, 53, 87, 0.06);
}
.wells-check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #1d3557;
  cursor: pointer;
  flex-shrink: 0;
}
.wells-check-text {
  flex: 1;
}
.wells-check-text strong {
  display: block;
  font: 600 12.5px 'Lexend', sans-serif;
  color: #1d3557;
  line-height: 1.35;
}
.wells-check-text small {
  display: block;
  font: 400 10.5px 'Inter', sans-serif;
  color: #64748b;
  margin-top: 1px;
}
.wells-point-tag {
  padding: 3px 8px;
  border-radius: 99px;
  background: #e2e8f0;
  color: #475569;
  font: 700 10.5px 'Lexend', sans-serif;
  flex-shrink: 0;
}
.wells-check-item.is-checked .wells-point-tag {
  background: #fee2e2;
  color: #b91c1c;
}
.wells-point-tag.minus {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Action Buttons */
.wells-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}
.wells-calc-btn {
  padding: 13px 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #e63946 0%, #c0303c 100%);
  color: #ffffff;
  cursor: pointer;
  font: 700 14px 'Lexend', sans-serif;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.wells-calc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45);
  background: linear-gradient(135deg, #f04856 0%, #d62839 100%);
}
.wells-calc-btn:active {
  transform: translateY(0);
}
.wells-reset-btn {
  padding: 13px 20px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font: 600 13px 'Lexend', sans-serif;
  transition: all 0.15s ease;
}
.wells-reset-btn:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
  color: #1d3557;
}

/* Results Section */
.wells-result {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.wells-result[hidden],
.wells-result.is-hidden {
  display: none !important;
}
.wells-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.wells-result-head span {
  display: block;
  color: #e63946;
  font: 700 10px 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.wells-result-head h2 {
  margin: 3px 0 0;
  font-size: 18px;
  font-family: 'Lexend', sans-serif;
  color: #1d3557;
}
.wells-result-head > b {
  padding: 6px 12px;
  border-radius: 99px;
  font: 700 11px 'Lexend', sans-serif;
}
.wells-result-head > b.is-low {
  background: #dcfce7;
  color: #166534;
}
.wells-result-head > b.is-mid {
  background: #fef3c7;
  color: #92400e;
}
.wells-result-head > b.is-high {
  background: #fee2e2;
  color: #991b1b;
}

/* Score Main Display */
.wells-score-display {
  padding: 16px 0;
  text-align: center;
}
.wells-score-display strong {
  font: 800 48px 'Lexend', sans-serif;
  color: #15803d;
  transition: color 0.3s ease;
}
.wells-score-display span {
  font: 600 14px 'Lexend', sans-serif;
  color: #64748b;
  margin-left: 6px;
}
.wells-score-display p {
  margin: 6px 0 0;
  color: #334155;
  font: 600 13px 'Inter', sans-serif;
}

/* Visual Progress Bar */
.wells-gauge-wrap {
  margin: 12px 0 18px;
}
.wells-gauge-bar {
  height: 10px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}
.wells-gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #22c55e);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease;
}
.wells-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font: 600 9.5px 'Inter', sans-serif;
  color: #64748b;
}

/* Dual Outcome Cards */
.wells-outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.wells-outcome-box {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}
.wells-outcome-box span {
  display: block;
  font: 700 9.5px 'Inter', sans-serif;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.wells-outcome-box strong {
  display: block;
  margin: 4px 0 2px;
  font: 700 18px 'Lexend', sans-serif;
  color: #1d3557;
}
.wells-outcome-box small {
  display: block;
  font: 500 10.5px 'Inter', sans-serif;
  color: #64748b;
}

/* D-Dimer Callout Box */
.wells-ddimer-box {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wells-ddimer-box div strong {
  display: block;
  font: 700 12px 'Lexend', sans-serif;
  color: #1d3557;
}
.wells-ddimer-box div small {
  font: 500 10.5px 'Inter', sans-serif;
  color: #64748b;
}
.wells-ddimer-cutoff {
  font: 800 15px 'Lexend', sans-serif;
  color: #1d4ed8;
  padding: 4px 8px;
  background: #eff6ff;
  border-radius: 6px;
}

/* Guideline Pathway Card */
.wells-pathway-card {
  margin: 14px 0;
  padding: 14px 16px;
  border-left: 4px solid #1d4ed8;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font: 12px/1.65 'Inter', sans-serif;
}
.wells-pathway-card.is-high {
  border-color: #e63946;
  background: #fff1f2;
  color: #881337;
}
.wells-pathway-card.is-mid {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.wells-pathway-card.is-low {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #166534;
}

/* Points Breakdown Mini-Table */
.wells-points-breakdown {
  margin-top: 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #dbe3ed;
  border-radius: 10px;
  font: 12px/1.65 'Inter', sans-serif;
  transition: all 0.2s ease;
}
.wells-points-breakdown[open] {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.wells-points-breakdown summary {
  cursor: pointer;
  font-weight: 700;
  color: #1d3557;
  font-family: 'Lexend', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  font-size: 13px;
}
.wells-points-breakdown summary::-webkit-details-marker {
  display: none;
}
.wells-points-breakdown summary::after {
  content: '▼';
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
}
.wells-points-breakdown[open] summary::after {
  transform: rotate(180deg);
}
.wells-points-breakdown ul {
  margin: 10px 0 0 16px;
  padding: 0;
  color: #475569;
}
.wells-points-breakdown li {
  margin-bottom: 4px;
}

/* Print Summary Button */
.wells-print {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1d3557;
  cursor: pointer;
  font: 700 12.5px 'Lexend', sans-serif;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 14px;
}
.wells-print:hover {
  background: #f1f5f9;
  border-color: #1d3557;
  color: #1d3557;
  box-shadow: 0 2px 8px rgba(29, 53, 87, 0.08);
}

/* Article & Editorial Layout */
.wells-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}
.wells-layout .main-article {
  min-width: 0;
}
.main-article h2 {
  font-family: 'Lexend', sans-serif;
  color: #1d3557;
  font-size: 22px;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #e2e8f0;
}
.main-article h3 {
  font-family: 'Lexend', sans-serif;
  color: #1d3557;
  font-size: 17px;
  margin: 22px 0 10px;
}
.main-article p {
  font-size: 15px;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 16px;
}
.main-article ul,
.main-article ol {
  margin: 0 0 20px 20px;
  color: #334155;
  font-size: 14.5px;
  line-height: 1.7;
}
.main-article li {
  margin-bottom: 8px;
}

/* Mandatory Brand Link Styling */
a.text-link {
  color: #E63946 !important;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-decoration-color: rgba(230, 57, 70, 0.45) !important;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a.text-link:hover {
  color: #c0303c !important;
  text-decoration-color: #c0303c !important;
}

/* Infographic Card */
.wells-infographic-card {
  margin: 30px 0;
  text-align: center;
}
.wells-infographic-card img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.wells-infographic-card figcaption {
  margin-top: 10px;
  color: #64748b;
  font: 500 12.5px 'Inter', sans-serif;
}

/* Case Study Boxes */
.wells-case-box {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #1d3557;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.wells-case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wells-case-head h3 {
  margin: 0;
  font-size: 16px;
  color: #1d3557;
}
.wells-case-badge {
  padding: 4px 10px;
  border-radius: 99px;
  background: #eff6ff;
  color: #1d4ed8;
  font: 700 10.5px 'Lexend', sans-serif;
}
.wells-case-box p {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 10px;
}
.wells-case-math {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #1e3a8a;
  margin: 10px 0;
}

/* Tables */
.wells-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.wells-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font: 14px/1.6 'Inter', sans-serif;
  text-align: left;
}
.wells-table-wrap th {
  padding: 13px 16px;
  background: #1d3557;
  color: #ffffff;
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.wells-table-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.wells-table-wrap tr:last-child td {
  border-bottom: 0;
}
.wells-table-wrap tr:nth-child(even) td {
  background: #f8fafc;
}

/* FAQs */
.wells-faq {
  margin-top: 36px;
}
.wells-faq details {
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  transition: all 0.2s ease;
}
.wells-faq details[open] {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.wells-faq summary {
  padding: 15px 18px;
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #1d3557;
  cursor: pointer;
  background: #f8fafc;
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wells-faq summary::-webkit-details-marker {
  display: none;
}
.wells-faq summary::after {
  content: "+";
  font-size: 18px;
  color: #e63946;
  font-weight: 700;
}
.wells-faq details[open] summary::after {
  content: "−";
}
.wells-faq details p {
  padding: 16px 18px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: #334155;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

/* Author Section */
.wells-author {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 40px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.wells-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #1d3557;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 18px 'Lexend', sans-serif;
  flex-shrink: 0;
}
.wells-author span {
  color: #e63946;
  font: 700 10px 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wells-author h2 {
  margin: 2px 0 6px;
  font-size: 18px;
  font-family: 'Lexend', sans-serif;
  color: #1d3557;
}

/* Responsive */
@media (max-width: 900px) {
  .wells-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .wells-card {
    padding: 18px;
  }
  .wells-outcome-grid {
    grid-template-columns: 1fr;
  }
  .wells-actions {
    grid-template-columns: 1fr;
  }
}
@media print {
  header, footer, #progress-bar, .wells-hero-grid > div:first-child, .wells-actions, .wells-presets, .wells-print, .main-article, .sidebar {
    display: none !important;
  }
  .wells-hero-grid {
    display: block !important;
  }
  .wells-card {
    box-shadow: none;
    border: 0;
  }
  .wells-result {
    border: 0;
    display: block !important;
  }
}
