:root{
  --bg0:#070A1A;
  --bg1:#0B1030;
  --topnav-h: 64px;

  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);

  --blue:#3B82F6;
  --purple:#8B5CF6;

  --radius: 18px;
  --shadow2: 0 12px 34px rgba(0,0,0,0.35);

  --max: 1560px;
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
html{ scroll-padding-top: calc(var(--topnav-h, 64px) + 20px); }

body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: transparent;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 18% 12%, rgba(59,130,246,0.22), transparent 60%),
    radial-gradient(860px 520px at 82% 18%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(900px 640px at 50% 120%, rgba(59,130,246,0.10), transparent 62%),
    linear-gradient(180deg, rgba(11,16,48,1) 0%, rgba(7,10,26,1) 70%, rgba(7,10,26,1) 100%);
}

/* Prevent default purple/underline visited links */
a{ color: inherit; text-decoration: none; }
a:visited{ color: inherit; }

/* Top nav */
.topnav{
  position: fixed;
  top:0;
  left: 0;
  right: 0;
  z-index: 1200;
  padding: 14px 18px;
  backdrop-filter: blur(16px);
  background: rgba(9,12,32,1);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  isolation: isolate;
}
.topnav-inner{
  width:min(var(--max), calc(100% - 12px));
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
  color: var(--text);
}
.brand-badge{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}
.brand-name{ font-weight: 900; font-size: 18px; }
.brand-accent{
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navlinks{
  display:flex;
  gap: 10px;
  align-items:center;
  flex: 1;
  justify-content: center;
}
.navlink{
  display:inline-flex;
  align-items:center;
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration:none;
  color: rgba(255,255,255,0.78);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.navlink:hover{ background: rgba(255,255,255,0.08); color: var(--text); transform: translateY(-1px); }
.navlink.active{ background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.10); }

/* Page / layout */
.page{
  width:min(var(--max), calc(100% - 16px));
  margin: 0 auto;
  padding: calc(var(--topnav-h, 64px) + 22px) 0 44px;
}

#articles{
  scroll-margin-top: calc(var(--topnav-h, 64px) + 20px);
}

.layout{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items:start;
}

.sidebar{ display:flex; flex-direction:column; gap: 16px; }
.content{ display:flex; flex-direction:column; gap: 14px; }

/* Panels */
.panel{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 16px;
}
.panel-title{ font-weight: 900; font-size: 16px; margin-bottom: 12px; }
.muted{ color: var(--muted); line-height: 1.65; }

/* Categories list */
.list{ display:flex; flex-direction:column; gap: 10px; }
.cat{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor:pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.cat:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.16); }
.cat.active{
  background: linear-gradient(135deg, rgba(59,130,246,0.26), rgba(139,92,246,0.22));
  border-color: rgba(255,255,255,0.16);
}
.cat-left{ display:flex; align-items:center; gap: 10px; font-weight: 850; }
.cat-count{ color: rgba(255,255,255,0.78); font-weight: 900; }

/* Head + filters */
.content-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
}
.content-title{ margin:0; font-size: 28px; letter-spacing: 0.2px; }
.content-meta{ color: rgba(255,255,255,0.72); font-weight: 850; }

.filters{ display:flex; gap: 12px; flex-wrap: wrap; }
.field{ display:flex; flex-direction: column; gap: 6px; min-width: 260px; }
.field-label{ font-size: 12px; color: rgba(255,255,255,0.68); }

.input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  outline:none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.input:focus{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.20);
}

/* Cards grid */
.cards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.card{
  text-decoration:none;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow2);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}
.card:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}
.card--headliner{
  grid-column: 1 / -1;
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(59,130,246,0.14), rgba(139,92,246,0.12));
}
.card--headliner:hover{
  background: linear-gradient(135deg, rgba(59,130,246,0.20), rgba(139,92,246,0.16));
  border-color: rgba(255,255,255,0.24);
}

