/* ═══════════════════════════════════════════════════════════════
   The Reading Room — past papers library layout
   Sticky sidebar + main pane; mobile = top drawer + chip ribbon
   ═══════════════════════════════════════════════════════════════ */

:root{
  --rr-sidebar-w: 260px;
  --rr-bg: #f6f7fb;
  --rr-surface: #ffffff;
  --rr-text-primary: #0f172a;
  --rr-text-secondary: #475569;
  --rr-text-tertiary: #94a3b8;
  --rr-border: rgba(15,23,42,.08);
  --rr-border-strong: rgba(15,23,42,.18);
  --rr-spring: cubic-bezier(.34,1.56,.64,1);
  --rr-ease: cubic-bezier(.4,0,.2,1);
}

.rr-shell{
  display: grid;
  grid-template-columns: var(--rr-sidebar-w) 1fr;
  min-height: calc(100vh - 56px);
  background: var(--rr-bg);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ───────── Sidebar ───────── */
.rr-side{
  position: sticky;
  top: 56px;
  align-self: start;
  height: calc(100vh - 56px);
  background: var(--rr-surface);
  border-right: 1px solid var(--rr-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rr-side-head{
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--rr-border);
}
.rr-side-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.rr-side-title{
  font-size: 14px;
  font-weight: 600;
  color: var(--rr-text-primary);
  letter-spacing: -.2px;
}
.rr-cmdk{
  padding: 3px 8px;
  background: var(--rr-bg);
  border: 1px solid var(--rr-border);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--rr-text-tertiary);
  letter-spacing: .3px;
}
.rr-side-sub{
  font-size: 11px;
  color: var(--rr-text-tertiary);
  margin-bottom: 10px;
}
.rr-side-sub strong{ color: var(--rr-text-secondary); font-weight: 600 }
.rr-filter{
  position: relative;
}
.rr-filter input{
  width: 100%;
  padding: 7px 10px 7px 30px;
  background: var(--rr-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--rr-text-primary);
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.rr-filter input::placeholder{ color: var(--rr-text-tertiary) }
.rr-filter input:focus{
  border-color: var(--rr-border-strong);
  background: var(--rr-surface);
}
.rr-filter svg{
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: var(--rr-text-tertiary);
  pointer-events: none;
}

.rr-recents{
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--rr-border);
}
.rr-recents.empty{ display: none }
.rr-section-label{
  font-size: 10px;
  font-weight: 700;
  color: var(--rr-text-tertiary);
  letter-spacing: .8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.rr-recent-item{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--rr-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease;
}
.rr-recent-item:hover{ color: var(--rr-text-primary) }
.rr-recent-dot{
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rr-recent-label{
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rr-side-list{
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
}
.rr-group-head{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--rr-text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.rr-group-head svg{
  width: 9px;
  height: 9px;
  transition: transform .25s var(--rr-ease);
}
.rr-group-head[data-open="false"] svg{ transform: rotate(-90deg) }
.rr-group-head[data-open="false"] + .rr-group-items{
  display: none;
}
.rr-group-items{ display: block }

/* Faculty accordion (level 2 inside an exam) */
.rr-fac-head{
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 6px 18px;
  font-size: 10px;
  font-weight: 700;
  color: var(--rr-text-secondary);
  letter-spacing: .8px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  margin: 2px 8px 0;
  transition: background .15s ease;
}
.rr-fac-head:hover{ background: rgba(15,23,42,.04) }
.rr-fac-head svg{
  width: 9px;
  height: 9px;
  color: var(--rr-text-tertiary);
  transition: transform .25s var(--rr-ease);
  flex-shrink: 0;
}
.rr-fac-head[data-open="false"] svg{ transform: rotate(-90deg) }
.rr-fac-label{ flex: 1 }
.rr-fac-count{
  font-size: 10px;
  font-weight: 600;
  color: var(--rr-text-tertiary);
  font-variant-numeric: tabular-nums;
}
.rr-fac-items{
  overflow: hidden;
  max-height: 600px;
  transition: max-height .35s var(--rr-ease);
}
.rr-fac-head[data-open="false"] + .rr-fac-items{
  max-height: 0;
}

.rr-side-item{
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 13px;
  font-size: 13px;
  color: var(--rr-text-primary);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-left-color .25s var(--rr-spring);
  position: relative;
}
.rr-side-item:hover{ background: rgba(15,23,42,.03) }
.rr-side-item.active{
  border-left-color: var(--subj-color, #2b4c7e);
  background: var(--subj-tint, rgba(43,76,126,.06));
  font-weight: 600;
}
.rr-side-item.active .rr-item-name{ color: var(--subj-deep, #1a3358) }
.rr-side-item.active .rr-item-count{ color: var(--subj-color, #2b4c7e) }
.rr-side-item.dim .rr-item-name{ color: var(--rr-text-tertiary) }
.rr-side-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subj-color, #94a3b8);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 var(--subj-color, transparent);
  transition: box-shadow .35s ease;
}
.rr-side-item.active .rr-side-dot{ box-shadow: 0 0 0 3px var(--subj-tint, rgba(0,0,0,.04)) }
.rr-item-name{
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rr-item-count{
  font-size: 11px;
  color: var(--rr-text-tertiary);
  font-variant-numeric: tabular-nums;
}
.rr-side-item.no-sols::after{
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rr-text-tertiary);
  opacity: .35;
  margin-left: 2px;
}

.rr-side-foot{
  padding: 10px 16px;
  border-top: 1px solid var(--rr-border);
  font-size: 11px;
  color: var(--rr-text-tertiary);
  display: flex;
  align-items: center;
  gap: 7px;
}
.rr-foot-pulse{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: rr-pulse 2.4s ease-in-out infinite;
}
@keyframes rr-pulse{
  0%,100%{ opacity:.4; transform: scale(1) }
  50%{ opacity:1; transform: scale(1.3) }
}

/* ───────── Main pane ───────── */
.rr-main{
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--rr-bg);
}
.rr-band{
  height: 6px;
  background: var(--subj-color, #2b4c7e);
  transition: background-color .35s var(--rr-ease);
}
.rr-hero{
  position: sticky;
  top: 56px;
  z-index: 5;
  background: var(--rr-surface);
  border-bottom: 1px solid var(--rr-border);
  padding: 18px 28px 16px;
}
.rr-hero-row{
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.rr-hero-icon{
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--subj-tint, rgba(43,76,126,.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  transition: background-color .35s var(--rr-ease);
}
.rr-hero-text{ flex: 1; min-width: 0 }
.rr-hero-title-row{
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.rr-hero-name{
  font-size: 19px;
  font-weight: 700;
  color: var(--rr-text-primary);
  letter-spacing: -.4px;
}
.rr-hero-badge{
  font-size: 10.5px;
  font-weight: 600;
  background: var(--subj-tint, rgba(43,76,126,.08));
  color: var(--subj-deep, #1a3358);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: .2px;
  transition: background-color .35s var(--rr-ease), color .35s var(--rr-ease);
}
.rr-hero-stats{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--rr-text-secondary);
  align-items: center;
}
.rr-stat strong{
  display: inline-block;
  font-weight: 700;
  font-size: 14px;
  color: var(--rr-text-primary);
  margin-right: 3px;
  font-variant-numeric: tabular-nums;
  transition: transform .4s var(--rr-spring);
}
.rr-stat.solutions strong{ color: var(--subj-color, var(--rr-text-primary)) }
.rr-stat-sep{ color: var(--rr-border-strong); font-size: 10px }

/* ───────── Body ───────── */
.rr-body{
  flex: 1;
  padding: 22px 28px 60px;
  overflow-y: visible;
}
.rr-section{
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(8px);
  animation: rr-fade-up .5s var(--rr-spring) forwards;
}
.rr-section[data-i="1"]{ animation-delay: 30ms }
.rr-section[data-i="2"]{ animation-delay: 75ms }
.rr-section[data-i="3"]{ animation-delay: 130ms }
.rr-section[data-i="4"]{ animation-delay: 180ms }
@keyframes rr-fade-up{
  to{ opacity: 1; transform: translateY(0) }
}

.rr-sec-head{
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 11px;
}
.rr-sec-mark{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rr-text-primary);
  letter-spacing: .2px;
}
.rr-sec-mark .star{ color: var(--subj-color, #f5a623); font-size: 14px; line-height: 1 }
.rr-sec-count{ font-size: 11px; color: var(--rr-text-tertiary); font-variant-numeric: tabular-nums }

.rr-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.rr-card{
  display: block;
  padding: 14px 15px 13px;
  background: var(--rr-surface);
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 2px 6px -2px rgba(15,23,42,.06);
  transition: transform .2s var(--rr-spring),
              border-color .15s ease,
              box-shadow .2s ease,
              background-color .15s ease;
  opacity: 0;
  transform: translateY(8px);
  animation: rr-fade-up .45s var(--rr-spring) forwards;
}
.rr-card::after{
  /* Trailing arrow glyph that slides in on hover — affordance cue */
  content: '→';
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 14px;
  color: var(--rr-text-tertiary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .25s var(--rr-spring), color .15s ease;
}
.rr-card:hover{
  transform: translateY(-3px);
  border-color: var(--subj-soft, var(--rr-border-strong));
  box-shadow: 0 1px 0 rgba(15,23,42,.04),
              0 12px 26px -14px rgba(15,23,42,.32),
              0 4px 10px -6px rgba(15,23,42,.18);
}
.rr-card:hover::after{
  opacity: 1;
  transform: translateX(0);
  color: var(--subj-color, var(--rr-text-secondary));
}
.rr-card:active{
  transform: translateY(-1px) scale(.985);
  transition-duration: .08s;
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 4px 10px -8px rgba(15,23,42,.2);
}
.rr-card.worked{
  background: linear-gradient(180deg, var(--subj-glaze, rgba(43,76,126,.04)) 0%, var(--rr-surface) 60%);
  border-color: var(--subj-soft, rgba(43,76,126,.28));
  box-shadow: 0 1px 0 rgba(15,23,42,.04),
              0 2px 6px -2px var(--subj-glaze, rgba(15,23,42,.08));
}
.rr-card.worked:hover{
  border-color: var(--subj-mid, var(--rr-border-strong));
  box-shadow: 0 1px 0 rgba(15,23,42,.04),
              0 14px 30px -14px var(--subj-mid, rgba(15,23,42,.32)),
              0 4px 12px -6px var(--subj-pale, rgba(15,23,42,.18));
}
.rr-card .rr-card-meta{
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--rr-text-tertiary);
  margin-bottom: 5px;
  position: relative;
}
.rr-card.worked .rr-card-meta{ color: var(--subj-deep, #1a3358) }
.rr-card .rr-card-title{
  font-size: 14px;
  font-weight: 600;
  color: var(--rr-text-primary);
  letter-spacing: -.1px;
  position: relative;
}
.rr-card .rr-card-sub{
  font-size: 11px;
  color: var(--rr-text-secondary);
  margin-top: 5px;
  padding-right: 18px;
  position: relative;
}
.rr-card-pulse{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245,158,11,.5);
  animation: rr-pulse-glow 2.2s ease-in-out infinite;
}
@keyframes rr-pulse-glow{
  0%,100%{ box-shadow: 0 0 0 0 rgba(245,158,11,.5) }
  50%{ box-shadow: 0 0 0 6px rgba(245,158,11,0) }
}

.rr-raw-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--rr-text-primary);
  transition: transform .25s var(--rr-spring), border-color .2s ease, box-shadow .2s ease;
  margin-bottom: 22px;
}
.rr-raw-cta:hover{
  transform: translateY(-2px);
  border-color: var(--rr-border-strong);
  box-shadow: 0 8px 22px -12px rgba(15,23,42,.18);
}
.rr-raw-cta-left{ display: flex; align-items: center; gap: 12px }
.rr-raw-icon{
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--subj-tint, rgba(43,76,126,.08));
  color: var(--subj-deep, #1a3358);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.rr-raw-title{ font-size: 13.5px; font-weight: 600; color: var(--rr-text-primary) }
.rr-raw-sub{ font-size: 11.5px; color: var(--rr-text-secondary); margin-top: 2px }
.rr-raw-arrow{ color: var(--rr-text-tertiary); font-size: 16px }

/* ───────── Mobile ───────── */
.rr-mobile-bar{ display: none }
.rr-side-close{ display: none }

@media (max-width: 860px){
  .rr-shell{ grid-template-columns: 1fr }
  .rr-side{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .3s var(--rr-ease);
    border-right: none;
    top: 0;
  }
  .rr-side.open{ transform: translateX(0) }
  .rr-side-close{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--rr-bg);
    border: 1px solid var(--rr-border);
    border-radius: 8px;
    cursor: pointer;
  }
  .rr-side-head{ padding-top: 14px }
  .rr-mobile-bar{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--rr-surface);
    border-bottom: 1px solid var(--rr-border);
    position: sticky;
    top: 56px;
    z-index: 6;
  }
  .rr-mobile-trigger{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--rr-bg);
    border: 1px solid var(--rr-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rr-text-primary);
    cursor: pointer;
  }
  .rr-mobile-active{
    flex: 1;
    font-size: 12px;
    color: var(--rr-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .rr-hero{ top: 105px; padding: 14px 16px }
  .rr-band{ display: none }
  .rr-body{ padding: 18px 16px 50px }
  .rr-hero-icon{ width: 42px; height: 42px; font-size: 22px; border-radius: 10px }
  .rr-hero-name{ font-size: 17px }
  .rr-hero-stats{ font-size: 11px; gap: 10px }
  .rr-grid{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) }
}

@media (max-width: 460px){
  .rr-grid{ grid-template-columns: 1fr 1fr }
}

/* Disable old shelf/papers UI when reading-room is active */
body.rr-active .lib-hero,
body.rr-active .shelf,
body.rr-active .kairu-banner,
body.rr-active .papers-area{ display: none !important }

/* MCQ Question Bank hero card — sits atop the P1 Answer Keys section */
.rr-card.rr-card-bank{
  position: relative;
  grid-column: 1 / -1;
  background: var(--bank-color, #2b4c7e);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  padding: 18px 22px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 8px 22px -10px var(--bank-color, rgba(43,76,126,.4)),
    0 4px 14px -8px rgba(15,23,42,.18);
  /* Slight tonal transparency on top — gives it a glassy 'product' feel */
  background-image: linear-gradient(135deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 35%, rgba(0,0,0,.06) 100%);
  background-color: var(--bank-color, #2b4c7e);
  animation: rr-bank-pulse-in .7s var(--rr-spring) forwards, rr-bank-breath 5s ease-in-out 0.7s infinite;
  transform-origin: center;
}
.rr-card.rr-card-bank::after{
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 85% 30%, rgba(255,255,255,.18), transparent 55%);
  pointer-events: none;
}
.rr-card.rr-card-bank:hover{
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 18px 36px -14px var(--bank-color, rgba(43,76,126,.55)),
    0 8px 22px -10px rgba(15,23,42,.25);
  border-color: rgba(255,255,255,.32);
}
.rr-card.rr-card-bank:active{
  transform: translateY(-2px) scale(.998);
  transition-duration: .08s;
}
.rr-card.rr-card-bank::before{ display: none } /* override worked-card glaze */
.rr-bank-glow{
  position: absolute;
  width: 220px; height: 220px;
  top: -110px; right: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%);
  pointer-events: none;
  animation: rr-bank-orbit 9s linear infinite;
}
.rr-bank-meta{
  position: relative;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,.78);
  margin-bottom: 6px;
}
.rr-bank-title{
  position: relative;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.3px;
  margin-bottom: 6px;
  color: #fff;
}
.rr-bank-sub{
  position: relative;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.85);
}
@keyframes rr-bank-pulse-in{
  0%   { opacity: 0; transform: translateY(14px) scale(.96) }
  60%  { opacity: 1; transform: translateY(-3px) scale(1.012) }
  100% { opacity: 1; transform: translateY(0) scale(1) }
}
@keyframes rr-bank-breath{
  0%, 100% { box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 22px -10px var(--bank-color, rgba(43,76,126,.4)), 0 4px 14px -8px rgba(15,23,42,.18) }
  50%      { box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 32px -12px var(--bank-color, rgba(43,76,126,.55)), 0 6px 18px -8px rgba(15,23,42,.22) }
}
@keyframes rr-bank-orbit{
  from { transform: rotate(0deg) translateX(0) }
  to   { transform: rotate(360deg) translateX(0) }
}
@media (max-width: 600px){
  .rr-card.rr-card-bank{ padding: 14px 16px; border-radius: 12px }
  .rr-bank-title{ font-size: 16px }
  .rr-bank-sub{ font-size: 11.5px }
}

/* ───────── Bank card: animated mock-quiz UI ───────── */
.rr-card.rr-card-bank{
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 18px;
  align-items: center;
}
.rr-bank-content{ position: relative; z-index: 2 }
.rr-bank-mock{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  min-height: 124px;
}
.rr-mock-row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  transition: background .15s ease, transform .15s var(--rr-spring), border-color .15s ease;
}
.rr-mock-row.is-clicked{
  background: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.95);
  transform: scale(.97);
}
.rr-mock-row.is-correct{
  background: #22c55e;
  border-color: #16a34a;
  color: #fff;
}
.rr-mock-let{
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}
.rr-mock-row.is-clicked .rr-mock-let{ background:#fff; color: var(--bank-color, #2b4c7e) }
.rr-mock-row.is-correct .rr-mock-let{ background: #fff; color: #15803d }
.rr-mock-bar{
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.22);
  border-radius: 3px;
}
.rr-mock-row.is-clicked .rr-mock-bar{ background: rgba(0,0,0,.18) }
.rr-mock-row.is-correct .rr-mock-bar{ background: rgba(255,255,255,.85) }

/* Cursor — moves between rows then "clicks" each in turn */
.rr-mock-cursor{
  position: absolute;
  width: 16px; height: 16px;
  left: 30px;
  top: 14px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
  animation: rr-mock-cursor 6.4s cubic-bezier(.33,.07,.46,.94) infinite;
}
@keyframes rr-mock-cursor{
  /* 4 rows, ~1.6s per row. Each: glide → press → release → next */
  0%   { left: 30px; top: 14px;  transform: scale(1) }
  10%  { left: 30px; top: 18px;  transform: scale(.85) }      /* press A */
  18%  { left: 30px; top: 18px;  transform: scale(1) }
  25%  { left: 50px; top: 44px;  transform: scale(1) }
  35%  { left: 50px; top: 48px;  transform: scale(.85) }      /* press B */
  43%  { left: 50px; top: 48px;  transform: scale(1) }
  50%  { left: 70px; top: 74px;  transform: scale(1) }
  60%  { left: 70px; top: 78px;  transform: scale(.85) }      /* press C */
  68%  { left: 70px; top: 78px;  transform: scale(1) }
  75%  { left: 50px; top: 104px; transform: scale(1) }
  85%  { left: 50px; top: 108px; transform: scale(.85) }      /* press D */
  93%  { left: 50px; top: 108px; transform: scale(1) }
  100% { left: 30px; top: 14px;  transform: scale(1) }        /* loop back */
}
/* Sync the row-press effect with the cursor timing */
.rr-mock-row[data-letter="A"]{ animation: rr-mock-press-a 6.4s ease-in-out infinite }
.rr-mock-row[data-letter="B"]{ animation: rr-mock-press-b 6.4s ease-in-out infinite }
.rr-mock-row[data-letter="C"]{ animation: rr-mock-press-c 6.4s ease-in-out infinite }
.rr-mock-row[data-letter="D"]{ animation: rr-mock-press-d 6.4s ease-in-out infinite }
@keyframes rr-mock-press-a{
  0%,8%,22%,100%{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); transform: scale(1) }
  10%,18%      { background: rgba(255,255,255,.85); border-color: rgba(255,255,255,.95); transform: scale(.97) }
}
@keyframes rr-mock-press-b{
  0%,23%,47%,100%{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); transform: scale(1) }
  25%,43%        { background: rgba(255,255,255,.85); border-color: rgba(255,255,255,.95); transform: scale(.97) }
}
@keyframes rr-mock-press-c{
  0%,48%,72%,100%{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); transform: scale(1) }
  50%,68%        { background: rgba(255,255,255,.85); border-color: rgba(255,255,255,.95); transform: scale(.97) }
}
@keyframes rr-mock-press-d{
  0%,73%,98%,100%{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.14); transform: scale(1) }
  /* D is the "correct" answer — flash green then settle */
  75%,85%        { background: rgba(255,255,255,.85); border-color: rgba(255,255,255,.95); transform: scale(.97) }
  88%,95%        { background: #22c55e; border-color: #16a34a; transform: scale(1) }
}
@media (max-width: 720px){
  .rr-card.rr-card-bank{ grid-template-columns: 1fr }
  .rr-bank-mock{ display: none } /* mobile: keep card simple, hide animation */
}

/* ───────── Year answer-key cards: stronger click affordance ───────── */
/* (not the bank card — those small per-year P1 Answer Key cards) */
.rr-card:not(.rr-card-bank):not(.worked){
  /* Small ripple-like click hint — animated underline that slides in on hover */
  background-image: linear-gradient(180deg, transparent 0%, transparent 100%);
}
.rr-card:not(.rr-card-bank):not(.worked):hover{
  border-color: rgba(15,23,42,.22);
}
.rr-card:not(.rr-card-bank):not(.worked):hover::after{
  /* Reuse the existing "→" hint with a subtle horizontal swing */
  animation: rr-card-arrow-swing 1.2s ease-in-out infinite;
}
@keyframes rr-card-arrow-swing{
  0%,100%{ transform: translateX(0) }
  50%   { transform: translateX(2px) }
}


/* ───────── Section 2 — small P1 Answer Key year icons ───────── */
.rr-keys-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  max-width: 760px;
}
.rr-card-key{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  padding: 10px 6px;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  min-height: 64px;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
  transition: transform .2s var(--rr-spring), border-color .15s ease, box-shadow .2s ease, background-color .15s ease;
  opacity: 0;
  transform: translateY(6px);
  animation: rr-fade-up .4s var(--rr-spring) forwards;
}
.rr-card-key:hover{
  transform: translateY(-2px) scale(1.04);
  border-color: var(--subj-soft, var(--rr-border-strong));
  background: var(--subj-glaze, var(--rr-surface));
  box-shadow: 0 6px 14px -8px var(--subj-mid, rgba(15,23,42,.18));
}
.rr-card-key:active{
  transform: translateY(0) scale(.98);
  transition-duration: .08s;
}
.rr-card-key::after{ display: none } /* override the default trailing arrow */
.rr-key-year{
  font-size: 16px;
  font-weight: 700;
  color: var(--rr-text-primary);
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rr-key-sit{
  font-size: 9.5px;
  font-weight: 700;
  color: var(--subj-color, var(--rr-text-tertiary));
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 4px;
  padding: 2px 6px;
  background: var(--subj-tint, rgba(15,23,42,.04));
  border-radius: 999px;
}

/* Coming-soon / N/A stub cards in the P2 section */
.rr-card.rr-card-stub{
  opacity: .55;
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(15,23,42,.02) 6px, rgba(15,23,42,.02) 12px);
  cursor: default;
  pointer-events: none;
}
.rr-card.rr-card-stub:hover{ transform: none; box-shadow: 0 1px 0 rgba(15,23,42,.04) }
.rr-card.rr-card-stub::after{ display: none }

@media (max-width: 600px){
  .rr-keys-grid{ grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) }
  .rr-key-year{ font-size: 14px }
}


/* ════════════════════════════════════════════════════════════════
   OPTION C — DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════════ */

/* Single merged top header — replaces nav + hero */
.rr-topbar{
  background: var(--rr-surface);
  border-bottom: 1px solid var(--rr-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.rr-topbar-inner{
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 13px;
}
.rr-topbar-back{
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--rr-text-secondary);
  font-weight: 600;
  font-size: 12.5px;
  padding: 5px 9px 5px 7px;
  border-radius: 6px;
  transition: background .15s ease;
}
.rr-topbar-back:hover{ background: rgba(15,23,42,.04) }
.rr-topbar-sep{
  color: var(--rr-border-strong);
  font-size: 11px;
  user-select: none;
}
.rr-topbar-context{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--rr-text-primary);
  font-size: 14.5px;
  letter-spacing: -.2px;
}
.rr-topbar-context-link{
  color: var(--rr-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 12.5px;
  transition: color .15s ease;
}
.rr-topbar-context-link:hover{ color: var(--rr-text-primary) }
.rr-topbar-icon{
  width: 26px; height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background-color .35s var(--rr-ease), color .35s var(--rr-ease);
}
.rr-topbar-name{
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.3px;
  transition: color .35s var(--rr-ease);
}
.rr-topbar-stats{
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--rr-text-secondary);
  margin-left: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--rr-border);
}
.rr-topbar-stats span{ font-variant-numeric: tabular-nums }
.rr-topbar-stats strong{
  color: var(--rr-text-primary);
  font-weight: 700;
  margin-right: 4px;
  display: inline-block;
  transition: transform .4s var(--rr-spring);
}
.rr-topbar-stats span.solutions strong{ color: var(--subj-color, var(--rr-text-primary)) }
.rr-topbar-stat-sep{ color: var(--rr-border-strong); font-size: 10px }
.rr-topbar-count{
  margin-left: auto;
  font-size: 11.5px;
  color: var(--rr-text-tertiary);
}

/* Hide the OLD .rr-hero (now removed from DOM, but legacy CSS may still apply elsewhere) */
.rr-hero{ display: none !important }

/* Recents flyout — only appears when filter is focused / has text */
.rr-recents-flyout{
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--rr-border);
  background: var(--rr-bg);
}

/* Body padding for dashboard (compensate for removed hero) */
.rr-body{ padding-top: 26px }

/* ── Dashboard grid ── */
.rr-dashboard{
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
}
.rr-dash-row{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* Stat count cards (Answer Keys / Worked Solutions) */
.rr-stat-card{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  background: var(--rr-surface);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  text-decoration: none;
  color: var(--rr-text-primary);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15,23,42,.04), 0 2px 6px -2px rgba(15,23,42,.06);
  transition: transform .25s var(--rr-spring), border-color .15s ease, box-shadow .2s ease;
  opacity: 0; transform: translateY(8px);
  animation: rr-fade-up .5s var(--rr-spring) forwards;
}
.rr-stat-card:nth-child(1){ animation-delay: 60ms }
.rr-stat-card:nth-child(2){ animation-delay: 120ms }
.rr-stat-card:hover{
  transform: translateY(-3px);
  border-color: var(--subj-soft, var(--rr-border-strong));
  box-shadow: 0 1px 0 rgba(15,23,42,.04),
              0 14px 28px -14px var(--subj-mid, rgba(15,23,42,.32));
}
.rr-stat-card:active{ transform: translateY(-1px) scale(.99); transition-duration: .08s }
.rr-stat-icon-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rr-stat-icon{
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--subj-tint, rgba(43,76,126,.08));
  color: var(--subj-deep, var(--rr-text-primary));
  display: flex; align-items: center; justify-content: center;
}
.rr-stat-card.rr-stat-card-worked .rr-stat-icon{
  background: var(--subj-color, #2b4c7e);
  color: #fff;
}
.rr-stat-icon .star{ font-size: 18px; line-height: 1 }
.rr-stat-count{
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--rr-text-primary);
  font-variant-numeric: tabular-nums;
}
.rr-stat-card-worked .rr-stat-count{ color: var(--subj-deep, var(--rr-text-primary)) }
.rr-stat-title{ font-size: 14px; font-weight: 600; letter-spacing: -.1px }
.rr-stat-sub{ font-size: 11.5px; color: var(--rr-text-secondary) }

