/* ==========================================================================
   WILDCARDLABS — JOURNAL (LIGHT, v3)
   Path: public/wildcardlabs.app/frontend/home/subpages/blog/blog.css

   Same vocabulary as the public entry page, so the two read as one flow:
   - Slim Sora display type over quiet system UI text.
   - Glass plates with a coloured halo for covers and avatars.
   - Hairline section heads with a lit sky tick, ruled rows on a spine.
   - Ambient light, engineering grid and one soft light that follows the pointer.

   Everything is scoped under .wlb / .wlb-* so it can sit next to public.css
   inside the SPA without either sheet touching the other.
   ========================================================================== */

body.wl-blog-body { margin: 0; background: #fbfcfe; }
html { -webkit-text-size-adjust: 100%; }

.wlb-mount { display: contents; }

/* ---------- Tokens + shell ---------- */
.wlb {
  --safe-top: env(safe-area-inset-top, 0px);

  --bg-base: #fbfcfe;
  --bg-surface: #ffffff;
  --bg-tint: #f3f7fc;

  --text-main: #0b1220;
  --text-muted: #475569;
  --text-dim: #64748b;

  --line: rgba(11, 18, 32, .08);
  --line-2: rgba(11, 18, 32, .16);

  --wl-sky: #0ea5e9;
  --wl-blue: #2563eb;
  --wl-indigo: #6366f1;

  --status-green: #059669;
  --status-yellow: #d97706;
  --status-red: #dc2626;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", var(--font-ui);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --maxw: 1040px;
  --gap-section: clamp(56px, 9vw, 112px);

  position: relative; isolation: isolate;
  flex: 1 1 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: var(--wl-font-frontend, var(--font-ui));
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* zero-specificity reset so component rules always win */
:where(.wlb, .wlb *, .wlb *::before, .wlb *::after) { box-sizing: border-box; margin: 0; padding: 0; }
.wlb a { color: inherit; text-decoration: none; }
.wlb button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wlb [hidden] { display: none !important; }
.wlb button:focus-visible, .wlb a:focus-visible, .wlb input:focus-visible {
  outline: 2px solid var(--wl-sky); outline-offset: 3px; border-radius: 8px;
}

/* Inside the SPA on desktop, #app is a fixed-height viewport: the journal scrolls itself. */
@media (min-width: 901px) {
  body.is-spa-subpage .wlb { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(11, 18, 32, .14) transparent; }
}

/* ---------- Ambient light ---------- */
.wlb-ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.wlb-ambient::before {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(60% 45% at 50% -8%, rgba(14, 165, 233, .20), transparent 70%),
    radial-gradient(40% 35% at 6% 96%, rgba(37, 99, 235, .09), transparent 70%),
    radial-gradient(35% 30% at 96% 68%, rgba(99, 102, 241, .09), transparent 70%);
  animation: wlbDrift 32s ease-in-out infinite alternate;
}
.wlb-ambient::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, #000 10%, transparent 75%);
}
@keyframes wlbDrift {
  from { transform: translate3d(-1.5%, 0, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}
.wlb-pointer {
  position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none;
  width: 560px; height: 560px; margin: -280px 0 0 -280px;
  background: radial-gradient(closest-side, rgba(14, 165, 233, .11), transparent);
  opacity: 0; transition: opacity .6s; will-change: transform;
}
.wlb-pointer.on { opacity: 1; }
@media (hover: none) { .wlb-pointer { display: none; } }

/* ---------- Layout ---------- */
.wlb-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw); margin: 0 auto; flex: 1 0 auto;
  padding: 0 20px 56px;
  display: flex; flex-direction: column;
  gap: var(--gap-section);
}
.wlb-main { display: flex; flex-direction: column; gap: var(--gap-section); }
.wlb-view { display: flex; flex-direction: column; gap: var(--gap-section); }
.wlb-view > section { scroll-margin-top: calc(84px + var(--safe-top)); }

/* ---------- Shared bits ---------- */
.wlb-k {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted);
}
.wlb-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-dim);
}
.wlb-dot-live { background: var(--status-green); box-shadow: 0 0 0 3px rgba(5, 150, 105, .14), 0 0 10px rgba(5, 150, 105, .55); }

