/* ===== Teacher Toolkit ===== */
:root{
  --tk-bg: #040314;
  --tk-pink: #DD40FF;
  --ink: #cfe6f0;
}

/* page background behind the accordion zone */
.toolkit{
  background:
    url("../assets/backgrounds/teacher-toolkit-bg.png") center top / cover no-repeat,
    var(--tk-bg);
}

/* ========== HERO ========== */
.tk-hero{
  position: relative;
  padding: clamp(28px,4vw,48px) 0;
  background:
    radial-gradient(1000px 520px at 18% 5%, rgba(221,64,255,.12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 30%),
    var(--tk-bg);
  overflow: clip;
}
.tk-hero-inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px,5vw,32px);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(20px,4vw,40px);
}
.tk-hero-copy h1{
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .5px;
  font-size: clamp(40px,6vw,72px);
  margin:0 0 8px;
  color: var(--tk-pink);
}
.tk-hero-copy p{
  max-width: 46ch;
  color: var(--ink);
  font-size: clamp(16px,1.2vw,18px);
}
.tk-hero-art img{
  width: 100%;
  height: auto;
  display:block;
  filter: drop-shadow(0 8px 26px rgba(0,0,0,.45));
}

/* ========== LAYOUT ========== */
.tk-layout{
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px,5vw,36px) clamp(16px,5vw,32px) clamp(60px,6vw,80px);
  display: grid;
  grid-template-columns: 260px 1fr;      /* left = TOC, right = content */
  gap: clamp(18px,3vw,40px);
  align-items: start;                     /* ⬅ keep both columns aligned at the top */
  position: relative;
  overflow: visible;
}

/* Explicit grid columns so TOC/content never overlap */
.tk-toc{ grid-column: 1; align-self: start; }
.tk-main, .tk-content{
  grid-column: 2;
  min-width: 0;                          /* allow text to wrap */
  align-self: start;                      /* align to top of the grid row */
  padding-top: 1px;                       /* 👈 prevent top margin collapse */
}

/* ========== STICKY TOC (pure CSS) ========== */
.tk-toc{
  position: -webkit-sticky;
  position: sticky;
  top: clamp(72px, 9vh, 96px);            /* clears your sticky site-nav */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,.02);
  border:1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  z-index: 3;
  height: max-content;                    /* don’t stretch the grid row */
}

.tk-toc__link{
  color:#9bd8e6;
  text-decoration:none;
  padding:10px 12px;
  border-radius:10px;
  display:block;
}
.tk-toc__link:hover{ color:#fff; background: rgba(255,255,255,.04) }
.tk-toc__link.is-active{ color:#fff; background: rgba(221,64,255,.14) }

/* ========== ACCORDIONS ========== */
.tk-section{
  border-bottom:1px solid rgba(255,255,255,.08);
  padding: 18px 0;
  margin: 0;                               /* avoid extra top offset */
}
.tk-head{
  width:100%;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:12px;
  background: transparent;
  border:0;
  padding: 8px 0;
  cursor:pointer;
}
.tk-head h2{
  margin:0;
  font-family:'Rajdhani', system-ui, sans-serif;
  font-weight:700;
  letter-spacing:.5px;
  color: var(--tk-pink);
  font-size: clamp(20px,2.2vw,28px);
}
.tk-caret{ width: 22px; height: 22px; opacity:.9; transform: translateY(-1px) }

.tk-body{
  color: var(--ink);
  font-size: clamp(15px,1.05vw,17px);
  line-height: 1.65;
  padding: 8px 0 18px;
}
.tk-body ul, .tk-body ol{ margin: 10px 0 16px 20px }
.tk-body ul.tight{ margin-left: 18px }
.tk-link-row{ margin: 8px 0 4px }
.tk-download, .tk-external{
  color:#8fdcff;
  text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
  border-bottom:1px dashed rgba(143,220,255,.4);
}
.tk-download:hover, .tk-external:hover{ color:#fff; border-bottom-color:transparent }

/* collapsed indicator */
.tk-section[open] .tk-caret{ content:""; }
.tk-section:not([open]) .tk-caret{ transform: rotate(180deg); }
[data-accordion] .tk-body[hidden]{ display:none }

/* ========== MOBILE ========== */
@media (max-width: 960px){
  .tk-hero-inner{ grid-template-columns: 1fr; }
  .tk-hero-copy p{ max-width: 60ch }
  .tk-layout{ grid-template-columns: 1fr; }
  .tk-toc{ display:none; }                /* hide sticky TOC on mobile */
  .tk-main, .tk-content{ grid-column: auto; padding-top: 0; }
}

/* ========== SMOOTH SCROLL (nice-to-have) ========== */
html { scroll-behavior: smooth; }

/* Optional: style when JS fallback switches modes (no layout change here) */
.tk-toc.is-fixed{ background: rgba(10,12,22,.92); }




/* --- pin the content column to the row start and kill margin collapse --- */
.tk-layout { align-items: start; }                 /* both cols start at top */

.tk-content,
.tk-main{
  grid-column: 2;
  min-width: 0;
  align-self: start;                                /* <-- key */
  padding-top: 0.1px;                               /* shim prevents collapse */
}

/* if *anything* inside tries to push the block down, zero it out */
.tk-content > *:first-child,
.tk-main    > *:first-child{
  margin-top: 0 !important;
}

/* be extra sure the first accordion doesn’t add offset */
.tk-content > .tk-section:first-child,
.tk-main    > .tk-section:first-child{
  margin-top: 0 !important;
  padding-top: 18px;                                /* keeps your spacing */
}

/* keep the sidebar in column 1 and sized to its content */
.tk-toc{
  grid-column: 1;
  height: max-content;
  position: sticky;
  top: clamp(72px, 9vh, 96px);
}

/* hide sidebar on mobile as before */
@media (max-width: 960px){
  .tk-toc{ display:none; }
}


/* Fixed/stopped states used by the JS fallback */
.tk-toc.is-fixed{
  position: fixed;
  top: clamp(72px, 9vh, 96px);
  left: var(--toc-left, 0px);
  width: var(--toc-width, 260px);
  z-index: 5;
  background: rgba(10,12,22,.92);
  border-radius: 14px;
}
.tk-toc.is-stopped{
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  width: 260px;
}


.tk-toc { will-change: transform, left, width; } /* tiny perf hint */
.tk-toc__link {
  transition: background-color .12s linear, color .12s linear;
}




/* Background sheet for the content area */
.tk-layout {
  position: relative;
}

.tk-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("../assets/backgrounds/bg-hexes.png") center top / cover no-repeat,
    var(--tk-bg);
  border-radius: 12px;
  z-index: 0;            /* sits behind everything inside */
  opacity: 1;            /* tweak if you want it subtler */
}

/* Ensure the main content sits above the background sheet */
.tk-main,
.tk-content {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 4vw, 40px);
  border-radius: 12px;   /* matches the background radius */
  background: transparent;
}