.card-media{
  position:relative;
  height: 170px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.card--headliner .card-media{
  height: 240px;
}
.card-cover{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-media .placeholder{
  width:100%; height:100%;
  background:
    radial-gradient(420px 220px at 25% 30%, rgba(59,130,246,0.35), transparent 55%),
    radial-gradient(420px 220px at 75% 35%, rgba(139,92,246,0.30), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.pill{
  position:absolute;
  top: 12px; left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  background: linear-gradient(135deg, rgba(59,130,246,0.92), rgba(139,92,246,0.92));
  border: 1px solid rgba(255,255,255,0.12);
}
.headliner-flag{
  position:absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.2px;
  font-weight: 950;
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(7,10,26,0.55);
  backdrop-filter: blur(8px);
}

.card-body{ padding: 14px 14px 12px; }
.card-title{ margin: 0 0 10px; font-size: 20px; line-height: 1.25; font-weight: 950; }
.card-excerpt{ margin: 0 0 12px; color: rgba(255,255,255,0.74); line-height: 1.55; }
.card--headliner .card-title{
  font-size: 32px;
  line-height: 1.12;
}
.card--headliner .card-excerpt{
  font-size: 16px;
  color: rgba(255,255,255,0.80);
  max-width: 72ch;
}
.hashes{ display:flex; gap: 12px; flex-wrap:wrap; color: rgba(255,255,255,0.62); font-size: 12px; margin-bottom: 12px; }
.divider{ height:1px; background: rgba(255,255,255,0.10); margin: 10px 0; }
.card-foot{
  display:flex; align-items:center; justify-content: space-between; gap: 12px;
  color: rgba(255,255,255,0.72); font-size: 12.5px;
}
.author{ display:flex; align-items:center; gap: 10px; }
.avatar{
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  display:grid; place-items:center;
  overflow:hidden;
}
.avatar span{ font-weight: 950; font-size: 12px; color: rgba(255,255,255,0.85); }

.readtime{ display:flex; align-items:center; gap: 6px; opacity: 0.95; }
.readtime svg{ width: 15px; height: 15px; }

.loadmore-wrap{
  display: flex;
  justify-content: center;
  margin: 6px 0 2px;
}

.loadmore-btn{
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.2px;

  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.94);
  background: linear-gradient(135deg, rgba(59,130,246,0.24), rgba(139,92,246,0.22));

  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.loadmore-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.24);
  background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(139,92,246,0.28));
}

.loadmore-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.24);
}

@media (min-width: 900px){
  .card--headliner{
    display:grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
    align-items: stretch;
  }
  .card--headliner .card-media{
    height: 100%;
    min-height: clamp(170px, 14vw, 190px);
    align-self: stretch;
  }
  .card--headliner .card-body{
    padding: 20px 18px 16px;
  }
}

/* Empty */
.empty{
  padding: 16px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.75);
}

/* Responsive */
@media (max-width: 1080px){
  .layout{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .cards{ grid-template-columns: 1fr; }
  .field{ min-width: 100%; }
  .card--headliner .card-media{ height: 210px; }
  .card--headliner .card-title{ font-size: 24px; }
}

/* ------------------ Custom Tag Dropdown ------------------ */

.dd{ position: relative; width: 100%; }

.dd-btn{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);

  outline: none;
  cursor: pointer;

  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.dd-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.20);
}

.dd-btn:focus-visible{
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.14);
}

.dd-value{
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.dd-caret{
  opacity: 0.85;
  font-size: 14px;
  transform: translateY(-1px);
}

.dd-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  z-index: 50;

  padding: 8px;
  border-radius: 16px;

  background: rgba(10, 14, 38, 0.78);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);

  max-height: 280px;
  overflow: auto;
}