.wlb-sec-head {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-top: 24px; margin-bottom: 26px;
}
.wlb-sec-head::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--line-2), var(--line) 55%, transparent);
}
.wlb-sec-head::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 30px; height: 2px;
  background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .4);
}
.wlb-sec-head h2 { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.wlb-sec-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-align: right; }

.wlb-sec-title {
  max-width: 20ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem); letter-spacing: -.04em; line-height: 1.1;
  margin-bottom: 28px;
}
.wlb-sec-title em { font-style: normal; font-weight: 300; color: var(--wl-sky); }

.wlb-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--wl-sky); padding: 3px 8px; border-radius: 4px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .35); background: rgba(14, 165, 233, .05);
}

/* ---------- Buttons ---------- */
.wlb-btn-primary, .wlb-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 24px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  transition: background .2s, box-shadow .2s, transform .2s, color .2s;
}
.wlb-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--wl-sky), var(--wl-blue));
  box-shadow: 0 10px 28px -8px rgba(14, 165, 233, .65), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.wlb-btn-primary:hover { box-shadow: 0 14px 36px -8px rgba(14, 165, 233, .85), inset 0 0 0 1px rgba(255, 255, 255, .35); transform: translateY(-1px); }
.wlb-btn-ghost { color: var(--text-main); box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(255, 255, 255, .6); }
.wlb-btn-ghost:hover { color: var(--wl-sky); background: rgba(14, 165, 233, .05); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .55), 0 0 22px rgba(14, 165, 233, .14); }
.wlb-btn-primary:active, .wlb-btn-ghost:active { transform: scale(.98); }
.wlb-btn-sm { padding: 8px 16px; font-size: 12.5px; }
.wlb-arrow { transition: transform .3s var(--ease); flex: none; }
.wlb-btn-primary:hover .wlb-arrow, .wlb-btn-ghost:hover .wlb-arrow, .wlb-enter:hover .wlb-arrow { transform: translateX(3px); }
.wlb-back:hover .wlb-arrow { transform: translateX(-3px); }

/* ---------- Top bar ---------- */
.wlb-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 -20px; padding: calc(12px + var(--safe-top)) 20px 12px;
  background: linear-gradient(180deg, rgba(251, 252, 254, .94), rgba(251, 252, 254, .72));
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.wlb-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .5) 30%, rgba(14, 165, 233, .5) 70%, transparent);
  opacity: .5; pointer-events: none;
}
.wlb-brand { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.wlb-brand-mark {
  width: 12px; height: 12px; border-radius: 50%; background: var(--wl-sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .14), 0 0 16px 2px rgba(14, 165, 233, .6);
  animation: wlbBreath 4.5s ease-in-out infinite;
}
@keyframes wlbBreath { 50% { box-shadow: 0 0 0 6px rgba(14, 165, 233, .09), 0 0 24px 4px rgba(14, 165, 233, .75); } }
.wlb-brand-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.wlb-brand-name span { font-weight: 600; color: var(--wl-sky); }
.wlb-brand-section {
  margin-left: 4px; padding-left: 12px; border-left: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
}

.wlb-links { display: flex; gap: 4px; }
.wlb-links button {
  padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-dim);
  transition: color .2s, background .2s;
}
.wlb-links button:hover { color: var(--text-main); background: rgba(11, 18, 32, .05); }

.wlb-enter {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--wl-sky);
  background: rgba(14, 165, 233, .06);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .55);
  transition: background .2s, box-shadow .2s, color .2s;
}
.wlb-enter:hover { color: #fff; background: var(--wl-sky); box-shadow: inset 0 0 0 1px var(--wl-sky), 0 0 22px rgba(14, 165, 233, .35); }

.wlb-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.wlb-progress i {
  display: block; height: 100%; transform: scaleX(0); transform-origin: left;
  background: var(--wl-sky); box-shadow: 0 0 12px 1px rgba(14, 165, 233, .6);
}
.wlb.is-reading .wlb-progress { opacity: 1; }

@media (max-width: 720px) { .wlb-links { display: none; } }

/* ---------- Hero ---------- */
.wlb-hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center; gap: clamp(28px, 6vw, 72px);
  padding-top: clamp(40px, 8vw, 88px);
}
.wlb-hero-title {
  margin-top: 20px; max-width: 15ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.04; letter-spacing: -.05em;
  color: var(--text-main);
}
.wlb-hero-title em {
  font-style: normal; font-weight: 300;
  background: linear-gradient(120deg, var(--wl-sky), var(--wl-blue) 60%, var(--wl-indigo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(14, 165, 233, .3));
}
.wlb-lede {
  margin-top: clamp(16px, 2.6vw, 24px); max-width: 52ch;
  font-size: clamp(14px, 1.7vw, 16px); line-height: 1.7; color: var(--text-muted);
  text-wrap: pretty;
}
.wlb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 4vw, 34px); }

