:root{
  --bg:#05060a; --panel:#0a0d16; --card:#0c0f1a; --card-h:#11151f;
  --fg:#e7ecf5; --muted:#7d8597; --fg-dim:#c3cbd9;
  --a:#7fc0ff; --brand-ai:#4d9dff; --c:#f472b6;
  --line:rgba(255,255,255,.08); --line-2:rgba(255,255,255,.15);
  --code-bg:#0d1017;
  --header-bg:rgba(8,11,18,.78);
  --container:1200px; --pad:clamp(1rem,3vw,2rem); --header-h:72px;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{scroll-behavior:smooth; overflow-x:clip}     /* clip keeps position:sticky working */
body{background:var(--bg); color:var(--fg); font-family:var(--sans); line-height:1.6; font-size:16px}
a{color:var(--a); text-decoration:none}
a:hover{text-decoration:underline}
img{display:block; max-width:100%; height:auto}
button{font:inherit; cursor:pointer}
code,pre,.mono{font-family:var(--mono)}

/* ===== centered container (the fix for 'pushed left') ===== */
.container{width:100%; max-width:var(--container); margin:0 auto; padding:0 var(--pad)}

/* ===== sticky header (full-bleed bar, slims on scroll) ===== */
.site-header{position:sticky; top:0; z-index:50; background:var(--header-bg);
  backdrop-filter:saturate(160%) blur(14px); -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--line); box-shadow:0 2px 14px -8px rgba(0,0,0,.6)}
.site-header__inner{display:flex; align-items:center; gap:1.6rem; flex-wrap:nowrap;
  height:var(--header-h); padding:0 var(--pad)}
