/* Home guide fold: each area's first six guides, the rest behind a disclosure; on phones the index reads as rows.
   Written by engine/scripts/home-guide-fold.mjs. DS3 tokens only. */
html.ds3 .fg-guide-fold { margin: 12px 0 0; }
html.ds3 .fg-guide-fold > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--ds3-ink, #1f1f1f); border-radius: 8px; background: #fff;
  color: var(--ds3-ink, #1f1f1f); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none;
}
html.ds3 .fg-guide-fold > summary::-webkit-details-marker { display: none; }
html.ds3 .fg-guide-fold > summary::after {
  content: ""; width: 8px; height: 8px; margin-top: -4px; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
html.ds3 .fg-guide-fold > summary:hover { background: var(--ds3-well, #f6f6f4); }
html.ds3 .fg-guide-fold > summary:focus-visible { outline: 2px solid var(--ds3-ink, #1f1f1f); outline-offset: 2px; }
html.ds3 .fg-guide-fold[open] > summary { margin-bottom: 12px; }
html.ds3 .fg-guide-fold[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
@media (max-width: 760px) {
  html.ds3 .fg-guide-fold > summary { display: flex; justify-content: space-between; width: 100%; }
}
/* Opening eases the extra guides in where the browser can animate a disclosure; elsewhere it opens at once. */
@media (prefers-reduced-motion: no-preference) {
  html.ds3 .fg-guide-fold { interpolate-size: allow-keywords; }
  html.ds3 .fg-guide-fold::details-content {
    height: 0; overflow: clip;
    transition: height .3s cubic-bezier(.2, .7, .2, 1), content-visibility .3s allow-discrete;
  }
  html.ds3 .fg-guide-fold[open]::details-content { height: auto; }
  html.ds3 .fg-guide-fold > summary::after { transition: transform .2s ease, margin-top .2s ease; }
}

/* Phones: the guide index (home and /campus/) is one list of rows, like a page's "Keep going" links:
   title, the full summary on up to two lines, a chevron. Half the height of the boxed tiles. */
@media (max-width: 760px) {
  html.ds3 body .campus-guide-index .ds3-tiles.ds3-tiles {
    display: block; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--ds3-hairline, #e8e8e8);
  }
  html.ds3 body .campus-guide-index .ds3-tiles.ds3-tiles > li { border-bottom: 1px solid var(--ds3-hairline, #e8e8e8); }
  html.ds3 body .campus-guide-index .ds3-tiles .ds3-tile.ds3-tile {
    position: relative; height: auto; border: 0; border-radius: 0; box-shadow: none; background: none;
  }
  html.ds3 body .campus-guide-index .ds3-tiles .ds3-tile-linked.ds3-tile-linked:active { background: var(--ds3-well, #f6f6f4); }
  html.ds3 body .campus-guide-index .ds3-tiles .ds3-tile .ds3-tile-copy.ds3-tile-copy {
    grid-template-columns: minmax(0, 1fr) 16px; gap: 3px 14px; padding: 13px 2px 13px 0;
  }
  html.ds3 body .campus-guide-index .ds3-tiles .ds3-tile-copy.ds3-tile-copy > .ds3-icon {
    grid-area: 1 / 2 / span 2; width: 16px; height: 16px; color: var(--ds3-muted, #6b6b6b);
  }
  html.ds3 body .campus-guide-index .ds3-tiles li .ds3-tile-copy.ds3-tile-copy .ds3-tile-link {
    min-height: 0; font-size: 16px; font-weight: 600; line-height: 1.3;
  }
  html.ds3 body .campus-guide-index .ds3-tiles li .ds3-tile-copy.ds3-tile-copy p {
    grid-column: 1; display: -webkit-box; overflow: hidden; white-space: normal; text-overflow: clip;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  }
  html.ds3 body .campus-guide-index .fg-guide-fold { margin-top: 14px; }
}
/* Phones: the task chips above the index (12–13, most repeated in the index below) are one swipeable row,
   not six wrapped rows that filled the first screen. Desktop keeps them wrapped. */
@media (max-width: 760px) {
  html.ds3 body nav.campus-task-nav.campus-task-nav {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-overflow-scrolling: touch; margin-inline: -16px; padding: 4px 16px 10px; scroll-padding-inline: 16px;
  }
  html.ds3 body nav.campus-task-nav::-webkit-scrollbar { display: none; }
  html.ds3 body nav.campus-task-nav > * { flex: 0 0 auto; }
}
