:root {
  color-scheme: light;
  --ink: #071a33;
  --muted: #425466;
  --line: #d5dee9;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --navy: #071a33;
  --navy-2: #0c2444;
  --navy-ink: #e8f1fb;
  --accent: #1688ff;
  --accent-strong: #0b6fe0;
  --accent-soft: rgba(22, 136, 255, 0.16);
  --teal: var(--accent-strong);
  --teal-ink: #ffffff;
  --danger: #b91c1c;
  --ok: #e8f6ee;
  --warn: #fff4e5;
  --shadow: 0 1px 2px rgba(7, 26, 51, 0.06);
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
}

a { color: var(--accent-strong); }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: white;
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  z-index: 40;
}
.skip:focus { top: 0.75rem; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 16.75rem minmax(0, 1fr);
}

.sidenav {
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  color: var(--navy-ink);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 0.85rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: grid;
  gap: 0.15rem;
  color: white;
  text-decoration: none;
  padding: 0.15rem 0.45rem 0.85rem;
}

.brand .logo {
  height: 2.15rem;
  width: auto;
  max-width: 100%;
  display: block;
}

.brand .logo-dark { display: none; }

.sidenav .logo-light,
.login-card .logo-light { display: none; }

.sidenav .logo-dark,
.login-card .logo-dark {
  display: block;
  height: 1.85rem;
}

.sidenav .brand,
.login-card .brand { gap: 0.4rem; }