.dd-item{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 12px;

  color: rgba(255,255,255,0.86);
  border: 1px solid transparent;

  cursor: pointer;
  user-select: none;

  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.dd-item:hover{
  background: linear-gradient(135deg, rgba(59,130,246,0.20), rgba(139,92,246,0.18));
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.dd-item[aria-selected="true"]{
  background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(139,92,246,0.26));
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
}

/* ------------------ Archive (scoped) ------------------ */

.archive-nav{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
/* Ensure year/month sections actually collapse when `hidden` is set in JS */
.archive-nav [hidden]{
  display: none !important;
}

.arch-year{
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.arch-year-btn,
.arch-month-btn{
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
}

.arch-year-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 12px 12px;
  cursor: pointer;

  border: none;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-weight: 950;
}

.arch-year-btn:hover{
  background: rgba(255,255,255,0.05);
}

.arch-months{
  padding: 8px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.arch-month{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.arch-month.active{
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.16));
  border-color: rgba(255,255,255,0.16);
}

.arch-month-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 10px;
  cursor: pointer;

  border: none;
  background: transparent;
  color: rgba(255,255,255,0.90);
  font-weight: 900;
}

.arch-month-btn:hover{
  background: rgba(255,255,255,0.05);
}

.arch-left{
  display:flex;
  align-items:center;
  gap: 8px;
  min-width: 0;
}

.arch-chevron{
  opacity: 0.85;
  width: 14px;
  text-align: center;
  flex: 0 0 auto;
}

.arch-year-label{
  font-size: 14px;
  letter-spacing: 0.2px;
}

.arch-count{
  color: rgba(255,255,255,0.72);
  font-weight: 950;
}

.arch-month-label{
  font-size: 13px;
  white-space: nowrap;
}

.arch-month-count{
  color: rgba(255,255,255,0.70);
  font-weight: 950;
}

.arch-action{
  font-size: 12px;
  font-weight: 950;
  color: rgba(255,255,255,0.68);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.arch-posts{
  padding: 8px 10px 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.arch-post{
  display:flex;
  align-items:baseline;
  justify-content: space-between;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);

  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.arch-post:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.arch-post-title{
  font-weight: 900;
  color: rgba(255,255,255,0.90);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
}

.arch-post-date{
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

/* ------------------ Sidebar tags (scoped) ------------------ */

.sidebar-tags{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar-tagbtn{
  -webkit-appearance: none;
  appearance: none;
  font: inherit;

  display:inline-flex;
  align-items:center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.86);

  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.sidebar-tagbtn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}

.sidebar-tagbtn.active{
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.16));
  border-color: rgba(255,255,255,0.16);
}

.sidebar-tagcount{
  opacity: 0.75;
  font-weight: 950;
}

/* ------------------ Filter chips (scoped) ------------------ */

.filterchips{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filterchip{
  -webkit-appearance: none;
  appearance: none;
  font: inherit;

  display:inline-flex;
  align-items:center;
  gap: 10px;

  padding: 8px 10px;
  border-radius: 999px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.88);

  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filterchip:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
}

.filterchip-label{
  font-weight: 900;
  font-size: 13px;
}

.filterchip-x{
  font-weight: 950;
  opacity: 0.85;
}

/* ------------------ Site Footer ------------------ */

.site-footer{
  border-radius: var(--radius);
  overflow: hidden;

  background: rgba(9,12,32,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(16px);
}

.site-footer-wrap{ padding: 16px 16px 14px; }

.site-footer-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}

.sf-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: var(--text);
}

.sf-badge{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 950;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.sf-name{ font-weight: 950; font-size: 16px; letter-spacing: 0.2px; }

.sf-accent{
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sf-links{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sf-link{
  text-decoration:none;
  color: rgba(255,255,255,0.80);
  font-weight: 800;
  font-size: 13px;

  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;

  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, color 180ms ease;
}

.sf-link:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.94);
  transform: translateY(-1px);
}

.site-footer-bottom{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);

  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}

.sf-tagline{ color: rgba(255,255,255,0.70); line-height: 1.6; }

.sf-meta{
  display:flex;
  align-items:center;
  gap: 10px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  white-space: nowrap;
}

.sf-sep{ opacity: 0.6; }
.sf-muted{ color: rgba(255,255,255,0.62); }

@media (max-width: 760px){
  .site-footer-top{ flex-direction: column; align-items: flex-start; }
  .site-footer-bottom{ flex-direction: column; align-items: flex-start; }
  .sf-meta{ white-space: normal; }
}

/* ------------------ Post navigation (Prev/Next only) ------------------ */

.reading-progress{
  position: fixed;
  top: calc(var(--topnav-h, 64px) - 1px);
  left: 0;
  right: auto;
  width: 100%;
  height: 3px;
  z-index: 1201;
  pointer-events: none;
}

.reading-progress-bar{
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(139,92,246,0.95));
  box-shadow: 0 0 18px rgba(59,130,246,0.36);
}

.article-quicknav{
  position: sticky;
  top: 76px;
  z-index: 8;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(9,12,32,0.60);
  backdrop-filter: blur(10px);
}

.aq-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);

  color: rgba(255,255,255,0.90);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;

  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.aq-btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.20);
}

.page-post-layout{
  display: grid;
  grid-template-columns: clamp(300px, 22vw, 360px) minmax(0, 1fr);
  grid-template-areas: "toc main";
  gap: 20px;
  align-items: start;
}

