@layer components {
  /* The gate's search is the page's main control: one field holding its glyph and its button, as tall as a verdict's. */
  .input.input--gate {
    --input-background: var(--color-canvas);
    --input-border-color: var(--color-ink-light);
    --input-border-radius: var(--radius-lg);
    --input-padding: 0 0.4em 0 0.8em;
    --column-gap: 0.6em;
    --icon-size: 1.2em;

    font-size: var(--text-section);                   /* 20px */
    min-block-size: 3.5rem;                           /* 56px */

    @media (min-width: 100ch) {
      min-block-size: 2.95rem;                        /* 56px */
    }

    .btn {
      font-size: var(--text-row);
      min-block-size: 2.75rem;                        /* 44px */

      @media (min-width: 100ch) {
        min-block-size: 2.32rem;                      /* 44px */
      }
    }
  }

  /* What a search finds, a firm after a firm. */
  .gate-results {
    display: flex;
    flex-direction: column;
    gap: var(--block-space-double);
  }

  /* A firm among the results: its name on a rule, what it is and whether it may enter, then whom it brings. */
  .gate-firm {
    display: flex;
    flex-direction: column;
    gap: var(--block-space);

    > *,
    .rows {
      margin-block: 0;
    }

    .rows__subheading + .rows {
      margin-block-start: var(--inline-space-half);
    }

    /* Nobody it brings is one quiet line, starting where its name does. */
    .blank-slate {
      background: none;
      border: 0;
      color: var(--color-text-subtle);
      font-size: var(--text-small);
      font-weight: 400;
      margin-inline: 0;
      padding: 0;

      > strong {
        color: inherit;
        display: inline;
        font-weight: inherit;
      }
    }
  }

  /* Whom it works for and whom it brings: each label over its values, from the edge the firm's name starts at. */
  .gate-firm {
    .details__row {
      grid-template-columns: minmax(0, 1fr);
    }

    .details__label {
      text-align: start;
    }

    .details__value {
      padding-block: 0;
    }
  }

  .gate-firm__header {
    display: flex;
    flex-direction: column;
    gap: var(--block-space-half);

    > * {
      margin: 0;
    }
  }

  .gate-firm__byline {
    font-size: var(--text-small);
  }

  /* The firm's own verdict at each site, filled so it is not taken for one of its people's. */
  .gate-firm__verdicts {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--block-space-half) var(--inline-space-double);
    font-size: var(--text-row);

    > span {
      align-items: center;
      display: inline-flex;
      gap: var(--inline-space);
    }

    .status--stamp {
      rotate: none;
    }
  }

  /* Whether each one may enter is read from the end of its row, a size up from a list's details. */
  .sheet #main .gate-results .rows .row .row__end {
    font-size: var(--text-small);
  }

  /* Who is inside: a name and its firm lead to their records in the row's own colours, as in a byline. */
  .gate-rows .row a {
    color: inherit;
    text-decoration-color: color-mix(in oklch, currentColor 40%, transparent);
    text-underline-offset: 0.15em;
  }

  /* Whoever is inside is let out from the list with a thumb. */
  @media (any-pointer: coarse) {
    .gate-rows .row .btn {
      min-block-size: 2.75rem;
    }
  }
}