/* Raw papers strip on dashboard */
.rr-dashboard .rr-raw-cta{
  margin-bottom: 0;
  animation: rr-fade-up .5s var(--rr-spring) forwards;
  animation-delay: 180ms;
  opacity: 0;
  padding: 14px 18px;
}
.rr-raw-count{
  font-size: 18px;
  font-weight: 700;
  color: var(--rr-text-primary);
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}

/* Quote tail under the dashboard */
.rr-quote{
  max-width: 1100px;
  margin: 22px auto 0;
  padding: 14px 16px;
  font-style: italic;
  color: var(--rr-text-secondary);
  font-size: 13px;
  font-family: Georgia, serif;
  border-left: 3px solid var(--subj-color, var(--rr-border-strong));
  background: var(--subj-glaze, transparent);
  border-radius: 0 8px 8px 0;
  opacity: 0;
  animation: rr-fade-up .6s var(--rr-spring) forwards;
  animation-delay: 240ms;
}

/* Detail-view header (for ?view=keys / ?view=solutions) */
.rr-detail-head{ max-width: 920px; margin: 0 auto 18px }
.rr-detail-back{
  display: inline-block;
  font-size: 12.5px;
  color: var(--subj-color, var(--rr-text-secondary));
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 10px;
  transition: opacity .15s ease;
}
.rr-detail-back:hover{ opacity: .7 }
.rr-detail-head h2{
  font-size: 22px;
  font-weight: 700;
  color: var(--rr-text-primary);
  letter-spacing: -.4px;
  margin-bottom: 4px;
}
.rr-detail-head p{
  font-size: 13px;
  color: var(--rr-text-secondary);
}

