/* ══════════════════════════════════════════════════════════════
   Keln — the wiki.

   Companion to lib/wiki.js (the pages) and public/wiki.js (the life
   in them). The same material as the rest of Keln: glass over a
   star field, serif for words, mono for machine readouts. Every
   constellation has a hue, and a page takes its constellation's
   hue, so you always know where in the sky you are.

   Motion is slow and settles; nothing here moves for its own sake
   except the stars, which twinkle the way stars do. Reduced motion
   zeroes the theme's duration tokens, and the rules at the bottom
   stop the rest.
   ══════════════════════════════════════════════════════════════ */

.h-gold   { --hue: var(--gold); }
.h-teal   { --hue: var(--accent2); }
.h-blue   { --hue: var(--accent); }
.h-violet { --hue: var(--stage-alumni); }
.h-rose   { --hue: var(--hot); }

.wk-body { overflow-x: hidden; }
.wk-body .hbar__in { max-width: 1240px; }

/* The star field behind everything (drawn by wiki.js). */
.wk-stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: .85;
}
/* On a page of reading, the sky stays further back. */
.wk-body--page .wk-stars { opacity: .4; }

.wk {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--s-10) var(--s-10) 96px;
}

/* ══ THE INDEX ═══════════════════════════════════════════════ */
.wk-hero {
  max-width: 760px;
  margin: 40px auto var(--s-12);
  text-align: center;
}
.wk-hero .heyebrow { justify-content: center; }
.wk-h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -.02em;
  margin: var(--s-6) 0 var(--s-8);
  animation: wk-rise .9s var(--ease-out) both;
}
.wk-h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--accent2), var(--accent) 55%, var(--stage-alumni));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wk-lede {
  font-size: var(--t-lg);
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  animation: wk-rise .9s .08s var(--ease-out) both;
}
@keyframes wk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── Search ── */
.wk-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin: var(--s-12) auto 0;
  max-width: 640px;
  padding: var(--s-6) var(--s-8);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: linear-gradient(162deg, rgba(30, 38, 52, .66), rgba(10, 14, 22, .82));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: var(--e-float), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color var(--d-fast) ease, box-shadow var(--d-base) ease;
  animation: wk-rise .9s .16s var(--ease-out) both;
  z-index: 20;
}
.wk-search:focus-within {
  border-color: var(--border-hi);
  box-shadow: var(--e-float), 0 0 0 4px rgba(34, 211, 166, .12), 0 0 60px rgba(34, 211, 166, .12);
}
.wk-search__ico { color: var(--accent2); display: inline-flex; }
.wk-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--t-lg);
}
.wk-search input::placeholder { color: var(--dim); }
.wk-search input::-webkit-search-cancel-button { display: none; }
.wk-kbd {
  font-size: var(--t-2xs);
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: var(--s-1) var(--s-4);
}
.wk-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  max-height: min(62vh, 520px);
  overflow-y: auto;
  padding: var(--s-4);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-hi);
  background: linear-gradient(162deg, rgba(24, 31, 44, .97), rgba(10, 14, 22, .985));
  box-shadow: var(--e-over), 0 0 50px rgba(34, 211, 166, .1);
  text-align: left;
  animation: wk-drop var(--d-base) var(--ease-spring) both;
  scrollbar-width: thin;
}
.wk-results[hidden] { display: none; }
@keyframes wk-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.wk-hit {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: var(--s-6);
  align-items: center;
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--d-fast) ease;
}
.wk-hit[aria-selected="true"], .wk-hit:hover { background: rgba(34, 211, 166, .09); }
.wk-hit__ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hue, var(--accent2));
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue, var(--accent2)) 32%, transparent), rgba(6, 10, 16, .6));
  border: 1px solid color-mix(in srgb, var(--hue, var(--accent2)) 40%, transparent);
}
.wk-hit__t { font-size: var(--t-md); font-weight: 600; display: block; }
.wk-hit__t mark { background: none; color: var(--accent2); }
.wk-hit__s { font-size: var(--t-sm); color: var(--muted); display: block; margin-top: var(--s-1); }
.wk-hit__a { font-family: var(--mono); font-size: var(--t-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.wk-hit.is-coming { opacity: .7; }
.wk-none { padding: var(--s-8); color: var(--muted); font-size: var(--t-base); text-align: center; }

/* ── The star chart ── */
.wk-chart { margin: 40px 0 var(--s-12); }
.wk-chart__frame {
  position: relative;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 70% at 30% 30%, rgba(91, 140, 255, .1), transparent 70%),
    radial-gradient(50% 60% at 75% 70%, rgba(194, 122, 255, .08), transparent 70%),
    linear-gradient(180deg, rgba(8, 12, 20, .72), rgba(4, 7, 12, .86));
  box-shadow: var(--e-float), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
  animation: wk-rise 1.1s .22s var(--ease-out) both;
}
.wk-sky {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 50%;
  transition: transform .9s cubic-bezier(.7, 0, .2, 1), opacity .9s ease;
}
.wk-sky.is-flying { opacity: .2; }

.wk-c__line {
  fill: none;
  stroke: var(--hue);
  stroke-width: 1;
  stroke-opacity: .32;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: wk-draw 1.6s calc(.5s + var(--g) * .12s) var(--ease-out) forwards;
  transition: stroke-opacity var(--d-base) ease, stroke-width var(--d-base) ease;
}
@keyframes wk-draw { to { stroke-dashoffset: 0; } }
.wk-c__name {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: .24em;
  fill: var(--hue);
  fill-opacity: .55;
  transition: fill-opacity var(--d-base) ease;
  pointer-events: none;
}
.wk-c.is-lit .wk-c__line { stroke-opacity: .85; stroke-width: 1.4; }
.wk-c.is-lit .wk-c__name { fill-opacity: 1; }
.wk-sky.has-focus .wk-c:not(.is-lit) { opacity: .45; transition: opacity var(--d-base) ease; }

.wk-s { cursor: pointer; outline: none; }
.wk-s__core {
  fill: #fff;
  filter: drop-shadow(0 0 3px var(--hue)) drop-shadow(0 0 8px var(--hue));
  transform-box: fill-box;
  transform-origin: center;
  animation: wk-pop .7s calc(.4s + var(--i) * .025s) var(--ease-spring) both, wk-twinkle calc(3.2s + var(--m) * .4s) calc(var(--i) * .17s) ease-in-out infinite;
  transition: transform var(--d-base) var(--ease-spring);
}
.wk-s__halo {
  fill: var(--hue);
  opacity: .1;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity var(--d-base) ease, transform var(--d-base) var(--ease-spring);
}
.wk-s__ring {
  fill: none;
  stroke: var(--hue);
  stroke-width: 1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.6);
  transition: opacity var(--d-base) ease, transform var(--d-base) var(--ease-spring);
}
.wk-s__hit { fill: transparent; }
.wk-s:hover .wk-s__core, .wk-s:focus-visible .wk-s__core, .wk-s.is-hot .wk-s__core { transform: scale(1.6); }
.wk-s:hover .wk-s__halo, .wk-s:focus-visible .wk-s__halo, .wk-s.is-hot .wk-s__halo { opacity: .3; transform: scale(1.3); }
.wk-s:hover .wk-s__ring, .wk-s:focus-visible .wk-s__ring, .wk-s.is-hot .wk-s__ring { opacity: .9; transform: scale(1); }
.wk-s.is-coming .wk-s__core { fill: none; stroke: var(--hue); stroke-width: 1; filter: none; opacity: .75; }
.wk-s.is-coming .wk-s__halo { opacity: .04; }
.wk-s.is-coming .wk-s__ring { stroke-dasharray: 2 3; }
@keyframes wk-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes wk-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }

