/* Website V2 — inner pages (knowledge graph, about). Prefixes: .w2kg-, .w2ab- */

/* ============================ Knowledge graph ============================ */
.w2kg { position: relative; height: 100vh; height: 100dvh; overflow: clip; background: var(--bg); }
.w2kg__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.w2kg__canvas.grabbing { cursor: grabbing; }
.w2kg__canvas.point { cursor: pointer; }
.w2kg__vig { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, var(--bg) 100%); }

/* floating title */
.w2kg__title { position: absolute; top: 96px; left: clamp(20px, 4vw, 48px); z-index: 5; max-width: 420px; pointer-events: none; }
.w2kg__title > * { pointer-events: auto; }
.w2kg__h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4rem); line-height: 1.0;
  letter-spacing: -0.02em; color: var(--text); margin: 14px 0 0; }
.w2kg__h1 em { font-style: italic; color: var(--accent-text); }
.w2kg__sub { margin: 14px 0 0; font-size: var(--text-sm); line-height: 1.6; color: var(--text-secondary); max-width: 30rem; }

/* legend / filters */
/* The legend is a single frosted panel so the filters read as a control surface,
   not loose chips floating over (and blending into) the live graph. The panel
   carries the blur; the pills inside no longer need their own (cheaper, too). */
.w2kg__legend { position: absolute; left: clamp(20px, 4vw, 48px); bottom: 24px; z-index: 5; display: flex; flex-direction: column; gap: 9px;
  padding: 13px 15px; max-width: min(460px, calc(100vw - 40px));
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.w2kg__legend-lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint); }
.w2kg__chips { display: flex; gap: 7px; flex-wrap: wrap; max-width: 100%; }
.w2kg__chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .02em; white-space: nowrap; flex: none; color: var(--text-muted); background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full); cursor: pointer; transition: var(--transition-colors), transform .2s var(--ease-out); }
.w2kg__chip:hover { transform: translateY(-1px); color: var(--text-secondary); border-color: var(--border); }
.w2kg__chip i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--dc); transition: box-shadow .2s; }
.w2kg__chip--on { color: var(--text); border-color: color-mix(in oklab, var(--dc) 50%, var(--border)); background: color-mix(in oklab, var(--dc) 12%, var(--surface)); }
.w2kg__chip--on i { box-shadow: 0 0 8px color-mix(in oklab, var(--dc) 70%, transparent); }
.w2kg__chip--off { opacity: .45; }
.w2kg__chip--off i { background: var(--text-faint); }

/* stats + hint */
.w2kg__hud { position: absolute; right: clamp(20px, 4vw, 48px); bottom: 24px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.w2kg__stats { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 8px 16px; }
.w2kg__stats b { color: var(--text); font-weight: 600; }
.w2kg__hint { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); }
.w2kg__reset { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  color: var(--text-muted); background: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  padding: 6px 12px; cursor: pointer; transition: var(--transition-colors); }
.w2kg__reset:hover { color: var(--text); border-color: var(--border-strong); }

/* detail panel */
.w2kg__panel { position: absolute; top: 84px; right: clamp(16px, 2.5vw, 32px); bottom: 84px; z-index: 6; width: min(340px, calc(100vw - 48px));
  display: flex; flex-direction: column; gap: 0; padding: 22px;
  background: color-mix(in oklab, var(--surface) 86%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); box-shadow: 0 24px 80px -24px rgba(0,0,0,.6);
  transform: translateX(24px); opacity: 0; pointer-events: none; transition: transform .45s var(--ease-out), opacity .45s var(--ease-out); overflow: auto; }
.w2kg__panel--in { transform: none; opacity: 1; pointer-events: auto; }
.w2kg__panel-x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: var(--radius-md); background: var(--surface-2); border: none; color: var(--text-muted); cursor: pointer; transition: var(--transition-colors); }
.w2kg__panel-x:hover { color: var(--text); background: var(--surface-3); }
.w2kg__ptype { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted); }
.w2kg__ptype i { width: 9px; height: 9px; border-radius: 50%; background: var(--dc); }
.w2kg__pname { font-family: var(--font-display); font-size: 26px; line-height: 1.08; letter-spacing: -0.012em; color: var(--text); margin: 10px 0 14px; }
.w2kg__prow { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle); }
.w2kg__prow svg { color: var(--text-muted); }
.w2kg__prow b { color: var(--text); font-family: var(--font-mono); }
.w2kg__psec { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin: 16px 0 6px; }
.w2kg__plinks { display: flex; flex-direction: column; }
.w2kg__plink { display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius-md);
  background: none; border: none; cursor: pointer; text-align: left; transition: background .15s; font-family: inherit; }
