/* ToolPilot Pro — modern theme */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #4f46e5;
  --brand2: #7c3aed;
  --accent: #f59e0b;
  --line: #e5e7f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(79, 70, 229, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
html { scroll-behavior: smooth; }
#browse { scroll-margin-top: 96px; }
.site-header { position: sticky; top: 0; z-index: 50; }
.js .site-header { animation: headerDrop .65s cubic-bezier(.22,1,.36,1) both; }
@keyframes headerDrop { from { opacity: 0; transform: translateY(-110%); } to { opacity: 1; transform: none; } }
.header-in {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 20px;
  background: linear-gradient(135deg, #0b1233 0%, #16215c 55%, #243380 100%);
  box-shadow: 0 10px 30px -10px rgba(11, 18, 51, .65), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: height .3s ease, box-shadow .3s ease;
}
/* shimmer sweep across the bar, echoing the hero glow */
.header-in::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .22) 50%, transparent 68%);
  background-size: 250% 100%;
  animation: headerShimmer 7s ease-in-out infinite;
}
@keyframes headerShimmer { 0% { background-position: 130% 0; } 60%, 100% { background-position: -130% 0; } }
.site-header.scrolled .header-in { height: 56px; box-shadow: 0 14px 34px -10px rgba(11, 18, 51, .8), inset 0 1px 0 rgba(255, 255, 255, .22); }
/* header search */
.head-search { position: relative; z-index: 2; flex: 1 1 auto; min-width: 0; max-width: 560px; margin: 0 auto; }
#headSearch {
  width: 100%; padding: 11px 18px 11px 44px; font-size: .95rem;
  border: none; border-radius: 10px; outline: none; color: var(--ink);
  background: rgba(255,255,255,.96) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center;
  box-shadow: 0 6px 18px rgba(10, 8, 60, .25);
}
#headSearch:focus { box-shadow: 0 6px 18px rgba(10, 8, 60, .25), 0 0 0 3px rgba(255,255,255,.35); }
#headSearch::placeholder { color: #8a90a6; }
.head-search .search-results { top: calc(100% + 8px); border-radius: 12px; }
/* hamburger */
.menu-btn {
  position: relative; z-index: 2; flex: none;
  width: 44px; height: 44px; border: none; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: background .25s, transform .25s;
}
.menu-btn:hover { background: rgba(255, 255, 255, .28); }
.menu-btn span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .3s, opacity .3s; }
.menu-btn.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
/* dropdown panel */
.menu-panel {
  position: absolute; top: 100%; right: 12px; z-index: 60;
  min-width: 230px; padding: 8px;
  background: #fff; border-radius: 0 0 14px 14px;
  box-shadow: 0 24px 50px -12px rgba(10, 8, 60, .4);
  animation: panelIn .28s cubic-bezier(.22,1,.36,1) both;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.menu-panel[hidden] { display: none; }
.menu-panel a {
  display: flex; align-items: center;
  color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: 12px 16px; border-radius: 9px; white-space: nowrap;
}
.menu-panel a:hover { background: #eef0ff; color: var(--brand); text-decoration: none; }
.menu-panel a.active { background: #eef0ff; color: var(--brand); }
.menu-panel a.nav-cta { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-weight: 700; margin-top: 6px; justify-content: center; }
.menu-panel a.nav-cta:hover { color: #fff; filter: brightness(1.08); }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo span {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-header .logo { position: relative; z-index: 1; color: #fff; display: inline-flex; align-items: center; gap: 9px; font-size: 1.4rem; }
.site-header .logo span { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.site-header .logo::before {
  content: ""; width: 36px; height: 36px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2v7z'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.site-header .logo:hover::before { transform: translateY(-2px) rotate(-10deg) scale(1.07); }
@media (max-width: 640px) {
  .header-in { padding: 0 12px; gap: 10px; }
  .site-header .logo { font-size: 1.15rem; }
  #headSearch { font-size: .85rem; padding: 10px 12px 10px 38px; background-position: 12px center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .header-in::before { animation: none; }
  .js .site-header { animation: none; }
}
/* ---------- hero slider ---------- */
.slider-sec { padding: 28px 0 8px; }
.slider { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: #111; }
.slides { position: relative; aspect-ratio: 21 / 9; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; pointer-events: none; display: block; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 8, 40, .88) 0%, rgba(10, 8, 40, .55) 45%, rgba(10, 8, 40, .05) 75%);
}
.slide-cap {
  position: absolute; z-index: 2; left: 0; bottom: 0; max-width: 660px;
  padding: 40px 40px 40px 92px; color: #fff;
}
.slide-cap h2 { margin: 10px 0 8px; font-size: 2rem; line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.slide-cap p { margin: 0 0 18px; color: rgba(255, 255, 255, .82); font-size: 1.02rem; }
.cat {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: #eef0ff; color: var(--brand); padding: 5px 12px; border-radius: 999px;
}
.cat.light { background: rgba(255, 255, 255, .16); color: #fff; backdrop-filter: blur(6px); }
.btn {
  display: inline-block; background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; font-weight: 700; padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .35); transition: transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); color: #fff; }
.btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; border: 1px solid rgba(255, 255, 255, .35); }
.s-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: background .2s;
}
.s-arrow:hover { background: #fff; }
.s-arrow.prev { left: 18px; } .s-arrow.next { right: 18px; }
.s-dots { position: absolute; z-index: 3; bottom: 16px; right: 24px; display: flex; gap: 8px; }
.s-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .4); cursor: pointer; padding: 0; }
.s-dot.active { background: #fff; transform: scale(1.25); }

/* ---------- sections / pills / grid ---------- */
.sec-head { margin: 44px 0 6px; }
.sec-head h2 { font-size: 1.7rem; letter-spacing: -.02em; margin: 0 0 4px; }
.sec-head p { color: var(--muted); margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.pill {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-weight: 600; font-size: .88rem; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.active { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 10px; }
.card {
  --cc: var(--brand);
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column; color: var(--ink); position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .4s ease;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; z-index: 2;
  background: linear-gradient(90deg, var(--cc), color-mix(in srgb, var(--cc) 10%, transparent));
  opacity: .9;
}
.card:hover {
  text-decoration: none; transform: translateY(-6px);
  box-shadow: 0 22px 48px -14px color-mix(in srgb, var(--cc) 55%, transparent);
  border-color: color-mix(in srgb, var(--cc) 38%, var(--line));
}
.card.hide { display: none; }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #eef0ff, #f5efff); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.12rem; line-height: 1.4; letter-spacing: -.01em; }
.card-body p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.card .cat { background: var(--cc); color: #fff; }
.card .tag { color: var(--cc); background: color-mix(in srgb, var(--cc) 9%, #fff); }
.read { font-weight: 700; color: var(--cc); font-size: .92rem; }

/* ---------- scroll reveal (only when JS is available) ---------- */
.js .reveal { opacity: 0; transform: translateY(44px) scale(.97); transition: opacity .7s ease, transform .8s cubic-bezier(.22,1,.36,1); }
.js .reveal:not(.in) { transition-delay: var(--rd, 0ms); }
.js .reveal.in { opacity: 1; transform: none; transition-delay: 0ms; }
.js .reveal .card-img img { transform: scale(1.12); transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.js .reveal:not(.in) .card-img img { transition-delay: var(--rd, 0ms); }
.js .reveal.in .card-img img { transform: scale(1); transition-delay: 0ms; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal .card-img img { transform: none; transition: none; }
  .slide { transition: none; }
  .task-pane.active .tp-head, .task-pane.active .x-card { animation: none; }
  .task-item { transition: none; }
}

/* ---------- CTA ---------- */
.cta {
  margin: 54px 0 60px; border-radius: 24px; padding: 52px 40px; text-align: center; color: #fff;
  background: linear-gradient(120deg, #312e81, var(--brand) 55%, var(--brand2));
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%);
  top: -160px; right: -120px;
}
.cta h2 { margin: 0 0 8px; font-size: 1.9rem; letter-spacing: -.02em; color: #fff; }
.cta p { margin: 0 0 24px; color: rgba(255, 255, 255, .85); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- article ---------- */
.article-wrap { max-width: 800px; }
.crumbs { margin: 26px 0 6px; font-size: .88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
article h1 { font-size: 2.3rem; line-height: 1.2; letter-spacing: -.025em; margin: 6px 0 10px; }
.meta { color: var(--muted); font-size: .92rem; margin: 0 0 22px; }
.hero-fig { margin: 0 0 30px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.hero-fig img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.hero-fig figcaption { font-size: .82rem; color: var(--muted); padding: 10px 18px; background: var(--card); }
article h2 { font-size: 1.55rem; letter-spacing: -.02em; margin: 38px 0 12px; padding-top: 8px; }
article h3 { font-size: 1.2rem; margin: 26px 0 8px; }
article p, article li { font-size: 1.04rem; color: #1e293b; }
article ul, article ol { padding-left: 24px; }
article li { margin-bottom: 8px; }
article a { font-weight: 600; }
article strong { color: var(--ink); }
.further {
  background: #eef0ff; border: 1px solid #dfe3ff; border-radius: var(--radius);
  padding: 18px 22px; margin: 30px 0;
}
.further p { margin: 0; font-size: .98rem; }

/* FAQ accordion */
.faq { margin: 40px 0; }
.faq h2 { margin-bottom: 16px; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 16px 20px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); font-size: .98rem; }

/* related */
.related { margin: 46px 0 60px; }
.related h3 { font-size: 1.3rem; margin: 0 0 16px; letter-spacing: -.01em; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  color: var(--ink); transition: transform .2s ease, box-shadow .2s ease;
}
.rel-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); }
.rel-img { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eef0ff, #f5efff); overflow: hidden; }
.rel-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-t { display: block; padding: 12px 14px; font-weight: 600; font-size: .9rem; line-height: 1.4; }

/* ---------- footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px 8px; }
.foot-brand .logo { color: #fff; }
.foot-brand p { font-size: .92rem; color: #94a3b8; }
.foot-col h4 { color: #fff; margin: 0 0 12px; font-size: .95rem; }
.foot-col a { display: block; color: #94a3b8; font-size: .92rem; margin-bottom: 8px; }
.foot-col a:hover { color: #fff; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-row a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 0; border-radius: 11px; background: rgba(255,255,255,.08); color: #cbd5e1; transition: background .25s, color .25s, transform .25s; }
.social-row a:hover { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; transform: translateY(-3px); }
.social-row svg { width: 20px; height: 20px; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 20px 26px; }
.tiny { font-size: .82rem; color: #64748b; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .slides { aspect-ratio: 16 / 10; }
  .slide-cap { padding: 26px 26px 26px 84px; }
  .slide-cap h2 { font-size: 1.5rem; }
  .slide-cap p { display: none; }
  .rel-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .slides { aspect-ratio: 4 / 5; }
  .slide::after { background: linear-gradient(180deg, rgba(10,8,40,.05) 30%, rgba(10,8,40,.9) 100%); }
  .slide-cap { padding: 22px; max-width: 100%; }
  .slide-cap h2 { font-size: 1.35rem; }
  .s-arrow { display: none; }
  article h1 { font-size: 1.8rem; }
  .rel-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta { padding: 40px 24px; }
}

/* ---------- welcoming search hero (Futurepedia-inspired) ---------- */
.hero {
  margin: 28px 0 8px;
}
.hero-in {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #312e81 0%, #4f46e5 45%, #7c3aed 75%, #a855f7 100%);
  border-radius: 28px; padding: 64px 32px 46px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.hero-in::before, .hero-in::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero-in::before {
  width: 480px; height: 480px; top: -200px; left: -140px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
.hero-in::after {
  width: 420px; height: 420px; bottom: -220px; right: -120px;
  background: radial-gradient(circle, rgba(245,158,11,.22), transparent 70%);
}
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 7px 16px; border-radius: 999px; margin: 0 0 18px; position: relative; z-index: 1;
}
.hero-in h1 {
  margin: 0 auto 14px; max-width: 760px; color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.15; letter-spacing: -.03em;
  position: relative; z-index: 1;
}
.hero-sub {
  margin: 0 auto 30px; max-width: 620px; color: rgba(255,255,255,.88);
  font-size: 1.08rem; position: relative; z-index: 1;
}
.search-wrap { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
#siteSearch {
  width: 100%; padding: 18px 26px 18px 56px; font-size: 1.05rem;
  border: none; border-radius: 999px; outline: none; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 22px center;
  box-shadow: 0 14px 34px rgba(10, 8, 60, .35);
}
#siteSearch:focus { box-shadow: 0 14px 34px rgba(10, 8, 60, .35), 0 0 0 4px rgba(255,255,255,.35); }
.search-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(10, 8, 60, .35);
  overflow: hidden; text-align: left; z-index: 20;
}
.sr-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; color: var(--ink); }
.sr-item:hover { background: #f4f5ff; text-decoration: none; }
.sr-item + .sr-item { border-top: 1px solid var(--line); }
.sr-cat {
  flex-shrink: 0; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #eef0ff; color: var(--brand); padding: 4px 10px; border-radius: 999px;
}
.sr-t { font-weight: 600; font-size: .95rem; }
.sr-no { padding: 16px 20px; color: var(--muted); font-size: .95rem; }
.pop-row { margin-top: 22px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.pop-row > span { color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 600; }
.chip {
  color: #fff; font-weight: 600; font-size: .88rem; padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
}
.chip:hover { background: rgba(255,255,255,.28); color: #fff; text-decoration: none; }
.trust-row {
  margin-top: 26px; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  color: rgba(255,255,255,.85); font-size: .92rem; position: relative; z-index: 1;
}
.trust-row strong { color: #fff; font-size: 1.1rem; }

/* ---------- browse by task: interactive explorer ---------- */
.task-x { margin: 6px 0 46px; }
.task-x-in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; }

/* shared category header bits (explorer pane head + category pages) */
.cat-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef0ff, #f5efff);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cat-icon.lg { width: 72px; height: 72px; font-size: 2.2rem; border-radius: 20px; }
.cat-head-t { flex: 1; }
.cat-head-t h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; }
.cat-head-t p { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.view-all { font-weight: 700; font-size: .92rem; white-space: nowrap; }

.task-x { --cc: #4f46e5; }
.task-list {
  position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--cc) 13%, #fff) 0%, #fff 62%);
  border: 1px solid color-mix(in srgb, var(--cc) 30%, #eef0ff); border-radius: 18px;
  padding: 10px; max-height: calc(100vh - 110px); overflow-y: auto;
  box-shadow: var(--shadow), 0 14px 34px -18px color-mix(in srgb, var(--cc) 55%, transparent);
}
.task-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: transparent; border: 0; border-radius: 12px; padding: 10px 12px 10px 16px;
  cursor: pointer; font: inherit; color: var(--ink); text-align: left; position: relative;
  transition: background .18s ease, transform .18s ease;
}
.task-item::before {
  content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px;
  background: var(--cc); opacity: 0; transform: scaleY(.3); transition: opacity .2s ease, transform .2s ease;
}
.task-item:hover { background: color-mix(in srgb, var(--cc) 7%, #fff); }
.task-item:hover::before { opacity: .6; transform: none; }
.task-item.active { background: color-mix(in srgb, var(--cc) 11%, #fff); transform: translateX(2px); }
.task-item.active::before { opacity: 1; transform: none; }
.ti-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; font-size: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cc) 13%, #fff);
  border: 1px solid color-mix(in srgb, var(--cc) 28%, var(--line));
}
.ti-tx { flex: 1; min-width: 0; }
.ti-name { display: block; font-weight: 800; font-size: .97rem; letter-spacing: -.01em; }
.ti-sub { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-n {
  flex-shrink: 0; font-size: .72rem; font-weight: 800; color: var(--cc);
  background: color-mix(in srgb, var(--cc) 12%, #fff); border-radius: 999px; padding: 3px 9px;
}
.task-stage { min-width: 0; }
.task-pane { display: none; }
.task-pane.active { display: block; }
.tp-head { display: flex; align-items: center; gap: 14px; margin: 2px 0 18px; }
.cat-icon.sm {
  width: 46px; height: 46px; font-size: 1.4rem; border-radius: 14px;
  background: color-mix(in srgb, var(--cc) 12%, #fff);
  border-color: color-mix(in srgb, var(--cc) 32%, var(--line));
}

/* staggered entrance animation for posts */
.task-pane.active .tp-head { animation: paneHead .45s cubic-bezier(.22,1,.36,1) backwards; }
.task-pane.active .x-card { animation: cardPop .55s cubic-bezier(.22,1.1,.36,1) backwards; animation-delay: calc(var(--i, 0) * 85ms); }
@keyframes paneHead { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes cardPop {
  0% { opacity: 0; transform: translateY(32px) scale(.95); }
  60% { opacity: 1; transform: translateY(-5px) scale(1.015); }
  100% { opacity: 1; transform: none; }
}

/* ---------- task pane carousel (desktop) ---------- */
.tp-nav { display: none; }
@media (min-width: 901px) {
  .pane-grid {
    display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity;
    padding: 6px 4px 18px; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  }
  .pane-grid .x-card { flex: 0 0 300px; scroll-snap-align: start; }
  .tp-nav { display: flex; gap: 8px; margin-left: 4px; }
  .tp-arrow {
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--cc) 32%, var(--line));
    background: #fff; color: var(--cc); font-size: .95rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow);
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s, background .25s;
  }
  .tp-arrow:hover { transform: translateY(-2px) scale(1.07); background: color-mix(in srgb, var(--cc) 9%, #fff); box-shadow: var(--shadow-lg); }
  .tp-arrow:active { transform: scale(.94); }
}

/* per-category color themes */
.cat-page-head .cat-icon {
  background: color-mix(in srgb, var(--cc, #4f46e5) 12%, #fff);
  border-color: color-mix(in srgb, var(--cc, #4f46e5) 32%, var(--line));
}
.article-wrap .crumbs a { color: var(--cc); }
.article-wrap .tag { color: var(--cc); background: color-mix(in srgb, var(--cc) 10%, #fff); }
a.tag:hover { background: color-mix(in srgb, var(--cc, #3b82f6) 18%, #fff); text-decoration: none; }
.cat-page-head { display: flex; align-items: center; gap: 20px; margin: 10px 0 30px; }
.cat-page-head h1 { font-size: 2.1rem; margin: 0 0 6px; letter-spacing: -.025em; }
.cat-page-head p { margin: 0; color: var(--muted); font-size: 1.02rem; max-width: 640px; }

/* ---------- hashtag tags (Futurepedia-style) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .76rem; font-weight: 700; color: #3b82f6;
  background: #eff6ff; padding: 4px 11px; border-radius: 999px;
}
a.tag:hover { background: #dbeafe; text-decoration: none; }
article .tags { margin: -8px 0 20px; }

/* ---------- in-article explanatory figures ---------- */
.in-fig { margin: 30px 0; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); }
.in-fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.in-fig figcaption { font-size: .85rem; color: var(--muted); padding: 12px 20px; }

/* ---------- responsive additions ---------- */
@media (max-width: 900px) {
  .hero-in { padding: 48px 22px 38px; border-radius: 22px; }
}
@media (max-width: 600px) {
  .hero { margin: 18px 0 4px; }
  .hero-in { padding: 40px 18px 32px; }
  #siteSearch { padding: 15px 20px 15px 50px; font-size: .98rem; background-position: 18px center; }
  .cat-page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cat-page-head h1 { font-size: 1.7rem; }
  .view-all { font-size: .85rem; }
}

/* ---------- task explorer: mobile ---------- */
@media (max-width: 900px) {
  .task-x-in { grid-template-columns: 1fr; }
  .task-list {
    position: static; max-height: none; flex-direction: row; overflow-x: auto;
    padding: 8px; scrollbar-width: thin; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .task-item { flex: 0 0 auto; width: auto; padding: 8px 12px; scroll-snap-align: start; }
  .task-item .ti-sub { display: none; }
  .task-item::before { display: none; }
  .task-item.active { transform: none; }
  .ti-icon { width: 36px; height: 36px; font-size: 1.15rem; }
  .pane-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pane-grid { grid-template-columns: 1fr; }
  .tp-head { flex-wrap: wrap; }
}

/* Futurepedia-style welcome hero */
.fp-hero{background:linear-gradient(150deg,#1e3a8a 0%,#2563eb 42%,#6d28d9 78%,#7c3aed 100%);color:#fff;text-align:center;padding:96px 0 72px;position:relative;overflow:hidden}
.fp-hero::before{content:"";position:absolute;left:-180px;top:-120px;width:480px;height:480px;border-radius:50%;background:rgba(255,255,255,.07)}
.fp-hero::after{content:"";position:absolute;right:-160px;bottom:-200px;width:560px;height:560px;border-radius:50%;background:rgba(255,255,255,.06)}
.fp-in{position:relative;z-index:1}
.fp-eyebrow{display:inline-block;font-size:.95rem;font-weight:600;letter-spacing:.04em;opacity:.95;margin:0 0 26px;padding-bottom:6px;border-bottom:2px solid rgba(255,255,255,.55)}
.fp-hero h1{font-size:clamp(2.5rem,5.6vw,4.3rem);font-weight:800;letter-spacing:-.025em;line-height:1.12;max-width:19ch;margin:0 auto 22px;color:#fff}
.fp-sub{font-size:1.18rem;line-height:1.6;opacity:.93;max-width:54ch;margin:0 auto 38px}
.fp-cta{display:inline-block;background:#fff;color:#1d4ed8;font-weight:700;font-size:1.08rem;padding:17px 52px;border-radius:999px;text-decoration:none;box-shadow:0 12px 30px rgba(0,0,0,.22);transition:transform .2s,box-shadow .2s}
.fp-cta:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(0,0,0,.28)}
.fp-trusted{margin:64px 0 20px;font-size:.78rem;font-weight:600;letter-spacing:.34em;text-transform:uppercase;opacity:.72}
.fp-logos{display:flex;justify-content:center;align-items:center;gap:46px;flex-wrap:wrap}
.fp-logos img{height:30px;width:auto;opacity:.94}
/* linked brand pills: logo + name, tap to open the guide */
.brand-row{display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap;margin-top:6px}
.brand-pill{display:inline-flex;align-items:center;gap:10px;background:#fff;border-radius:999px;padding:9px 22px 9px 11px;text-decoration:none;box-shadow:0 10px 24px rgba(8,12,40,.35);transition:transform .18s ease,box-shadow .18s ease}
.brand-pill:hover{transform:translateY(-3px);box-shadow:0 16px 32px rgba(8,12,40,.45)}
.brand-pill img{width:32px;height:32px;object-fit:contain;flex:none}
.brand-pill span{font-weight:700;font-size:.99rem;color:#172554;white-space:nowrap}
@media(max-width:640px){.fp-hero{padding:70px 0 56px}.fp-logos{gap:26px}.fp-logos img{height:24px}.fp-trusted{letter-spacing:.22em}}

/* table of contents on articles */
.toc{background:linear-gradient(180deg,#f5f3ff,#eef2ff);border:1px solid #ddd6fe;border-radius:14px;padding:18px 22px;margin:26px 0 8px}
.toc-title{font-weight:800;font-size:.82rem;letter-spacing:.14em;text-transform:uppercase;color:#6d28d9;margin:0 0 10px}
.toc ol{margin:0;padding-left:20px;columns:2;column-gap:32px}
.toc li{margin:5px 0;font-size:.95rem;break-inside:avoid}
.toc a{color:#4338ca;text-decoration:none}
.toc a:hover{text-decoration:underline}
@media(max-width:640px){.toc ol{columns:1}}

/* hover dropdown breadcrumb */
.crumbs{margin:26px 0 6px}
.crumb-drop{position:relative;display:inline-block}
.crumb-btn{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line,#e5e7eb);border-radius:999px;padding:8px 16px;font-size:.88rem;font-weight:600;color:var(--cc,#4f46e5);cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.05);font-family:inherit}
.crumb-btn:hover{box-shadow:0 4px 14px rgba(0,0,0,.1)}
.cb-sep{opacity:.45}
.cb-caret{font-size:.68rem;transition:transform .2s}
.crumb-panel{position:absolute;top:calc(100% + 10px);left:0;min-width:300px;max-width:min(92vw,360px);background:#fff;border:1px solid var(--line,#e5e7eb);border-radius:16px;box-shadow:0 24px 60px rgba(30,27,75,.18);padding:10px;z-index:60;opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease,visibility .18s}
.crumb-drop:hover .crumb-panel,.crumb-drop:focus-within .crumb-panel,.crumb-drop.open .crumb-panel{opacity:1;visibility:visible;transform:none}
.crumb-drop:hover .cb-caret,.crumb-drop.open .cb-caret{transform:rotate(180deg)}
.article-wrap .crumbs .cp-link{display:block;padding:9px 12px;border-radius:10px;color:#1f2937;text-decoration:none;font-size:.92rem;line-height:1.35}
.article-wrap .crumbs .cp-link:hover{background:#f5f3ff;color:#4c1d95}
.article-wrap .crumbs .cp-cat{font-weight:700;color:var(--cc,#4f46e5)}
.cp-head{margin:10px 12px 4px;font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted,#6b7280);font-weight:700}