.wk-tip {
  position: absolute;
  z-index: 5;
  width: 280px;
  padding: var(--s-7) var(--s-8);
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--hue, var(--accent2)) 55%, transparent);
  background: rgba(8, 12, 20, .94);
  box-shadow: var(--e-over), 0 0 40px color-mix(in srgb, var(--hue, var(--accent2)) 22%, transparent);
  pointer-events: none;
  /* `translate`, not `transform`: the entrance animation owns transform. */
  translate: -50% calc(-100% - 18px);
  animation: wk-drop var(--d-fast) var(--ease-out) both;
}
.wk-tip[hidden] { display: none; }
.wk-tip__a { font-family: var(--mono); font-size: var(--t-2xs); letter-spacing: .18em; text-transform: uppercase; color: var(--hue, var(--accent2)); }
.wk-tip__t { font-size: var(--t-xl); font-weight: 600; margin: var(--s-2) 0 var(--s-3); }
.wk-tip__s { font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }
.wk-tip__soon { margin-top: var(--s-4); font-family: var(--mono); font-size: var(--t-2xs); color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }

.wk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-10);
  justify-content: center;
  margin-top: var(--s-7);
  font-size: var(--t-2xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}
.wk-legend span { display: inline-flex; align-items: center; gap: var(--s-4); }
.wk-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wk-legend__live { background: #fff; box-shadow: 0 0 8px var(--accent2); }
.wk-legend__coming { border: 1px dashed var(--gold); }
.wk-legend__hint { opacity: .7; }

/* ── Constellations, listed ── */
/* Masonry by columns: a constellation with eight stars and one with
   two sit together without a tall empty card between them. */
.wk-areas {
  columns: 3 340px;
  column-gap: var(--s-10);
}
.wk-areas > .wk-area { break-inside: avoid; margin-bottom: var(--s-10); }
.wk-area {
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: linear-gradient(162deg, rgba(30, 38, 52, .5), rgba(12, 17, 25, .72));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--e-card), inset 0 1px 0 rgba(255, 255, 255, .04);
  padding: var(--s-10);
  scroll-margin-top: 88px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--d-base) ease, transform var(--d-base) var(--ease-out);
}
.wk-area::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hue), transparent);
  opacity: .6;
}
.wk-area:hover { border-color: color-mix(in srgb, var(--hue) 45%, transparent); }
.wk-area.is-seen { animation: wk-rise .8s var(--ease-out) both; }
.wk-area__head { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-7); align-items: start; margin-bottom: var(--s-8); }
.wk-area__orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hue);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 35%, transparent), rgba(6, 10, 16, .7) 70%);
  border: 1px solid color-mix(in srgb, var(--hue) 45%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--hue) 25%, transparent);
}
.wk-area__name { font-size: var(--t-2xl); font-weight: 600; }
.wk-area__blurb { font-size: var(--t-sm); color: var(--muted); line-height: 1.55; margin-top: var(--s-2); }
.wk-area__n { font-size: var(--t-xs); color: var(--hue); border: 1px solid color-mix(in srgb, var(--hue) 40%, transparent); border-radius: var(--r-pill); padding: var(--s-1) var(--s-5); }
.wk-area__list { list-style: none; display: flex; flex-direction: column; gap: var(--s-2); }
.wk-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: var(--s-6);
  align-items: center;
  padding: var(--s-5) var(--s-6);
  border-radius: var(--r-md);
  transition: background var(--d-fast) ease, transform var(--d-base) var(--ease-out);
}
.wk-row:hover { background: color-mix(in srgb, var(--hue) 9%, transparent); transform: translateX(3px); }
.wk-row:focus-visible { outline: 2px solid var(--hue); outline-offset: 1px; }
.wk-row__ico { grid-row: span 2; color: var(--hue); display: inline-flex; opacity: .85; }
.wk-row__t { font-size: var(--t-md); font-weight: 600; }
.wk-row__s { grid-column: 2; font-size: var(--t-sm); color: var(--muted); line-height: 1.45; }
.wk-row__soon { grid-row: 1 / span 2; grid-column: 3; font-size: var(--t-2xs); letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.wk-row.is-coming .wk-row__t, .wk-row.is-coming .wk-row__ico { opacity: .6; }

/* ══ A FEATURE PAGE ══════════════════════════════════════════ */
.wk-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: var(--t-2xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: var(--s-10);
}
.wk-crumbs a:hover { color: var(--ink); }
.wk-crumbs [aria-current] { color: var(--hue); }

.wk-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 200px;
  gap: 48px;
  align-items: start;
}

