/* Rohrwärme-Rechner 2.0 Scoped Styles */
.rw-calculator {
   max-width: 100%;
   margin: 1.5rem auto 2.5rem;
   font-family: var(--font-body, 'Lexend Deca', sans-serif);
   color: var(--color-darker, #1e293b);
   line-height: 1.6;
   box-sizing: border-box;
}
.rw-calculator *,
.rw-calculator *::before,
.rw-calculator *::after {
   box-sizing: border-box;
}

/* Universal Subscript Styling: clean drop below baseline, no layout disruption */
.rw-calculator sub {
   font-size: 0.72em !important;
   line-height: 0 !important;
   position: relative !important;
   vertical-align: baseline !important;
   bottom: -0.32em !important;
   font-style: normal !important;
}

/* Toolbar & Buttons */
.rw-toolbar {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 0.65rem;
   margin: 0.5rem 0 1.25rem 0;
   padding: 0;
}
.rw-btn {
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   gap: 0.45rem !important;
   width: auto !important;
   height: 38px !important;
   padding: 0 1.15rem !important;
   font-size: 0.875rem !important;
   font-weight: 600 !important;
   font-family: var(--font-heading, 'Lexend', sans-serif) !important;
   border-radius: 6px !important;
   border: 1.5px solid transparent !important;
   cursor: pointer !important;
   user-select: none !important;
   text-decoration: none !important;
   white-space: nowrap !important;
   margin: 0 !important;
   line-height: 1 !important;
   transition: all 0.15s ease !important;
}
.rw-btn svg {
   width: 16px;
   height: 16px;
   fill: currentColor;
   flex-shrink: 0;
}
.rw-btn:active {
   transform: translateY(1px);
}
.rw-btn--primary {
   background-color: var(--accent-medium, #61A3BA) !important;
   color: #ffffff !important;
   border-color: var(--accent-medium, #61A3BA) !important;
   box-shadow: 0 2px 6px rgba(97, 163, 186, 0.25) !important;
}
.rw-btn--primary:hover {
   background-color: var(--accent-light, #4a8d9e) !important;
   transform: translateY(-1px);
   box-shadow: 0 4px 10px rgba(97, 163, 186, 0.35) !important;
}
.rw-btn--ghost {
   background-color: var(--color-lighter, #f1f4f8) !important;
   color: var(--color-darker, #1e293b) !important;
   border-color: var(--color-light, #cbd5e1) !important;
}
.rw-btn--ghost:hover {
   background-color: var(--color-medium, #e2e8f0) !important;
   border-color: var(--color-dark, #94a3b8) !important;
}

/* Sections & Cards */
.rw-section {
   background-color: var(--background, #ffffff);
   border: 1px solid var(--color-light, #e2e8f0);
   border-radius: 10px;
   padding: 1.25rem 1.5rem;
   margin-bottom: 1.25rem;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
   transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rw-section:hover {
   border-color: var(--color-medium, #cbd5e1);
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.rw-section__head {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   margin-bottom: 1rem;
   padding-bottom: 0.65rem;
   border-bottom: 1px solid var(--color-light, #e2e8f0);
}
.rw-section__step {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 26px;
   height: 26px;
   border-radius: 50%;
   background-color: var(--accent-medium, #61A3BA);
   color: #ffffff;
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 0.8rem;
   font-weight: 700;
   line-height: 1;
   flex-shrink: 0;
}
.rw-section__title {
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 1.05rem;
   font-weight: 700;
   color: var(--color-darker, #0f172a);
   margin: 0;
   padding: 0;
   letter-spacing: -0.01em;
   line-height: 1.3;
}
.rw-section__title::before,
.rw-section__title::after {
   display: none !important;
   content: none !important;
}

/* Grids & Fields */
.rw-section__grid {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 1rem 1.25rem;
}
@media (max-width: 640px) {
   .rw-section__grid {
      grid-template-columns: 1fr;
      gap: 0.85rem;
   }
}
.rw-field {
   display: flex;
   flex-direction: column;
   margin-bottom: 0 !important;
}
.rw-field--span2 {
   grid-column: 1 / -1;
}

/* 3 Spalten für Faktoren: EB, fSK, fKQ */
.rw-factors-row {
   grid-column: 1 / -1;
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 1rem 1.25rem;
}
@media (max-width: 768px) {
   .rw-factors-row {
      grid-template-columns: 1fr;
      gap: 0.85rem;
   }
}

/* Vertikale Ausrichtung der Fragen / Labels */
@media (min-width: 641px) {
   .rw-field:not(.rw-field--span2) .rw-field__label {
      min-height: 2.7rem;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.4rem;
   }
}
@media (min-width: 769px) {
   .rw-factors-row .rw-field__label {
      min-height: 2.7rem;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.4rem;
   }
}
.rw-field--span2 .rw-field__label {
   min-height: unset;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.5rem;
   margin-bottom: 0.35rem;
}
@media (max-width: 640px) {
   .rw-field__label {
      min-height: unset;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-bottom: 0.35rem;
   }
}

.rw-field__label label,
.rw-field label {
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 0.85rem !important;
   font-weight: 600 !important;
   color: var(--color-darker, #1e293b) !important;
   margin: 0 !important;
   line-height: 1.35 !important;
   cursor: pointer;
}
.rw-hint {
   font-size: 0.76rem !important;
   color: var(--color-dark, #64748b) !important;
   margin-top: 0.35rem !important;
   margin-bottom: 0 !important;
   line-height: 1.35 !important;
}

/* Inputs, Selects, Date */
.rw-form input[type="text"],
.rw-form input[type="number"],
.rw-form input[type="date"],
.rw-form select {
   width: 100% !important;
   height: 38px !important;
   padding: 0.45rem 0.75rem !important;
   font-size: 0.925rem !important;
   font-family: var(--font-body, 'Lexend Deca', sans-serif) !important;
   line-height: 1.4 !important;
   color: var(--color-darker, #0f172a) !important;
   background-color: var(--background, #ffffff) !important;
   border: 1px solid var(--color-light, #cbd5e1) !important;
   border-radius: 6px !important;
   box-sizing: border-box !important;
   outline: none !important;
   margin: 0 !important;
   transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}
.rw-form input[type="text"]:focus,
.rw-form input[type="number"]:focus,
.rw-form input[type="date"]:focus,
.rw-form select:focus {
   border-color: var(--accent-medium, #61A3BA) !important;
   box-shadow: 0 0 0 3px rgba(97, 163, 186, 0.22) !important;
}
.rw-form input.rw-auto {
   background-color: #ecfdf5 !important;
   border-color: #10b981 !important;
   color: #065f46 !important;
   font-weight: 600 !important;
}
.rw-form input:disabled,
.rw-form select:disabled {
   background-color: var(--color-lighter, #f8fafc) !important;
   color: var(--color-dark, #94a3b8) !important;
   cursor: not-allowed !important;
   border-color: var(--color-light, #e2e8f0) !important;
}

/* Dynamische Heizwärme Berechnungsbox */
.rw-hw-calc {
   margin-top: 0.5rem;
   padding: 0.55rem 0.75rem;
   background-color: #f8fafc;
   border: 1px dashed #cbd5e1;
   border-radius: 6px;
   font-size: 0.825rem;
   line-height: 1.4;
}
.rw-hw-calc-note {
   font-size: 0.78rem;
   color: var(--color-dark, #64748b);
   margin-bottom: 0.3rem;
   font-weight: 500;
}

/* Radio Pill Group */
.rw-radio-group {
   display: flex;
   gap: 0.4rem;
   width: 100%;
   background-color: var(--color-lighter, #f1f4f8);
   padding: 3px;
   border-radius: 8px;
   border: 1px solid var(--color-light, #e2e8f0);
}
.rw-radio-label {
   flex: 1 1 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 0.4rem;
   height: 32px;
   padding: 0 0.85rem;
   font-size: 0.85rem;
   font-weight: 600;
   font-family: var(--font-heading, 'Lexend', sans-serif);
   color: var(--color-dark, #475569);
   border-radius: 5px;
   cursor: pointer;
   user-select: none;
   margin: 0;
   transition: all 0.15s ease;
}
.rw-radio-label:hover {
   color: var(--color-darker, #0f172a);
   background-color: rgba(255, 255, 255, 0.6);
}
.rw-radio-label:has(input:checked) {
   background-color: #ffffff;
   color: var(--accent-medium, #61A3BA);
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(97, 163, 186, 0.3);
}
.rw-radio-input {
   appearance: auto;
   width: 14px;
   height: 14px;
   margin: 0;
   cursor: pointer;
   accent-color: var(--accent-medium, #61A3BA);
}
.rw-radio-group:has(input:disabled) {
   opacity: 0.6;
   cursor: not-allowed;
}

/* Tooltip Buttons & Texte */
.rw-help {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 18px;
   height: 18px;
   border-radius: 50%;
   background-color: var(--color-lighter, #f1f5f9);
   border: 1px solid var(--color-medium, #cbd5e1);
   color: var(--color-dark, #64748b);
   font-size: 0.7rem;
   font-weight: 700;
   line-height: 1;
   cursor: pointer;
   padding: 0;
   margin: 0;
   flex-shrink: 0;
   transition: all 0.15s ease;
}
.rw-help:hover,
.rw-help[aria-expanded="true"] {
   background-color: var(--accent-medium, #61A3BA);
   border-color: var(--accent-medium, #61A3BA);
   color: #ffffff;
}
.rw-help-text {
   display: none !important;
   grid-column: 1 / -1;
   margin-top: 0.45rem;
   padding: 0.65rem 0.85rem;
   background-color: var(--color-lighter, #f8fafc);
   border: 1px solid var(--color-light, #e2e8f0);
   border-left: 3px solid var(--accent-medium, #61A3BA);
   border-radius: 6px;
   font-size: 0.8rem;
   line-height: 1.45;
   color: var(--color-dark, #334155);
}
.rw-help-text.is-open {
   display: block !important;
   animation: rwFadeIn 0.2s ease-out;
}

/* Date Range Inputs */
.rw-date-range {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.65rem;
}
@media (max-width: 480px) {
   .rw-date-range {
      grid-template-columns: 1fr;
   }
}

/* Results */
.rw-result {
   margin-top: 1rem;
   padding: 0.9rem 1.15rem;
   background-color: var(--color-lighter, #f8fafc);
   border: 1px solid var(--color-light, #e2e8f0);
   border-radius: 8px;
}
.rw-result--prominent {
   background-color: rgba(97, 163, 186, 0.08);
   border-color: var(--accent-medium, #61A3BA);
}
.rw-result__head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 0.5rem;
   margin-bottom: 0.25rem;
}
.rw-result__label {
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 0.825rem;
   font-weight: 600;
   color: var(--color-dark, #475569);
   text-transform: uppercase;
   letter-spacing: 0.04em;
}
.rw-result--prominent .rw-result__label {
   color: var(--accent-medium, #61A3BA);
}
.rw-result__value {
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 1.5rem;
   font-weight: 700;
   color: var(--color-darker, #0f172a);
   line-height: 1.2;
}
.rw-result--prominent .rw-result__value {
   color: var(--accent-medium, #61A3BA);
}

/* Ausklappbare Formeln */
.rw-formula-details {
   margin-top: 0.65rem;
   border-top: 1px dashed var(--color-light, #cbd5e1);
   padding-top: 0.5rem;
}
.rw-formula-summary {
   font-family: var(--font-heading, 'Lexend', sans-serif);
   font-size: 0.78rem;
   font-weight: 600;
   color: var(--accent-medium, #61A3BA);
   cursor: pointer;
   user-select: none;
   outline: none;
   transition: color 0.15s ease;
}
.rw-formula-summary:hover {
   color: var(--accent-light, #4a8d9e);
   text-decoration: underline;
}
.rw-formula-vdi {
   font-size: 0.72rem;
   font-weight: 600;
   color: var(--color-dark, #64748b);
   margin-bottom: 0.35rem;
   letter-spacing: 0.02em;
}

/* Math Boxes & Fractions: Block display without flex-gap artifacts */
.rw-math-box {
   margin-top: 0.45rem;
   padding: 0.75rem 0.95rem;
   background-color: #ffffff;
   border: 1px solid var(--color-light, #e2e8f0);
   border-radius: 6px;
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
}
.rw-math-line {
   font-family: 'Cambria Math', 'Latin Modern Math', Georgia, serif;
   font-size: 0.95rem;
   line-height: 1.8;
   color: var(--color-darker, #0f172a);
   display: block;
   margin: 0.15rem 0;
   word-break: normal;
}
.rw-math-line--sym {
   color: var(--accent-medium, #61A3BA);
   font-weight: 600;
   border-bottom: 1px solid var(--color-lighter, #f1f4f8);
   padding-bottom: 0.35rem;
}
.rw-math-frac {
   display: inline-flex;
   flex-direction: column;
   vertical-align: middle;
   text-align: center;
   padding: 0 0.25rem;
   margin: 0 0.2rem;
   line-height: 1.1;
}
.rw-math-num {
   border-bottom: 1px solid currentColor;
   padding-bottom: 1px;
}
.rw-math-den {
   padding-top: 1px;
}

/* Status Badges */
.rw-status {
   margin-top: 0.85rem;
   padding: 0.65rem 0.95rem;
   border-radius: 6px;
   font-size: 0.85rem;
   line-height: 1.45;
   display: none;
}
.rw-status:not(:empty) {
   display: block;
}
.rw-status--ok {
   background-color: #ecfdf5;
   border: 1px solid #10b981;
   color: #065f46;
}
.rw-status--warn {
   background-color: #fffbeb;
   border: 1px solid #f59e0b;
   color: #92400e;
}
.rw-abort {
   margin-top: 0.65rem;
   padding: 0.75rem 1rem;
   background-color: #fef2f2;
   border: 1px solid #ef4444;
   border-left: 4px solid #dc2626;
   border-radius: 6px;
   color: #991b1b;
   font-size: 0.85rem;
   line-height: 1.45;
}
.rw-note {
   padding: 0.85rem 1.15rem;
   background-color: var(--color-lighter, #f8fafc);
   border-left: 3px solid var(--accent-medium, #61A3BA);
   border-radius: 6px;
   font-size: 0.825rem;
   line-height: 1.5;
   color: var(--color-dark, #475569);
   margin-top: 1.5rem;
}

.rw-hidden {
   display: none !important;
}
@keyframes rwFadeIn {
   from { opacity: 0; transform: translateY(4px); }
   to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PRINT CONTAINER ON SCREEN: MUST BE COMPLETELY INVISIBLE
   ========================================================================== */
#rw-print {
   display: none !important;
}

/* ==========================================================================
   DARK THEME SPECIFICS
   ========================================================================== */
html[data-runtime-theme="dark"] .rw-calculator,
body[data-runtime-theme="dark"] .rw-calculator {
   color: #f1f5f9;
}
html[data-runtime-theme="dark"] .rw-section,
body[data-runtime-theme="dark"] .rw-section {
   background-color: #1a2234 !important;
   border-color: #334155 !important;
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}
html[data-runtime-theme="dark"] .rw-section:hover,
body[data-runtime-theme="dark"] .rw-section:hover {
   border-color: #475569 !important;
}
html[data-runtime-theme="dark"] .rw-section__head,
body[data-runtime-theme="dark"] .rw-section__head {
   border-bottom-color: #334155 !important;
}
html[data-runtime-theme="dark"] .rw-section__title,
body[data-runtime-theme="dark"] .rw-section__title {
   color: #f8fafc !important;
}
html[data-runtime-theme="dark"] .rw-field__label label,
html[data-runtime-theme="dark"] .rw-field label,
body[data-runtime-theme="dark"] .rw-field__label label,
body[data-runtime-theme="dark"] .rw-field label {
   color: #f1f5f9 !important;
}
html[data-runtime-theme="dark"] .rw-hint,
body[data-runtime-theme="dark"] .rw-hint {
   color: #94a3b8 !important;
}
html[data-runtime-theme="dark"] .rw-form input[type="text"],
html[data-runtime-theme="dark"] .rw-form input[type="number"],
html[data-runtime-theme="dark"] .rw-form input[type="date"],
html[data-runtime-theme="dark"] .rw-form select,
body[data-runtime-theme="dark"] .rw-form input[type="text"],
body[data-runtime-theme="dark"] .rw-form input[type="number"],
body[data-runtime-theme="dark"] .rw-form input[type="date"],
body[data-runtime-theme="dark"] .rw-form select {
   background-color: #1f2937 !important;
   border-color: #374151 !important;
   color: #f9fafb !important;
}
html[data-runtime-theme="dark"] .rw-form input:focus,
html[data-runtime-theme="dark"] .rw-form select:focus,
body[data-runtime-theme="dark"] .rw-form input:focus,
body[data-runtime-theme="dark"] .rw-form select:focus {
   background-color: #111827 !important;
   border-color: #38bdf8 !important;
   box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}
html[data-runtime-theme="dark"] .rw-form input.rw-auto,
body[data-runtime-theme="dark"] .rw-form input.rw-auto {
   background-color: rgba(16, 185, 129, 0.18) !important;
   border-color: #10b981 !important;
   color: #6ee7b7 !important;
}
html[data-runtime-theme="dark"] .rw-hw-calc,
body[data-runtime-theme="dark"] .rw-hw-calc {
   background-color: #111827 !important;
   border-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-hw-calc-note,
body[data-runtime-theme="dark"] .rw-hw-calc-note {
   color: #94a3b8 !important;
}

/* Radios in Dark Theme */
html[data-runtime-theme="dark"] .rw-radio-group,
body[data-runtime-theme="dark"] .rw-radio-group {
   background-color: #1f2937 !important;
   border-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-radio-label,
body[data-runtime-theme="dark"] .rw-radio-label {
   color: #94a3b8 !important;
}
html[data-runtime-theme="dark"] .rw-radio-label:hover,
body[data-runtime-theme="dark"] .rw-radio-label:hover {
   color: #f8fafc !important;
   background-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-radio-label:has(input:checked),
body[data-runtime-theme="dark"] .rw-radio-label:has(input:checked) {
   background-color: #111827 !important;
   color: #38bdf8 !important;
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 0 1px #38bdf8 !important;
}
html[data-runtime-theme="dark"] .rw-radio-input,
body[data-runtime-theme="dark"] .rw-radio-input {
   accent-color: #38bdf8 !important;
}

/* Tooltips in Dark Theme */
html[data-runtime-theme="dark"] .rw-help,
body[data-runtime-theme="dark"] .rw-help {
   background-color: #1f2937 !important;
   border-color: #374151 !important;
   color: #94a3b8 !important;
}
html[data-runtime-theme="dark"] .rw-help:hover,
html[data-runtime-theme="dark"] .rw-help[aria-expanded="true"],
body[data-runtime-theme="dark"] .rw-help:hover,
body[data-runtime-theme="dark"] .rw-help[aria-expanded="true"] {
   background-color: #38bdf8 !important;
   border-color: #38bdf8 !important;
   color: #0f172a !important;
}
html[data-runtime-theme="dark"] .rw-help-text,
body[data-runtime-theme="dark"] .rw-help-text {
   background-color: #1e293b !important;
   border-color: #334155 !important;
   border-left-color: #38bdf8 !important;
   color: #f1f5f9 !important;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Buttons in Dark Theme */
html[data-runtime-theme="dark"] .rw-btn--ghost,
body[data-runtime-theme="dark"] .rw-btn--ghost {
   background-color: #1f2937 !important;
   color: #f8fafc !important;
   border-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-btn--ghost:hover,
body[data-runtime-theme="dark"] .rw-btn--ghost:hover {
   background-color: #374151 !important;
   border-color: #4b5563 !important;
}

/* Results in Dark Theme */
html[data-runtime-theme="dark"] .rw-result,
body[data-runtime-theme="dark"] .rw-result {
   background-color: #1f2937 !important;
   border-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-result__label,
body[data-runtime-theme="dark"] .rw-result__label {
   color: #94a3b8 !important;
}
html[data-runtime-theme="dark"] .rw-result__value,
body[data-runtime-theme="dark"] .rw-result__value {
   color: #f8fafc !important;
}
html[data-runtime-theme="dark"] .rw-result--prominent,
body[data-runtime-theme="dark"] .rw-result--prominent {
   background-color: rgba(56, 189, 248, 0.08) !important;
   border-color: #38bdf8 !important;
}
html[data-runtime-theme="dark"] .rw-result--prominent .rw-result__label,
body[data-runtime-theme="dark"] .rw-result--prominent .rw-result__label {
   color: #7dd3fc !important;
}
html[data-runtime-theme="dark"] .rw-result--prominent .rw-result__value,
body[data-runtime-theme="dark"] .rw-result--prominent .rw-result__value {
   color: #38bdf8 !important;
}

/* Formeln & Details in Dark Theme */
html[data-runtime-theme="dark"] .rw-formula-details,
body[data-runtime-theme="dark"] .rw-formula-details {
   border-top-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-formula-summary,
body[data-runtime-theme="dark"] .rw-formula-summary {
   color: #38bdf8 !important;
}
html[data-runtime-theme="dark"] .rw-formula-vdi,
body[data-runtime-theme="dark"] .rw-formula-vdi {
   color: #94a3b8 !important;
}
html[data-runtime-theme="dark"] .rw-math-box,
body[data-runtime-theme="dark"] .rw-math-box {
   background-color: #111827 !important;
   border-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-math-line,
body[data-runtime-theme="dark"] .rw-math-line {
   color: #f8fafc !important;
}
html[data-runtime-theme="dark"] .rw-math-line--sym,
body[data-runtime-theme="dark"] .rw-math-line--sym {
   color: #7dd3fc !important;
   border-bottom-color: #374151 !important;
}
html[data-runtime-theme="dark"] .rw-math-num,
body[data-runtime-theme="dark"] .rw-math-num {
   border-bottom-color: #94a3b8 !important;
}

/* Status in Dark Theme */
html[data-runtime-theme="dark"] .rw-status--ok,
body[data-runtime-theme="dark"] .rw-status--ok {
   background-color: rgba(16, 185, 129, 0.15) !important;
   border-color: #10b981 !important;
   color: #6ee7b7 !important;
}
html[data-runtime-theme="dark"] .rw-status--warn,
body[data-runtime-theme="dark"] .rw-status--warn {
   background-color: rgba(245, 158, 11, 0.15) !important;
   border-color: #f59e0b !important;
   color: #fcd34d !important;
}
html[data-runtime-theme="dark"] .rw-note,
body[data-runtime-theme="dark"] .rw-note {
   background-color: #1f2937 !important;
   border-left-color: #38bdf8 !important;
   color: #cbd5e1 !important;
}

/* ==========================================================================
   PRINT STYLES: Direct body-level isolation
   ========================================================================== */
@media print {
   @page { size: A4 portrait; margin: 12mm 14mm; }
   
   /* Hide everything attached to body except #rw-print */
   body > *:not(#rw-print) {
      display: none !important;
      visibility: hidden !important;
   }
   
   html, body {
      background: #ffffff !important;
      color: #0f172a !important;
      font-size: 11pt !important;
      line-height: 1.5 !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
   }
   #rw-print {
      display: block !important;
      visibility: visible !important;
      position: static !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      color: #0f172a !important;
      background: #ffffff !important;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
   }
   #rw-print * {
      visibility: visible !important;
   }
   #rw-print .rw-print__header { border-bottom: 2px solid #61A3BA; padding-bottom: 0.6rem; margin-bottom: 1.1rem; }
   #rw-print h1 { font-size: 18pt !important; font-weight: 700 !important; margin: 0 0 0.3rem !important; }
   #rw-print .rw-print__sub { font-size: 9.5pt !important; color: #64748b !important; }
   #rw-print .rw-print__h2 { font-size: 12pt !important; font-weight: 700 !important; margin: 1.1rem 0 0.4rem !important; border-bottom: 1px solid #cbd5e1 !important; padding-bottom: 0.2rem !important; }
   #rw-print table { width: 100% !important; border-collapse: collapse !important; font-size: 9.5pt !important; margin: 0.45rem 0 !important; }
   #rw-print table th, #rw-print table td { border: 1px solid #cbd5e1 !important; padding: 6px 9px !important; text-align: left !important; }
   #rw-print table th { background-color: #f8fafc !important; font-weight: 600 !important; width: 55% !important; color: #334155 !important; }
   #rw-print .rw-print__formula { font-family: ui-monospace, monospace !important; background-color: #f1f5f9 !important; border: 1px solid #cbd5e1 !important; border-left: 3px solid #61A3BA !important; padding: 0.45rem 0.7rem !important; font-size: 9pt !important; margin: 0.4rem 0 !important; }
   #rw-print .rw-print__verdict { font-size: 10.5pt !important; font-weight: 700 !important; padding: 0.55rem 0.85rem !important; border-radius: 4px !important; margin: 0.5rem 0 !important; }
   #rw-print .rw-print__verdict--ok { background-color: #ecfdf5 !important; border: 1px solid #10b981 !important; color: #065f46 !important; }
   #rw-print .rw-print__verdict--warn { background-color: #fffbeb !important; border: 1px solid #f59e0b !important; color: #92400e !important; }
   #rw-print .rw-print__note { font-size: 9pt !important; color: #64748b !important; border-top: 1px solid #e2e8f0 !important; padding-top: 0.5rem !important; margin-top: 0.9rem !important; }
}