.wlb-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px clamp(18px, 4vw, 34px);
  margin-top: clamp(26px, 4.4vw, 42px); padding-top: 22px; border-top: 1px solid var(--line);
}
.wlb-stats li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.wlb-stats b {
  font-family: var(--font-display); font-weight: 300; font-size: 1.3rem; letter-spacing: -.02em;
  color: var(--text-main); font-variant-numeric: tabular-nums;
}

.wlb-hero-side { display: flex; flex-direction: column; align-items: center; gap: 22px; justify-self: center; width: min(100%, 380px); }
.wlb-stage {
  position: relative; width: 100%; aspect-ratio: 1;
  display: grid; place-items: center;
}
.wlb-orbit {
  position: absolute; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  animation: wlbSpin 40s linear infinite;
}
.wlb-orbit::after {
  content: ""; position: absolute; top: -3.5px; left: 50%; margin-left: -3.5px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--wl-sky);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .15), 0 0 14px 2px rgba(14, 165, 233, .7);
}
.wlb-orbit--1 { inset: 0; }
.wlb-orbit--2 { inset: 13%; animation-duration: 28s; animation-direction: reverse; }
.wlb-orbit--2::after { background: var(--wl-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 0 14px 2px rgba(37, 99, 235, .6); }
.wlb-orbit--3 { inset: 26%; animation-duration: 20s; }
.wlb-orbit--3::after { background: var(--wl-indigo); box-shadow: 0 0 0 3px rgba(99, 102, 241, .14), 0 0 14px 2px rgba(99, 102, 241, .6); }
@keyframes wlbSpin { to { transform: rotate(360deg); } }

.wlb-feature {
  position: relative; z-index: 1; display: block;
  width: 42%; aspect-ratio: 1;
  transition: transform .45s var(--ease);
}
.wlb-feature .wlb-plate { width: 100%; height: 100%; }
.wlb-feature .wlb-halo { inset: -42%; filter: blur(26px) saturate(1.5); opacity: .55; border-radius: 40%; animation: wlbHalo 5s ease-in-out infinite; }
.wlb-feature .wlb-plate-face { border-radius: 26%; box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .1), 0 26px 50px -18px rgba(14, 165, 233, .55), 0 6px 14px -6px rgba(11, 18, 32, .18); }
.wlb-feature .is-logo svg { width: 62%; height: 62%; display: block; position: relative; z-index: 1; }
.wlb-feature .wlb-plate-face.is-mono span { font-size: clamp(1.8rem, 7vw, 3.2rem); }
@keyframes wlbHalo { 50% { opacity: .35; transform: scale(1.1); } }
@media (hover: hover) { a.wlb-feature:hover { transform: scale(1.05); } }

.wlb-cap {
  display: block; width: 100%; max-width: 320px; padding-top: 18px; position: relative;
}
.wlb-cap::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.wlb-cap::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px;
  background: var(--wl-sky); box-shadow: 0 0 12px rgba(14, 165, 233, .6);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.wlb-cap:hover::after { transform: scaleX(1); }
