/* Iconic list ranking — reader-facing scoring UI. Loaded with iconic-rank.js
   and inert until a list is actually scored. Uses the list pages' own tokens. */
.ir-trig{display:inline-flex; align-items:center; gap:8px; flex:none; cursor:pointer;
  font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; font-weight:600;
  color:#C4B5FD; border:1px solid rgba(167,139,250,.45); border-radius:999px; padding:9px 16px;
  background:rgba(167,139,250,.07); white-space:nowrap; position:relative; overflow:hidden;
  transition:background .2s, box-shadow .2s, border-color .2s, color .2s}
.ir-trig:hover{background:rgba(167,139,250,.14); box-shadow:0 0 20px rgba(167,139,250,.2)}
.ir-trig.on{border-color:rgba(230,197,116,.5); color:var(--gold-soft); background:rgba(230,197,116,.1)}
.ir-trig .sp{width:12px; height:12px; flex:none}
.ir-trig .cv{width:9px; height:9px; opacity:.7; transition:transform .38s cubic-bezier(.22,1,.36,1)}
.ir-trig[aria-expanded="true"] .cv{transform:rotate(180deg)}
.ir-badge{background:rgba(255,255,255,.14); color:inherit; font-size:9px; font-weight:800;
  border-radius:99px; padding:2px 7px; letter-spacing:.04em}
/* One pass of light across the glass, then a rest.
   The timing function has to live ON THE KEYFRAMES, not on the animation: set
   globally it eased the SWEEP (so the light crawled, then snapped) instead of
   easing the travel and holding still between passes. Now the sweep gets a
   gentle in-out over ~1.6s and the remaining ~3s is the pause, off-screen. */
.ir-hint::before{content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(100deg,
    transparent 30%,
    rgba(196,181,253,.10) 41%,
    rgba(214,205,255,.42) 50%,
    rgba(196,181,253,.10) 59%,
    transparent 70%);
  background-size:300% 100%; background-repeat:no-repeat;
  animation:irSheen 4.6s linear infinite}
@keyframes irSheen{
  0%   {background-position:190% 0; animation-timing-function:cubic-bezier(.45,.05,.3,1)}
  35%  {background-position:-90% 0; animation-timing-function:linear}
  100% {background-position:-90% 0}
}

/* min-width:0 is load-bearing. A grid container sizes its single auto column to
   content, and the option rows are nowrap, so without it the panel grew to
   ~1340px inside a 375px page and read as a card sliding off the screen. */
.ir-panel{display:grid; grid-template-rows:0fr; min-width:0; width:100%; opacity:0; margin-top:0;
  border-top:1px solid transparent;
  transition:grid-template-rows .44s cubic-bezier(.22,1,.36,1), opacity .3s ease,
    margin-top .44s cubic-bezier(.22,1,.36,1), border-color .3s}
.ir-panel.open{grid-template-rows:1fr; opacity:1; margin-top:14px; border-top-color:var(--hair)}
/* No panel background: it belongs to the page, not to a floating card. The
   hairline row rules are enough to separate it. */
.ir-inner{overflow:hidden; min-height:0; min-width:0}
.ir-row{display:flex; gap:18px; align-items:center; padding:9px 0; border-bottom:1px solid var(--hair)}
.ir-row:first-child{padding-top:16px}
@media (max-width:640px){.ir-row{flex-direction:column; align-items:flex-start; gap:8px}}
.ir-lab{font-family:var(--mono); font-size:9px; letter-spacing:.2em; text-transform:uppercase;
  width:96px; flex:none; padding:2px 0 0; color:var(--mute)}
.ir-lab.ir-gold{color:var(--gold-soft)} .ir-lab.ir-purple{color:#B9A6FF}
.ir-lab.ir-green{color:#42EB81} .ir-lab.ir-cyan{color:#7FDCEA} .ir-lab.ir-rose{color:#F3A88F}
.ir-opts{display:flex; gap:7px; flex-wrap:nowrap; flex:1; min-width:0; overflow-x:auto;
  scrollbar-width:none; padding:7px 22px 7px 2px; margin:-7px 0 -7px -2px;
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 42px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 42px),transparent)}
.ir-opts::-webkit-scrollbar{display:none}
/* Unselected options sit back: barely-there fill and a hairline border, so the
   panel reads as a quiet menu and the chosen answers are the only thing with
   weight in it. */
.ir-chip{flex:none; display:inline-flex; align-items:center; font-family:var(--mono); font-size:10.5px;
  letter-spacing:.1em; text-transform:uppercase; padding:6px 12px; border-radius:6px;
  background:rgba(255,255,255,.012); border:1px solid rgba(255,255,255,.075); color:var(--mute);
  cursor:pointer; white-space:nowrap; transition:color .18s, border-color .18s, background .18s, box-shadow .18s}