/* ── Left: every constellation ── */
.wk-nav { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding-right: var(--s-2); }
.wk-search--mini { margin: 0 0 var(--s-8); padding: var(--s-4) var(--s-6); max-width: none; animation: none; }
.wk-search--mini input { font-size: var(--t-base); }
.wk-search--mini .wk-results { width: 360px; right: auto; }
.wk-nav__area { margin-bottom: var(--s-3); }
.wk-nav__area summary {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  list-style: none;
  cursor: pointer;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: var(--t-2xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--d-fast) ease, background var(--d-fast) ease;
}
.wk-nav__area summary::-webkit-details-marker { display: none; }
.wk-nav__area summary:hover { color: var(--ink); background: rgba(255, 255, 255, .03); }
.wk-nav__area[open] summary { color: var(--hue); }
.wk-nav__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 8px var(--hue); }
.wk-nav__n { margin-left: auto; opacity: .6; }
.wk-nav__area ul { list-style: none; padding: var(--s-2) 0 var(--s-4) var(--s-8); border-left: 1px solid color-mix(in srgb, var(--hue) 25%, transparent); margin-left: var(--s-5); }
.wk-nav__area a {
  display: block;
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  color: var(--muted);
  transition: color var(--d-fast) ease, background var(--d-fast) ease;
}
.wk-nav__area a:hover { color: var(--ink); }
.wk-nav__area a[aria-current] { color: var(--ink); background: color-mix(in srgb, var(--hue) 14%, transparent); }
.wk-nav__area a.is-coming { opacity: .55; }