.wlb-cap-title {
  display: block; margin-top: 10px;
  font-family: var(--font-display); font-weight: 300; font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wlb-cap-date { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

@media (max-width: 820px) {
  .wlb-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .wlb-hero-side { order: -1; justify-self: start; align-items: flex-start; width: min(78%, 280px); }
}
@media (max-width: 480px) { .wlb-actions .wlb-btn-primary, .wlb-actions .wlb-btn-ghost { width: 100%; } }

/* ---------- Plates (covers, avatars, row icons) ---------- */
.wlb-plate { position: relative; display: block; flex: none; }
.wlb-halo {
  position: absolute; inset: -8%; z-index: 0; border-radius: 32%;
  filter: blur(22px) saturate(1.6); opacity: .42; transform: scale(.94);
  transition: opacity .45s var(--ease), transform .45s var(--ease); pointer-events: none;
}
.wlb-halo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.wlb-halo.is-glow { background: radial-gradient(closest-side, rgba(14, 165, 233, .65), transparent); }
.wlb-halo.is-mono { background: radial-gradient(closest-side, hsl(var(--h) 85% 55% / .6), transparent); }
.wlb-plate-face {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff, #eef4fb);
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .09), 0 16px 28px -14px rgba(11, 18, 32, .35);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.wlb-plate-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(140deg, rgba(255, 255, 255, .55), transparent 42%); }
.wlb-plate-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wlb-plate-face.is-mono { background: linear-gradient(150deg, hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 38) 75% 36%)); }
.wlb-plate-face.is-mono span {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 200; font-size: 3.4rem; letter-spacing: -.04em; line-height: 1;
  color: rgba(255, 255, 255, .97); text-shadow: 0 0 18px rgba(255, 255, 255, .5);
}

/* ---------- Tools: topic chips + search ---------- */
.wlb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin: -6px 0 26px; }
.wlb-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.wlb-chip {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-muted);
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: color .2s, box-shadow .2s, background .2s;
}
.wlb-chip:hover { color: var(--wl-sky); background: rgba(14, 165, 233, .05); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .5); }
.wlb-chip[aria-pressed="true"] { color: var(--wl-sky); background: rgba(14, 165, 233, .09); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .6), 0 0 18px rgba(14, 165, 233, .12); }
.wlb-chip small { margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.wlb-chip[aria-pressed="true"] small { color: var(--wl-sky); }

.wlb-search {
  display: flex; align-items: center; gap: 8px; flex: 0 1 240px; min-width: 160px;
  padding: 7px 14px; border-radius: 999px; color: var(--text-dim);
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow .2s, background .2s, color .2s;
}
.wlb-search:focus-within { color: var(--wl-sky); background: #fff; box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .6), 0 0 22px rgba(14, 165, 233, .14); }
.wlb-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--text-main);
}
.wlb-search input::placeholder { color: var(--text-dim); }
.wlb-search input:focus-visible { outline: none; }

/* ---------- Bento: articles in varied layouts ---------- */
.wlb-bento {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px;
  min-height: 120px;
}
.wlb-card {
  position: relative; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column;
  border-radius: 22px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.wlb-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 30%) var(--my, 20%), rgba(14, 165, 233, .12), transparent 70%), rgba(255, 255, 255, .75);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 34px -22px rgba(14, 165, 233, .5);
  opacity: 0; transition: opacity .35s;
}
.wlb-card:focus-visible::before { opacity: 1; }
.wlb-card:active { transform: scale(.985); }

.wlb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.wlb-title { font-family: var(--font-display); letter-spacing: -.03em; line-height: 1.14; text-wrap: balance; color: var(--text-main); overflow-wrap: anywhere; }
.wlb-sub {
  margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .25s;
}
.wlb-foot {
  margin-top: auto; padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--text-dim);
}
.wlb-go { flex: none; opacity: .5; transform: translateX(-3px); transition: opacity .3s, transform .35s var(--ease), color .3s; }
.wlb-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }

/* lead: large cover, display title */
.wlb-card.is-lead { grid-column: span 7; padding: 14px 14px 22px; }
.wlb-card.is-lead .wlb-plate { width: 100%; aspect-ratio: 16 / 10; margin-bottom: 22px; }
.wlb-card.is-lead .wlb-plate-face { border-radius: 18px; }
.wlb-card.is-lead .wlb-body { padding: 0 10px; }
.wlb-card.is-lead .wlb-title { margin-top: 14px; font-weight: 200; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.045em; line-height: 1.08; }
.wlb-card.is-lead .wlb-plate-face.is-mono span { font-size: clamp(3rem, 9vw, 5rem); }

