/* Progressive galleries: the original order and full content survive without JS. */
.tc-disclosure-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 2.75rem;
  max-width: 100%;
  margin: 0 0 1.5rem;
  padding: .75rem 1rem;
  border: 1px solid var(--tc-rule);
  border-radius: 0;
  background: var(--tc-paper);
  color: var(--tc-ink);
  font: .8125rem/1.4 var(--font-mono), monospace;
  text-align: left;
  cursor: pointer;
}
.tc-disclosure-toggle::after { content: '+'; flex: none; font-size: 1.25rem; line-height: 1; }
.tc-disclosure-toggle[aria-expanded='true']::after { content: '−'; }
.tc-disclosure-toggle:focus-visible { outline: 2px solid var(--tc-focus); outline-offset: 4px; }
[data-tc-disclosure] [hidden] { display: none !important; }
@media (hover: hover) {
  .tc-disclosure-toggle:hover { border-color: var(--tc-ink); }
}

/* Named areas must contract with the visible selection, leaving no empty rows. */
.tc-prototype-gallery[data-tc-disclosure-expanded='false'] .tc-prototype-tile:last-child {
  grid-column: auto;
  grid-row: span 2;
}
.tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-collections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
.tc-ui-kit[data-tc-disclosure-expanded='false'] :is(.tc-ui-collection, .tc-ui-module-grid) { display: contents; }
.tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-collection-heading { display: none; }
.tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-module { grid-area: auto; }

@media (min-width: 48rem) {
  .tc-prototype-gallery[data-tc-disclosure-expanded='false'] .tc-prototype-tile:last-child { grid-column: span 2; }
  .tc-screen-collection[data-tc-disclosure-expanded='false'] .tc-design-wall {
    grid-template-areas:
      'projects projects'
      'projects projects'
      'residential mortgage'
      'residential mortgage'
      'apartment masterplan'
      'apartment construction';
  }
  .tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-collections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 20rem;
    grid-template-areas:
      'project-map masterplan'
      'offers mortgage'
      'offers commercial'
      'atoms atoms';
  }
  .tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-module {
    grid-area: var(--tc-kit-area);
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
  }
  .tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-module-media { min-height: 0; height: auto; }
}
@media (min-width: 75rem) {
  .tc-prototype-gallery[data-tc-disclosure-expanded='false'] .tc-prototype-tile--tall { grid-column: span 2; }
  .tc-prototype-gallery[data-tc-disclosure-expanded='false'] .tc-prototype-tile:last-child { grid-column: span 3; }
  .tc-full-design[data-tc-disclosure-expanded='false'] .tc-full-page--wide { grid-column: span 2; }
  .tc-full-design[data-tc-disclosure-expanded='false'] .tc-full-page:nth-child(6) { grid-column: span 4; }
  .tc-screen-collection[data-tc-disclosure-expanded='false'] .tc-design-wall {
    grid-template-areas:
      'projects projects projects residential mortgage'
      'projects projects projects residential mortgage'
      'apartment apartment masterplan residential mortgage'
      'apartment apartment construction . .';
  }
  .tc-ui-kit[data-tc-disclosure-expanded='false'] .tc-ui-collections {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      'project-map project-map masterplan masterplan'
      'offers offers mortgage mortgage'
      'offers offers commercial atoms';
  }
}
