:root {
  color-scheme: light;
  --white: #fff;
  --surface: #f7f7f8;
  --ink: #111;
  --muted: #666;
  --rule: #d6d6d8;
  --blue: #002fa7;
  --green: #008f4c;
  --rail: 19rem;
  --header: 5rem;
  --preview-banner: 2.5rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --white: #0b0d12;
  --surface: #151821;
  --ink: #f7f7f8;
  --muted: #a9acb5;
  --rule: #343844;
  --blue: #82a7ff;
  --green: #5ee09b;
}

* { box-sizing: border-box; }
html { min-width: 20rem; }
body { margin: 0; min-height: 100vh; background: var(--white); font-size: 1rem; }
button, input, select { font: inherit; }
a { color: inherit; }
button { color: inherit; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--blue); color: var(--white); padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon { display: block; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; }

.preview-banner {
  position: fixed; inset: 0 0 auto 0; z-index: 60; min-height: var(--preview-banner); display: flex; align-items: center;
  justify-content: center; gap: .75rem; padding: .55rem 1.25rem; background: var(--blue); color: var(--white); text-align: center;
}
.preview-banner strong { text-transform: uppercase; letter-spacing: .08em; }
.preview-banner span { font-size: .875rem; }

.masthead {
  position: fixed; inset: var(--preview-banner) 0 auto 0; z-index: 30; height: var(--header); display: flex; align-items: center;
  gap: 1.25rem; padding: 0 1.5rem; background: var(--white); border-bottom: 1px solid var(--rule);
  box-shadow: 0 3px 8px rgb(0 0 0 / 12%);
}
.brand { font-size: 1.8rem; letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.version { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.back-button, .menu-button, .icon-button { border: 0; background: transparent; cursor: pointer; }
.back-button { padding: .45rem; }
.back-button svg, .disclosure svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; }
.breadcrumbs { display: flex; align-items: center; gap: 1.25rem; color: var(--blue); text-transform: lowercase; }
.breadcrumbs a { text-decoration: none; }
.session-preview { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-variant-numeric: tabular-nums; }
.session-email { max-width: 14rem; overflow: hidden; color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.exercise-badge, .utc-clock { padding: .65rem .85rem; border: 1px solid var(--blue); color: var(--blue); }
.exercise-badge { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utc-clock { color: var(--green); border-color: var(--green); min-width: 6.8rem; text-align: center; }
.menu-button { display: none; width: 2.5rem; padding: .5rem; }
.menu-button span { display: block; height: 2px; margin: 5px 0; background: var(--ink); }

.side-rail {
  position: fixed; z-index: 20; left: 0; top: calc(var(--preview-banner) + var(--header)); bottom: 0; width: var(--rail); display: flex; flex-direction: column;
  background: var(--white); border-right: 1px solid var(--rule); padding: 1.3rem 1.4rem 1rem;
}
.primary-nav { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: .2rem; overflow-y: auto; scrollbar-gutter: stable; }
.nav-entry { position: relative; display: grid; grid-template-columns: 1fr 2.5rem; }
.nav-link { min-height: 3.45rem; display: flex; align-items: center; gap: 1.8rem; padding: .6rem .7rem; text-decoration: none; font-weight: 500; border-left: 3px solid transparent; }
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: var(--blue); border-left-color: var(--blue); background: var(--surface); }
.disclosure { grid-column: 2; grid-row: 1; border: 0; background: transparent; cursor: pointer; transition: transform 160ms ease; }
.disclosure[aria-expanded="true"] { transform: rotate(180deg); }
.disclosure.disabled { display: grid; place-items: center; color: var(--muted); cursor: help; }
.submenu { grid-column: 1 / -1; margin: 0 0 .35rem; }
.submenu a { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem .7rem .65rem 4.3rem; color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 500; }
.submenu a:hover { background: var(--surface); }
.submenu a[aria-current="page"] { color: var(--blue); background: var(--surface); }
.submenu .icon { width: 2rem; height: 2rem; }
.rail-footer { flex: 0 0 auto; margin-top: auto; display: grid; gap: .2rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.theme-selector { display: grid; grid-template-columns: 1.75rem 1fr auto; gap: 1.8rem; }
.theme-selector:hover { color: var(--blue); }
.theme-switch { position: relative; display: inline-flex; flex: 0 0 auto; }
.theme-switch input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; }
.theme-switch-track { width: 2.6rem; height: 1.45rem; display: flex; align-items: center; padding: .2rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); transition: border-color 160ms ease, background 160ms ease; }
.theme-switch-track span { width: .95rem; height: .95rem; display: block; border-radius: 50%; background: var(--muted); transition: background 160ms ease, transform 160ms ease; }
.theme-selector:hover .theme-switch-track { border-color: var(--blue); }
.theme-switch input:checked + .theme-switch-track { border-color: var(--blue); background: var(--blue); }
.theme-switch input:checked + .theme-switch-track span { background: var(--white); transform: translateX(1.1rem); }
.theme-switch input:focus-visible + .theme-switch-track { outline: 3px solid var(--blue); outline-offset: 3px; }
.logout-form { width: 100%; margin: 0; }
.rail-action { width: 100%; appearance: none; border-top: 0; border-right: 0; border-bottom: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.rail-action:hover { color: var(--blue); }
.drawer-scrim { display: none; }

.content { margin-left: var(--rail); padding-top: calc(var(--preview-banner) + var(--header)); min-height: 100vh; }
h1 { margin: 0; font-size: clamp(2.6rem, 7vw, 6rem); font-weight: 400; letter-spacing: -.055em; line-height: .92; }
.empty-state { margin: 0 5vw; padding: 4rem 0; max-width: 42rem; }
.page-placeholder { margin-right: auto; margin-left: auto; text-align: center; }
.empty-state-image { display: block; width: min(100%, 30rem); height: auto; margin: 2rem auto; border: 1px solid var(--rule); }
.empty-state h2, .empty-state h3 { margin: 0 0 1rem; font-size: 1.4rem; font-weight: 500; }
.empty-state p { color: var(--muted); line-height: 1.6; margin: 0; }
.home-intro { max-width: 42rem; margin: 0 auto; padding: 3rem 1.25rem 0; }
.home-intro h2 { margin: 0 0 .75rem; font-size: 1.4rem; font-weight: 500; }
.home-intro p { margin: 0 0 .75rem; color: var(--muted); line-height: 1.6; }
.home-intro ul { margin: 0; padding-left: 1.25rem; line-height: 1.8; }
.home-intro a { color: var(--blue); }

.page-toolbar { min-height: 5rem; display: flex; align-items: center; gap: 1.5rem; padding: 1rem 2rem; border-bottom: 1px solid var(--rule); }
.page-toolbar h1 { font-size: 1.75rem; letter-spacing: -.025em; line-height: 1; }
.scoring-toolbar { justify-content: space-between; }
.scoring-actions { display: flex; align-items: center; gap: .75rem; }
.scoring-actions .icon-button { color: var(--ink); }
.scoring-categories-link { color: var(--ink); font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.scoring-categories-link:hover, .scoring-categories-link:focus-visible, .scoring-actions .icon-button:hover { color: var(--blue); }
.scoring-results { padding-top: 3rem; }
.scoring-table-region { width: 100%; overflow-x: auto; outline: 0; }
.scoring-table-region:focus-visible { box-shadow: inset 0 0 0 3px var(--blue); }
.scoring-table { width: 100%; min-width: 106rem; color: var(--ink); }
.scoring-table col.score-rank-column { width: 4rem; }
.scoring-table col.score-team-column { width: 9rem; }
.scoring-table col.score-technical-column { width: 9rem; }
.scoring-table col.score-awareness-column { width: 8rem; }
.scoring-table col.score-forensics-column { width: 8rem; }
.scoring-table col.score-non-technical-column { width: 8rem; }
.scoring-table col.score-total-column { width: 8rem; }
.scoring-table th { height: 3.15rem; font-weight: 700; white-space: nowrap; }
.scoring-table .scoring-groups th { border-top: 0; border-bottom-color: var(--ink); color: var(--ink); font-size: .78rem; text-align: center; }
.scoring-table .scoring-groups th + th { border-left: 1px solid var(--ink); }
.scoring-table .scoring-columns th { text-align: left; }
.scoring-table .scoring-columns th:nth-child(3),
.scoring-table .scoring-columns th:nth-child(8),
.scoring-table .scoring-columns th:nth-child(11),
.scoring-table .scoring-columns th:nth-child(12),
.scoring-table .scoring-columns th:nth-child(18) { border-left: 1px solid var(--ink); }
.scoring-table tbody td { font-variant-numeric: tabular-nums; }
.scoring-table tbody th { font-weight: 700; }
.scoring-table tbody td:last-child { border-left: 1px solid var(--ink); font-weight: 700; }
.scoring-average-row th, .scoring-average-row td { border-top: 2px solid var(--ink); background: var(--surface); font-weight: 700; }
.page-toolbar-with-tools { display: grid; grid-template-columns: minmax(10rem, auto) minmax(15rem, 1fr) auto; }
.search-form { display: flex; align-items: center; max-width: 32rem; border-bottom: 1px solid transparent; }
.search-form:focus-within { border-color: var(--blue); }
.search-form input { width: 100%; border: 0; padding: .75rem; background: transparent; font-size: 1.15rem; outline: 0; }
.icon-button { display: grid; place-items: center; padding: .65rem; }
.icon-button:hover { color: var(--blue); background: var(--surface); }
.toolbar-actions { display: flex; align-items: center; gap: 1rem; }
.outline-button { padding: .65rem 1rem; border: 1px solid var(--blue); background: var(--white); color: var(--blue); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
.outline-button:hover, .outline-button[aria-expanded="true"] { background: var(--blue); color: var(--white); }
.text-action { display: flex; align-items: center; gap: .35rem; border: 0; background: transparent; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
.text-action .icon { width: 1rem; height: 1rem; }
.filter-panel { padding: 1.5rem 2rem; border-bottom: 1px solid var(--rule); background: var(--surface); }
.filter-panel h2 { margin: 0 0 .5rem; font-size: 1rem; }
.filter-panel p { margin: 0; color: var(--muted); }
.filter-fields { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.filter-fields label { display: grid; gap: .45rem; min-width: 13rem; font-size: .85rem; font-weight: 600; }
.filter-fields select { min-height: 2.75rem; padding: .5rem 2rem .5rem .65rem; border: 1px solid var(--ink); border-radius: 0; background: var(--white); }
.filter-fields input { min-height: 2.75rem; padding: .5rem .65rem; border: 1px solid var(--ink); border-radius: 0; background: var(--white); }
.results { padding: 3rem 2rem; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); }
.results-heading h2 { margin: 0; font-size: 1.5rem; font-weight: 400; }
.results-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.results-heading span { color: var(--muted); font-variant-numeric: tabular-nums; }
.empty-state.compact { margin: 0; padding: 5rem 0; }
.availability-table-wrap { overflow-x: auto; border-bottom: 1px solid var(--ink); }
.availability-table { width: 100%; min-width: 60rem; border-collapse: collapse; font-size: .92rem; }
.availability-table th, .availability-table td { padding: 1rem .8rem; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; }
.availability-table th:last-child, .availability-table td:last-child { border-right: 0; }
.availability-table thead th { background: var(--surface); color: var(--muted); font-size: .72rem; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.availability-table tbody th { font-weight: 400; }
.availability-table tbody tr:hover { background: var(--surface); }
.availability-table .numeric, .availability-table time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.collaboration-toolbar { grid-template-columns: auto minmax(14rem, 1fr) auto auto; }
.collaboration-toolbar .search-form { max-width: 28rem; }
.collaboration-summary { display: flex; align-items: center; gap: 2rem; }
.send-points-button { min-height: 3rem; padding: .65rem 1rem; border: 1px solid var(--rule); background: var(--white); box-shadow: 0 2px 6px rgb(0 0 0 / 16%); font-weight: 600; letter-spacing: .11em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.send-points-button span { font-variant-numeric: tabular-nums; }
.send-points-button:hover { border-color: var(--blue); color: var(--blue); }
.showing-count { font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.collaboration-results { padding-top: 0; }
.collaboration-data-note { margin: 0; padding: .8rem 0; color: var(--muted); font-size: .78rem; }
.collaboration-table { min-width: 64rem; }
.collaboration-table th:nth-child(1), .collaboration-table th:nth-child(2) { width: 14%; }
.collaboration-table th:nth-child(3) { width: 11%; }
.collaboration-table th:nth-child(4) { width: 11%; }
.collaboration-table th:nth-child(6) { width: 16%; }
.collaboration-table thead th { background: var(--white); text-transform: none; letter-spacing: 0; font-size: .78rem; }
.collaboration-row { cursor: pointer; }
.collaboration-row:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.collaboration-row[aria-expanded="true"] { background: var(--surface); }
.collaboration-reason { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collaboration-detail td { padding: 0 !important; background: var(--surface); border-bottom-color: var(--ink); }
.collaboration-detail dl { display: grid; grid-template-columns: repeat(4, minmax(7rem, 1fr)); margin: 0; padding: 1.5rem 2rem; gap: 1.25rem 2rem; }
.collaboration-detail dl > div { display: grid; gap: .35rem; }
.collaboration-detail .detail-reason { grid-column: 1 / -2; }
.collaboration-detail dt { color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.collaboration-detail dd { margin: 0; line-height: 1.45; }
.credentials-table { min-width: 52rem; }
.credentials-table th:first-child { width: 25%; }
.systems-table { min-width: 76rem; }
.systems-table th:first-child { width: 22%; }
.systems-table .system-id { font-weight: 600; }
.zone-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.zone-list span { display: inline-flex; align-items: center; min-height: 1.65rem; padding: .15rem .5rem; border: 1px solid var(--ink); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.network-cell { min-width: 20rem; padding-top: .6rem !important; padding-bottom: .6rem !important; }
.network-record { display: grid; grid-template-columns: 6.75rem 1fr; gap: .2rem .75rem; padding: .4rem 0; }
.network-record + .network-record { border-top: 1px solid var(--rule); }
.network-record strong { grid-row: 1 / span 2; align-self: start; font-size: .82rem; }
.network-record > span { display: flex; align-items: baseline; gap: .55rem; min-width: 0; }
.network-record code { font: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.address-label { flex: 0 0 2rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.team-id { font-size: 1.1rem; font-weight: 700; }
.credential-cell-content { align-items: center; gap: .65rem; }
.username-cell-content { display: flex; min-width: 12rem; }
.password-cell-content { display: grid; grid-template-columns: auto minmax(8rem, 1fr) auto; min-width: 15rem; }
.password-cell-content > span { letter-spacing: .025em; }
.credential-copy-button, .credential-edit-button { display: grid; flex: 0 0 auto; place-items: center; width: 2rem; height: 2rem; border: 0; background: var(--white); color: var(--ink); cursor: pointer; }
.credential-copy-button .icon, .credential-edit-button .icon { width: 1rem; height: 1rem; }
.credential-copy-button:hover, .credential-copy-button:focus-visible, .credential-edit-button:hover, .credential-edit-button:focus-visible { background: var(--ink); color: var(--white); }
.credential-service a { color: var(--blue); text-underline-offset: .2em; }
.credential-dialog { width: min(32rem, calc(100% - 2rem)); border: 1px solid var(--ink); padding: 0; background: var(--white); color: var(--ink); }
.credential-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.credential-dialog form { padding: 2rem; }
.credential-dialog header { margin: -2rem -2rem 2rem; padding: 1.5rem 2rem; border-bottom: 1px solid var(--ink); }
.credential-dialog header p { margin: 0 0 .4rem; color: var(--blue); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.credential-dialog h2 { margin: 0; overflow-wrap: anywhere; font-size: 1.5rem; font-weight: 400; }
.credential-dialog label { display: block; margin-bottom: .5rem; font-weight: 600; }
.credential-dialog input { width: 100%; min-height: 3rem; border: 0; border-bottom: 1px solid var(--ink); padding: .65rem 0; background: transparent; color: var(--ink); font: inherit; outline: 0; }
.credential-dialog input:focus { border-bottom: 3px solid var(--blue); }
.send-points-dialog select, .send-points-dialog textarea { width: 100%; min-height: 3rem; padding: .65rem 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; outline: 0; }
.send-points-dialog textarea { resize: vertical; }
.send-points-dialog select:focus, .send-points-dialog textarea:focus { border-bottom: 3px solid var(--blue); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 2rem; }

.auth-page { min-height: 100vh; padding-top: var(--preview-banner); }
.auth-masthead { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; border-bottom: 1px solid var(--rule); }
.auth-masthead > span { color: var(--muted); }
.auth-layout { min-height: calc(100vh - 5rem - var(--preview-banner)); display: grid; grid-template-columns: minmax(22rem, 3fr) minmax(20rem, 2fr); }
.auth-form-panel { padding: clamp(2rem, 6vw, 6rem); }
.auth-form-panel h1 { max-width: 8ch; margin-bottom: 3rem; }
.login-layout { display: block; }
.login-layout .auth-form-panel { width: min(100%, 42rem); margin: 0 auto; padding-top: clamp(3rem, 10vh, 7rem); }
.login-layout .auth-form-panel h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.auth-folio { margin: 0 0 1rem; color: var(--blue); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.auth-form { max-width: 34rem; }
.field { margin-bottom: 1.6rem; }
.field label { display: block; margin-bottom: .5rem; font-weight: 500; }
.field input, .field select { width: 100%; min-height: 3.2rem; padding: .65rem 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: var(--white); outline: 0; }
.field input:focus, .field select:focus { border-bottom: 3px solid var(--blue); }
.field [aria-invalid="true"] { border-bottom-color: var(--blue); }
.field-error, .form-error { color: var(--blue); }
.field-error { margin: .5rem 0 0; font-size: .9rem; }
.form-error { max-width: 34rem; padding: 1rem; border: 1px solid currentColor; }
.primary-button { min-height: 3.3rem; padding: .75rem 1.4rem; border: 1px solid var(--blue); background: var(--blue); color: var(--white); cursor: pointer; }
.primary-button:hover { background: var(--white); color: var(--blue); }
.oauth-signin { max-width: 34rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.oauth-signin p { margin: 0 0 2rem; color: var(--muted); line-height: 1.5; }
.oauth-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.auth-switch { margin: 2rem 0 0; }
.auth-switch a { color: var(--blue); }
.team-preview { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: clamp(2rem, 5vw, 5rem); background: var(--blue); color: var(--white); }
.team-preview > span { border-top: 1px solid rgb(255 255 255 / 55%); padding-top: 1rem; }
.team-preview strong { overflow-wrap: anywhere; font-size: clamp(3rem, 7vw, 7rem); font-weight: 400; letter-spacing: -.06em; line-height: .9; }
.team-preview p { max-width: 24rem; margin: 0; line-height: 1.5; }
.configuration-message { max-width: 34rem; padding: 1.5rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.configuration-message h2 { margin: 0 0 .75rem; font-size: 1.3rem; }
.configuration-message p { margin: 0; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
  :root { --header: 4.25rem; }
  .menu-button { display: block; }
  .masthead { gap: .8rem; padding: 0 1rem; }
  .brand { font-size: 1.4rem; }
  .version, .back-button, .breadcrumbs, .session-email, .exercise-badge { display: none; }
  .utc-clock { padding: .45rem .55rem; min-width: 6rem; font-size: .85rem; }
  .side-rail { top: var(--preview-banner); width: min(22rem, 88vw); z-index: 50; transform: translateX(-102%); transition: transform 180ms ease; box-shadow: 5px 0 15px rgb(0 0 0 / 12%); padding-top: 5rem; }
  body.drawer-open .side-rail { transform: translateX(0); }
  .drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 35%); }
  body.drawer-open .drawer-scrim { display: block; }
  body.drawer-open { overflow: hidden; }
  .content { margin-left: 0; }
  .empty-state { margin: 0 1.25rem; }
  .page-placeholder { margin-right: auto; margin-left: auto; padding-right: 1.25rem; padding-left: 1.25rem; }
  .page-toolbar { padding: 1rem 1.25rem; }
  .scoring-toolbar { flex-wrap: wrap; }
  .page-toolbar-with-tools { grid-template-columns: 1fr auto; gap: 1rem; }
  .collaboration-toolbar { grid-template-columns: 1fr auto; }
  .collaboration-summary { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .collaboration-toolbar .search-form { grid-row: 3; max-width: none; }
  .collaboration-toolbar .toolbar-actions { grid-row: 1; }
  .page-toolbar-with-tools h1 { grid-column: 1; }
  .search-form { grid-column: 1 / -1; grid-row: 2; max-width: none; border-bottom-color: var(--rule); }
  .toolbar-actions { grid-column: 2; grid-row: 1; }
  .text-action { font-size: 0; }
  .text-action .icon { width: 1.5rem; height: 1.5rem; }
  .filter-panel, .results { padding-left: 1.25rem; padding-right: 1.25rem; }
  .auth-layout { grid-template-columns: 1fr; }
  .team-preview { min-height: 18rem; }
}

@media (max-width: 520px) {
  :root { --preview-banner: 3.75rem; }
  .preview-banner { align-items: flex-start; gap: .25rem; flex-direction: column; text-align: left; }
  .page-toolbar-with-tools { grid-template-columns: 1fr; }
  .scoring-toolbar { align-items: flex-start; }
  .scoring-actions { width: 100%; justify-content: space-between; }
  .page-toolbar-with-tools h1, .toolbar-actions, .search-form { grid-column: 1; }
  .toolbar-actions { grid-row: 2; justify-content: space-between; }
  .search-form { grid-row: 3; }
  .collaboration-summary { grid-row: 2; flex-wrap: wrap; gap: .75rem; }
  .collaboration-toolbar .toolbar-actions { grid-row: 3; }
  .collaboration-toolbar .search-form { grid-row: 4; }
  .collaboration-detail dl { grid-template-columns: 1fr 1fr; padding: 1.25rem; }
  .collaboration-detail .detail-reason { grid-column: 1 / -1; }
  .auth-masthead { min-height: 4.25rem; padding: 0 1.25rem; }
  .auth-masthead > span { display: none; }
  .auth-layout { min-height: calc(100vh - 4.25rem - var(--preview-banner)); }
  .auth-form-panel, .team-preview { padding: 2rem 1.25rem; }
  .login-layout .auth-form-panel { padding-top: 3rem; }
  .auth-form-panel h1 { margin-bottom: 2rem; }
  .team-preview strong { font-size: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