/* side: lit glass panel */
.wlb-card.is-side {
  grid-column: span 5; padding: 28px; border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(70% 140% at 12% 0%, rgba(14, 165, 233, .14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(243, 247, 252, .9));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -36px rgba(14, 165, 233, .55);
}
.wlb-card.is-side::before {
  inset: auto; top: -1px; left: 28px; width: 34px; height: 2px; border-radius: 0; z-index: 0;
  background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .45); opacity: 1;
}
.wlb-card.is-side .wlb-plate { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 22px; }
.wlb-card.is-side .wlb-plate-face { border-radius: 16px; }
.wlb-card.is-side .wlb-title { margin-top: 16px; font-weight: 300; font-size: clamp(1.35rem, 2.4vw, 1.7rem); letter-spacing: -.04em; }

/* third / half: ruled text with a sky line that draws on hover */
.wlb-card.is-third, .wlb-card.is-half { padding: 22px 4px 8px; border-radius: 0; }
.wlb-card.is-third { grid-column: span 4; }
.wlb-card.is-half { grid-column: span 6; }
.wlb-card.is-third::before, .wlb-card.is-half::before {
  inset: auto; top: 0; left: 0; right: 0; height: 1px; border-radius: 0; z-index: 0;
  background: var(--line-2); box-shadow: none; opacity: 1;
}
.wlb-card.is-third::after, .wlb-card.is-half::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px;
  background: var(--wl-sky); box-shadow: 0 0 12px rgba(14, 165, 233, .6);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.wlb-card.is-third .wlb-title, .wlb-card.is-half .wlb-title { margin-top: 14px; font-weight: 300; font-size: 1.28rem; letter-spacing: -.03em; }
.wlb-card.is-half .wlb-title { font-size: 1.45rem; }

/* wide: horizontal, plate on the left */
.wlb-card.is-wide {
  grid-column: span 12; flex-direction: row; align-items: center; gap: clamp(20px, 4vw, 40px);
  padding: 16px clamp(16px, 3vw, 28px) 16px 16px; border-radius: 28px;
}
.wlb-card.is-wide::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(243, 247, 252, .8));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 24px 50px -36px rgba(14, 165, 233, .45);
}
.wlb-card.is-wide .wlb-plate { width: clamp(150px, 26vw, 260px); aspect-ratio: 4 / 3; }
.wlb-card.is-wide .wlb-plate-face { border-radius: 18px; }
.wlb-card.is-wide .wlb-plate-face.is-mono span { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.wlb-card.is-wide .wlb-body { align-self: stretch; justify-content: center; padding: 8px 0; }
.wlb-card.is-wide .wlb-title { margin-top: 14px; font-weight: 200; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.04em; }
.wlb-card.is-wide .wlb-foot { margin-top: 0; padding-top: 18px; justify-content: flex-start; gap: 14px; }

@media (hover: hover) {
  .wlb-card:hover { transform: translateY(-3px); }
  .wlb-card:hover::before { opacity: 1; }
  .wlb-card:hover .wlb-halo { opacity: .8; transform: scale(1.04); }
  .wlb-card:hover .wlb-plate-face { transform: scale(1.02); }
  .wlb-card:hover .wlb-sub { color: var(--text-muted); }
  .wlb-card:hover .wlb-go { opacity: 1; transform: none; color: var(--wl-sky); }
  .wlb-card.is-third:hover::after, .wlb-card.is-half:hover::after { transform: scaleX(1); }
  .wlb-card.is-third:hover, .wlb-card.is-half:hover { transform: none; }
  .wlb-card.is-side:hover { box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .4), 0 36px 64px -34px rgba(14, 165, 233, .7); }
}
.wlb-card.is-third:focus-visible::after, .wlb-card.is-half:focus-visible::after { transform: scaleX(1); }

@media (max-width: 900px) {
  .wlb-card.is-lead, .wlb-card.is-side, .wlb-card.is-wide { grid-column: span 12; }
  .wlb-card.is-third, .wlb-card.is-half { grid-column: span 6; }
  .wlb-card.is-third:last-child:nth-child(odd) { grid-column: span 12; }
}
@media (max-width: 640px) {
  .wlb-bento { gap: 16px; }
  .wlb-card.is-third, .wlb-card.is-half { grid-column: span 12; }
  .wlb-card.is-wide { flex-direction: column; align-items: stretch; padding: 14px 14px 22px; }
  .wlb-card.is-wide .wlb-plate { width: 100%; }
  .wlb-card.is-wide .wlb-body { padding: 0 8px; }
  .wlb-card.is-side { padding: 22px; }
  .wlb-card.is-side::before { left: 22px; }
}

