:root {
  color-scheme: dark;
  --bg: #080e17;
  --surface: #101a28;
  --field: #0b1420;
  --ink: #edf5fc;
  --muted: #a9bbc9;
  --gold: #f0c981;
  --gold-dark: #17120b;
  --ice: #9ee7ff;
  --line: #2a4053;
  --green: #9ce5c0;
  --error: #ffb0b5;
  --gutter: clamp(1rem, 4.8vw, 4.8rem);
  --max: 78rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 18rem; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--ice); }
button:disabled { cursor: default; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.1; }
h2 { font-size: clamp(1.38rem, 2.4vw, 1.8rem); letter-spacing: -.025em; }
h3 { font-size: 1.14rem; }
fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
.skip-link { position: absolute; left: 1rem; top: .75rem; z-index: 5; transform: translateY(-200%); background: var(--bg); padding: .5rem 1rem; }
.skip-link:focus { transform: none; }
.shell { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-main { min-height: 75vh; background: radial-gradient(ellipse at 80% 25%, #122239 0, transparent 60%); }
.site-header { position: relative; z-index: 2; background: #080e17; border-bottom: 1px solid var(--line); }
.header-inner { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 4.5rem; gap: 1rem; }
.brand { display: flex; align-items: center; width: max-content; gap: .72rem; color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: -.015em; font-weight: 800; }
.brand b, .footer-inner b { color: var(--gold); padding-inline: .12rem; }
.brand-mark { display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; border: 1px solid #a88a5d; transform: rotate(45deg); }
.brand-mark i { display: block; position: absolute; width: 1rem; height: 2px; background: var(--gold); }
.brand-mark i:last-child { transform: rotate(90deg); background: var(--ice); }
.site-nav { align-self: stretch; display: flex; align-items: stretch; gap: clamp(.5rem, 1.9vw, 1.6rem); }
.site-nav a, .organize-link { text-decoration: none; font-size: .9rem; font-weight: 700; color: var(--muted); }
.site-nav a { display: grid; place-items: center; border-bottom: 2px solid transparent; padding: 0 .32rem; }
.site-nav a:hover, .organize-link:hover { color: var(--ink); }
.site-nav [aria-current="page"] { border-color: var(--gold); color: var(--ink); }
.organize-link { justify-self: end; padding: .45rem .75rem; border: 1px solid var(--line); }
.organize-link[aria-current="page"] { border-color: var(--gold); color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 33rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background-color: #0e2034;
  background-image:
    linear-gradient(90deg, #070e19 1%, #080f1bef 20%, #080f1b9c 47%, transparent 76%),
    linear-gradient(0deg, #080e17 0%, #080e1700 56%),
    url("/hero.jpg");
  background-size: cover;
  background-position: center, center, center 51%;
  border-bottom: 1px solid #345063;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #9ee7ff72, transparent);
  pointer-events: none;
}
.hero-inner, .hero-facts { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.hero-inner { padding-block: clamp(4rem, 8vw, 7rem) clamp(2.9rem, 6vw, 4.8rem); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .62rem;
  font-size: .82rem;
  letter-spacing: .14em;
  font-weight: 800;
  color: var(--ice);
}
.short-rule { display: inline-block; width: 1.55rem; height: 2px; background: var(--gold); }
.hero h1 {
  font-family: "Arial Narrow", Impact, "Segoe UI", sans-serif;
  font-size: clamp(3.65rem, 8vw, 7.4rem);
  line-height: .89;
  letter-spacing: .025em;
  font-weight: 900;
  margin-top: .3em;
  text-shadow: 0 .08em .32em #050a159c;
}
.hero h1 strong { display: inline-block; font-size: 1.22em; color: var(--gold); font-weight: inherit; letter-spacing: .035em; }
.hero h1 em { font-size: .55em; font-style: normal; color: var(--ink); letter-spacing: .01em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; appearance: none; min-height: 2.65rem; padding: .63rem .95rem; text-align: center; text-decoration: none; font-size: .92rem; line-height: 1.2; font-weight: 800; cursor: pointer; border: 1px solid transparent; transition: background-color .18s, border-color .18s, color .18s; }
.button-gold { background: var(--gold); color: var(--gold-dark); border-color: var(--gold); }
.button-gold:hover:not(:disabled) { background: #ffe0a8; border-color: #ffe0a8; }
.button-glass { background: #0d1c2abd; border-color: #60889f; color: var(--ink); }
.button-glass:hover, .button-quiet:hover:not(:disabled) { background: #1c3347; border-color: #7299ae; }
.button-quiet { background: #132234; border-color: #3a5971; color: var(--ink); }
.button-danger { background: #2b1d2a; border-color: #753e55; color: var(--error); }
.button-danger:hover:not(:disabled) { background: #47283a; }
.hero-facts { display: grid; grid-template-columns: .8fr 1fr 1.25fr; border-top: 1px solid #7bb8d14f; padding-block: 1rem 1.1rem; }
.hero-facts > div { padding-inline: clamp(.65rem, 2vw, 1.6rem); border-left: 1px solid #7bb8d14f; }
.hero-facts > div:first-child { padding-left: 0; border: 0; }
.hero-facts dt, .event-facts dt { color: var(--muted); font-size: .85rem; }
.hero-facts dd { font-weight: 800; font-size: clamp(.95rem, 2vw, 1.24rem); }
.hero-facts dd span { color: var(--gold); }

.landing-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(16rem, 1fr); gap: 1.25rem; padding-block: clamp(1.65rem, 5vw, 3.4rem); align-items: start; scroll-margin-top: 1rem; }
.card { position: relative; border: 1px solid var(--line); background: var(--surface); padding: clamp(1.05rem, 2.5vw, 1.75rem); min-width: 0; }
.registration-card::before, .event-card::before { content: ""; width: 3.5rem; height: 2px; position: absolute; top: -1px; left: -1px; background: var(--gold); }
.event-card::before { background: var(--ice); }
.card .eyebrow { margin-bottom: .42rem; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; flex-shrink: 0; gap: .45rem; background: #172637; border: 1px solid #385167; color: #c2d5e4; padding: .24rem .55rem; font-size: .8rem; font-weight: 700; line-height: 1.35; }
.status.open, .status.confirmed { color: var(--green); background: #152c2a; border-color: #3a6156; }
.status.review { color: var(--gold); background: #302517; border-color: #705730; }
.status.ready, .status.picks { color: var(--ice); background: #172d40; border-color: #3a647e; }
.registration-card > .subtle { margin-top: .75rem; }
.subtle { color: var(--muted); }
form { margin-top: 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.field { display: block; min-width: 0; color: var(--ink); font-size: .9rem; font-weight: 700; }
.field + .field:not(.form-grid > .field) { margin-top: .75rem; }
.field .subtle { font-weight: 500; }
.field :is(input, select) { display: block; width: 100%; min-height: 2.7rem; margin-top: .35rem; color: var(--ink); background: var(--field); border: 1px solid #345066; border-radius: 0; padding: .55rem .67rem; font-size: 1rem; font-weight: 400; }
.field input::placeholder { color: #91a7ba; }
.field input:disabled, .field select:disabled { opacity: .7; }
.field input[type="file"] { padding: .4rem .55rem; }
.field input::file-selector-button { font: inherit; font-size: .85rem; margin-right: .55rem; padding: .3rem .5rem; border: 1px solid #3a5971; background: #172b3e; color: var(--ink); cursor: pointer; }
.field select { appearance: none; padding-right: 1.8rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 54%, calc(100% - 9px) 54%; background-size: 5px 5px; background-repeat: no-repeat; }
.wide { grid-column: 1 / -1; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.05rem; }
.check-row { color: var(--muted); font-size: .88rem; }
.check-row input { accent-color: var(--gold); vertical-align: -.12em; margin: 0 .18rem 0 0; width: 1rem; height: 1rem; }
form > .button { margin-top: .85rem; }
.form-message { color: var(--green); margin-top: .75rem; overflow-wrap: anywhere; }
.form-message.error { color: var(--error); }
.event-facts { margin-block: .8rem .95rem; }
.event-facts div { padding: .55rem 0; display: flex; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); }
.event-facts dd { text-align: end; font-weight: 700; font-size: .9rem; }
.event-card .text-link { display: block; width: max-content; max-width: 100%; margin-top: .7rem; font-weight: 700; font-size: .9rem; text-underline-offset: .25em; }
.receipt, .notice { background: #142536; border: 1px solid #42647e; padding: 1rem; }
.receipt { margin-top: 1.15rem; }
.receipt h3 { color: var(--green); margin-bottom: .45rem; }
.receipt p { color: var(--muted); }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: .65rem 0; }
.copy-row code { font-size: 1rem; color: var(--ink); overflow-wrap: anywhere; }
.page-note:not([hidden]) { padding: .7rem var(--gutter); background: #2c1b28; color: var(--error); }

.inner-view { padding-block: clamp(2rem, 6vw, 4rem); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: .85rem; margin-bottom: .75rem; }
.page-heading h1 { font-size: clamp(2.25rem, 6vw, 4.35rem); letter-spacing: -.055em; margin-top: .35rem; }
.rules-grid, .admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.rule-card h2 { font-size: 1.18rem; color: var(--gold); }
.rule-card p { color: var(--muted); margin-top: .55rem; }
.rounds { display: flex; align-items: flex-start; gap: 1rem; margin-top: 1.4rem; padding: .2rem .1rem 1rem; overflow-x: auto; }
.round { flex: 1 0 17.5rem; max-width: 25rem; min-width: 0; }
.round > h2 { font-size: 1.06rem; letter-spacing: .055em; text-transform: uppercase; color: var(--ice); padding-top: .45rem; padding-bottom: .85rem; border-top: 2px solid #57738a; }
.round:last-child > h2 { border-color: var(--gold); color: var(--gold); }
.match-card { border: 1px solid var(--line); background: var(--surface); padding: .8rem; margin-bottom: .7rem; }
.match-card > .card-heading { align-items: center; }
.match-card > .card-heading h3 { color: var(--muted); font-size: .85rem; }
.match-teams { margin-top: .6rem; }
.match-team { display: grid; overflow-wrap: anywhere; gap: .08rem; padding: .45rem .55rem; border-bottom: 1px solid var(--line); }
.match-team.won { color: var(--green); background: #122821; }
.match-team .subtle { font-size: .85rem; }
.match-details { display: grid; gap: .1rem; margin-top: .55rem; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.match-card .button { margin-top: .65rem; width: 100%; }
.champion-banner { margin-top: 1.1rem; color: var(--gold); }
.empty { width: 100%; color: var(--muted); }
.admin-gate { max-width: 34rem; margin-top: 1.5rem; }
.admin-gate .subtle { margin-top: .65rem; }
.admin-gate > .button { margin-top: .8rem; }
.admin-gate details { margin-top: .9rem; }
.admin-gate summary { width: fit-content; font-weight: 700; color: var(--ice); cursor: pointer; }
.team-list { display: grid; gap: .3rem; margin-top: .75rem; max-height: 18rem; overflow: auto; }
.admin-team { padding: .45rem .55rem; background: var(--field); border: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-team span { display: block; color: var(--muted); font-size: .83rem; }
.admin-matches { margin-top: 1.6rem; }
.admin-matches .empty { margin-top: .65rem; }
.admin-match { margin-top: .7rem; border: 1px solid var(--line); background: var(--surface); }
.admin-match summary { padding: .8rem 1rem; cursor: pointer; font-weight: 750; overflow-wrap: anywhere; }
.admin-match summary .status { margin-left: .45rem; vertical-align: .07em; }
.admin-match-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }
.admin-match-body form { margin-top: .65rem; }
.admin-match-body .wide { margin-top: .25rem; }
.admin-match-body h3 { margin-bottom: .55rem; }
.admin-reports { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .65rem; }
.report-card { border: 1px solid var(--line); padding: .65rem; background: var(--field); overflow-wrap: anywhere; }
.report-card .subtle { font-size: .85rem; }
.report-card .button { margin: .55rem .35rem 0 0; }
.evidence-image { display: block; width: 100%; max-height: 60vh; object-fit: contain; margin-top: .55rem; background: #060d15; }
.match-dialog { width: min(100% - 1.5rem, 42rem); max-height: 90dvh; color: var(--ink); background: var(--surface); border: 1px solid #56718a; padding: 0; }
.match-dialog::backdrop { background: #040911c9; }
.dialog-inner { padding: clamp(1rem, 3vw, 1.7rem); }
.dialog-inner .eyebrow { margin-bottom: .3rem; }
.dialog-inner h2 { overflow-wrap: anywhere; }
.dialog-inner form { padding-top: 1rem; border-top: 1px solid var(--line); }
.dialog-inner form :is(.subtle, .form-grid, .field) { margin-top: .5rem; }
.dialog-inner form .field .subtle { margin-top: 0; }
.close-dialog { flex-shrink: 0; }
.site-footer { border-top: 1px solid var(--line); background: #080e17; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding-block: 1.2rem; }
.footer-inner span { color: var(--muted); font-size: .88rem; }

@media (max-width: 49rem) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 .7rem; }
  .brand, .organize-link { margin-top: .72rem; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: .58rem; }
  .site-nav a { padding: .55rem .15rem .42rem; }
  .hero { min-height: 29rem; background-position: center, center, 65% center; }
  .hero-inner { padding-top: 4rem; padding-bottom: 2.9rem; }
  .landing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 35rem) {
  .hero { min-height: 25rem; background-position: center, center, 67% center; }
  .hero h1 { font-size: clamp(3.1rem, 14vw, 4.55rem); }
  .hero-inner { padding-top: 2.85rem; padding-bottom: 2rem; }
  .hero-facts { grid-template-columns: .75fr .9fr 1.15fr; }
  .hero-facts dt { font-size: .79rem; }
  .hero-facts dd { line-height: 1.3; }
  .hero-actions { gap: .48rem; margin-top: 1.15rem; }
  .hero-actions .button { padding-inline: .65rem; font-size: .86rem; }
  .rules-grid, .admin-grid, .admin-match-body { grid-template-columns: 1fr; }
  .rounds { flex-direction: column; gap: .4rem; }
  .round { width: 100%; max-width: none; flex-basis: auto; }
  .form-grid { grid-template-columns: 1fr; gap: .65rem; }
  .footer-inner { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
