/* Creatinine Clearance Calculator (CrCl) CSS - heartscorecalculator.com */
.crcl-breadcrumb {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: #64748b;
  font: 500 13px Inter, sans-serif;
}
.crcl-breadcrumb a {
  color: #1d3557;
  text-decoration: none;
}
.crcl-breadcrumb a:hover {
  text-decoration: underline;
}
.crcl-hero-grid {
  align-items: start;
}
.crcl-lead {
  font-size: 16px;
  line-height: 1.75;
}
.crcl-direct {
  margin: 20px 0;
  padding: 15px 17px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #eff6ff;
  color: #1e3a8a;
  font: 13px/1.6 Inter, sans-serif;
}
.crcl-stats {
  margin-bottom: 20px;
}

.update-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e63946;
  margin-right: 6px;
  animation: crcl-pulse 2s infinite;
}
@keyframes crcl-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.crcl-card {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}
.crcl-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}
.crcl-card-head span {
  color: #e63946;
  font: 700 10px Inter, sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.crcl-card-head h2 {
  margin: 3px 0 0;
  font-size: 19px;
}
.crcl-card-head > b {
  padding: 5px 9px;
  border-radius: 99px;
  background: #dcfce7;
  color: #166534;
  font: 700 9px Lexend, sans-serif;
}

/* Mode Switcher Tabs */
.crcl-toggle-bar {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
  gap: 4px;
}
.crcl-toggle-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font: 700 11.5px Lexend, sans-serif;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.crcl-toggle-btn.is-active {
  background: #fff;
  color: #1d3557;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.crcl-mode-desc {
  font-size: 11.5px;
  color: #475569;
  background: #f8fafc;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  border-left: 3px solid #1d3557;
  line-height: 1.45;
}

/* Fieldsets & Groups */
.crcl-group {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.crcl-group legend {
  padding: 0 6px;
  color: #1d3557;
  font: 700 10.5px Lexend, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.crcl-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.crcl-field-full {
  margin-bottom: 12px;
}
.crcl-field-full:last-child {
  margin-bottom: 0;
}

.crcl-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 700 11.5px Lexend, sans-serif;
  color: #1d3557;
  margin-bottom: 5px;
}
.crcl-label small {
  font: 500 10.5px Inter, sans-serif;
  color: #64748b;
}

.crcl-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.crcl-input {
  width: 100%;
  height: 38px;
  padding: 0 54px 0 12px;
  border: 1.5px solid #dbe3ed;
  border-radius: 8px;
  font: 600 13px Inter, sans-serif;
  color: #1d3557;
  background: #fff;
  transition: border-color 0.15s ease;
}
.crcl-input:focus {
  outline: 0;
  border-color: #1d3557;
}
.crcl-unit-btn {
  position: absolute;
  right: 6px;
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f1f5f9;
  color: #1d3557;
  font: 700 10px Lexend, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}
.crcl-unit-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Segmented Options */
.crcl-seg-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.crcl-seg-wrap.tri {
  grid-template-columns: repeat(3, 1fr);
}
.crcl-seg-opt {
  display: block;
  cursor: pointer;
}
.crcl-seg-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.crcl-seg-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border: 1.5px solid #dbe3ed;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font: 700 11.5px Lexend, sans-serif;
  transition: all 0.15s ease;
  text-align: center;
  padding: 0 6px;
}
.crcl-seg-opt input:checked + .crcl-seg-pill {
  border-color: #1d3557;
  background: #1d3557;
  color: #fff;
}

/* Weight Matrix Box */
.crcl-weight-matrix {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}
.crcl-weight-matrix > div span {
  display: block;
  font: 500 8.5px Inter, sans-serif;
  color: #64748b;
  text-transform: uppercase;
}
.crcl-weight-matrix > div strong {
  display: block;
  font: 700 12px Lexend, sans-serif;
  color: #1d3557;
  margin-top: 2px;
}

/* Presets & Actions */
.crcl-examples {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.crcl-examples > span {
  color: #64748b;
  font: 600 10px Lexend, sans-serif;
}
.crcl-examples button {
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 99px;
  background: #fff;
  color: #1d3557;
  cursor: pointer;
  font: 600 10px Lexend, sans-serif;
  transition: all 0.15s ease;
}
.crcl-examples button:hover {
  border-color: #1d3557;
  background: #eff6ff;
}

.crcl-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.crcl-actions > button:first-child {
  padding: 12px 18px;
  border: 0;
  border-radius: 9px;
  background: #e63946;
  color: #fff;
  cursor: pointer;
  font: 700 13px Lexend, sans-serif;
  transition: background 0.15s ease;
}
.crcl-actions > button:first-child:hover {
  background: #c0303c;
}
.crcl-actions > button:last-child, .crcl-print {
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font: 600 11px Lexend, sans-serif;
  transition: all 0.15s ease;
}
.crcl-actions > button:last-child:hover, .crcl-print:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* Dynamic Results Reveal Card */
.crcl-result {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  animation: crcl-fadein 0.3s ease;
}
@keyframes crcl-fadein {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.crcl-result[hidden] {
  display: none !important;
}
.crcl-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.crcl-result-head span {
  display: block;
  color: #e63946;
  font: 700 9px Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.crcl-result-head h2 {
  margin: 3px 0 0;
  font-size: 18px;
}
.crcl-result-head > b {
  padding: 6px 12px;
  border-radius: 99px;
  font: 700 10.5px Lexend, sans-serif;
}
.crcl-result-head > b.is-normal { background: #dcfce7; color: #166534; }
.crcl-result-head > b.is-mild { background: #e0f2fe; color: #0369a1; }
.crcl-result-head > b.is-mod { background: #fef3c7; color: #92400e; }
.crcl-result-head > b.is-severe { background: #fee2e2; color: #991b1b; }
.crcl-result-head > b.is-fail { background: #450a0a; color: #fecaca; }

.crcl-main-value {
  padding: 16px 0 12px;
  text-align: center;
}
.crcl-main-value strong {
  color: #1d3557;
  font: 800 48px Lexend, sans-serif;
  line-height: 1;
}
.crcl-main-value > span {
  margin-left: 4px;
  color: #64748b;
  font: 700 20px Lexend, sans-serif;
}
.crcl-main-value p {
  margin: 6px 0 0;
  color: #475569;
  font: 600 13px Inter, sans-serif;
}

/* Weight Comparison Result Grid */
.crcl-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0;
}
.crcl-result-grid > div {
  padding: 11px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  text-align: center;
}
.crcl-result-grid > div.is-selected {
  border-color: #1d3557;
  background: #eff6ff;
}
.crcl-result-grid span {
  display: block;
  color: #94a3b8;
  font: 8.5px Inter, sans-serif;
  text-transform: uppercase;
}
.crcl-result-grid strong {
  display: block;
  margin: 4px 0 2px;
  color: #1d3557;
  font: 700 13.5px Lexend, sans-serif;
}
.crcl-result-grid small {
  display: block;
  color: #64748b;
  font: 9px/1.3 Inter, sans-serif;
}

/* Clinical Recommendation & Dosing Box */
.crcl-rec-box {
  margin-top: 12px;
  padding: 14px 16px;
  border-left: 4px solid #1d3557;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font: 11.5px/1.6 Inter, sans-serif;
}
.crcl-rec-box.is-severe, .crcl-rec-box.is-fail {
  border-left-color: #e63946;
  background: #fff1f2;
  color: #881337;
}
.crcl-rec-box.is-mod {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}
.crcl-rec-box.is-normal, .crcl-rec-box.is-mild {
  border-left-color: #166534;
  background: #f0fdf4;
  color: #14532d;
}
.crcl-rec-box strong {
  display: block;
  margin-bottom: 4px;
  font: 700 12px Lexend, sans-serif;
}

/* Drug Dosing Card */
.crcl-dosing-card {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
  color: #334155;
}
.crcl-dosing-card strong {
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
}
.crcl-dosing-card ul {
  margin: 4px 0 0 18px;
  padding: 0;
}

.crcl-print {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 0;
  text-align: center;
}

/* Editorial Layout & Content */
.crcl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 30px;
  align-items: start;
}
.crcl-layout .main-article {
  min-width: 0;
}
.crcl-note {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font: 12.5px/1.65 Inter, sans-serif;
}
.crcl-formula {
  margin: 18px 0;
  padding: 18px;
  border-radius: 11px;
  background: #1d3557;
  color: #fff;
  text-align: center;
  font: 700 15px/1.5 Lexend, sans-serif;
}
.crcl-formula code {
  display: block;
  margin-top: 8px;
  font: 400 12.5px/1.6 Consolas, monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
  border-radius: 6px;
}

/* Tables */
.crcl-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}
.crcl-table {
  width: 100%;
  border-collapse: collapse;
  font: 12px Inter, sans-serif;
}
.crcl-table th {
  background: #1d3557;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-family: Lexend, sans-serif;
}
.crcl-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.crcl-table tr:nth-child(even) td {
  background: #f8fafc;
}
.crcl-table tr:hover td {
  background: #f1f5f9;
}

/* Internal Linking Requirement */
.text-link, .crcl-content p a, .crcl-content li a, .crcl-content td a, .main-article p a, .main-article li a {
  color: #e63946 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(230, 57, 70, 0.45) !important;
  text-underline-offset: 3px !important;
  text-decoration-thickness: 1.5px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}
.text-link:hover, .crcl-content p a:hover, .crcl-content li a:hover, .crcl-content td a:hover, .main-article p a:hover, .main-article li a:hover {
  color: #c0303c !important;
  text-decoration-color: #c0303c !important;
}

/* FAQ Details Accordion */
.faq-box details {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  margin-bottom: 10px;
  background: #fff;
  transition: all 0.2s ease;
}
.faq-box summary {
  padding: 14px 16px;
  font: 700 14px Lexend, sans-serif;
  color: #1d3557;
  cursor: pointer;
  user-select: none;
}
.faq-box summary:hover {
  color: #e63946;
}
.faq-box details[open] summary {
  border-bottom: 1px solid #e2e8f0;
  color: #e63946;
}
.faq-box details p {
  padding: 14px 16px;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #475569;
}

/* Case Scenario Box */
.case-card {
  padding: 16px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  margin: 16px 0;
}
.case-card h3 {
  margin-top: 0;
  color: #1d3557;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 900px) {
  .crcl-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .crcl-field-grid { grid-template-columns: 1fr; }
  .crcl-result-grid { grid-template-columns: 1fr; }
  .crcl-card { padding: 16px; }
  .crcl-weight-matrix { grid-template-columns: 1fr 1fr; gap: 8px; }
}

@media print {
  body * { visibility: hidden; }
  #crcl-print-zone, #crcl-print-zone * { visibility: visible; }
  #crcl-print-zone { position: absolute; left: 0; top: 0; width: 100%; }
  .crcl-actions, .crcl-examples, .crcl-print, header, footer, .sticky-sidebar { display: none !important; }
}
