/* ============================================================
   TIDBITS — styles specific to tidbits.html
   ============================================================ */

/* --- Page header ------------------------------------------- */
#phdr {
  padding: 120px 0 72px;
  background: var(--nv);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--bddl);
}

#phdr::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46, 172, 200, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 172, 200, .045) 1px, transparent 1px);
  background-size: 32px 32px;
}

.phdr-glow {
  position: absolute;
  top: -20%;
  right: 10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 136, 32, .08) 0%, transparent 65%);
  pointer-events: none;
}

.phdr-inner {
  position: relative;
  z-index: 2;
}

.phdr-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(224, 136, 32, .1);
  border: 1px solid rgba(224, 136, 32, .3);
  color: var(--am);
  padding: 6px 14px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .73rem;
  letter-spacing: .06em;
  margin-bottom: 24px;
}

.phdr-h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.07;
  margin-bottom: 20px;
  color: #fff;
}

.phdr-h1 span { color: var(--am); }

.phdr-p {
  font-size: 1.1rem;
  color: var(--mtd);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 12px;
}

.phdr-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--mtd);
  opacity: .7;
}

/* --- Educator note ----------------------------------------- */
#enote {
  background: var(--bgs);
  border-top: 1px solid var(--bd);
  padding: 52px 0;
}

.enote-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  max-width: 800px;
}

.enote-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid rgba(13, 30, 56, .12);
  transition: border-color .3s;
}

.enote-avatar:hover { border-color: var(--am); }

.enote-text {
  font-size: 1rem;
  color: var(--mt);
  line-height: 1.75;
}

.enote-text strong {
  color: var(--tx);
  font-weight: 600;
}

.enote-sig {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--tl);
  margin-top: 8px;
}

/* --- Activity library -------------------------------------- */
#lib {
  background: var(--bg);
  padding: 72px 0 96px;
  position: relative;
}

#lib::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 112, 160, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 112, 160, .03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 16px 20px;
  background: var(--bgs);
  border: 1px solid var(--bd);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(13, 30, 56, .06);
}

.fbtn {
  background: transparent;
  border: 1px solid var(--bd);
  color: var(--mt);
  padding: 6px 16px;
  border-radius: 100px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.fbtn.active,
.fbtn:hover {
  background: var(--am);
  color: var(--nv);
  border-color: var(--am);
}

/* Category headers */
.cat-section { margin-bottom: 56px; }

.cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bd);
}

.cat-icon  { font-size: 1.6rem; }

.cat-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--tx);
}

.cat-desc {
  font-size: .84rem;
  color: var(--mt);
  margin-top: 2px;
}

/* Activity card grid */
.ac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* Activity card */
.ac {
  background: var(--bgs);
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}

.ac:hover {
  border-color: var(--bdl);
  box-shadow: 0 4px 20px rgba(13, 30, 56, .07);
}

.ac.open { border-color: var(--tl); }

.ac-hd {
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ac-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ac-ico {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.ac-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .97rem;
  color: var(--tx);
  margin-bottom: 4px;
  line-height: 1.3;
}

.ac-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ac-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--mt);
  background: var(--bg);
  border: 1px solid var(--bd);
  padding: 2px 8px;
  border-radius: 100px;
}

.ac-pill.ages {
  color: var(--tl);
  border-color: rgba(21, 112, 160, .3);
  background: rgba(21, 112, 160, .06);
}

.ac-pill.time {
  color: var(--am);
  border-color: rgba(224, 136, 32, .3);
  background: rgba(224, 136, 32, .06);
}

.ac-arr {
  font-size: .75rem;
  color: var(--mt);
  transition: transform .3s;
  flex-shrink: 0;
  margin-top: 4px;
}

.ac.open .ac-arr {
  transform: rotate(180deg);
  color: var(--am);
}

.ac-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}

.ac.open .ac-body { max-height: 1200px; }

.ac-inner {
  padding: 0 20px 20px;
  border-top: 1px solid var(--bd);
}

.ac-step {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  font-size: .88rem;
  color: var(--mt);
  line-height: 1.6;
}

.ac-step-n {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--am);
  color: var(--nv);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .7rem;
  margin-top: 2px;
}

.ac-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(224, 136, 32, .05);
  border: 1px solid rgba(224, 136, 32, .18);
  border-radius: 6px;
  font-size: .82rem;
  color: var(--tx);
  line-height: 1.6;
}

