:root {
  font-family: system-ui, sans-serif;
  background: #f5f7fa;
  color: #16213a;
  --accent: #174286;
  line-height: 1.55;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #fff; border-bottom: 1px solid #d4dce8; font-weight: 750; }
header .shell { padding-block: 1rem; }
.shell { width: min(calc(100% - 2rem), 68rem); margin-inline: auto; }
main { padding-block: clamp(2rem, 7vw, 5rem); }
h1 { font-size: clamp(1.8rem, 5vw, 2.75rem); line-height: 1.12; letter-spacing: -.025em; }
p { max-width: 68ch; }
button {
  min-height: 44px;
  padding: .6rem 1rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover { filter: brightness(.88); }
button:disabled { opacity: .7; cursor: wait; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .18em; }
nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .65rem; }
.brand { color: inherit; font-size: 1.2rem; text-decoration: none; }
.skip { position: absolute; inset: .5rem auto auto .5rem; padding: .5rem; background: white; }
.skip:not(:focus) { transform: translateY(-150%); }
.form { display: grid; gap: 1.05rem; max-width: 28rem; align-items: start; }
.form button { justify-self: start; }
label { display: grid; gap: .3rem; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid #7b8da8;
  border-radius: .45rem;
  background: white;
  color: inherit;
  font: inherit;
}
.secondary { background: white; color: var(--accent); border-color: #7b8da8; }
.record-list { padding: 0; list-style: none; max-width: 52rem; }
.record-list > li { border-bottom: 1px solid #d4dce8; padding-block: .8rem; }
#notice:empty { margin: 0; }
#notice.error { color: #a22131; }

section { margin-top: 2.5rem; }
.metadata { display: block; color: #46576c; }

.qr { display: block; margin-top: 1rem; max-width: 100%; height: auto; }
.entry-content { margin-top: 1.75rem; }

.review-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.25rem; }

.checkbox { display: flex; align-items: center; gap: .65rem; }
.checkbox input { width: 1.2rem; height: 1.2rem; min-height: 0; }
fieldset { min-width: 0; padding: .75rem; border: 1px solid #7b8da8; border-radius: .45rem; }

.account-actions { display: flex; align-items: center; gap: .85rem; }

:root { color-scheme: light; accent-color: var(--accent); }
::selection { background: var(--accent); color: white; }
nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem 1.5rem; }
.account-actions { grid-column: -2; justify-self: end; }
#brand-context { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-width: 0; }
#brand-context img { width: clamp(10rem, 23vw, 16rem); max-width: 100%; height: auto; }
.brand-mark:empty { display: none; }
.brand-mark img { display: block; }
.brand-label { overflow-wrap: anywhere; }
.prototype-note { display: none; color: #46576c; font-size: .84rem; }
[data-mark="mec_2026"] .prototype-note { display: inline; }
.brand-preview { max-width: min(100%, 20rem); height: auto; }
input[type="color"] { width: 8rem; padding: .25rem; }
.workspace-links { display: flex; gap: .5rem 1.25rem; flex-wrap: wrap; }
.workspace-links a, #session-settings, #notice-link { padding-block: .6rem; }
#notice-link { white-space: nowrap; }
#notice-count { font-variant-numeric: tabular-nums; font-size: .85em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 40rem) {
  nav { grid-template-columns: auto minmax(0, 1fr); }
  #brand-context { grid-column: 1 / -1; grid-row: 2; }
  .account-actions { grid-row: 1; }
}

.metrics-counts { display: flex; flex-wrap: wrap; gap: .75rem 2rem; padding-block: 1rem; border-block: 1px solid #d4dce8; }
.metrics-counts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.audit-filters > label, .audit-filters input { min-width: 0; }
@media (max-width: 40rem) {
  .audit-filters { grid-template-columns: minmax(0, 1fr); }
}
.audit-entry { overflow-wrap: anywhere; }
.audit-entry dl { display: grid; gap: .4rem; }
.audit-entry dd { margin: 0; }
.audit-entry dt { font-weight: 600; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}
.photo-grid li { min-width: 0; border-top: 1px solid #d4dce8; padding-block: .75rem; overflow-wrap: anywhere; }
.photo-grid img { display: block; width: 100%; height: min(11rem, 55vw); object-fit: contain; background: white; }
.photo-grid strong, .photo-grid a { display: block; padding-block: .55rem; }

.external-player { display: block; width: min(100%, 35rem); min-height: 200px; aspect-ratio: 16 / 9; border: 0; }

.event-player { display:block; max-width:min(100%, 48rem); width:100%; background:#16213a; aspect-ratio:16/9; }

.match-preview { display: block; max-width: min(100%, 24rem); height: auto; }
.match-preview[hidden] { display: none; }

.cut-model-choice { display: block; margin: .75rem 0; }
.cut-model-preview { display: grid; align-content: space-between; aspect-ratio: 16 / 9; width: min(100%, 18rem); background: #283651; color: #fff; padding: .6rem; }
.cut-model-preview span { font-size: .75rem; }
.cut-model-preview p { margin: .2rem 0; }
.cut-model-preview.centered div { text-align: center; background: #101521; padding: .35rem; }

.cut-vertical { max-height: min(70vh, 38rem); width: auto; max-width: 100%; }

.correction-source { object-fit: contain; background: #080a0d; aspect-ratio: 16 / 9; }
.correction-source.correction-portrait { aspect-ratio: 9 / 16; width: min(100%, 16rem); }
