/* Hemocytometer Calculator — block-specific internals only. Card shell, design
   tokens and box-sizing come from the shared interactive-card.css. Scoped under
   #bsb-hemo so internals never leak. */
#bsb-hemo { font-size: 15px; }

/* "read next" panel attaches flush below the card frame when shown */
#bsb-hemo .bsb-icard__frame:has(+ .hemo-suggestions.visible) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }

#bsb-hemo .hemo-method-selector { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; border: none; padding: 0; }
#bsb-hemo .hemo-method-selector legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; padding: 0; float: none; width: 100%; }
#bsb-hemo .hemo-method-radio { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; background: #fff; user-select: none; }
#bsb-hemo .hemo-method-radio:hover { border-color: #f0b07a; background: var(--tint); }
#bsb-hemo .hemo-method-radio.active { border-color: var(--orange); background: var(--tint); }
#bsb-hemo .hemo-method-radio input[type="radio"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 50%; flex-shrink: 0; margin-top: 2px; cursor: pointer; transition: border-color 0.15s, border-width 0.1s; background: #fff; }
#bsb-hemo .hemo-method-radio input[type="radio"]:checked { border-color: var(--orange); border-width: 5px; }
#bsb-hemo .hemo-method-radio input[type="radio"]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
#bsb-hemo .hemo-method-radio-text { flex: 1; line-height: 1.4; }
#bsb-hemo .hemo-method-radio-text strong { font-size: 13px; font-weight: 700; color: var(--text); display: block; }
#bsb-hemo .hemo-method-radio.active .hemo-method-radio-text strong { color: #b34d06; }
#bsb-hemo .hemo-method-radio-text span { font-size: 11px; color: var(--faint); margin-top: 1px; display: block; }

#bsb-hemo .hemo-method-note { background: var(--light-bg); border-radius: 6px; padding: 12px 16px; font-size: 12px; color: #555; margin-bottom: 28px; line-height: 1.6; display: none; }
#bsb-hemo .hemo-method-note.visible { display: block; }

/* title + subtitle now rendered by the shared .bsb-icard__header */

#bsb-hemo .hemo-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin: 22px 0 14px; }

