
.r4-page{
  width:min(1460px,calc(100% - 48px));
  margin:0 auto;
  padding:42px 0 72px;
  color:#e9f4ff;
}

.r4-page *{
  box-sizing:border-box;
}

.r4-hero{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(320px,.75fr);
  gap:22px;
  margin-bottom:22px;
}

.r4-hero-copy,
.r4-hero-side,
.r4-controls,
.r4-stat,
.r4-section,
.r4-table-card,
.r4-panel,
.r4-method{
  background:
    linear-gradient(145deg,rgba(14,35,55,.94),rgba(7,20,34,.97));
  border:1px solid rgba(90,142,184,.24);
  box-shadow:
    0 22px 55px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.025);
}

.r4-hero-copy{
  position:relative;
  overflow:hidden;
  padding:48px;
  border-radius:22px;
}

.r4-hero-copy:after{
  content:"";
  position:absolute;
  width:420px;
  height:420px;
  right:-190px;
  top:-210px;
  border-radius:50%;
  background:rgba(25,216,213,.08);
  filter:blur(18px);
  pointer-events:none;
}

.r4-kicker{
  margin-bottom:12px;
  color:#68e6e0;
  font-size:11px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.13em;
}

.r4-hero h1{
  max-width:820px;
  margin:0;
  font-size:clamp(38px,4.7vw,68px);
  line-height:1.02;
  letter-spacing:-.045em;
}

.r4-hero h1 span{
  color:#75ebe5;
}

.r4-hero-copy>p{
  max-width:820px;
  margin:22px 0 0;
  color:#a8bdd1;
  font-size:17px;
  line-height:1.7;
}

.r4-trust-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:30px;
}

.r4-trust-row span{
  padding:8px 11px;
  border:1px solid rgba(87,155,193,.22);
  border-radius:999px;
  background:rgba(7,21,34,.5);
  color:#a9c5d9;
  font-size:12px;
}

.r4-hero-side{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:30px;
  border-radius:22px;
}

.r4-live-label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#8ba4ba;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
}

.r4-live-label i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#37e693;
  box-shadow:0 0 14px rgba(55,230,147,.7);
}

.r4-hero-score{
  margin-top:20px;
  color:#7cf0e8;
  font-size:64px;
  line-height:1;
  font-weight:800;
  letter-spacing:-.055em;
}

.r4-hero-score:after{
  content:"%";
  margin-left:5px;
  font-size:20px;
  color:#718ba3;
}

.r4-hero-provider{
  margin-top:13px;
  font-size:22px;
  font-weight:800;
}

.r4-hero-protocol{
  margin-top:5px;
  color:#8fa9bd;
  font-size:13px;
}

.r4-mini-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:26px;
}

.r4-mini-grid>div{
  padding:13px;
  background:#071724;
  border:1px solid rgba(82,130,164,.18);
  border-radius:11px;
}

.r4-mini-grid small{
  display:block;
  margin-bottom:6px;
  color:#6f8ca3;
  font-size:10px;
}

.r4-mini-grid strong{
  font-size:13px;
}

.r4-controls{
  display:grid;
  grid-template-columns:
    minmax(220px,1.35fr)
    repeat(3,minmax(150px,.75fr))
    auto;
  gap:12px;
  align-items:end;
  padding:18px;
  border-radius:16px;
}

