/* ============================================================================
   Explorer (experience graph) — generic styles for any layout. Theme via the
   custom properties below; a domain stylesheet can override them. Kind colours
   arrive per element as --kc.
   ============================================================================ */
.xp-layout, .explorer {
  --xp-accent: var(--bs-primary, #5b2a9b);
  --xp-accent-2: var(--accent, #ffde00);
  --xp-ink: var(--bs-body-color, #1d1530);
  --xp-muted: #6c6779;
  --xp-line: #ebe8f0;
  --xp-soft: #f6f4f9;
  --xp-card: #fff;
  --xp-radius: 12px;
  --xp-shadow: 0 1px 2px rgba(20, 10, 30, 0.06), 0 8px 24px rgba(20, 10, 30, 0.06);
}
.explorer-ssr[hidden] { display: none; }
.explorer:not(.is-ready) .explorer-app { min-height: 60vh; }
/* First load: with scripting on, the plain server layer isn't shown while the app boots (it would
   flash as a raw list, then be swapped out) — it stays in the DOM for crawlers. If the app never
   comes up, the layer is revealed after a few seconds so the content is never lost. */
@media (scripting: enabled) {
  .explorer:not(.is-ready) { position: relative; }
  .explorer:not(.is-ready) .explorer-ssr {
    position: absolute; inset: 0 0 auto; visibility: hidden; opacity: 0;
    animation: xp-ssr-reveal 0.3s 4s both;
  }
}
@keyframes xp-ssr-reveal { to { position: static; visibility: visible; opacity: 1; } }
/* …and the finished app fades in once, as a whole. Per-item entrance animations (cards, chips, timeline
   blocks) only play after a view switch (.is-switched) — on first load they'd run as a staggered
   ripple with movement. */
.xp { animation: xp-fade 0.3s ease-out both; }
.xp-stage:not(.is-switched) :is(.xp-chip, .xp-fcard, .xp-card, .xp-tl-block) { animation: none; }
.explorer-placeholder { padding: 1.25rem 1.5rem; border: 2px dashed var(--xp-line, #ddd); border-radius: 12px; color: #555; }

/* ---- server layer (crawlers / no-JS) ---- */
.xp-ssr-kind h2 { font-size: 1.3rem; margin: 1.75rem 0 0.5rem; }
.xp-ssr-kind ul { margin: 0; padding-left: 1.1rem; }
.xp-ssr-dates, .xp-ssr-in { color: var(--xp-muted); font-size: 0.9em; margin-left: 0.35em; }
.xp-node-ssr { border: 1px solid var(--xp-line); border-radius: var(--xp-radius); padding: 1.5rem; margin-bottom: 2rem; }

/* ---- toolbar ---- */
.xp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.xp-tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; background: var(--xp-soft); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.xp-tab { white-space: nowrap; flex: 0 0 auto; }
.xp-tab {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 0; border-radius: 999px; padding: 0.5rem 1rem; background: transparent;
  color: var(--xp-muted); font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.xp-tab:hover { color: var(--xp-ink); }
.xp-tab[aria-selected="true"] { background: #fff; color: var(--xp-accent); box-shadow: 0 2px 8px rgba(20, 10, 30, 0.12); }

.xp-stage { view-transition-name: xp-stage; }

/* ---- boards ---- */
/* Four tracks; each board spans the quarters the JS gives it (--span wide, --span-mid when the board column is narrower) —
   skill cards a full row, chip groups sharing the next (¾ + ¼), experience groups a full row each. */
.xp-boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.xp-board { grid-column: span var(--span, 4); container-type: inline-size; background: var(--xp-soft); border-radius: var(--xp-radius); padding: 1.1rem 1.1rem 1.25rem; }
.xp-board-facets { align-self: stretch; }   /* boards sharing a row end level */
@container xp-main (max-width: 62rem) { .xp-board { grid-column: span var(--span-mid, 4); } }
@container xp-main (max-width: 36rem) { .xp-board { grid-column: 1 / -1; } }
/* A board wide enough lays its cards out across, not down. */
@container (min-width: 46rem) {
  .xp-fcards, .xp-cards { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
}
.xp-board-title { margin: 0 0 0.9rem; font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
.xp-hash { color: var(--xp-accent); font-weight: 800; }

.xp-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
/* A nested facet (UIUC › its departments): the parent chip, children indented on a rail beneath. */
.xp-branch { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.xp-cloud-sub { margin-left: 0.85rem; padding-left: 0.65rem; gap: 0.3rem; border-left: 2px solid color-mix(in srgb, var(--xp-accent) 22%, transparent); }
/* A chip is a link: click opens the node's panel. */
.xp-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; background: #fff;
  border: 1px solid color-mix(in srgb, var(--kc) 30%, transparent);
  box-shadow: 0 1px 2px rgba(20, 10, 30, 0.05);
  padding: 0.3rem 0.75rem 0.3rem 0.65rem; text-decoration: none;
  font-size: var(--fs, 0.85rem); line-height: 1.2;
  transition: border-color 0.2s ease, color 0.2s ease;
  animation: xp-in 0.45s both cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-delay: calc(var(--i, 0) * 14ms);
}
.xp-chip.no-icon { padding-left: 0.75rem; }
.xp-chip:hover { border-color: var(--kc); }
/* .xp a.xp-chip outranks a layout's ".sah a" link color. */
.xp a.xp-chip, .xp a.xp-chip:hover { color: var(--xp-ink); }
.xp-chip:focus-visible { outline: 2px solid var(--kc); outline-offset: 2px; }
.xp-size-1 { --fs: 0.8rem; }
.xp-size-2 { --fs: 0.9rem; }
.xp-size-3 { --fs: 1rem; font-weight: 600; }
.xp-size-4 { --fs: 1.12rem; font-weight: 700; }
/* tags: square-ish, quieter, one size */
.xp-chip.is-tag { --fs: 0.76rem; border-radius: 6px; box-shadow: none; padding: 0.2rem 0.5rem; background: color-mix(in srgb, #fff 70%, var(--xp-soft)); }
.xp-chip.is-tag .xp-kicon { display: none; }

/* Skill cards: the skill, its one-liner, and the tech/practices used under it. The title link is
   stretched over the whole card, so a click anywhere opens the skill; the tags are plain labels
   (each tag's own panel is reached from the skill's panel). */
.xp-fcards { display: grid; gap: 0.6rem; }
.xp-fcard {
  position: relative; background: var(--xp-card); border-radius: 10px; padding: 0.75rem 0.9rem 0.8rem 1.05rem;
  box-shadow: var(--xp-shadow); overflow: hidden;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  animation: xp-in 0.45s both cubic-bezier(0.2, 0.8, 0.2, 1); animation-delay: calc(var(--i, 0) * 20ms);
  --xp-fcard-lift: 0 2px 4px rgba(20, 10, 30, 0.08), 0 14px 32px rgba(20, 10, 30, 0.13);
}
.xp-fcard::before, .xp-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kc); }
/* Every card (skill and experience) is one link: its title link is stretched over the whole card and
   everything else in it is a plain label. Hover (and keyboard focus): the shadow deepens and the card
   takes a faint tint of its kind color — nothing moves or resizes. Keyed to :focus-visible, not
   :focus-within — a mouse click leaves the link focused, which would pin the effect. The card showing
   in the dock (.is-active, from boards.js) carries a thin accent ring. */
.xp-fcard h4 a, .xp-card h4 a { color: var(--xp-ink); text-decoration: none; }
.xp-fcard h4 a::after, .xp-card h4 a::after { content: ""; position: absolute; inset: 0; }
:is(.xp-fcard, .xp-card):is(:hover, :has(h4 a:focus-visible)) {
  box-shadow: var(--xp-fcard-lift);
  background-color: color-mix(in srgb, var(--kc) 6%, var(--xp-card));
}
:is(.xp-fcard, .xp-card).is-active { box-shadow: var(--xp-shadow), inset 0 0 0 1px color-mix(in srgb, var(--xp-accent-2) 65%, transparent); }
:is(.xp-fcard, .xp-card).is-active:is(:hover, :has(h4 a:focus-visible)) { box-shadow: var(--xp-fcard-lift), inset 0 0 0 1px color-mix(in srgb, var(--xp-accent-2) 65%, transparent); }
:is(.xp-fcard, .xp-card):hover h4 a { color: var(--xp-accent); }
:is(.xp-fcard, .xp-card):has(h4 a:focus-visible) { outline: 2px solid var(--kc); outline-offset: 2px; }
.xp-fcard h4 { display: flex; align-items: baseline; gap: 0.4rem; margin: 0; font-size: 1rem; line-height: 1.3; }
.xp-fcard-sum { margin: 0.25rem 0 0; font-size: 0.84rem; color: var(--xp-muted); line-height: 1.45; }
.xp-fcard-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.55rem 0 0; }
.xp-fcard-tags .xp-chip { animation: none; }
.xp-fcard-more { align-self: center; font-size: 0.74rem; color: var(--xp-muted); }
.xp-fcards + .xp-cloud { margin-top: 0.9rem; }
.xp-more { display: block; margin-top: 0.7rem; border: 0; background: none; padding: 0; color: var(--xp-accent); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.xp-kicon { width: 1.05em; text-align: center; }

.xp-cards { display: grid; gap: 0.75rem; }
.xp-card {
  position: relative; background: var(--xp-card); border-radius: 10px; padding: 0.9rem 1rem 0.95rem 1.15rem;
  box-shadow: var(--xp-shadow); overflow: hidden;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
  animation: xp-in 0.5s both cubic-bezier(0.2, 0.8, 0.2, 1); animation-delay: calc(var(--i, 0) * 30ms);
  --xp-fcard-lift: 0 2px 4px rgba(20, 10, 30, 0.08), 0 14px 32px rgba(20, 10, 30, 0.13);
}
.xp-card-kind { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.xp-card header { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.76rem; color: var(--xp-muted); }
.xp-card h4 { margin: 0.2rem 0 0.15rem; font-size: 1.05rem; line-height: 1.3; }
.xp-card-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.15rem 0 0.35rem; }
.xp-badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.5rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  background: color-mix(in srgb, var(--kc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--kc) 35%, transparent);
}
.xp-badge { color: color-mix(in srgb, var(--kc) 75%, var(--xp-ink)); }
.xp-card-sum { margin: 0; font-size: 0.88rem; color: var(--xp-muted); line-height: 1.5; }
.xp-card-kids { list-style: none; margin: 0.6rem 0 0; padding: 0.55rem 0 0; border-top: 1px dashed var(--xp-line); display: grid; gap: 0.2rem; font-size: 0.87rem; }
/* A position's earlier titles: a dated ladder on a rail under the current title. */
.xp-card-titles { list-style: none; margin: 0.6rem 0 0; padding: 0 0 0 0.9rem; border-left: 2px solid color-mix(in srgb, var(--kc) 30%, white); display: grid; gap: 0.5rem; }
.xp-card-titles li { position: relative; font-size: 0.9rem; line-height: 1.3; }
.xp-card-titles li::before { content: ""; position: absolute; left: calc(-0.9rem - 5px); top: 0.3rem; width: 8px; height: 8px; border-radius: 50%; background: var(--kc); }
.xp-title-dates { display: block; font-size: 0.74rem; font-weight: 600; color: var(--xp-muted); }
.xp-card-titles .xp-card-badges { margin: 0.25rem 0 0; }

/* ---- timeline ---- */
.xp-timeline { position: relative; }
.xp-tl-chart { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); }
.xp-tl-axis { position: relative; }
.xp-tl-year { position: absolute; left: 0; transform: translateY(-50%); font-size: 0.8rem; font-weight: 600; color: var(--xp-muted); }
.xp-tl-lanes { position: relative; }
.xp-tl-rule { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--xp-line); }
.xp-tl-block {
  position: absolute; box-sizing: border-box;
  left: calc(var(--lane) * (100% / var(--lanes)) + 4px); width: calc(100% / var(--lanes) - 8px);
  background: color-mix(in srgb, var(--kc) 9%, white); border: 1px solid color-mix(in srgb, var(--kc) 35%, white);
  border-left: 4px solid var(--kc); border-radius: 8px; padding: 0.5rem 0.75rem; overflow: clip; /* clip, not hidden: a hidden box can still be scrolled (scrollIntoView, focus), shifting its labels off the link */
  transition: opacity 0.25s ease, box-shadow 0.2s ease;
  animation: xp-in 0.5s both cubic-bezier(0.2, 0.8, 0.2, 1); animation-delay: calc(var(--i, 0) * 40ms);
}
.xp-tl-block:hover { box-shadow: var(--xp-shadow); z-index: 2; background-color: color-mix(in srgb, var(--kc) 15%, white); }
.xp-tl-block:hover h4 { color: var(--xp-accent); }
/* One link over the whole block (segments included); the visible labels are plain text. */
.xp-tl-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.xp-tl-link:focus-visible { outline: 2px solid var(--kc); outline-offset: 2px; }
.xp-tl-block:not(.is-position):hover { overflow: visible; height: auto !important; min-height: var(--h); }
/* A position: one block, a segment per title at its dates. */
.xp-tl-block.is-position { padding: 0; }
.xp-tl-seg { position: absolute; left: 0; right: 0; box-sizing: border-box; padding: 0.5rem 0.75rem; overflow: hidden; }
.xp-tl-seg + .xp-tl-seg { border-top: 1px dashed color-mix(in srgb, var(--kc) 45%, white); }
.xp-tl-block.is-current { border-top: 3px solid var(--xp-accent-2); }
.xp-tl-block.is-dim { opacity: 0.28; }
.xp-tl-meta { margin: 0; font-size: 0.74rem; color: var(--xp-muted); font-weight: 600; }
.xp-tl-block h4 { margin: 0.1rem 0 0.25rem; font-size: 0.95rem; line-height: 1.25; }

/* ---- shared bits ---- */
.xp-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.xp-pill { display: inline-block; padding: 0.22rem 0.7rem; border-radius: 999px; background: var(--xp-soft); color: var(--xp-ink) !important; text-decoration: none !important; font-size: 0.86rem; font-weight: 500; }
.xp-pill:hover { background: color-mix(in srgb, var(--xp-accent) 12%, white); color: var(--xp-accent) !important; }
.xp-pill.is-soft { opacity: 0.8; }

/* ---- layout: the board beside the dock ---- */
/* Two columns in the page's content area: the board, and the dock — a sticky column whose tabs are
   "# Me" (the page's own heading + intro) and the last node opened, replaced by each new click (main.js). It sits in
   the content area's own padding, so it never runs into a layout's edge decoration. Below 1200px the
   dock stacks above the board (it opens with "Me", the intro). */
.xp-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(20rem, 32%, 27rem); grid-template-areas: "main dock";
  gap: clamp(1.5rem, 3vw, 2.75rem); align-items: start;
}
.xp-layout-main { grid-area: main; min-width: 0; container: xp-main / inline-size; }
.xp-dock {
  grid-area: dock; min-width: 0; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding-right: 0.6rem; color: var(--xp-ink);
}
/* The inline editor positions its chrome against the document, so the dock can't scroll on its own there. */
.xp-layout.is-editing .xp-dock { position: static; max-height: none; overflow: visible; }
.xp-layout.is-editing .xp-dock-tabs { display: none; }
@media (max-width: 1199px) {
  .xp-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "dock" "main"; }
  .xp-dock { position: static; max-height: none; overflow: visible; scroll-margin-top: 72px; }
}
/* The tab row stays put while a long tab scrolls under it. Before the app boots it's empty, so it holds
   one row's height (no jump when the tabs arrive). */
.xp-dock-tabs { position: sticky; top: 0; z-index: 2; background: var(--xp-card); padding-bottom: 0.75rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--xp-line); }
@media (scripting: enabled) { .xp-layout:not(.is-ready, .is-editing) .xp-dock-tabs { min-height: 2.95rem; } }
.xp-dtabs { display: flex; gap: 0.3rem; }   /* one row: a long node title truncates, "Me" never shrinks */
.xp-dtabs > .xp-dtab:first-child { flex: none; }
/* The node tab + its close button: the ✕ sits inside the pill's right end (a sibling, not nested in the tab button). */
.xp-dtab-wrap { position: relative; display: inline-flex; min-width: 0; max-width: 100%; }
.xp-dtab-wrap .xp-dtab { padding-right: 2.1rem; }
.xp-dtab-close {
  position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--xp-muted); font-size: 0.8rem; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.xp-dtab-close:hover { background: color-mix(in srgb, var(--xp-ink) 10%, transparent); color: var(--xp-ink); }
.xp-dtab-close:focus-visible { outline: 2px solid var(--xp-accent); outline-offset: 1px; }
.xp-dtab {
  display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; max-width: 100%; border: 0; border-radius: 999px;
  background: var(--xp-soft); color: var(--xp-muted); padding: 0.45rem 0.85rem;
  font: inherit; font-size: 0.86rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.xp-dtab:hover { color: var(--xp-ink); }
.xp-dtab.is-active { background: #fff; color: var(--xp-accent); box-shadow: 0 2px 8px rgba(20, 10, 30, 0.12), inset 0 0 0 1px var(--xp-line); }
.xp-dtab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Me": the tab stands in for the page heading, which stays in the document (for the outline and
   crawlers) but isn't shown twice. */
@media (scripting: enabled) {
  .xp-layout:not(.is-editing) .xp-dock-me header > h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.xp-dock-me:not([hidden]), .xp-panel { animation: xp-fade 0.25s ease-out both; }
.xp-dock-ssr[hidden], .xp-dock-node[hidden] { display: none; }
.xp-dock .xp-node-ssr { border: 0; padding: 0; }

/* ---- a node's view (its dock tab) ---- */
.xp-panel { color: var(--xp-ink); }
.xp-crumbs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.2rem; font-size: 0.8rem; color: var(--xp-muted); }
.xp-crumbs a { color: var(--xp-muted); }
.xp-panel-body { padding-bottom: 1.5rem; }
.xp-panel-kind { margin: 0.25rem 0 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--kc); }
.xp-panel-kind span { color: var(--xp-muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.xp-dot { margin: 0 0.15rem; }
.xp-panel h2 { margin: 0.25rem 0 0.4rem; font-size: 1.5rem; line-height: 1.2; outline: none; }
/* An experience's heading-kind links (its organization, then its role), one line each under the title. */
.xp-panel-heads { display: grid; gap: 0.3rem; margin: 0 0 0.85rem; }
/* A position's earlier titles sit right under the heading lines, above the tagline. */
.xp-sec.xp-panel-titles { margin: 0 0 1rem; }
.xp-panel-titles .xp-titles { gap: 0.35rem; }
.xp-panel-head { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; font-size: 0.95rem; }
.xp-head-link { display: inline-flex; align-items: baseline; gap: 0.45rem; font-weight: 600; color: var(--xp-ink) !important; text-decoration: none !important; }
.xp-head-link:hover { color: var(--kc) !important; }
.xp-panel-summary { margin: 0 0 0.9rem; font-size: 1.05rem; color: var(--xp-muted); }
.xp-panel-image { display: block; max-width: 100%; height: auto; border-radius: 10px; margin: 0.5rem 0 1rem; box-shadow: var(--xp-shadow); }
.xp-prose { font-size: 0.97rem; }
.xp-prose ul { padding-left: 1.2rem; }
.xp-sec { margin-top: 1.4rem; }
.xp-sec h3 { font-size: 0.95rem; margin: 0 0 0.55rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--xp-muted); }
.xp-rows, .xp-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.xp-rows a, .xp-title-name { font-weight: 600; }
.xp-subsec + .xp-subsec { margin-top: 0.8rem; }
.xp-subsec h4 { margin: 0 0 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--xp-muted); }
.xp-row-sum { display: block; font-size: 0.86rem; color: var(--xp-muted); }
.xp-panel-pos { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--xp-muted); }
.xp-panel-pos a { font-weight: 600; }
.xp-sec-note { text-transform: none; letter-spacing: 0; font-weight: 500; }
.xp-links li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.xp-rel { font-size: 0.78rem; color: var(--xp-muted); font-style: italic; }
.xp-emph { font-size: 0.6rem; color: var(--xp-accent); letter-spacing: 1px; }
.xp-note { flex: 1 0 100%; margin: 0 0 0.25rem 0.75rem; padding-left: 0.75rem; border-left: 2px solid var(--xp-line); font-size: 0.9rem; }
.xp-note p { margin: 0; }
.xp-links .xp-nested { flex: 1 0 100%; margin: 0.15rem 0 0.2rem 0.75rem; padding-left: 0.75rem; border-left: 2px dotted var(--xp-line); }
/* "Used in": a title that wraps beside dates that never do. */
.xp-used { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.xp-used li { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid var(--xp-line); }
.xp-used li:last-child { border-bottom: 0; }
.xp-used-title { flex: 1 1 0; min-width: 0; font-weight: 600; text-decoration: none; }
.xp-used-dates { flex: none; white-space: nowrap; font-size: 0.8rem; color: var(--xp-muted); }
.xp-tags { flex: 1 0 100%; margin: 0 0 0.2rem 0.75rem; }
.xp-tag-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; }
.xp-tag { display: inline-block; padding: 0.08rem 0.45rem; border-radius: 5px; border: 1px solid var(--xp-line); background: #fff; color: var(--xp-ink) !important; text-decoration: none !important; font-size: 0.76rem; font-weight: 600; }
.xp-tag:hover { border-color: var(--xp-accent); color: var(--xp-accent) !important; }
.xp-tagnotes { margin: 0.3rem 0 0; font-size: 0.85rem; display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; }
.xp-tagnotes dt { font-weight: 600; color: var(--xp-muted); }
.xp-tagnotes dd { margin: 0; }
.xp-tagnotes dd p { margin: 0; }
.xp-ext { font-weight: 600; }
.xp-btn { border: 0; border-radius: 999px; padding: 0.6rem 1.1rem; background: var(--xp-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; margin-top: 1rem; }
@media (max-width: 640px) {
  .xp-tab { padding: 0.45rem 0.7rem; font-size: 0.84rem; }
}

/* ---- motion ---- */
@keyframes xp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes xp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes xp-fade-out { to { opacity: 0; } }
/* Switching views is the one View Transition: the board fades out and the new view rises in. */
::view-transition-old(xp-stage) { animation: 0.2s ease-in both xp-fade-out; }
::view-transition-new(xp-stage) { animation: 0.35s ease-out both xp-in; }
@media (prefers-reduced-motion: reduce) {
  .xp-chip, .xp-card, .xp-tl-block, .xp-panel, .xp-dock-me { animation: none !important; }
}