/* Year-by-year answer-key list (clean rows, scrollable, single page) */
.rr-key-list{
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rr-key-row{
  display: grid;
  grid-template-columns: 80px auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--rr-text-primary);
  transition: transform .2s var(--rr-spring), border-color .15s ease, background .15s ease;
  opacity: 0; transform: translateY(4px);
  animation: rr-fade-up .35s var(--rr-spring) forwards;
}
.rr-key-row:hover{
  transform: translateX(4px);
  border-color: var(--subj-soft, var(--rr-border-strong));
  background: var(--subj-glaze, var(--rr-surface));
}
.rr-key-row-year{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--subj-deep, var(--rr-text-primary));
  font-variant-numeric: tabular-nums;
}
.rr-key-row-meta{
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--subj-color, var(--rr-text-tertiary));
  background: var(--subj-tint, rgba(15,23,42,.04));
  padding: 4px 9px;
  border-radius: 999px;
}
.rr-key-row-title{
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rr-text-primary);
}
.rr-key-row-arrow{
  color: var(--rr-text-tertiary);
  font-size: 16px;
  transition: transform .25s var(--rr-spring), color .15s ease;
}
.rr-key-row:hover .rr-key-row-arrow{
  color: var(--subj-color, var(--rr-text-secondary));
  transform: translateX(3px);
}