/* ── The article ── */
.wk-art { min-width: 0; }
.wk-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-12);
  align-items: center;
  padding: var(--s-12);
  border-radius: var(--r-2xl);
  border: 1px solid color-mix(in srgb, var(--hue) 30%, var(--border));
  background:
    radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--hue) 16%, transparent), transparent 70%),
    linear-gradient(162deg, rgba(30, 38, 52, .6), rgba(10, 14, 22, .8));
  box-shadow: var(--e-float), inset 0 1px 0 rgba(255, 255, 255, .05);
  margin-bottom: 40px;
  animation: wk-rise .8s var(--ease-out) both;
}
.wk-head__orb { position: relative; width: 120px; height: 120px; }
.wk-head__core {
  position: absolute;
  inset: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hue);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 45%, #fff 0%), rgba(6, 10, 16, .8) 72%);
  box-shadow: 0 0 40px color-mix(in srgb, var(--hue) 40%, transparent), inset 0 0 16px rgba(255, 255, 255, .12);
}
.wk-head__core svg { width: 26px; height: 26px; }
.wk-head__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hue) 40%, transparent);
  animation: wk-spin 18s linear infinite;
}
.wk-head__ring::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--hue);
  box-shadow: 0 0 10px var(--hue);
}
.wk-head__ring--2 { inset: 14px; border-style: dashed; opacity: .6; animation-duration: 11s; animation-direction: reverse; }
@keyframes wk-spin { to { transform: rotate(360deg); } }
.wk-head__area { font-size: var(--t-2xs); letter-spacing: .2em; text-transform: uppercase; color: var(--hue); }
.wk-head__title { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; font-weight: 500; letter-spacing: -.015em; margin: var(--s-4) 0 var(--s-6); }
.wk-head__sum { font-size: var(--t-lg); color: var(--muted); line-height: 1.55; max-width: 620px; }
.wk-head__meta { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; margin-top: var(--s-10); }