.r4-control{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.r4-control label{
  color:#87a1b7;
  font-size:11px;
  font-weight:700;
}

.r4-control small{
  color:#58728a;
  font-size:10px;
}

.r4-control select{
  width:100%;
  min-height:44px;
  padding:0 38px 0 13px;
  border:1px solid #1f3d56;
  border-radius:9px;
  outline:none;
  background:#071724;
  color:#e5f2fc;
  font:inherit;
}

.r4-control select:focus{
  border-color:#39dcd6;
  box-shadow:0 0 0 3px rgba(57,220,214,.08);
}

.r4-update{
  min-height:44px;
  padding:0 19px;
  border:1px solid rgba(67,230,221,.5);
  border-radius:9px;
  background:
    linear-gradient(180deg,#153e54,#102f43);
  color:#c8fffb;
  font-weight:800;
  cursor:pointer;
}

.r4-update:hover{
  border-color:#5af0e7;
  transform:translateY(-1px);
}

.r4-update:disabled{
  opacity:.6;
  cursor:wait;
  transform:none;
}

.r4-warning{
  margin-top:15px;
  padding:14px 16px;
  border:1px solid rgba(255,179,71,.35);
  border-radius:11px;
  background:rgba(106,65,16,.22);
  color:#ffd99d;
}

.r4-status-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin:16px 0 24px;
}

.r4-stat{
  min-height:125px;
  padding:20px;
  border-radius:15px;
}

.r4-stat small{
  color:#7590a7;
  font-size:11px;
}

.r4-stat strong{
  display:block;
  margin:8px 0 7px;
  font-size:25px;
  letter-spacing:-.025em;
}

.r4-stat span{
  color:#607d94;
  font-size:11px;
  line-height:1.5;
}

.status-ready{
  color:#52efa2;
}

.status-withheld{
  color:#ffc465;
}

.r4-section,
.r4-table-card,
.r4-panel,
.r4-method{
  margin-top:18px;
  border-radius:18px;
}

.r4-section{
  padding:25px;
}

.r4-section-head{
  display:flex;
  justify-content:space-between;
  gap:25px;
  align-items:flex-start;
  margin-bottom:21px;
}

.r4-section-head h2,
.r4-panel h2{
  margin:0;
  font-size:22px;
  letter-spacing:-.025em;
}

.r4-section-head p,
.r4-panel>p{
  max-width:760px;
  margin:8px 0 0;
  color:#7895aa;
  font-size:13px;
  line-height:1.55;
}

.r4-qc-pill{
  flex:0 0 auto;
  padding:7px 10px;
  border:1px solid rgba(66,227,157,.28);
  border-radius:999px;
  background:rgba(28,112,76,.17);
  color:#65efac;
  font-size:10px;
  font-weight:800;
  letter-spacing:.05em;
}

.r4-leaders{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:13px;
}

.r4-leader{
  position:relative;
  min-height:205px;
  padding:22px;
  overflow:hidden;
  border:1px solid #1d3a51;
  border-radius:15px;
  background:
    radial-gradient(circle at 100% 0,rgba(55,218,210,.11),transparent 42%),
    #081927;
}

.r4-leader:first-child{
  border-color:rgba(79,230,218,.45);
}

.r4-rank-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  background:#102d40;
  color:#77ebe4;
  font-weight:900;
}

.r4-leader-provider{
  margin-top:17px;
  font-size:20px;
  font-weight:800;
}

.r4-leader-protocol{
  margin-top:4px;
  color:#7895ab;
  font-size:12px;
}

.r4-leader-score{
  margin-top:18px;
  font-size:34px;
  font-weight:900;
  letter-spacing:-.04em;
  color:#dffdfa;
}

.r4-leader-score small{
  margin-left:4px;
  color:#6e8aa1;
  font-size:12px;
  font-weight:500;
}

.r4-leader-metrics{
  display:flex;
  flex-wrap:wrap;
  gap:8px 15px;
  margin-top:13px;
  color:#7f9bad;
  font-size:11px;
}

.r4-leader-placeholder{
  grid-column:1/-1;
  padding:26px;
  border:1px dashed #25465d;
  border-radius:13px;
  color:#6f8ba0;
}

.r4-table-card{
  padding:25px;
}

.r4-table-scroll{
  overflow:auto;
}

.r4-table{
  width:100%;
  border-collapse:collapse;
  min-width:980px;
}

.r4-table th{
  padding:11px 12px;
  border-bottom:1px solid #1b374c;
  color:#6f8ca3;
  text-align:left;
  font-size:10px;
  font-weight:800;
  letter-spacing:.055em;
  text-transform:uppercase;
}

.r4-table td{
  padding:15px 12px;
  border-bottom:1px solid rgba(37,66,86,.55);
  color:#adc0d0;
  font-size:13px;
}

.r4-table tbody tr:hover{
  background:rgba(25,66,89,.14);
}

.r4-rank-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:27px;
  padding:0 8px;
  border-radius:8px;
  background:#0d293c;
  color:#67e5de;
  font-weight:900;
}

.r4-score{
  color:#77ece4;
  font-size:16px;
  font-weight:900;
}

.r4-score small{
  color:#617b91;
  font-size:10px;
}

.r4-raw-note{
  display:block;
  margin-top:3px;
  color:#607c92;
  font-size:9px;
}

.r4-confidence{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
}

.confidence-high{
  background:rgba(38,139,92,.18);
  color:#59e99f;
}

.confidence-moderate{
  background:rgba(176,126,26,.18);
  color:#ffd16d;
}

.confidence-low,
.confidence-none{
  background:rgba(116,78,48,.18);
  color:#d6a876;
}

.r4-empty{
  padding:28px !important;
  text-align:center !important;
  color:#708ba0 !important;
}

