/* ============================================================
   AIKraft — Ratings hub (/ratings)
   Light shell. Relies on tokens.css + styles.css.
   ============================================================ */

/* breadcrumb */
.rt-top { padding: 18px 0 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.crumbs a:hover { color: var(--text-2); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--text-2); }

/* hero */
.rt-hero { padding: 24px 0 28px; }
.rt-hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.rt-hero h1 { font-size: 34px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.rt-hero .lede { font-size: 16px; color: var(--text-2); margin: 10px 0 0; max-width: 64ch; line-height: 1.55; }
.rt-hero .lede b { color: var(--text); font-weight: 500; }
.updated-plaque {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); font-family: var(--font-mono);
}
.updated-plaque .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.updated-plaque b { color: var(--text); font-weight: 500; }

/* section scaffold */
.rt-sec { padding: 8px 0 36px; }
.rt-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rt-sec-head h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 0; }
.rt-sec-head .note { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

/* ---------- TOP-3 leader cards ---------- */
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.leader {
  position: relative; display: block;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 20px;
  transition: border .15s, transform .15s, box-shadow .15s;
  overflow: hidden;
}
.leader:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.leader.first { border-color: var(--accent-border); background: linear-gradient(160deg, var(--accent-soft), transparent 55%), var(--bg-elev); }
.leader-rank {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-mono); font-size: 40px; font-weight: 700;
  color: var(--border-strong); line-height: 1; letter-spacing: -.04em;
}
.leader.first .leader-rank { color: var(--accent); opacity: .9; }
.leader-id { display: flex; align-items: center; gap: 12px; }
.leader-id .logo { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); }
.leader-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.leader-dev { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.leader-score { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.leader-score .v { font-family: var(--font-mono); font-size: 40px; font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--text); }
.leader.first .leader-score .v { color: var(--accent); }
.leader-score .unit { font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.leader-delta { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; margin-left: auto; }
.leader-delta.up { color: var(--green); }
.leader-delta.down { color: var(--red); }
.leader-delta.flat { color: var(--text-3); }
.leader-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.leader-foot .go { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 500; }
.leader:hover .leader-foot .go { gap: 8px; }

/* ---------- category cards ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rcat {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 18px;
  transition: border .15s, transform .15s, box-shadow .15s;
}
.rcat:not(.soon):hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rcat-top { display: flex; align-items: flex-start; gap: 12px; }
.rcat-ico {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.rcat-ico svg { width: 20px; height: 20px; }
.rcat-tt { flex: 1; min-width: 0; }
.rcat-tt h3 { font-size: 15.5px; font-weight: 600; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.rcat-tt .slug { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); margin-top: 2px; }
.rcat-desc { font-size: 13px; color: var(--text-2); line-height: 1.45; margin: 0; }
.rcat-leader {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px;
}
.rcat-leader .lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.rcat-leader .mini { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 9px; }
.rcat-leader .lname { font-size: 13px; font-weight: 500; }
.rcat-leader .lscore { margin-left: auto; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); }

/* "soon" category (Phase 2) */
.rcat.soon { opacity: .72; }
.rcat.soon .rcat-ico { background: var(--bg-elev-2); color: var(--text-mute); }
.rcat.soon .rcat-leader { color: var(--text-mute); }

/* ---------- methodology ---------- */
.method-card {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 24px 26px;
}
.method-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }
.method-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 0 0 14px; }
.method-card .badges { display: flex; flex-direction: column; gap: 12px; }
.tbadge-row { display: flex; align-items: flex-start; gap: 12px; }
.tbadge {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  height: 22px; padding: 0 9px; border-radius: 6px; margin-top: 1px;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.tbadge .d { width: 5px; height: 5px; border-radius: 50%; }
.tbadge.verified { background: var(--green-soft); color: var(--green); }
.tbadge.verified .d { background: var(--green); }
.tbadge.provisional { background: var(--amber-soft); color: var(--amber); }
.tbadge.provisional .d { background: var(--amber); }
.tbadge-row .ex { font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.tbadge-row .ex b { color: var(--text); font-weight: 500; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .method-card { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .rt-hero-row { flex-direction: column; }
  .rt-hero h1 { font-size: 27px; }
  /* top-3: horizontal scroll, no mobile meat-grinder */
  .leaders {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -24px; padding: 4px 24px 12px; gap: 12px;
    scrollbar-width: none;
  }
  .leaders::-webkit-scrollbar { display: none; }
  .leader { scroll-snap-align: start; }
  .cat-cards { grid-template-columns: 1fr; }
}
