/* Native sticky folders share one top edge so their tabs align when stacked. */
.folder-stack {
  --folder-tab-height: 44px;
  --folder-corner-left: 8px;
  --folder-corner: 24px;
  --folder-sticky-start: 16px;
  --folder-sheet-height: clamp(540px, 60vh, 620px);
  --folder-page-scroll-padding: 24px;
  --folder-scroll-margin: calc(-1 * var(--folder-page-scroll-padding));
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  isolation: isolate;
}
.folder-anchor { height: 0; scroll-margin-top: var(--folder-scroll-margin); outline: none; }
.folder-stage {
  --folder-sticky-top: var(--folder-sticky-start);
  position: sticky;
  top: var(--folder-sticky-top);
  height: auto;
  margin-bottom: 16px;
  display: grid;
  align-items: start;
  pointer-events: none;
}
.folder-stage--question { z-index: 1; }
.folder-stage--meeting { z-index: 2; }
.folder-stage--group { z-index: 3; }
.folder-card {
  --folder-fill: var(--lilac, #dac5fa);
  --folder-ink: var(--purple, #3a1a4a);
  position: relative;
  width: 100%;
  min-width: 0;
  color: var(--folder-ink);
  pointer-events: none;
}
.folder-card--meeting { --folder-fill: var(--cyan, #bee6ee); }
.folder-card--group { --folder-fill: var(--purple, #3a1a4a); --folder-ink: var(--paper, #fafafa); }
.folder-tab {
  width: calc(100% / 3);
  height: var(--folder-tab-height);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 20px;
  border-radius: var(--folder-corner-left) var(--folder-corner) 0 0;
  background: var(--folder-fill);
  color: var(--folder-ink);
  font: 600 15px/var(--leading-short) Inter, sans-serif;
  text-align: left;
  text-decoration: none;
  pointer-events: auto;
}
.folder-card--meeting .folder-tab { margin-left: calc(100% / 3); }
.folder-card--group .folder-tab { margin-left: calc(200% / 3); }
.folder-tab[aria-current="location"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.folder-tab:hover { text-decoration: underline; text-underline-offset: 5px; }
.folder-tab:focus-visible { outline: 3px solid var(--orange, #f55b1c); outline-offset: -5px; }
.folder-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(38px, 5vw, 76px);
  align-items: center;
  /* Copy determines the final height; the shared minimum keeps the stack calm. */
  height: auto;
  min-height: var(--folder-sheet-height);
  margin-top: -1px;
  padding: clamp(34px, 4vw, 56px);
  border-radius: var(--folder-corner-left) var(--folder-corner) var(--radius-feature) var(--radius-feature);
  background: var(--folder-fill);
  pointer-events: auto;
}
/* The outer tab owns that corner; a second sheet radius would cut a visible wedge. */
.folder-card--question .folder-sheet { border-top-left-radius: 0; }
.folder-card--group .folder-sheet { border-top-right-radius: 0; }
.folder-copy { min-width: 0; max-width: 620px; }
.folder-title {
  margin: 0 0 24px;
  font-family: Poppins, sans-serif;
  font-size: clamp(34px, 3.75vw, 54px);
  font-weight: 700;
  line-height: var(--leading-heading);
  letter-spacing: -.03em;
  text-wrap: balance;
  color: inherit;
}
.folder-copy p { margin: 0; font: 400 16px/var(--leading-body) Inter, sans-serif; text-wrap: pretty; color: inherit; }
.folder-copy p + p { margin-top: 16px; }
.folder-copy .folder-emphasis { font-weight: 600; }
.folder-visual { min-width: 0; width: 100%; margin: 0; justify-self: end; }
.folder-visual--photo { max-width: 350px; }
.folder-photo {
  display: block;
  width: 100%;
  height: 430px;
  max-width: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  border-radius: var(--radius-photo);
}
.folder-visual--icon { display: grid; place-items: center; min-height: 350px; }
.folder-icon {
  display: block;
  width: min(100%, 300px);
  aspect-ratio: 1;
  background: currentColor;
  mask: var(--folder-icon-source) center / contain no-repeat;
  -webkit-mask: var(--folder-icon-source) center / contain no-repeat;
}
.folder-icon--online { --folder-icon-source: url('/website/assets/icons/i113-online-exchange.svg'); }
.folder-icon--community { --folder-icon-source: url('/website/assets/icons/i105-community.svg'); }
.folder-icon--question { --folder-icon-source: url('/website/assets/icons/i123-weekly-question.svg'); }
.folder-icon--chat { --folder-icon-source: url('/website/assets/icons/i122-group-chat.svg'); }
.folder-end { height: 64px; pointer-events: none; }
@media (min-width: 960px) and (max-width: 1100px) {
  .folder-sheet { gap: 28px; padding: 34px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .folder-title { font-size: 34px; margin-bottom: 20px; }
  .folder-copy p { font-size: 15px; line-height: var(--leading-body); }
  .folder-photo { height: 400px; }
}
@media (max-width: 959px) {
  .folder-stack { --folder-scroll-margin: 0px; }
  .folder-stage { position: relative; top: auto; height: auto; margin-bottom: 36px; }
  .folder-tab { width: 56%; font-size: 14px; }
  .folder-card--meeting .folder-tab { margin-left: 22%; }
  .folder-card--group .folder-tab { margin-left: 44%; }
  .folder-sheet { height: auto; min-height: 0; padding: 34px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 30px; }
  .folder-title { font-size: 34px; }
  .folder-copy p { font-size: 15px; }
  .folder-photo { height: 360px; }
  .folder-visual--icon { min-height: 240px; }
  .folder-end { display: none; }
}
@media (max-width: 639px) {
  .folder-stage { margin-bottom: 30px; }
  .folder-tab { width: 78%; min-height: 44px; padding: 5px 10px; font-size: 13px; }
  .folder-card--meeting .folder-tab { margin-left: 11%; }
  .folder-card--group .folder-tab { margin-left: 22%; }
  .folder-sheet { grid-template-columns: 1fr; padding: 29px 25px; gap: 26px; }
  .folder-title { max-width: 17ch; margin-bottom: 21px; font-size: clamp(28px, 7.3vw, 35px); line-height: var(--leading-heading); }
  .folder-copy p { font-size: 15px; line-height: var(--leading-body); }
  .folder-copy p + p { margin-top: 15px; }
  .folder-visual--photo { max-width: none; }
  .folder-photo { height: 245px; object-position: 50% 34%; }
  .folder-visual--icon { min-height: 0; justify-content: end; }
  .folder-icon { width: 190px; }
}
@media (prefers-reduced-motion: reduce), (max-height: 699px) {
  .folder-stack { --folder-scroll-margin: 0px; }
  .folder-stage { position: relative; top: auto; height: auto; margin-bottom: 36px; }
  .folder-sheet { height: auto; min-height: 0; }
  .folder-end { display: none; }
}
.folder-stack--static { --folder-scroll-margin: 0px; }
.folder-stack--static .folder-stage { position: relative; top: auto; height: auto; margin-bottom: 36px; }
.folder-stack--static .folder-sheet { height: auto; min-height: 0; }
.folder-stack--static .folder-end { display: none; }

/* Once the stack is complete, switch only the sheet; retain every flow height. */
.folder-desktop-tabs { display: none; }
.folder-stack--settled .folder-desktop-tabs {
  position: absolute; inset: 0 0 auto; z-index: 4;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  height: var(--folder-tab-height); pointer-events: auto;
}
.folder-desktop-tabs[hidden] { display: none; }
.folder-desktop-tab {
  display: flex; align-items: center; min-width: 0; padding: 8px 20px;
  border-radius: var(--folder-corner-left) var(--folder-corner) 0 0;
  background: var(--lilac); color: var(--purple);
  font: 600 15px/var(--leading-short) Inter, sans-serif; text-decoration: none;
}
.folder-desktop-tab--meeting { background: var(--cyan); }
.folder-desktop-tab--group { background: var(--purple); color: var(--paper); }
.folder-desktop-tab[aria-selected="true"], .folder-desktop-tab:hover {
  text-decoration: underline; text-underline-offset: 5px;
}
.folder-desktop-tab[aria-selected="true"] { text-decoration-thickness: 2px; }
#module .folder-desktop-tab:focus-visible { outline: 3px solid currentColor; outline-offset: -5px; }
.folder-stack--settled .folder-tab { visibility: hidden; }
.folder-stack--settled .folder-sheet { border-top-left-radius: 0; border-top-right-radius: 0; }
.folder-stack--settled .folder-sheet[aria-hidden="true"] { visibility: hidden; pointer-events: none; }

/* Progressive enhancement: one selected sheet, with all three named tabs visible. */
.folder-mobile-tabs { display: none; }
.folder-mobile-tabs[hidden] { display: none; }
.folder-stack--tabs { position: relative; --folder-scroll-margin: 0px; }
.folder-stack--tabs .folder-mobile-tabs {
  position: relative; z-index: 4;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch; gap: 4px;
}
.folder-stack--tabs .folder-mobile-tab {
  display: flex; align-items: center; justify-content: flex-start;
  min-width: 0; min-height: 68px; padding: 12px 10px;
  border-radius: var(--folder-corner-left) var(--folder-corner) 0 0;
  background: var(--lilac); color: var(--purple);
  font: 600 var(--type-meta)/var(--leading-short) Inter, sans-serif;
  text-align: left; text-wrap: balance; overflow-wrap: anywhere;
  text-decoration: none;
}
.folder-stack--tabs .folder-mobile-tab--meeting { background: var(--cyan); }
.folder-stack--tabs .folder-mobile-tab--group { background: var(--purple); color: var(--paper); --focus-ring: var(--cyan); }
.folder-stack--tabs .folder-mobile-tab[aria-selected="true"] {
  font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px;
}
.folder-stack--tabs .folder-mobile-tab:hover { text-decoration: underline; text-underline-offset: 5px; }
#module .folder-stack--tabs .folder-mobile-tab:focus-visible { outline: 3px solid currentColor; outline-offset: -5px; }
.folder-stack--tabs .folder-anchor { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.folder-stack--tabs .folder-stage,
.folder-stack--tabs.folder-stack--static .folder-stage {
  position: relative; top: auto; height: auto; margin: 0;
}
.folder-stack--tabs .folder-stage[hidden] { display: none; }
.folder-stack--tabs .folder-stage:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.folder-stack--tabs .folder-tab { display: none; }
.folder-stack--tabs .folder-sheet {
  height: auto; min-height: 0;
  /* All three compact tabs occupy the top edge, leaving no free sheet corners. */
  border-radius: 0 0 var(--radius-feature) var(--radius-feature);
}
.folder-stack--tabs .folder-end { display: none; }
@media (max-width: 700px) {
  .folder-stack--tabs .folder-mobile-tabs {
    display: flex; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .folder-stack--tabs .folder-mobile-tabs::-webkit-scrollbar { display: none; }
  .folder-stack--tabs .folder-mobile-tab {
    flex: 1 0 auto; min-width: max-content; min-height: 48px;
    padding: 10px 12px; font-size: 13px;
    white-space: nowrap; text-wrap: nowrap; overflow-wrap: normal;
  }
}