.sidenav .brand-product,
.login-card .brand-product {
  padding-left: 2.05rem;
  color: #9ec3e4;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.login-card .brand-product { padding-left: 2.44rem; }

.brand-product {
  color: #a8b8c9;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-kicker {
  margin: 0.85rem 0.45rem 0.25rem;
  color: #a8b8c9;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidenav nav { display: grid; gap: 0.2rem; }

.sidenav nav a {
  color: #d7e6ec;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-weight: 650;
}

.sidenav nav a:hover { background: rgba(255, 255, 255, 0.06); }

.sidenav nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: white;
  box-shadow: inset 3px 0 0 var(--accent);
}

.signout { margin-top: auto; padding-top: 1rem; }

.signout button {
  width: 100%;
  background: transparent;
  color: #d7e6ec;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.signout button:hover { background: rgba(255, 255, 255, 0.08); }

.workspace { min-width: 0; }

.workspace-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.25rem;
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.workspace-bar p { margin: 0; font-weight: 700; }
.workspace-bar .role {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-toggle { display: none; }

.canvas {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.4rem 0 3rem;
  overflow-x: auto;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.55rem; letter-spacing: -0.02em; }
h1 { font-size: 1.8rem; }

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.lede, .meta, .fine, .preview-meta { color: var(--muted); }
.lede { max-width: 42rem; }

.page-head, .actions, .row-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.panel, .preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
  margin: 0.9rem 0;
}

.narrow { max-width: 28rem; margin-left: auto; margin-right: auto; }

.stack { display: grid; gap: 0.85rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
label, .field { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 650; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: white;
}

textarea { resize: vertical; }

label.invalid input, label.invalid textarea, label.invalid select,
.field.invalid input, .field.invalid select, .choice.invalid { border-color: var(--danger); }

.field-error { color: var(--danger); font-weight: 650; font-size: 0.82rem; }

button, .button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--teal-ink);
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

button:hover, .button:hover { background: #0958b8; }
button.quiet:hover, .button.quiet:hover { background: #f4f8fa; }

form.stack > button,
.narrow > form > button,
.narrow form.stack > button { width: 100%; }

button.quiet, .button.quiet { background: white; color: var(--accent-strong); border: 1px solid var(--line); }
button.danger { background: white; color: var(--danger); border: 1px solid #e4c4c1; }
button.linkish {
  background: none;
  color: var(--accent-strong);
  padding: 0;
  border-radius: 0;
  font-weight: 650;
}

.banner {
  background: var(--warn);
  border: 1px solid #f0d7b0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin: 0.8rem 0;
}

.banner.ok { background: var(--ok); border-color: #b7e0c8; }
.banner p { margin: 0.2rem 0; }

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e7eef3;
}

.status-open, .status-assigned { background: #d9f0e4; color: #145c32; }
.status-pending { background: #efe4c8; color: #5c4a12; }
.status-waitlisted { background: #e7eef8; color: #1d3f73; }
.status-not_selected, .status-withdrawn, .status-closed, .status-archived { background: #eceff2; color: #5c5348; }
.status-draft { background: #e7eef8; color: #1d3f73; }
.status-scheduled { background: #efe4c8; color: #5c4a12; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hero { margin-bottom: 1.1rem; }
.hero h1 { font-size: 2.15rem; max-width: 16ch; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.role-card {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.role-card:hover { border-color: var(--accent); }
.role-card h2 { margin-bottom: 0.2rem; }
.role-card p:last-child { margin: 0; color: var(--muted); }

.event-table {
  width: 100%;
  min-width: 52rem;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.event-table th, .event-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.event-table th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f7fafc;
}

.event-table tbody tr:hover td { background: #f7fbff; }
.event-table tr:last-child td { border-bottom: 0; }
.event-table tfoot th, .event-table tfoot td { font-weight: 700; background: #f7fafc; }
.event-table .money { font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty, .empty-inline { padding: 1.25rem 0; color: var(--muted); }

.position-card { margin-bottom: 0.8rem; }
.position-preview { list-style: none; padding: 0; margin: 0 0 1rem; }
.position-preview li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }

.stats, .position-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.7rem; }
.position-links { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.stat, .position-link {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  box-shadow: var(--shadow);
}
.position-link { text-decoration: none; color: inherit; display: block; }
.position-link:hover { border-color: var(--accent); }
.stat strong { display: block; font-size: 1.4rem; letter-spacing: -0.03em; }
.stat span, .position-link .lede { color: var(--muted); font-size: 0.78rem; }

.detail { display: grid; gap: 0.7rem; margin: 0; }
.detail .row, div.row { display: grid; gap: 0.15rem; }
.detail dt, dt { color: var(--muted); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.detail dd, dd { margin: 0; }
dl { display: grid; gap: 0.7rem; margin: 0; }

.history { padding-left: 1.1rem; }
.history li { margin: 0.35rem 0; }
.button[aria-disabled="true"] { opacity: 0.72; pointer-events: none; }

.roster-board { display: grid; gap: 0.9rem; }
.roster-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: var(--shadow);
}
.roster-column header { grid-column: 1 / -1; }
.roster-column h3, .roster-column h4 { margin: 0 0 0.35rem; }
.roster-column header p { margin: 0.15rem 0; color: var(--muted); }
.roster-drop, .roster-source {
  min-height: 7rem;
  border: 1px dashed #b7c6d1;
  border-radius: 10px;
  padding: 0.65rem;
  background: #f8fbfc;
}
.roster-drop.over, .roster-source.over { border-color: var(--accent); background: var(--ok); }
#roster-unassign-form { display: none; }
.roster-card {
  display: grid;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  margin: 0.45rem 0;
  background: white;
}
.roster-card[draggable="true"] { cursor: grab; }
.roster-card span, .choice small, .choice .meta { color: var(--muted); font-weight: 550; }
.roster-card form { margin-top: 0.35rem; }
#roster-drop-form { display: none; }

.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1rem 0; }
.steps li { border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.65rem; color: var(--muted); font-size: 0.82rem; background: white; }
.steps li.done { color: var(--ink); }
.steps li[aria-current="step"] { background: var(--navy); color: white; border-color: var(--navy); }

.choices { display: grid; gap: 0.6rem; }
.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font-weight: 650;
}
.choice input { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; accent-color: var(--accent-strong); }
.choice span { display: grid; gap: 0.15rem; font-weight: 550; }
.choice strong { font-weight: 750; }
.privacy { font-size: 0.92rem; color: var(--muted); }

.requests { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.requests li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfc;
}
.requests form { margin: 0; }

code {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  background: #f4f7f9;
  border-radius: 6px;
}

.login-body {
  min-height: 100vh;
  background: #050e1c;
}

.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(22rem, 30rem);
}

.login-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #050e1c;
}

.login-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 14, 28, 0) 62%, rgba(5, 14, 28, 0.55) 100%);
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 2.6rem 2.1rem;
  background: linear-gradient(180deg, #0c2444 0%, #071a33 100%);
  color: var(--navy-ink);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.login-card .brand { color: white; padding: 0 0 1.15rem; }
.login-card .logo-dark { height: 2.2rem; }
.login-card h1 { color: white; font-size: 2rem; margin-bottom: 0.35rem; }
.login-card .eyebrow { color: #5eb0ff; }
.login-card .lede { color: #b7c9d2; margin-top: 0; margin-bottom: 1rem; }
.login-card label { color: #d7e6ec; }
.login-card input {
  background: white;
  color: var(--ink);
  border-color: transparent;
}
.login-card form.stack { margin-top: 0.4rem; }
.login-help { margin: 0.9rem 0 0; font-size: 0.92rem; }
.login-help a { color: #9fd0ff; }

.login-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 1.35rem;
}

.login-switch a {
  text-align: center;
  text-decoration: none;
  color: #d7e6ec;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
  font-weight: 650;
  font-size: 0.88rem;
}

.login-switch a:hover { background: rgba(255, 255, 255, 0.06); }

.login-switch a[aria-current="page"] {
  background: var(--accent-soft);
  color: white;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.intro-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
  gap: 2rem;
  align-items: start;
}

.intro-split .panel { margin-top: 0; }

.record-list {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.gate { background: var(--paper); }

.gate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.4rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.gate-bar .brand { padding: 0; color: var(--ink); }
.gate-bar .brand-product { color: var(--muted); }
.gate-bar .logo { height: 2.35rem; max-width: min(16rem, 68vw); }

.gate-nav { display: flex; align-items: center; gap: 0.85rem; }
.gate-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.gate-nav .button { color: #fff; }

.gate-hero {
  display: grid;
  grid-template-columns: minmax(20rem, 38rem) minmax(0, 1fr);
  min-height: 34rem;
  background: var(--navy);
  color: var(--navy-ink);
}

.gate-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem 3.4rem;
}

.gate-copy .eyebrow { color: #5eb0ff; }
.gate-copy h1 {
  color: #fff;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  max-width: 12ch;
  margin-bottom: 0.75rem;
}
.gate-copy .lede { color: #c5d4e0; font-size: 1.05rem; max-width: 34rem; }
.gate-copy .actions { margin-top: 0.4rem; }
.gate-copy .button.quiet {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}
.gate-copy .button.quiet:hover { background: rgba(255, 255, 255, 0.08); }

.gate-photo { position: relative; min-height: 22rem; overflow: hidden; }
.gate-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% center;
}
.gate-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 26, 51, 0.62), rgba(7, 26, 51, 0) 32%);
}

.gate-band, .gate-record {
  width: min(1120px, calc(100% - 2.5rem));
  margin-left: auto;
  margin-right: auto;
}

.gate-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: -2.1rem;
  position: relative;
}

.gate-card {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.3rem;
  box-shadow: 0 12px 32px rgba(7, 26, 51, 0.08);
  color: inherit;
  text-decoration: none;
}

.gate-card:hover { border-color: var(--accent); }
.gate-card h2 { font-size: 1.15rem; }
.gate-card p:last-child { margin: 0; color: var(--muted); }

.gate-record {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: 2.4rem;
  margin-bottom: 3rem;
}

.gate-record h2 { max-width: 16ch; }
.gate-record ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.gate-record li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.nav-scrim { display: none; }

@media (max-width: 860px) {
  .shell { display: block; }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(7, 26, 51, 0.48);
  }
  .nav-scrim[hidden] { display: none; }
  .sidenav {
    position: fixed;
    z-index: 20;
    width: min(18rem, 88vw);
    transform: translateX(-105%);
    transition: transform 160ms ease;
    box-shadow: 0 12px 40px rgba(7, 26, 51, 0.28);
  }
  .sidenav.is-open { transform: none; }
  .nav-toggle, .nav-toggle:hover { display: inline-flex; background: var(--navy); color: white; }
  .canvas { width: min(1120px, calc(100% - 1.5rem)); }
  .grid, .role-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .event-table { min-width: 0; }
  .event-table thead { display: none; }
  .event-table, .event-table tbody, .event-table tr, .event-table td { display: block; width: auto; }
  .event-table tr { margin: 0 0 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .event-table td { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 0; }
  .event-table td::before { content: attr(data-label); color: var(--muted); font-weight: 700; }
  .event-table tfoot, .event-table tfoot tr { display: block; width: auto; }
  .event-table tfoot th, .event-table tfoot td { display: flex; justify-content: space-between; gap: 1rem; }
  .event-table tfoot th[colspan] { display: block; }
  .position-preview li, .roster-column { grid-template-columns: 1fr; }
  .position-preview li { flex-direction: column; gap: 0.2rem; }
  .workspace-bar .role { display: none; }
  .login-stage { grid-template-columns: 1fr; }
  .login-hero { min-height: 15.5rem; }
  .login-hero img { object-position: 18% center; }
  .login-hero::after {
    background: linear-gradient(180deg, rgba(5, 14, 28, 0) 55%, rgba(5, 14, 28, 0.72) 100%);
  }
  .login-card {
    border-left: 0;
    padding: 1.6rem 1.15rem 2.2rem;
  }
  .workspace-bar { padding-top: max(0.75rem, env(safe-area-inset-top)); }
  .canvas { padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); }
  .sidenav { overflow: auto; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
  .page-head, .actions { align-items: stretch; }
  .page-head .actions, .actions { width: 100%; }
  .actions .button, .actions button, .actions a.button { flex: 1 1 8rem; }
  .roster-card form, .roster-card button { width: 100%; }
  .login-switch a { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .intro-split, .gate-hero, .gate-band, .gate-record { grid-template-columns: 1fr; }
  .gate-bar { padding: 0.75rem 1rem; }
  .gate-photo { min-height: 13.5rem; order: -1; }
  .gate-photo::after {
    background: linear-gradient(180deg, rgba(7, 26, 51, 0) 42%, rgba(7, 26, 51, 0.78) 100%);
  }
  .gate-copy { padding: 1.5rem 1.15rem 1.8rem; }
  .gate-copy h1 { font-size: 2.05rem; }
  .gate-band, .gate-record { width: min(1120px, calc(100% - 1.5rem)); }
  .gate-band { margin-top: 1rem; }
  .gate-nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