/* skeletons */
.wlb-sk-card { grid-column: span 4; padding: 22px 4px 8px; position: relative; pointer-events: none; }
.wlb-sk-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.wlb-sk-card:first-child { grid-column: span 7; }
.wlb-sk-card:nth-child(2) { grid-column: span 5; }
.wlb-sk { display: block; height: 10px; border-radius: 5px; background: rgba(11, 18, 32, .06); animation: wlbPulse 1.6s ease-in-out infinite; margin-top: 12px; }
.wlb-sk.is-plate { height: 150px; border-radius: 18px; margin-top: 0; }
.wlb-sk.w1 { width: 28%; } .wlb-sk.w2 { width: 82%; height: 14px; } .wlb-sk.w3 { width: 60%; }
@keyframes wlbPulse { 50% { opacity: .45; } }
@media (max-width: 900px) { .wlb-sk-card, .wlb-sk-card:first-child, .wlb-sk-card:nth-child(2) { grid-column: span 12; } }

/* empty / error */
.wlb-state { grid-column: 1 / -1; padding: 40px 0; max-width: 46ch; }
.wlb-state h4 { font-family: var(--font-display); font-weight: 300; font-size: 1.4rem; letter-spacing: -.03em; line-height: 1.2; }
.wlb-state p { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--text-dim); }
.wlb-state .wlb-btn-ghost { margin-top: 20px; }
.wlb-state.is-error h4 { color: var(--status-red); }