.brand{font-size:1.95rem; font-weight:700; letter-spacing:-.03em; color:#fff; line-height:1; flex:0 0 auto}
.brand .ai{color:var(--brand-ai)}

@supports (animation-timeline: scroll()){
  @keyframes cs-slim-header{to{height:60px}}
  @keyframes cs-slim-brand{to{font-size:1.4rem}}
  .site-header__inner{animation:cs-slim-header linear both; animation-timeline:scroll(root block); animation-range:0 150px}
  .site-header .brand{animation:cs-slim-brand linear both; animation-timeline:scroll(root block); animation-range:0 150px}
}

/* nav - centered between brand (left) and search (right) */
.site-nav{display:flex; align-items:center; gap:.3rem; flex:1 1 auto; justify-content:center}
.site-nav__link{display:inline-flex; align-items:center; gap:5px; padding:9px 13px; border-radius:8px;
  color:var(--fg-dim); font-size:14.5px; font-weight:500; white-space:nowrap; transition:color .12s, background .12s}
.site-nav__link:hover{color:#fff; background:rgba(255,255,255,.05); text-decoration:none}
.site-nav__link.is-active{color:#fff; background:rgba(255,255,255,.06)}
.nav-dd__caret{opacity:.65; transition:transform .15s}

/* CSS hover/focus dropdown + hover bridge (never disappears mid-move) */
.nav-dd{position:relative; display:inline-flex; align-items:center; padding-bottom:.7rem; margin-bottom:-.7rem}
.nav-dd:hover .nav-dd__caret, .nav-dd:focus-within .nav-dd__caret{transform:rotate(180deg)}
.nav-dd__menu{position:absolute; top:100%; left:0; z-index:60; display:none; min-width:264px;
  background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:7px;
  box-shadow:0 20px 46px -16px rgba(0,0,0,.7)}
.nav-dd__menu::before{content:""; position:absolute; left:0; right:0; top:-16px; height:16px}  /* hover bridge */
.nav-dd:hover .nav-dd__menu, .nav-dd:focus-within .nav-dd__menu{display:block}
.nav-dd__item{display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:8px;
  color:var(--fg-dim); font-size:13.5px; font-weight:500}
.nav-dd__item:hover{background:rgba(255,255,255,.05); color:#fff; text-decoration:none}
.nav-dd__icon{width:34px; height:34px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  border-radius:9px; background:rgba(255,255,255,.05); color:var(--muted)}
.nav-dd__icon svg{width:18px; height:18px}
.nav-dd__text{display:flex; flex-direction:column; line-height:1.2}
.nav-dd__name{font-size:13.5px; font-weight:600; color:#e8edf6}
.nav-dd__count{font-family:var(--mono); font-size:10.5px; color:var(--muted)}
.nav-dd__icon--teal{color:#7fc0ff;background:rgba(127,192,255,.10)} .nav-dd__icon--indigo{color:#a5b4fc;background:rgba(129,140,248,.12)}
.nav-dd__icon--pink{color:#f9a8d4;background:rgba(244,114,182,.12)} .nav-dd__icon--amber{color:#fcd34d;background:rgba(251,191,36,.12)}
.nav-dd__icon--green{color:#6ee7b7;background:rgba(52,211,153,.12)} .nav-dd__icon--violet{color:#c4b5fd;background:rgba(167,139,250,.12)}

/* nested flyout: hover a topic -> its top posts */
.nav-dd__group{position:relative}
.nav-dd__fly{margin-left:auto; flex:0 0 auto; opacity:.45; transition:opacity .12s}
.nav-dd__group:hover>.nav-dd__item .nav-dd__fly, .nav-dd__group:focus-within>.nav-dd__item .nav-dd__fly{opacity:1}
.nav-dd__flyout{position:absolute; right:100%; top:-7px; margin-right:8px; display:none; min-width:248px;
  background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:7px;
  box-shadow:0 20px 46px -16px rgba(0,0,0,.7); z-index:70}
.nav-dd__flyout::after{content:""; position:absolute; right:-12px; top:0; bottom:0; width:12px}  /* hover bridge */
.nav-dd__group:hover>.nav-dd__flyout, .nav-dd__group:focus-within>.nav-dd__flyout{display:block}
.nav-dd__flyhead{font-family:var(--mono); font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); padding:6px 10px 8px}
.nav-dd__flylink{display:block; padding:8px 10px; border-radius:8px; font-size:13px; color:var(--fg-dim);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:300px}
.nav-dd__flylink:hover{background:rgba(255,255,255,.05); color:#fff; text-decoration:none}
.nav-dd__flyempty{display:block; padding:8px 10px; font-size:12.5px; color:var(--muted)}
.nav-dd__flymore{display:block; margin-top:5px; padding:9px 10px; border-top:1px solid var(--line);
  font-family:var(--mono); font-size:11.5px; letter-spacing:.04em; color:var(--brand-ai)}
.nav-dd__flymore:hover{background:rgba(255,255,255,.04); text-decoration:none}

/* header search - far right, professional pill */
.hsearch{flex:0 0 auto; display:flex; align-items:center; gap:8px;
  width:clamp(170px,18vw,240px); background:var(--card); border:1px solid var(--line-2);
  border-radius:10px; padding:0 12px; transition:border-color .13s, box-shadow .13s, background .13s}
.hsearch:focus-within{border-color:var(--brand-ai); background:#0c1118; box-shadow:0 0 0 3px rgba(77,157,255,.18)}
.hsearch__icon{flex:0 0 auto; color:var(--muted); display:flex}
.hsearch__input{flex:1 1 auto; min-width:0; background:none; border:0; outline:none; color:var(--fg);
  font-family:var(--sans); font-size:14px; padding:10px 0}
.hsearch__input::placeholder{color:var(--muted)}

/* mobile nav (no JS) */
.nav-toggle{display:none}
.mobile-nav{display:none}
@media (max-width:860px){
  .site-nav, .hsearch{display:none}
  .site-header__inner{justify-content:space-between}
  .nav-toggle{display:inline-flex; align-items:center; margin-left:auto; font-family:var(--mono); font-size:12px;
    text-transform:uppercase; letter-spacing:.12em; color:var(--fg-dim); padding:.6rem 0}
  .nav-toggle::after{content:"Menu"}
  .nav-toggle-cb:checked ~ .site-header .nav-toggle::after{content:"Close"}
  .nav-toggle-cb:checked ~ .site-header .mobile-nav{display:block; border-top:1px solid var(--line); background:var(--panel)}
  .mobile-nav a, .mobile-nav summary{display:block; padding:.85rem var(--pad);
    font-size:15px; font-weight:600; color:var(--fg-dim); border-bottom:1px solid var(--line)}
  .mobile-nav a:hover{background:rgba(255,255,255,.04); text-decoration:none}
  .mobile-nav__search{padding:12px var(--pad); border-bottom:1px solid var(--line)}
  .mobile-nav__search input{width:100%; background:var(--code-bg); border:1px solid var(--line-2); color:var(--fg);
    border-radius:9px; padding:11px 13px; font-family:var(--sans); font-size:15px; outline:none}
  .mobile-nav__search input:focus{border-color:var(--brand-ai)}
  .mobile-nav__group>summary{list-style:none; cursor:pointer; display:flex; justify-content:space-between}
  .mobile-nav__group>summary::-webkit-details-marker{display:none}
  .mobile-nav__group>summary::after{content:"\25BE"; color:var(--muted)}
  .mobile-nav__group[open]>summary::after{transform:rotate(180deg)}
  .mobile-nav__sub a{padding-left:calc(var(--pad) + 1rem); font-size:13.5px; font-weight:500; background:rgba(255,255,255,.02)}
}

/* ===== buttons (clean, not mono/AI-looking) ===== */
.btn{display:inline-flex; align-items:center; gap:8px; border-radius:9px; padding:11px 20px;
  font-family:var(--sans); font-size:14.5px; font-weight:600; letter-spacing:0; border:1px solid transparent;
  transition:filter .12s, background .12s, border-color .12s, transform .04s}
.btn:hover{text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn--primary{background:var(--brand-ai); color:#03101f} .btn--primary:hover{filter:brightness(1.07)}
.btn--ghost{background:rgba(255,255,255,.03); border-color:var(--line-2); color:var(--fg)}
.btn--ghost:hover{background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.25)}

/* ===== hero ===== */
.hero{position:relative; overflow:hidden; border:1px solid var(--line-2); border-radius:18px;
  padding:clamp(2.6rem,7vw,4.6rem) clamp(1.6rem,5vw,3.4rem); text-align:center; isolation:isolate; margin-top:30px}
.hero::after{content:""; position:absolute; inset:-40%; z-index:-1; filter:blur(80px); opacity:.5;
  background:radial-gradient(40% 40% at 22% 32%,#4d9dff 0,transparent 60%),
             radial-gradient(36% 36% at 80% 26%,#f472b6 0,transparent 60%),
             radial-gradient(46% 46% at 50% 82%,#7fc0ff 0,transparent 60%)}
.hero::before{content:""; position:absolute; inset:0; z-index:-1; background:rgba(5,6,10,.5)}
.hero__eyebrow{font-family:var(--mono); font-size:11.5px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--brand-ai); margin:0 0 14px}
.hero__title{font-size:clamp(2.6rem,7vw,4.2rem); font-weight:700; letter-spacing:-.035em; margin:0; color:#fff; line-height:1}
.hero__title .ai{color:var(--brand-ai)}
.hero__sub{color:var(--fg-dim); font-size:clamp(.92rem,1.4vw,1.02rem); margin:14px auto 0; max-width:60ch; line-height:1.6}
.hero__cta{display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:26px}

/* ===== sections ===== */
.section{margin-top:48px}
.section__head{display:flex; align-items:baseline; justify-content:space-between; gap:16px;
  margin-bottom:22px; padding-bottom:12px; border-bottom:1px solid var(--line)}
.section__title{font-size:1.4rem; font-weight:600; letter-spacing:-.01em; margin:0; color:var(--brand-ai)}
.section__more{font-family:var(--mono); font-size:12.5px; color:var(--muted)}
.section__more:hover{color:var(--a)}
.section__title-link{color:inherit}
.section__title-link:hover{color:var(--brand-ai); text-decoration:none}

/* ===== topic blocks ===== */
.topic-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px}
.topic-card{display:flex; flex-direction:column; gap:10px; background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:20px; transition:border-color .14s, background .14s, transform .08s}
.topic-card:hover{border-color:var(--line-2); background:var(--card-h); transform:translateY(-2px); text-decoration:none;
  box-shadow:0 14px 32px -18px rgba(0,0,0,.6)}
.topic-card__icon{width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.05); color:var(--muted)}
.topic-card__icon svg{width:24px; height:24px}
.topic-card__name{font-size:1.14rem; font-weight:600; color:#e8edf6; letter-spacing:-.01em}
.topic-card__blurb{color:var(--muted); font-size:.92rem; margin:0; flex:1 1 auto}
.topic-card__count{font-family:var(--mono); font-size:11px; color:var(--muted)}
.topic-card--teal .topic-card__icon{color:#7fc0ff;background:rgba(127,192,255,.10)} .topic-card--indigo .topic-card__icon{color:#a5b4fc;background:rgba(129,140,248,.12)}
.topic-card--pink .topic-card__icon{color:#f9a8d4;background:rgba(244,114,182,.12)} .topic-card--amber .topic-card__icon{color:#fcd34d;background:rgba(251,191,36,.12)}
.topic-card--green .topic-card__icon{color:#6ee7b7;background:rgba(52,211,153,.12)} .topic-card--violet .topic-card__icon{color:#c4b5fd;background:rgba(167,139,250,.12)}

/* ===== headings / list head ===== */
.page-title{font-size:2rem; font-weight:700; letter-spacing:-.02em; margin:30px 0 8px}
.lede{font-size:1.15rem; color:var(--fg); max-width:70ch}
.muted{color:var(--muted)} .empty-state{padding:28px 0}
.list-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px;
  margin-top:30px; padding-bottom:14px; margin-bottom:18px; border-bottom:1px solid var(--line)}
.list-head__title{font-size:1.7rem; font-weight:700; letter-spacing:-.02em; margin:0; color:var(--brand-ai)}
.list-head__title--sm{font-size:1.2rem}
.list-head__sub{margin:6px 0 0; font-size:.95rem}
.list-head__count{flex:0 0 auto; font-size:12.5px; color:var(--muted);
  border:1px solid var(--line); border-radius:999px; padding:5px 12px; white-space:nowrap}

/* ===== post cards ===== */
.card-feed{display:flex; flex-direction:column; gap:14px}
.card{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:18px 20px;
  transition:border-color .14s, background .14s, transform .08s}
.card:hover{border-color:var(--line-2); background:var(--card-h); transform:translateY(-1px)}
.card__title{display:inline-block; font-size:1.22rem; font-weight:600; letter-spacing:-.01em; color:#e8edf6}
.card__title:hover{color:var(--a); text-decoration:none}
.card__excerpt{color:var(--muted); margin:7px 0 0; font-size:.96rem}
.card__meta{margin-top:13px; display:flex; flex-wrap:wrap; gap:12px; font-family:var(--mono); font-size:11.5px; color:var(--muted)}
.card__meta b{color:var(--a); font-weight:500} .card__meta .dot{opacity:.4}

/* ===== single post ===== */
.post-wrap{max-width:840px; margin:0 auto; position:relative}
/* Wide screens: the back button floats in the open gutter between the sidebar
   and the post column, aligned with the title. Narrower screens keep the
   normal placement above the header. */
@media (min-width:1300px){
  .backlink--post{position:absolute; top:44px; right:100%; margin:0 26px 0 0;
    width:44px; height:44px; padding:0; justify-content:center; gap:0}
  .backlink--post .backlink__label{display:none}
  .backlink--post svg{width:19px; height:19px}
}
.post__topics{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.post__topic-chip{display:inline-flex; align-items:center; padding:4px 12px;
  border:1px solid var(--line-2); border-radius:999px; background:var(--card);
  font-family:var(--mono); font-size:12px; letter-spacing:.03em; color:var(--fg-dim);
  transition:background .12s, color .12s, border-color .12s}
.post__topic-chip:hover{background:var(--card-h); color:#fff; text-decoration:none}
.post__header{margin:14px 0 34px; padding-bottom:22px; border-bottom:1px solid var(--line)}
.post__kicker{display:flex; align-items:center; gap:10px; font-family:var(--mono); font-size:12px;
  letter-spacing:.04em; color:var(--muted); margin-bottom:16px}
.post__kicker-dot{opacity:.4}
.post__title{font-size:clamp(2.1rem,4vw,2.8rem); font-weight:700; letter-spacing:-.025em; margin:0; line-height:1.1}
.post__body{max-width:none; font-size:1.06rem; line-height:1.78; color:var(--fg-dim)}
/* headings: display font + distinct theme colors */
.post__body :is(h1,h2,h3,h4){font-family:var(--display); letter-spacing:-.01em; line-height:1.25; font-weight:700; scroll-margin-top:90px; color:var(--brand-ai)}
.post__body h1{font-size:1.95rem; margin:1.5em 0 .5em}
.post__body h2{font-size:1.55rem; margin:1.8em 0 .6em; padding-bottom:.34em;
  border-bottom:1px solid var(--line)}
.post__body h3{font-size:1.24rem; margin:1.6em 0 .45em}
.post__body h4{font-size:1.06rem; margin:1.5em 0 .35em}
.post__body p{margin:1.05em 0}
.post__body a{color:var(--a); text-decoration:underline; text-underline-offset:2px;
  text-decoration-color:rgba(127,192,255,.45); transition:text-decoration-color .12s}
.post__body a:hover{text-decoration-color:var(--a)}
.post__body strong{color:#fff; font-weight:700}
.post__body em{color:#e2e9f4}
.post__body mark{background:rgba(127,192,255,.22); color:#eaf3ff; padding:.06em .32em; border-radius:4px;
  -webkit-box-decoration-break:clone; box-decoration-break:clone}
.post__body ul,.post__body ol{margin:1em 0; padding-left:1.45em}
.post__body li{margin:.4em 0}
.post__body li::marker{color:var(--brand-ai)}
.post__body hr{border:0; border-top:1px solid var(--line); margin:2.2em 0}
.post__body img{border-radius:12px; border:1px solid var(--line); margin:1.4em 0}
.post__body table{width:100%; border-collapse:collapse; margin:1.4em 0; font-size:.95em}
.post__body th,.post__body td{border:1px solid var(--line); padding:9px 13px; text-align:left}
.post__body th{background:rgba(255,255,255,.03); color:#fff; font-weight:600}
/* inline code: pops in baby blue on a tinted chip */
.post__body :not(pre) > code,.response__body :not(pre) > code{
  background:rgba(127,192,255,.10); border:1px solid rgba(127,192,255,.24);
  padding:.1em .42em; border-radius:6px; font-size:.86em; color:#bcdcff}
/* code block: terminal-style card with a language header */
.codeblock{margin:1.5em 0; border:1px solid var(--line-2); border-radius:12px; overflow:hidden;
  background:var(--code-bg); box-shadow:0 12px 34px -22px rgba(0,0,0,.85)}
.codeblock__lang{position:relative; display:flex; justify-content:flex-end; align-items:center;
  font-family:var(--mono); font-size:10.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--a); background:rgba(255,255,255,.025); border-bottom:1px solid var(--line); padding:9px 14px}
.codeblock__lang::before{content:""; position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:9px; height:9px; border-radius:50%; background:rgba(255,255,255,.28);
  box-shadow:15px 0 0 rgba(255,255,255,.18), 30px 0 0 rgba(255,255,255,.12)}
.codeblock pre{margin:0; border:0; border-radius:0; background:none; padding:15px 18px; overflow:auto}
.codeblock pre code{background:none; border:0; padding:0; font-size:.9em}
/* response code blocks (no wrapper) */
.response__body pre{background:var(--code-bg); border:1px solid var(--line); border-radius:10px;
  padding:14px 16px; overflow:auto; margin:1.2em 0}
.response__body pre code{background:none; border:0; padding:0; font-size:.9em}
.post__body blockquote,.response__body blockquote{margin:.55em 0; padding:.55em 1.15em;
  border-left:3px solid var(--brand-ai); background:rgba(77,157,255,.07); border-radius:0 8px 8px 0; color:var(--fg-dim)}
.post__body blockquote p:first-child,.response__body blockquote p:first-child{margin-top:0}
.post__body blockquote p:last-child,.response__body blockquote p:last-child{margin-bottom:0}

/* ===== responses ===== */
.responses{margin-top:72px; padding-top:40px; border-top:2px solid var(--line); max-width:none}
.responses__heading{font-family:var(--mono); font-size:.95rem; font-weight:500; border-bottom:1px solid var(--line); padding-bottom:10px}
.responses__heading::before{content:"// "; color:var(--a); opacity:.8}
.response{padding:18px 0; border-bottom:1px solid var(--line)}
.response--new{animation:cs-resp-in .45s ease}
@keyframes cs-resp-in{from{opacity:0; transform:translateY(-4px)}to{opacity:1; transform:none}}
.response__meta{font-family:var(--mono); font-size:12px; color:var(--muted); margin-bottom:6px}
.response__author{color:var(--a); font-weight:500; margin-right:8px}

/* ===== response form ===== */
.flash{font-family:var(--mono); font-size:13px; padding:10px 14px; border-radius:8px; margin:16px 0}
.flash--ok{background:rgba(127,192,255,.12); color:var(--a)} .flash--error{background:rgba(244,114,182,.12); color:var(--c)}
.respond-form{margin-top:26px; display:flex; flex-direction:column; gap:14px; max-width:64ch}
.respond-form__hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}  /* honeypot: hidden from humans */
.respond-closed{margin-top:26px; font-family:var(--mono); font-size:13px; color:var(--muted)}
.respond-form__label{display:flex; flex-direction:column; gap:6px; font-family:var(--mono); font-size:12.5px; color:var(--muted)}
.respond-form__input,.respond-form__textarea{background:var(--code-bg); border:1px solid var(--line);
  color:var(--fg); border-radius:8px; padding:10px 12px; font-size:15px; width:100%; font-family:var(--mono)}
.respond-form__input:focus,.respond-form__textarea:focus{outline:none; border-color:rgba(127,192,255,.5)}
.respond-form__textarea{resize:vertical; min-height:150px; line-height:1.5}
.respond-form__submit{align-self:flex-start; background:var(--a); color:#05221d; border:0; border-radius:8px;
  padding:10px 20px; font-weight:700; font-size:14px; font-family:var(--mono)}
.respond-form__submit:hover{filter:brightness(1.06)}

/* ===== topic page banner ===== */
.topic-banner{position:relative; border-radius:16px; padding:28px; margin-top:30px; margin-bottom:24px;
  border:1px solid var(--line-2); overflow:hidden; isolation:isolate; color:#f4f7fb; display:flex; align-items:center; gap:18px}
.topic-banner::after{content:""; position:absolute; inset:0; z-index:-1; opacity:.92}
.topic-banner__icon{flex:0 0 auto; width:60px; height:60px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.22); color:var(--accent,#fff)}
.topic-banner__icon svg{width:28px; height:28px}
.topic-banner__eyebrow{font-family:var(--mono); font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:rgba(255,255,255,.8)}
.topic-banner__title{font-size:2rem; font-weight:700; letter-spacing:-.02em; margin:4px 0 0}
.topic-banner__blurb{margin:6px 0 0; color:rgba(255,255,255,.85); max-width:60ch}
.banner--teal{--accent:#7fc0ff} .banner--indigo{--accent:#818cf8} .banner--pink{--accent:#f472b6}
.banner--amber{--accent:#fbbf24} .banner--green{--accent:#34d399} .banner--violet{--accent:#a78bfa} .banner--rose{--accent:#fb7185}
.banner--teal::after{background:linear-gradient(135deg,#3b82f6,#1e40af)} .banner--indigo::after{background:linear-gradient(135deg,#6366f1,#4338ca)}
.banner--pink::after{background:linear-gradient(135deg,#ec4899,#be185d)} .banner--amber::after{background:linear-gradient(135deg,#f59e0b,#c2710c)}
.banner--green::after{background:linear-gradient(135deg,#10b981,#059669)} .banner--violet::after{background:linear-gradient(135deg,#8b5cf6,#6d28d9)}

/* ===== legal + about ===== */
.legal{max-width:74ch; margin-top:8px}
/* about page */
.about{max-width:760px; margin:0 auto}
.about__header{text-align:center; padding:30px 0 26px; margin-bottom:30px; border-bottom:1px solid var(--line)}
.about__title{font-size:clamp(2.6rem,6vw,3.5rem); font-weight:700; letter-spacing:-.03em; margin:0; color:#fff}
.about__title .ai{color:var(--brand-ai)}
.about__tagline{color:var(--muted); font-size:1.1rem; line-height:1.6; max-width:48ch; margin:14px auto 0}
.about__body{font-size:1.04rem; line-height:1.75}
.about__body p{margin:1.05em 0}
.legal h2,.about h2{font-size:1.25rem; font-weight:600; margin:1.8em 0 .5em}
.legal h3{font-size:1.02rem; font-weight:600; color:var(--fg-dim); margin:1.3em 0 .4em}
.legal__meta{font-size:12px; color:var(--muted); margin:-2px 0 26px}
.legal p,.legal li,.about p,.about li{color:var(--fg-dim)} .legal ul,.about ul{padding-left:1.2em} .legal li,.about li{margin:.35em 0}
.legal a,.about a{text-decoration:underline}
.about .lede{color:var(--fg); margin-bottom:1.1em}
.about-topics{list-style:none; padding:0 !important; margin:1.1em 0; display:grid; gap:10px}
.about-topics li{margin:0; padding:14px 16px; background:var(--card); border:1px solid var(--line); border-radius:10px}
.about-topics a{text-decoration:none; color:#e8edf6} .about-topics a:hover{color:var(--a)}

/* ===== footer ===== */
.site-footer{border-top:1px solid var(--line); background:var(--panel); margin-top:64px}
.site-footer__inner{display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding-top:18px; padding-bottom:18px; font-size:12px; color:var(--muted)}
.site-footer__links{display:flex; gap:20px}
.site-footer__links a{color:var(--muted)} .site-footer__links a:hover{color:var(--fg)}

/* =========================================================
   LEFT-SIDEBAR LAYOUT (experimental) + home search + gradient covers
   ========================================================= */
.layout{display:flex; align-items:flex-start; min-height:100vh}
.sidenav{position:sticky; top:0; height:100vh; width:252px; flex:0 0 252px;
  display:flex; flex-direction:column; gap:4px; padding:20px 14px;
  background:var(--panel); border-right:1px solid var(--line); overflow-y:auto}
.sidenav__top{display:flex; align-items:center; justify-content:space-between; padding:0 6px 6px}
.sidenav .brand{font-size:1.55rem; font-weight:700; letter-spacing:-.03em; color:#fff; line-height:1}
.sidenav .brand .ai{color:var(--brand-ai)}
/* desktop: larger, horizontally-centered logo filling the sidebar width */
@media (min-width:821px){
  .sidenav__top{justify-content:center; padding:6px 6px 14px}
  .sidenav .brand{font-size:2.35rem}
}
.sidenav__nav{display:flex; flex-direction:column; gap:5px; margin-top:12px}
.sidelink{display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:9px;
  color:var(--fg-dim); font-size:14.5px; font-weight:500; transition:background .12s, color .12s}
.sidelink:hover{background:rgba(255,255,255,.05); color:#fff; text-decoration:none}
.sidelink.is-active{background:rgba(77,157,255,.12); color:#fff}
.sidegroup{border:0; margin:0}
.sidegroup__summary{list-style:none; cursor:pointer; justify-content:space-between}
.sidegroup__summary::-webkit-details-marker{display:none}
.sidegroup__caret{opacity:.6; transition:transform .15s; flex:0 0 auto}
.sidegroup[open] .sidegroup__caret{transform:rotate(180deg)}
.sidegroup__items{display:flex; flex-direction:column; gap:2px; margin:3px 0 6px 8px; padding-left:8px; border-left:1px solid var(--line)}
.sidetopic{display:flex; align-items:center; gap:9px; padding:8px 10px; border-radius:8px; color:var(--fg-dim); font-size:13px; transition:background .12s, color .12s}
.sidetopic:hover{background:rgba(255,255,255,.05); color:#fff; text-decoration:none}
.sidetopic.is-active{background:rgba(255,255,255,.06); color:#fff}
.sidetopic--teal{--accent:#7fc0ff} .sidetopic--indigo{--accent:#818cf8} .sidetopic--pink{--accent:#f472b6}
.sidetopic--amber{--accent:#fbbf24} .sidetopic--green{--accent:#34d399} .sidetopic--violet{--accent:#a78bfa}
.sidetopic--rose{--accent:#fb7185}
.sidetopic__icon{width:22px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; color:var(--accent,#7d8597)}
.sidetopic__icon svg{width:18px; height:18px}
.sidetopic__name{flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sidetopic__count{font-family:var(--mono); font-size:10.5px; color:var(--muted)}
/* sub-topic dropdown: <details> group with a parent summary + nested child links */
.sidegroup{display:block}
.sidegroup > summary{list-style:none; cursor:pointer; user-select:none}
.sidegroup > summary::-webkit-details-marker{display:none}
.sidegroup > summary::marker{content:""}
.sidegroup__chevron{flex:0 0 auto; display:flex; align-items:center; color:var(--muted); transition:transform .15s}
.sidegroup[open] > summary .sidegroup__chevron{transform:rotate(180deg)}
.sidegroup__kids{display:flex; flex-direction:column; gap:2px; margin:2px 0 2px 11px; padding-left:9px; border-left:1px solid var(--line)}
.sidetopic--sub{padding:7px 10px; font-size:12.5px}
.sidetopic--sub .sidetopic__icon{width:18px}
.sidetopic--sub .sidetopic__icon svg{width:15px; height:15px}
.main{flex:1 1 auto; min-width:0; display:flex; flex-direction:column; min-height:100vh}
.nav-toggle{display:none}

/* home search band (between hero and Browse topics) */
.home-search{margin:26px 0 6px}
.home-search form{display:flex; align-items:center; gap:10px; width:100%; max-width:640px; margin:0 auto;
  background:var(--card); border:1px solid var(--line-2); border-radius:14px; padding:6px 8px 6px 16px;
  transition:border-color .13s, box-shadow .13s}
.home-search form:focus-within{border-color:var(--brand-ai); box-shadow:0 0 0 4px rgba(77,157,255,.16)}
.home-search__icon{flex:0 0 auto; color:var(--muted); display:flex}
.home-search__input{flex:1 1 auto; min-width:0; background:none; border:0; outline:none; color:var(--fg);
  font-family:var(--sans); font-size:1.05rem; padding:12px 0}
.home-search__input::placeholder{color:var(--muted)}
.home-search__btn{flex:0 0 auto; background:var(--brand-ai); color:#03101f; border:0; border-radius:10px;
  padding:11px 18px; font-family:var(--sans); font-weight:600; font-size:14px}
.home-search__btn:hover{filter:brightness(1.07)}

/* per-topic post filter — same pill look as the home search, smaller */
.topic-search{display:flex; align-items:center; gap:9px; margin:0 0 16px; padding:4px 14px;
  background:var(--card); border:1px solid var(--line-2); border-radius:12px;
  transition:border-color .13s, box-shadow .13s}
.topic-search:focus-within{border-color:var(--brand-ai); box-shadow:0 0 0 4px rgba(77,157,255,.16)}
.topic-search__icon{flex:0 0 auto; color:var(--muted); display:flex}
.topic-search__input{flex:1 1 auto; min-width:0; background:none; border:0; outline:none; color:var(--fg);
  font-family:var(--sans); font-size:.98rem; padding:9px 0}
.topic-search__input::placeholder{color:var(--muted)}

/* gradient cover cards */
.topic-cover-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px}
.topic-cover{position:relative; isolation:isolate; overflow:hidden; display:flex; flex-direction:column; gap:9px;
  min-height:168px; border-radius:16px; padding:22px; border:1px solid var(--line-2); color:#f4f7fb;
  transition:transform .12s, box-shadow .12s}
.topic-cover::after{content:""; position:absolute; inset:0; z-index:-1; opacity:.95}
.topic-cover:hover{transform:translateY(-3px); text-decoration:none; box-shadow:0 18px 42px -18px rgba(0,0,0,.7)}
.topic-cover__icon{width:46px; height:46px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.25); color:#fff}
.topic-cover__icon svg{width:24px; height:24px}
.topic-cover__name{font-size:1.3rem; font-weight:700; letter-spacing:-.01em; margin-top:2px}
.topic-cover__blurb{color:rgba(255,255,255,.86); font-size:.93rem; flex:1 1 auto}
.topic-cover__count{font-family:var(--mono); font-size:11px; color:rgba(255,255,255,.82); background:rgba(0,0,0,.25); align-self:flex-start; padding:3px 10px; border-radius:999px}

@media (max-width:820px){
  .layout{flex-direction:column}
  /* sticky mobile header bar: brand + hamburger, full menu drops down */
  .sidenav{position:sticky; top:0; z-index:60; width:auto; height:auto; flex:none; flex-direction:column;
    border-right:0; border-bottom:1px solid var(--line); padding:10px 16px; background:var(--panel);
    box-shadow:0 2px 14px -8px rgba(0,0,0,.6); overflow:visible}
  .sidenav__top{padding:0}
  .sidenav__nav, .sidenav__foot{display:none}
  .nav-toggle-cb:checked ~ .layout .sidenav__nav{display:flex; margin-top:12px}
  .nav-toggle-cb:checked ~ .layout .sidenav__foot{display:flex; margin-top:8px; border-top:1px solid var(--line); padding-top:12px}
  .nav-toggle{display:inline-flex; align-items:center; gap:8px; font-family:var(--mono); font-size:12px;
    text-transform:uppercase; letter-spacing:.12em; color:var(--fg-dim); cursor:pointer; padding:6px 4px}
  .nav-toggle::before{content:"\2630"; font-size:16px}
  .nav-toggle::after{content:"Menu"}
  .nav-toggle-cb:checked ~ .layout .nav-toggle::before{content:"\2715"}
  .nav-toggle-cb:checked ~ .layout .nav-toggle::after{content:"Close"}
  .main{min-height:0}
  .topic-cover-grid, .tcards{grid-template-columns:1fr}
  .tcard:last-child:nth-child(odd){grid-column:auto; justify-self:auto; width:auto}
}

/* sidebar: flat topics list + bottom About + brand mark */
.sidenav__label{font-family:var(--display); font-size:13px; letter-spacing:.005em; text-transform:none;
  color:var(--muted); opacity:1; font-weight:600; margin:16px 10px 10px; padding-top:16px;
  border-top:1px solid var(--line)}
.sidenav__foot{margin-top:auto; padding-top:14px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:6px}
.sidemark{display:flex; align-items:center; gap:10px; padding:8px; border-radius:10px; transition:background .12s}
.sidemark:hover{background:rgba(255,255,255,.04); text-decoration:none}
.sidemark__badge{width:36px; height:36px; flex:0 0 auto; border-radius:9px; background:#000; border:1px solid var(--line-2);
  display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-weight:700; font-size:16px; color:#fff; letter-spacing:-1px}
.sidemark__badge span{color:var(--brand-ai)}
.sidemark__wrap{display:flex; flex-direction:column; line-height:1.25; min-width:0}
.sidemark__name{font-weight:700; font-size:15px; color:#fff; letter-spacing:-.02em}
.sidemark__name .ai{color:var(--brand-ai)}
.sidemark__tag{font-family:var(--mono); font-size:9.5px; letter-spacing:.03em; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
@media (max-width:820px){
  .sidemark__tag{display:none}
}

/* ===== Browse topics: compact cards with post previews ===== */
.tcards{display:grid; grid-template-columns:repeat(2,1fr); gap:14px}
/* odd count in the 2-col grid: last card sits alone in a row -> center it instead of hugging the left */
.tcard:last-child:nth-child(odd){grid-column:1 / -1; justify-self:center; width:calc(50% - 7px)}
.tcard{background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden;
  transition:border-color .14s}
.tcard:hover{border-color:var(--line-2)}
.tcard__head{position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; gap:11px;
  padding:13px 15px; color:#f4f7fb}
.tcard__head::after{content:""; position:absolute; inset:0; z-index:-1; opacity:.95}
.tcard__head:hover{text-decoration:none}
.tcard__icon{flex:0 0 auto; display:flex; align-items:center; justify-content:center; color:#fff}
.tcard__icon svg{width:22px; height:22px}
.tcard__name{flex:1 1 auto; font-weight:700; font-size:1.04rem; letter-spacing:-.01em; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tcard__count{flex:0 0 auto; font-family:var(--mono); font-size:10.5px; color:rgba(255,255,255,.85);
  background:rgba(0,0,0,.25); padding:3px 9px; border-radius:999px}
.tcard__body{padding:7px}
/* preview row: sub-topic tag links to its topic; the title (and the rest of the
   row's empty space) links to the post. Title truncates with an ellipsis. */
.tcard__post{display:flex; align-items:center; border-radius:8px; font-size:13px; min-width:0}
.tcard__post:hover{background:rgba(255,255,255,.05)}
.tcard__post-tag{flex:0 0 auto; max-width:52%; padding:7px 3px 7px 10px; font-weight:600; color:var(--brand-ai);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tcard__post-tag:hover{text-decoration:underline}
.tcard__post-sep{flex:0 0 auto; color:var(--muted); padding:0 1px}
.tcard__post-title{flex:1 1 auto; min-width:0; padding:7px 10px; color:var(--fg-dim);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tcard__post:hover .tcard__post-title{color:#fff}
.tcard__empty{display:block; padding:7px 10px; font-size:12.5px; color:var(--muted)}
.tcard__more{display:block; padding:8px 10px; font-family:var(--mono); font-size:11px; letter-spacing:.03em;
  color:var(--brand-ai); border-top:1px solid var(--line); margin-top:3px}
.tcard__more:hover{background:rgba(255,255,255,.04); text-decoration:none}
@media (max-width:680px){ .tcards{grid-template-columns:1fr} .tcard:last-child:nth-child(odd){grid-column:auto; justify-self:auto; width:auto} }

/* /topics directory: list/outline of topics with their sub-topics nested under each */
.topic-index{display:flex; flex-direction:column; gap:18px}
.tindex{background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden}
.tindex__head{position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; gap:11px;
  padding:13px 15px; color:#f4f7fb}
.tindex__head::after{content:""; position:absolute; inset:0; z-index:-1; opacity:.95}
.tindex__head:hover{text-decoration:none}
.tindex__icon{flex:0 0 auto; display:flex; align-items:center; color:#fff}
.tindex__icon svg{width:22px; height:22px}
.tindex__name{flex:1 1 auto; font-weight:700; font-size:1.08rem; letter-spacing:-.01em; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tindex__count{flex:0 0 auto; font-family:var(--mono); font-size:10.5px; color:rgba(255,255,255,.85);
  background:rgba(0,0,0,.25); padding:3px 9px; border-radius:999px; white-space:nowrap}
.tindex__blurb{margin:0; padding:11px 15px 4px; color:var(--fg-dim); font-size:13.5px;
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.tindex__subs{list-style:none; margin:0; padding:8px; display:grid; grid-template-columns:1fr 1fr; gap:6px}
.tindex__subs > li{min-width:0}   /* let grid items shrink so inner text can ellipsize */
.tindex__sub{display:flex; align-items:center; gap:9px; min-width:0; padding:9px 11px; border-radius:9px;
  border:1px solid var(--line); color:var(--fg-dim); transition:background .12s, border-color .12s}
.tindex__sub:hover{background:rgba(255,255,255,.04); border-color:var(--line-2); color:#fff; text-decoration:none}
.tindex__sub-icon{flex:0 0 auto; display:flex; align-items:center; color:var(--muted)}
.tindex__sub-icon svg{width:17px; height:17px}
.tindex__sub-name{flex:0 1 auto; min-width:0; font-weight:600; font-size:13.5px; color:var(--fg);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tindex__sub-blurb{flex:1 1 auto; min-width:0; font-size:12px; color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tindex__sub-count{flex:0 0 auto; font-family:var(--mono); font-size:10.5px; color:var(--muted)}
.tindex__empty{margin:0; padding:4px 15px 14px; font-size:12.5px}
@media (max-width:600px){
  /* /topics: single-column sub-topics, more compact, blurb dropped to give names room */
  .tindex__subs{grid-template-columns:1fr}
  .tindex__head{padding:11px 13px; gap:9px}
  .tindex__name{font-size:1rem}
  .tindex__blurb{padding:9px 13px 2px; font-size:12.5px}
  .tindex__sub{padding:10px 11px}
  .tindex__sub-blurb{display:none}
  .list-head__title{font-size:1.45rem}
}
/* smaller, tighter topic cards on phones (home + topic pages) */
@media (max-width:520px){
  .tcard__head{padding:11px 13px; gap:9px}
  .tcard__name{font-size:.98rem}
  .tcard__body{padding:5px}
  .tcard__post{font-size:12.5px}
  .tcard__post-title,.tcard__post-tag{padding-top:6px; padding-bottom:6px}
}

/* ===== About: blue header + cool topic boxes ===== */
.about__title{color:var(--brand-ai)}
.section.about .section__title{color:var(--brand-ai)}
.about-topics{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:1.2em 0; padding:0 !important; list-style:none}
/* odd count: center the trailing card instead of hugging the left */
.about-topics > .about-topic:last-child:nth-child(odd){grid-column:1 / -1; justify-self:center; width:calc(50% - 6px)}
.about-topic{display:flex; align-items:center; gap:12px; padding:13px 15px; background:var(--card);
  border:1px solid var(--line); border-radius:12px; position:relative; overflow:hidden; transition:border-color .14s, transform .08s, background .14s}
.about-topic::before{content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--brand-ai); opacity:.9}
.about-topic--teal::before{background:#7fc0ff} .about-topic--indigo::before{background:#818cf8}
.about-topic--pink::before{background:#f472b6} .about-topic--amber::before{background:#fbbf24}
.about-topic--green::before{background:#34d399} .about-topic--violet::before{background:#a78bfa}
.about-topic--teal{--accent:#7fc0ff} .about-topic--indigo{--accent:#818cf8} .about-topic--pink{--accent:#f472b6}
.about-topic--amber{--accent:#fbbf24} .about-topic--green{--accent:#34d399} .about-topic--violet{--accent:#a78bfa} .about-topic--rose{--accent:#fb7185}
.about-topic:hover{border-color:var(--line-2); background:var(--card-h); transform:translateY(-1px); text-decoration:none}
.about-topic__icon{width:38px; height:38px; flex:0 0 auto; border-radius:10px; background:rgba(255,255,255,.05);
  display:flex; align-items:center; justify-content:center; color:var(--accent,var(--muted))}
.about-topic__icon svg{width:20px; height:20px}
.about-topic__text{display:flex; flex-direction:column; min-width:0; flex:1 1 auto}
.about-topic__name{font-weight:600; color:#e8edf6; font-size:.98rem}
.about-topic__blurb{color:var(--muted); font-size:.82rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.about-topic__arrow{color:var(--muted); font-size:1.2rem; flex:0 0 auto}
.about-topic:hover .about-topic__arrow{color:var(--brand-ai)}
@media (max-width:600px){ .about-topics{grid-template-columns:1fr} .about-topics > .about-topic:last-child:nth-child(odd){grid-column:auto; justify-self:auto; width:auto} }

/* nav-label icons + brighter topic text */
.sidelink__icon{display:inline-flex; flex:0 0 auto; color:var(--muted)}
.sidelink__icon svg{width:18px; height:18px}
.sidelink:hover .sidelink__icon, .sidelink.is-active .sidelink__icon{color:#fff}
.tcard__post{color:#d7deea}
.tcard__post:hover{color:#fff}
.tcard__more{color:#7fc0ff}
.sidetopic__name{color:#cfd6e2}
.sidetopic:hover .sidetopic__name, .sidetopic.is-active .sidetopic__name{color:#fff}

/* live search typeahead dropdown */
.home-search form{position:relative}
.search-suggest{position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:40;
  background:var(--card); border:1px solid var(--line-2); border-radius:12px; padding:6px;
  box-shadow:0 22px 50px -18px rgba(0,0,0,.75); max-height:62vh; overflow:auto}
.search-suggest__item{display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 12px; border-radius:8px}
.search-suggest__item:hover{background:rgba(255,255,255,.05); text-decoration:none}
.search-suggest__empty{padding:14px 12px; color:var(--muted); font-size:13px}
/* /topics global search: breadcrumb results (topic › sub-topic › post) */
.topics-search{position:relative}
.search-suggest__crumbs{display:flex; align-items:center; gap:6px; min-width:0; flex-wrap:wrap}
.search-crumb{font-size:13px; color:var(--muted); white-space:nowrap}
.search-crumb--last{font-weight:600; color:#e8edf6}
.search-crumb__sep{color:var(--line-2); font-size:12px}
.search-suggest__kind{flex:0 0 auto; font-family:var(--mono); font-size:9.5px; text-transform:uppercase;
  letter-spacing:.05em; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:2px 8px}

/* home "About compscai" section header: centered + bigger */
.section.about .section__head{justify-content:center; border-bottom:0; margin-bottom:10px}
.section.about .section__title{width:100%; text-align:center; font-size:clamp(1.9rem,4vw,2.7rem); letter-spacing:-.02em}

/* ===== themed scrollbar (site colors) ===== */
*{scrollbar-width:thin; scrollbar-color:#222a3a transparent}
::-webkit-scrollbar{width:11px; height:11px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:#222a3a; border-radius:8px; border:3px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--brand-ai)}

/* (terminal cursor removed) */

/* ===== 404 ===== */
.notfound{max-width:560px; margin:6vh auto; text-align:center}
.notfound__code{font-family:var(--mono); font-weight:700; font-size:clamp(4rem,16vw,9rem); line-height:1; color:#fff; letter-spacing:-.04em}
.notfound__code .ai{color:var(--brand-ai)}
.notfound__title{font-size:1.6rem; font-weight:700; letter-spacing:-.02em; margin:10px 0 6px}
.notfound__sub{margin:0 auto 24px; max-width:46ch}
.notfound__sub code{background:var(--code-bg); border:1px solid var(--line); padding:.12em .42em; border-radius:5px; font-size:.86em}
.notfound__cta{display:flex; gap:12px; justify-content:center; flex-wrap:wrap}

/* ===== authoritative mobile menu (must come last to win source order) ===== */
@media (max-width:820px){
  .layout{align-items:stretch}            /* full-width sidebar/header on mobile */
  /* header bar: menu button far left, logo far right */
  .sidenav__top{display:flex; width:100%; flex-direction:row; align-items:center}
  .nav-toggle{order:0; margin-left:0 !important; margin-right:auto}
  .brand{order:1; margin-left:auto}
  .sidenav__nav, .sidenav__foot{display:none}

  /* OPEN: full-height fixed overlay (covers the page, scrolls on its own) */
  .nav-toggle-cb:checked ~ .layout .sidenav{
    position:fixed; inset:0; height:100dvh; z-index:100; overflow-y:auto;
    background:var(--bg); border-bottom:0; box-shadow:none;
    display:flex; flex-direction:column; padding:14px 18px}
  .nav-toggle-cb:checked ~ .layout .sidenav__nav{display:flex; margin-top:22px; gap:4px}
  .nav-toggle-cb:checked ~ .layout .sidenav__foot{display:flex; margin-top:auto;
    border-top:1px solid var(--line); padding-top:16px}
  .nav-toggle-cb:checked ~ .layout .sidelink, .nav-toggle-cb:checked ~ .layout .sidetopic{padding:12px}
}

/* ===== dedicated mobile TOP HEADER + full-screen overlay menu (final, wins) ===== */
.mtopbar{display:none}
@media (max-width:820px){
  .mtopbar{display:flex; align-items:center; justify-content:space-between; gap:12px;
    position:sticky; top:0; z-index:60; padding:11px 16px; background:var(--panel);
    border-bottom:1px solid var(--line); box-shadow:0 2px 14px -8px rgba(0,0,0,.55)}
  .mtopbar__btn{display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px;
    border-radius:9px; border:1px solid var(--line-2); background:var(--card); color:var(--fg); cursor:pointer}
  .mtopbar__btn::before{content:"\2630"; font-size:18px; line-height:1}
  .nav-toggle-cb:checked ~ .mtopbar .mtopbar__btn::before{content:"\2715"; font-size:17px}
  .mtopbar__brand{font-size:1.45rem; font-weight:700; letter-spacing:-.03em; color:#fff}
  .mtopbar__brand .ai{color:var(--brand-ai)}

  /* hide the desktop sidebar on mobile; open it as a full-screen overlay */
  .layout{flex-direction:column; align-items:stretch}
  .sidenav{display:none !important}
  .nav-toggle-cb:checked ~ .layout .sidenav{
    display:flex !important; flex-direction:column; position:fixed; inset:0; height:100dvh; z-index:100;
    overflow-y:auto; background:var(--bg); padding:16px 18px 24px; border-right:0; box-shadow:none}
  .nav-toggle-cb:checked ~ .layout .sidenav__top{display:flex; align-items:center; justify-content:space-between; width:100%}
  .nav-toggle-cb:checked ~ .layout .sidenav__nav{display:flex; margin-top:22px; gap:4px}
  .nav-toggle-cb:checked ~ .layout .sidenav__foot{display:flex; margin-top:auto; border-top:1px solid var(--line); padding-top:16px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidelink,
  .nav-toggle-cb:checked ~ .layout .sidenav .sidetopic{padding:13px 12px}
  /* the sidebar's own toggle becomes the overlay Close button */
  .sidenav .nav-toggle{order:2; margin:0}
  .topic-cover-grid, .tcards{grid-template-columns:1fr}
}

/* ===== compact mobile overlay items (final tighten) ===== */
@media (max-width:820px){
  .nav-toggle-cb:checked ~ .layout .sidenav{padding:12px 16px 18px; gap:0}
  .nav-toggle-cb:checked ~ .layout .sidenav__top{padding-bottom:8px; border-bottom:1px solid var(--line)}
  .nav-toggle-cb:checked ~ .layout .sidenav__nav{margin-top:10px; gap:1px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidelink{padding:10px; font-size:14.5px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidenav__label{margin:10px 6px 3px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidetopic{padding:8px 10px; font-size:13.5px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidetopic__icon{width:24px; height:24px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidetopic__icon svg{width:14px; height:14px}
  .nav-toggle-cb:checked ~ .layout .sidenav .sidelink__icon svg{width:17px; height:17px}
  .nav-toggle-cb:checked ~ .layout .sidenav__foot{padding-top:12px; margin-top:18px}
  .nav-toggle-cb:checked ~ .layout .sidemark{padding:6px}
  .nav-toggle-cb:checked ~ .layout .sidemark__badge{width:30px; height:30px; font-size:13px}
  /* the in-overlay Close button (sidebar's own toggle) */
  .sidenav .nav-toggle{display:inline-flex; align-items:center; gap:6px; font-family:var(--mono); font-size:12px;
    letter-spacing:.12em; text-transform:uppercase; color:var(--fg-dim); cursor:pointer; padding:6px 0}
  .sidenav .nav-toggle::before{content:"\2715"; font-size:14px}
  .sidenav .nav-toggle::after{content:"Close"}
}

/* open overlay: drop the redundant in-menu brand, Close sits top-right */
@media (max-width:820px){
  .nav-toggle-cb:checked ~ .layout .sidenav .brand{display:none}
  .nav-toggle-cb:checked ~ .layout .sidenav__top{justify-content:flex-end; border-bottom:1px solid var(--line); padding-bottom:10px}
}

/* ===== mobile menu as a side DRAWER (<= half width) + backdrop ===== */
.nav-backdrop{display:none}
@media (max-width:820px){
  .nav-toggle-cb:checked ~ .nav-backdrop{display:block; position:fixed; inset:0; z-index:90;
    background:rgba(0,0,0,.55); -webkit-backdrop-filter:blur(1px); backdrop-filter:blur(1px)}
  /* drawer slides from the left — wide enough that nav labels aren't cut off */
  .nav-toggle-cb:checked ~ .layout .sidenav{
    inset:0 auto 0 0; width:min(77vw, 288px); border-right:1px solid var(--line-2);
    box-shadow:8px 0 40px -10px rgba(0,0,0,.7)}
  /* lock the page behind the open drawer so it can't scroll */
  html:has(.nav-toggle-cb:checked), body:has(.nav-toggle-cb:checked){overflow:hidden; touch-action:none}
}

/* ===== mobile About: let topic blurbs breathe (no ellipsis crush) ===== */
@media (max-width:600px){
  .about-topics{grid-template-columns:1fr; gap:10px}
  .about-topic{align-items:flex-start; padding:14px 15px; gap:13px}
  .about-topic__icon{margin-top:1px}
  .about-topic__blurb{white-space:normal; overflow:visible; text-overflow:clip; font-size:.86rem; line-height:1.45; margin-top:3px}
  .section.about .section__title{font-size:1.55rem}
  .about__title{font-size:2.2rem}
}

/* ===== red/rose accent (added for distinct topic colors) ===== */
.banner--rose::after{background:linear-gradient(135deg,#f43f5e,#be123c)}
.nav-dd__icon--rose{color:#fda4af; background:rgba(244,63,94,.12)}
.about-topic--rose::before{background:#f43f5e}
.topic-card--rose .topic-card__icon{color:#fda4af; background:rgba(244,63,94,.12)}

/* ===== distinct display font for headers (Space Grotesk) ===== */
:root{--display:"Space Grotesk","Inter",system-ui,sans-serif}
.hero__title,.home-hero__title,.page-title,.section__title,.list-head__title,.list-head__title--sm,
.post__title,.about__title,.topic-cover__name,.tcard__name,.card__title,.topic-banner__title,
.notfound__title,.adminhead h1{font-family:var(--display)}

/* ===== center-align the About area text ===== */
.section.about, .about__body{text-align:center}
.section.about .about-topic, .about__body .about-topic{text-align:left}  /* keep topic cards readable */
.section.about .about-topics, .about__body .about-topics{max-width:640px; margin-left:auto; margin-right:auto}

/* ===== search page hero (terminal-flavored, uses site colors) ===== */
.search-hero{position:relative; overflow:hidden; text-align:center;
  border:1px solid var(--line-2); border-radius:18px;
  padding:clamp(30px,5vw,54px) clamp(20px,4vw,40px); margin-bottom:28px}
.search-hero::after{content:""; position:absolute; inset:-40%; z-index:-1; filter:blur(80px); opacity:.5;
  background:radial-gradient(40% 50% at 28% 32%, rgba(127,192,255,.55), transparent 70%),
             radial-gradient(46% 56% at 76% 64%, rgba(77,157,255,.6), transparent 70%)}
.search-hero::before{content:""; position:absolute; inset:0; z-index:-1; background:rgba(5,6,10,.55)}
.search-hero__cmd{font-family:var(--mono); font-size:12.5px; letter-spacing:.02em; color:var(--fg-dim);
  background:rgba(5,6,10,.55); border:1px solid var(--line); border-radius:9px;
  display:inline-block; padding:7px 13px; margin:0 0 18px; max-width:100%; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.search-hero__prompt{color:var(--a)}
.search-hero .tok-fn{color:var(--brand-ai)}
.search-hero .tok-flag{color:#a78bfa}
.search-hero .tok-str{color:var(--a)}
.search-hero__title{font-family:var(--display); font-size:clamp(2rem,5.5vw,3.1rem); font-weight:700;
  letter-spacing:-.02em; line-height:1; margin:0; color:#fff}
.search-hero__title .ai{color:var(--brand-ai)}
.search-hero__dot{color:var(--muted)}
.search-hero__sub{color:var(--fg-dim); font-size:.96rem; margin:12px 0 0}
/* form reuses the home-search pill look */
.search-hero__form{position:relative; display:flex; align-items:center; gap:10px; width:100%;
  max-width:640px; margin:24px auto 0; background:var(--card); border:1px solid var(--line-2);
  border-radius:14px; padding:6px 8px 6px 16px; transition:border-color .13s, box-shadow .13s}
.search-hero__form:focus-within{border-color:var(--brand-ai); box-shadow:0 0 0 4px rgba(77,157,255,.16)}

/* ===== remove icon background chips site-wide (keep the symbol colors) ===== */
.topic-card__icon, .topic-banner__icon, .topic-cover__icon, .about-topic__icon, .nav-dd__icon{
  background:transparent !important; border:0 !important}

/* ===== back navigation button ===== */
.backlink{display:inline-flex; align-items:center; gap:7px; margin:0 0 18px; padding:9px 15px;
  border:1px solid var(--line-2); border-radius:10px; background:var(--card);
  font-family:var(--sans); font-size:13.5px; font-weight:600; color:var(--fg-dim); white-space:nowrap;
  transition:background .12s, color .12s, border-color .12s}
.backlink:hover{background:var(--card-h); color:#fff; text-decoration:none}
.backlink svg{width:16px; height:16px}

/* topic page: back button sits to the LEFT of the banner */
.topic-head{display:flex; align-items:center; gap:14px; margin-top:30px; margin-bottom:24px}
.topic-head .backlink{flex:0 0 auto; margin:0}
.topic-head .topic-banner{flex:1 1 auto; margin:0}
.topic-banner__main{display:flex; align-items:center; gap:18px}
.topic-banner__icon{width:auto; height:auto}
.topic-banner__icon svg{width:58px; height:58px}
@media (max-width:600px){
  .topic-head{flex-direction:column; align-items:stretch; gap:12px}
  .topic-head .backlink{align-self:flex-start}
}

/* breathing room at the top of every page (fixes content smushed against header) */
.content{padding-top:clamp(16px,2.5vw,28px)}
/* compact icon-only back button (topic page, so the banner can stretch across) */
.backlink--icon{padding:0; width:44px; height:44px; justify-content:center; gap:0}
.backlink--icon svg{width:19px; height:19px}

/* ===== draft preview banner (admin preview of a post) ===== */
.preview-bar{display:flex; align-items:center; gap:10px; margin:0 0 22px; padding:11px 16px;
  border:1px solid var(--line-2); border-radius:10px; background:rgba(77,157,255,.10);
  color:var(--fg-dim); font-size:13.5px}
.preview-bar strong{color:#fff}
.preview-bar__dot{width:8px; height:8px; border-radius:50%; background:var(--brand-ai); flex:0 0 auto;
  box-shadow:0 0 0 4px rgba(77,157,255,.18)}
.post__excerpt{font-size:1.02rem; margin:6px 0 0}