.ac-note-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--am);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}

.ac-materials {
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--mt);
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 4px;
}

.ac-materials span { color: var(--tl); }

/* Hidden categories (controlled by filter) */
.cat-section[data-cat].hidden { display: none; }

/* --- Social proof ------------------------------------------ */
#proof {
  background: var(--bgs);
  padding: 80px 0;
  border-top: 1px solid var(--bd);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.pcard {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 28px 24px;
  transition: border-color .25s, box-shadow .25s;
}

.pcard:hover {
  border-color: rgba(224, 136, 32, .3);
  box-shadow: 0 4px 20px rgba(13, 30, 56, .07);
}

.pcard-q {
  font-size: .95rem;
  color: var(--mt);
  line-height: 1.72;
  font-style: italic;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bd);
}

.pcard-q::before {
  content: '\201C';
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  color: var(--am);
  line-height: 0;
  vertical-align: -.4em;
  margin-right: 4px;
}

.pcard-who {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .82rem;
  color: var(--tx);
  margin-bottom: 2px;
}

.pcard-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--mt);
}

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 12px;
}

.stat-item { text-align: center; }

.stat-n {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--am);
  line-height: 1;
}

.stat-l {
  font-size: .8rem;
  color: var(--mt);
  margin-top: 4px;
  line-height: 1.4;
}

/* --- Blog notes -------------------------------------------- */
#notes {
  background: var(--bgs);
  padding: 80px 0;
}

.notes-hd { margin-bottom: 40px; }

.blg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bc {
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}

.bc:hover {
  transform: translateY(-3px);
  border-color: var(--am);
  box-shadow: 0 8px 32px rgba(13, 30, 56, .1);
}

.bci {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bgd);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--bd);
}

.bcii { font-size: 1.8rem; opacity: .35; }

.bcil {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--mt);
}

.bcb { padding: 18px 20px; }

.bccs {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--mt);
  opacity: .55;
  margin-bottom: 8px;
}

.bctit {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .97rem;
  color: var(--tx);
  margin-bottom: 9px;
  line-height: 1.35;
}

.bcex {
  font-size: .83rem;
  color: var(--mt);
  line-height: 1.55;
  margin-bottom: 13px;
}

.bclink {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  color: var(--am);
  text-decoration: none;
}

/* --- CTA strip --------------------------------------------- */
#cstrip {
  background: var(--bgd);
  border-top: 1px solid rgba(224, 136, 32, .2);
  border-bottom: 1px solid rgba(224, 136, 32, .2);
  padding: 56px 0;
}

.cstrip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cstrip-text h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--tx);
  margin-bottom: 8px;
}

.cstrip-text p {
  font-size: .95rem;
  color: var(--mt);
  line-height: 1.6;
  max-width: 440px;
}

.cstrip-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Activity library (extracted) -------------------------- */
#lib .container { position: relative; }
.ac-code { color: var(--am); font-family: 'JetBrains Mono', monospace; font-size: .78rem; display: block; margin-top: 8px; background: var(--nvd); padding: 8px; border-radius: 4px; }

/* --- Social proof (extracted) ------------------------------ */
#proof .sh { margin-bottom: 8px; }
.stat-src { font-size: .7rem; opacity: .6; }

/* --- Blog notes (extracted) -------------------------------- */
.notes-hd .sh { margin-bottom: 8px; }

/* --- Responsive (tidbits-specific) ------------------------- */
@media (max-width: 1024px) {
  .proof-grid   { grid-template-columns: 1fr 1fr; }
  .stat-row     { grid-template-columns: repeat(2, 1fr); }
  .blg          { grid-template-columns: 1fr 1fr; }
  .cstrip-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  #phdr                        { padding: 88px 0 52px; }
  #lib, #proof, #notes, #cstrip { padding: 56px 0; }
  .ac-grid                     { grid-template-columns: 1fr; }
  .proof-grid                  { grid-template-columns: 1fr; }
  .stat-row                    { grid-template-columns: 1fr 1fr; padding: 24px; }
  .blg                         { grid-template-columns: 1fr; }
  .filter-bar                  { gap: 6px; }
  .fbtn                        { font-size: .75rem; padding: 5px 12px; }
}

@media (max-width: 480px) {
  .cstrip-btns { flex-direction: column; }
  .ba, .bo     { text-align: center; justify-content: center; }
  .stat-row    { grid-template-columns: 1fr; }
}
