/* Shared components (layer "components": beats the old sheets whatever their specificity,
   so keep every rule here narrowly aimed). Step 1 only recolours; the .btn, .card, .sheet
   components arrive with the base layout (UI plan step 2). */
@layer components {
  /* Plain page background instead of the photo; best for contrast in sunlight. */
  body {
    background: var(--color-bg);
  }

  /* Page frame. The old sheet set "html, body { height: 100% }", so the body was one
     screen tall: content overflowed it, its bottom padding (room for the tab bar and
     Save bar) sat at the end of the first screen, not after the content. The body now
     grows with its content. The canvas behind it is header green, so bouncing past the
     top on iPhone (overscroll, pull-to-refresh) shows green above the header, never a
     white gap. The fixed header and tab bar stay put. */
  html {
    height: auto;
    min-height: 100%;
    background: var(--color-header-bg);
    scroll-padding-top: calc(var(--header-h) + var(--safe-top) + var(--space-2));
  }
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--header-h) + var(--safe-top));
  }
  /* Old pages left 70px for the old header; the body pads for the header now. */
  .event-layout {
    padding-top: var(--space-3);
  }

  /* Header: deep green, cream text, in local builds too (the LOCAL badge marks those). */
  .header,
  .env-local .header,
  .env-live .header {
    background: var(--color-header-bg);
    color: var(--color-header-text);
  }
  /* The serif title is wider than Inter was: one line, sized to fit between the icons. */
  .header h1 {
    font-family: var(--font-heading);
    color: var(--color-header-text);
    font-size: var(--text-xl);
    line-height: var(--leading-tight);
    white-space: nowrap;
    max-width: calc(100vw - 112px);   /* clear of the logo and the burger */
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .burger-menu div {
    background-color: var(--color-header-text);
  }
  .burger-menu:hover div {
    background-color: var(--cream-200);
  }

  /* Burger menu panel */
  .menu {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
  }
  .menu a,
  .menu .dropdown-toggle {
    color: var(--color-text);
  }
  .menu a:hover,
  .menu .dropdown-toggle:hover {
    background: var(--color-surface-sunk);
  }

  /* Tap highlight on every old button class: translucent green, never the platform blue. */
  :is(.button, .link-button, .small-button, .event-button, .btn-back, .btn-next, .nav-button,
      .add-friend-button, .score-type-button, .floating-save-button, .modal-btn, .action-button) {
    -webkit-tap-highlight-color: var(--btn-tap-highlight);
  }

  /* ---- Selected / current state: one look everywhere (--color-selected) ----
     Old classes: event filter buttons, Individual/Match/Team, round and match pickers.
     Hover and press keep the selected colours rather than turning green. */
  :is(.event-button, .score-type-button, .action-button, .day-link, .match-link, .button,
      .day-selection a, .match-selection a, .btn, .segmented__option, .tabbar__item):is(.selected, .is-selected, [aria-current="page"], [aria-pressed="true"]),
  :is(.event-button, .score-type-button, .action-button, .day-link, .match-link, .button,
      .day-selection a, .match-selection a):is(.selected, [aria-current="page"]):is(:hover, :active) {
    background-color: var(--color-selected);
    color: var(--color-selected-text);
    box-shadow: inset 0 0 0 2px var(--color-selected-border);
    font-weight: 700;
  }

  /* Tee swatches: the chosen tee gets a gold ring outside its own colour. */
  .tee-color-radio:checked + .tee-swatch,
  .tee-swatch.selected {
    box-shadow: 0 0 0 2px var(--color-selected), 0 0 0 4px var(--color-selected-border);
  }
  .tee-dropdown-item.selected {
    background-color: var(--color-selected);
    color: var(--color-selected-text);
  }

  /* =====================================================================
     New components (macros/ui.html). Pages move onto these step by step.
     ===================================================================== */

  .icon {
    flex: none;
    vertical-align: middle;
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--tap);
    padding: var(--space-2) var(--space-4);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    line-height: var(--leading-tight);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: var(--btn-tap-highlight);
    transition: background-color 0.15s, box-shadow 0.15s;
  }
  .btn--lg {
    min-height: var(--tap-lg);
    font-size: var(--text-lg);
  }
  .btn--primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
  }
  .btn--primary:is(:hover, .is-hover) {
    background: var(--btn-primary-bg-hover);
  }
  .btn--primary:is(:active, .is-active) {
    background: var(--btn-primary-bg-active);
  }
  .btn--secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-border);
  }
  .btn--secondary:is(:hover, .is-hover) {
    background: var(--btn-secondary-bg-hover);
  }
  .btn--secondary:is(:active, .is-active) {
    background: var(--btn-secondary-bg-active);
  }
  .btn--danger {
    background: var(--btn-danger-bg);
    color: var(--btn-danger-text);
  }
  .btn--danger:is(:hover, .is-hover) {
    background: var(--btn-danger-bg-hover);
  }
  .btn--danger:is(:active, .is-active) {
    background: var(--btn-danger-bg-active);
  }
  .btn--quiet {
    background: transparent;
    color: var(--btn-quiet-text);
  }
  .btn--quiet:is(:hover, .is-hover, :active, .is-active) {
    background: var(--btn-quiet-bg-hover);
  }
  .btn:is(:disabled, [aria-disabled="true"]) {
    background: var(--btn-disabled-bg);
    color: var(--btn-disabled-text);
    border-color: transparent;
    cursor: not-allowed;
  }

  /* ---- Segmented switch ---- */
  .segmented {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
  }
  .segmented__legend {
    font-weight: 600;
    margin-bottom: var(--space-1);
  }
  .segmented__options {
    display: inline-flex;
    border: 2px solid var(--btn-secondary-border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .segmented__option {
    position: relative;
    display: flex;
  }
  .segmented__option input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
  }
  .segmented__option span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--tap) - 4px);
    min-width: var(--tap);
    padding: 0 var(--space-4);
    color: var(--btn-secondary-text);
    font-weight: 600;
  }
  .segmented__option + .segmented__option span {
    border-left: 1px solid var(--btn-secondary-border);
  }
  .segmented__option input:checked + span {
    background: var(--color-selected);
    color: var(--color-selected-text);
    box-shadow: inset 0 0 0 2px var(--color-selected-border);
  }
  .segmented__option input:focus-visible + span {
    outline: 3px solid var(--color-focus);
    outline-offset: -3px;
  }

  /* ---- Toggle switch ---- */
  .toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--tap);
    cursor: pointer;
  }
  .toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }
  .toggle__track {
    position: relative;
    flex: none;
    width: 52px;
    height: 30px;
    border-radius: var(--radius-pill);
    background: var(--btn-disabled-bg);
    transition: background-color 0.15s;
  }
  .toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-1);
    transition: transform 0.15s;
  }
  .toggle input:checked + .toggle__track {
    background: var(--color-selected);
    box-shadow: inset 0 0 0 2px var(--color-selected-border);
  }
  .toggle input:checked + .toggle__track .toggle__thumb {
    transform: translateX(22px);
  }
  .toggle input:focus-visible + .toggle__track {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
  }

  /* ---- Card ---- */
  .card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: var(--space-4);
  }
  .card__title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-xl);
  }

  /* ---- Form field ---- */
  .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
    text-align: left;
  }
  .field__label {
    font-weight: 600;
  }
  .field__input {
    min-height: var(--tap);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: max(16px, var(--text-base));   /* 16px+ stops iOS zooming in */
  }
  .field__help {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    margin: 0;
  }
  .field__error {
    color: var(--color-danger-text);
    font-size: var(--text-sm);
    font-weight: 600;
    margin: 0;
  }
  .field--error .field__input {
    border: 2px solid var(--color-danger-text);
  }

  /* ---- Table ---- */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .ui-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-variant-numeric: tabular-nums;
    background: var(--color-surface);
  }
  .ui-table th,
  .ui-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    white-space: nowrap;
  }
  .ui-table thead th {
    background: var(--color-header-bg);
    color: var(--color-header-text);
    font-weight: 600;
  }
  .ui-table tbody tr:nth-child(even) td {
    background: var(--color-surface-sunk);
  }
  .ui-table--sticky :is(th, td):first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
  }
  .ui-table--sticky tbody tr:nth-child(odd) td:first-child {
    background: var(--color-surface);
  }

  /* ---- Alert (flash messages) ---- */
  .alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
    border-radius: var(--radius);
    border-left: 6px solid currentColor;
    margin: 0 0 var(--space-3);
    text-align: left;
    line-height: var(--leading);
  }
  .alert .icon {
    margin-top: 1px;
  }
  .alert__text {
    flex: 1;
    color: var(--color-text);
  }
  .alert__close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  .alert--success { background: var(--color-success-bg); color: var(--color-success-text); }
  .alert--warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
  .alert--danger  { background: var(--color-danger-bg);  color: var(--color-danger-text); }
  .alert--info    { background: var(--color-info-bg);    color: var(--color-info-text); }
  .alert[hidden] {
    display: none;
  }
  .alert.is-hiding {
    opacity: 0;
    transition: opacity 0.4s;
  }

  /* ---- Modal (native dialog) ---- */
  .ui-modal {
    margin: auto;                     /* the old "* { margin: 0 }" reset would pin it top-left */
    width: min(92vw, 480px);
    max-height: 85vh;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-2);
  }
  .ui-modal::backdrop {
    background: var(--color-overlay);
  }
  .ui-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
  }
  .ui-modal__title {
    margin: 0;
    font-size: var(--text-xl);
  }
  .ui-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap);
    height: var(--tap);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
  }
  .ui-modal__body {
    padding: var(--space-4);
  }

  /* ---- Design preview banner (only when preview mode is on in this browser) ---- */
  .preview-banner {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top));
    z-index: var(--z-header);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--color-selected);
    color: var(--color-selected-text);
    box-shadow: inset 0 -2px 0 var(--color-selected-border);
    font-weight: 700;
    text-align: center;
  }
  .preview-banner[hidden] {
    display: none;
  }
  .preview-banner a {
    color: var(--color-selected-text);
  }
  .preview-banner button {
    min-height: var(--tap);
    padding: 0 var(--space-4);
    border: 2px solid var(--color-selected-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-selected-text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  /* =====================================================================
     Base layout (UI plan step 2): header with logo, menu, event strip,
     flash area, bottom tab bar.
     ===================================================================== */

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: calc(var(--header-h) + var(--safe-top));
    padding: var(--safe-top) var(--space-2) 0 var(--space-3);
    z-index: var(--z-header);
  }
  .site-header__brand {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    min-width: var(--tap);
    flex: none;
    z-index: 1;
  }
  .site-header__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: inset 0 0 0 1px var(--color-shadow-soft);
  }
  .site-header__logo img {
    width: 32px;
    height: 32px;
    display: block;
  }
  .env-badge {
    position: absolute;
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 var(--space-1);
    border-radius: var(--radius-sm);
    background: var(--color-selected);
    color: var(--color-selected-text);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.04em;
    z-index: 1;
  }
  .site-header .burger-menu {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: var(--tap);
    height: var(--tap);
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    z-index: 1;
  }
  .site-header .burger-menu div {
    width: 24px;
  }
  /* Title: centred, clear of the logo and the menu button. */
  .site-header h1 {
    max-width: calc(100vw - 136px);
  }

  /* Burger menu */
  .menu {
    top: calc(var(--header-h) + var(--safe-top) - 4px);
    right: var(--space-2);
    min-width: 230px;
    max-height: calc(100vh - var(--header-h) - var(--space-4));
    overflow-y: auto;
    padding: var(--space-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    z-index: var(--z-sheet);
  }
  .menu a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--tap);
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
  }
  .menu__section {
    margin: var(--space-2) var(--space-3) var(--space-1);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .menu__logout {
    margin-top: var(--space-2);
    border-top: 1px solid var(--color-border);
  }
  .menu__badge {
    min-width: 20px;
    padding: 0 var(--space-1);
    border-radius: var(--radius-pill);
    background: var(--color-badge);
    color: var(--color-selected-text);
    font-size: var(--text-xs);
    font-weight: 700;
    text-align: center;
  }

  /* Selected event, under the header */
  .event-strip {
    padding: var(--space-1) var(--space-4);
    background: var(--color-surface-sunk);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .event-strip a {
    color: var(--color-heading);
    text-decoration: none;
  }

  /* Messages: one place, every page */
  .flash-area {
    max-width: 640px;
    margin: var(--space-3) auto 0;
    padding: 0 var(--space-4);
  }


  /* ---- Bottom tab bar ---- */
  .has-tabbar {
    padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-tabbar);
    display: flex;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding: 0 var(--space-1) var(--safe-bottom);
    background: var(--color-tabbar-bg);
    box-shadow: 0 -2px 10px var(--color-shadow);
  }
  .tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: var(--space-1) 2px;
    border-radius: var(--radius);
    color: var(--color-tabbar-text);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: 600;
    -webkit-tap-highlight-color: var(--btn-tap-highlight);
  }
  .tabbar__item:hover {
    color: var(--color-header-text);
  }
  .tabbar__item[aria-current="page"],
  .tabbar__item[aria-current="page"]:hover {
    background: var(--color-selected);
    color: var(--color-selected-text);
    box-shadow: inset 0 0 0 2px var(--color-selected-border);
    font-weight: 800;
  }
  .tabbar__icon {
    position: relative;
    display: inline-flex;
  }
  .tabbar__badge {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-badge);
    box-shadow: 0 0 0 2px var(--color-tabbar-bg);
  }
  .tabbar__label {
    line-height: 1.1;
  }
  /* ---- Button row: two or three actions side by side at equal widths, on a phone too ----
     ui.button_row() in macros/ui.html, or class="button-row" on an existing wrapper.
     Long labels wrap inside their button instead of pushing the row off the screen. */
  /* Team tag: colour follows the team number (Add Players, Matches). */
  .team-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--team-none);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
    white-space: nowrap;
  }
  .team-tag--1 { background: var(--team-1); }
  .team-tag--2 { background: var(--team-2); }
  .team-tag--3 { background: var(--team-3); }
  .team-tag--4 { background: var(--team-4); }
  .team-tag[hidden] { display: none; }

  .button-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: var(--space-2);
    width: min(560px, 100% - 2 * var(--space-3));   /* a little air at the screen edges */
    margin: var(--space-4) auto 0;
    padding: 0;
  }
  .button-row > :is(a, button),
  .button-row > form > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    min-height: var(--tap);
    margin: 0;
    padding: var(--space-2) var(--space-3);
    white-space: normal;
    text-align: center;
    line-height: var(--leading-tight);
  }
  .button-row > form {
    display: flex;
    margin: 0;
  }

  /* ---- Event details: one dark green box per round ----
     The round label took the page heading colour (dark green on dark green). */
  .day-row h4 {
    color: var(--color-on-primary);
  }
  .day-row .field__help {
    margin: var(--space-3) 0 0;
    color: var(--color-on-primary);
    text-align: center;
    opacity: 0.85;
  }
  .day-row input[type="date"] {
    display: block;
    margin-inline: auto;    /* the field centred in the box, and the date centred in the field */
    text-align: center;
  }
  .day-row input[type="date"]::-webkit-date-and-time-value {
    text-align: center;     /* iPhone Safari left-aligns the date otherwise */
  }

  /* ---- A page's sticky action bar (block page_actions), above the tab bar ---- */
  .page-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--safe-bottom);
    z-index: var(--z-tabbar);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--actions-h);
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface-glass);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 10px var(--color-shadow-soft);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
  .has-tabbar .page-actions {
    bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  }
  .has-page-actions {
    padding-bottom: calc(var(--actions-h) + var(--safe-bottom));
  }
  .has-tabbar.has-page-actions {
    padding-bottom: calc(var(--tabbar-h) + var(--actions-h) + var(--safe-bottom));
  }

  /* ---- Bottom sheet: a dialog that rises from the bottom on phones ---- */
  @media (max-width: 599px) {
    .ui-modal--sheet {
      width: 100%;
      max-width: none;
      margin: auto 0 0;
      border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      padding-bottom: var(--safe-bottom);
    }
  }

  /* ---- Unsaved-changes prompt (partials/unsaved_changes.html) ---- */
  .unsaved__text {
    margin: 0 0 var(--space-3);
  }
  .unsaved__error {
    margin-bottom: var(--space-3);
  }
  .unsaved__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }
  /* Focus ring on the dark header and tab bar: gold, so it shows against green. */
  :is(.site-header, .tabbar) :focus-visible {
    outline-color: var(--color-focus-on-dark);
  }
  /* While typing on a phone the keyboard needs the room: hide the tab bar. */
  @media (pointer: coarse) {
    .is-typing .tabbar {
      display: none;
    }
    .has-tabbar.is-typing {
      padding-bottom: 0;
    }
    .has-tabbar.has-page-actions.is-typing {
      padding-bottom: calc(var(--actions-h) + var(--safe-bottom));
    }
    .is-typing .page-actions {
      bottom: var(--safe-bottom);
    }
  }

  /* Course search (Quick Game): the matches drop down under the field */
  .course-search {
    position: relative;
  }
  .course-search__results {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: var(--z-sheet);
    margin-top: 2px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-2);
    overflow: hidden;
  }
  .course-search__results[hidden] {
    display: none;
  }
  .course-search__option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-height: var(--tap);
    padding: var(--space-2) var(--space-3);
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .course-search__option:last-child {
    border-bottom: 0;
  }
  .course-search__option:is(:hover, :focus) {
    background: var(--color-surface-sunk);
  }
  .course-search__option small {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
  }
}