.wk-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-7);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: var(--t-2xs);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.wk-pill i { width: 7px; height: 7px; border-radius: 50%; }
.wk-pill--live { color: var(--accent2); border: 1px solid rgba(34, 211, 166, .4); background: rgba(34, 211, 166, .07); }
.wk-pill--live i { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); animation: wk-twinkle 2.4s ease-in-out infinite; }
.wk-pill--coming { color: var(--gold); border: 1px dashed color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.wk-pill--coming i { border: 1px solid var(--gold); }

.wk-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-8);
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--hue, var(--accent2)) 60%, transparent);
  background: color-mix(in srgb, var(--hue, var(--accent2)) 14%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--d-fast) ease, box-shadow var(--d-base) ease, transform var(--d-base) var(--ease-spring);
}
.wk-btn:hover { background: color-mix(in srgb, var(--hue, var(--accent2)) 24%, transparent); box-shadow: 0 0 28px color-mix(in srgb, var(--hue, var(--accent2)) 28%, transparent); transform: translateY(-1px); }
.wk-btn:active { transform: translateY(0) scale(.98); }
.wk-btn:focus-visible { outline: 2px solid var(--hue, var(--accent2)); outline-offset: 2px; }
.wk-btn--ghost { background: none; border-color: var(--border); color: var(--muted); }
.wk-btn--ghost:hover { color: var(--ink); }
.wk-btn.is-disabled { cursor: default; opacity: .8; border-style: dashed; }
.wk-btn.is-disabled:hover { transform: none; box-shadow: none; background: none; }
.wk-btn svg { width: 15px; height: 15px; }

.wk-sec { margin: 0 0 56px; scroll-margin-top: 88px; }
.wk-sec.is-seen { animation: wk-rise .7s var(--ease-out) both; }
.wk-h2 {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  font-size: var(--t-3xl);
  font-weight: 500;
  margin-bottom: var(--s-9);
}
.wk-h2::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hue);
  box-shadow: 0 0 10px var(--hue), 0 0 2px var(--hue);
  flex-shrink: 0;
}
.wk-p { font-size: var(--t-lg); line-height: 1.75; color: var(--ink); max-width: 720px; }

.wk-caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-7); }
.wk-cap {
  position: relative;
  padding: var(--s-9) var(--s-9) var(--s-10);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(162deg, rgba(30, 38, 52, .45), rgba(12, 17, 25, .65));
  transition: border-color var(--d-base) ease, transform var(--d-base) var(--ease-out), box-shadow var(--d-base) ease;
}
.wk-sec.is-seen .wk-cap { animation: wk-rise .6s calc(var(--i) * .05s) var(--ease-out) both; }
.wk-cap:hover { border-color: color-mix(in srgb, var(--hue) 45%, transparent); transform: translateY(-3px); box-shadow: var(--e-card), 0 0 30px color-mix(in srgb, var(--hue) 12%, transparent); }
.wk-cap__n { font-size: var(--t-2xs); color: var(--hue); letter-spacing: .1em; }
.wk-cap__t { font-size: var(--t-lg); font-weight: 600; margin: var(--s-4) 0 var(--s-3); }
.wk-cap__d { font-size: var(--t-base); color: var(--muted); line-height: 1.6; }

.wk-steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: var(--s-6); max-width: 720px; }
.wk-steps li {
  counter-increment: step;
  position: relative;
  padding: var(--s-7) var(--s-9) var(--s-7) 64px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(10, 14, 22, .5);
  font-size: var(--t-md);
  line-height: 1.6;
}
.wk-steps li::before {
  content: counter(step);
  position: absolute;
  left: var(--s-8);
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--bg);
  background: var(--hue);
  box-shadow: 0 0 16px color-mix(in srgb, var(--hue) 50%, transparent);
}
.wk-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(var(--s-8) + 15px);
  top: calc(50% + 17px);
  width: 1px;
  height: calc(100% - 20px);
  background: linear-gradient(var(--hue), transparent);
  opacity: .4;
}