/* Empty state for no-content subjects */
.rr-empty-note{
  max-width: 920px;
  margin: 40px auto;
  text-align: center;
  padding: 60px 20px;
  color: var(--rr-text-tertiary);
}

@media (max-width: 720px){
  .rr-topbar-stats{ display: none }
  .rr-topbar-count{ display: none }
  .rr-key-row{ grid-template-columns: 60px auto 1fr auto }
  .rr-key-row-year{ font-size: 18px }
  .rr-dash-row{ grid-template-columns: 1fr }
}


/* Year + sitting two-line meta on P2 cards */
.rr-card .rr-card-meta-row{
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.rr-card-year{
  font-size: 16px;
  font-weight: 700;
  color: var(--rr-text-primary);
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.rr-card.worked .rr-card-year{ color: var(--subj-deep, var(--rr-text-primary)) }
.rr-card-sit{
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.4;
}
.rr-card-sit.is-jan{
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.rr-card-sit.is-mj{
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}
.rr-card.worked .rr-card-sit.is-jan{
  background: rgba(245, 158, 11, .14);
  border-color: rgba(245, 158, 11, .35);
  color: #92400e;
}
.rr-card.worked .rr-card-sit.is-mj{
  background: var(--subj-tint, #dbeafe);
  border-color: var(--subj-soft, #93c5fd);
  color: var(--subj-deep, #1e3a8a);
}



/* Stacked papers visual inside the raw-cta card */
.rr-raw-cta{ position: relative; overflow: hidden; }
.rr-raw-stack{
  position: relative;
  width: 96px; height: 76px;
  margin-right: 18px;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.rr-raw-stack svg{ width: 100%; height: 100%; overflow: visible; }
.rr-raw-stack svg > rect,
.rr-raw-stack svg > g{ transition: transform .35s cubic-bezier(.4,0,.2,1); transform-origin: center; }
.rr-raw-cta:hover .rr-raw-stack{ transform: translateX(-4px) rotate(-2deg); }
.rr-raw-cta:hover .rr-raw-stack svg > g{ transform: translate(-2px, -1px); }
.rr-raw-cta:hover .rr-raw-stack svg > rect:nth-of-type(1){ transform: translate(4px, 2px); }
.rr-raw-cta:hover .rr-raw-stack svg > rect:nth-of-type(2){ transform: translate(2px, 1px); }
.rr-raw-cta .rr-raw-icon{
  background: var(--subj-tint, rgba(43,76,126,.08));
  color: var(--subj-deep, #1a3358);
}
.rr-raw-cta .rr-raw-icon svg{ width: 18px; height: 18px; display: block; }

@media (max-width: 540px){
  .rr-raw-stack{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .rr-raw-stack, .rr-raw-stack svg > rect, .rr-raw-stack svg > g{ transition: none; }
}


/* ───────── "Study alongside" tools grid ───────── */
.rr-tools{ margin-top: 12px; }
.rr-tools-head{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rr-text-tertiary);
  margin: 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rr-tools-head::after{
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rr-border);
}
.rr-tools-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.rr-tool-card{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--rr-surface);
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .25s var(--rr-ease), border-color .2s var(--rr-ease), box-shadow .25s var(--rr-ease);
  position: relative;
  overflow: hidden;
}
.rr-tool-card:hover{
  transform: translateY(-2px);
  border-color: var(--rr-border-strong);
  box-shadow: 0 8px 22px -12px rgba(15,23,42,.18);
}
.rr-tool-card::before{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(245,166,35,.06) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .55s var(--rr-ease);
  pointer-events: none;
}
.rr-tool-card:hover::before{ transform: translateX(100%); }
.rr-tool-icon{
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: rgba(15,23,42,.04);
  transition: transform .35s var(--rr-spring);
}
.rr-tool-card:hover .rr-tool-icon{ transform: scale(1.06) rotate(-2deg); }
.rr-tool-meta{
  flex: 1;
  min-width: 0;
}
.rr-tool-name{
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rr-text-primary);
  letter-spacing: -.1px;
  line-height: 1.25;
}
.rr-tool-desc{
  font-size: 11.5px;
  font-weight: 400;
  color: var(--rr-text-secondary);
  margin-top: 3px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rr-tool-arrow{
  width: 16px;
  height: 16px;
  color: var(--rr-text-tertiary);
  flex-shrink: 0;
  transition: transform .2s var(--rr-ease), color .2s var(--rr-ease);
}
.rr-tool-card:hover .rr-tool-arrow{
  transform: translate(2px, -2px);
  color: var(--rr-text-primary);
}

@media (max-width: 720px){
  .rr-tools-grid{ grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce){
  .rr-tool-card, .rr-tool-card::before, .rr-tool-icon, .rr-tool-arrow{ transition: none; }
}


/* === Mobile UX polish (added for tap-target + scan-ability) === */
@media (max-width: 600px){
  /* Smaller topbar padding so more vertical space for content */
  .rr-topbar-inner{ padding: 10px 14px; gap: 8px; font-size: 12.5px }
  .rr-topbar-back{ padding: 6px 8px 6px 6px; min-height: 36px }
  .rr-topbar-context{ font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }

  /* Mobile-bar drawer trigger — chunkier tap target */
  .rr-mobile-bar{ padding: 12px 16px; min-height: 52px }
  .rr-mobile-trigger{ padding: 10px 14px; font-size: 14px; min-height: 40px; border-radius: 10px }
  .rr-mobile-active{ font-size: 13px }

  /* Subject-side drawer items: taller tap targets */
  .rr-side-item{ padding: 12px 16px 12px 14px !important; min-height: 44px }
  .rr-item-name{ font-size: 14px }
  .rr-item-count{ font-size: 12px }

  /* Paper cards: more breathing room, finger-friendly */
  .rr-card{ padding: 14px 14px; min-height: 84px }
  .rr-card-year, .rr-card-row-year{ font-size: 17px }
  .rr-card-sit{ font-size: 10px }
  .rr-card-title{ font-size: 13px }

  /* Hero stats — tighten so they don't wrap awkwardly */
  .rr-hero{ padding: 12px 14px !important }
  .rr-hero-icon{ width: 38px; height: 38px; font-size: 20px }
  .rr-hero-name{ font-size: 16px }
  .rr-hero-stats{ flex-wrap: wrap; gap: 8px 12px; font-size: 11px }

  /* Group section labels */
  .rr-section-head, .rr-group-head{ padding: 14px 0 8px; font-size: 12px }
  .rr-section-head h2{ font-size: 15px }
}

/* Even tighter on very small phones */
@media (max-width: 380px){
  .rr-grid{ grid-template-columns: 1fr !important }
  .rr-topbar-inner{ padding: 10px 10px; gap: 6px }
  .rr-card{ padding: 12px }
}