/* ---------- Ruled rows on a spine: archive + explore ---------- */
.wlb-rows { position: relative; display: grid; padding-left: 22px; }
.wlb-rows::before {
  content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line) 88%, transparent);
}
.wlb-row {
  position: relative;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 20px 4px; border-top: 1px solid var(--line);
  transition: background .25s, padding .3s var(--ease);
}
.wlb-row:first-child { border-top: 0; padding-top: 6px; }
.wlb-row:hover { background: linear-gradient(90deg, rgba(14, 165, 233, .06), transparent 80%); padding-left: 12px; }
.wlb-row-node {
  position: absolute; left: -22px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--bg-base); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .2s, box-shadow .2s;
}
.wlb-row:hover .wlb-row-node { background: var(--wl-sky); box-shadow: 0 0 0 3px rgba(14, 165, 233, .14), 0 0 12px rgba(14, 165, 233, .6); }
.wlb-row-icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--text-muted);
  background: linear-gradient(160deg, #ffffff, #eef4fb); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: color .3s, box-shadow .3s;
}
.wlb-row:hover .wlb-row-icon { color: var(--wl-sky); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .45), 0 10px 24px -10px rgba(14, 165, 233, .55); }
.wlb-row-icon.is-mono { background: linear-gradient(150deg, hsl(var(--h) 80% 55%), hsl(calc(var(--h) + 38) 75% 36%)); color: rgba(255, 255, 255, .97); box-shadow: none; overflow: hidden; }
.wlb-row-icon.is-mono span { font-family: var(--font-display); font-weight: 200; font-size: 1.05rem; letter-spacing: -.03em; }
.wlb-row-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wlb-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wlb-row-title { font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.wlb-row-sub {
  font-size: 13px; color: var(--text-dim); line-height: 1.5; transition: color .25s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wlb-row:hover .wlb-row-sub { color: var(--text-muted); }
.wlb-row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.wlb-row-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }

@media (max-width: 480px) {
  .wlb-row { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .wlb-row-icon { width: 40px; height: 40px; border-radius: 12px; }
  .wlb-row-end { display: none; }
}

/* ---------- Client portal CTA ---------- */
.wlb-portal {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background:
    radial-gradient(70% 140% at 12% 0%, rgba(14, 165, 233, .16), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(243, 247, 252, .9));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 60px -36px rgba(14, 165, 233, .55);
}
.wlb-portal::before {
  content: ""; position: absolute; top: -1px; left: 36px; width: 34px; height: 2px;
  background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .45);
}
.wlb-portal h2 {
  margin-top: 14px; max-width: 20ch; text-wrap: balance;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.045em; line-height: 1.08;
}
.wlb-portal p { margin-top: 16px; max-width: 52ch; font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.wlb-portal .wlb-actions { margin-top: 28px; }

/* ==========================================================================
   Reader
   ========================================================================== */
.wlb-article { display: flex; flex-direction: column; padding-top: clamp(28px, 5vw, 56px); animation: wlbFade .6s var(--ease) both; }
.wlb-back { align-self: flex-start; margin-bottom: clamp(22px, 4vw, 40px); }

.wlb-ah { outline: none; max-width: 860px; }
.wlb-ameta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.wlb-atitle {
  margin-top: 20px; max-width: 20ch; text-wrap: balance; overflow-wrap: anywhere;
  font-family: var(--font-display); font-weight: 200;
  font-size: clamp(2.2rem, 6.4vw, 3.9rem); line-height: 1.05; letter-spacing: -.05em;
}
.wlb-asub { margin-top: clamp(16px, 2.6vw, 24px); max-width: 56ch; font-size: clamp(15px, 1.9vw, 18px); line-height: 1.65; color: var(--text-muted); text-wrap: pretty; }

.wlb-author {
  display: flex; align-items: center; gap: 14px;
  margin-top: clamp(24px, 4vw, 36px); padding-top: 20px; border-top: 1px solid var(--line);
}
.wlb-avatar {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--wl-sky);
  background: linear-gradient(160deg, #ffffff, #eef4fb); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .35), 0 10px 24px -12px rgba(14, 165, 233, .5);
}
.wlb-author-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.wlb-author-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlb-author-role { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wlb-copy-link { flex: none; }

.wlb-cover { position: relative; margin-top: clamp(28px, 5vw, 48px); width: 100%; aspect-ratio: 21 / 9; }
.wlb-cover .wlb-halo { inset: -4%; filter: blur(34px) saturate(1.6); opacity: .5; }
.wlb-cover .wlb-plate-face { border-radius: 28px; box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .09), 0 30px 60px -30px rgba(14, 165, 233, .5), 0 8px 18px -10px rgba(11, 18, 32, .25); }

.wlb-abody {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(32px, 6vw, 72px);
  margin-top: clamp(36px, 6vw, 64px);
}
.wlb-toc { position: sticky; top: calc(88px + var(--safe-top)); align-self: start; }
.wlb-toc-title { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.wlb-toc-list { position: relative; list-style: none; display: grid; gap: 2px; padding-left: 18px; }
.wlb-toc-list::before { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(180deg, transparent, var(--line-2) 12%, var(--line) 88%, transparent); }
.wlb-toc-link {
  position: relative; display: block; padding: 7px 0; font-size: 12.5px; line-height: 1.4; color: var(--text-dim);
  transition: color .2s;
}
.wlb-toc-link::before {
  content: ""; position: absolute; left: -18px; top: 13px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg-base); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .2s, box-shadow .2s;
}
.wlb-toc-link:hover { color: var(--text-main); }
.wlb-toc-link.is-active { color: var(--text-main); font-weight: 500; }
.wlb-toc-link.is-active::before { background: var(--wl-sky); box-shadow: 0 0 0 3px rgba(14, 165, 233, .14), 0 0 12px rgba(14, 165, 233, .6); }

.wlb-prose { display: flex; flex-direction: column; gap: 24px; max-width: 66ch; min-width: 0; }
.wlb-p { font-size: 16.5px; line-height: 1.8; color: #1e293b; text-wrap: pretty; overflow-wrap: anywhere; }
.wlb-p.is-lede { font-size: clamp(17.5px, 2.2vw, 19.5px); line-height: 1.7; color: var(--text-main); }
.wlb-prose a { color: var(--wl-blue); text-decoration: underline; text-decoration-color: rgba(14, 165, 233, .45); text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; }
.wlb-prose a:hover { color: var(--wl-sky); text-decoration-color: var(--wl-sky); }

.wlb-h {
  position: relative; scroll-margin-top: calc(88px + var(--safe-top));
  margin-top: 22px; padding-top: 22px;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1.4rem, 3vw, 1.85rem); letter-spacing: -.035em; line-height: 1.2;
  text-wrap: balance;
}
.wlb-h::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--line-2), var(--line) 55%, transparent); }
.wlb-h::after { content: ""; position: absolute; top: -1px; left: 0; width: 30px; height: 2px; background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .4); }
.wlb-prose > .wlb-h:first-child { margin-top: 0; }

