/* Keep the interview controls and the work area on the same inset. */
body > div:has(> div > [aria-label="Interview Progress and Stage Timer"]) {
  --interview-gutter: clamp(0.75rem, 1.5vw, 1rem);
  height: auto;
  min-height: 0;

  & > header {
    flex-wrap: wrap;
    gap: 0.625rem 1rem;
    padding-inline: var(--interview-gutter);
  }

  & > header > div {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }

  & > div:has(> [aria-label="Interview Progress and Stage Timer"]) {
    flex-shrink: 0;
    padding-inline: var(--interview-gutter);
  }

  & [aria-label="Interview Progress and Stage Timer"] > div:first-child {
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
  }

  & > .grid,
  & > .grid > div {
    min-height: 0;
    min-width: 0;
  }

  & > .grid > .bg-background {
    padding: var(--interview-gutter);
    overflow: hidden auto;
    scroll-padding-block: var(--interview-gutter);
  }

  & > .grid > .bg-background:has(> section) {
    padding-bottom: calc(var(--interview-gutter) + 3.5rem);
  }
}

@media (min-width: 64rem) and (min-height: 36rem) {
  body:has(> div > div > [aria-label="Interview Progress and Stage Timer"]) {
    height: 100dvh;
    min-height: 0;
  }

  body > div:has(> div > [aria-label="Interview Progress and Stage Timer"]) {
    flex: 1;
  }
}

/* Results tables are shared by problems, builds, and coding interviews. */
.overflow-x-auto > table.border-collapse.font-mono :is(th, td) {
  padding-inline: 0.625rem;
}

.flex.border-b.pt-2:has(> button.rounded-t-node) {
  flex-wrap: wrap;
  row-gap: 0.25rem;
}
