.rp-e02-tool{margin:1.4rem 0;padding:1rem;border:1px solid #4b697b;background:#102c37;color:#f3fafb;border-radius:14px;min-width:0;max-width:100%}
.rp-e02-tool h3{color:#fff;margin:0 0 12px}
.rp-e02-tool form{display:grid;gap:10px}
.rp-e02-tool .rp-e02-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:10px;min-width:0}
.rp-e02-tool label{display:flex;flex-direction:column;gap:5px;color:#dbe8ef;font-size:14px;font-weight:600;min-width:0}
.rp-e02-tool textarea,.rp-e02-tool input{box-sizing:border-box;min-width:0;width:100%;background:#f3fafc;color:#10232a;border:1px solid #8cb0be;border-radius:7px;padding:10px;font:inherit}
.rp-e02-tool textarea{resize:vertical}
.rp-e02-tool button{justify-self:start;border:0;background:#b1f5dc;color:#102c37;font:inherit;font-weight:700;padding:11px 16px;border-radius:8px;cursor:pointer}
.rp-e02-tool button:focus-visible,.rp-e02-tool textarea:focus-visible,.rp-e02-tool input:focus-visible{outline:3px solid #ffc86b;outline-offset:2px}
.rp-e02-tool output{display:block;margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere;color:#f3fafb}
.rp-e02-results{min-width:0;max-width:100%;overflow:auto}
.rp-e02-results td{overflow-wrap:anywhere}
.rp-e02-research table{display:block;max-width:100%;overflow-x:auto}
.rp-e02-research th,.rp-e02-research td{padding:.45rem .65rem;vertical-align:top}
.rp-e02-research caption{text-align:left;padding:.4rem;white-space:normal}
.rp-e02-research pre{overflow-x:auto;max-width:100%}
.rp-e02-research .rp-e02-sources{border-top:1px solid #537b88;padding-top:12px;margin-top:20px;font-size:.94rem}
/* Keep mobile tables readable; contain horizontal scrolling inside results only. */
.rp-e02-results table{display:table;min-width:360px;table-layout:auto;border-collapse:collapse}
.rp-e02-results th,.rp-e02-results td{font-size:.87rem;text-align:left;white-space:normal;overflow-wrap:normal;padding:8px}
.rp-e02-results td:first-child{min-width:135px;overflow-wrap:anywhere}
.rp-e02-results th:not(:first-child),.rp-e02-results td:not(:first-child){white-space:nowrap}
@media(max-width:767px){
 .category-page--enhanced:has(.rp-e02-research){padding:10px}
 .category-page--enhanced:has(.rp-e02-research) .category-hero{padding:10px}
 .category-page--enhanced .category-intro:has(.rp-e02-research){padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none}
 .rp-e02-tool{padding:12px}
}

/* RankProof research tools — responsive results, scoped to research content. */
.rp-e01-tool,.rp-e02-tool{
 --rp-ink:#142a3b;--rp-muted:#526a7d;--rp-line:#d8e6ed;--rp-accent:#0d766e;
 box-sizing:border-box;position:relative;min-width:0;max-width:100%;padding:clamp(14px,2.6vw,24px);
 margin:26px 0;background:linear-gradient(145deg,#f8fcff,#eff8fa);color:var(--rp-ink);
 border:1px solid #b9d9e1;border-radius:18px;box-shadow:0 12px 32px #102c3716;
}
.rp-e01-tool *,.rp-e02-tool *{box-sizing:border-box}
.rp-e01-tool h3,.rp-e02-tool h3{font-size:clamp(18px,2.2vw,24px);line-height:1.25;margin:8px 0 6px;color:var(--rp-ink)}
.rp-tool-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:0 0 4px}
.rp-tool-eyebrow{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#0d766e}
.rp-tool-source{display:inline-flex;align-items:center;gap:6px;background:#dceef0;color:#125b60;padding:4px 9px;font-size:11px;font-weight:750;border-radius:20px;line-height:1.3}
.rp-tool-source[data-state="custom"]{background:#e4eaf6;color:#2a4e88}
.rp-tool-desc{font-size:13px;line-height:1.55;color:var(--rp-muted);margin:8px 0 18px}
.rp-e01-tool form,.rp-e02-tool form{display:grid;gap:12px;align-items:end;padding:14px;background:#fff;border:1px solid var(--rp-line);border-radius:12px}
.rp-e01-tool .rp-e01-form,.rp-e02-tool .rp-e02-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));display:grid;gap:12px}
.rp-e01-tool label,.rp-e02-tool label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px;color:#274455;font-weight:700}
.rp-e01-tool input,.rp-e01-tool textarea,.rp-e02-tool input,.rp-e02-tool textarea{width:100%;min-width:0;background:#f8fbfd;color:#142a3b;border:1px solid #b7ccd8;border-radius:8px;padding:10px;line-height:1.45;font:inherit;font-weight:500}
.rp-e01-tool textarea,.rp-e02-tool textarea{font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;resize:vertical;min-height:108px;margin:0}
.rp-e01-tool button,.rp-e02-tool button{display:inline-flex;align-items:center;justify-content:center;gap:7px;justify-self:start;width:auto;padding:10px 16px;background:#0b7169;color:#fff;border:1px solid #0b7169;border-radius:9px;font:inherit;font-size:13px;font-weight:750;line-height:1.4;cursor:pointer;white-space:normal}
.rp-e01-tool button:hover,.rp-e02-tool button:hover{background:#075750}
.rp-e01-tool .rp-tool-secondary,.rp-e02-tool .rp-tool-secondary{background:#fff;color:#0b7169;border:1px solid #9fc8c7}
.rp-e01-tool .rp-tool-secondary:hover,.rp-e02-tool .rp-tool-secondary:hover{background:#e7f5f3}
.rp-tool-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.rp-e01-tool output,.rp-e02-tool output{display:block;color:#284657;white-space:normal;overflow-wrap:anywhere;margin:14px 0 0;font-size:13px;line-height:1.55}
.rp-tool-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr));gap:9px}
.rp-tool-kpi{min-width:0;border:1px solid var(--rp-line);border-radius:11px;background:white;padding:12px 11px;position:relative}
.rp-tool-kpi small{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:750;color:#526a7d;line-height:1.3;margin-bottom:6px}
.rp-tool-kpi strong{display:block;color:#163f50;font-size:clamp(20px,2.5vw,29px);font-variant-numeric:tabular-nums;font-weight:800;line-height:1.1;overflow-wrap:anywhere}
.rp-tool-kpi[data-tone="warn"] strong{color:#a34819}
.rp-tool-kpi[data-tone="good"] strong{color:#0b7169}
.rp-tool-explain{margin:10px 0 0!important;background:#e1f0f2;border-left:3px solid #0d766e;border-radius:0 8px 8px 0;padding:10px 12px;color:#284657;font-size:13px;white-space:pre-wrap}
.rp-e01-tool output[data-error],.rp-e02-tool output[data-error]{background:#fff0eb;color:#a33b20;padding:12px;border-radius:8px;border:1px solid #f7bcaa}
.rp-e01-results,.rp-e02-results,.rp-tool-table-wrap{max-width:100%;min-width:0;overflow:auto;border-radius:10px}
.rp-e01-results table,.rp-e02-results table,.rp-tool-table-wrap table{display:table;width:100%;min-width:330px;margin:14px 0 0!important;border-collapse:separate;border-spacing:0;border:1px solid #d8e6ed;border-radius:10px;background:#fff;font-size:12px;color:#183548;overflow:hidden}
.rp-e01-results table th,.rp-e02-results table th,.rp-tool-table-wrap th{background:#e2edf3;color:#284657;font-weight:750;text-align:left;font-size:11px;letter-spacing:.02em;white-space:normal}
.rp-e01-results table td,.rp-e02-results table td,.rp-tool-table-wrap td{background:#fff;color:#183548;white-space:normal;overflow-wrap:anywhere}
.rp-e01-results table td,.rp-e01-results table th,.rp-e02-results table td,.rp-e02-results table th,.rp-tool-table-wrap th,.rp-tool-table-wrap td{border:0;border-bottom:1px solid #e3edf2;padding:10px;vertical-align:top}
.rp-e01-results tbody tr:nth-child(even) td,.rp-e02-results tbody tr:nth-child(even) td,.rp-tool-table-wrap tbody tr:nth-child(even) td{background:#f6fafc}
.rp-e01-results caption,.rp-e02-results caption,.rp-tool-table-wrap caption{color:#526a7d;font-weight:750;text-align:left;padding:10px 0 5px}
.rp-tool-status{font-size:12px;margin:10px 0 0;color:#526a7d}
.rp-tool-bar{height:6px;background:#e4edf2;border-radius:9px;margin-top:10px;overflow:hidden}
.rp-tool-bar span{display:block;background:#159487;height:100%;border-radius:9px}
@media(max-width:767px){.rp-e01-tool,.rp-e02-tool{padding:13px;border-radius:13px}.rp-e01-tool form,.rp-e02-tool form{padding:11px}.rp-tool-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.rp-tool-kpi{padding:10px 8px}.rp-tool-actions button{flex:1}.rp-e02-results td:first-child{min-width:95px}}
.rp-tool-chart{padding:12px 14px;background:#fff;border:1px solid var(--rp-line);border-radius:11px;margin-top:10px}
.rp-tool-chart-title{font-size:12px;font-weight:750;color:#284657;margin-bottom:10px}
.rp-tool-chart-row{display:grid;grid-template-columns:minmax(75px,110px) minmax(20px,1fr) minmax(38px,auto);align-items:center;gap:10px;margin:7px 0;font-size:12px;color:#284657}
.rp-tool-chart-row strong{font-size:12px;text-align:right;font-variant-numeric:tabular-nums}
.rp-tool-chart-track{background:#e4edf2;border-radius:6px;height:10px;overflow:hidden}
.rp-tool-chart-track span{height:100%;display:block;background:linear-gradient(90deg,#0e766e,#3aad9b);border-radius:6px}
.rp-e02-results{overflow:visible}
.rp-tool-table-wrap table[data-wide]{min-width:580px}
.rp-e02-results .rp-tool-table-wrap table{margin-top:0!important}
.rp-e02-results .rp-tool-table-wrap{margin-top:12px}
.rp-tool-table-wrap td:first-child{min-width:130px}
.rp-tool-table-wrap:focus-visible{outline:2px solid #0d766e;outline-offset:2px}
.rp-e01-tool,.rp-e02-tool{scroll-margin-top:100px}
@media(max-width:767px){.rp-tool-table-wrap::before{content:"Таблиця: прокрутіть праворуч →";display:block;font-size:11px;color:#526a7d;padding:7px 0}}
/* The existing dark article theme sets paragraph text to white with !important. */
.rp-e01-tool .rp-tool-desc,.rp-e02-tool .rp-tool-desc,.rp-e01-tool .rp-tool-status,.rp-e02-tool .rp-tool-status{color:#526a7d!important}
.rp-e01-tool .rp-tool-explain,.rp-e02-tool .rp-tool-explain{color:#284657!important}
.rp-e01-tool .rp-tool-table-wrap:has(+[data-rp-csv]) table,.rp-e02-tool .rp-tool-table-wrap:has(+[data-rp-csv]) table{min-width:880px}
.rp-tool-table-wrap td{word-break:normal}

.rp-case-r04{background:linear-gradient(145deg,#101e35,#1c3850);border:1px solid #385b78;border-radius:20px;color:#eef8ff;padding:clamp(16px,3vw,28px);margin:24px 0;box-shadow:0 18px 34px #071c352e;min-width:0;max-width:100%;box-sizing:border-box}.rp-case-r04 h3{color:#fff!important;font-size:clamp(20px,2.4vw,29px);line-height:1.2;margin:12px 0}.rp-case-r04 p{color:#d9e8f5!important;font-size:14px;line-height:1.65}.rp-case-top{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:10px;font-weight:800;letter-spacing:.12em;color:#8fe5db}.rp-case-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr));gap:10px;margin:15px 0}.rp-case-metrics div{background:#263f56;border:1px solid #426680;border-radius:12px;padding:12px;color:#fff}.rp-case-metrics small{display:block;color:#a5ccdf;font-size:12px;font-weight:700}.rp-case-metrics strong{display:block;font-size:27px;line-height:1.35;color:#9bf3dc}.rp-case-r04 a{color:#8fe5db!important;text-decoration:underline}.rp-case-r04 .rp-tool-table-wrap{overflow:auto}.rp-case-r04 table{display:table!important;min-width:520px;width:100%;background:#fff;color:#142a3b;border-collapse:collapse}.rp-case-r04 td,.rp-case-r04 th{padding:9px;color:#142a3b!important;background:#f4f9fc;border:1px solid #cfdfeb;font-size:12px}.rp-case-r04 th{background:#cbdfe9}.rp-case-r04 caption{color:#d9e8f5!important}.rp-case-note{padding:11px 14px;border-left:3px solid #8fe5db;background:#26465c;border-radius:0 8px 8px 0}.rp-tool-table-wrap table[data-wide]{min-width:660px}