.wlb-quote {
  position: relative; margin: 10px 0; padding: 4px 0 4px 26px;
  font-family: var(--font-display); font-weight: 200; font-size: clamp(1.35rem, 3vw, 1.85rem); letter-spacing: -.035em; line-height: 1.3;
  text-wrap: balance; color: var(--text-main);
}
.wlb-quote::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--wl-sky); box-shadow: 0 0 14px 2px rgba(14, 165, 233, .4); }

.wlb-code {
  border-radius: 16px; overflow: hidden; background: var(--bg-tint);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 34px -26px rgba(14, 165, 233, .45);
}
.wlb-code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
}
.wlb-copy-code {
  padding: 5px 12px; border-radius: 999px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--line-2); background: rgba(255, 255, 255, .7); transition: color .2s, box-shadow .2s, background .2s;
}
.wlb-copy-code:hover { color: var(--wl-sky); background: rgba(14, 165, 233, .05); box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .5); }
.wlb-code pre { overflow-x: auto; padding: 16px 18px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text-main); tab-size: 2; }
.wlb-code code { font-family: inherit; }

.wlb-fig { position: relative; margin: 10px 0; }
.wlb-fig .wlb-halo { inset: -3%; filter: blur(30px) saturate(1.6); opacity: .4; }
.wlb-fig .wlb-plate-face { height: auto; border-radius: 22px; display: block; }
.wlb-fig .wlb-plate-face img { height: auto; }
.wlb-fig figcaption { position: relative; z-index: 1; margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }

/* pager */
.wlb-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 44px); margin-top: clamp(48px, 8vw, 88px); }
.wlb-pg { position: relative; display: block; padding-top: 22px; min-width: 0; }
.wlb-pg::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.wlb-pg::after {
  content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px;
  background: var(--wl-sky); box-shadow: 0 0 12px rgba(14, 165, 233, .6);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.wlb-pg:hover::after, .wlb-pg:focus-visible::after { transform: scaleX(1); }
.wlb-pg-label { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.wlb-pg-title { display: block; margin-top: 12px; font-family: var(--font-display); font-weight: 300; font-size: 1.3rem; letter-spacing: -.03em; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wlb-pg-date { display: block; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.wlb-pg.is-older { grid-column: 2; }
.wlb-pg.is-newer + .wlb-pg.is-older { grid-column: 2; }

/* reader loading */
.wlb-rsk { padding-top: 12px; max-width: 760px; }
.wlb-rsk .wlb-sk { margin-top: 16px; }
.wlb-rsk .wlb-sk.t { height: 38px; width: 78%; border-radius: 8px; margin-top: 22px; }

@media (max-width: 1000px) {
  .wlb-abody { grid-template-columns: minmax(0, 1fr); }
  .wlb-toc { display: none; }
}
@media (max-width: 640px) {
  .wlb-pager { grid-template-columns: 1fr; }
  .wlb-pg.is-older, .wlb-pg.is-newer + .wlb-pg.is-older { grid-column: auto; }
  .wlb-author { flex-wrap: wrap; }
  .wlb-copy-link { margin-left: 58px; }
  .wlb-p { font-size: 16px; }
}

/* ---------- Footer ---------- */
.wlb-footer {
  position: relative; z-index: 2; flex-shrink: 0;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.wlb-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%); width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .6), transparent);
  box-shadow: 0 0 24px 3px rgba(14, 165, 233, .18);
}

/* ---------- Motion ---------- */
.wlb [data-motion] { animation: wlbFade .8s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes wlbFade { from { opacity: 0; transform: translateY(10px); } }

/* scroll reveal: armed only once JS has mounted, so the static fallback is never hidden */
.wlb.is-armed .wlb-reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.wlb.is-armed .wlb-reveal:not(.is-in) { opacity: 0; transform: translateY(16px); }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .wlb-wrap { padding: 0 16px 40px; }
  .wlb-bar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .wlb-brand-name { font-size: 1rem; }
  .wlb-brand-section { display: none; }
  .wlb-portal::before { left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .wlb *, .wlb *::before, .wlb *::after { animation: none !important; transition-duration: .01ms !important; }
  .wlb.is-armed .wlb-reveal:not(.is-in) { opacity: 1; transform: none; }
}
