@font-face {
  font-family: "Jersey 15";
  src: url("./assets/jersey-15.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font: 100%/1.45 "Trebuchet MS", Arial, sans-serif;
  --display-font: "Jersey 15", "Trebuchet MS", sans-serif;
  --page: #000;
  --panel: #0b1012;
  --raised: #151e21;
  --line: #2c484c;
  --text: #f4f6f7;
  --muted: #b4c3c6;
  --cyan: #63e0e5;
  --mint: #9ff7c1;
  --amber: #ffd166;
  --red: #ffaaaa;
  --active: #142c30;
  --active-line: #367278;
  --radius: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-bottom: 4rem; }
body { display: flex; flex-direction: column; margin: 0; min-height: 100vh; background: var(--page); color: var(--text); }
#main {
  display: flex;
  flex: 1;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 14% 0, #63e0e51f, transparent 36rem),
    radial-gradient(ellipse at 92% 20%, #b98cff1a, transparent 32rem),
    linear-gradient(180deg, #0003, #000 42rem),
    url("./assets/black-brick-wall.jpg") center top / max(100%, 70rem) auto no-repeat;
}
button, input, select, textarea { font: inherit; }
button, input, select, textarea {
  min-height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--raised);
  padding: .3rem .65rem;
}
button { cursor: pointer; }
button:hover { border-color: var(--cyan); }
button:disabled { opacity: .65; cursor: wait; }
select {
  appearance: none;
  padding-right: 1.7rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - .85rem) 50%, calc(100% - .55rem) 50%;
  background-repeat: no-repeat;
  background-size: .3rem .3rem;
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 2.75rem/1 var(--display-font); }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
a { color: var(--cyan); }
.skip { position: absolute; z-index: 6; top: -4rem; left: 1rem; padding: .5rem; background: var(--panel); }
.skip:focus { top: .3rem; }
.topbar, .brand, .topbar-actions, .stage-header, .actions, dialog > header { display: flex; align-items: center; gap: .75rem; }
.topbar { position: relative; z-index: 5; min-height: 4.5rem; padding: .45rem 1.1rem; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--page); }
.brand { min-width: 0; }
.brand img { flex: none; width: clamp(2.4rem, 9vw, 3.5rem); height: auto; border-radius: 50%; }
.brand span { display: block; color: var(--cyan); font-size: .75rem; font-weight: 700; line-height: 1.2; }
.brand strong { display: block; font: 400 clamp(1.45rem, 5vw, 2rem)/1 var(--display-font); }
.topbar-actions { min-width: 0; }
.login-link {
  display: grid; place-items: center; flex: none;
  width: 2.75rem; height: 2.75rem;
  color: var(--cyan); background: var(--panel); border: 1px solid var(--active-line); border-radius: var(--radius);
}
.login-link:hover, .login-link:focus-visible { color: var(--page); background: var(--cyan); box-shadow: 0 0 20px #63e0e533; }
.account { min-width: 0; font-size: .875rem; }
.account summary {
  display: flex; align-items: center; gap: .5rem; min-width: 0;
  min-height: 2.3rem; border: 1px solid var(--line); border-radius: 5px;
  background: var(--raised); padding: .3rem .55rem; cursor: pointer; list-style: none;
}
.account summary::-webkit-details-marker { display: none; }
.account summary:hover { border-color: var(--cyan); }
#account-role, .account-scope { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#account-role { color: var(--cyan); font-weight: 600; }
.account-scope { border-left: 1px solid var(--line); padding-left: .5rem; }
.account-chevron { flex: none; width: .36rem; height: .36rem; margin: 0 .12rem .18rem; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.account[open] .account-chevron { transform: rotate(225deg); margin-bottom: -.18rem; }
.account-panel {
  position: absolute; inset-inline-end: 1.1rem; top: calc(100% + .15rem);
  width: min(27rem, calc(100% - 2.2rem)); max-height: min(31rem, 78vh); overflow: auto;
  border: 1px solid var(--line); border-radius: 7px; padding: .75rem;
  background: var(--panel); box-shadow: 0 .55rem 1.5rem #0007;
}
.account-identity, .account-admin { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.account-identity strong { display: block; overflow-wrap: anywhere; }
.account-admin { margin-top: .6rem; }
.account-access { border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .55rem; }
.account-access h3 { font-size: .9rem; }
.account-access p { margin-top: .3rem; }
#account-organizations { margin: .2rem 0 0; padding: 0; list-style: none; }
.account-organization { padding: .35rem .45rem; border-top: 1px solid var(--line); }
.account-organization:first-child { border-top: 0; }
.account-organization[aria-current="true"] { box-shadow: inset 2px 0 var(--cyan); background: var(--active); }
.account-org-meta { display: block; color: var(--muted); font-size: .8125rem; }
#sign-out { white-space: nowrap; }
.workspace { display: grid; flex: 1; grid-template-columns: 12rem minmax(0, 1fr); }
.sidebar { background: #070b0df2; border-right: 1px solid var(--line); padding: 1rem .75rem; }
.sidebar label, .nav-label { display: block; color: var(--muted); font-size: .875rem; margin: 0 0 .25rem .3rem; }
.sidebar select { width: 100%; }
nav { display: grid; gap: .2rem; margin-top: .9rem; }
nav button { text-align: left; background: transparent; border-color: transparent; }
nav button[aria-current="page"] { background: var(--active); border-color: var(--active-line); color: var(--cyan); }
.nav-label { margin-top: .7rem; }
.stage { padding: 1.35rem clamp(.75rem, 2.5vw, 2rem); min-width: 0; background: #0007; }
.stage-header { justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.stage-header h1 { text-shadow: 0 0 24px #63e0e533; }
.screen-actions { flex-wrap: wrap; }
.stage-header p, .gate p, dialog p { color: var(--muted); margin-top: .25rem; }
.badge { display: inline-block; white-space: nowrap; border: 1px solid var(--line); border-radius: 4px; font-size: .875rem; line-height: 1.3; padding: .16rem .42rem; color: var(--muted); }
.badge.good { border-color: #386a5c; color: var(--mint); }
.badge.warn { border-color: #76563d; color: var(--amber); }
.badge.bad { border-color: #794c50; color: var(--red); }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1rem; margin-bottom: .75rem; }
.controls label { display: grid; gap: .25rem; color: var(--muted); font-size: .875rem; }
.controls .checkbox { display: flex; align-items: center; gap: .4rem; min-height: 2.3rem; }
.checkbox input { min-height: auto; accent-color: var(--cyan); }
#search { width: min(17rem, 100%); }
.queue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .5rem; margin-bottom: 1rem; }
.queue { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: .6rem; background: var(--panel); min-height: 2.8rem; }
.queue[aria-pressed="true"] { border-color: var(--cyan); background: var(--active); }
.queue strong { font: 400 1.55rem/1 var(--display-font); color: var(--cyan); }
.table-heading { margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: baseline; }
.count, .empty { color: var(--muted); }
.table-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .46rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { background: var(--raised); color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--raised); }
td:first-child { min-width: 9rem; }
.record-link { min-height: 0; white-space: normal; text-align: left; padding: 0; border: 0; background: none; color: var(--cyan); text-decoration: underline; text-underline-offset: .18em; }
.empty, #workspace-status { padding: .65rem .75rem; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; margin-bottom: .7rem; }
.error { color: var(--red) !important; }
.gate {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem); width: min(68rem, calc(100% - 2rem));
  margin: clamp(2.5rem, 12vh, 8rem) auto;
}
.gate-intro h1 { font-size: clamp(3.3rem, 8vw, 7.2rem); line-height: .9; text-transform: uppercase; text-shadow: 0 0 28px #63e0e538; }
.gate-intro h1 span { color: var(--cyan); }
.gate-intro p { max-width: 32ch; margin-top: 1rem; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.gate-card, .script-notice { border: 1px solid var(--active-line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.75rem); background: #070707ed; box-shadow: 0 0 32px #63e0e514; }
.gate-card h2 { font: 400 2rem/1 var(--display-font); }
.script-notice { width: min(26rem, calc(100% - 2rem)); margin: 1rem auto; }
.client-workspace { width: min(38rem, calc(100% - 2rem)); margin: clamp(2.5rem, 12vh, 8rem) auto; }
.client-workspace h1 { margin: .3rem 0 .9rem; overflow-wrap: anywhere; }
#client-switcher { display: grid; gap: .3rem; margin-bottom: .9rem; }
.client-workspace select { min-width: 0; width: 100%; }
.client-workspace .error { margin-top: .75rem; }
.membership-editor { max-width: 42rem; }
.membership-editor .event-fields { margin-top: .5rem; }
.membership-editor .event-fields label { min-width: 0; }
.membership-editor .event-fields > div { display: grid; gap: .3rem; min-width: 0; }
.membership-editor .event-fields button { grid-column: 1 / -1; justify-self: start; }
.membership-editor [role="status"]:not(:empty) { margin-top: .75rem; }
.site-footer {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem;
  padding: .55rem clamp(.75rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .875rem;
}
.site-footer strong { color: var(--text); }
.gate form { display: grid; gap: .4rem; margin-top: 1rem; }
.gate form label { margin-top: .4rem; }
.gate button { margin-top: .6rem; justify-self: start; }
.primary { color: #001214; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.primary:hover:not(:disabled) { color: var(--cyan); background: var(--panel); }
dialog { width: min(46rem, calc(100% - 1rem)); max-height: 90vh; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0; }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog::backdrop { background: #070a0ccc; }
dialog > header { flex: none; justify-content: space-between; padding: .8rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
dialog > header .actions { justify-content: flex-end; flex-wrap: wrap; }
#inspector-content { padding: .75rem 1rem 1rem; overflow: auto; overflow-wrap: anywhere; }
.event-tabs { display: flex; flex: none; gap: .35rem; padding: .45rem .75rem; overflow-x: auto; border-bottom: 1px solid var(--line); }
.event-tabs button { white-space: nowrap; background: transparent; border-color: transparent; }
.event-tabs button[aria-selected="true"] { background: var(--active); border-color: var(--active-line); color: var(--cyan); }
.event-tabs :focus-visible { outline-offset: -2px; }
#inspector-content [role="tabpanel"] .detail-actions { flex-wrap: wrap; margin-bottom: .65rem; }
.attachment-setup ol { margin: .65rem 0; padding-left: 1.35rem; }
.attachment-setup .actions { flex-wrap: wrap; }
.attachment-setup details { margin-top: .6rem; }
.attachment-setup details label { display: block; margin: .35rem 0; }
.attachment-setup textarea { width: 100%; font-family: ui-monospace, monospace; font-size: .85rem; }
.button-link { display: inline-flex; align-items: center; min-height: 2.3rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 5px; }
#inspector-content section + section { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .8rem; }
dl { display: grid; grid-template-columns: minmax(7rem, 24%) minmax(0, 1fr); gap: .25rem .65rem; margin: .5rem 0 0; }
dt { color: var(--muted); }
dd { margin: 0; white-space: pre-wrap; }
#inspector-content ul { padding-left: 1.2rem; margin: .35rem 0 0; }
.event-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; border: 0; padding: 0; margin: .75rem 0; min-width: 0; }
.event-fields label { display: grid; gap: .25rem; color: var(--muted); font-size: .875rem; }
.event-fields :is(input, select, textarea) { width: 100%; }
.event-fields .full-field { grid-column: 1 / -1; }
.event-fields .checkbox { display: flex; align-items: center; }
.event-fields .checkbox input { width: auto; }
.detail-actions { margin-top: .55rem; }
.asset-card { display: flex; align-items: center; gap: .65rem; margin: .3rem 0; }
.asset-preview { display: grid; place-items: center; flex: none; width: 74px; height: 99px; border: 1px solid var(--line); border-radius: 4px; background: var(--page); }
.asset-preview img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.asset-card .record-link { display: block; }
.records-toolbar, .record-related { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.record-fieldset { border: 1px solid var(--line); border-radius: 6px; margin: .7rem 0; min-width: 0; }
.record-fieldset legend { padding-inline: .35rem; color: var(--cyan); }
.record-fieldset .event-fields { margin: .3rem 0; }
.relation-field { display: grid; gap: .35rem; align-content: start; }
#records-content dl { overflow-wrap: anywhere; }
.save-status:not(:empty) { color: var(--mint); margin-bottom: .5rem; }
.unified-event-editor { width: min(57rem, calc(100% - 1rem)); }
.unified-event-editor > form { display: flex; flex-direction: column; min-height: 0; max-height: 90vh; }
.unified-event-editor header, .unified-event-editor footer { flex: none; padding: .7rem 1rem; }
.unified-event-editor header { border-bottom: 1px solid var(--line); }
.unified-event-editor footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid var(--line); }
.unified-event-editor footer p { margin: 0; }
.unified-event-editor footer .actions { margin-inline-start: auto; flex: none; }
.event-editor-body { overflow: auto; padding: .75rem 1rem; }
.event-editor-body > .count { margin: .25rem 0 .65rem; font-size: .875rem; }
.draft-section, .draft-setup { border: 1px solid var(--line); border-radius: 6px; margin-bottom: .5rem; }
.draft-section > summary, .draft-setup > summary, .draft-optional > summary { cursor: pointer; padding: .5rem .65rem; }
.draft-section > summary span { float: inline-end; color: var(--muted); font-size: .875rem; padding-inline-start: .5rem; }
.draft-section[open] > summary, .draft-setup[open] > summary { background: var(--raised); border-radius: 5px 5px 0 0; }
.draft-section > div, .draft-setup > p, .draft-setup > .actions { padding: .55rem .65rem; }
.draft-section .event-fields { margin: .35rem 0; align-items: start; }
.draft-section .event-fields label { min-width: 0; align-content: start; }
.draft-section .draft-details-row { gap: .55rem .75rem; margin-block: .5rem; }
.draft-identity { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.draft-location { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.draft-schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.draft-picker { display: grid; gap: .25rem; min-width: 0; align-content: start; }
.draft-picker-search > summary { cursor: pointer; color: var(--cyan); font-size: .8rem; }
.draft-picker-search input { margin-top: .25rem; }
.draft-picker label, .draft-file { display: grid; gap: .2rem; color: var(--muted); font-size: .875rem; }
.draft-picker input, .draft-picker select { width: 100%; }
.draft-item { border-top: 1px solid var(--line); padding: .55rem 0; margin-top: .45rem; }
.draft-item-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.draft-item-header button { font-size: .875rem; }
.draft-actions { flex-wrap: wrap; margin: .3rem 0; }
.draft-optional { margin: .3rem 0; }
.draft-optional > summary { color: var(--cyan); padding-inline: 0; font-size: .9rem; }
.draft-inline { padding: .2rem .5rem .5rem; border-left: 1px solid var(--line); }
.draft-file { margin-block: .55rem; }
@media (max-width: 520px) {
  .draft-identity, .draft-location { grid-template-columns: 1fr; }
  .draft-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .draft-schedule > label:first-child { grid-column: 1 / -1; }
  .unified-event-editor footer { flex-wrap: wrap; }
  .draft-section > summary span { float: none; display: inline-block; }
}
@media (max-width: 740px) {
  .gate { grid-template-columns: minmax(0, 29rem); justify-content: center; }
  .workspace { display: block; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: .65rem .75rem; }
  .sidebar select { width: min(16rem, 100%); }
  nav { display: flex; flex-wrap: wrap; margin-top: .45rem; }
  .nav-label { display: none; }
  .stage-header { flex-wrap: wrap; }
}
@media (max-width: 410px) {
  .topbar { padding-inline: .65rem; gap: .35rem; }
  .brand, .topbar-actions { gap: .35rem; }
  .brand strong { white-space: nowrap; }
  .account summary { gap: .3rem; padding-inline: .35rem; }
  .account-scope { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; clip-path: inset(50%); }
  .account-panel { inset-inline-end: .65rem; width: min(27rem, calc(100% - 1.3rem)); }
}