/* ── In your coaching ── */
.wk-chips { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-9); }
.wk-chip {
  padding: var(--s-3) var(--s-7);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(10, 14, 22, .5);
  color: var(--muted);
  font: inherit;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: color var(--d-fast) ease, border-color var(--d-fast) ease, background var(--d-fast) ease, transform var(--d-base) var(--ease-spring);
}
.wk-chip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--hue) 40%, transparent); }
.wk-chip[aria-checked="true"] { color: var(--ink); border-color: var(--hue); background: color-mix(in srgb, var(--hue) 16%, transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--hue) 22%, transparent); }
.wk-chip:active { transform: scale(.95); }
.wk-chip:focus-visible { outline: 2px solid var(--hue); outline-offset: 2px; }
.wk-example {
  position: relative;
  max-width: 760px;
  padding: var(--s-12) 40px var(--s-10) 64px;
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in srgb, var(--hue) 35%, transparent);
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--hue) 12%, transparent), transparent 70%), rgba(10, 14, 22, .55);
}
.wk-example__mark { position: absolute; left: var(--s-9); top: var(--s-4); font-size: 64px; line-height: 1; color: var(--hue); opacity: .55; font-family: var(--serif); }
.wk-example p { font-size: var(--t-xl); line-height: 1.6; font-style: italic; transition: opacity var(--d-base) ease, filter var(--d-base) ease; }
.wk-example.is-swapping p { opacity: 0; filter: blur(4px); }
.wk-example__who { margin-top: var(--s-7); font-size: var(--t-2xs); letter-spacing: .16em; text-transform: uppercase; color: var(--hue); }

/* ── Live demo ── */
.wk-demo {
  border-radius: var(--r-2xl);
  border: 1px solid color-mix(in srgb, var(--hue) 35%, var(--border));
  overflow: hidden;
  background: linear-gradient(180deg, rgba(8, 12, 20, .8), rgba(4, 7, 12, .9));
  box-shadow: var(--e-float);
}
.wk-demo__stage {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wk-demo__stage.is-inline { display: block; min-height: 0; padding: var(--s-8); }
.wk-demo__art { position: absolute; inset: 0; }
.wk-demo__art i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--sz);
  height: var(--sz);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px var(--hue);
  animation: wk-twinkle var(--t) var(--dl) ease-in-out infinite;
}
.wk-demo__planet {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--hue) 70%, #fff 0%), color-mix(in srgb, var(--hue) 25%, #000) 60%, #02040a 100%);
  box-shadow: 0 0 80px color-mix(in srgb, var(--hue) 40%, transparent), inset -20px -20px 40px rgba(0, 0, 0, .6);
  animation: wk-float 6s ease-in-out infinite;
}
.wk-demo__planet::before {
  content: '';
  position: absolute;
  inset: -34px -60px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hue) 55%, transparent);
  transform: rotate(-18deg) scaleY(.32);
}
@keyframes wk-float { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
.wk-demo__bar {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  justify-content: space-between;
  padding: var(--s-8) var(--s-10);
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 22, .6);
}
.wk-demo__cap { font-size: var(--t-base); color: var(--muted); line-height: 1.5; }
.wk-fine { margin-top: var(--s-6); font-size: var(--t-sm); color: var(--dim); }