.r4-two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.r4-panel{
  padding:25px;
}

.r4-destination-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:19px;
}

.r4-destination-chip{
  padding:7px 10px;
  border:1px solid #1e3c53;
  border-radius:999px;
  background:#081927;
  color:#9eb4c5;
  font-size:11px;
}

.r4-excluded-row{
  display:grid;
  gap:5px;
  margin-top:12px;
  padding:13px;
  border:1px solid #1a354a;
  border-radius:10px;
  background:#081824;
}

.r4-excluded-row b{
  font-size:12px;
}

.r4-excluded-row span,
.r4-excluded-row small{
  color:#718ca1;
  font-size:10px;
}

.r4-muted{
  color:#668399;
  font-size:12px;
}

.r4-method{
  padding:25px;
}

.r4-method .r4-section-head a{
  color:#72e9e2;
  text-decoration:none;
  font-size:12px;
}

.r4-method-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}

.r4-method-grid article{
  padding:17px;
  border:1px solid #1a364b;
  border-radius:12px;
  background:#081927;
}

.r4-method-grid article>span{
  color:#51dcd7;
  font-size:10px;
  font-weight:900;
}

.r4-method-grid h3{
  margin:11px 0 7px;
  font-size:14px;
}

.r4-method-grid p{
  margin:0;
  color:#7692a7;
  font-size:11px;
  line-height:1.6;
}


@media(max-width:1100px){

  .r4-hero{
    grid-template-columns:1fr;
  }

  .r4-controls{
    grid-template-columns:1fr 1fr;
  }

  .r4-update{
    grid-column:1/-1;
  }

  .r4-status-grid{
    grid-template-columns:1fr 1fr;
  }

  .r4-method-grid{
    grid-template-columns:1fr 1fr;
  }

}


@media(max-width:720px){

  .r4-page{
    width:min(100% - 24px,1460px);
    padding-top:20px;
  }

  .r4-hero-copy{
    padding:27px 22px;
  }

  .r4-hero-side{
    padding:22px;
  }

  .r4-hero h1{
    font-size:38px;
  }

  .r4-controls,
  .r4-status-grid,
  .r4-leaders,
  .r4-two-col,
  .r4-method-grid{
    grid-template-columns:1fr;
  }

  .r4-update{
    grid-column:auto;
  }

  .r4-section-head{
    display:block;
  }

  .r4-qc-pill{
    display:inline-flex;
    margin-top:12px;
  }

  .r4-mini-grid{
    grid-template-columns:1fr;
  }

}


/* ===== Rankings header fix v4.8.1 ===== */

.topbar{
  min-height:74px;
  display:flex;
  align-items:center;
  gap:28px;
  padding:0 28px;
}

.topbar .brand{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:11px;
  min-width:210px;
  text-decoration:none;
}

.topbar .brand-mark-wrap{
  flex:0 0 42px;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:11px;
}

.topbar .brand-mark{
  display:block;
  width:42px !important;
  height:42px !important;
  max-width:42px !important;
  object-fit:cover;
}

.topbar .brand > span:last-child{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.topbar .brand b{
  font-size:16px;
  white-space:nowrap;
}

.topbar .brand small{
  margin-top:4px;
  font-size:9px;
  white-space:nowrap;
}

.topbar .nav{
  flex:1 1 auto;
  display:flex;
  align-items:stretch;
  justify-content:center;
  min-width:0;
}

.topbar .worker-health{
  flex:0 0 auto;
  min-width:170px;
  max-width:220px;
  text-align:right;
}

.topbar .worker-health small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media(max-width:1100px){
  .topbar{
    gap:14px;
    padding-left:18px;
    padding-right:18px;
  }

  .topbar .brand{
    min-width:auto;
  }

  .topbar .brand small{
    display:none;
  }

  .topbar .worker-health{
    display:none;
  }
}

@media(max-width:760px){
  .topbar{
    min-height:auto;
    align-items:flex-start;
  }

  .topbar .brand-mark-wrap,
  .topbar .brand-mark{
    width:36px !important;
    height:36px !important;
    max-width:36px !important;
  }
}


/* Rankings polish v4.8.2 */

.r4-leaders{
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
}

.r4-excluded-row span{
  font-size:11px;
}

.r4-excluded-row small{
  font-size:10.5px;
  line-height:1.45;
}

.topbar .worker-health{
  min-width:205px;
}

.topbar .worker-health small{
  max-width:205px;
  overflow:hidden;
  text-overflow:ellipsis;
}
