/* ==========================================================================
   Ycotes — explorer (includes/explorer.php, assets/js/explorer.js).
   Desktop: numbered rail on the left, one detail panel on the right.
   Phone: the rail becomes a swipeable chip row above the panel.
   No JS: every panel is shown, stacked — nothing is hidden behind script.
   ========================================================================== */
.xp {
  --xp-acc: var(--y-yellow);
  display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr);
  gap: clamp(var(--s-5), 3vw, var(--s-10)); align-items: start;
}
.xp__rail {
  display: grid; gap: 4px; position: sticky; top: 6rem;
  padding: 6px; border-radius: 18px;
  border: 1px solid var(--surface-line); background: var(--surface-1);
}
.xp__tab {
  display: grid; grid-template-columns: 1.8rem 2.25rem minmax(0, 1fr); align-items: center; gap: .65rem;
  width: 100%; padding: .7rem .75rem; text-align: left; cursor: pointer;
  border: 0; border-radius: 12px; background: none; color: var(--text-mid);
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  transition: background .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.xp__tab:hover { background: var(--surface-2); color: var(--text-hi); }
.xp__n { font-family: var(--font-mono, ui-monospace, monospace); font-size: .7rem; color: var(--text-lo); letter-spacing: .06em; }
.xp__ic {
  width: 2.25rem; height: 2.25rem; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--surface-line); color: var(--text-lo);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.xp__ic svg { width: 1.1rem; height: 1.1rem; }
.xp__tab[aria-selected="true"] { background: color-mix(in srgb, var(--xp-acc) 12%, transparent); color: var(--text-hi); }
.xp__tab[aria-selected="true"] .xp__n { color: var(--accent-ink); }
.xp__tab[aria-selected="true"] .xp__ic { background: var(--xp-acc); border-color: var(--xp-acc); color: var(--y-black); }
.xp__tab:focus-visible { outline: 2px solid var(--xp-acc); outline-offset: 2px; }

.xp__panel {
  position: relative; overflow: hidden;
  padding: clamp(var(--s-6), 3vw, var(--s-10));
  border-radius: 22px; border: 1px solid var(--surface-line);
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--xp-acc) 10%, transparent), transparent 60%),
    var(--surface-1);
}
.xp__panel + .xp__panel { margin-top: var(--s-4); }        /* the no-JS stack */
.xp.is-js .xp__panel + .xp__panel { margin-top: 0; }
.xp.is-js .xp__panel { animation: xpIn .4s cubic-bezier(.22,1,.36,1) both; }
.xp__panel[hidden] { display: none; }
@keyframes xpIn { from { opacity: 0; transform: translateY(10px); } }

.xp__head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.xp__big {
  width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--xp-acc); color: var(--y-black);
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--xp-acc) 70%, transparent);
}
.xp__big svg { width: 1.45rem; height: 1.45rem; }
.xp__k {
  margin: 0; font-size: var(--fs-xs); letter-spacing: var(--tracking-eyebrow, .14em);
  text-transform: uppercase; color: var(--accent-ink); font-weight: 600;
}
.xp__t {
  margin: 0 0 var(--s-3); max-width: 24ch;
  font-family: var(--font-display); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
  line-height: 1.15; letter-spacing: -.02em; color: var(--text-hi);
}
.xp__lead { margin: 0 0 var(--s-6); max-width: 52ch; color: var(--text-mid); font-size: var(--fs-body-lg); }
.xp__pts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-6); }
.xp__pts:has(> li:nth-child(3):last-child) { grid-template-columns: 1fr; }   /* 3 points: no orphan in column 2 */
.xp__pts li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .6rem; color: var(--text-hi); font-size: var(--fs-sm); line-height: 1.5; margin: 0; }
.xp__tick {
  width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; margin-top: .05rem;
  background: color-mix(in srgb, var(--xp-acc) 18%, transparent); color: var(--accent-ink);
}
.xp__tick svg { width: .85rem; height: .85rem; stroke-width: 2.6; }
.xp__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5);
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--surface-line);
}
.xp__meta { margin: 0; display: grid; gap: 2px; max-width: none; }
.xp__meta b { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-lo); font-weight: 600; }
.xp__meta span { color: var(--text-hi); font-size: var(--fs-sm); }
.xp__go {
  display: inline-flex; align-items: center; gap: .5ch; padding: .65rem 1.1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--surface-line); color: var(--text-hi); font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}
.xp__go:hover { border-color: var(--xp-acc); background: var(--surface-2); color: var(--text-hi); }

/* ── Phone & small tablet: chip rail on top ─────────────────────────────── */
@media (max-width: 52rem) {
  .xp { grid-template-columns: 1fr; gap: var(--s-4); }
  .xp__rail {
    position: static; display: flex; gap: .4rem; padding: 0 var(--gutter, 1rem) .25rem;
    margin-inline: calc(-1 * var(--gutter, 1rem));
    border: 0; background: none; border-radius: 0;
    overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  }
  .xp__rail::-webkit-scrollbar { display: none; }
  .xp__tab {
    flex: none; width: auto; grid-template-columns: auto auto; gap: .45rem;
    padding: .45rem .85rem .45rem .45rem; border-radius: 999px; scroll-snap-align: center;
    border: 1px solid var(--surface-line); background: var(--surface-1);
  }
  .xp__n { display: none; }
  .xp__ic { width: 1.9rem; height: 1.9rem; border-radius: 50%; }
  .xp__ic svg { width: 1rem; height: 1rem; }
  .xp__tab[aria-selected="true"] { border-color: var(--xp-acc); }
  .xp__pts { grid-template-columns: 1fr; }
  .xp__foot { flex-direction: column; align-items: flex-start; }
  .xp__go { width: 100%; justify-content: center; }
}
/* Without JS on a phone the rail is a list of links to nothing — hide it and
   let the stacked panels speak. */
@media (max-width: 52rem) { .xp:not(.is-js) .xp__rail { display: none; } }

@media (prefers-reduced-motion: reduce) { .xp.is-js .xp__panel { animation: none; } }