/* The grid demo: a little dashboard to rearrange. */
.wk-mini { height: 100%; padding: var(--s-7) var(--s-8); display: flex; flex-direction: column; gap: var(--s-4); }
.wk-mini__bar { height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--hue), transparent); opacity: .5; width: var(--w); }
.wk-mini__big { font-family: var(--mono); font-size: var(--t-3xl); color: var(--ink); }
.wk-mini__lbl { font-family: var(--mono); font-size: var(--t-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ── Notes, plans ── */
.wk-notes { list-style: none; display: flex; flex-direction: column; gap: var(--s-5); max-width: 720px; }
.wk-notes li { position: relative; padding-left: var(--s-11); font-size: var(--t-md); line-height: 1.65; color: var(--ink); }
.wk-notes li::before { content: ''; position: absolute; left: var(--s-3); top: .65em; width: 10px; height: 10px; border: 1px solid var(--hue); transform: rotate(45deg); }
.wk-plans {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-5);
  max-width: 760px;
  padding: var(--s-8) var(--s-10);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(10, 14, 22, .5);
  font-size: var(--t-md);
  line-height: 1.6;
}
.wk-plans > span:first-child { color: var(--gold); display: inline-flex; }
.wk-plans a { color: var(--accent2); margin-left: auto; font-size: var(--t-sm); }
.wk-plans a:hover { text-decoration: underline; }

/* ── Ask Aris ── */
.wk-ask__form {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  max-width: 760px;
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-6);
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(10, 14, 22, .65);
  transition: border-color var(--d-fast) ease, box-shadow var(--d-base) ease;
}
.wk-ask__form:focus-within { border-color: var(--border-hi); box-shadow: 0 0 0 4px rgba(34, 211, 166, .1), 0 0 40px rgba(34, 211, 166, .1); }
.wk-ask__probe {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  background: radial-gradient(circle at 35% 30%, rgba(34, 211, 166, .35), rgba(6, 10, 16, .7));
  box-shadow: 0 0 20px rgba(34, 211, 166, .3);
  flex-shrink: 0;
}
.wk-ask.is-thinking .wk-ask__probe { animation: wk-think 1.2s ease-in-out infinite; }
@keyframes wk-think { 0%, 100% { box-shadow: 0 0 10px rgba(34, 211, 166, .3); transform: scale(1); } 50% { box-shadow: 0 0 34px rgba(34, 211, 166, .7); transform: scale(1.08); } }
.wk-ask__form input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-md); }
.wk-ask__form input::placeholder { color: var(--dim); }
.wk-ask__out { max-width: 760px; }
.wk-ask__out:empty { display: none; }
.wk-answer {
  margin-top: var(--s-7);
  padding: var(--s-9) var(--s-10);
  border-radius: var(--r-lg);
  border: 1px solid rgba(34, 211, 166, .25);
  background: linear-gradient(162deg, rgba(34, 211, 166, .06), rgba(10, 14, 22, .6));
  font-size: var(--t-md);
  line-height: 1.7;
  animation: wk-rise .5s var(--ease-out) both;
}
.wk-answer p + p, .wk-answer ul + p, .wk-answer ol + p, .wk-answer p + ul, .wk-answer p + ol { margin-top: var(--s-5); }
.wk-answer ul, .wk-answer ol { padding-left: var(--s-11); }
.wk-answer li + li { margin-top: var(--s-2); }
.wk-answer em { color: var(--muted); }
.wk-answer__q { font-family: var(--mono); font-size: var(--t-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--accent2); margin-bottom: var(--s-4); }
.wk-answer__links { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-7); }
.wk-answer__links a {
  padding: var(--s-3) var(--s-7);
  border-radius: var(--r-pill);
  border: 1px solid rgba(34, 211, 166, .4);
  font-size: var(--t-sm);
  color: var(--ink);
  transition: background var(--d-fast) ease;
}
.wk-answer__links a:hover { background: rgba(34, 211, 166, .12); }
.wk-caret { display: inline-block; width: 7px; height: 1em; vertical-align: -2px; background: var(--accent2); margin-left: var(--s-1); animation: wk-twinkle .9s steps(2) infinite; }

