/* ── World cards: hide summary marker everywhere ── */
.world-details > summary { list-style: none; }
.world-details > summary::-webkit-details-marker { display: none; }
.world-details > summary::marker { display: none; }

@media (min-width: 641px) {
  /* Desktop: summary is not interactive */
  .world-details > summary { cursor: default; pointer-events: none; }
}

/* ── Work page: problem section toggles (all screen sizes) ── */
.prob-details > summary {
  list-style: none;
  cursor: pointer;
  display: block;
  position: relative;
  padding-right: 40px;
}
.prob-details > summary::-webkit-details-marker { display: none; }
.prob-details > summary::marker { display: none; }
.prob-details > summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 4px;
  font-size: 26px;
  font-weight: 300;
  color: var(--teal);
  line-height: 1;
}
.prob-details[open] > summary::after { content: '−'; }
.prob-body { padding-top: 4px; }

/* ── Mobile menu ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 102;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 260ms cubic-bezier(.4,0,.2,1), opacity 260ms ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .menu-toggle { display: flex; }

  .nav {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 260ms ease, transform 260ms cubic-bezier(.4,0,.2,1), visibility 0s 260ms;
  }
  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 260ms ease, transform 260ms cubic-bezier(.4,0,.2,1), visibility 0s 0s;
  }
  .nav a {
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 200ms ease, transform 200ms ease;
  }
  .nav.open a {
    opacity: 1;
    transform: translateY(0);
  }
  .nav.open a:nth-child(1) { transition-delay: 60ms; }
  .nav.open a:nth-child(2) { transition-delay: 100ms; }
  .nav.open a:nth-child(3) { transition-delay: 140ms; }
  .nav.open a:nth-child(4) { transition-delay: 180ms; }
  .nav.open a:nth-child(5) { transition-delay: 220ms; }
  .nav .cta-link {
    display: block;
    font-size: 16px;
    padding: 14px 32px;
  }

  /* Footer cleanup */
  .site-footer { padding: 40px 0 24px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 24px;
  }
  .footer-logo img { height: 56px; }
  .footer-tagline { max-width: 100%; }

  /* About credentials slim */
  .creds-hide { display: none; }

  /* Work page — how it starts horizontal on mobile */
  .how-it-starts-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* ── Home: three worlds accordion ── */
  .worlds-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .world-card {
    border-top: 1px solid var(--line);
  }

  .world-card:last-child {
    border-bottom: 1px solid var(--line);
  }

  .world-img-wrap {
    border-radius: 0 !important;
    margin-bottom: 0 !important;
  }

  .world-img-wrap img {
    height: 200px !important;
    border-radius: 0;
  }

  .world-details > summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 12px;
  }

  .world-details > summary p,
  .world-details > summary h3 {
    margin-bottom: 4px !important;
  }

  .world-details > summary::after {
    content: '+';
    font-size: 26px;
    font-weight: 300;
    color: var(--teal);
    flex-shrink: 0;
    line-height: 1;
  }

  .world-details[open] > summary::after {
    content: '−';
  }

  .world-body {
    padding-bottom: 24px;
  }

  /* Work page: In Practice photo grid */
  .in-practice-photos { grid-template-columns: 1fr !important; }
  .in-practice-photos .photo-main { height: 260px !important; }
  .in-practice-photos .photo-small { height: 200px !important; }

  /* Writing page: podcast + talks grids */
  .podcast-grid { grid-template-columns: 1fr !important; }
  .talks-grid { grid-template-columns: 1fr !important; }
}
