@layer components {
  /* A gatekeeper's bar is the other bars' white ground and hairline, with the gate's search in the middle. */
  .bar--gate {
    align-items: center;
    background-color: var(--color-canvas);
    border-block-start: 1px solid var(--color-ink-lighter);
    flex-direction: row;
  }

  /* The field is the top bar's: a hairline edge and an 8px corner, as tall as a fingertip on a phone. */
  .bar--gate .input {
    --input-background: var(--color-canvas);
    --input-border-color: var(--color-ink-light);
    --input-border-radius: var(--radius-lg);
    --input-padding: 0 2.6em 0 0.85em;

    block-size: 2.75rem;                              /* 44px */
    flex: 1 1 auto;
    font-size: max(16px, var(--text-control));
    max-inline-size: 24rem;

    @media (min-width: 100ch) {
      block-size: 2.1rem;                             /* 40px */
      max-inline-size: 34rem;                         /* 646px */
    }
  }

  /* Its key sits inside the field's end, and goes once the field is in use. */
  .bar--gate kbd {
    margin-inline-start: -2.2em;
    pointer-events: none;
  }

  .bar--gate .input:is(:focus, :not(:placeholder-shown)) + kbd {
    visibility: hidden;
  }
}