#bsb-hemo .hemo-diagram-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
@media (max-width: 520px) { #bsb-hemo .hemo-diagram-row { grid-template-columns: 1fr; } }
#bsb-hemo .hemo-diagram { width: 100%; max-width: 180px; }
#bsb-hemo .hemo-diagram-caption { font-size: 11px; color: var(--faint); text-align: center; margin-top: 6px; line-height: 1.4; }

#bsb-hemo .hemo-squares-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#bsb-hemo .hemo-squares-grid .hemo-field:last-child { grid-column: 1 / -1; }
#bsb-hemo .hemo-field { display: flex; flex-direction: column; gap: 4px; }
#bsb-hemo .hemo-field label { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
#bsb-hemo .sq-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
#bsb-hemo .hemo-field .hemo-hint { font-size: 11px; color: var(--faint); line-height: 1.4; }
#bsb-hemo .hemo-field input { border: 1.5px solid var(--border); border-radius: 6px; padding: 9px 10px; font-size: 15px; font-family: inherit; color: var(--text); background: #fff; transition: border-color 0.15s; width: 100%; }
#bsb-hemo .hemo-field input:focus { outline: none; border-color: var(--orange); }
#bsb-hemo .hemo-field input.hemo-input-error { border-color: #e53935; background: #fff5f5; }
#bsb-hemo .hemo-field-error { font-size: 11px; color: #c62828; display: none; }
#bsb-hemo .hemo-field-error.visible { display: block; }
#bsb-hemo .hemo-example-note { font-size: 11px; color: #aaa; margin-top: 8px; font-style: italic; }
#bsb-hemo .hemo-dead-empty { font-size: 13px; color: var(--faint); }

#bsb-hemo .hemo-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
@media (max-width: 480px) { #bsb-hemo .hemo-grid-2 { grid-template-columns: 1fr; } }

#bsb-hemo .hemo-viab-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: #fef3ec; border: 1.5px solid #f0b07a; border-radius: 8px; padding: 12px 16px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: #b34d06; margin-top: 22px; transition: background 0.15s, border-color 0.15s; text-align: left; }
#bsb-hemo .hemo-viab-btn:hover { background: #fde8d5; border-color: var(--orange); }
#bsb-hemo .hemo-viab-btn .viab-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; transition: transform 0.2s; line-height: 1; }
#bsb-hemo .hemo-viab-btn.open .viab-icon { transform: rotate(45deg); }
#bsb-hemo .hemo-viab-btn .viab-label { flex: 1; }
#bsb-hemo .hemo-viab-btn .viab-sublabel { font-size: 11px; font-weight: 400; color: #c06020; display: block; margin-top: 1px; }
#bsb-hemo .hemo-viab-btn .viab-chevron { font-size: 12px; color: var(--orange); transition: transform 0.2s; }
#bsb-hemo .hemo-viab-btn.open .viab-chevron { transform: rotate(180deg); }
#bsb-hemo .hemo-viab-section { display: none; margin-top: 14px; background: var(--tint); border: 1.5px solid var(--tint-border); border-radius: 8px; padding: 16px 18px; }
#bsb-hemo .hemo-viab-section.open { display: block; }
#bsb-hemo .hemo-viab-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
#bsb-hemo .hemo-viab-note strong { color: #b34d06; }
#bsb-hemo .hemo-dead-grid { display: grid; gap: 10px; }

#bsb-hemo .hemo-vol-toggle { background: none; border: none; color: var(--orange); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; padding: 0; margin-top: 16px; display: inline-flex; align-items: center; gap: 5px; }
#bsb-hemo .hemo-vol-toggle:hover { color: var(--orange-hover); }
#bsb-hemo .hemo-vol-section { display: none; margin-top: 12px; }
#bsb-hemo .hemo-vol-section.open { display: block; }

#bsb-hemo .hemo-btn-row { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
#bsb-hemo .hemo-btn-calc { background: var(--orange); color: #fff; border: none; border-radius: 8px; padding: 12px 32px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; transition: background 0.15s; flex-shrink: 0; }
#bsb-hemo .hemo-btn-calc:hover { background: var(--orange-hover); }
#bsb-hemo .hemo-btn-reset { background: none; border: none; color: var(--faint); font-size: 13px; cursor: pointer; font-family: inherit; text-decoration: underline; }
#bsb-hemo .hemo-btn-reset:hover { color: var(--text); }

#bsb-hemo .hemo-warnings { display: none; margin-top: 18px; }
#bsb-hemo .hemo-warning { background: var(--warning-bg); border: 1.5px solid var(--warning-border); border-radius: 6px; padding: 10px 14px; font-size: 13px; color: var(--warning-text); margin-bottom: 8px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5; }
#bsb-hemo .hemo-warning:last-child { margin-bottom: 0; }
#bsb-hemo .hemo-warning-icon { flex-shrink: 0; }

#bsb-hemo .hemo-results { display: none; margin-top: 18px; }
#bsb-hemo .hemo-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 480px) { #bsb-hemo .hemo-result-grid { grid-template-columns: 1fr; } }
#bsb-hemo .hemo-result-card { background: var(--tint); border: 1.5px solid var(--tint-border); border-radius: 8px; padding: 14px 16px; }
#bsb-hemo .hemo-result-card.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
#bsb-hemo .hemo-result-card .r-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.72; margin-bottom: 5px; }
#bsb-hemo .hemo-result-card.primary .r-label { color: rgba(255,255,255,0.85); }
#bsb-hemo .hemo-result-card .r-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
#bsb-hemo .hemo-result-card .r-unit { font-size: 12px; opacity: 0.75; margin-top: 3px; }
#bsb-hemo .hemo-result-card .r-interp { font-size: 12px; margin-top: 7px; line-height: 1.45; opacity: 0.88; }

#bsb-hemo .hemo-working-toggle { width: 100%; background: none; border: 1.5px solid var(--border); border-radius: 6px; padding: 9px 14px; font-size: 13px; color: var(--muted); font-family: inherit; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: border-color 0.15s; }
#bsb-hemo .hemo-working-toggle:hover { border-color: var(--faint); color: var(--text); }
#bsb-hemo .hemo-working-steps { display: none; background: var(--light-bg); border-radius: 6px; padding: 14px 16px; margin-top: 8px; }
#bsb-hemo .hemo-working-steps.open { display: block; }
#bsb-hemo .hemo-step { font-size: 13px; color: #555; margin-bottom: 9px; padding-left: 20px; position: relative; line-height: 1.55; }
#bsb-hemo .hemo-step:last-child { margin-bottom: 0; }
#bsb-hemo .hemo-step::before { content: attr(data-n); position: absolute; left: 0; font-weight: 700; color: var(--orange); }
#bsb-hemo .hemo-step strong { color: var(--text); }
#bsb-hemo .hemo-step small { color: var(--faint); font-size: 11px; }

#bsb-hemo .hemo-suggestions { background: #fff; border: 1.5px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 16px 28px 20px; margin-top: -1px; display: none; opacity: 0; transition: opacity 0.2s; }
#bsb-hemo .hemo-suggestions.visible { display: block; }
#bsb-hemo .hemo-suggestions.faded { opacity: 1; }
#bsb-hemo .hemo-suggestions-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 12px; }
#bsb-hemo .hemo-sugg-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; text-decoration: none; color: inherit; }
#bsb-hemo .hemo-sugg-item:last-child { margin-bottom: 0; }
#bsb-hemo .hemo-sugg-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
#bsb-hemo .hemo-sugg-text strong { font-size: 13px; font-weight: 700; color: var(--orange); display: block; }
#bsb-hemo .hemo-sugg-text span { font-size: 12px; color: var(--muted); line-height: 1.4; }