.w2kg__plink:hover { background: var(--surface-2); }
.w2kg__plink i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.w2kg__plink span { flex: 1; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w2kg__plink small { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.w2kg__particle { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.w2kg__particle .w2kg__psec { margin: 0; }
.w2kg__art { display: block; padding: 14px; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  text-decoration: none; transition: border-color .2s, transform .2s var(--ease-out); }
.w2kg__art:hover { border-color: var(--border-signal); transform: translateY(-2px); }
.w2kg__art-lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.w2kg__art-t { font-size: 13.5px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); margin: 0 0 8px; }
.w2kg__art-meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.w2kg__art-meta b { color: var(--accent-text); }

@media (max-width: 760px) {
  .w2kg__title { top: 80px; }
  .w2kg__sub { display: none; }
  .w2kg__hud { display: none; }
}

/* ================================= About ================================= */
.w2ab-hero { position: relative; min-height: 86vh; display: flex; flex-direction: column; justify-content: center;
  padding: 140px clamp(20px, 4vw, 48px) 60px; overflow: clip; }
.w2ab-hero__wash { position: absolute; inset: 0 0 auto; height: 60vh; pointer-events: none; opacity: .55;
  background: radial-gradient(55% 80% at 50% 0%, rgba(232,177,76,.10), transparent 70%); }
.w2ab-hero__in { position: relative; max-width: var(--container-wide); margin: 0 auto; width: 100%; }
.w2ab-hero__title { font-family: var(--font-display); font-size: clamp(3rem, 1.4rem + 7vw, 7.4rem); line-height: .99;
  letter-spacing: -0.024em; color: var(--text); margin: 24px 0 0; max-width: 14ch; }
.w2ab-hero__title em { font-style: italic; color: var(--accent-text); }
.w2ab-hero__sub { max-width: 36rem; margin: 26px 0 0; font-size: var(--text-md); line-height: 1.65; color: var(--text-secondary); }

/* sticky stack */
.w2ab-stack { max-width: 880px; margin: 0 auto; padding: 40px clamp(20px, 4vw, 48px) 120px; display: flex; flex-direction: column; gap: 32px; }
.w2ab-scard { position: sticky; display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: clamp(26px, 4vw, 44px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: 0 -18px 50px -30px rgba(0,0,0,.65); min-height: 280px; }
.w2ab-scard__ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius-lg);
  background: var(--accent-bg); color: var(--accent); border: 1px solid var(--border-signal); }
.w2ab-scard__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; color: var(--text-faint); margin-bottom: 10px; }
.w2ab-scard__t { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); line-height: 1.06; letter-spacing: -0.014em; color: var(--text); margin: 0 0 12px; }
.w2ab-scard__d { font-size: var(--text-md); line-height: 1.65; color: var(--text-secondary); margin: 0; max-width: 36rem; }
.w2ab-scard__foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); letter-spacing: .04em; }
@media (max-width: 640px) { .w2ab-scard { grid-template-columns: 1fr; } }

/* numbers band */
.w2ab-nums { border-block: 1px solid var(--border-subtle); background: var(--bg-subtle); }
.w2ab-nums__in { max-width: var(--container-wide); margin: 0 auto; padding: clamp(44px, 7vh, 72px) clamp(20px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 760px) { .w2ab-nums__in { grid-template-columns: repeat(2, 1fr); } }

/* personas */
.w2ab-pers { max-width: var(--container-wide); margin: 0 auto; padding: clamp(90px, 13vh, 150px) clamp(20px, 4vw, 48px) 40px; }
.w2ab-pers__h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4rem); line-height: 1.02;
  letter-spacing: -0.02em; color: var(--text); margin: 14px 0 0; }
.w2ab-pers__h2 em { font-style: italic; color: var(--accent-text); }
.w2ab-pers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
@media (max-width: 980px) { .w2ab-pers__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .w2ab-pers__grid { grid-template-columns: 1fr; } }
.w2ab-per { padding: 22px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  display: flex; flex-direction: column; gap: 10px; transition: transform .35s var(--ease-out), border-color .35s; }
.w2ab-per:hover { transform: translateY(-6px); border-color: var(--border-signal); }
.w2ab-per__id { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); letter-spacing: .02em; }
.w2ab-per__t { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); margin: 0; }
.w2ab-per__d { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 0; }
.w2ab-per__tag { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }

/* === integration fixes — NOT in the design bundle ========================
   When the detail panel is open it overlaps the top of the HUD column
   (panel: right, bottom:84px, z:6; HUD: right, bottom:24px, z:5) and steals
   clicks aimed at "reset view". Slide the HUD left of the open panel. */
.w2kg:has(.w2kg__panel--in) .w2kg__hud {
  right: calc(clamp(16px, 2.5vw, 32px) + min(340px, 100vw - 48px) + 20px);
  transition: right .45s var(--ease-out);
}
.w2kg__hud { transition: right .45s var(--ease-out); }

/* === V2 graph: node-type legend (shape glyphs) — integration addition === */
.w2kg__types { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.w2kg__type { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .02em; white-space: nowrap; flex: none; color: var(--text-muted);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full); cursor: pointer;
  transition: var(--transition-colors), transform .2s var(--ease-out); }
.w2kg__type:hover { transform: translateY(-1px); color: var(--text-secondary); border-color: var(--border); }
.w2kg__type-g { display: inline-flex; flex: none; color: var(--text-faint); transition: color .2s; }
.w2kg__type--on { color: var(--text); border-color: var(--border-signal); background: var(--accent-bg); }
.w2kg__type--on .w2kg__type-g { color: var(--accent); }
