/* Інтерактивні інструменти DAHSERVICE: калькулятор даху, перевірка єВідновлення.
   Бренд: navy #0C2340, orange #F38118 (текстові посилання #D96F0F — контраст AA на білому). */
:root { --rc-navy: #0C2340; --rc-orange: #F38118; --rc-link: #D96F0F; --rc-line: #E2E8F0; --rc-muted: #64748B; --rc-text: #334155; }

.rc-h1 { font-size: clamp(24px, 4vw, 38px); line-height: 1.15; margin: 0 0 8px; }
.rc-lead { font-size: 17px; line-height: 1.55; color: var(--rc-muted); max-width: 720px; margin: 0; }
.rc-p { font-size: 16px; line-height: 1.65; color: var(--rc-text); }
.rc-p a, .rc-card a, .rc-hint a { color: var(--rc-link); }
.rc-accent { color: var(--rc-link); }
.rc-h2 { font-family: inherit; font-weight: 800; font-size: 17px; color: var(--rc-navy); margin: 0 0 8px; }

.rc-grid { display: grid; gap: 22px; }
@media (min-width: 1024px) {
  .rc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .rc-results { position: sticky; top: 88px; }
}

.rc-card { background: #fff; border: 1px solid var(--rc-line); border-radius: 18px; padding: 22px; box-shadow: 0 1px 8px rgba(12, 35, 64, .06); }
.rc-card--flat { box-shadow: none; padding: 16px 18px; margin-bottom: 14px; font-size: 15px; line-height: 1.55; color: var(--rc-text); }
.rc-card--dashed { box-shadow: none; border-style: dashed; border-color: #CBD5E1; }

.rc-q { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.rc-q legend { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--rc-navy); margin-bottom: 10px; padding: 0; }
.rc-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #FFF1E3; color: var(--rc-link); font-size: 12px; font-weight: 800; flex-shrink: 0; }
.rc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-stack { display: grid; gap: 8px; }

.rc-shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-opt { position: relative; cursor: pointer; }
.rc-opt input { position: absolute; opacity: 0; }
.rc-opt span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 2px solid var(--rc-line); border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--rc-navy); text-align: center; min-height: 76px; justify-content: center; transition: border-color .15s, background .15s; }
.rc-opt:hover span { border-color: #FBD3A9; }
.rc-opt input:checked + span { border-color: var(--rc-orange); background: #FFF7ED; }
.rc-opt input:focus-visible + span { outline: 2px solid var(--rc-navy); outline-offset: 2px; }

.rc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: #475569; }
.rc-unit { position: relative; display: block; }
.rc-unit input { width: 100%; padding: 12px 34px 12px 12px; border: 1px solid #CBD5E1; border-radius: 10px; font-size: 16px; color: var(--rc-navy); font-weight: 600; background: #fff; }
.rc-unit i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: #94A3B8; font-size: 14px; pointer-events: none; }
.rc-unit input:focus, .rc-select:focus { outline: none; border-color: var(--rc-orange); box-shadow: 0 0 0 3px rgba(243, 129, 24, .2); }
.rc-unit input[aria-invalid="true"] { border-color: #F59E0B; background: #FFFBEB; }
.rc-err { color: #B45309; font-size: 12px; font-weight: 500; }
.rc-select { width: 100%; padding: 12px; border: 1px solid #CBD5E1; border-radius: 10px; font-size: 16px; color: var(--rc-navy); font-weight: 600; background: #fff; }

.rc-more { margin-top: 12px; border-top: 1px dashed var(--rc-line); padding-top: 10px; }
.rc-more summary { cursor: pointer; font-size: 14px; color: var(--rc-text); list-style: none; }
.rc-more summary::-webkit-details-marker { display: none; }
.rc-link { color: var(--rc-link); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.rc-more[open] summary .rc-link { display: none; }
.rc-hint { font-size: 13px; color: var(--rc-muted); line-height: 1.5; margin: 8px 0; }

.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rc-chip { border: 1px solid #CBD5E1; background: #fff; color: var(--rc-navy); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 40px; }
.rc-chip[aria-pressed="true"] { border-color: var(--rc-orange); background: #FFF7ED; color: #9A3412; }
#rc-slope { width: 100%; accent-color: var(--rc-orange); height: 28px; }

.rc-radio { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--rc-navy); padding: 12px 14px; border: 1px solid var(--rc-line); border-radius: 12px; cursor: pointer; min-height: 48px; transition: border-color .15s, background .15s; }
.rc-radio:hover { border-color: #FBD3A9; }
.rc-radio:has(input:checked) { border-color: var(--rc-orange); background: #FFF7ED; }
.rc-radio input { accent-color: var(--rc-orange); flex-shrink: 0; width: 18px; height: 18px; }

.rc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-kpi { background: #fff; border: 1px solid var(--rc-line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.rc-kpi span { font-size: 12px; color: var(--rc-muted); font-weight: 600; }
.rc-kpi b { font-size: 22px; line-height: 1.2; color: var(--rc-navy); font-weight: 800; }
.rc-kpi--dark { grid-column: 1 / -1; background: var(--rc-navy); border-color: var(--rc-navy); }
.rc-kpi--dark span { color: #94A3B8; }
.rc-kpi--dark b { color: var(--rc-orange); font-size: 30px; }

.rc-actions { display: grid; gap: 8px; }
.rc-btn { border: 0; border-radius: 12px; padding: 14px 16px; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 48px; font-family: inherit; }
.rc-btn--primary { background: #EA580C; color: #fff; box-shadow: 0 4px 14px rgba(243, 129, 24, .35); }
.rc-btn--primary:hover { background: #C2410C; }
.rc-btn--ghost { background: #fff; color: var(--rc-navy); border: 1px solid #CBD5E1; }
.rc-btn--ghost:hover { border-color: var(--rc-navy); }
.rc-btn--navy { background: var(--rc-navy); color: #fff; }
.rc-btn:focus-visible, .rc-chip:focus-visible { outline: 3px solid var(--rc-navy); outline-offset: 2px; }

.rc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rc-table td { padding: 9px 4px; border-bottom: 1px solid var(--rc-line); color: #475569; vertical-align: top; }
.rc-table td:last-child { text-align: right; font-weight: 700; color: var(--rc-navy); white-space: nowrap; padding-left: 10px; }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table small { display: block; font-size: 11px; color: #94A3B8; margin-top: 2px; }

.rc-warn { background: #FFF7ED; border: 1px solid #FDBA74; color: #9A3412; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; line-height: 1.5; }
.rc-code { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; border: 1px solid var(--rc-line); border-radius: 10px; padding: 10px; color: var(--rc-navy); background: #F8FAFC; }
.rc-embed-only { display: none; margin-top: 12px; font-size: 12px; color: var(--rc-muted); text-align: center; }

/* Липкий підсумок на мобільних: над нижньою панеллю дзвінків (вона є до 1024px) */
.rc-sticky { position: fixed; left: 10px; right: 10px; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 39; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--rc-navy); color: #fff; border: 0; border-radius: 14px; padding: 12px 16px; font-size: 15px; box-shadow: 0 8px 24px rgba(12, 35, 64, .35); font-family: inherit; cursor: pointer; text-align: left; }
.rc-sticky[hidden] { display: none; }
.rc-sticky .rc-accent { color: var(--rc-orange); }
.rc-sticky-go { font-size: 13px; color: #CBD5E1; white-space: nowrap; }
@media (min-width: 1024px) { .rc-sticky { display: none !important; } }

/* Перевірка єВідновлення */
.ev-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--rc-muted); margin-bottom: 16px; }
.ev-progress-bar { flex: 1; height: 6px; background: #F1F5F9; border-radius: 99px; overflow: hidden; }
.ev-progress-bar i { display: block; height: 100%; background: var(--rc-orange); width: 0; transition: width .2s; }
.ev-verdict { border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; border: 2px solid; }
.ev-verdict b { display: block; font-size: 18px; line-height: 1.3; }
.ev-verdict p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
.ev-ok { background: #ECFDF5; border-color: #10B981; color: #065F46; }
.ev-warn { background: #FFF7ED; border-color: var(--rc-orange); color: #9A3412; }
.ev-stop { background: #FEF2F2; border-color: #EF4444; color: #991B1B; }
.ev-wait { background: #F8FAFC; border-color: #CBD5E1; color: #475569; }
.ev-block ul, .ev-block ol { margin: 0; padding-left: 18px; }
.ev-block ul { list-style: disc; } .ev-block ol { list-style: decimal; }
.ev-block li { margin-bottom: 6px; }

/* Режим вбудовування на чужі сайти */
html.rc-embed header, html.rc-embed footer, html.rc-embed .rc-chrome, html.rc-embed .mobile-action-bar,
html.rc-embed .fixed, html.rc-embed .cookie-consent, html.rc-embed .rc-sticky { display: none !important; }
html.rc-embed .rc-embed-only { display: block !important; }
html.rc-embed body { background: #fff; }
html.rc-embed .rc-results { position: static; }

@media (prefers-reduced-motion: reduce) { .rc-opt span, .rc-radio, .ev-progress-bar i { transition: none; } }

/* На сторінках інструментів сайтова підказка FAB дублює сенс і перекриває липкий підсумок */
body:has(#rc-sticky) .qcm-fab-tooltip-mobile, body:has(#ev-sticky) .qcm-fab-tooltip-mobile,
body:has(#rc-sticky) .qcm-fab-tooltip, body:has(#ev-sticky) .qcm-fab-tooltip { display: none !important; }