.post-column{
  grid-area: main;
  grid-row: 1;
  align-self: start;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-panel{
  width: 100%;
  margin: 0;
}

.post-main{
  min-width: 0;
}

.post-main h2,
.post-main h3{
  scroll-margin-top: calc(var(--topnav-h, 64px) + 44px);
}

.prose pre code{
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.prose pre code.code-dax{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: rgba(240,245,255,0.94);
  line-height: 1.55;
}

.code-dax .dax-k{ color: #8ab4ff; font-weight: 850; }
.code-dax .dax-f{ color: #7fd1ff; font-weight: 800; }
.code-dax .dax-v{ color: #f7c97a; font-weight: 800; }
.code-dax .dax-m{ color: #c4b5fd; }
.code-dax .dax-r{ color: #b6e3a7; }
.code-dax .dax-s{ color: #f5a97f; }
.code-dax .dax-c{ color: rgba(255,255,255,0.56); font-style: italic; }
.code-dax .dax-n{ color: #f9d976; }

.post-head-divider{
  height: 1px;
  margin: 10px 0 16px;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
}

.post-toc{
  margin: 0;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.post-toc--rail{
  grid-area: toc;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: calc(var(--topnav-h, 64px) + 12px);
  z-index: 3;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
}

.post-toc-title{
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.70);
  margin-bottom: 10px;
}

.post-toc-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-toc-link{
  display: block;
  color: rgba(255,255,255,0.86);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.35;
  border-left: 2px solid rgba(255,255,255,0.12);
  padding: 4px 0 4px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 160ms ease, border-color 160ms ease;
}

.post-toc-link--l2{
  font-weight: 850;
  color: rgba(255,255,255,0.90);
}

.post-toc-link:hover{
  color: rgba(255,255,255,0.98);
  border-color: rgba(59,130,246,0.65);
}

.post-toc-link--l3{
  position: relative;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
  color: rgba(255,255,255,0.74);
  border-left-color: rgba(139,92,246,0.38);
  padding-left: 26px;
}

.post-toc-link--l3::before{
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(139,92,246,0.76);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.14);
}

.post-toc-link--l3:hover{
  color: rgba(255,255,255,0.88);
  border-left-color: rgba(139,92,246,0.64);
}

.post-nav{ margin-top: 18px; }
.post-nav-section{ margin-top: 0; }
.post-footer{ margin-top: 0; }

.post-nav-title{
  font-weight: 950;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
}

.post-nav-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.navcard{
  display:block;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow2);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.navcard:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}

.navcard-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.navcard-label{
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}

.navcard-pill{
  font-weight: 900;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(59,130,246,0.24), rgba(139,92,246,0.22));
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.90);
  white-space: nowrap;
}

.navcard-title{
  font-weight: 950;
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 6px;
  color: rgba(255,255,255,0.92);
}

.navcard-meta{
  color: rgba(255,255,255,0.62);
  font-size: 12px;
}
/* ================== Compact UI: sidebar + chips ================== */

/* Categories */
.list .cat{
  padding: 10px 12px;
}
.list .cat-left{
  font-size: 13px;
  font-weight: 900;
}
.list .cat-count{
  font-size: 12px;
  font-weight: 950;
}

/* Popular tags */
.sidebar-tags{
  gap: 8px;
}
.sidebar-tagbtn{
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
}
.sidebar-tagcount{
  font-size: 12px;
}

/* Archive */
.archive-nav{
  gap: 8px;
}
.arch-year-btn{
  padding: 10px 10px;
  font-size: 12.5px;
}
.arch-year-label{
  font-size: 12.5px;
}
.arch-count{
  font-size: 12px;
}
.arch-months{
  padding: 7px;
  gap: 7px;
}
.arch-month-btn{
  padding: 8px 9px;
  font-size: 12px;
}
.arch-month-label{
  font-size: 12px;
}
.arch-month-count{
  font-size: 12px;
}
.arch-action{
  font-size: 11px;
  padding: 5px 9px;
}
.arch-posts{
  padding: 7px 9px 9px;
  gap: 7px;
}
.arch-post{
  padding: 7px 9px;
}
.arch-post-title{
  font-size: 12.5px;
}
.arch-post-date{
  font-size: 11px;
}

/* Filter chips */
.filterchips{
  gap: 8px;
}
.filterchip{
  padding: 7px 9px;
}
.filterchip-label{
  font-size: 12px;
}
.filterchip-x{
  font-size: 12px;
}

/* Optional: slightly smaller panel titles in sidebar only */
.sidebar .panel-title{
  font-size: 14px;
  margin-bottom: 10px;
}
/* Articles page: single filter row */
.filters--single .field--wide{
  min-width: 100%;
}

.filters--single{
  display: flex;
}
/* ================== Wider layout on large screens ================== */

/* 1) Make the overall page container wider (or fluid) */
.page{
  /* keep existing padding if any; this only affects max width */
  max-width: 1560px;
}

/* On very wide screens, allow it to grow further (still centered) */
@media (min-width: 1400px){
  .page{
    max-width: 1680px;
  }
}

/* 2) Ensure the main layout uses available width */
.layout{
  width: 100%;
}

/* 3) Sidebar + content column sizing:
      - slightly slimmer sidebar
      - more space to cards */
@media (min-width: 1100px){
  .layout{
    grid-template-columns: 300px 1fr;
    gap: 24px;
  }
}

/* 4) Cards grid: use 3 columns on large screens */
@media (min-width: 1400px){
  .cards{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 5) Optional: keep search panel from becoming absurdly wide */
@media (min-width: 1400px){
  .filters{
    max-width: 980px;
  }
}

@media (max-width: 760px){
  .page-post-layout{
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "toc"
      "main";
  }

  .post-column{
    width: 100%;
  }

  .post-toc--rail{
    grid-area: toc;
    grid-row: auto;
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 0 14px;
  }
}