/* ── Nearby, pager ── */
.wk-near { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-7); }
.wk-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s-6);
  row-gap: var(--s-2);
  padding: var(--s-8);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: rgba(10, 14, 22, .5);
  transition: border-color var(--d-base) ease, transform var(--d-base) var(--ease-out);
}
.wk-card:hover { border-color: color-mix(in srgb, var(--hue) 50%, transparent); transform: translateY(-3px); }
.wk-card__ico { grid-row: span 2; color: var(--hue); display: inline-flex; }
.wk-card__t { font-weight: 600; font-size: var(--t-md); }
.wk-card__s { font-size: var(--t-sm); color: var(--muted); line-height: 1.5; }
.wk-card.is-coming { opacity: .65; }

.wk-pager { display: flex; justify-content: space-between; gap: var(--s-8); padding-top: var(--s-10); border-top: 1px solid var(--border); }
.wk-pager a { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-6) var(--s-8); border-radius: var(--r-md); transition: background var(--d-fast) ease; max-width: 48%; }
.wk-pager a:hover { background: rgba(255, 255, 255, .03); }
.wk-pager span { font-size: var(--t-2xs); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.wk-pager b { font-size: var(--t-lg); font-weight: 600; }
.wk-pager__r { text-align: right; margin-left: auto; }

/* ── Right: on this page ── */
.wk-toc { position: sticky; top: 84px; }
.wk-toc__h { font-size: var(--t-2xs); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: var(--s-6); }
.wk-toc ol { list-style: none; border-left: 1px solid var(--border); }
.wk-toc a {
  display: block;
  padding: var(--s-3) var(--s-7);
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: var(--t-sm);
  color: var(--muted);
  transition: color var(--d-fast) ease, border-color var(--d-fast) ease;
}
.wk-toc a:hover { color: var(--ink); }
.wk-toc a.is-on { color: var(--hue); border-left-color: var(--hue); }

.wk-foot {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--s-10);
  text-align: center;
  font-size: var(--t-sm);
  color: var(--dim);
}
.wk-foot a:hover { color: var(--ink); }

/* ══ The fly-in: a star grows into the page ══════════════════ */
.wk-warp {
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--hue) 40%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  transition: transform .62s cubic-bezier(.7, 0, .2, 1), opacity .62s ease;
}
.wk-warp.is-go { transform: translate(-50%, -50%) scale(260); opacity: .92; }

/* ══ Narrower screens ════════════════════════════════════════ */
@media (max-width: 1180px) {
  .wk-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .wk-toc { display: none; }
}
@media (max-width: 860px) {
  .wk { padding: var(--s-8) var(--s-8) 72px; }
  .wk-layout { grid-template-columns: 1fr; gap: var(--s-10); }
  .wk-nav { position: static; max-height: none; order: 2; }
  .wk-head { grid-template-columns: 1fr; padding: var(--s-10); gap: var(--s-8); }
  .wk-head__orb { width: 84px; height: 84px; }
  .wk-head__core { inset: 22px; }
  .wk-areas { columns: 1; }
  .wk-demo__bar { flex-direction: column; align-items: stretch; }
  .wk-example { padding: 40px var(--s-9) var(--s-9); }
  .wk-search--mini .wk-results { width: auto; right: 0; }
}

/* ══ Reduced motion ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .wk-h1, .wk-lede, .wk-search, .wk-chart__frame, .wk-head, .wk-area.is-seen, .wk-sec.is-seen, .wk-sec.is-seen .wk-cap,
  .wk-s__core, .wk-head__ring, .wk-pill--live i, .wk-demo__planet, .wk-demo__art i, .wk-answer, .wk-results, .wk-tip { animation: none; }
  .wk-c__line { animation: none; stroke-dashoffset: 0; }
  .wk-sky, .wk-warp { transition: none; }
}
html[data-fx="smooth"] .wk-area,
html[data-fx="smooth"] .wk-search { backdrop-filter: none; -webkit-backdrop-filter: none; }