.ir-chip:hover{color:var(--white); border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.045)}
.ir-chip.on{font-weight:700}
.c-gold.on  {color:var(--gold-soft); border-color:rgba(230,197,116,.44); background:rgba(230,197,116,.11); box-shadow:0 0 16px rgba(230,197,116,.16)}
.c-purple.on{color:#B9A6FF; border-color:rgba(167,139,250,.46); background:rgba(167,139,250,.11); box-shadow:0 0 16px rgba(167,139,250,.16)}
.c-green.on {color:#42EB81; border-color:rgba(31,223,103,.42); background:rgba(31,223,103,.10); box-shadow:0 0 16px rgba(31,223,103,.14)}
.c-cyan.on  {color:#7FDCEA; border-color:rgba(111,216,232,.44); background:rgba(111,216,232,.10); box-shadow:0 0 16px rgba(111,216,232,.14)}
.c-rose.on  {color:#F3A88F; border-color:rgba(243,168,143,.44); background:rgba(243,168,143,.10); box-shadow:0 0 16px rgba(243,168,143,.14)}
.ir-act{display:flex; align-items:center; gap:16px; padding:16px 0}
.ir-apply{font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  font-weight:700; padding:11px 22px; border-radius:999px; border:0; cursor:pointer;
  background:var(--cream,#ECEAE5); color:#111}
.ir-clear{font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  background:transparent; border:0; color:var(--mute); cursor:pointer; padding:0}
.ir-clear:hover{color:var(--gold-soft)}
.ir-res{margin-left:auto; font-family:var(--mono); font-size:10px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--mute)}
.ir-res b{color:var(--gold-soft)}
.ir-chips{display:flex; flex-wrap:wrap; gap:7px; align-items:center; padding:10px 0 0}
.ir-chips:empty{display:none}
.ir-ans{display:inline-flex; align-items:center; gap:7px; border-radius:6px; padding:5px 5px 5px 11px;
  font-family:var(--mono); font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  background:rgba(255,255,255,.02); border:1px solid rgba(255,255,255,.1); color:var(--mute-2)}
.ir-ans button{background:rgba(255,255,255,.12); border:0; color:inherit; width:15px; height:15px;
  border-radius:4px; cursor:pointer; font-size:10px; line-height:15px; padding:0}
.ir-ans button:hover{background:rgba(255,255,255,.3); color:var(--white)}

/* on the cards */
/* Numbers on one row, chips always on the row beneath, so every card reads the
   same way whether or not a filter is running. */
.ir-scores{display:flex; flex-direction:column; align-items:flex-start; gap:14px; margin:0 0 16px}
.ir-nums{display:flex; align-items:flex-start; gap:clamp(16px,2.4vw,28px); flex-wrap:wrap}
.ir-big{display:flex; flex-direction:column; flex:none}
/* The unit rides on the same line as the number: both are inline inside .ir-v,
   which is the one flex child. Putting them directly under .ir-big made each its own row. */
.ir-v{display:block; white-space:nowrap; line-height:.95}
.ir-big b{font-family:var(--serif); font-size:clamp(23px,2.5vw,30px); font-weight:700; line-height:.95;
  color:var(--white); letter-spacing:-.03em; font-variant-numeric:tabular-nums; display:inline}
.ir-big i{font-style:normal; font-size:.44em; color:var(--mute); font-weight:400; margin-left:3px; display:inline}
.ir-v{font-size:clamp(23px,2.5vw,30px)}
.ir-big em{font-style:normal; font-family:var(--mono); font-size:8.5px; letter-spacing:.2em;
  text-transform:uppercase; color:var(--mute); margin-top:6px; font-weight:600}
.ir-big.match b{color:var(--gold-soft)} .ir-big.match em{color:var(--gold,#e6c574)}
.ir-big.match i{color:var(--gold,#e6c574); opacity:.75}
.ir-sc-chips{display:flex; gap:7px; flex-wrap:wrap; align-items:center; width:100%}
.ir-sc{display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-size:10.5px;
  letter-spacing:.1em; text-transform:uppercase; padding:5px 11px; border-radius:6px;
  background:rgba(255,255,255,.04); border:1px solid var(--hair-2); color:var(--mute-2)}
.ir-sc b{color:var(--white); font-weight:700; font-variant-numeric:tabular-nums}
.ir-sc.hit{color:var(--gold-soft); border-color:rgba(230,197,116,.32); background:rgba(230,197,116,.07)}
.ir-sc.hit b{color:var(--gold-soft)}
.ir-sc.low{color:#ffa3a3; border-color:rgba(255,93,93,.26); background:rgba(255,93,93,.05)}
.ir-sc.low b{color:#ffa3a3}
.ir-i{border:0; background:rgba(255,255,255,.12); color:inherit; width:14px; height:14px;
  border-radius:50%; font-size:9px; font-weight:700; cursor:pointer; line-height:14px; padding:0;
  font-family:var(--serif); flex:none}
.ir-i:hover{background:var(--gold,#e6c574); color:#1a1408}
.ir-why{font-size:13px; color:var(--mute); margin:0 0 14px}
.ir-why b{color:var(--cream,#ECEAE5); font-weight:600}
.ir-pop{position:fixed; z-index:9500; max-width:300px; background:rgba(16,19,16,.97);
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
  border:1px solid var(--hair-2); border-radius:12px; padding:12px 14px; font-size:12.5px;
  line-height:1.55; color:var(--cream,#ECEAE5); box-shadow:0 18px 46px rgba(0,0,0,.65)}
.ir-pop .t{font-family:var(--mono); font-size:9.5px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--gold-soft); display:block; margin-bottom:6px; font-weight:700}
.ir-pop .s{color:var(--mute); font-size:11.5px; margin-top:8px; padding-top:8px; border-top:1px solid var(--hair)}
.rank-item{transition:transform .55s cubic-bezier(.22,.8,.2,1)}
@media (prefers-reduced-motion:reduce){
  .rank-item,.ir-panel{transition:none !important}
  .ir-hint::before{animation:none !important}
}
/* Editing the list is a different job from reading it. */
body.edit-mode .ir-trig,body.edit-mode .ir-panel,body.edit-mode .ir-chips{display:none !important}

/* Phones: .rb-ctl goes full width with space-between, which puts the sort
   select's chevron hard against the screen edge. Pull it in. */
.ir-l-short{display:none}
@media (max-width:760px){
  .region-bar .rb-ctl{gap:12px}
  .region-bar .rb-ctl .sort{padding-right:20px; flex:0 1 auto; min-width:0}
  .ir-trig{padding:9px 14px; flex:0 0 auto}
  .ir-l-long{display:none} .ir-l-short{display:inline}
  .ir-lab{width:auto}
}
