/* Bootstrap supplies layout, buttons, forms, tables and modals. This file adds the brand colors
   and the pieces Bootstrap has no component for: the floor map, the rubric tiles, category chips. */
:root {
  --brand: #3b0f4f;
  --brand-2: #5a2a73;
  --ink: #1d1326;
  --muted: #6b6274;
  --line: #ddd5e3;
  --soft: #f4f0f7;
  --ok: #1a7f37;
  --bad: #b3261e;
  --bs-body-bg: #f4f0f7;
  --bs-body-color: #1d1326;
  /* Geist, with the device's own font underneath until it has loaded or if it cannot be fetched */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: var(--font-sans);   /* numbers use Geist Sans too, kept in even columns by tabular-nums */
  --bs-font-sans-serif: var(--font-sans);
  --bs-body-font-family: var(--font-sans);
}
body, button, input, select, textarea, svg text { font-family: var(--font-sans); }

[hidden] { display: none !important; }

.app-bar { background: var(--brand); padding: 8px 16px; gap: 10px; }
.app-bar .navbar-brand { font-weight: 700; letter-spacing: .02em; margin-right: auto; }
.app-bar .nav-link { color: #fff; opacity: .8; font-weight: 600; border: 0; background: transparent; min-height: 42px; }
.app-bar .nav-link:hover { color: #fff; opacity: 1; }
.app-bar .nav-link.active { background: rgba(255, 255, 255, .18); color: #fff; opacity: 1; }
.app-bar .who { color: #fff; font-size: 14px; opacity: .9; }

.btn { font-weight: 600; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2);
  --bs-btn-active-bg: var(--brand-2); --bs-btn-active-border-color: var(--brand-2);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.btn-outline-secondary { --bs-btn-bg: #fff; }
.btn-outline-danger { --bs-btn-bg: #fff; }
.btn:not(.btn-sm) { min-height: 42px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 16px; }

.catpick { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.catpick input { width: 22px; height: 22px; }

label.field { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
label.field input, label.field select, label.field textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; min-height: 44px;
  border: 1px solid #b9aec2; border-radius: 8px; background: #fff; font-weight: 400; font-size: 16px;
}
.form-control.inline, .form-select.inline { display: inline-block; width: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid #b58fd0; outline-offset: 1px;
}

.login { max-width: 420px; margin: 9vh auto 0; }

.chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(0, 0, 0, .25); white-space: nowrap;
}
.chip.none-chip { background: #eee; color: #555; }
button.chip { cursor: pointer; min-height: 34px; }
button.chip.off { opacity: .3; }

/* ---- map */
.mapbox {
  overflow: auto; -webkit-overflow-scrolling: touch; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px);
}
button, a, .mi-table, .catpick { touch-action: manipulation; }
.mapbox svg { display: block; width: 100%; max-width: none; height: auto; user-select: none; -webkit-user-select: none; }
.mi text { font-weight: 700; pointer-events: none; fill: var(--ink); }
.mi-table rect { fill: #cfc7d6; stroke: rgba(0, 0, 0, .35); stroke-width: 1; }
.mi-table text { fill: #4d4458; }
.mi-area rect { fill: #ebe4f0; stroke: var(--brand); stroke-width: 2; }
.mi-booth rect { fill: var(--brand); }
.mi-booth text { fill: #fff; }
.mi-label rect { fill: transparent; }
.mi-label text { font-weight: 500; }
.clickable .mi-table { cursor: pointer; }
.scored-dot { fill: #fff; stroke: var(--ok); stroke-width: 2; }
.tick { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.gridline { fill: none; stroke: #c9bdd4; stroke-width: 1.4; }
.gridmajor { fill: none; stroke: #c3b5cf; stroke-width: 1.2; }
.detail-tag { pointer-events: none; }
.detail-tag rect { fill: rgba(255, 255, 255, .93); stroke: #b9aec2; stroke-width: .6; }
.detail-tag text { fill: var(--ink); }
.detail-tag .dt-title { font-weight: 700; }
.maptip {
  position: fixed; z-index: 40; pointer-events: none; max-width: 320px; background: var(--ink); color: #fff;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; line-height: 1.35; box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.maptip b { display: block; font-size: 16px; margin-bottom: 2px; }
.btn[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---- lists and tables */
.table { --bs-table-bg: #fff; }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.table td, .table th { padding: 9px 10px; }
.table td.text-end { font-variant-numeric: tabular-nums; }
.table tr.pick { cursor: pointer; }
.table tr.pick:hover > td { --bs-table-bg: var(--soft); background: var(--soft); }
.table tr.top td:first-child { box-shadow: inset 4px 0 0 #e0a800; }
.table tr.detail > td { background: var(--soft); }
.tablescroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.total { font-weight: 800; font-size: 17px; }

/* ---- scoring sheet */
.sheet-head { display: block; background: var(--brand); color: #fff; padding: 14px 18px; }
.sheet-head h2 { margin: 0; }
/* Lets a <form> wrap the modal header, body and footer without breaking the scrolling body. */
.modal-content > form { display: contents; }
.sheet-head h2 { font-size: 22px; overflow-wrap: anywhere; }
.sheet-head .meta { margin-top: 4px; font-size: 16px; }
.confirm { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px 24px; margin-top: 10px; }
@media (max-width: 560px) { .confirm { grid-template-columns: 1fr; } }
.cap { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; margin-bottom: 2px; }
.students { margin: 0; padding-left: 20px; font-size: 18px; font-weight: 600; line-height: 1.35; }
.sheet-foot { gap: 8px; }
.criterion { margin-bottom: 18px; }
.criterion h3 { font-size: 17px; margin-bottom: 8px; }
/* Equal rows as well as equal columns, so all four tiles of a criterion are the same size. */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; }
.level {
  text-align: left; border: 2px solid #b9aec2; border-radius: 10px; background: #fff;
  padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start;
  height: 100%; width: 100%;
}
.level b { display: block; font-size: 18px; margin-bottom: 6px; color: var(--brand); }
.level span { font-size: 16px; line-height: 1.4; color: var(--ink); display: block; }
.level.on { border-color: var(--brand); border-width: 3px; padding: 11px 13px; background: #ead9f5; }
.level:disabled { cursor: default; }
.level:disabled:not(.on) { opacity: .5; }
.submitted {
  background: #dcf3e2; color: #0f5a26; border: 1px solid #9fd3ad; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 16px; font-weight: 600;
}
textarea[readonly] { background: var(--soft); }
/* iPad upright: two by two keeps the descriptions readable. Phones: one per row. */
@media (max-width: 900px) { .levels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .levels { grid-template-columns: 1fr; }
  .wrap { padding: 10px; }
  .app-bar .navbar-brand { font-size: 17px; }
}
.app-bar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* ---- admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat b { display: block; font-size: 30px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }
.live { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #e6e0ea; color: #555; }
.live.on { background: #dcf3e2; color: var(--ok); }

.editor { display: grid; grid-template-columns: 1fr 270px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.editor .mi, .editor .handle { touch-action: none; }
.editor .mi { cursor: move; }
.editor .mi.sel rect { stroke: #e0007a; stroke-width: 3; stroke-dasharray: 6 3; }
.editor .mi-label rect { stroke: #c9bfd1; stroke-width: 1; stroke-dasharray: 3 3; }
.handle { fill: #e0007a; cursor: nwse-resize; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.catrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.catrow input[type=color] { width: 52px; height: 44px; padding: 2px; border: 1px solid #b9aec2; border-radius: 8px; background: #fff; }
textarea.mono { min-height: 130px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--bad); }

#editPanel h3 { font-size: 1.1rem; }
.modal-header.sheet-head h2 { font-size: 22px; }
.app-bar .form-select { width: auto; font-weight: 700; }

/* ---- registration */
.cap-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.school-row { display: grid; grid-template-columns: 118px 1fr 64px; gap: 10px; align-items: center; margin-bottom: 8px; }
.school-row .chip { display: block; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.school-row .progress { height: 10px; background: #e9e3ee; }
.school-count { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.bar-done, .dot-done { background: #1a7f37; }
.bar-part, .dot-part { background: #d9a531; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.division-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 15px; }
.division-row .pct { width: 38px; text-align: right; }
.swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .25); flex: none; }
.reg-project { min-width: 220px; max-width: 380px; }
.reg-project .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.student-line { white-space: nowrap; }
.badge-done { background: #dcf3e2; color: #0f5a26; }
.badge-part { background: #fbeccb; color: #7a5200; }
.schoolrow { display: grid; grid-template-columns: 52px 1.4fr 1fr 64px 64px 76px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.schoolrow input[type=color] { width: 52px; height: 38px; padding: 2px; border: 1px solid #b9aec2; border-radius: 8px; background: #fff; }
.schoolhead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 700px) { .schoolrow { grid-template-columns: 52px 1fr 1fr; } }
.table tr.slot-empty > td { background: #faf8fc; }
.badge-none { background: #ece7f0; color: #5d5566; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-bg: #fff; }
.table .btn { white-space: nowrap; }

/* ---- registration grid: one editable row per slot.
   Wide screens: a spreadsheet-like table whose columns share the full window width.
   Narrower screens: each row becomes a card with captioned fields. */
.wrap.reg { max-width: none; padding: 16px 20px; }
.reg-scroll {
  max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px);
  border: 1px solid #cdc2d6; border-radius: 12px; box-shadow: 0 1px 2px rgba(29, 19, 38, .06), 0 8px 24px rgba(29, 19, 38, .07);
}
.reg-grid { table-layout: fixed; width: 100%; --bs-table-bg: #fff; border-collapse: separate; border-spacing: 0; }

/* header: brand band, column name over its own search box */
.reg-grid thead th {
  position: sticky; top: 0; z-index: 3; background: var(--brand); color: #fff; border: 0;
  padding: 10px 5px 11px; vertical-align: bottom; text-transform: none; letter-spacing: 0; white-space: normal;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .09), inset 0 -3px 0 #e0a800;
}
.reg-grid thead th:first-child { border-top-left-radius: 11px; }
.reg-grid thead th:last-child { border-top-right-radius: 11px; box-shadow: inset 0 -3px 0 #e0a800; }
.col-name { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.25; color: #fff; }
.col-filter, .col-filter-gap { display: block; width: 100%; height: 28px; margin-top: 7px; }
.col-filter {
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff;
  font-size: 13px; font-weight: 400; padding: 2px 6px 2px 23px; min-width: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 6px center; background-size: 13px 13px;
}
.col-filter::placeholder { color: rgba(255, 255, 255, .55); }
.col-filter:hover { border-color: rgba(255, 255, 255, .45); }
.col-filter:focus, .col-filter:not(:placeholder-shown) { background-color: #fff; background-image: none; color: var(--ink); padding-left: 6px; }
.col-filter:focus { border-color: #fff; outline: 2px solid #e0a800; outline-offset: 1px; }
.col-filter:not(:placeholder-shown) { border-color: #e0a800; }
.col-filter::-webkit-search-cancel-button { cursor: pointer; }

/* Everything in this block is the table look only; the card layout further down starts from a clean slate. */
@media (min-width: 0px) {
/* body: quiet cells that light up on hover and while a row is being edited */
.reg-grid tbody td { padding: 7px 5px; border-bottom: 1px solid #ebe5f0; background: #fff; box-shadow: none; }
.reg-grid tbody tr:hover > td { background: #faf7fc; }
.reg-grid tbody tr:focus-within > td { background: #f3eaf9; }
.reg-grid tbody tr.group-start > td { border-top: 3px solid #cdc2d6; }
.reg-grid tbody tr.slot-empty > td { background: #fcfbfd; }
.reg-grid tbody tr.slot-empty:hover > td { background: #f8f4fb; }
.reg-grid tbody tr.slot-empty:focus-within > td { background: #f3eaf9; }

.reg-grid .c-school { width: 6.5%; } .reg-grid .c-no { width: 3.4%; }
.reg-grid .c-title { width: 12%; } .reg-grid .c-desc { width: 11%; }
.reg-grid .c-type { width: 7.8%; } .reg-grid .c-div { width: 9%; } .reg-grid .c-count { width: 3.8%; }
.reg-grid .c-s1, .reg-grid .c-s2 { width: 9.5%; } .reg-grid .c-sh1, .reg-grid .c-sh2 { width: 4.8%; }
.reg-grid .c-inst { width: 6.5%; } .reg-grid .c-pow, .reg-grid .c-board { width: 4.3%; }
.reg-grid .c-table { width: 4%; } .reg-grid .c-end { width: 4.4%; }

/* the school is a solid color block down the left edge, like a spreadsheet's frozen label column */
.reg-grid tbody td.c-school, .reg-grid tbody tr:hover > td.c-school, .reg-grid tbody tr:focus-within > td.c-school,
.reg-grid tbody tr.slot-empty > td.c-school {
  background: var(--school); color: var(--school-ink); text-align: center; font-size: 12px; font-weight: 700; line-height: 1.2;
  border-bottom-color: rgba(255, 255, 255, .35); padding-left: 4px; padding-right: 4px; overflow-wrap: anywhere;
}
.reg-grid tbody td.c-no { white-space: nowrap; font-size: 15px; padding-left: 8px; }
.reg-grid tbody td.c-no .dot { width: 10px; height: 10px; margin-right: 6px; vertical-align: 1px; }
.dot-none { background: #d2cad8; }
.reg-grid tbody td.c-end { text-align: center; }
.reg-grid .c-end .btn { padding: 1px 8px; line-height: 1.4; border-color: transparent; color: #a8a0b0; background: transparent; }
.reg-grid tr:hover .c-end .btn, .reg-grid tr:focus-within .c-end .btn { color: var(--bad); border-color: #e7b9b5; background: #fff; }
.reg-grid .c-end .btn:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

}

/* controls: light outline at rest, clear outline on hover, brand outline when typing */
.reg-grid tbody .form-control, .reg-grid tbody .form-select {
  border: 1px solid #e3dcea; border-radius: 6px; background-color: #fff; min-width: 0; font-size: 14px; color: var(--ink);
  padding-top: 5px; padding-bottom: 5px; box-shadow: none; transition: border-color .12s;
}
.reg-grid tbody .form-control { padding-left: 8px; padding-right: 8px; }
.reg-grid tbody .form-select { padding-left: 8px; padding-right: 22px; background-position: right 5px center; text-overflow: ellipsis; }
.reg-grid tbody .form-control::placeholder { color: #b3abbb; }
.reg-grid tbody .form-control:hover, .reg-grid tbody .form-select:hover { border-color: #a99bb6; }
.reg-grid tbody .form-control:focus, .reg-grid tbody .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(90, 42, 115, .18); outline: 0; }
.reg-grid tbody tr.slot-empty .form-select { color: #9a91a3; }
.reg-grid tbody .form-control:disabled, .reg-grid tbody .form-select:disabled { background-color: #f3f0f5; border-color: #ece7f0; color: #9a91a3; }
.reg-grid textarea { resize: none; overflow: hidden; }
.reg-grid textarea:focus { overflow: auto; }

@media (max-width: 0px) {
  .reg-scroll { max-height: none; overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .reg-grid, .reg-grid tbody { display: block; }
  .reg-grid thead { display: none; }
  .reg-grid tbody tr, .reg-grid tbody tr.group-start {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; margin-bottom: 10px;
    background: #fff; border: 1px solid #ddd5e3; border-radius: 12px;
  }
  .reg-grid tbody tr:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(90, 42, 115, .12); }
  .reg-grid tbody td, .reg-grid tbody tr > td.c-school, .reg-grid tbody tr:hover > td, .reg-grid tbody tr:focus-within > td,
  .reg-grid tbody tr.slot-empty > td, .reg-grid tbody tr.group-start > td {
    display: block; width: auto; padding: 0; border: 0; background: transparent; color: inherit; text-align: left;
  }
  .reg-grid td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
  .reg-grid td[colspan] { grid-column: 1 / -1; }
  .school-tag { display: inline-block; background: var(--school); color: var(--school-ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
  .reg-grid tbody .form-control, .reg-grid tbody .form-select { font-size: 16px; min-height: 40px; padding-left: 10px; }
  .reg-grid tbody .form-select { padding-right: 28px; background-position: right 8px center; }
  /* tablet / small laptop: four lines per card */
  .reg-grid .c-school { grid-column: span 3; align-self: center; } .reg-grid tbody td.c-no { grid-column: span 1; align-self: center; font-size: 17px; }
  .reg-grid .c-title { grid-column: span 8; }
  .reg-grid .c-desc { grid-column: span 6; } .reg-grid .c-type { grid-column: span 3; } .reg-grid .c-div { grid-column: span 3; }
  .reg-grid .c-count { grid-column: span 2; } .reg-grid .c-s1, .reg-grid .c-s2 { grid-column: span 3; } .reg-grid .c-sh1, .reg-grid .c-sh2 { grid-column: span 2; }
  .reg-grid .c-inst { grid-column: span 4; } .reg-grid .c-pow, .reg-grid .c-board { grid-column: span 2; }
  .reg-grid .c-table { grid-column: span 2; } .reg-grid tbody td.c-end { grid-column: span 2; align-self: end; text-align: right; }
  .reg-grid .c-end .btn, .reg-grid tr:hover .c-end .btn { padding: 6px 12px; color: var(--bad); border-color: #e7b9b5; background: #fff; }
}
@media (max-width: 640px) {
  /* phone: one or two fields per line */
  .reg-grid tbody tr, .reg-grid tbody tr.group-start { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .reg-grid .c-school { grid-column: span 4; } .reg-grid tbody td.c-no { grid-column: span 2; text-align: right; }
  .reg-grid .c-title, .reg-grid .c-desc, .reg-grid .c-count, .reg-grid .c-inst { grid-column: span 6; }
  .reg-grid .c-type, .reg-grid .c-div, .reg-grid .c-pow, .reg-grid .c-board { grid-column: span 3; }
  .reg-grid .c-s1, .reg-grid .c-s2 { grid-column: span 4; } .reg-grid .c-sh1, .reg-grid .c-sh2 { grid-column: span 2; }
  .reg-grid .c-table { grid-column: span 3; } .reg-grid tbody td.c-end { grid-column: span 3; }
}
.save-note { font-size: 12px; color: var(--muted); min-height: 16px; }

/* ---- registration setup */
.buildingrow { display: grid; grid-template-columns: 52px 150px 1fr 120px 60px 60px 86px auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.buildingrow input[type=color] { width: 52px; height: 34px; padding: 2px; border: 1px solid #b9aec2; border-radius: 8px; background: #fff; }
@media (max-width: 900px) { .buildingrow { grid-template-columns: 52px 1fr 1fr; } }
.reg-notice { background: #b3261e; color: #fff; font-weight: 700; font-size: 18px; border: 0; }
.log-edit { background: #e3ecfb; color: #1f4e9c; }
.log-delete { background: #fbe1df; color: #8c1d18; }
.log-setup { background: #ece7f0; color: #4d4458; }

/* ---- registration summary strip and school buttons */
.reg-summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, auto); background: #fff;
  border: 1px solid #ddd5e3; border-radius: 12px; box-shadow: 0 1px 2px rgba(29, 19, 38, .05);
}
.reg-summary > * { padding: 14px 20px; }
.reg-summary > * + * { border-left: 1px solid #ebe5f0; }
.sum-kpis { display: flex; align-items: stretch; gap: 26px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; min-width: 64px; }
.kpi b { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-main { min-width: 170px; padding-right: 26px; border-right: 1px solid #ebe5f0; }
.kpi-main b { font-size: 34px; color: var(--brand); }
.kpi-of { margin-left: 8px; color: var(--muted); font-size: 14px; }
.kpi-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.kpi-label b { font-size: inherit; font-weight: 700; color: var(--ink); margin-left: 6px; text-transform: none; letter-spacing: 0; }
.kpi-label .dot { margin-right: 3px; }
.kpi-bar { height: 8px; background: #ece7f0; border-radius: 999px; }
.sum-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sum-shirts { max-width: 330px; }
.stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #ece7f0; }
.stack span { display: block; height: 100%; box-shadow: inset -1px 0 0 rgba(255, 255, 255, .7); }
.sum-chips { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.sum-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: #f6f2f9; border: 1px solid #e6dfec; white-space: nowrap; }
.sum-chip b { font-variant-numeric: tabular-nums; }
.sum-chip.zero { color: #9a91a3; background: transparent; }
.sum-chip.zero b { font-weight: 500; }
@media (max-width: 1000px) {
  .reg-summary { grid-template-columns: 1fr; }
  .reg-summary > * + * { border-left: 0; border-top: 1px solid #ebe5f0; }
  .sum-kpis { flex-wrap: wrap; gap: 14px 22px; }
  .sum-shirts { max-width: none; }
}
@media (max-width: 640px) { .kpi-main { border-right: 0; padding-right: 0; width: 100%; } }

.school-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.school-tab {
  flex: 1 1 150px; max-width: 260px; text-align: left; cursor: pointer; background: #fff; color: var(--ink);
  border: 1px solid #ddd5e3; border-left: 6px solid var(--school); border-radius: 10px; padding: 8px 12px 9px;
  display: flex; flex-direction: column; gap: 6px; transition: background .12s, border-color .12s, box-shadow .12s;
}
.school-tab:hover { border-color: var(--school); box-shadow: 0 2px 8px rgba(29, 19, 38, .1); }
.school-tab.active { background: var(--school); border-color: var(--school); color: var(--school-ink); box-shadow: 0 2px 10px rgba(29, 19, 38, .18); }
.st-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.st-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-count { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .9; }
.st-bar { display: flex; height: 5px; border-radius: 999px; overflow: hidden; background: #ece7f0; }
.st-bar i { display: block; height: 100%; }
.school-tab.active .st-bar { background: rgba(255, 255, 255, .35); }
.school-tab.active .st-bar .bar-done { background: #fff; }
.school-tab.active .st-bar .bar-part { background: rgba(255, 255, 255, .65); }
.sum-kpis { align-items: center; }
.kpi { justify-content: flex-start; gap: 7px; }
.kpi-main { align-self: stretch; justify-content: center; }

/* compact pass: the whole summary should cost about one row of buttons in height */
.reg-summary { grid-template-columns: auto minmax(0, 1fr) minmax(0, 250px); }
.reg-summary > * { padding: 10px 16px; }
.sum-kpis { gap: 20px; }
.kpi { min-width: 0; gap: 4px; }
.kpi b { font-size: 24px; }
.kpi-main { min-width: 150px; padding-right: 20px; gap: 5px; }
.kpi-main b { font-size: 28px; }
.kpi-bar, .stack { height: 6px; }
.sum-block { gap: 6px; justify-content: center; }
.sum-chips { gap: 4px 5px; }
.sum-chip { font-size: 12.5px; padding: 1px 8px; gap: 5px; }
.sum-chip .swatch { width: 10px; height: 10px; }
.school-tab { padding: 6px 11px 7px; gap: 5px; border-left-width: 5px; }
.school-tabs { gap: 6px; }
.wrap.reg { padding-top: 12px; }
.reg-summary.mb-3 { margin-bottom: 10px !important; }
@media (max-width: 1000px) { .reg-summary { grid-template-columns: 1fr; } }

/* ---- page header, shared by every page */
.app-bar {
  background: linear-gradient(100deg, #2a0a3a 0%, #3b0f4f 45%, #55206e 100%);
  padding: 0 20px; min-height: 60px; gap: 6px 14px; border-bottom: 3px solid #e0a800;
  box-shadow: 0 2px 10px rgba(29, 19, 38, .18);
}
.app-bar .navbar-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; letter-spacing: .01em; padding: 0; }
/* brand mark */
.app-bar .navbar-brand::before {
  content: "F"; flex: none; width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: #e0a800; color: #2a0a3a; font-size: 19px; font-weight: 900; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14);
}
/* the page name beside the event name */
.app-bar .navbar-brand + .who { border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 14px; font-size: 15px; font-weight: 500; opacity: .85; }
/* tabs: full-height links with a gold underline on the current one, instead of pills */
.app-bar .nav { align-self: stretch; gap: 2px; }
.app-bar .nav-link {
  display: inline-flex; align-items: center; min-height: 57px; padding: 0 14px; border-radius: 0; opacity: .78;
  font-size: 15px; box-shadow: inset 0 -3px 0 transparent; transition: opacity .12s, box-shadow .12s, background .12s;
}
.app-bar .nav-link:hover { opacity: 1; background: rgba(255, 255, 255, .07); }
.app-bar .nav-link.active { background: rgba(255, 255, 255, .1); opacity: 1; box-shadow: inset 0 -3px 0 #fff; }
/* signed-in name as a chip, sign out as a quiet button */
.app-bar .who:has(+ #logout) { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 5px 13px; font-size: 13.5px; font-weight: 600; opacity: 1; }
.app-bar #logout { border-color: rgba(255, 255, 255, .4); font-size: 13.5px; padding: 5px 12px; }
.app-bar #logout:hover { background: #fff; color: var(--brand); border-color: #fff; }
.app-bar .form-select { min-height: 0; padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 760px) {
  .app-bar { padding: 8px 12px; }
  .app-bar .nav-link { min-height: 40px; padding: 0 11px; border-radius: 8px; box-shadow: none; }
  .app-bar .nav-link.active { box-shadow: none; background: rgba(255, 255, 255, .18); }
  .app-bar .navbar-brand { font-size: 17px; }
}

/* ---- registration grid without a trailing column: clear button and save feedback sit with the slot number */
.reg-grid .save-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.row-clear {
  border: 0; background: transparent; color: #a8a0b0; width: 20px; height: 20px; border-radius: 50%; padding: 0; margin-left: 4px;
  font-size: 16px; line-height: 18px; cursor: pointer; vertical-align: 1px;
}
.row-clear:hover, .row-clear:focus-visible { background: var(--bad); color: #fff; }
.reg-grid tr.just-saved td.c-no .dot { animation: saved-pulse 1.2s ease-out; }
@keyframes saved-pulse { 0% { box-shadow: 0 0 0 0 rgba(26, 127, 55, .7); } 100% { box-shadow: 0 0 0 9px rgba(26, 127, 55, 0); } }
@media (prefers-reduced-motion: reduce) { .reg-grid tr.just-saved td.c-no .dot { animation: none; outline: 2px solid var(--ok); outline-offset: 2px; } }
.reg-grid tr.save-error td.c-no .dot { background: var(--bad); }
.reg-grid tr.save-error td.c-no b { color: var(--bad); }
@media (min-width: 0px) {
  .reg-grid .c-no { width: 4.6%; } .reg-grid .c-title { width: 13.6%; } .reg-grid .c-desc { width: 12.6%; }
  .reg-grid tbody td.c-no { padding-left: 7px; padding-right: 2px; }
  .reg-grid .row-clear { opacity: 0; }
  .reg-grid tr:hover .row-clear, .reg-grid tr:focus-within .row-clear { opacity: 1; }
  .reg-grid thead th:last-child { box-shadow: inset 0 -3px 0 #e0a800; }
}
@media (max-width: 0px) {
  .reg-grid tbody td.c-no { grid-column: span 1; white-space: nowrap; }
  .reg-grid .c-table { grid-column: span 4; }
  .row-clear { color: var(--bad); }
}
@media (max-width: 640px) { .reg-grid tbody td.c-no { grid-column: span 2; } .reg-grid .c-table { grid-column: span 6; } }

/* column names centered over their columns */
.reg-grid thead th { text-align: center; }
.reg-grid thead .col-name { text-align: center; }

/* descriptions show in full: the box grows with its text, and the other cells in the row line up with its first line */
.reg-grid tbody textarea { overflow: hidden; line-height: 1.4; }
.reg-grid tbody textarea.capped { overflow-y: auto; }
@media (min-width: 0px) {
  .reg-grid tbody td { vertical-align: top; }
  .reg-grid tbody td.c-school { vertical-align: middle; }
  .reg-grid tbody td.c-no { padding-top: 12px; }
}

/* description: three lines at rest with a "more" fade, a wider floating panel while editing */
.reg-grid tbody td.c-desc { position: relative; }
.reg-grid tbody td.c-desc.has-more::after {
  content: "\2026  more"; position: absolute; left: 6px; right: 6px; bottom: 8px; height: 22px; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 7px 2px; font-size: 11px; font-weight: 700; color: var(--brand-2);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 62%); border-radius: 0 0 5px 5px;
}
.reg-grid tbody textarea.capped:not(.open) { overflow: hidden; }
@media (min-width: 0px) {
  .reg-grid tbody textarea.open {
    position: absolute; top: 7px; left: 5px; z-index: 6; width: max(100% - 10px, 420px); min-height: 71px;
    box-shadow: 0 0 0 3px rgba(90, 42, 115, .18), 0 12px 32px rgba(29, 19, 38, .28); border-color: var(--brand-2);
  }
}

/* table rows all keep one height: a description is a single line at rest and opens into the floating panel to edit */
@media (min-width: 0px) {
  .reg-grid tbody td, .reg-grid tbody td.c-school { vertical-align: middle; }
  .reg-grid tbody td.c-no { padding-top: 7px; }
  .reg-grid tbody textarea:not(.open) { white-space: nowrap; overflow: hidden; }
  .reg-grid tbody td.c-desc.has-more::after {
    content: "\2026"; left: auto; right: 6px; top: 8px; bottom: 8px; height: auto; width: 30px;
    align-items: center; justify-content: flex-end; padding: 0 7px 0 0; font-size: 15px; font-weight: 700; color: var(--brand-2);
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 55%); border-radius: 0 5px 5px 0;
  }
  .reg-grid tbody textarea.open { white-space: pre-wrap; }
}

/* staff do not see the Table # column; it is for organizers */
.staff-view .reg-grid .c-table { display: none; }
@media (min-width: 0px) { .staff-view .reg-grid thead th.c-board { border-top-right-radius: 11px; } }

/* ---- student layout switch.
   .stacked on the page wrapper = both students in one cell on two lines, and every field in the row two lines tall.
   Without it = the earlier five student columns and single-height rows. Only the wide table has the two looks. */
.reg-grid .c-students { display: none; }
.layout-switch { display: none; }
@media (min-width: 0px) {
  .layout-switch { display: block; }
  .stacked .reg-grid thead .c-students { display: table-cell; }
  .stacked .reg-grid thead .c-count, .stacked .reg-grid thead .c-s1, .stacked .reg-grid thead .c-sh1,
  .stacked .reg-grid thead .c-s2, .stacked .reg-grid thead .c-sh2 { display: none; }

  .stacked .reg-grid { --row-h: 68px; }
  .stacked .reg-grid .c-no { width: 4.6%; } .stacked .reg-grid .c-title { width: 15%; } .stacked .reg-grid .c-desc { width: 17%; }
  .stacked .reg-grid .c-type { width: 9.5%; } .stacked .reg-grid .c-div { width: 11.5%; } .stacked .reg-grid .c-students { width: 17%; }
  .stacked .reg-grid .c-inst { width: 7.5%; } .stacked .reg-grid .c-pow, .stacked .reg-grid .c-board { width: 4.7%; }
  .stacked .reg-grid .c-table { width: 4.5%; }

  /* two student lines: name box with its size menu beside it */
  .student-pair { display: flex; gap: 4px; }
  .student-pair + .student-pair { margin-top: 4px; }
  .student-pair .form-control { flex: 1 1 auto; min-width: 0; }
  .student-pair .form-select { flex: 0 0 68px; width: 68px; }
  .stacked .reg-grid tbody .student-pair .form-control, .stacked .reg-grid tbody .student-pair .form-select { height: 32px; }

  /* every other field fills the same two-line height */
  .stacked .reg-grid tbody td > .form-control, .stacked .reg-grid tbody td > .form-select { height: var(--row-h); }
  .stacked .reg-grid tbody td > textarea.form-control { white-space: normal; line-height: 1.35; padding-top: 6px; padding-bottom: 6px; }
  .stacked .reg-grid tbody td.c-desc > textarea.open { height: auto; white-space: pre-wrap; }
  .stacked .reg-grid tbody td.c-desc.has-more::after {
    content: "\2026  more"; left: 6px; right: 6px; top: auto; bottom: 8px; width: auto; height: 20px;
    align-items: flex-end; justify-content: flex-end; padding: 0 7px 2px; font-size: 11px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 62%); border-radius: 0 0 5px 5px;
  }
}
@media (min-width: 0px) { .stacked .reg-grid tbody td.c-students { display: table-cell; } }

/* stacked layout keeps the number-of-students column */
@media (min-width: 0px) {
  .stacked .reg-grid thead .c-count { display: table-cell; }
  .stacked .reg-grid .c-count { width: 4.4%; } .stacked .reg-grid .c-title { width: 14%; } .stacked .reg-grid .c-desc { width: 15%; }
  .stacked .reg-grid .c-students { width: 16.5%; }
}

/* two-line rows: long choices wrap instead of being cut off */
@media (min-width: 0px) {
  .wrap-select { position: relative; display: flex; align-items: center; white-space: normal; cursor: pointer; overflow: hidden; }
  .wrap-select .ws-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; }
  .wrap-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; }
  .wrap-select select:disabled { cursor: default; }
  .reg-grid tbody .wrap-select:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(90, 42, 115, .18); }
  .reg-grid tbody .wrap-select.disabled { background-color: #f3f0f5; border-color: #ece7f0; color: #9a91a3; cursor: default; }
  .reg-grid tbody .wrap-select.unset { color: #9a91a3; }
  /* names and the instructor keep one line, centered in the taller box, which is what a single-line box does anyway */
}

/* stacked layout, tighter: narrower school / # / title / division columns and shorter rows */
@media (min-width: 0px) {
  .stacked .reg-grid { --row-h: 56px; }
  .stacked .reg-grid .c-school { width: 5.2%; } .stacked .reg-grid .c-no { width: 3.3%; }
  .stacked .reg-grid .c-title { width: 11.5%; } .stacked .reg-grid .c-div { width: 9.4%; }
  .stacked .reg-grid .c-desc { width: 19%; } .stacked .reg-grid .c-students { width: 18.5%; } .stacked .reg-grid .c-inst { width: 8.4%; }
  .stacked .reg-grid tbody td { padding-top: 4px; padding-bottom: 4px; }
  .stacked .reg-grid tbody td.c-school { font-size: 11.5px; padding-left: 3px; padding-right: 3px; }
  /* slot number on the first line, the clear button under it, so the column can be narrow */
  .stacked .reg-grid tbody td.c-no { padding: 4px 2px 4px 6px; line-height: 1.2; }
  .stacked .reg-grid tbody td.c-no .dot { margin-right: 4px; }
  .stacked .reg-grid tbody td.c-no .row-clear { display: block; margin: 3px 0 0 12px; width: 18px; height: 18px; line-height: 16px; }
  .stacked .reg-grid tbody .student-pair .form-control, .stacked .reg-grid tbody .student-pair .form-select { height: 26px; padding-top: 2px; padding-bottom: 2px; font-size: 13.5px; }
  .stacked .reg-grid tbody .student-pair + .student-pair { margin-top: 4px; }
  .stacked .reg-grid tbody td > textarea.form-control { padding-top: 4px; padding-bottom: 4px; line-height: 1.3; font-size: 13.5px; }
  .stacked .wrap-select .ws-label { font-size: 13.5px; line-height: 1.2; }
}
@media (min-width: 0px) {
  /* Bootstrap gives small fields a minimum height taller than the two student lines need */
  .stacked .reg-grid tbody .student-pair .form-control, .stacked .reg-grid tbody .student-pair .form-select { min-height: 0; }
}

/* The table stays a table on anything from a small laptop up. When the window is narrower than the table needs,
   the table keeps its proportions and scrolls sideways inside its frame, with the school column held in place.
   Cards are only for phones and small tablets (900px and under). */
@media (min-width: 0px) {
  .reg-grid { min-width: 1380px; }
  .stacked .reg-grid { min-width: 1200px; }
  .reg-grid thead th.c-school { position: sticky; left: 0; z-index: 5; }
  .reg-grid tbody td.c-school { position: sticky; left: 0; z-index: 2; }
}

/* The registration grid is always a table, at every window size. The card layout is switched off: its rules are kept
   above under "@media (max-width: 0px)", which never applies, so it can be brought back by restoring a width there.
   A narrow window scrolls the table sideways inside its frame, with the school column pinned. */
@media (max-width: 640px) {
  .reg-grid tbody td.c-no { text-align: left; }
  .reg-scroll { max-height: calc(100dvh - 90px); }
}

/* ---- toolbar above the table: search grows into the free space, status buttons sit beside it */
.grid-search { flex: 1 1 260px; width: auto; min-width: 220px; max-width: 520px; }
.status-filter { display: inline-flex; flex-wrap: wrap; background: #fff; border: 1px solid #ddd5e3; border-radius: 9px; padding: 3px; gap: 2px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  border-radius: 6px; padding: 5px 11px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .12s;
}
.status-pill b { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: 13px; }
.status-pill:hover { background: #f1ebf6; }
.status-pill.active { background: var(--brand); color: #fff; }
.status-pill.active b { color: rgba(255, 255, 255, .85); }
.status-pill .dot { width: 9px; height: 9px; }

/* slot number and number-of-students are centered in their columns */
.reg-grid tbody td.c-no, .stacked .reg-grid tbody td.c-no { text-align: center; padding-left: 2px; padding-right: 2px; }
.stacked .reg-grid tbody td.c-no .row-clear { margin-left: auto; margin-right: auto; }
.reg-grid tbody td.c-count { text-align: center; }
.reg-grid tbody td.c-count .form-select { text-align: center; text-align-last: center; padding-left: 16px; }

.confirm-text { font-size: 16px; padding: 22px 22px 10px; white-space: pre-line; }

/* the judging Exit button and name chip look like Sign out and its chip on the other pages */
.app-bar .who:has(+ #exit) { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 5px 13px; font-size: 13.5px; font-weight: 600; opacity: 1; }
.app-bar #exit { border-color: rgba(255, 255, 255, .4); font-size: 13.5px; padding: 5px 14px; font-weight: 700; }
.app-bar #exit:hover { background: #fff; color: var(--brand); border-color: #fff; }

/* ---- judges tab and the new-judge hint on the entry screen */
.judge-card { overflow: visible; }
.judge-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; justify-content: space-between; padding: 16px 18px 12px; }
.judge-head > div:first-child { flex: 1 1 320px; }
.judge-count { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #f1e6f8; color: var(--brand); font-size: 12.5px; font-weight: 700; vertical-align: 2px; }
.judge-tools { display: flex; gap: 8px; align-items: center; }
.judge-tools input { width: 170px; }
.judge-paste { padding: 0 18px 14px; }
.judge-coverline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 18px; background: #faf7fc; border-top: 1px solid #e7dfee; border-bottom: 1px solid #e7dfee; }
.judge-coverlabel { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
#judgeCover { display: flex; flex-wrap: wrap; gap: 6px; }
.judge-cover, .judge-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid #ddd3e5; border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.judge-cover i, .judge-tag i, .judge-pick i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.judge-cover b { font-weight: 800; color: var(--brand); }
.judge-cover.none { border-color: #e6b8b8; background: #fff5f5; }
.judge-cover.none b { color: #b42318; }
.judge-table { width: 100%; border-collapse: collapse; counter-reset: judge; }
.judge-table th { padding: 8px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 1px solid #e7dfee; }
.judge-table td { padding: 6px 10px; vertical-align: middle; border-bottom: 1px solid #f0eaf4; }
.judge-table th:first-child, .judge-table td:first-child { padding-left: 18px; width: 46px; }
.judge-table th:last-child, .judge-table td:last-child { padding-right: 14px; width: 44px; }
.judge-table th:nth-child(2), .judge-table td:nth-child(2) { width: 34%; min-width: 170px; }
.judge-table tbody tr { counter-increment: judge; }
.judge-table tbody tr:hover { background: #fcfaff; }
.judge-no::before { content: counter(judge); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.judge-name.form-control { border-color: transparent; background: transparent; font-weight: 600; padding: 5px 8px; box-shadow: none; }
.judge-name.form-control:hover { border-color: #ddd3e5; background: #fff; }
.judge-name.form-control:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(91, 33, 122, .14); }
.judge-cats { display: flex; align-items: center; gap: 8px; }
.judge-tags { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.judge-tag { padding-right: 3px; }
.judge-tag button { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; cursor: pointer; }
.judge-tag button:hover { color: #b42318; background: #fdeaea; }
.judge-none { font-size: 13px; color: #9a8fa5; font-style: italic; }
.judge-assign { border: 1px dashed #c4b5d1; color: var(--brand); font-weight: 600; font-size: 12.5px; padding: 3px 10px; background: #fff; white-space: nowrap; }
.judge-assign:hover, .judge-assign.show { border-style: solid; border-color: var(--brand); background: #f6eefb; color: var(--brand); }
.judge-menu { padding: 6px; border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 19, 38, .18); }
.judge-pick { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; }
.judge-pick .form-check-input { margin: 0; }
.judge-remove { border: 0; background: none; color: #a99db3; font-size: 20px; line-height: 1; width: 30px; height: 30px; border-radius: 6px; cursor: pointer; }
.judge-remove:hover { color: #b42318; background: #fdeaea; }
.judge-empty { margin: 0; padding: 26px 18px; text-align: center; color: var(--muted); }
.judge-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 18px; }
.judge-dirty { font-size: 13px; font-weight: 600; color: #8a4b00; }
@media (max-width: 640px) {
  .judge-tools { flex-wrap: wrap; width: 100%; }
  .judge-tools input { flex: 1; width: auto; }
  .judge-table th:first-child, .judge-table td:first-child { display: none; }
  .judge-cats { flex-wrap: wrap; }
}
.name-new { color: #8a4b00; font-weight: 600; }

/* ---- suggestion list that opens under the box being typed in */
.suggest-box {
  position: fixed; z-index: 1090; background: #fff; color: var(--ink); border: 1px solid #cdc2d6; border-radius: 8px;
  box-shadow: 0 10px 28px rgba(29, 19, 38, .22); max-height: 300px; overflow-y: auto; padding: 4px; max-width: min(420px, 94vw);
}
.suggest-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 15px; }
.suggest-item small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.suggest-item:hover, .suggest-item.active { background: #f1e6f8; }
.suggest-item.active { box-shadow: inset 3px 0 0 var(--brand); }

/* ---- map: viewing by default, editing tools appear after Edit map */
#mapedit:not(.editing) .edit-only { display: none !important; }
#mapedit.editing .view-only { display: none !important; }
#mapedit:not(.editing) .editor { grid-template-columns: 1fr; }
#mapedit:not(.editing) .editor .mi { cursor: default; touch-action: auto; }
#mapedit:not(.editing) .editor .mi-table { cursor: help; }
#mapedit:not(.editing) .editor .mi-label rect { stroke: none; }

/* map editor: half-foot grid lines are fainter; the lines a dragged item is locked onto are highlighted */
.gridline.fine { stroke: #e2d9e9; stroke-width: .8; }
.snap-guide { stroke: #e0007a; stroke-width: 1.6; stroke-dasharray: 7 4; pointer-events: none; }

/* ---- map editor: rulers along the edges and distances around the selected item (sizes are in map units) */
.ruler, .measure { pointer-events: none; }
.ruler line { stroke: #8f8499; stroke-width: 1.2; }
.ruler text { font-size: 13px; fill: #6b6274; font-weight: 600; }
.ruler .ruler-total { font-size: 16px; fill: var(--brand); font-weight: 800; }
.ruler-edge { fill: none; stroke: #8f8499; stroke-width: 1.5; }
.measure line { stroke: #0b63ce; stroke-width: 1.4; }
.measure text { font-size: 14px; font-weight: 800; fill: #0b63ce; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }

/* map editor: no side panel until an item is selected */
#mapedit.nosel .editor { grid-template-columns: 1fr; }
#mapedit.nosel #editPanel { display: none; }

/* ---- field and usable map area */
.field-out { fill: #e9e3ee; }
.field-in { fill: #fff; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 10 6; }
.ruler .area-total { font-size: 14px; fill: var(--brand); font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 4px; }

/* map editor: the Add menu */
.map-add-menu { padding: 6px; border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 19, 38, .18); min-width: 250px; }
.map-add-menu .dropdown-item { border-radius: 6px; padding: 7px 10px; }
.map-add-menu .dropdown-item b { display: block; font-size: 14px; }
.map-add-menu .dropdown-item small { display: block; color: var(--muted); font-size: 12.5px; }

/* map editor: the Grid menu */
.grid-menu { padding: 14px; border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 19, 38, .18); width: 300px; }
.grid-title { font-weight: 700; font-size: 14.5px; }
.grid-help { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }
.grid-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.grid-presets button { border: 1px solid #ddd3e5; background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.grid-presets button:hover { border-color: var(--brand); color: var(--brand); }
.grid-presets button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.grid-custom { display: flex; align-items: flex-end; gap: 8px; }
.grid-custom label { flex: 1; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.grid-custom .input-group { margin-top: 4px; }
.grid-x { padding-bottom: 5px; color: var(--muted); }
.grid-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e7dfee; }
.grid-custom .input-group-text { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* map editor: the saved / not saved note */
#mapState.save-error { color: #b42318 !important; font-weight: 700; }

/* ---- dashboard: category tabs joined to the ranking table, and the release bar */
.dash-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 6px; margin-bottom: -1px; position: relative; z-index: 1; scrollbar-width: thin; }
.dash-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.dash-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.dash-tab.active { background: #fff; border-color: var(--line); color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.dash-tab i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.dash-tabcount { padding: 1px 8px; border-radius: 999px; background: #ece5f1; color: var(--muted); font-size: 12px; font-weight: 700; }
.dash-tab.active .dash-tabcount { background: #f1e6f8; color: var(--brand); }
.dash-panel { border-top-left-radius: 0; }
#dashTable.onecat th:nth-child(4), #dashTable.onecat tr:not(.detail) > td:nth-child(4) { display: none; }
.release-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid #ecd9a6; border-radius: 12px; background: #fff8e6; }
.release-bar.released { border-color: #b7e0c2; background: #effaf2; }
.release-dot { width: 10px; height: 10px; border-radius: 50%; background: #c98a00; flex: none; }
.release-bar.released .release-dot { background: var(--ok); }
.release-text { flex: 1 1 260px; font-weight: 600; font-size: 14.5px; }
.dash-wait { max-width: 560px; margin: 8vh auto 0; padding: 34px 30px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; }

/* ---- dashboard look: a dark "lab" header with the headline numbers, leader cards, and a cleaner ranking table */
.num, .total, .stat b, .podium-score, .rank-badge, .dash-tabcount, .judge-pill b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dash-heading { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.dash-hero {
  position: relative; overflow: hidden; margin-bottom: 14px; padding: 22px 24px 24px; border-radius: 16px; color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(900px 320px at 88% -30%, rgba(56, 189, 248, .30), transparent 62%),
    linear-gradient(135deg, #2a0b3b 0%, #3b0f4f 46%, #1e2a6b 100%);
}
.hero-art { position: absolute; right: -46px; top: -70px; width: 320px; height: 320px; color: #7dd3fc; opacity: .2; pointer-events: none; }
.hero-top { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #7dd3fc; }
.hero-title { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.dash-hero .live { background: rgba(255, 255, 255, .14); color: #e9e2ef; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; }
.dash-hero .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c9bfd2; }
.dash-hero .live.on { background: rgba(52, 211, 153, .18); color: #a7f3d0; }
.dash-hero .live.on::before { background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@media (prefers-reduced-motion: reduce) { .dash-hero .live.on::before { animation: none; } }
.dash-hero .stats { position: relative; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 0; }
.dash-hero .stat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(3px); }
.dash-hero .stat b { display: block; font-size: 27px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.dash-hero .stat span { display: block; color: #fff; font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.dash-hero .stat small { display: block; color: #cbbfd6; font-size: 12px; }
.stat-ico, .stat-ring { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.stat-ico { background: rgba(125, 211, 252, .16); color: #7dd3fc; }
.stat-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat-ring { border-radius: 50%; background: conic-gradient(#34d399 calc(var(--pct) * 1%), rgba(255, 255, 255, .16) 0); position: relative; }
.stat-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #35164b; }
.stat-ring em { position: relative; font-style: normal; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #a7f3d0; }

.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 0 12px 0 0; }
.podium + .dash-panel { border-top-right-radius: 0; border-top-left-radius: 0; }
.podium-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, #fff, #faf7fc); min-width: 0; }
.podium-card.p1 { border-color: #e6c34d; background: linear-gradient(180deg, #fffdf3, #fff7d6); }
.podium-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.podium-place { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.podium-score { margin-left: auto; font-size: 24px; font-weight: 700; color: var(--brand); letter-spacing: -.02em; }
.podium-score small { font-size: 12px; font-weight: 600; color: var(--muted); }
.podium-card h4 { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.podium-card p { margin: 2px 0 10px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 9px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.score-bar { height: 5px; border-radius: 999px; background: #ebe4f0; overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5a2a73, #38bdf8); }

.rank-badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 999px; font-size: 13.5px; font-weight: 700; background: #efe9f3; color: var(--ink); }
.rank-badge.r1 { background: linear-gradient(135deg, #fde68a, #eab308); color: #4a3200; }
.rank-badge.r2 { background: linear-gradient(135deg, #f1f5f9, #b6c0cc); color: #26303b; }
.rank-badge.r3 { background: linear-gradient(135deg, #f6c9a0, #c8793a); color: #3f1f05; }
.rank-none { color: #b7adc0; }
#dashTable thead th { background: #faf7fc; font-size: 11.5px; letter-spacing: .07em; padding-top: 11px; padding-bottom: 11px; }
#dashTable tbody td { padding-top: 11px; padding-bottom: 11px; }
#dashTable td.num { color: #3d3347; font-size: 14px; }
#dashTable tr.top td:first-child { box-shadow: none; }
.total-cell { display: inline-block; min-width: 92px; text-align: right; }
.total-cell b { display: block; font-size: 16px; color: var(--brand); margin-bottom: 4px; }
.judge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 600; }
.judge-pill b { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: #f1e6f8; color: var(--brand); font-size: 12.5px; text-align: center; }

/* ---- the sign-in page, which is the site's front door */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.signin-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 18px 50px rgba(29, 19, 38, .12); }
.signin-head {
  padding: 26px 28px 24px; color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(500px 220px at 90% -40%, rgba(56, 189, 248, .32), transparent 62%),
    linear-gradient(135deg, #2a0b3b 0%, #3b0f4f 46%, #1e2a6b 100%);
}
.signin-eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #7dd3fc; }
.signin-head h1 { margin: 4px 0 0; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.signin-body { padding: 24px 28px 28px; }
.signin-body h2 { font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.signin-body p { font-size: 14.5px; margin-bottom: 12px; }
.signin-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- registration: compact project cards and the project form */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pcard {
  position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px 14px 11px 17px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: box-shadow .12s, border-color .12s, transform .12s;
}
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 12px 0 0 12px; background: var(--school); }
.pcard:hover, .pcard:focus-visible { border-color: #bfb2cb; box-shadow: 0 6px 18px rgba(29, 19, 38, .10); transform: translateY(-1px); outline: none; }
.pcard:focus-visible { box-shadow: 0 0 0 3px rgba(91, 33, 122, .25); }
.pcard.draft { background: #fffdf6; border-style: dashed; border-color: #dcc78a; }
.pcard header { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pc-school { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-no { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); }
.pc-table { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: #efe9f3; color: var(--brand); white-space: nowrap; }
.pc-status { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.pc-status.is-done { background: #dcf3e2; color: var(--ok); }
.pc-status.is-draft { background: #fdecc0; color: #7a4d00; }
.pcard h3 { margin: 1px 0 0; font-size: 16px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard h3.untitled { color: #9a8fa5; font-style: italic; font-weight: 600; }
.pc-desc { margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border: 1px solid #ddd3e5; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pc-tag i { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pc-tag.plain { background: #f6f2f9; border-color: transparent; color: #4a3f55; }
.pc-tag.missing { border-style: dashed; color: #9a6a00; border-color: #dcc78a; background: transparent; }
.pc-students { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13.5px; }
.pc-students li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pc-students li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pc-students li b { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 5px; background: #efe9f3; color: #4a3f55; flex: none; }
.pc-students li em { font-size: 12px; color: #9a6a00; flex: none; }
.pc-students li.none { color: #9a8fa5; font-style: italic; }
.pcard footer { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid #f0eaf4; font-size: 12.5px; color: var(--muted); }
.pc-inst { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-edit { margin-left: auto; font-weight: 700; color: var(--brand); }
.pcard:hover .pc-edit { text-decoration: underline; }
.pgrid-empty { padding: 44px 20px; text-align: center; background: #fff; border: 1px dashed #cfc4d8; border-radius: 14px; }
.pgrid-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pgrid-empty p { margin: 0; color: var(--muted); }

.pf-modal .modal-header { align-items: flex-start; }
.pf-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.pf-sub .pc-status { margin-left: 2px; }
.pf-section + .pf-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid #ece6f1; }
.pf-section h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.pf-modal .form-label { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.pf-modal .form-text { font-size: 12.5px; }
.pf-error { padding: 9px 12px; font-size: 14px; font-weight: 600; }

/* ---- registration: project rows grouped by school, then instructor (replaces the card grid) */
.plist { --cols: 96px minmax(0, 2.4fr) minmax(0, 1.25fr) minmax(0, 1.6fr) 44px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.plist.has-table { --cols: 96px minmax(0, 2.4fr) minmax(0, 1.25fr) minmax(0, 1.6fr) 114px 44px; }
.pl-head, .prow { display: grid; grid-template-columns: var(--cols); column-gap: 16px; align-items: center; padding-left: 16px; padding-right: 14px; }
.pl-head { padding-top: 9px; padding-bottom: 9px; background: #faf7fc; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pl-school { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--school); color: var(--school-ink); }
.pl-school-name { font-size: 15px; font-weight: 800; letter-spacing: .01em; }
.pl-school-count { font-size: 12.5px; font-weight: 600; opacity: .85; }
.pl-inst { display: flex; align-items: baseline; gap: 8px; padding: 6px 16px 6px 13px; background: #f6f2f9; border-left: 3px solid var(--school); border-top: 1px solid #ebe4f0; border-bottom: 1px solid #ebe4f0; font-size: 13px; }
.pl-inst span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-inst b { font-weight: 700; }
.pl-inst em { font-style: normal; font-size: 12px; color: var(--muted); }
.pl-inst.none b { color: #9a6a00; font-weight: 600; font-style: italic; }
.prow { padding-top: 8px; padding-bottom: 8px; border-left: 3px solid var(--school); padding-left: 13px; cursor: pointer; }
.prow + .prow { border-top: 1px solid #f0eaf4; }
.prow:hover, .prow:focus-visible { background: #fbf8fd; outline: none; }
.prow:focus-visible { box-shadow: inset 0 0 0 2px rgba(91, 33, 122, .35); }
.prow.draft { background: #fffdf4; }
.prow.draft:hover { background: #fff9e6; }
.pr-no { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pr-no b { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.pr-no .pc-status { margin-left: 0; }
.pr-main { min-width: 0; }
.pr-main h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-main h3.untitled { color: #9a8fa5; font-style: italic; font-weight: 600; }
.pr-main p { margin: 1px 0 0; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-main p.none { color: #b7adc0; font-style: italic; }
.pr-kind { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pr-kind .pc-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pr-needs { font-size: 12.5px; color: var(--muted); padding-left: 2px; }
.pr-table { font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--brand); text-align: center; }
.pr-table.none { color: #c4bacd; font-weight: 500; }
.prow .pc-edit { margin-left: 0; text-align: right; font-size: 13px; }
.prow:hover .pc-edit { text-decoration: underline; }
@media (max-width: 860px) {
  .pl-head { display: none; }
  .plist, .plist.has-table { --cols: 88px minmax(0, 1fr); }
  .prow { row-gap: 6px; align-items: start; }
  .prow > .pr-kind, .prow > .pc-students { grid-column: 2; }
  .prow > .pr-table { grid-column: 1; grid-row: 2; text-align: left; }
  .prow > .pc-edit { grid-column: 2; text-align: left; }
  .pr-main h3, .pr-main p { white-space: normal; }
}

/* ==== registration: calm, neutral look ====
   White surfaces on a soft gray page, one text color, hairline borders. Color is kept for small dots only
   (school, division, status), so the page reads as a document rather than a chart. Later rules win, so this
   block restyles the registration pieces defined further up without touching the other pages. */
body:has(.wrap.reg) { background: #f7f7f8; }
.wrap.reg { --ink: #18181b; --muted: #71717a; --line: #e4e4e7; --hair: #f1f1f3; max-width: 1400px; margin: 0 auto; padding: 20px 24px 48px; color: var(--ink); }

/* notices: a quiet line with a status dot instead of a filled banner */
.reg #notice .alert { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding: 10px 14px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 400; }
.reg #notice .alert::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #a1a1aa; transform: translateY(-1px); }
.reg #notice .alert b { font-weight: 600; }
.reg #notice .reg-notice { font-weight: 600; font-size: 14.5px; }
.reg #notice .reg-notice::before { background: #dc2626; }
.reg #notice .alert-warning::before { background: #d97706; }
.reg #notice .alert-info::before { background: #2563eb; }

/* summary */
.reg .reg-summary { border-color: var(--line); box-shadow: none; }
.reg .reg-summary > * { padding: 14px 20px; }
.reg .reg-summary > * + * { border-left-color: var(--hair); border-top-color: var(--hair); }
.reg .kpi-main { border-right-color: var(--hair); }
.reg .kpi b, .reg .kpi-main b { color: var(--ink); font-weight: 600; letter-spacing: -.02em; }
.reg .kpi-label { font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.reg .kpi-label b { font-weight: 500; color: var(--muted); }
.reg .kpi-of { font-size: 13px; }
.reg .kpi-bar { height: 4px; background: #ececef; }
.reg .bar-done { background: #18181b; }
.reg .bar-part { background: #c8c8cf; }
.reg .dot { width: 7px; height: 7px; }
.reg .dot-done { background: #16a34a; }
.reg .dot-part { background: #d97706; }
.reg .stack { display: none; }
.reg .sum-chips { gap: 4px 14px; }
.reg .sum-chip { padding: 0; background: transparent; border: 0; font-size: 13px; color: #52525b; gap: 6px; }
.reg .sum-chip b { color: var(--ink); font-weight: 600; }
.reg .sum-chip.zero, .reg .sum-chip.zero b { color: #a1a1aa; }
.reg .sum-chip .swatch { width: 7px; height: 7px; border-radius: 50%; }

/* school filter: plain pills with a small school dot */
.reg .school-tabs { gap: 6px; margin-bottom: 12px !important; }
.reg .school-tab { flex: 0 1 auto; max-width: none; flex-direction: row; align-items: center; gap: 8px; padding: 6px 13px; background: #fff; color: #3f3f46; border: 1px solid var(--line); border-radius: 999px; box-shadow: none; }
.reg .school-tab::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--school); }
.reg .school-tab .st-bar { display: none; }
.reg .school-tab .st-top { gap: 8px; }
.reg .st-name { font-size: 13.5px; font-weight: 500; }
.reg .st-count { font-size: 12.5px; color: var(--muted); opacity: 1; }
.reg .st-count b { font-weight: 500; }
.reg .school-tab:hover { border-color: #a1a1aa; box-shadow: none; }
.reg .school-tab.active { background: #18181b; border-color: #18181b; color: #fff; box-shadow: none; }
.reg .school-tab.active .st-count { color: #d4d4d8; }

/* toolbar */
.reg .grid-search { border-color: var(--line); border-radius: 9px; background: #fff; font-size: 14px; }
.reg .grid-search:focus { border-color: #a1a1aa; box-shadow: 0 0 0 3px rgba(24, 24, 27, .08); }
.reg .status-filter { border-color: var(--line); }
.reg .status-pill { font-weight: 500; color: #3f3f46; }
.reg .status-pill b { font-weight: 500; }
.reg .status-pill:hover { background: #f4f4f5; }
.reg .status-pill.active { background: #18181b; color: #fff; }
.reg .btn-outline-secondary { --bs-btn-color: #3f3f46; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f4f4f5; --bs-btn-hover-color: #18181b; --bs-btn-hover-border-color: #d4d4d8; --bs-btn-active-bg: #ececef; --bs-btn-active-color: #18181b; --bs-btn-active-border-color: #d4d4d8; background: #fff; font-weight: 500; }
.reg #addProject { font-weight: 600; border-radius: 9px; padding: 7px 16px; }

/* the list */
.reg .plist { border-color: var(--line); }
.reg .pl-head { background: #fff; border-bottom-color: var(--line); padding-top: 10px; padding-bottom: 10px; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.reg .pl-school { gap: 10px; padding: 10px 16px; background: #fafafa; color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--hair); }
.reg .pl-head + .pl-school { border-top: 0; }
.reg .pl-school::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--school); }
.reg .pl-school-name { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.reg .pl-school-count { font-size: 13px; font-weight: 400; color: var(--muted); opacity: 1; }
.reg .pl-inst { padding: 12px 16px 5px; background: #fff; border: 0; font-size: 12.5px; gap: 6px; }
.reg .pl-inst span { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.reg .pl-inst b { font-weight: 600; color: #3f3f46; }
.reg .pl-inst em { color: #a1a1aa; }
.reg .pl-inst em::before { content: "\00b7  "; }
.reg .pl-inst.none b { color: var(--muted); font-style: normal; font-weight: 500; }
.reg .prow { border-left: 0; padding: 9px 14px 9px 16px; }
.reg .prow + .prow { border-top-color: var(--hair); }
.reg .pl-inst + .prow { border-top: 0; }
.reg .prow, .reg .prow.draft { background: #fff; }
.reg .prow:hover, .reg .prow:focus-visible, .reg .prow.draft:hover { background: #fafafa; }
.reg .prow:focus-visible { box-shadow: inset 0 0 0 2px rgba(24, 24, 27, .25); }
.reg .pr-no b { font-weight: 500; color: #a1a1aa; }
.reg .pr-main h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.reg .pr-main h3.untitled { color: #a1a1aa; font-style: normal; font-weight: 500; }
.reg .pr-main p { color: var(--muted); }
.reg .pr-main p.none { color: #c4c4cc; font-style: normal; }
.reg .pc-tag { padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 500; color: #3f3f46; }
.reg .pc-tag i { width: 7px; height: 7px; box-shadow: none; }
.reg .pc-tag.missing { color: #a16207; border: 0; }
.reg .pr-needs { padding-left: 0; }
.reg .pc-students li span { font-weight: 500; color: #27272a; }
.reg .pc-students li b { background: #f4f4f5; color: #52525b; font-weight: 500; }
.reg .pc-students li em { color: #a16207; font-style: normal; }
.reg .pc-students li.none { color: #a1a1aa; font-style: normal; }
.reg .pr-table { color: var(--ink); font-weight: 600; }
.reg .pr-table.none { color: #d4d4d8; }
.reg .pc-edit { color: #71717a; font-weight: 500; }
.reg .prow:hover .pc-edit { color: var(--ink); text-decoration: none; }
.reg .pgrid-empty { border-color: #d4d4d8; }

/* status: a word with a dot, not a filled badge (also used in the form header) */
.pc-status, .pc-status.is-done, .pc-status.is-draft { display: inline-flex; align-items: center; gap: 5px; padding: 0; background: transparent; font-size: 12.5px; font-weight: 500; letter-spacing: 0; }
.pc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.pc-status.is-done { color: #3f3f46; }
.pc-status.is-done::before { background: #16a34a; }
.pc-status.is-draft { color: #a16207; }
.pc-status.is-draft::before { background: #d97706; }

/* the form */
.pf-modal .modal-content { background: #fff; color: #18181b; border: 0; border-radius: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, .2); }
.pf-modal .modal-header, .pf-modal .modal-footer { border-color: #f1f1f3; padding: 16px 22px; }
.pf-modal .modal-body { padding: 18px 22px 22px; }
.pf-modal .modal-title { font-weight: 600; }
.pf-sub { color: #71717a; }
.pf-section + .pf-section { border-top-color: #f1f1f3; }
.pf-section h3 { font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #18181b; }
.pf-modal .form-label { font-size: 13px; font-weight: 500; color: #52525b; }
.pf-modal .form-control, .pf-modal .form-select { border-color: #d4d4d8; border-radius: 8px; font-size: 14.5px; }
.pf-modal .form-control:focus, .pf-modal .form-select:focus { border-color: #71717a; box-shadow: 0 0 0 3px rgba(24, 24, 27, .08); }
.pf-modal .form-control:disabled, .pf-modal .form-select:disabled { background: #f4f4f5; }
.pf-modal .btn-outline-secondary, .pf-modal .btn-outline-primary { --bs-btn-color: #3f3f46; --bs-btn-border-color: #d4d4d8; --bs-btn-hover-bg: #f4f4f5; --bs-btn-hover-color: #18181b; --bs-btn-hover-border-color: #d4d4d8; --bs-btn-active-bg: #ececef; --bs-btn-active-color: #18181b; --bs-btn-active-border-color: #d4d4d8; --bs-btn-bg: #fff; font-weight: 500; }

/* ==== registration: balanced look ====
   Between the two earlier tries: clear panels, bold headings and soft tinted badges so rows are easy to scan,
   with color used lightly (pale tints of the school and division colors) rather than as solid blocks. */
body:has(.wrap.reg) { background: #f5f4f8; }
.wrap.reg { --ink: #1c1a22; --muted: #6a6675; --line: #dfdce6; --hair: #eceaf1; }

/* notices: a soft tinted bar with a colored edge */
.reg #notice .alert { padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line); border-left-width: 4px; font-size: 14.5px; }
.reg #notice .alert::before { display: none; }
.reg #notice .reg-notice { background: #fef3f2; border-color: #f6cfcb; border-left-color: #d92d20; color: #8f1d14; font-weight: 700; font-size: 15px; }
.reg #notice .alert-warning { background: #fffaeb; border-color: #f5e2b0; border-left-color: #dc8a04; }
.reg #notice .alert-info { background: #f1f6ff; border-color: #cfe0fb; border-left-color: #2e6fd9; }

/* summary: stronger numbers, soft chips */
.reg .reg-summary { border-color: var(--line); box-shadow: 0 1px 2px rgba(28, 26, 34, .05); }
.reg .kpi b { font-size: 26px; font-weight: 700; }
.reg .kpi-main b { font-size: 32px; font-weight: 800; color: var(--brand); }
.reg .kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.reg .kpi-label b { font-weight: 600; }
.reg .kpi-bar { height: 6px; background: #e9e6ef; }
.reg .bar-done { background: var(--brand-2); }
.reg .bar-part { background: #e5b34a; }
.reg .dot { width: 8px; height: 8px; }
.reg .sum-chips { gap: 5px 6px; }
.reg .sum-chip { padding: 2px 10px; border-radius: 999px; background: #f4f2f8; border: 1px solid var(--hair); font-size: 13px; color: #33303b; }
.reg .sum-chip b { font-weight: 700; }
.reg .sum-chip.zero { background: transparent; }
.reg .sum-chip .swatch { width: 8px; height: 8px; }

/* school filter */
.reg .school-tab { padding: 7px 14px; border-color: var(--line); font-weight: 600; box-shadow: 0 1px 1px rgba(28, 26, 34, .04); }
.reg .school-tab::before { width: 9px; height: 9px; }
.reg .st-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.reg .st-count { font-size: 13px; }
.reg .st-count b { font-weight: 700; color: var(--ink); }
.reg .school-tab:hover { border-color: var(--school); }
.reg .school-tab.active { background: var(--brand); border-color: var(--brand); }
.reg .school-tab.active .st-name, .reg .school-tab.active .st-count b { color: #fff; }
.reg .school-tab.active::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.reg .status-pill { font-weight: 600; }
.reg .status-pill b { font-weight: 700; }
.reg .status-pill.active { background: var(--brand); }

/* the list: one panel per school */
.reg .plist { display: flex; flex-direction: column; gap: 16px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.pl-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(28, 26, 34, .06); }
.reg .pl-school { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 18px 12px 16px; color: var(--ink); border: 0; border-left: 5px solid var(--school);
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--school) 9%, #fff); }
.reg .pl-school::before { display: none; }
.reg .pl-school-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin-right: 4px; }
.pl-pill { padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: #3f3b49; }
.pl-pill.ok { background: #e8f6ec; border-color: #c5e6cf; color: #166534; }
.pl-pill.warn { background: #fdf3d7; border-color: #f0dca0; color: #7a4d00; }
.pl-goal { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pl-goalbar { width: 120px; height: 6px; border-radius: 999px; background: rgba(28, 26, 34, .10); overflow: hidden; }
.pl-goalbar i { display: block; height: 100%; border-radius: inherit; background: var(--school); }
.reg .pl-head { padding: 8px 18px 8px 21px; background: #faf9fc; border-bottom: 1px solid var(--hair); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.reg .pl-inst { display: flex; align-items: center; gap: 9px; padding: 8px 18px 8px 21px; background: #f6f5f9; border: 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-size: 14px; }
.reg .pl-head + .pl-inst { border-top: 0; }
.pl-avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--school) 22%, #fff); color: var(--ink); font-size: 12px; font-weight: 800; }
.reg .pl-inst b { font-weight: 700; color: var(--ink); }
.reg .pl-inst em { font-size: 12.5px; color: var(--muted); }
.reg .pl-inst em::before { content: none; }
.reg .pl-inst.none .pl-avatar { background: #fdf3d7; color: #7a4d00; }
.reg .pl-inst.none b { color: #7a4d00; font-weight: 600; }
.reg .prow { padding: 11px 18px 11px 21px; border-left: 0; }
.reg .prow + .prow { border-top: 1px solid var(--hair); }
.reg .prow:hover, .reg .prow:focus-visible { background: #faf8fd; }
.reg .prow.draft { background: #fffcf2; box-shadow: inset 3px 0 0 #e5b34a; }
.reg .prow.draft:hover { background: #fff8e3; }
.reg .pr-no { gap: 5px; }
.reg .pr-no b { font-size: 13px; font-weight: 700; color: #8b8696; }
.reg .pr-main h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.reg .pr-main h3.untitled { color: #9a95a5; font-style: italic; font-weight: 600; }
.reg .pr-main p { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.reg .pr-kind { gap: 5px; }
.reg .pc-tag { padding: 3px 10px 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.reg .pc-tag i { width: 9px; height: 9px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.reg .pc-tag.missing { border: 1px dashed #e0c377; background: #fffaf0; color: #7a4d00; }
.reg .pr-needs { padding-left: 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.reg .pc-students { gap: 4px; font-size: 14px; }
.reg .pc-students li span { font-weight: 600; color: var(--ink); }
.reg .pc-students li b { padding: 1px 7px; border-radius: 6px; background: #efedf4; border: 1px solid #e2dfea; color: #3f3b49; font-size: 11.5px; font-weight: 700; }
.reg .pc-students li em { padding: 0 7px; border-radius: 6px; background: #fdf3d7; color: #7a4d00; font-size: 11.5px; font-weight: 600; }
.reg .pr-table { display: inline-grid; place-items: center; justify-self: center; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 8px; background: #f1eef6; color: var(--brand); font-size: 14px; font-weight: 700; }
.reg .pr-table.none { background: transparent; color: #c9c5d2; }
.reg .prow .pc-edit { justify-self: end; padding: 4px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; text-align: center; }
.reg .prow:hover .pc-edit { border-color: var(--brand); color: var(--brand); }
.reg .plist { --cols: 104px minmax(0, 2.4fr) minmax(0, 1.25fr) minmax(0, 1.6fr) 58px; }
.reg .plist.has-table { --cols: 104px minmax(0, 2.4fr) minmax(0, 1.25fr) minmax(0, 1.6fr) 114px 58px; }

/* status: a soft filled badge with a dot */
.pc-status, .pc-status.is-done, .pc-status.is-draft { padding: 2px 9px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pc-status.is-done { background: #e8f6ec; color: #166534; }
.pc-status.is-draft { background: #fdf3d7; color: #7a4d00; }

/* the form keeps its clean white look, with firmer headings */
.pf-section h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6a6675; }
.pf-modal .form-label { font-weight: 600; color: #33303b; }
@media (max-width: 860px) {
  .reg .plist, .reg .plist.has-table { --cols: 96px minmax(0, 1fr); }
  .pl-goal { margin-left: 0; }
  .reg .prow > .pr-table { justify-self: start; }
  .reg .prow .pc-edit { justify-self: start; }
}

/* registration: school headings in the school color, and a firm line between projects */
.reg .pl-school { background: var(--school); color: var(--school-ink); border-left: 0; border-bottom: 0; padding: 11px 18px 11px 21px; }
.reg .pl-school .pl-pill, .reg .pl-school .pl-pill.ok, .reg .pl-school .pl-pill.warn { background: rgba(255, 255, 255, .92); border-color: transparent; color: #1c1a22; }
.reg .pl-school .pl-pill.warn { background: #fdf3d7; color: #7a4d00; }
.reg .pl-goal { color: var(--school-ink); opacity: .95; }
.reg .pl-goalbar { background: color-mix(in srgb, var(--school-ink) 28%, transparent); }
.reg .pl-goalbar i { background: var(--school-ink); }
.reg .prow { padding-top: 13px; padding-bottom: 13px; }
.reg .prow + .prow { border-top: 1px solid #cfcad9; }
.reg .pl-inst { border-top: 1px solid #cfcad9; border-bottom: 1px solid #cfcad9; background: #f1eff6; }
.reg .pl-head + .pl-inst { border-top: 0; }
.reg .pl-head { border-bottom: 1px solid #cfcad9; }
.reg .prow:nth-child(even):not(.draft) { background: #fbfafd; }
.reg .prow:hover, .reg .prow:nth-child(even):not(.draft):hover { background: #f4f0fa; }
.num, .total, .stat b, .podium-score, .rank-badge, .dash-tabcount, .judge-pill b, .pc-no, .pc-table, .pr-no b, .pr-table, .pc-students li b { font-variant-numeric: tabular-nums; }

/* registration: the instructor is a column in each row, not a heading */
.reg .plist { --cols: 104px minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, .8fr) 58px; }
.reg .plist.has-table { --cols: 104px minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, .8fr) 114px 58px; }
.pr-inst { min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-inst.none { font-size: 12px; font-weight: 600; color: #7a4d00; }
.reg .pl-head { border-bottom: 1px solid #cfcad9; }
@media (max-width: 860px) {
  .reg .plist, .reg .plist.has-table { --cols: 96px minmax(0, 1fr); }
  .prow > .pr-inst { grid-column: 2; white-space: normal; }
  .prow > .pr-inst::before { content: "Instructor: "; font-weight: 500; color: var(--muted); }
}

/* registration: instructor comes straight after the project number */
.reg .plist { --cols: 104px minmax(0, .8fr) minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 58px; }
.reg .plist.has-table { --cols: 104px minmax(0, .8fr) minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 114px 58px; }
@media (max-width: 860px) { .reg .plist, .reg .plist.has-table { --cols: 96px minmax(0, 1fr); } }

/* registration: column names are buttons that sort */
.pl-sort { display: inline-flex; align-items: center; gap: 5px; justify-self: start; max-width: 100%; margin: -3px -6px; padding: 3px 6px; border: 0; border-radius: 6px; background: transparent; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.pl-sort:hover { background: #ece8f2; color: var(--ink); }
.pl-sort:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.pl-sort.on { color: var(--brand); }
.pl-arrow { font-size: 13px; line-height: 1; opacity: .45; letter-spacing: 0; }
.pl-sort.on .pl-arrow, .pl-sort:hover .pl-arrow { opacity: 1; }
.plist.has-table .pl-head .pl-sort:nth-child(6) { justify-self: center; }

/* registration: Add project in each school heading, an Edit button per row, and the details panel */
.pl-add { margin-left: 4px; padding: 5px 13px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--school-ink) 45%, transparent); background: color-mix(in srgb, var(--school-ink) 12%, transparent); color: var(--school-ink); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pl-add:hover { background: var(--school-ink); color: var(--school); border-color: var(--school-ink); }
.pl-add:focus-visible { outline: 2px solid var(--school-ink); outline-offset: 2px; }
.pl-empty { margin: 0; padding: 18px 21px; font-size: 14px; color: var(--muted); }
.reg .prow button.pc-edit { font-family: inherit; cursor: pointer; }
.reg .prow button.pc-edit:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.reg .prow button.pc-edit:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.reg .prow:hover button.pc-edit { text-decoration: none; }

.pd-panel { --bs-offcanvas-width: min(480px, 100vw); background: #fff; color: #1c1a22; border-left: 0; box-shadow: -18px 0 48px rgba(28, 26, 34, .18); }
.pd-top { padding: 16px 22px 18px; background: var(--school); color: var(--school-ink); }
.pd-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; opacity: .95; }
.pd-crumb span + span::before { content: "\00b7"; margin-right: 8px; }
.pd-crumb .btn-close { margin-left: auto; }
.pd-top h2 { margin: 10px 0 12px; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; }
.pd-top h2.untitled { font-style: italic; font-weight: 600; opacity: .85; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-badges .pc-status { margin: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.pd-table { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1c1a22; font-size: 12px; font-weight: 700; }
.pd-body { padding: 4px 22px 18px; }
.pd-body section { padding: 16px 0; border-bottom: 1px solid #eceaf1; }
.pd-body section:last-of-type { border-bottom: 0; }
.pd-body h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6a6675; }
.pd-desc { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.pd-item dt { font-size: 12.5px; font-weight: 500; color: #6a6675; margin-bottom: 2px; }
.pd-item dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.pd-item dd .pc-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 9px; border: 1px solid #dfdce6; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; white-space: normal; }
.pd-item dd .pc-tag i { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.pd-missing { font-size: 14px; font-weight: 500; color: #9a6a00; }
.pd-students { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pd-students li { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid #eceaf1; border-radius: 10px; background: #faf9fc; }
.pd-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #e9e4f1; color: #3b0f4f; font-size: 14px; font-weight: 800; }
.pd-name { font-size: 15px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pd-size { margin-left: auto; padding: 2px 9px; border-radius: 6px; background: #efedf4; border: 1px solid #e2dfea; font-size: 12px; font-weight: 700; color: #3f3b49; white-space: nowrap; }
.pd-size.none { background: #fdf3d7; border-color: #f0dca0; color: #7a4d00; }
.pd-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fffaeb; border: 1px solid #f5e2b0; font-size: 13.5px; color: #7a4d00; }
.pd-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid #eceaf1; background: #fff; }
.pd-by { margin-right: auto; min-width: 0; font-size: 12.5px; color: #6a6675; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-foot > span:first-child { margin-right: auto; }

/* setup: buildings have a "usual division" column */
.buildingrow { grid-template-columns: 52px 130px 1fr 110px 56px 56px 80px 200px auto; }
@media (max-width: 900px) { .buildingrow { grid-template-columns: 52px 1fr 1fr; } }

/* ==== registration: the Add / Edit project form, second design ====
   Numbered steps on the left with pick-one buttons, a live checklist on the right. */
.pf-modal .modal-dialog { max-width: 1040px; }
.pf-modal .modal-header { padding: 16px 24px; }
.pf-modal .modal-title { font-size: 19px; font-weight: 700; }
.pf-modal .modal-body.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 0; padding: 0; }
.pf-main { padding: 8px 24px 22px; min-width: 0; }
.pf-step { padding: 18px 0 20px; border-bottom: 1px solid #eceaf1; display: grid; gap: 14px; }
.pf-step:last-child { border-bottom: 0; padding-bottom: 4px; }
.pf-step h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.005em; color: #1c1a22; }
.pf-stepno { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #3b0f4f; color: #fff; font-size: 12.5px; font-weight: 700; }
.pf-field { min-width: 0; }
.pf-field.muted > .form-label { color: #a39fae; }
.pf-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
.pf-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pf-modal .form-label { font-size: 13px; font-weight: 600; color: #4a4655; margin-bottom: 5px; }
.pf-modal .form-control, .pf-modal .form-select { min-height: 42px; border-color: #cfcbd8; border-radius: 9px; font-size: 15px; }
.pf-modal .form-control:focus, .pf-modal .form-select:focus { border-color: #5a2a73; box-shadow: 0 0 0 3px rgba(90, 42, 115, .14); }
.pf-modal textarea.form-control { min-height: 84px; }

.pf-choice { display: flex; flex-wrap: wrap; gap: 8px; border-radius: 10px; }
.pf-choice button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px solid #cfcbd8; border-radius: 9px; background: #fff; color: #1c1a22; font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .1s, background .1s, box-shadow .1s; }
.pf-choice button:hover:not(:disabled) { border-color: #8d7a9c; }
.pf-choice button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(90, 42, 115, .22); }
.pf-choice button.on { border-color: #3b0f4f; background: #f6effa; box-shadow: inset 0 0 0 1px #3b0f4f; }
.pf-choice button:disabled { opacity: .45; cursor: not-allowed; }
.pf-choice button i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pf-choice.is-invalid { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc3545; }
.pf-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-cards button { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px 12px 42px; position: relative; font-size: 15px; }
.pf-cards button small { font-size: 12.5px; font-weight: 500; color: #6a6675; }
.pf-cards button::before { content: ""; position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #b9b3c4; background: #fff; }
.pf-cards button.on::before { border-color: #3b0f4f; background: radial-gradient(circle, #3b0f4f 0 42%, #fff 46%); }
.pf-chips button { padding: 7px 13px; border-radius: 999px; font-size: 14px; }
.pf-seg, .pf-yesno { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 3px; background: #efedf4; border-radius: 10px; }
.pf-seg button, .pf-yesno button { border: 0; background: transparent; padding: 7px 18px; border-radius: 8px; font-size: 14px; color: #4a4655; }
.pf-seg button.on, .pf-yesno button.on { background: #fff; color: #1c1a22; box-shadow: 0 1px 3px rgba(28, 26, 34, .18); }
.pf-yesno { display: flex; }
.pf-yesno button { flex: 1; justify-content: center; }

.pf-student { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px; gap: 10px; align-items: center; margin-bottom: 8px; }
.pf-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #efedf4; color: #4a4655; font-size: 13px; font-weight: 700; }

.pf-side { --school: #3b0f4f; padding: 22px 22px 24px; background: #faf9fc; border-left: 1px solid #eceaf1; }
.pf-sidehead { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0 0 14px 12px; margin-bottom: 16px; border-left: 4px solid var(--school); border-bottom: 0; }
.pf-sidehead span { font-size: 12.5px; color: #6a6675; }
.pf-sidehead b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.pf-sidehead .pc-status { margin: 4px 0 0; }
.pf-side h4 { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6a6675; }
.pf-check { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.pf-check li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #4a4655; }
.pf-check li i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid #c4bfce; background: #fff; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; }
.pf-check li.ok { color: #1c1a22; }
.pf-check li.ok i { border-color: #16a34a; background: #16a34a; }
.pf-ready { padding: 9px 12px; border-radius: 9px; background: #fdf3d7; color: #7a4d00; font-size: 13.5px; font-weight: 600; }
.pf-ready.ok { background: #e8f6ec; color: #166534; }
.pf-tip { margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; color: #6a6675; }
.pf-modal .modal-footer { padding: 14px 24px; }
.pf-modal .modal-footer .btn { min-height: 40px; padding-left: 18px; padding-right: 18px; border-radius: 9px; }
.pf-modal .modal-footer .btn-primary { font-weight: 700; }
@media (max-width: 900px) {
  .pf-modal .modal-body.pf-layout { grid-template-columns: 1fr; }
  .pf-side { order: -1; border-left: 0; border-bottom: 1px solid #eceaf1; padding: 16px 20px; }
  .pf-check { grid-template-columns: 1fr 1fr; }
  .pf-tip { display: none; }
  .pf-main { padding: 4px 20px 18px; }
  .pf-two, .pf-three, .pf-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .pf-student { grid-template-columns: 28px minmax(0, 1fr); } .pf-student select { grid-column: 2; } }
.pf-field > .form-label { display: block; }
.pf-modal .form-control, .pf-modal .form-select { background-color: #fff; }
.pf-modal .form-control:disabled, .pf-modal .form-select:disabled { background-color: #f4f3f7; }

/* form: Yes / No and 1 / 2 students are two clearly separate buttons; the chosen one is filled */
.pf-seg, .pf-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; background: transparent; border-radius: 9px; }
.pf-seg { display: inline-grid; }
.pf-seg button, .pf-yesno button { justify-content: center; min-height: 42px; padding: 8px 18px; border: 1.5px solid #b9b3c4; border-radius: 9px; background: #fff; color: #1c1a22; font-size: 15px; font-weight: 600; box-shadow: none; }
.pf-seg button:hover:not(:disabled), .pf-yesno button:hover:not(:disabled) { border-color: #3b0f4f; background: #f6effa; }
.pf-seg button.on, .pf-yesno button.on { border-color: #3b0f4f; background: #3b0f4f; color: #fff; box-shadow: none; }
.pf-seg button.on::before, .pf-yesno button.on::before { content: "\2713"; font-weight: 800; margin-right: 2px; }

/* registration: the project number and the status each have their own column */
.reg .plist { --cols: 34px 104px minmax(0, .8fr) minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 58px; }
.reg .plist.has-table { --cols: 34px 104px minmax(0, .8fr) minmax(0, 2.3fr) minmax(0, 1.2fr) minmax(0, 1.5fr) 114px 58px; }
.reg .pl-head, .reg .prow { column-gap: 14px; }
.reg .pr-no { display: block; font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; }
.reg .pl-head .pl-sort:first-child { justify-self: center; }
.pr-status { min-width: 0; }
.reg .prow .pc-status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 96px; margin: 0; padding: 4px 0; border-radius: 7px; font-size: 12.5px; font-weight: 700; border: 1px solid transparent; }
.reg .prow .pc-status::before { width: 7px; height: 7px; }
.reg .prow .pc-status.is-done { background: #eaf6ee; border-color: #cbe7d3; color: #166534; }
.reg .prow .pc-status.is-draft { background: #fff; border: 1px dashed #d9a93a; color: #8a5a00; }
.reg .prow .pc-status.is-draft::before { background: transparent; box-shadow: inset 0 0 0 1.5px #d9a93a; }
.plist.has-table .pl-head .pl-sort:nth-child(6) { justify-self: start; }
.plist.has-table .pl-head .pl-sort:nth-child(7) { justify-self: center; }
@media (max-width: 860px) {
  .reg .plist, .reg .plist.has-table { --cols: 34px minmax(0, 1fr); }
  .reg .prow > * { grid-column: 2; }
  .reg .prow > .pr-no { grid-column: 1; grid-row: 1; }
  .reg .prow > .pr-table { grid-column: 2; grid-row: auto; }
}

/* registration: the goal in a school heading is a progress ring with the count beside it */
.reg .pl-school { padding-top: 9px; padding-bottom: 9px; }
.reg .pl-goal { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 5px; border-radius: 999px; background: color-mix(in srgb, var(--school-ink) 14%, transparent); color: var(--school-ink); opacity: 1; font-size: inherit; font-weight: inherit; }
.pl-ring { position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--school-ink) calc(var(--pct) * 1%), color-mix(in srgb, var(--school-ink) 26%, transparent) 0); }
.pl-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--school); }
.pl-ring span { position: relative; font-size: 10.5px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pl-goaltext { display: flex; flex-direction: column; line-height: 1.15; }
.pl-goaltext b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-goaltext b i { font-style: normal; font-weight: 600; opacity: .8; }
.pl-goaltext small { font-size: 11px; font-weight: 600; opacity: .85; white-space: nowrap; }
.pl-goal.met .pl-ring span { font-size: 15px; }
@media (max-width: 860px) { .reg .pl-goal { margin-left: 0; } }

/* registration: school headings get a soft sheen from the school color to a slightly deeper shade */
.reg .pl-school { background: linear-gradient(120deg, var(--school) 0%, color-mix(in srgb, var(--school) 82%, #0b0614) 100%); }
.reg .pl-school-name { letter-spacing: 0; }
.reg .pl-school .pl-pill, .reg .pl-school .pl-pill.ok { background: color-mix(in srgb, var(--school-ink) 16%, transparent); color: var(--school-ink); border-color: transparent; font-weight: 600; }
.reg .pl-school .pl-pill.warn { background: #ffe9a8; color: #5c3b00; }

/* ==== registration: header with overall progress, view tabs and tiles (option B with tabs) ==== */
.reg .rg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 18px 22px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(28, 26, 34, .05); }
.rg-title { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rg-title h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.rg-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-badges:empty { display: none; }
.rg-badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.rg-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rg-badge.red { background: #fef3f2; border-color: #f6cfcb; color: #a8231a; }
.rg-badge.amber { background: #fffaeb; border-color: #f5e2b0; color: #8a5a00; }
.rg-badge.blue { background: #f1f6ff; border-color: #cfe0fb; color: #1d4fa8; }
.rg-total { flex: 1 1 380px; min-width: 260px; }
.rg-line { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 14.5px; font-weight: 700; }
.rg-line span:last-child { color: var(--muted); font-weight: 600; }
.rg-bar { display: flex; height: 10px; border-radius: 999px; background: #ebe8f0; overflow: hidden; }
.rg-bar i { display: block; height: 100%; transition: width .3s; }
.rg-bar .done { background: var(--brand); }
.rg-bar .part { background: #e5b34a; }
.rg-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.rg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rg-legend b { color: var(--ink); font-weight: 800; }
.rg-legend i { width: 9px; height: 9px; border-radius: 50%; }
.rg-legend i.done { background: var(--brand); }
.rg-legend i.part { background: #e5b34a; }
.rg-legend i.open { background: #ebe8f0; box-shadow: inset 0 0 0 1px #cfc9da; }
.reg .rg-add { height: 44px; padding: 0 22px; border-radius: 10px; font-size: 15px; font-weight: 700; }

.rg-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.rg-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: #4a4655; cursor: pointer; }
.rg-tab em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #e7e3ee; color: #4a4655; }
.rg-tab:hover { background: #ece8f2; color: var(--ink); }
.rg-tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28, 26, 34, .14), inset 0 -3px 0 var(--brand); }
.rg-tab.on em { background: var(--brand); color: #fff; }

.rg-tiles { --tile-done: var(--brand); display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-bottom: 18px; }
.rg-tiles.view-shirts { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.rg-tile { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: 12px 14px 11px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--sc); border-radius: 12px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: box-shadow .12s, transform .12s, border-color .12s; }
.rg-tile:hover { box-shadow: 0 6px 16px rgba(28, 26, 34, .09); transform: translateY(-1px); }
.rg-tile:focus-visible { outline: 3px solid rgba(90, 42, 115, .35); outline-offset: 2px; }
.rg-tile.on { border-color: var(--sc); box-shadow: 0 0 0 2px var(--sc); }
.rg-tile .t-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-tile .t-name i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--sc); }
.rg-tile .t-big { margin: 7px 0 7px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.rg-tile .t-big small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.rg-tile .t-bar { display: flex; height: 6px; border-radius: 999px; background: #ebe8f0; overflow: hidden; }
.rg-tile .t-bar i { display: block; height: 100%; }
.rg-tile .t-sub { margin-top: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-tile .t-sub.warn { color: #8a5a00; font-weight: 600; }
.rg-tile.all { --sc: var(--brand); background: var(--brand); color: #fff; border-color: var(--brand); }
.rg-tile.all .t-big small, .rg-tile.all .t-sub { color: #e3d7ec; }
.rg-tile.all .t-bar { background: rgba(255, 255, 255, .22); }
.rg-tile.all { --tile-done: #fff; }
.rg-tile.all:not(.on) { background: #fff; color: var(--ink); border-top-color: var(--brand); }
.rg-tile.all:not(.on) .t-big small, .rg-tile.all:not(.on) .t-sub { color: var(--muted); }
.rg-tile.all:not(.on) .t-bar { background: #ebe8f0; }
.rg-tile.all:not(.on) { --tile-done: var(--brand); }
.rg-tile.all.on { box-shadow: 0 4px 14px rgba(59, 15, 79, .28); }
.rg-tiles .rg-tile.all .t-bar i[style*="tile-done"] { background: var(--tile-done) !important; }

.rg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.rg-active { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-active:empty { display: none; }
.rg-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid #cdbfdc; background: #f3ecf8; color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rg-chip b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(59, 15, 79, .12); font-size: 14px; line-height: 1; }
.rg-chip:hover b { background: var(--brand); color: #fff; }
.rg-menu { padding: 6px; border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 19, 38, .16); }
.rg-menu .dropdown-item { border-radius: 6px; padding: 7px 12px; font-size: 14px; }
@media (max-width: 700px) { .reg .rg-add { width: 100%; } .rg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* registration tiles: always one row. Every tile gets an equal share of the width; names may take two lines,
   and on a narrow screen the row scrolls sideways instead of wrapping. */
.rg-tiles, .rg-tiles.view-shirts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: -2px -2px 12px; scrollbar-width: thin; }
.rg-tile { padding: 10px 12px; }
.rg-tile .t-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; min-height: 2.5em; line-height: 1.25; font-size: 13px; overflow: hidden; }
.rg-tile .t-name i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }
.rg-tile .t-big { margin: 6px 0; font-size: 24px; }
.rg-tile .t-big small { font-size: 12.5px; }
.rg-tile .t-sub { margin-top: 6px; font-size: 12px; }
@media (max-width: 700px) { .rg-tiles { grid-template-columns: none; grid-auto-columns: 132px; } }

/* registration: the header is now just the title and its notices, on one line */
.reg .rg-head { padding: 0; margin-bottom: 14px; background: transparent; border: 0; box-shadow: none; }
.rg-title { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* ==== map tab: Assign tables ==== */
.at-note { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 999px; background: #e8f6ec; color: #166534; font-size: 13px; font-weight: 600; }
.at-modal .modal-dialog { max-width: 1240px; }
.at-modal .modal-content { border: 0; border-radius: 14px; }
.at-modal .modal-header { padding: 16px 24px; }
.at-modal .modal-title { font-weight: 700; }
.at-sub { font-size: 13px; color: #6a6675; margin-top: 2px; }
.at-body { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0; padding: 0; }
.at-rules { padding: 6px 22px 22px; border-right: 1px solid #eceaf1; }
.at-section { padding: 16px 0; border-bottom: 1px solid #eceaf1; }
.at-section:last-child { border-bottom: 0; }
.at-section h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; }
.at-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.at-choice button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 11px; border: 1.5px solid #cfcbd8; border-radius: 9px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.at-choice button b { font-size: 14px; font-weight: 700; }
.at-choice button small { font-size: 11.5px; color: #6a6675; line-height: 1.3; }
.at-choice button:hover { border-color: #8d7a9c; }
.at-choice button.on { border-color: #3b0f4f; background: #f6effa; box-shadow: inset 0 0 0 1px #3b0f4f; }
.at-check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; cursor: pointer; }
.at-check .form-check-input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.at-check span { display: flex; flex-direction: column; }
.at-check b { font-size: 14px; font-weight: 600; }
.at-check small { font-size: 12px; color: #6a6675; }
.at-spare { width: 64px; flex: none; }
.at-hint { margin: 0 0 8px; font-size: 12.5px; color: #6a6675; line-height: 1.45; }
.at-groups { display: grid; gap: 6px; }
.at-group { display: grid; grid-template-columns: 22px minmax(0, 1fr) 118px; grid-template-areas: "move name range" "move state state"; gap: 3px 10px; align-items: center; padding: 8px 10px; border: 1px solid #e4e1ea; border-left: 4px solid var(--gc); border-radius: 10px; background: #fff; }
.at-move { grid-area: move; display: flex; flex-direction: column; gap: 2px; }
.at-move button { width: 22px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: #f1eef6; color: #6a6675; font-size: 9px; line-height: 1; cursor: pointer; }
.at-move button:hover:not(:disabled) { background: #3b0f4f; color: #fff; }
.at-move button:disabled { opacity: .35; cursor: default; }
.at-gname { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; }
.at-gname i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--gc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.at-gname span { display: flex; flex-direction: column; min-width: 0; }
.at-gname b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-gname small { font-size: 12px; color: #6a6675; }
.at-grange { grid-area: range; }
.at-grange input { font-weight: 600; text-align: center; }
.at-gstate { grid-area: state; font-size: 12px; font-weight: 600; }
.at-gstate.ok { color: #166534; }
.at-gstate.bad { color: #b42318; }
.at-preview { padding: 16px 22px 22px; min-width: 0; background: #faf9fc; }
.at-previewhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.at-previewhead h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.at-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: #6a6675; }
.at-summary b { color: #1c1a22; font-size: 15px; font-weight: 800; }
.at-summary .bad, .at-summary .bad b { color: #b42318; }
.at-mapbox { padding: 8px; border: 1px solid #e4e1ea; border-radius: 12px; background: #fff; margin-bottom: 8px; }
.at-map { display: block; width: 100%; height: auto; }
.at-map .mi-table.at-free rect { fill: #fff; stroke: #c9c3d4; stroke-dasharray: 4 3; }
.at-map .mi-table.at-free text { fill: #b0aabb; }
.at-modal .modal-footer { padding: 14px 24px; }
@media (max-width: 1000px) { .at-body { grid-template-columns: 1fr; } .at-rules { border-right: 0; border-bottom: 1px solid #eceaf1; } }

/* ---- map locations: tabs above every map */
.loc-tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; margin: 4px 0 0; border-bottom: 2px solid var(--line); }
.loc-tab { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; height: 40px; padding: 0 16px; margin-bottom: -2px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: transparent; font: inherit; font-size: 14.5px; font-weight: 600; color: #4a4655; cursor: pointer; }
.loc-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-tab em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #e7e3ee; color: #4a4655; }
.loc-tab:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.loc-tab.on { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: inset 0 3px 0 var(--brand); }
.loc-tab.on em { background: var(--brand); color: #fff; }
.loc-tool { height: 30px; margin: 0 0 5px 4px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: #4a4655; cursor: pointer; }
.loc-tool:hover { border-color: var(--brand); color: var(--brand); }
.loc-tool.danger:hover { border-color: #b42318; color: #b42318; }
.loc-tool.add { margin-left: auto; border-style: dashed; color: var(--brand); }
.loc-tabs + .editor .mapbox, .loc-tabs + .mapbox { border-top-left-radius: 0; }
.at-loctabs { margin-bottom: 0; }
.at-loctabs .loc-tab { height: 34px; font-size: 13px; }

/* ==== map tab: Place by hand ==== */
#mapedit.placing .editor { grid-template-columns: minmax(0, 1fr) 380px; }
#mapedit.placing #assignTables, #mapedit.placing #mapEdit { display: none; }
#mapedit.placing #placeProjects { background: var(--brand); color: #fff; }
#mapedit.placing .editor .mi-table { cursor: pointer; }
.place-panel { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 90px); padding: 14px; border-radius: 12px; }
.pp-head { display: flex; align-items: center; justify-content: space-between; }
.pp-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.pp-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pp-filter { display: flex; gap: 4px; padding: 3px; background: #f1eef6; border-radius: 9px; }
.pp-filter button { flex: 1; border: 0; border-radius: 7px; background: transparent; padding: 6px 8px; font: inherit; font-size: 13px; font-weight: 600; color: #4a4655; cursor: pointer; }
.pp-filter button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28, 26, 34, .15); }
.pp-filter em { font-style: normal; font-weight: 800; color: var(--brand); }
.pp-picked { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 10px; border-radius: 9px; background: #fdf3d7; color: #5c3b00; font-size: 13px; }
.pp-list { overflow-y: auto; min-height: 0; flex: 1; margin: 0 -6px; padding: 0 6px; }
.pp-list section + section { margin-top: 10px; }
.pp-list h4 { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 7px; margin: 0 0 4px; padding: 6px 2px; background: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #4a4655; }
.pp-list h4 i { width: 9px; height: 9px; border-radius: 50%; }
.pp-list h4 em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--muted); }
.pp-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid #ebe8f0; border-radius: 9px; background: #fff; cursor: grab; }
.pp-row + .pp-row { margin-top: 5px; }
.pp-row:hover { border-color: #b9a6c9; background: #fbf8fd; }
.pp-row.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(59, 15, 79, .25); background: #f6effa; }
.pp-row:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.pp-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pp-main b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-main small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-table { display: inline-flex; align-items: center; gap: 2px; flex: none; padding: 2px 4px 2px 9px; border-radius: 7px; background: #efe9f5; color: var(--brand); font-size: 13px; font-weight: 800; }
.pp-table button { width: 20px; height: 20px; border: 0; border-radius: 5px; background: transparent; color: #8b8696; font-size: 15px; line-height: 1; cursor: pointer; }
.pp-table button:hover { background: #fdeaea; color: #b42318; }
.pp-table.none { padding: 2px 9px; background: #fdf3d7; color: #7a4d00; font-size: 11.5px; font-weight: 700; }
.pp-empty { margin: 16px 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.pp-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #e8f6ec; color: #166534; font-size: 12.5px; font-weight: 600; }
.editor .mi-table.pl-free rect { fill: #fff; stroke: #b9b3c4; stroke-width: 1.5; stroke-dasharray: 5 3; }
.editor .mi-table.pl-free text { fill: #9a95a5; }
.editor .mi-table.pl-target rect { stroke: var(--brand-2); }
.editor .mi-table.pl-picked rect { stroke: #e0007a; stroke-width: 4; }
.editor .mi-table.pl-over rect { stroke: #16a34a; stroke-width: 4; stroke-dasharray: none; }
@media (max-width: 900px) { #mapedit.placing .editor { grid-template-columns: 1fr; } .place-panel { position: static; max-height: 70vh; } }

/* ==== scoring sheet: 100-point rubric with sliders, guidance at the top and a No show button ==== */
.guidance { margin-bottom: 14px; padding: 12px 16px; border: 1px solid #cfe0fb; border-radius: 12px; background: #f1f6ff; }
.guidance summary { font-size: 15px; font-weight: 800; color: #1d4fa8; cursor: pointer; }
.guidance ul { margin: 8px 0 0; padding-left: 20px; }
.guidance li { font-size: 15px; line-height: 1.45; margin-bottom: 3px; }
.noshow-btn { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 18px; padding: 12px 16px; border: 2px dashed #e0a3a3; border-radius: 12px; background: #fff; color: #8f1d14; text-align: left; font: inherit; cursor: pointer; }
.noshow-btn b { font-size: 17px; white-space: nowrap; }
.noshow-btn span { font-size: 15px; color: #6a2a24; }
.noshow-btn::before { content: ""; width: 24px; height: 24px; flex: none; border-radius: 6px; border: 2px solid #d48a8a; background: #fff; }
.noshow-btn.on { border-style: solid; border-color: #b42318; background: #fef3f2; }
.noshow-btn.on::before { content: "\2713"; display: grid; place-items: center; background: #b42318; border-color: #b42318; color: #fff; font-weight: 800; font-size: 15px; }
.noshow-btn:disabled { cursor: default; opacity: .75; }
.criterion.off { opacity: .35; pointer-events: none; }
.crit-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.crit-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.crit-max { font-size: 14px; color: var(--muted); font-weight: 600; }
.crit-points { margin-left: auto; padding: 3px 12px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.crit-points.unset { background: #fdf3d7; color: #7a4d00; font-size: 14px; font-weight: 700; }
.level em { display: block; margin: -2px 0 6px; font-style: normal; font-size: 14px; font-weight: 700; color: #6a6675; }
.level b { margin-bottom: 2px; }
.crit-slide { display: flex; align-items: flex-start; gap: 14px; margin-top: 12px; padding: 12px 16px 6px; border-radius: 12px; background: #f6f3f9; }
.crit-label { padding-top: 6px; font-size: 13px; font-weight: 700; color: #6a6675; white-space: nowrap; }
.crit-track { position: relative; flex: 1; padding-bottom: 22px; }
.crit-slider { --fill: 50%; width: 100%; height: 34px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.crit-slider::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) var(--fill), #ddd6e5 var(--fill)); }
.crit-slider::-moz-range-track { height: 10px; border-radius: 999px; background: #ddd6e5; }
.crit-slider::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--brand); }
.crit-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -11px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(28, 26, 34, .3); }
.crit-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(28, 26, 34, .3); }
.crit-slider.unset::-webkit-slider-runnable-track { background: #ddd6e5; }
.crit-slider.unset::-moz-range-progress { background: transparent; }
.crit-slider.unset::-webkit-slider-thumb { border-color: #b9b3c4; background: #f3f1f6; }
.crit-slider.unset::-moz-range-thumb { border-color: #b9b3c4; background: #f3f1f6; }
.crit-slider:disabled { cursor: default; }
.crit-scale { position: absolute; left: 16px; right: 16px; bottom: 0; height: 18px; }
.crit-scale span { position: absolute; transform: translateX(-50%); font-size: 12.5px; font-weight: 700; color: #8b8696; }
.submitted.old { background: #fffaeb; color: #7a4d00; border-color: #f5e2b0; }
.noshow-tag { padding: 1px 8px; border-radius: 999px; background: #fef3f2; color: #b42318; font-size: 12px; font-weight: 700; }
@media (max-width: 700px) { .crit-slide { flex-direction: column; gap: 4px; } .noshow-btn { flex-wrap: wrap; } }

/* scoring sheet: tiles run low to high like the slider, and each tile's width matches its share of the 5-25 scale
   (5-9, 10-14, 15-19, 20-25), so each tile sits right above the stretch of slider that scores it. */
.criterion .levels { grid-template-columns: 4.5fr 5fr 5fr 5.5fr; }
.crit-slide { display: block; margin-top: 8px; padding: 6px 0 4px; background: transparent; }
.crit-track { padding-bottom: 20px; }
.crit-scale { left: 13px; right: 13px; }
@media (max-width: 900px) { .criterion .levels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .criterion .levels { grid-template-columns: 1fr; } }

/* ==== scoring sheet, option C: tap a level, then the exact points inside that tile ==== */
.criterion .level { cursor: pointer; user-select: none; }
.criterion .level:focus-visible { outline: 3px solid rgba(90, 42, 115, .35); outline-offset: 2px; }
.criterion .level.open { border-color: var(--brand); border-width: 3px; padding: 11px 13px; background: #f6effa; }
.criterion .level.on { background: #ead9f5; }
.criterion .level.locked { cursor: default; }
.criterion .level.locked:not(.on) { opacity: .5; }
.criterion .pts { display: none; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.criterion .level.open .pts { display: flex; }
.criterion .pt { flex: 1 0 40px; height: 46px; padding: 0; border: 2px solid #cdbfdc; border-radius: 10px; background: #fff; color: var(--brand); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.criterion .pt:hover:not(:disabled) { border-color: var(--brand); }
.criterion .pt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.criterion .pt:disabled { cursor: default; }
.criterion .pt:disabled:not(.on) { opacity: .55; }
.criterion .levels { grid-auto-rows: auto; align-items: stretch; }

/* ==== iPads ====
   The judges, staff and organizers use iPads, held either way up (about 768-1024 wide in portrait, 1024-1366 in
   landscape). These rules make every page fit and every control comfortable to tap. */

/* judging page: one slim line of categories (scrolls sideways if it has to), then the tabs, hint and zoom on one line */
.judge-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-width: 0; }
.judge-legend { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.judge-legend::-webkit-scrollbar { display: none; }
.judge-legend > * { flex: none; }
.judge-progress { white-space: nowrap; }
.map-bar { display: flex; align-items: flex-end; gap: 10px; border-bottom: 2px solid var(--line); }
.map-bar .loc-tabs { flex: 1; min-width: 0; border-bottom: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.map-bar .loc-tabs[hidden] { display: none !important; }
.map-bar .loc-tabs + .map-hint { display: none; }
.map-bar .loc-tabs[hidden] + .map-hint { display: inline; flex: 1; }
.map-hint { padding-bottom: 10px; }
.map-zoom { display: flex; gap: 6px; padding-bottom: 6px; flex: none; }

/* dialogs use the whole width of an iPad instead of Bootstrap's narrow default below 992px */
@media (min-width: 768px) and (max-width: 1199.98px) {
  #sheet .modal-dialog, .pf-modal .modal-dialog { max-width: calc(100vw - 32px); }
}
/* the rubric keeps its four tiles side by side on an iPad; two per row only on a phone */
@media (max-width: 900px) { .criterion .levels { grid-template-columns: 4.5fr 5fr 5fr 5.5fr; } }
@media (max-width: 700px) { .criterion .levels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .criterion .levels { grid-template-columns: 1fr; } }

/* Projects page on an upright iPad: each project on two lines instead of one tall stack.
   line 1: # · project · students · Edit       line 2: status · instructor · division · table */
@media (min-width: 600px) and (max-width: 860px) {
  .reg .plist, .reg .plist.has-table { --cols: 34px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; }
  .reg .plist .prow { grid-template-areas: "no main main stud edit" "no status inst kind table"; row-gap: 8px; align-items: center; }
  .reg .plist .prow > .pr-no { grid-area: no; align-self: start; padding-top: 2px; }
  .reg .plist .prow > .pr-main { grid-area: main; }
  .reg .plist .prow > .pc-students { grid-area: stud; }
  .reg .plist .prow > :last-child { grid-area: edit; justify-self: end; }
  .reg .plist .prow > .pr-status { grid-area: status; }
  .reg .plist .prow > .pr-inst { grid-area: inst; white-space: nowrap; }
  .reg .plist .prow > .pr-inst::before { content: none; }
  .reg .plist .prow > .pr-kind { grid-area: kind; }
  .reg .plist .prow > .pr-table { grid-area: table; justify-self: end; }
  .reg .plist .pr-main h3 { white-space: normal; }
  .reg .plist .pr-main p { white-space: nowrap; }
}

/* touch screens: controls at least 44px tall (Apple's guideline), and 16px text in boxes so Safari does not zoom
   the page in when a box is tapped */
@media (pointer: coarse), (hover: none) {
  * { -webkit-tap-highlight-color: transparent; }
  .btn, .nav-link, .form-control, .form-select, .status-pill, .loc-tab, .loc-tool, .pl-add, .pc-edit, .judge-assign,
  .rg-tab, .dash-tab, .pp-filter button, .rg-chip, .pl-sort, .seg button, .pf-choice button { min-height: 44px; }
  .btn-sm { padding-top: .5rem; padding-bottom: .5rem; }
  input, select, textarea, .form-control, .form-select { font-size: 16px !important; }
  .btn-close { width: 1.5em; height: 1.5em; }
  .judge-remove, .pp-table button, .judge-tag button { min-width: 38px; min-height: 38px; }
  .rg-chip b { width: 26px; height: 26px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .reg .prow { padding-top: 14px; padding-bottom: 14px; }
  .pt { height: 52px !important; font-size: 19px !important; }
  .map-zoom .btn { min-width: 44px; }
}

/* ---- map equipment (easels, projectors, desks...): a light box with a line icon and a small label */
.mi-easel rect, .mi-poster rect, .mi-projector rect, .mi-screen rect, .mi-desk rect, .mi-monitor rect, .mi-round rect, .mi-chair rect,
.mi-power rect, .mi-checkin rect, .mi-water rect, .mi-trash rect, .mi-firstaid rect { fill: #fff; stroke: #8d7a9c; stroke-width: 1.5; }
.mi-power rect { fill: #fff8e1; stroke: #d39b00; }
.mi-water rect { fill: #eef6ff; stroke: #3b7fd1; }
.mi-firstaid rect { fill: #fff1f1; stroke: #c62828; }
.mi-checkin rect { fill: #f3ecf8; stroke: var(--brand); }
.mi-round rect { fill: #cfc7d6; }
.mi-icon { fill: none; stroke: #4a3d58; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.mi-power .mi-icon { stroke: #b07e00; fill: #ffd54f; }
.mi-water .mi-icon { stroke: #2f6fbf; }
.mi-firstaid .mi-icon { stroke: #c62828; }
.mi-equip-label { font-weight: 600 !important; fill: #4a3d58 !important; pointer-events: none; }
.map-add-menu { max-height: 70vh; overflow-y: auto; min-width: 340px; }
.map-add-menu .dropdown-header { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.map-add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 0 2px; }
.map-add-grid .dropdown-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; }
.map-add-grid .dropdown-item b { display: inline; font-size: 13.5px; font-weight: 600; }
.map-add-grid svg { flex: none; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* map editor: the side panel keeps its place while editing, so selecting an item does not resize the map */
#mapedit.editing.nosel .editor { grid-template-columns: 1fr 270px; }
#mapedit.editing.nosel #editPanel { display: block; }
#mapedit.editing #editPanel { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; }

/* Projects page tiles: a clearer outline and a soft shadow so each tile stands apart from the page */
.rg-tile { border: 1.5px solid #c9c2d4; border-top: 4px solid var(--sc); box-shadow: 0 1px 3px rgba(28, 26, 34, .08); }
.rg-tile:hover { border-color: #a99fb8; border-top-color: var(--sc); }
.rg-tile.all:not(.on) { border-color: #c9c2d4; border-top-color: var(--brand); }

/* project details footer: buttons keep to one line; the "last changed" note shortens instead */
.pd-foot .btn { flex: none; white-space: nowrap; }
.pd-foot .pd-by { flex: 1 1 auto; }

/* ==== Add / Edit project, calmer layout ====
   Gray page, one white card per part (Project, Judging, Students, Instructor and table). Each card's title and a short
   note sit on the left, the boxes on the right. Plain dropdowns and two-way switches; the "still needed" list is one
   line in the footer. Fewer borders and one accent color, so it is easy on the eyes. */
.pf-modal .modal-dialog { max-width: 880px; }
.pf-modal .modal-header { align-items: flex-start; gap: 14px; padding: 18px 26px 16px; border-bottom: 1px solid #ebe8f0; }
.pf-modal .modal-header > div:first-child { flex: 1; min-width: 0; }
.pf-modal .modal-title { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.pf-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: 13.5px; color: #6a6675; }
.pf-sub .pc-status { margin-left: 6px; }
.pf-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pf-delete { display: inline-flex; align-items: center; gap: 7px; margin-right: 12px; padding: 7px 14px; border: 1.5px solid #f1b8b2 !important; border-radius: 10px;
  background: #fff5f4; color: #b42318 !important; text-decoration: none !important; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.pf-delete::before { content: ''; width: 15px; height: 15px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat; }
.pf-delete:hover, .pf-delete:focus-visible { background: #b42318; border-color: #b42318 !important; color: #fff !important; }
.pf-delete:disabled { opacity: .5; }
.pf-modal .modal-body.pf-page { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 22px; background: #f6f5f9; }
.pf-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px 26px; padding: 18px 22px; background: #fff; border: 1px solid #e6e2ec; border-radius: 12px; }
.pf-cardhead h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; color: #1c1a22; }
.pf-cardhead p { margin: 0; font-size: 13px; line-height: 1.45; color: #7a7585; }
.pf-cardbody { display: grid; gap: 14px; min-width: 0; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pf-grid .pf-field.wide { grid-column: span 1; }
.pf-modal .form-label { font-size: 13px; font-weight: 600; color: #4a4655; margin-bottom: 5px; }
.pf-modal .form-control, .pf-modal .form-select { min-height: 42px; border: 1px solid #d3cfdb; border-radius: 8px; font-size: 15px; background-color: #fff; box-shadow: none; }
.pf-modal .form-control:focus, .pf-modal .form-select:focus { border-color: #7a5a92; box-shadow: 0 0 0 3px rgba(90, 42, 115, .12); }
.pf-modal .form-select:disabled { background-color: #f4f3f7; color: #9a95a5; }
.pf-modal textarea.form-control { min-height: 76px; }
.pf-modal .form-text { font-size: 12.5px; color: #8a8594; }
/* two-way switches (type, number of students, yes / no) */
.pf-modal .pf-seg, .pf-modal .pf-yesno { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 3px; background: #f0eef4; border: 0; border-radius: 9px; }
.pf-modal .pf-yesno, .pf-modal .pf-type { display: grid; }
.pf-modal .pf-seg button, .pf-modal .pf-yesno button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 7px; background: transparent; color: #4a4655; font-size: 14px; font-weight: 600; box-shadow: none; justify-content: center; }
.pf-modal .pf-seg button:hover:not(:disabled), .pf-modal .pf-yesno button:hover:not(:disabled) { background: rgba(255, 255, 255, .7); border: 0; }
.pf-modal .pf-seg button.on, .pf-modal .pf-yesno button.on { background: #fff; color: #3b0f4f; box-shadow: 0 1px 3px rgba(28, 26, 34, .16); }
.pf-modal .pf-seg button.on::before, .pf-modal .pf-yesno button.on::before { content: none; }
.pf-modal .pf-choice.is-invalid { box-shadow: 0 0 0 2px #dc3545; }
/* students */
.pf-students-head { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px; gap: 10px; margin-bottom: 5px; font-size: 12.5px; font-weight: 600; color: #7a7585; }
.pf-students-head span:first-child { grid-column: 2; }
.pf-modal .pf-num { background: #f0eef4; color: #6a6675; }
/* footer: what is still needed, then the buttons */
.pf-modal .modal-footer { gap: 10px; padding: 14px 26px; border-top: 1px solid #ebe8f0; }
.pf-status { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; font-size: 13.5px; color: #7a4d00; }
.pf-status i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #e5a50a; }
.pf-status span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-status b { font-weight: 700; }
.pf-status.ok { color: #166534; }
.pf-status.ok i { background: #16a34a; }
@media (max-width: 720px) {
  .pf-card { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-status { flex-basis: 100%; }
}

.pf-modal .pf-type button { white-space: nowrap; padding-left: 10px; padding-right: 10px; }

/* ==== use the screen ====
   Pages grow with the window (up to a comfortable 1800px on very wide monitors) instead of stopping at 1280px,
   and the side margins grow a little on big screens. Settings cards keep their own reading widths. */
.wrap, .wrap.reg { max-width: min(1800px, 100%); padding-left: clamp(12px, 2vw, 32px); padding-right: clamp(12px, 2vw, 32px); }
/* dashboard category tabs: share the row when there is room, and only scroll sideways when there is not */
.dash-tabs { flex-wrap: nowrap; }
.dash-tab { flex: 1 1 auto; justify-content: center; min-width: max-content; }
/* the leader cards and ranking table follow the wider page */
.podium { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* dashboard header: the icon boxes and the progress ring keep their own layout (the label rule above is for text) */
.dash-hero .stat .stat-ico, .dash-hero .stat .stat-ring { display: grid; place-items: center; margin-top: 0; color: inherit; font-size: inherit; }
.dash-hero .stat .stat-ico { color: #7dd3fc; }
.dash-hero .stat .stat-ring em { font-size: 11.5px; }
.dash-hero .stat > div { min-width: 0; }

/* dashboard: category tiles above the ranking (one per category, no "all") */
.dash-cats { margin: 0 0 14px; }
.dash-cats + .podium, .dash-cats + .dash-panel, .dash-cats + .podium + .dash-panel { border-radius: 12px; }
.dash-cats ~ .podium { border-radius: 12px 12px 0 0; border-bottom: 0; }
.dash-cats ~ .dash-panel { border-top-left-radius: 0; border-top-right-radius: 0; }
.dash-cats + .dash-panel { border-radius: 12px; }
.cat-tile .t-sub b { font-weight: 800; color: var(--ink); }
.cat-tile.on { background: color-mix(in srgb, var(--sc) 9%, #fff); }
/* dashboard category tiles: wrap onto a second row on a narrow screen instead of scrolling, and mark the chosen one
   with the brand color (category colors like bright green are too loud as an outline) */
.rg-tiles.dash-cats { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); overflow: visible; }
.cat-tile.on { border-color: var(--brand); border-top-color: var(--sc); box-shadow: 0 0 0 2px var(--brand); background: #fbf8fd; }

/* ==== dashboard podium: 2nd · 1st · 3rd, the winner in the middle on the highest step ==== */
.podium.podium-stage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 0 12px; padding: 26px 22px 0; background: linear-gradient(180deg, #fbf9fd, #fff); }
.podium-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.podium-col.p2 { grid-column: 1; }
.podium-col.p1 { grid-column: 2; }
.podium-col.p3 { grid-column: 3; }
.podium-stage .podium-card { position: relative; margin: 0 6px -1px; padding: 16px 16px 14px; text-align: center; border-radius: 12px 12px 0 0; border: 1px solid #e3deea; border-bottom: 0; background: #fff; box-shadow: 0 -2px 10px rgba(28, 26, 34, .04); }
.podium-stage .podium-card.p1 { padding-top: 22px; background: linear-gradient(180deg, #fffbea, #fff); border-color: #ecd47a; }
.podium-crown { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #fde68a, #eab308); color: #6b4700; font-size: 16px; box-shadow: 0 2px 6px rgba(234, 179, 8, .45); }
.podium-stage .podium-score { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.podium-stage .podium-card.p1 .podium-score { font-size: 32px; }
.podium-stage .podium-score small { font-size: 13px; font-weight: 600; color: var(--muted); }
.podium-stage .podium-card h4 { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.podium-stage .podium-card.p1 h4 { font-size: 17px; }
.podium-stage .podium-card p { margin: 3px 0 8px; font-size: 13px; color: var(--muted); white-space: normal; }
.podium-stage .podium-foot { justify-content: center; gap: 4px 12px; margin-top: 0; font-size: 12.5px; }
.podium-step { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 10px 10px 0 0; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.podium-step b { font-size: 34px; font-weight: 800; line-height: 1; }
.podium-step span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .95; }
.podium-col.p1 .podium-step { height: 128px; background: linear-gradient(180deg, #f2c94c, #d39b06); }
.podium-col.p2 .podium-step { height: 92px; background: linear-gradient(180deg, #c3cbd5, #8f9aa8); }
.podium-col.p3 .podium-step { height: 64px; background: linear-gradient(180deg, #e0a06c, #b4672f); }
.podium-col.p1 .podium-step b { font-size: 44px; }
@media (max-width: 700px) {
  .podium.podium-stage { padding: 20px 10px 0; gap: 0 6px; }
  .podium-stage .podium-card { margin: 0 2px -1px; padding: 12px 8px 10px; }
  .podium-stage .podium-score, .podium-stage .podium-card.p1 .podium-score { font-size: 20px; }
  .podium-stage .podium-card h4, .podium-stage .podium-card.p1 h4 { font-size: 13.5px; }
  .podium-stage .podium-card p, .podium-stage .podium-foot { display: none; }
}

/* ==== softer colors: podium and category tiles keep their colors, at a lower volume ==== */
/* podium steps: a pale tint of gold, silver and bronze with a colored top edge, instead of solid metallic blocks */
.podium-step { color: var(--step-ink); text-shadow: none; border: 1px solid var(--step-line); border-bottom: 0; border-top: 3px solid var(--step); background: var(--step-bg) !important; }
.podium-step b { font-size: 28px; }
.podium-col.p1 .podium-step b { font-size: 34px; }
.podium-step span { font-size: 11px; letter-spacing: .07em; }
.podium-col.p1 { --step: #d9a917; --step-bg: #fdf7e3; --step-line: #f0e2b2; --step-ink: #8a6500; }
.podium-col.p2 { --step: #a4adb9; --step-bg: #f3f5f8; --step-line: #dfe3e9; --step-ink: #5b6573; }
.podium-col.p3 { --step: #c9895a; --step-bg: #fbf1ea; --step-line: #efd9c9; --step-ink: #8a4f24; }
.podium-col.p1 .podium-step { height: 96px; }
.podium-col.p2 .podium-step { height: 70px; }
.podium-col.p3 .podium-step { height: 52px; }
.podium-stage .podium-card.p1 { background: #fff; border-color: #efe0b0; }
.podium-crown { width: 26px; height: 26px; font-size: 13px; background: #fdf3cf; color: #a87d00; box-shadow: 0 0 0 1px #efd98a; }
.podium.podium-stage { background: #fff; }
/* category tiles: a thinner top edge and softer bars in the category color */
.rg-tile { border-top-width: 3px; }
.rg-tile .t-bar i { opacity: .7; }
.rg-tile .t-name i { opacity: .85; }
.cat-tile.on { box-shadow: 0 0 0 1.5px var(--brand); }

/* dashboard: clearer edges on the podium, its cards and steps, and the ranking table */
.podium.podium-stage { border: 1px solid #d3cbdd; border-bottom: 0; }
.podium-stage .podium-card { border: 1.5px solid #cdc4d9; border-bottom: 0; box-shadow: 0 2px 8px rgba(28, 26, 34, .07); }
.podium-stage .podium-card.p1 { border-color: #dcc06a; }
.podium-col.p1 { --step-line: #e3cc84; }
.podium-col.p2 { --step-line: #c8ced8; }
.podium-col.p3 { --step-line: #e2c0a6; }
.podium-step { border-width: 1.5px; border-top-width: 3px; }
.dash-panel, .tablescroll.dash-panel { border: 1px solid #d3cbdd; }
#dashTable thead th { border-bottom: 1px solid #d3cbdd; }
#dashTable tbody td { border-bottom: 1px solid #e4dfea; }
#dashTable tbody tr:last-child td { border-bottom: 0; }

/* judge sign-in: category list. On a touch screen every chip was stretched to 40px tall, so neighbouring rows ran
   into each other. The whole row is the tap target instead, with a little space between rows. */
#catPick { display: grid; gap: 6px; margin: 4px 0 6px; }
.catpick { min-height: 48px; padding: 4px 8px; margin: 0 -8px; border-radius: 10px; }
.catpick:hover { background: rgba(59, 15, 79, .05); }
.catpick .chip { min-height: 0 !important; padding: 6px 14px; line-height: 1.25; font-size: 15px; }
.catpick input { width: 24px; height: 24px; flex: none; }

/* scoring sheet: all four level tiles the same width, and every points button the same size in every tile
   (the buttons sit on the same grid in each tile; Exemplary's sixth number simply starts a new row) */
.criterion .levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.criterion .pts { display: none; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.criterion .level.open .pts { display: grid; }
.criterion .pt { flex: none; width: 100%; min-width: 0; height: 46px; }
@media (max-width: 700px) { .criterion .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .criterion .levels { grid-template-columns: 1fr; } }
/* scoring sheet: every tile always keeps room for its point buttons (hidden until the tile is opened), so opening a
   level never changes the size of any tile */
.criterion .pts { display: grid !important; visibility: hidden; }
.criterion .level.open .pts { visibility: visible; }
.criterion .levels { align-items: stretch; }

/* ---- scoring sheet: photos */
.photos { margin-top: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.photos-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photos-head b { font-size: 16px; }
.photo-note { font-size: 13px; color: var(--muted); }
.photo-take { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; font-weight: 700; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photo-strip:empty { display: none; }
.photo-thumb { position: relative; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f3f1f6; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(28, 26, 34, .65); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.photo-remove:hover { background: #b42318; }
.sheet-photos { display: flex; gap: 4px; flex-wrap: wrap; }
.sheet-photos img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

/* iPad turning: Safari must not enlarge the text when the iPad goes to landscape, and the page follows the new width
   without sliding sideways */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
@media (orientation: landscape) and (max-height: 900px) and (pointer: coarse) {
  /* landscape iPad: a slimmer top bar leaves more height for the map and lists */
  .app-bar { padding-top: 4px; padding-bottom: 4px; }
}
/* scoring sheet: Take picture is a round camera icon button */
.photo-take { width: 52px; height: 52px; min-height: 52px; padding: 0; justify-content: center; border-radius: 50%; border-width: 2px; }
.photo-take svg { width: 26px; height: 26px; }

/* scoring sheet photos, second version: a filled round camera button, thumbnails that show while saving */
.photos-head { gap: 14px; }
.photos-head > div { display: flex; flex-direction: column; line-height: 1.25; }
.photo-take { width: 56px; height: 56px; min-height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; box-shadow: 0 3px 10px rgba(59, 15, 79, .3); }
.photo-take:hover, .photo-take:focus-visible { background: var(--brand-2); color: #fff; }
.photo-take:active { transform: scale(.95); }
.photo-take:disabled { background: #b9b3c4; box-shadow: none; }
.photo-take svg { width: 28px; height: 28px; }
.photo-thumb.saving img { opacity: .55; }
.photo-thumb.failed img { opacity: .35; filter: grayscale(1); }
.photo-state { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 3px 0; border-radius: 6px; background: rgba(28, 26, 34, .72); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.photo-state.retry { border: 0; background: #b42318; cursor: pointer; }
.photo-error { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #fef3f2; color: #8f1d14; font-size: 13.5px; font-weight: 600; }

/* judging page: the judge's own progress as a ring that fills up */
.judge-progress { display: inline-flex; align-items: center; gap: 9px; flex: none; white-space: nowrap; color: var(--ink); }
.jp-ring { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), #e7e2ee 0); }
.jp-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bs-body-bg, #f4f0f7); }
.jp-ring span { position: relative; font-size: 11px; font-weight: 800; color: var(--brand); }
.jp-text { display: flex; flex-direction: column; line-height: 1.15; }
.jp-text b { font-size: 16px; font-weight: 800; }
.jp-text small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.judge-progress.complete .jp-ring { background: #16a34a; }
.judge-progress.complete .jp-ring span { color: #16a34a; font-size: 16px; }

/* dashboard: a project still waiting for some of its judges */
#dashTable td.judges-missing { color: #8a5a00; font-weight: 700; }

/* ---- VEX IQ: fields look like foam-tile fields; other VEX items are light boxes like the equipment */
.mi-viqfield rect, .mi-viqskills rect, .mi-viqprac rect { fill: #e4e7eb; stroke: #3d4451; stroke-width: 3; }
.mi-viqskills rect { fill: #e6edf7; }
.mi-viqprac rect { fill: #edf2ea; }
.mi-tiles { fill: none; stroke: #b5bcc6; stroke-width: 1; pointer-events: none; }
.mi-field-label { font-weight: 700 !important; fill: #2b3140 !important; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; pointer-events: none; }
.mi-viqpit rect, .mi-viqinspect rect, .mi-viqscore rect, .mi-viqqueue rect, .mi-viqseating rect { fill: #fff; stroke: #8d7a9c; stroke-width: 1.5; }
.mi-viqqueue rect { fill: #fbf7e8; stroke: #b58a00; stroke-dasharray: 6 4; }
.mi-viqseating rect { fill: #f4f2f7; }

/* ---- event layout picker (STEM Fest, VEX IQ ...) */
.layout-btn { font-weight: 600; }
.layout-btn small { font-weight: 500; color: var(--muted); margin-right: 4px; }
.layout-menu { min-width: 270px; padding: 6px; border-radius: 10px; box-shadow: 0 10px 28px rgba(29, 19, 38, .18); }
.layout-menu .dropdown-item { border-radius: 6px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
.layout-menu .dropdown-item .tick { width: 16px; color: var(--brand); font-weight: 700; }
.layout-menu .dropdown-item small { margin-left: auto; color: var(--muted); font-size: 12px; }
.layout-menu .dropdown-item.active, .layout-menu .dropdown-item:active { background: #f1ebf6; color: inherit; }
.layout-menu .layout-note { padding: 4px 10px 6px; font-size: 12.5px; color: var(--muted); max-width: 300px; }
.layout-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: #e9eef6; color: #2f4a73; font-size: 12.5px; font-weight: 600; }

/* ---- import projects from a sheet */
.imp-steps { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.imp-steps li { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.imp-steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ece8f1; color: #6b6274; font-size: 12px; }
.imp-steps li.on { color: var(--ink, #1d1326); }
.imp-steps li.on b { background: var(--brand); color: #fff; }
.imp-steps li.done b { background: #dcf3e2; color: var(--ok); }
.imp-body { background: #f7f5fa; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; border: 2px dashed #c9c0d4; border-radius: 14px; background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.imp-drop:hover, .imp-drop.over { border-color: var(--brand); background: #faf6fd; }
.imp-drop.busy { opacity: .7; pointer-events: none; }
.imp-drop b { font-size: 17px; }
.imp-drop span { color: var(--muted); font-size: 13.5px; }
.imp-drop-icon { display: grid !important; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #f1ebf6; color: var(--brand) !important; font-size: 22px !important; font-weight: 700; margin-bottom: 4px; }
.imp-help { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.imp-help > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.imp-help b { display: block; margin-bottom: 4px; }
.imp-help p { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.imp-file { font-size: 14px; color: #4a4655; }
.imp-cols { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.imp-cols-head, .imp-col { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(0, 1.6fr); gap: 14px; align-items: center; padding: 8px 14px; }
.imp-cols-head { background: #f3f0f7; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.imp-col + .imp-col { border-top: 1px solid #eeeaf2; }
.imp-col.empty .imp-field { color: var(--muted); }
.imp-field { font-weight: 600; font-size: 14px; }
.imp-field em { margin-left: 8px; font-style: normal; font-size: 11px; font-weight: 700; color: #b3261e; }
.imp-sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.imp-values { margin-top: 16px; padding: 14px 16px; border: 1px solid #f0d58a; border-radius: 12px; background: #fffaeb; }
.imp-values h3 { font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.imp-values p { margin: 0 0 10px; font-size: 13.5px; color: #6b5a2b; }
.imp-value { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(200px, 1fr); gap: 10px; align-items: center; padding: 5px 0; }
.imp-value > span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.imp-arrow { color: var(--muted); }
.imp-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.imp-count { padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; background: #fff; }
.imp-count b { display: block; font-size: 24px; line-height: 1.1; }
.imp-count span { font-size: 13px; color: var(--muted); }
.imp-count.ready { border-left-color: var(--ok); }
.imp-count.draft { border-left-color: #e0a100; }
.imp-count.skip { border-left-color: #a8a1b3; }
.imp-count.bad { border-left-color: #c62828; }
.imp-option { margin: 0 0 10px; font-size: 14px; }
.imp-tablewrap { max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.imp-table th { position: sticky; top: 0; z-index: 1; background: #f3f0f7; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.imp-table td, .imp-table th { padding: 8px 12px; }
.imp-table tr.st-skip td { color: #8a8494; }
.imp-table tr.st-bad td { background: #fff6f6; }
.imp-table .pc-status { margin-left: 0; }
.pc-status.is-skip { background: #ece9f0; color: #5f5a69; }
.pc-status.is-bad { background: #fde3e3; color: #a3201a; }
.imp-why { font-size: 12.5px; color: #6b6274; margin-top: 3px; }
.imp-note { font-size: 12px; color: #8a6200; margin-top: 2px; }
.imp-school { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.imp-school i { width: 10px; height: 10px; border-radius: 3px; }
.imp-done { text-align: center; padding: 18px 0 8px; }
.imp-done-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; background: #dcf3e2; color: var(--ok); font-size: 26px; font-weight: 700; }
.imp-done h3 { font-size: 22px; font-weight: 700; margin: 0; }
.imp-done p { color: var(--muted); margin: 4px 0 0; }
.imp-problem { display: flex; gap: 12px; padding: 4px 0; font-size: 13.5px; }
.imp-problem b { min-width: 56px; }
.imp-next { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.imp-next > div { flex: 1; }
.imp-next p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) {
  .imp-help, .imp-counts { grid-template-columns: 1fr 1fr; }
  .imp-cols-head { display: none; }
  .imp-col { grid-template-columns: 1fr 1fr; }
  .imp-sample { grid-column: 1 / -1; }
}

/* ---- "Select event" picker: a small label over a card-like button */
.event-pick { display: inline-flex; flex-direction: column; gap: 2px; }
.event-pick-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding-left: 2px; line-height: 1.2; }
.event-pick-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 190px; height: 42px; padding: 0 12px 0 6px; border: 1px solid #d8d0e2; border-radius: 12px;
  background: linear-gradient(180deg, #fff, #faf7fd); box-shadow: 0 1px 2px rgba(29, 19, 38, .06), 0 4px 14px rgba(29, 19, 38, .06); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.event-pick-btn:hover, .event-pick-btn[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 33, 120, .12), 0 4px 14px rgba(29, 19, 38, .08); }
.event-pick-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #6c2b8f, #4a1a6b); }
.event-pick-btn[data-kind="vex"] .event-pick-icon { background: linear-gradient(135deg, #2f6fd6, #1d4b9e); }
.event-pick-btn[data-kind="other"] .event-pick-icon { background: linear-gradient(135deg, #3c8a6e, #24614c); }
.event-pick-icon svg, .layout-ico svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.event-pick-name { flex: 1; text-align: left; font-size: 15px; font-weight: 700; color: #1d1326; white-space: nowrap; }
.event-pick-chev { fill: none; stroke: #6b6274; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.event-pick-btn[aria-expanded="true"] .event-pick-chev { transform: rotate(180deg); }
.event-pick-sep { align-self: stretch; width: 1px; margin: 4px 4px; background: var(--line); }
#mapedit > .d-flex:first-child { align-items: flex-end !important; }
.layout-menu { min-width: 290px; margin-top: 6px !important; }
.layout-menu .dropdown-item { gap: 12px; padding: 8px 10px; }
.layout-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #6c2b8f, #4a1a6b); }
.layout-ico[data-kind="vex"] { background: linear-gradient(135deg, #2f6fd6, #1d4b9e); }
.layout-ico[data-kind="other"] { background: linear-gradient(135deg, #3c8a6e, #24614c); }
.layout-text { display: flex; flex-direction: column; line-height: 1.25; }
.layout-text b { font-size: 14.5px; }
.layout-menu .dropdown-item .layout-text small { margin-left: 0; font-size: 12px; color: var(--muted); }
.layout-menu .dropdown-item .tick { margin-left: auto; width: auto; }

/* ---- map toolbar, right end: one height for everything, a segmented zoom control and a quiet divider */
#mapedit > .d-flex:first-child { align-items: flex-end !important; row-gap: 10px !important; }
#mapedit > .d-flex:first-child > .btn, #mapedit > .d-flex:first-child > .dropdown > .btn { height: 38px; min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.event-pick-btn { height: 38px; }
.map-tools { display: inline-flex; align-items: center; gap: 8px; }
.mt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; min-height: 38px; padding: 0 13px; border: 1px solid #d8d0e2; border-radius: 10px;
  background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: #4a4655; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.mt-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mt-btn:hover { border-color: var(--brand); color: var(--brand); }
.mt-btn[aria-pressed="true"] { background: #f1ebf6; border-color: var(--brand); color: var(--brand); }
.mt-seg { display: inline-flex; border: 1px solid #d8d0e2; border-radius: 10px; background: #fff; overflow: hidden; }
.mt-seg .mt-btn { border: 0; border-radius: 0; height: 36px; min-height: 36px; padding: 0 11px; }
.mt-seg .mt-btn + .mt-btn { border-left: 1px solid #ebe6f1; }
.mt-seg .mt-btn:hover { background: #f7f3fa; }
.mt-seg:hover { border-color: #c5b9d3; }
.mt-sep { width: 1px; height: 26px; margin: 0 4px 6px; background: #ddd6e6; align-self: flex-end; }
#mapedit > .d-flex:first-child .event-pick-sep { height: 26px; margin-bottom: 6px; align-self: flex-end; }
@media (pointer: coarse), (hover: none) {
  .mt-btn, .event-pick-btn, #mapedit > .d-flex:first-child > .btn, #mapedit > .d-flex:first-child > .dropdown > .btn { height: 44px; min-height: 44px; }
  .mt-seg .mt-btn { height: 42px; min-height: 42px; min-width: 44px; }
  .mt-sep, #mapedit > .d-flex:first-child .event-pick-sep { height: 30px; margin-bottom: 7px; }
}

/* a suggestion that cannot be chosen, such as a student already on another project */
.suggest-item.disabled { cursor: not-allowed; opacity: .55; }
.suggest-item.disabled span { text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.suggest-item.disabled small { color: #a3201a; font-weight: 600; }
.suggest-item.disabled:hover, .suggest-item.disabled.active { background: transparent; }

/* ---- what a project's table needs, as icons next to its division */
.reg .pr-kind { flex-direction: column; align-items: flex-start; gap: 6px; }
.reg .pr-needs { display: inline-flex; gap: 4px; padding-left: 0; }
.need-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1px solid; }
.need-ico svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.need-power { background: #fff6dc; border-color: #f1d488; color: #a06d00; }
.need-power svg { fill: #ffd54f; }
.need-board { background: #eef3fb; border-color: #c9d8ee; color: #2f5d9e; }

/* ---- table number typed in the project list */
.pr-table-input { justify-self: center; width: 56px; height: 32px; padding: 0 4px; border: 1px solid #ddd6e6; border-radius: 8px; background: #fff;
  text-align: center; font: inherit; font-size: 14px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s; }
.pr-table-input::placeholder { color: #c9c5d2; font-weight: 500; }
.pr-table-input:hover { border-color: #c5b9d3; }
.pr-table-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 33, 120, .14); }
.pr-table-input:placeholder-shown { background: #faf9fc; border-style: dashed; }
.pr-table-input.off-map { border-color: #e0a100; background: #fffaeb; color: #7a4d00; }
.pr-table-input:disabled { opacity: .6; }
@media (max-width: 860px) { .reg .prow > .pr-table-input { justify-self: start; } }

/* ---- "Needs power" / "Display board" tick boxes beside the status filter */
.need-filter { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.need-check { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font-size: 13.5px; font-weight: 600; color: #4a4655; cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.need-check:hover { border-color: #c5b9d3; }
.need-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.need-check .need-ico { width: 22px; height: 22px; border-radius: 6px; }
.need-check b { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #f1eef6; color: #6b6274; }
.need-check.on { border-color: var(--brand); background: #f7f2fb; color: var(--brand); }
.need-check.on b { background: var(--brand); color: #fff; }
@media (pointer: coarse), (hover: none) { .need-check { height: 44px; } }

/* ---- project list: clearer edges. Rows, chips, badges, the table box and Edit all get borders you can see. */
.reg .plist .pl-group { border: 1px solid #cfc6db; box-shadow: 0 1px 2px rgba(29, 19, 38, .06), 0 6px 18px rgba(29, 19, 38, .05); }
.reg .plist .pl-head { background: #f3f0f7; border-bottom: 1px solid #d9d1e3; color: #5f566d; }
.reg .plist .prow + .prow { border-top: 1px solid #e2dbea; }
.reg .plist .prow:nth-child(odd of .prow) { background: #fcfbfe; }
.reg .plist .prow:hover, .reg .plist .prow:focus-visible { background: #f6f2fa; }
.reg .plist .prow.draft { background: #fffaee; }
.reg .plist .prow.draft:hover { background: #fff5dc; }
.reg .plist .pc-tag { border-color: #d3cadf; box-shadow: 0 1px 1px rgba(29, 19, 38, .04); }
.reg .plist .pc-students li b { background: #ede9f3; border-color: #d3cbe0; color: #3a3346; }
.reg .plist .pc-status.is-done { border: 1px solid #b9e2c6; }
.reg .plist .pc-status.is-draft { border: 1px solid #ecd28c; }
.reg .plist .need-power { border-color: #e8c35e; }
.reg .plist .need-board { border-color: #a9c1e4; background: #e9f0fb; }
.reg .plist .pr-table-input { border: 1.5px solid #c3b8d1; background: #fff; color: var(--brand); box-shadow: 0 1px 1px rgba(29, 19, 38, .04); }
.reg .plist .pr-table-input:placeholder-shown { border-style: dashed; border-color: #b4a7c5; background: #faf8fd; }
.reg .plist .pr-table-input::placeholder { color: #9b90ab; font-weight: 600; }
.reg .plist .pr-table-input:hover { border-color: #8f7aa6; }
.reg .plist .pr-table-input:focus { border-style: solid; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(91, 33, 120, .16); }
.reg .plist .pr-table-input.off-map { border-style: solid; border-color: #d99a00; background: #fff6dd; color: #7a4d00; }
.reg .plist .prow .pc-edit { border: 1px solid #cbc1d8; background: #fff; color: #3a3346; box-shadow: 0 1px 1px rgba(29, 19, 38, .05); }
.reg .plist .prow .pc-edit:hover, .reg .plist .prow:hover .pc-edit { border-color: var(--brand); background: #f6f0fa; color: var(--brand); }
/* stronger line between projects */
.reg .plist .prow + .prow { border-top: 1.5px solid #c9bfd6; }

/* ---- students attending, at the top right of a school or division tile */
.rg-tile .t-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rg-tile .t-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-people { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: none; padding: 1px 8px 1px 6px; border-radius: 999px;
  background: #f1eef6; border: 1px solid #dcd4e6; font-size: 12px; font-weight: 700; color: #4a3f55; font-variant-numeric: tabular-nums; }
.t-people svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rg-tile.all .t-people { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; }

/* ---- power: areas with outlets, and the tables that have power */
.mi-powerzone.sel rect { stroke: var(--brand); stroke-dasharray: none; }
.power-badge circle { fill: #ffd54f; stroke: #a87400; stroke-width: 1.5; }
.power-badge path { fill: #6b4700; }
.mi-table.pl-power-target rect { fill: #fff2c2 !important; stroke: #e0a100 !important; stroke-width: 3 !important; stroke-dasharray: none !important; }
.pp-power { margin-right: 4px; }
.at-gstate.warn { color: #8a5a00; }
.at-summary .warn { color: #8a5a00; }
.map-add-menu .add-power b { color: #8a6100; }

/* ---- a 6 ft table holding two projects: one outline, a divider between the halves */
.table-frame { fill: none; stroke: #2a1f35; stroke-width: 2; }
.table-divider { stroke: #2a1f35; stroke-width: 1.5; }

/* ---- a 6 ft table picked in the editor, and its panel */
.pair-sel { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 6 4; pointer-events: none; }
.table-turn { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.table-turn .mt-btn { height: 32px; min-height: 32px; font-size: 13px; }
.table-turn .mt-seg .mt-btn[aria-pressed="true"] { background: #f1ebf6; color: var(--brand); }
/* "Mark power" on the map toolbar */
.btn.mark-power { background: #fff6dc; border: 1px solid #e8c35e; color: #7a5200; font-weight: 600; }
.btn.mark-power:hover { background: #ffefbf; border-color: #d39b00; color: #5c3d00; }
/* the two halves of a 6 ft table share one outline; the divider is a short line in the middle */
.mi-table rect.half { stroke: none; }
.table-divider { stroke: #2a1f35; stroke-opacity: .55; stroke-width: 1.5; stroke-linecap: round; }
/* a picked 6 ft table is outlined once around the whole table, not around each half */
.editor .mi-table.sel rect.half { stroke: none !important; }

/* ---- "Has power" in a table's settings */
.power-check { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; padding: 9px 12px; border: 1px solid #ddd6e6; border-radius: 10px; background: #fff; cursor: pointer; }
.power-check input { width: 18px; height: 18px; margin: 0; accent-color: #b07e00; cursor: pointer; flex: none; }
.power-check-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f3f0f7; filter: grayscale(1); opacity: .6; flex: none; }
.power-check b { display: block; font-size: 14px; }
.power-check small { display: block; font-size: 12px; color: var(--muted); }
.power-check.on { border-color: #e0b84a; background: #fffaeb; }
.power-check.on .power-check-ico { background: #ffe9a8; filter: none; opacity: 1; }

/* ---- Place by hand: rows grouped by division, with the instructor and a Power tag */
.pp-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pp-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-power { flex: none; display: inline-flex; align-items: center; padding: 0 6px; border-radius: 999px; background: #fff3cc; border: 1px solid #e8c35e; color: #7a5200; font-size: 11px; font-weight: 700; line-height: 18px; margin-right: 0; }
.pp-hpower { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #fff3cc; border: 1px solid #e8c35e; color: #7a5200; font-size: 11px; font-weight: 700; }

/* ---- map editor side panel: title with a close button */
.panel-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.panel-head > div { flex: 1; min-width: 0; }
.panel-head h3 { margin: 0 0 4px; }
.panel-head p { margin: 0; }
.panel-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px 0 0; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #6b6274; font-size: 15px; line-height: 1; cursor: pointer; }
.panel-close:hover { background: #f1ebf6; border-color: #ddd6e6; color: var(--brand); }
@media (pointer: coarse), (hover: none) { .panel-close { width: 40px; height: 40px; } }

/* ---- Place by hand: filters, and the picked project's card */
.pp-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.pp-filters .form-select.on { border-color: var(--brand); background-color: #f7f2fb; color: var(--brand); font-weight: 600; }
.pp-powerfilter { display: flex; align-items: center; gap: 7px; padding: 0 10px; height: 31px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; font-weight: 600; color: #4a4655; cursor: pointer; }
.pp-powerfilter input { margin: 0; accent-color: #b07e00; }
.pp-powerfilter.on { border-color: #e0b84a; background: #fffaeb; color: #7a5200; }
.pp-clear { grid-column: 1 / -1; justify-self: start; }
.pp-card { margin-bottom: 10px; padding: 12px; border: 1.5px solid var(--brand); border-radius: 12px; background: #fcf9fe; box-shadow: 0 4px 14px rgba(59, 15, 79, .1); }
.pp-card-head { display: flex; align-items: flex-start; gap: 8px; }
.pp-card-head > div { flex: 1; min-width: 0; }
.pp-card-head small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pp-card-head b { display: block; font-size: 15px; line-height: 1.3; }
.pp-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; }
.pp-chip i { width: 8px; height: 8px; border-radius: 50%; }
.pp-card-line { font-size: 12.5px; color: #5f566d; }
.pp-card-now { margin: 8px 0; font-size: 13px; }
.pp-warn { color: #a3201a; font-weight: 600; }
.pp-move { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.pp-move label { font-size: 12.5px; font-weight: 600; color: #4a4655; }
.pp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pp-tablebtn { border: 0; background: transparent; padding: 0 2px; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pp-tablebtn:hover { color: var(--brand); }

/* ---- pop-up beside a table in Place by hand */
.tp-pop { position: fixed; z-index: 1080; width: 290px; padding: 12px; border: 1px solid #d6cce2; border-radius: 12px; background: #fff;
  box-shadow: 0 12px 32px rgba(29, 19, 38, .22), 0 2px 6px rgba(29, 19, 38, .08); animation: tp-in .12s ease-out; }
@keyframes tp-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tp-head { display: flex; align-items: flex-start; gap: 10px; }
.tp-table { flex: none; display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px; }
.tp-title { flex: 1; min-width: 0; }
.tp-title b { display: block; font-size: 14px; line-height: 1.25; }
.tp-title small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.tp-note { margin-top: 8px; padding: 4px 8px; border-radius: 8px; background: #fff6dc; color: #7a5200; font-size: 12px; font-weight: 600; }
.tp-note.bad { background: #fde8e8; color: #a3201a; }
.tp-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eee8f3; }
.tp-section label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: #3a3346; }
.tp-move { display: flex; gap: 6px; }
.tp-move input { flex: 1; }
.tp-section small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.tp-remove { width: 100%; margin-top: 10px; }
.maptip .tip-teacher { font-weight: 600; }
.maptip .tip-power { margin: 3px 0 1px; color: #ffd54f; font-weight: 700; }
.maptip .tip-power.bad { color: #ff9b9b; }
/* a project that needs power at a table without it */
.power-badge.missing circle { stroke: #c62828; stroke-width: 2.5; }

/* ---- areas and booths that hold projects */
.spot-count rect { fill: #fff; stroke: var(--brand); stroke-width: 1; }
.spot-count text { fill: var(--brand) !important; font-weight: 700; }
.mi-booth .spot-count rect { fill: #fff; stroke: #fff; }
.editor .mi.pl-spot-target rect:first-child { stroke: var(--brand-2, #7b3fa0); stroke-width: 3; stroke-dasharray: 8 4; }
.editor .mi-area.pl-over rect:first-child, .editor .mi-booth.pl-over rect:first-child { stroke: #16a34a; stroke-width: 4; stroke-dasharray: none; }
.maptip .tip-line { font-size: 13px; opacity: .92; }
.maptip .tip-line::before { content: '\2022  '; }
.tp-table.area { min-width: 0; max-width: 120px; font-size: 12px; line-height: 1.15; text-align: center; padding: 4px 8px; height: auto; min-height: 38px; }
.tp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 260px; overflow-y: auto; }
.tp-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #ece6f2; border-radius: 8px; }
.tp-item b { display: block; font-size: 13px; line-height: 1.25; }
.tp-item small { display: block; font-size: 11.5px; color: var(--muted); }
.tp-hint { display: block; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.pp-table .pp-tablebtn { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- an easel holds one project: its number, with a small easel mark */
.mi-easel-label { font-weight: 700 !important; fill: #2a1f35; pointer-events: none; }
.mi-easel-mark { opacity: .45; }
.editor .mi-easel.pl-free rect { fill: #fff; stroke: #b9b3c4; stroke-width: 1.5; stroke-dasharray: 5 3; }
.editor .mi-easel.pl-picked rect { stroke: #e0007a; stroke-width: 3; }
.editor .mi-easel.pl-over rect { stroke: #16a34a; stroke-width: 3; stroke-dasharray: none; }
/* project details beside a table: name in bold, instructor below in purple */
.detail-tag text:not(.dt-title) { fill: #5b3a75; font-style: italic; }

/* ---- tables with 1-4 projects: + Add rows and the settings panel */
.map-add-menu .add-table { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; }
.map-add-menu .add-table:hover { background: #f6f2fa; }
.map-add-menu .add-table > div { flex: 1; min-width: 0; }
.map-add-menu .add-table b { display: block; font-size: 14px; }
.map-add-menu .add-table small { display: block; color: var(--muted); font-size: 12.5px; }
.add-count { display: inline-flex; border: 1px solid #d8d0e2; border-radius: 8px; overflow: hidden; }
.add-count button { width: 30px; height: 30px; border: 0; background: #fff; font: inherit; font-weight: 700; color: var(--brand); cursor: pointer; }
.add-count button + button { border-left: 1px solid #ebe6f1; }
.add-count button:hover { background: var(--brand); color: #fff; }
.field-label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.table-count .mt-btn { width: 44px; height: 34px; min-height: 34px; font-size: 14px; }
.table-count .mt-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.table-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.table-numbers.n1 { grid-template-columns: 1fr; }

/* ---- direction arrows */
.mi-arrow rect { fill: transparent; stroke: none; }
.mi-arrow-shape { fill: #0f766e; stroke: #0b5550; stroke-width: 1.5; stroke-linejoin: round; }
.mi-arrow-label { fill: #fff !important; font-weight: 700; pointer-events: none; }
.editor .mi-arrow.sel rect { stroke: #e0007a; stroke-width: 2; stroke-dasharray: 6 3; }
.arrow-dirs .mt-btn { width: 44px; font-size: 18px; }
.arrow-dirs .mt-btn[aria-pressed="true"] { background: #0f766e; color: #fff; }

/* ---- page transitions: a thin loading bar under the top bar while the first data loads, and a soft fade-in */
html.page-loading .app-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: linear-gradient(90deg, transparent, #f2c94c 40%, #ffd54f 60%, transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: page-bar 1s ease-in-out infinite; }
@keyframes page-bar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.app-bar { position: sticky; }
@media (prefers-reduced-motion: no-preference) {
  body > .wrap:not([hidden]) { animation: page-in .18s ease-out; }
  @keyframes page-in { from { opacity: .35; } to { opacity: 1; } }
}
/* the menu tabs sit in the middle of the top bar on wide screens */
/* centered in the free space between the left (logo, event) and right (name, sign out) ends, so it never overlaps them */
@media (min-width: 992px) {
  .app-bar .navbar-brand, .app-bar .me-auto { margin-right: 0 !important; }
  .app-bar > .nav { margin-left: auto; margin-right: auto; }
}

/* ---- clearer edges: inputs, dropdowns, the search box, tiles and filter buttons */
.form-control, .form-select { border-color: #c4b9d2; }
.form-control:hover, .form-select:hover { border-color: #a596b8; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 33, 120, .15); }
.reg .grid-search, .grid-search { border: 1.5px solid #c4b9d2; background-color: #fff; box-shadow: 0 1px 2px rgba(29, 19, 38, .05); }
.reg .grid-search:hover, .grid-search:hover { border-color: #a596b8; }
.reg .grid-search:focus, .grid-search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 33, 120, .15); }
.rg-tile { border-left-color: #cdc3da; border-right-color: #cdc3da; border-bottom-color: #cdc3da; box-shadow: 0 1px 2px rgba(29, 19, 38, .06); }
.rg-tile:hover { border-left-color: #a596b8; border-right-color: #a596b8; border-bottom-color: #a596b8; }
.status-filter, .reg .status-filter { border: 1.5px solid #cdc3da; }
.need-check { border: 1.5px solid #cdc3da; }
.btn-outline-secondary { border-color: #b9aec8; }
/* ---- loading placeholders on the Projects page (replaced as soon as the projects arrive) */
.sk-tile { cursor: default; gap: 8px !important; border-top-color: #ddd5e6 !important; }
.sk-tile i, .sk-row i, .sk-head { display: block; border-radius: 6px; background: linear-gradient(90deg, #ece7f2 25%, #f6f3f9 50%, #ece7f2 75%); background-size: 200% 100%; animation: sk-shine 1.2s linear infinite; }
.sk-tile i:nth-child(1) { width: 60%; height: 12px; }
.sk-tile i:nth-child(2) { width: 40%; height: 22px; }
.sk-tile i:nth-child(3) { width: 100%; height: 6px; }
.sk-head { height: 52px; border-radius: 0; background-color: #e4ddee; }
.sk-row { display: grid; grid-template-columns: 40px 90px 1fr 1fr; gap: 16px; align-items: center; padding: 16px 18px; border-top: 1px solid #ece7f2; }
.sk-row i { height: 12px; }
.sk-row i:nth-child(3) { width: 80%; }
@keyframes sk-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk-tile i, .sk-row i, .sk-head { animation: none; } }

/* ---- notices beside the Projects title: in the middle of the row, and harder to miss */
.rg-head, .rg-title { width: 100%; }
.rg-title { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; }
.rg-title h1 { grid-column: 1; }
.rg-badges { grid-column: 2; justify-content: center; }
.rg-badge { height: 36px; padding: 0 16px 0 12px; font-size: 14.5px; font-weight: 800; letter-spacing: .01em; border-width: 1.5px; box-shadow: 0 2px 8px rgba(29, 19, 38, .08); }
.rg-badge i { position: relative; width: 9px; height: 9px; }
.rg-badge i::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; }
.rg-badge.red { background: #fde8e7; border-color: #e5847b; color: #9b1c12; }
.rg-badge.red::before { content: '\26A0'; font-size: 16px; line-height: 1; }
.rg-badge.amber { background: #fff3d6; border-color: #e8b94a; color: #7a4d00; }
.rg-badge.amber::before { content: '\1F512'; font-size: 13px; line-height: 1; }
.rg-badge.blue { background: #e8f0ff; border-color: #93b4ee; color: #17418c; }
@media (prefers-reduced-motion: no-preference) {
  .rg-badge.red i::after, .rg-badge.blue i::after { animation: badge-pulse 1.8s ease-out infinite; }
  @keyframes badge-pulse { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
}
@media (max-width: 760px) {
  .rg-title { grid-template-columns: 1fr; }
  .rg-badges { grid-column: 1; justify-content: flex-start; }
}
/* the three status filters share the width equally */
.status-filter { display: inline-grid !important; grid-template-columns: repeat(3, 1fr); }
.status-filter .status-pill { justify-content: center; min-width: 118px; }

/* ---- Frontier Schools logo at the start of the top bar (replaces the old "F" square) */
.app-bar .navbar-brand::before { display: none; }
.fs-brand { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; }
.fs-plate { width: 40px; height: 40px; border-radius: 10px; background: #fff url('/img/frontier-schools-f.svg') center / 66% no-repeat; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.fs-words { display: flex; flex-direction: column; line-height: 1; }
.fs-words b { color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .05em; }
.fs-words span { margin-top: 4px; color: #ffb504; font-size: 10.5px; font-weight: 700; letter-spacing: .38em; }
.fs-brand + .navbar-brand { margin-left: 4px; padding-left: 14px !important; border-left: 1px solid rgba(255, 255, 255, .3); }
@media (max-width: 900px) { .fs-words { display: none; } }

/* ---- "Viewing as" banner while impersonating a staff member */
.imp-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 999px; background: #b42318; color: #fff; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.imp-banner small { opacity: .85; }
.imp-banner button { flex: none; height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: #fff; color: #b42318; font: inherit; font-weight: 800; cursor: pointer; }
.imp-banner button:hover { background: #ffe4e1; }
.imp-eye { font-size: 18px; }

/* ---- Settings: schools and number of projects */
.schools-total { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 12px; border: 1px solid #ddd5e6; border-radius: 10px; background: #faf7fd; line-height: 1.1; }
.schools-total b { font-size: 22px; color: var(--brand); }
.schools-total span { font-size: 12px; color: var(--muted); }
.school-row { display: grid; grid-template-columns: 48px 150px minmax(0, 1fr) 150px 70px 190px auto; gap: 8px; align-items: center; }
.school-head { padding: 0 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #e4ddee; }
.school-item { padding: 10px; border-bottom: 1px solid #ece7f2; }
.school-item:hover { background: #fcfaff; }
.school-item input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid #c4b9d2; border-radius: 8px; background: #fff; }
.school-stepper { display: flex; align-items: stretch; }
.school-stepper .btn { width: 36px; padding: 0; font-size: 18px; font-weight: 700; line-height: 1; }
.school-stepper .btn:first-child { border-radius: 8px 0 0 8px; }
.school-stepper .btn:last-child { border-radius: 0 8px 8px 0; }
.school-stepper .school-slots { width: 70px; border-radius: 0; text-align: center; font-size: 17px; font-weight: 800; color: var(--brand); border-left: 0; border-right: 0; -moz-appearance: textfield; }
.school-stepper .school-slots::-webkit-inner-spin-button, .school-stepper .school-slots::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.school-entered { justify-self: center; min-width: 40px; padding: 2px 10px; border-radius: 999px; background: #eef7f0; color: #1f6b35; font-weight: 700; text-align: center; }
.school-entered.full { background: #e1f3e6; box-shadow: inset 0 0 0 1.5px #7cc795; }
.school-match { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0 56px; font-size: 12px; color: var(--muted); }
.school-match input { width: 84px; }
@media (max-width: 900px) {
  .school-row { grid-template-columns: 48px 1fr 1fr; }
  .school-head { display: none; }
  .school-match { margin-left: 0; }
}

/* ---- Settings as tiles */
#settings .card.set-off { display: none !important; }
.set-home-head h2, .set-back h2 { margin: 0; font-size: 22px; font-weight: 800; }
.set-home-head p { margin: 2px 0 14px; color: var(--muted); }
.set-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; max-width: 1100px; }
.set-tile { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 14px; border: 1.5px solid #d6cce2; border-radius: 14px; background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px rgba(29, 19, 38, .05); transition: border-color .12s, box-shadow .12s, transform .12s; }
.set-tile:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(59, 15, 79, .12); transform: translateY(-1px); }
.set-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #f1ebf6; color: var(--brand); }
.set-ico svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.set-text { flex: 1; min-width: 0; }
.set-text b { display: block; font-size: 15px; }
.set-text small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.set-go { align-self: center; font-size: 24px; color: #b4a7c5; }
.set-tile.danger .set-ico { background: #fde8e7; color: #b42318; }
.set-tile.danger:hover { border-color: #d9534f; }
.set-back { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* ---- Settings: tiles first (A-Z, all the same size, as many columns as fit); a tile opens one setting */
#settings { max-width: 1400px; margin-left: auto; margin-right: auto; }
.set-home-head { margin: 6px 0 18px; }
.set-home-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.set-home-head p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.set-tiles { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important; grid-auto-rows: 1fr; gap: 14px; max-width: none !important; }
.set-tile { height: 100%; min-height: 96px; align-items: center !important; gap: 14px !important; padding: 16px 18px !important; border: 1px solid #ddd5e6 !important;
  border-radius: 14px !important; background: #fff; box-shadow: 0 1px 2px rgba(29, 19, 38, .04) !important; }
.set-tile:hover { border-color: #b9a6cc !important; box-shadow: 0 8px 22px rgba(59, 15, 79, .10) !important; transform: translateY(-2px); }
.set-tile:focus-visible { outline: 3px solid rgba(91, 33, 120, .3); outline-offset: 2px; }
.set-ico { width: 46px !important; height: 46px !important; border-radius: 12px !important; }
.set-text b { font-size: 15.5px; font-weight: 700; }
.set-text small { margin-top: 4px; font-size: 13px; }
.set-tile.tone-purple .set-ico { background: #f1ebf6; color: #5b2178; }
.set-tile.tone-blue .set-ico { background: #e8f0fd; color: #2456a6; }
.set-tile.tone-green .set-ico { background: #e6f5eb; color: #1f7a3e; }
.set-tile.tone-amber .set-ico { background: #fff3d9; color: #9a6400; }
.set-tile.tone-red .set-ico { background: #fde8e7; color: #b42318; }
.set-tile.tone-red:hover { border-color: #e5847b !important; }
/* one setting open: a header with the way back, then the setting at full width */
.set-back { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; padding-bottom: 14px; border-bottom: 1px solid #e4ddee; }
.set-back[hidden] { display: none; }
.set-backbtn { flex: none; width: 40px; height: 40px; border: 1px solid #d6cce2; border-radius: 12px; background: #fff; font-size: 18px; color: var(--brand); cursor: pointer; }
.set-backbtn:hover { border-color: var(--brand); background: #f7f2fb; }
.set-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.set-crumb button { padding: 0; border: 0; background: none; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; }
.set-crumb button:hover { text-decoration: underline; }
.set-back h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; }
#settings > .card:not(.set-off) { max-width: none !important; padding: 22px 24px; border: 1px solid #ddd5e6; border-radius: 14px; box-shadow: 0 1px 3px rgba(29, 19, 38, .05); }
#settings > .card:not(.set-off) h3.h5 { display: none; }   /* the title is already in the header above */
#settings > .card:not(.set-off) .judge-head h3 { display: block; }
.maptip .tip-size { margin: 2px 0 4px; font-size: 12.5px; font-weight: 600; color: #c9b8dc; }

/* ---- map read-only for organizers without Settings: no editing tools at all */
#mapedit.map-readonly #mapEdit, #mapedit.map-readonly #assignTables, #mapedit.map-readonly #placeProjects, #mapedit.map-readonly #assignNote,
#mapedit.map-readonly .edit-only, #mapedit.map-readonly .loc-tool,
#mapedit.map-readonly .layout-menu li:has(.layout-act-ico), #mapedit.map-readonly .layout-menu li:has(.dropdown-divider) { display: none !important; }
#toggleGrid[aria-pressed="true"], #gridBtn[aria-pressed="true"] { background: #f1ebf6; border-color: var(--brand); color: var(--brand); }
/* the notice beside the Projects title, a size up */
.rg-badge { height: 44px; padding: 0 22px 0 16px; font-size: 16.5px; gap: 10px; border-width: 2px; }
.rg-badge.red::before { font-size: 19px; }
.rg-badge i { width: 10px; height: 10px; }
/* top menu: every tab the same width, a size up */
.app-bar > .nav { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); }
.app-bar > .nav .nav-link { justify-content: center; padding: 0 18px; font-size: 16.5px; font-weight: 700; letter-spacing: .01em; }
@media (max-width: 1100px) { .app-bar > .nav { grid-auto-columns: minmax(92px, 1fr); } .app-bar > .nav .nav-link { padding: 0 10px; font-size: 15px; } }

/* ---- a poster holds one project, like an easel */
.mi-poster rect { fill: #fffdf6; stroke: #a08a5a; }
.editor .mi-poster.pl-free rect { fill: #fff; stroke: #b9b3c4; stroke-width: 1.5; stroke-dasharray: 5 3; }
.editor .mi-poster.pl-picked rect { stroke: #e0007a; stroke-width: 3; }
.editor .mi-poster.pl-over rect { stroke: #16a34a; stroke-width: 3; stroke-dasharray: none; }

/* ---- hover cards: the project's division, with its color */
.maptip .tip-division { display: flex; align-items: center; gap: 6px; margin: 2px 0 3px; font-weight: 700; }
.maptip .tip-division i { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }

/* ---- table column: wide enough for area and booth names (Giant Jenga, FTC Robotics ...); names get a smaller font */
.pr-table-input { width: auto; min-width: 56px; max-width: 114px; field-sizing: content; padding: 0 8px; }
.pr-table-input.is-name { font-size: 12px; letter-spacing: -.01em; padding: 0 6px; }
.reg .pr-table.is-name { height: auto; min-height: 30px; padding: 4px 8px; font-size: 12px; line-height: 1.15; text-align: center; white-space: normal; max-width: 114px; }

/* ---- reordering projects: a grip beside the number; a line shows where the project will land */
.pr-no.movable { flex-direction: row; align-items: center; gap: 6px; }
.pr-grip { cursor: grab; color: #b3a9c0; font-size: 15px; line-height: 1; letter-spacing: -3px; padding: 4px 4px 4px 0; user-select: none; }
.pr-grip:hover { color: var(--brand); }
.prow:hover .pr-grip { color: #8d7a9c; }
.prow.dragging { opacity: .45; }
.prow.drop-before { box-shadow: inset 0 3px 0 var(--brand); }
.prow.drop-after { box-shadow: inset 0 -3px 0 var(--brand); }

/* ---- picking several map items: the dragged box, and the outline around them all */
.sel-box { fill: rgba(91, 33, 120, .08); stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 5 4; pointer-events: none; }
.multi-sel { stroke-width: 2; }

/* ---- dashboard before the release: which projects have been judged */
.judged-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f1eff4; color: #6b6274; font-size: 13px; font-weight: 600; white-space: nowrap; }
.judged-tag.done { background: #e6f5eb; color: #1f7a3e; }

.judged-tag.half { background: #fff3d9; color: #9a6400; }
.judges-short { color: #b26a00 !important; font-weight: 700; }

/* ---- staff dashboard: winners after the release (top 3 with their average score) */
.win-head { margin: 6px 0 14px; }
.win-head h2 { font-size: 24px; font-weight: 800; margin: 0; }
.win-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 26px; }
.win-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--sc); border-radius: 14px; padding: 14px 16px; }
.win-card header { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.win-card header i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); }
.win-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.win-card li { display: flex; gap: 12px; align-items: flex-start; }
.win-card li b { display: block; line-height: 1.25; }
.win-medal { flex: none; display: inline-grid; place-items: center; width: 42px; height: 30px; border-radius: 8px; font-size: 13px; font-weight: 800; background: #f1eff4; color: #5b5266; }
.place-1 .win-medal { background: #ffe8a3; color: #7a5600; }
.place-2 .win-medal { background: #e6e8ee; color: #4b5260; }
.place-3 .win-medal { background: #f6d7bf; color: #7b4317; }
.dash-sub { font-size: 18px; font-weight: 800; margin: 4px 0 10px; }
.judged-tag { display: inline-flex; align-items: center; gap: 7px; }
.judge-dots { display: inline-flex; gap: 3px; }
.judge-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; }
.judge-dots i.on { background: currentColor; opacity: 1; }
/* the picked division's winners: one wide card under the tiles, the three places side by side */
#winners .win-card { margin: 4px 0 22px; padding: 16px 18px; }
#winners .win-card ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#winners .win-card li { padding: 12px; border-radius: 12px; background: #faf8fc; }
#winners .win-card li.place-1 { background: #fff8e0; }
@media (max-width: 760px) { #winners .win-card ol { grid-template-columns: 1fr; } }
/* each winner: the title, then school, students, table and instructor, each with its label */
#winners .win-card li { flex-direction: column; gap: 8px; padding: 14px; }
.win-body { min-width: 0; }
.win-title { display: block; font-size: 16px; line-height: 1.25; margin-bottom: 8px; }
.win-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.win-facts dt { font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.win-facts dd { margin: 0; color: var(--ink); }
.win-score { margin: -2px 0 10px; font-size: 13px; color: var(--muted); }
.win-card .win-score b { display: inline; font-size: 22px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ================= staff dashboard: winners podium ================= */
.podium-wrap { position: relative; margin: 6px 0 26px; padding: 20px 22px 24px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 140% at 50% -20%, color-mix(in srgb, var(--sc) 22%, #fff) 0%, #fff 55%), #fff;
  border: 1px solid color-mix(in srgb, var(--sc) 35%, #e4ddee); box-shadow: 0 10px 30px rgba(39, 16, 56, .08); }
.podium-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.podium-head b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.podium-head span:last-child { margin-left: 2px; padding: 3px 10px; border-radius: 999px; background: var(--sc); color: var(--sc-ink); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.podium-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sc) 25%, transparent); }
.win-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 16px; align-items: end; }
.win-podium.n1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.win-podium.n2 { grid-template-columns: 1fr 1.12fr; }
.win-podium .pod-2 { order: 1; } .win-podium .pod-1 { order: 2; } .win-podium .pod-3 { order: 3; }
.win-podium.n2 .pod-1 { order: 2; }
.pod { --m1: #f6c544; --m2: #fff4cf; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 16px; border-radius: 18px; background: #fff;
  border: 1px solid #ebe5f1; box-shadow: 0 6px 18px rgba(39, 16, 56, .07); transition: transform .2s, box-shadow .2s; }
.pod:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(39, 16, 56, .13); }
.pod::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, var(--m1), var(--m2)); }
.pod-1 { --m1: #f2b705; --m2: #ffe27a; padding-top: 26px; padding-bottom: 26px; background: linear-gradient(180deg, #fffaf0, #fff 60%); border-color: #f4dc93;
  box-shadow: 0 14px 34px rgba(214, 160, 0, .22); animation-delay: .08s; }
.pod-2 { --m1: #9aa3b5; --m2: #dfe3ec; }
.pod-3 { --m1: #c27a45; --m2: #f0c7a6; }
@keyframes podIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pod { animation: none; } }
.pod-top { display: flex; align-items: center; gap: 10px; }
.pod-rank { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 22px; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--m1), color-mix(in srgb, var(--m1) 60%, #000)); box-shadow: 0 6px 14px color-mix(in srgb, var(--m1) 45%, transparent); }
.pod-1 .pod-rank { width: 52px; height: 52px; font-size: 26px; }
.pod-place { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--m1) 70%, #000); }
.pod-place svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pod-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; color: #1d1326; }
.pod-1 .pod-title { font-size: 21px; }
.pod-score { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--m1) 10%, #fff); }
.pod-score > div:last-child b { display: block; font-size: 13px; font-weight: 800; color: #2a1f35; }
.pod-score small { color: var(--muted); font-size: 12px; }
.pod-ring { --pct: 0; flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: conic-gradient(var(--m1) calc(var(--pct) * 1%), #ece7f1 0); }
.pod-ring b { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; font-size: 16px; font-weight: 900; color: #1d1326; font-variant-numeric: tabular-nums; }
.pod-1 .pod-ring { width: 72px; height: 72px; } .pod-1 .pod-ring b { width: 58px; height: 58px; font-size: 19px; }
.pod-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pod-facts li { display: flex; gap: 10px; align-items: flex-start; }
.pod-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #f4f0f8; color: #5b2178; }
.pod-ico svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pod-facts li > span:last-child { min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: #2a1f35; line-height: 1.3; }
.pod-facts small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) {
  .win-podium, .win-podium.n2 { grid-template-columns: 1fr; }
  .win-podium .pod-1 { order: 1; } .win-podium .pod-2 { order: 2; } .win-podium .pod-3 { order: 3; }
}

/* ================= staff dashboard: judging status board ================= */
.jb-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; margin-bottom: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.jb-sum-text { display: flex; align-items: baseline; gap: 10px; }
.jb-sum-text b { font-size: 28px; font-weight: 900; color: #1d1326; font-variant-numeric: tabular-nums; }
.jb-sum-text span { color: var(--muted); font-size: 14px; }
.jb-bar { flex: 1 1 260px; display: flex; height: 12px; border-radius: 999px; background: #eeeaf3; overflow: hidden; }
.jb-bar i { height: 100%; transition: width .5s ease; }
.jb-bar i.done { background: linear-gradient(90deg, #1f9d55, #3ccf7a); }
.jb-bar i.half { background: repeating-linear-gradient(45deg, #f2b705 0 6px, #f8cf4a 6px 12px); }
.jb-sort { display: inline-flex; align-items: center; gap: 4px; }
.jb-sort > span { font-size: 12px; color: var(--muted); margin-right: 4px; }
.jb-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.jb-lane { border-radius: 16px; padding: 12px; background: #f6f3f9; border: 1px solid #ebe5f1; }
.jb-lane.half { background: #fffaeb; border-color: #f5e3a8; }
.jb-lane.done { background: #eefaf2; border-color: #c8ecd5; }
.jb-lane header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 4px 10px; }
.jb-lane header b { font-size: 15px; font-weight: 800; }
.jb-lane header small { flex-basis: 100%; color: var(--muted); font-size: 12px; margin-left: 34px; margin-top: -4px; }
.jb-count { margin-left: auto; min-width: 28px; padding: 2px 9px; border-radius: 999px; background: #fff; font-weight: 800; font-size: 13px; text-align: center; box-shadow: inset 0 0 0 1px #e4ddee; }
.jb-pips { display: inline-flex; gap: 3px; width: 26px; }
.jb-pips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #b9b0c4; }
.jb-lane.half .jb-pips i { border-color: #d39b00; } .jb-lane.half .jb-pips i.on { background: #f2b705; }
.jb-lane.done .jb-pips i { border-color: #1f9d55; background: #1f9d55; }
.jb-cards { display: grid; gap: 8px; }
.jb-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(29, 19, 38, .06); }
.jb-card b { display: block; font-size: 14px; line-height: 1.25; color: #1d1326; }
.jb-card small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.jb-table { flex: none; min-width: 38px; padding: 4px 6px; border-radius: 8px; background: #f1ebf6; color: var(--brand); font-weight: 800; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.jb-lane.done .jb-table { background: #dff3e7; color: #1f7a3e; }
.jb-lane.half .jb-table { background: #fff0c2; color: #8a5a00; }
.jb-empty { margin: 4px 6px 6px; color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .jb-lanes { grid-template-columns: 1fr; } }
.pod-facts li.fact-students > span:last-child { font-size: 16px; font-weight: 700; color: #1d1326; }
/* winners a little shorter */
.pod { gap: 9px; padding: 14px 16px 13px; }
.pod-1 { padding-top: 18px; padding-bottom: 18px; }
.pod-rank { width: 38px; height: 38px; font-size: 19px; border-radius: 12px; }
.pod-1 .pod-rank { width: 44px; height: 44px; font-size: 22px; }
.pod-title { font-size: 17px; } .pod-1 .pod-title { font-size: 19px; }
.pod-score { padding: 7px 10px; gap: 10px; }
.pod-ring { width: 52px; height: 52px; } .pod-ring b { width: 42px; height: 42px; font-size: 14.5px; }
.pod-1 .pod-ring { width: 60px; height: 60px; } .pod-1 .pod-ring b { width: 48px; height: 48px; font-size: 17px; }
.pod-facts { gap: 6px; }
.pod-ico { width: 26px; height: 26px; border-radius: 8px; }
.win-podium { gap: 14px; }
.podium-wrap { padding: 16px 18px 18px; }
.podium-head { margin-bottom: 14px; }

/* sort control on the judging board: a clean segmented switch */
.jb-sort { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.jb-sort-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jb-sort-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #f1edf5; box-shadow: inset 0 0 0 1px #e4ddee; }
.jb-sort-btn { padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: #5b5266; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.jb-sort-btn:hover { color: var(--ink); }
.jb-sort-btn[aria-checked="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(29, 19, 38, .14); }
.jb-sort-btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.jb-card .jb-inst { margin-top: 3px; font-weight: 600; color: #6b5f78; }

/* ---- dashboard notice while judging is under way: a banner with a live dot and the overall progress */
.live-note { display: flex; align-items: center; gap: 20px; margin: 4px 0 18px; padding: 20px 24px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, #7b3aa0 0%, #4a1766 45%, #2a0b3d 100%); box-shadow: 0 12px 30px rgba(59, 15, 79, .22); position: relative; overflow: hidden; }
.live-note::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 0, .22), transparent 70%); pointer-events: none; }
.live-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.live-icon svg { fill: #ffc533; }
.live-text { flex: 1; min-width: 0; }
.live-text h2 { margin: 4px 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.live-text p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 14.5px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14);
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee07f; box-shadow: 0 0 0 0 rgba(62, 224, 127, .7); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 127, .65); } 70% { box-shadow: 0 0 0 9px rgba(62, 224, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 127, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-stat { flex: none; min-width: 190px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); position: relative; z-index: 1; }
.live-stat > b { display: block; font-size: 28px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.live-stat > b span { font-size: 16px; font-weight: 700; color: rgba(255, 255, 255, .7); }
.live-stat small { display: block; margin: 4px 0 8px; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.live-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ee07f, #b6f5cf); transition: width .5s; }
@media (max-width: 760px) { .live-note { flex-wrap: wrap; } .live-stat { flex: 1 1 100%; } .live-icon { display: none; } }

/* ---- winners: the score ring in the top right corner, school and table on one row */
.pod-top { position: relative; padding-right: 70px; min-height: 44px; }
.pod-top .pod-score { position: absolute; right: -4px; top: -6px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; background: none; }
.pod-top .pod-score small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pod-1 .pod-top { padding-right: 78px; }
.pod-pair { display: grid !important; grid-template-columns: 1fr auto; gap: 12px; }
.pod-pair > .pod-fact { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.pod-pair > .pod-fact > span:last-child { min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: #2a1f35; line-height: 1.3; }

/* ---- dashboard: click a project to see where it is on the floor map */
.jb-card[role="button"], .pod[role="button"] { cursor: pointer; }
.jb-card[role="button"]:hover { box-shadow: 0 0 0 2px #d9c8e8, 0 4px 12px rgba(29, 19, 38, .08); }
.jb-card[role="button"]:focus-visible, .pod[role="button"]:focus-visible { outline: 3px solid rgba(91, 33, 120, .35); outline-offset: 2px; }
.where-dlg { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 30px 80px rgba(20, 8, 30, .35); overflow: hidden; }
.where-dlg::backdrop { background: rgba(24, 10, 34, .55); backdrop-filter: blur(2px); }
.where-dlg[open] { display: flex; flex-direction: column; }
.where-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid #eee8f3; }
.where-text { flex: 1; min-width: 0; }
.where-text small { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #fde7f2; color: #b0005f; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.where-text small:empty { display: none; }
.where-text h3 { margin: 6px 0 4px; font-size: 20px; font-weight: 800; }
.where-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); }
.where-close { flex: none; width: 38px; height: 38px; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; font-size: 22px; line-height: 1; color: #5b5266; cursor: pointer; }
.where-close:hover { background: #f6f2fa; color: var(--ink); }
.where-map { flex: 1; min-height: 0; overflow: auto; padding: 14px; background: #faf8fc; }
.where-map svg { display: block; max-height: calc(100vh - 210px); margin: 0 auto; }
.where-note { margin: 0; padding: 18px 20px 22px; color: var(--muted); }
.where-hit rect { stroke: #8a0049 !important; stroke-width: 3 !important; }
.where-ring { fill: none; stroke: #e0007a; stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: whereRing 1.8s ease-out infinite; pointer-events: none; }
.where-ring.later { animation-delay: .9s; }
@keyframes whereRing { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .where-ring { animation: none; opacity: .6; } }

/* ================= winners, refined: equal cards, score in the header, one tidy row of details ================= */
.podium-wrap { background: #fff; border: 1px solid #e7e1ee; border-left: 5px solid var(--sc); box-shadow: 0 8px 24px rgba(39, 16, 56, .06); padding: 16px 18px 18px; }
.podium-head b { font-size: 18px; }
.podium-head span:last-child { background: color-mix(in srgb, var(--sc) 16%, #fff); color: color-mix(in srgb, var(--sc) 45%, #1d1326); border: 1px solid color-mix(in srgb, var(--sc) 40%, #fff); }
.podium-dot { box-shadow: none; }
.win-podium { align-items: stretch; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.win-podium.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pod, .pod-1 { padding: 16px 18px; gap: 10px; }
.pod-1 { background: linear-gradient(180deg, #fffaeb 0%, #fff 70%); border-color: #f0d27a; box-shadow: 0 10px 28px rgba(214, 160, 0, .18); }
.pod-top { position: static; display: flex; align-items: center; gap: 10px; padding-right: 0; min-height: 0; }
.pod-rank, .pod-1 .pod-rank { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
.pod-place { font-size: 11.5px; }
.pod-pts { margin-left: auto; display: inline-flex; align-items: baseline; gap: 3px; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--m1) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m1) 45%, #fff); }
.pod-pts b { font-size: 18px; font-weight: 900; color: #1d1326; font-variant-numeric: tabular-nums; }
.pod-pts small { font-size: 11px; font-weight: 700; color: var(--muted); }
.pod-title, .pod-1 .pod-title { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.pod-names { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 700; color: #2a1f35; line-height: 1.35; }
.pod-names svg { flex: none; margin-top: 2px; fill: none; stroke: #8d7a9c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pod-meta { margin-top: auto; display: grid; grid-template-columns: 1.1fr .6fr 1.3fr; gap: 10px; padding-top: 10px; border-top: 1px solid #f0ebf4; }
.pod-meta small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #9a8fa6; }
.pod-meta span { display: block; font-size: 13.5px; font-weight: 600; color: #2a1f35; line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 860px) { .win-podium, .win-podium.n2 { grid-template-columns: 1fr; } }
.win-podium .pod-1 { order: 1; } .win-podium .pod-2 { order: 2; } .win-podium .pod-3 { order: 3; }
/* ================= winners: calmer palette and clean corners ================= */
/* medal accents: deep gold, slate silver and bronze, used sparingly */
.pod { --m1: #64748b; --m-ink: #475569; --m-bg: #f1f5f9; }
.pod-1 { --m1: #b7862b; --m-ink: #8a6418; --m-bg: #fbf6ea; }
.pod-2 { --m1: #7c8696; --m-ink: #4b5563; --m-bg: #f2f4f7; }
.pod-3 { --m1: #a5673f; --m-ink: #7c4a2b; --m-bg: #f8efe9; }
.pod, .pod-1 { border-radius: 14px; border: 1px solid #e6e1ec; background: #fff; overflow: hidden;
  box-shadow: inset 0 3px 0 var(--m1), 0 1px 2px rgba(29, 19, 38, .05), 0 6px 16px rgba(29, 19, 38, .05); }
.pod-1 { border-color: #e8dcc0; background: linear-gradient(180deg, #fffdf8, #fff 55%); }
.pod::before { content: none; }
.pod:hover { transform: translateY(-2px); box-shadow: inset 0 3px 0 var(--m1), 0 2px 4px rgba(29, 19, 38, .06), 0 12px 26px rgba(29, 19, 38, .09); }
.pod-rank, .pod-1 .pod-rank { width: 32px; height: 32px; border-radius: 8px; font-size: 16px; font-weight: 800; color: #fff; background: var(--m1); box-shadow: none; }
.pod-place { color: var(--m-ink); letter-spacing: .07em; }
.pod-pts { padding: 4px 10px; border-radius: 8px; background: var(--m-bg); box-shadow: none; border: 1px solid color-mix(in srgb, var(--m1) 25%, #fff); }
.pod-pts b { font-size: 17px; color: #1f1a24; }
.pod-pts small { color: #8b8494; }
.pod-title, .pod-1 .pod-title { color: #1f1a24; font-weight: 750; }
.pod-names { color: #3a3342; font-weight: 650; }
.pod-meta { border-top-color: #efebf2; }
.pod-meta small { color: #9a93a3; letter-spacing: .06em; }
.pod-meta span { color: #2a2430; }
.podium-wrap { border-radius: 14px; }

/* ---- dashboard: a winner's details */
.info-dlg { width: min(640px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(20, 8, 30, .35); }
.info-dlg::backdrop { background: rgba(24, 10, 34, .55); backdrop-filter: blur(2px); }
.info-card { --m1: #64748b; box-shadow: inset 0 4px 0 var(--m1); }
.info-card.pod-1 { --m1: #b7862b; } .info-card.pod-2 { --m1: #7c8696; } .info-card.pod-3 { --m1: #a5673f; }
.info-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 20px 16px; border-bottom: 1px solid #efebf2; }
.info-head .pod-rank { width: 40px; height: 40px; border-radius: 10px; font-size: 19px; font-weight: 800; color: #fff; background: var(--m1); display: grid; place-items: center; flex: none; }
.info-head-text { flex: 1; min-width: 0; }
.info-head-text small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b8494; }
.info-head-text h3 { margin: 3px 0 0; font-size: 21px; font-weight: 800; line-height: 1.25; color: #1f1a24; }
.info-score { flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--m1) 10%, #fff); border: 1px solid color-mix(in srgb, var(--m1) 28%, #fff); }
.info-score b { font-size: 22px; font-weight: 900; color: #1f1a24; font-variant-numeric: tabular-nums; line-height: 1.1; }
.info-score small { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8b8494; }
.info-body { padding: 18px 20px 6px; display: grid; gap: 18px; }
.info-desc { margin: 0; font-size: 15px; line-height: 1.55; color: #3a3342; white-space: pre-line; }
.info-desc.none { color: #9a93a3; font-style: italic; }
.info-students > small, .info-grid dt { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #9a93a3; }
.info-students ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.info-students li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: #f5f2f8; font-size: 15px; font-weight: 650; color: #2a2430; }
.info-initial { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--m1); color: #fff; font-size: 12px; font-weight: 800; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; padding: 14px 16px; border-radius: 12px; background: #faf8fc; border: 1px solid #efebf2; }
.info-grid dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: #2a2430; }
.info-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } .info-head { flex-wrap: wrap; } }
/* completion rate in the corner of each division tile on the dashboard */
.cat-tile { position: relative; }
.cat-tile .t-pct { position: absolute; top: 10px; right: 12px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--sc) 12%, #fff); color: color-mix(in srgb, var(--sc) 40%, #1d1326); border: 1px solid color-mix(in srgb, var(--sc) 30%, #fff); }
.cat-tile .t-pct.full { background: #e6f5eb; color: #1f7a3e; border-color: #bfe5cc; }
.cat-tile:has(.t-pct) .t-name { padding-right: 52px; }
.pod-place, .pod-pts { white-space: nowrap; }
@media (max-width: 480px) { .pod-place svg { display: none; } .pod-pts b { font-size: 16px; } }
@media (max-width: 600px) { .cat-tile .t-sub { white-space: normal; overflow: visible; text-overflow: clip; } }
/* ---- the dashboard announcement while judging is under way */
.live-note { padding: 24px 28px; border-radius: 20px; gap: 22px;
  background: radial-gradient(90% 180% at 0% 0%, #8a3fb3 0%, #5b2178 40%, #2d0c42 100%); border: 1px solid rgba(255, 197, 51, .35); }
.live-note::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .07) 45%, transparent 60%);
  background-size: 250% 100%; animation: liveShine 6s linear infinite; pointer-events: none; }
@keyframes liveShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .live-note::before { animation: none; } }
.live-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #ffd45c, #f2a900); box-shadow: 0 8px 22px rgba(242, 169, 0, .35), inset 0 0 0 4px rgba(255, 255, 255, .25); }
.live-icon svg { fill: none; stroke: #3b1452; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(-12deg); }
.live-icon svg path { fill: none; }
.live-kicker { display: flex; align-items: center; gap: 10px; }
.live-kicker > span:last-child { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffc533; }
.live-text h2 { margin: 6px 0 4px; font-size: 28px; font-weight: 900; letter-spacing: -.015em; }
.live-text p { font-size: 15px; max-width: 640px; }
@media (max-width: 760px) { .live-icon { display: grid; width: 48px; height: 48px; } .live-text h2 { font-size: 22px; } }

/* ================= add / edit project: a cleaner, more professional form ================= */
.pf-dialog { max-width: 860px; }
.pf-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(20, 8, 30, .3); }
.pf-modal .modal-header { align-items: flex-start; padding: 22px 26px 18px; border-bottom: 1px solid #ece7f1; background: #fff; }
.pf-titlebox { flex: 1; min-width: 0; }
.pf-modal .modal-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: #1f1a24; }
.pf-progress { height: 4px; margin-top: 12px; max-width: 360px; border-radius: 999px; background: #eee9f3; overflow: hidden; }
.pf-progress i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #5b2178, #8a3fb3); transition: width .3s ease; }
.pf-modal .modal-body.pf-page { padding: 18px 22px; background: #f7f5fa; display: grid; gap: 14px; }
.pf-modal .pf-card { display: block; padding: 0; border: 1px solid #e7e2ed; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(29, 19, 38, .04); }
.pf-modal .pf-cardhead { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 0; width: auto; }
.pf-modal .pf-cardhead h3 { margin: 0; font-size: 16px; font-weight: 800; color: #1f1a24; }
.pf-modal .pf-cardhead p { margin: 2px 0 0; font-size: 13px; color: #857c8f; line-height: 1.4; }
.pf-step { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; margin-top: 1px;
  background: #f1ebf6; color: #5b2178; font-size: 13px; font-weight: 800; transition: background .2s, color .2s; }
.pf-card.done .pf-step { background: #1f9d55; color: #fff; }
.pf-modal .pf-cardbody { padding: 14px 20px 18px 60px; display: grid; gap: 14px; }
.pf-modal .form-label { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #3a3342; }
.pf-modal .form-control, .pf-modal .form-select { min-height: 42px; border-color: #ddd6e5; border-radius: 10px; font-size: 15px; color: #1f1a24; }
.pf-modal textarea.form-control { min-height: 84px; }
.pf-modal .form-control::placeholder { color: #aaa2b4; }
.pf-modal .form-control:focus, .pf-modal .form-select:focus { border-color: #8a3fb3; box-shadow: 0 0 0 3px rgba(91, 33, 120, .14); }
.pf-modal .form-control.is-invalid, .pf-modal .form-select.is-invalid { border-color: #d93a3a; box-shadow: 0 0 0 3px rgba(217, 58, 58, .12); }
.pf-modal .form-text { font-size: 12.5px; color: #8b8494; }
/* pick-one buttons: one quiet track, the chosen one raised */
.pf-modal .pf-choice { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: #f1edf5; box-shadow: inset 0 0 0 1px #e6e0ec; }
.pf-modal .pf-choice button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 14px; color: #5f5669; }
.pf-modal .pf-choice button:hover:not(:disabled) { color: #1f1a24; }
.pf-modal .pf-choice button[aria-checked="true"], .pf-modal .pf-choice button.on { background: #fff; color: #5b2178; box-shadow: 0 1px 3px rgba(29, 19, 38, .16); }
.pf-modal .pf-yesno { display: flex; width: 100%; } .pf-modal .pf-yesno button { flex: 1; }
.pf-modal .pf-num { background: #f1ebf6; color: #5b2178; font-weight: 800; }
.pf-modal .modal-footer { padding: 14px 22px; border-top: 1px solid #ece7f1; background: #fff; gap: 8px; }
.pf-modal .modal-footer .btn { min-height: 42px; padding: 8px 18px; border-radius: 10px; font-weight: 700; }
.pf-modal .modal-footer .btn-primary { background: #5b2178; border-color: #5b2178; box-shadow: 0 4px 12px rgba(91, 33, 120, .25); }
.pf-modal .modal-footer .btn-primary:hover { background: #4a1766; border-color: #4a1766; }
.pf-modal .pf-status { font-size: 13.5px; }
@media (max-width: 760px) { .pf-modal .pf-cardbody { padding: 12px 16px 16px; } .pf-modal .modal-body.pf-page { padding: 12px; } }
.pf-modal .pf-cardhead .pf-step { padding: 0; height: 28px; min-height: 0; border: 0; line-height: 1; }
.pf-modal .modal-footer { flex-wrap: nowrap; }
.pf-modal .modal-footer .pf-status { flex: 1 1 auto; min-width: 0; margin-right: auto; line-height: 1.35; }
.pf-modal .modal-footer .btn { flex: none; white-space: nowrap; }
@media (max-width: 760px) { .pf-modal .modal-footer { flex-wrap: wrap; } .pf-modal .modal-footer .pf-status { flex-basis: 100%; } }

/* ---- live dashboard for organizers with Settings: standings before the release, and each project's score */
.win-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-only-badge { display: none; padding: 3px 10px; border-radius: 999px; background: #fff3d6; color: #8a5a00; border: 1px solid #f1d58f; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#results.is-live .live-only-badge { display: inline-block; }
.jb-card { position: relative; }
.jb-score { position: absolute; top: 9px; right: 10px; padding: 2px 8px; border-radius: 7px; background: #f1ebf6; color: #5b2178; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.jb-card:has(.jb-score) > div { padding-right: 46px; }

/* ---- Judging section folds away */
.jb-fold { margin: 6px 0 12px; }
.jb-fold button { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; margin-left: -8px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 18px; font-weight: 800; color: #1f1a24; cursor: pointer; }
.jb-fold button:hover { background: #f1edf5; }
.jb-fold button:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.jb-fold small { font-size: 13px; font-weight: 600; color: var(--muted); }
.jb-chev { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.jb-fold.folded .jb-chev { transform: rotate(-90deg); }
/* winner tiles keep one height whichever division is shown: titles and names take two lines' room */
.pod-title, .pod-1 .pod-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.3em); }
.pod-names > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.35em); }
.pod-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-podium { min-height: 214px; }
.podium-wrap > p.text-muted { min-height: 214px; display: grid; place-items: center; margin: 0; border: 1px dashed #e2dbe9; border-radius: 14px; }

/* ---- All scores: each criterion's average with judge 1 and judge 2 under it */
.j12-cell { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.j12-cell > b { font-size: 15px; font-weight: 800; color: #1f1a24; }
.j12 { display: inline-flex; gap: 8px; font-size: 11.5px; color: #7c7386; font-weight: 600; white-space: nowrap; }
.j12 i { font-style: normal; font-size: 10px; font-weight: 800; color: #a79fb1; margin-right: 3px; letter-spacing: .03em; }
.total-cell .j12 { justify-content: flex-end; margin: 1px 0 3px; }
/* ---- the top 3 folds away too */
.podium-head { margin-bottom: 14px; }
.podium-wrap.folded { padding-bottom: 12px; }
.podium-wrap.folded .podium-head { margin-bottom: 0; }
.podium-fold { display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; margin-left: -4px; border: 0; border-radius: 10px; background: transparent; font: inherit; color: inherit; cursor: pointer; }
.podium-fold:hover { background: #f4f0f8; }
.podium-fold:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.podium-fold b { font-size: 18px; font-weight: 800; }
.podium-fold small { font-size: 13px; font-weight: 600; color: var(--muted); }
.podium-wrap.folded .jb-chev { transform: rotate(-90deg); }
.podium-tag { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: color-mix(in srgb, var(--sc) 16%, #fff); color: color-mix(in srgb, var(--sc) 45%, #1d1326); border: 1px solid color-mix(in srgb, var(--sc) 40%, #fff); }
.podium-wrap.folded .win-podium, .podium-wrap.folded > p { display: none; }
/* ---- pick-one buttons in the project form: the chosen one is clearly filled in */
.pf-modal .pf-choice button.on, .pf-modal .pf-choice button[aria-checked="true"] { background: #5b2178; color: #fff; box-shadow: 0 2px 6px rgba(91, 33, 120, .3); }
.pf-modal .pf-yesno button[data-v="true"].on { background: #1f9d55; box-shadow: 0 2px 6px rgba(31, 157, 85, .3); }
.pf-modal .pf-yesno button[data-v="false"].on { background: #4b5563; box-shadow: 0 2px 6px rgba(75, 85, 99, .28); }
.pf-modal .pf-choice button.on::before { content: "\2713"; margin-right: 2px; font-weight: 900; }
.pf-modal .pf-choice button:not(.on):hover:not(:disabled) { background: rgba(255, 255, 255, .7); }
/* how many students: two equal number buttons */
.pf-modal .pf-count { display: inline-grid; grid-template-columns: repeat(2, 64px); }
.pf-modal .pf-count button { justify-content: center; padding: 6px 0; font-size: 16px; font-weight: 800; }
.pf-modal .pf-count button.on::before { content: none; }
/* project type: two buttons of the same width */
.pf-modal .pf-type { display: inline-grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); }
.pf-modal .pf-type button { justify-content: center; }

/* ================= Projects list, refined: denser rows, quieter chrome, hover-only actions ================= */
/* toolbar: search with an icon, status as one switch, needs as small chips, import/export quieter */
.rg-search { position: relative; display: inline-flex; align-items: center; flex: 0 1 320px; margin: 0; }
.rg-search svg { position: absolute; left: 11px; fill: none; stroke: #8b8494; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.rg-search .grid-search { width: 100%; padding-left: 34px; border-radius: 10px; }
.reg .status-filter { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #f1edf5; box-shadow: inset 0 0 0 1px #e6e0ec; }
.reg .status-filter .status-pill { border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.reg .status-filter .status-pill.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(29, 19, 38, .14); }
.reg .need-filter .need-check { border-radius: 999px; }
.reg .rg-tools #importProjects, .reg .rg-tools .dropdown > .btn { border-color: #ddd6e5; color: #4b4356; background: #fff; }
.reg .rg-tools #importProjects:hover, .reg .rg-tools .dropdown > .btn:hover { border-color: var(--brand); color: var(--brand); background: #faf7fc; }

/* school header: white, a colored edge, the progress on the right */
.reg .pl-group { overflow: clip; border-color: #e6e1ec; box-shadow: 0 1px 2px rgba(29, 19, 38, .04); }
.reg .pl-school { background: #fff !important; color: #1f1a24 !important; border-left: 5px solid var(--school) !important; border-bottom: 1px solid #eee9f3 !important; padding: 12px 18px 12px 16px; }
.reg .pl-school-name { font-size: 16px; font-weight: 800; }
.reg .pl-count { font-size: 13px; color: #857c8f; font-weight: 600; }
.reg .pl-school .pl-add { border-radius: 9px; }

/* column names stay in view while scrolling */
.reg .pl-head { position: sticky; top: var(--bar-h, 56px); z-index: 3; background: #faf9fc; }

/* rows: tighter, one line of description, quieter details */
.reg .plist .prow { padding-top: 9px; padding-bottom: 9px; min-height: 56px; }
.reg .plist .prow:hover { background: #fcfaff; }
.reg .pr-main h3 { display: flex; align-items: center; gap: 8px; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reg .pr-main p { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.pr-draft { flex: none; padding: 1px 7px; border-radius: 6px; background: #fff3d6; color: #8a5a00; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.reg .pr-inst { color: #7c7386; font-weight: 500; font-size: 13px; }
.reg .pr-kind .pc-tag { padding: 0; border: 0; background: none; box-shadow: none; font-size: 13px; font-weight: 600; color: #3a3342; }
.reg .pr-kind .pc-tag i { width: 9px; height: 9px; }
.pr-needcol { display: flex; gap: 6px; align-items: center; }
.reg .pc-students li { gap: 6px; }
.reg .pc-students li b, .reg .pc-students li em { padding: 0; border: 0; background: none; box-shadow: none; font-size: 11.5px; font-weight: 700; color: #9a93a3; font-style: normal; }
.reg .pc-students li span { font-size: 13.5px; }

/* the table number reads as text; its box shows on hover or while typing */
.reg .plist .pr-table-input { border-color: transparent; background: transparent; box-shadow: none; font-weight: 800; }
.reg .plist .pr-table-input:placeholder-shown { border-style: solid; background: transparent; }
.reg .plist .prow:hover .pr-table-input, .reg .plist .pr-table-input:focus { border-color: #d6cce2; background: #fff; }
.reg .plist .pr-table-input.off-map { border-color: #e0a100; background: #fffaeb; }

/* Edit and the drag grip only when the row is pointed at (always on touch screens) */
@media (hover: hover) {
  .reg .plist .prow .pc-edit, .reg .plist .prow .pr-grip { opacity: 0; transition: opacity .12s; }
  .reg .plist .prow:hover .pc-edit, .reg .plist .prow:focus-within .pc-edit,
  .reg .plist .prow:hover .pr-grip, .reg .plist .prow:focus-within .pr-grip { opacity: 1; }
}

/* the new column layout on wide screens: # · instructor · project · division · needs · students · table · edit */
@media (min-width: 861px) {
  .reg .plist { --cols: 52px minmax(0, .85fr) minmax(0, 2.4fr) minmax(0, 1.05fr) 58px minmax(0, 1.5fr) 52px; }
  .reg .plist.has-table { --cols: 52px minmax(0, .85fr) minmax(0, 2.4fr) minmax(0, 1.05fr) 58px minmax(0, 1.5fr) 114px 52px; }
}
/* upright iPad: the needs go where the status was */
@media (min-width: 600px) and (max-width: 860px) {
  .reg .plist .prow > .pr-needcol { grid-area: status; }
  .pl-needs-head { display: none; }
}
/* the school header is white now: its add button and goal meter in dark ink */
.reg .pl-school .pl-add { color: var(--brand) !important; background: #fff !important; border: 1px solid #d6cce2 !important; }
.reg .pl-school .pl-add:hover { background: #f7f2fb !important; border-color: var(--brand) !important; }
.reg .pl-school .pl-goal, .reg .pl-school .pl-goal * { color: #2a2430 !important; }
.reg .pl-school .pl-goal small, .reg .pl-school .pl-goal i { color: #857c8f !important; }
/* T-shirt size as quiet gray text after the name */
.reg .plist .pc-students li > b { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 11.5px; font-weight: 700; color: #9a93a3 !important; }
/* school header easier to spot: a soft tint of the school's color, a thicker edge and a bigger name */
.reg .pl-school { background: color-mix(in srgb, var(--school) 11%, #fff) !important; border-left: 6px solid var(--school) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--school) 30%, #fff) !important; padding: 14px 18px 14px 16px; }
.reg .pl-school-name { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; letter-spacing: -.01em;
  color: color-mix(in srgb, var(--school) 55%, #1d1326) !important; }
.reg .pl-school-name::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--school); box-shadow: 0 0 0 3px color-mix(in srgb, var(--school) 25%, #fff); }
.reg .pl-count { padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid color-mix(in srgb, var(--school) 30%, #fff); color: #4b4356; }
.reg .pl-group { border-color: color-mix(in srgb, var(--school) 30%, #e6e1ec); }
/* goal ring on the light school header: a white center with the percentage in dark ink, the ring in the school color */
.reg .pl-school .pl-goal { background: #fff; border: 1px solid color-mix(in srgb, var(--school) 30%, #fff); padding: 4px 14px 4px 4px; }
.reg .pl-school .pl-ring { width: 40px; height: 40px; background: conic-gradient(var(--school) calc(var(--pct) * 1%), color-mix(in srgb, var(--school) 18%, #fff) 0) !important; }
.reg .pl-school .pl-ring::before { inset: 5px; background: #fff; }
.reg .pl-school .pl-ring span { color: #1f1a24 !important; font-size: 10.5px; }
.reg .pl-school .pl-goal.met .pl-ring span { color: color-mix(in srgb, var(--school) 70%, #000) !important; font-size: 15px; }
.reg .pl-school .pl-goaltext b { color: #1f1a24 !important; }
.reg .pl-school .pl-goaltext b i { color: #6b6274 !important; opacity: 1; }
.reg .pl-school .pl-goaltext small { color: #6b6274 !important; opacity: 1; }
/* school header: a little deeper tint, a little shorter */
.reg .pl-school { background: color-mix(in srgb, var(--school) 19%, #fff) !important; border-bottom-color: color-mix(in srgb, var(--school) 40%, #fff) !important; padding: 8px 16px 8px 14px; }
.reg .pl-school-name { font-size: 17px; }
.reg .pl-school .pl-goal { padding: 2px 12px 2px 3px; }
.reg .pl-school .pl-ring { width: 32px; height: 32px; }
.reg .pl-school .pl-ring::before { inset: 4px; }
.reg .pl-school .pl-ring span { font-size: 9.5px; }
.reg .pl-school .pl-goaltext b { font-size: 14.5px; }
.reg .pl-school .pl-add { padding: 4px 12px; min-height: 32px; }
/* filters keep their width whatever the counts are: room for three digits in each count */
.reg .status-filter b, .reg .need-filter b { display: inline-block; min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.reg #shown { display: inline-block; min-width: 13ch; }
.reg .status-filter b, .reg .need-filter b { min-width: calc(3ch + 14px); }

/* import and export as small icon buttons, so the tools stay on one row */
.rg-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.rg-icon-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reg .rg-tools { flex-wrap: nowrap; }
.reg .rg-tools .rg-search { flex: 1 1 220px; min-width: 160px; }
@media (max-width: 1100px) { .reg .rg-tools { flex-wrap: wrap; } }
/* the description grows with its text: no inner scroll bar, no drag handle */
.pf-modal textarea.form-control { overflow: hidden; resize: none; min-height: 84px; line-height: 1.5; }
/* the page keeps room for the scroll bar, so nothing shifts sideways when the page gets taller or shorter */
html { scrollbar-gutter: stable; }
/* the number column looks the same whether or not the drag grip is there */
.reg .plist .pr-no { position: relative; flex-direction: row; align-items: center; justify-content: center; }
.reg .plist .pr-no .pr-grip { position: absolute; left: -6px; top: 50%; transform: translateY(-50%); }
/* drafts stand out in the list: a warm tint and an amber edge */
.reg .plist .prow.draft { background: #fff8e6; box-shadow: inset 4px 0 0 #f0a500; }
.reg .plist .prow.draft:hover { background: #fff3d6; }
.reg .plist .prow.draft .pr-draft { background: #f0a500; color: #fff; }
/* drafts: one clear amber everywhere (row, edge, tag, number) */
.reg .plist .prow.draft { --draft: #e58a00; background: #ffe9b8; box-shadow: inset 6px 0 0 var(--draft); }
.reg .plist .prow.draft:hover { background: #ffe0a0; }
.reg .plist .prow.draft .pr-draft { background: var(--draft); color: #fff; }
.reg .plist .prow.draft .pr-no span:last-child { color: var(--draft); }
.reg .plist .prow.draft .pr-main p, .reg .plist .prow.draft .pr-inst { color: #7a5a1e; }
.reg .plist .prow.draft + .prow, .reg .plist .prow.draft { border-top-color: #f5cf7a; }
/* the striped rows must not cover a draft's color */
.reg .plist .prow.draft:nth-child(odd of .prow), .reg .plist .prow.draft:nth-child(even of .prow) { background: #ffe9b8; }
.reg .plist .prow.draft:hover { background: #ffe0a0 !important; }
/* every project row the same height on wide screens: room for two students, one line each */
@media (min-width: 861px) {
  .reg .plist .prow { height: 62px; min-height: 62px; padding-top: 0; padding-bottom: 0; align-items: center; }
  .reg .plist .pc-students { min-height: 0; justify-content: center; }
  .reg .plist .pc-students li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
  .reg .plist .pc-students li > span { overflow: hidden; text-overflow: ellipsis; }
  .reg .plist .pr-main, .reg .plist .pr-inst, .reg .plist .pr-kind { min-width: 0; overflow: hidden; }
  .reg .plist .pr-inst { white-space: nowrap; text-overflow: ellipsis; }
}
@media (min-width: 861px) { .reg .plist .pc-students { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; } }

/* ---- projects missing information: a red tag by the title, and the missing parts in red */
.pr-missing { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 2px; border-radius: 999px; background: #fde8e7; border: 1px solid #f5c2bd;
  color: #b42318; font-size: 11px; font-weight: 800; line-height: 1.5; white-space: nowrap; cursor: help; }
.reg .plist .prow.incomplete .pr-inst.none, .reg .plist .prow.incomplete .pr-main p.none,
.reg .plist .prow.incomplete .pc-students li.none, .reg .plist .prow.incomplete .pc-students li em { color: #d92d20 !important; font-weight: 700; font-style: normal; }
.reg .plist .prow.incomplete .pr-kind .pc-tag.missing { color: #d92d20; background: none; border: 0; padding: 0; font-weight: 700; }
.need-missing .need-ico { color: #d92d20; }
.need-missing.on { border-color: #d92d20 !important; background: #fde8e7 !important; }
.pr-missing i { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #d92d20; color: #fff; font-style: normal; font-size: 10px; font-weight: 900; }

/* "This project has no students" in the project form */
.pf-nostud { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #e6e0ec; border-radius: 10px; background: #faf8fc; cursor: pointer; }
.pf-nostud input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.pf-nostud b { display: block; font-size: 14px; color: #1f1a24; }
.pf-nostud small { display: block; font-size: 12.5px; color: #857c8f; }
.pf-nostud:has(input:checked) { border-color: #8a3fb3; background: #f6effa; }
.pf-students-part { display: grid; gap: 14px; }
.pf-students-part[hidden] { display: none; }
.reg .pc-students li.nostud { color: #6b6274; font-style: italic; font-size: 13px; }
.pf-nostud input.form-check-input { border: 2px solid #9d8fae; background-color: #fff; }
.pf-nostud input.form-check-input:checked { background-color: #5b2178; border-color: #5b2178; }
.pf-nostud[hidden] { display: none; }
/* the project form keeps every part in its place while choosing: parts that do not apply are dimmed, not removed */
.pf-modal .pf-students-part.off, .pf-modal .pf-student.off { opacity: .4; pointer-events: none; }
.pf-modal .pf-student.off input::placeholder { color: transparent; }
.pf-nostud.off { opacity: .5; cursor: not-allowed; }
/* the division hint always takes two lines' room, whichever message it shows */
.pf-modal .pf-division-hint { min-height: calc(2 * 1.45em); line-height: 1.45; }
.pf-modal .pf-student { margin-bottom: 0; }
.pf-nostud { align-items: center; padding: 9px 12px; }

/* ---- a project opened to look at: the form's layout, read-only, easy to read */
.pf-view .form-control:disabled, .pf-view .form-select:disabled { background: #faf8fc; border-color: #ece7f1; color: #1f1a24; opacity: 1; -webkit-text-fill-color: #1f1a24; }
.pf-view .form-select:disabled { background-image: none; }
.pf-view .form-control:disabled::placeholder { color: #b5adbf; -webkit-text-fill-color: #b5adbf; }
.pf-view .pf-choice button:disabled { opacity: 1; cursor: default; }
.pf-view .pf-choice button:disabled:not(.on) { color: #a79fb1; }
.pf-view .pf-nostud.off { display: none; }
.pf-view .pf-student.off { display: none; }
.pf-editbtn { min-width: 150px; }
/* ---- Project details (read-only) is a compact version of the form */
.pf-view .pf-dialog { max-width: 680px; }
.pf-view .modal-header { padding: 14px 18px 10px; }
.pf-view .modal-title { font-size: 18px !important; }
.pf-view .modal-body.pf-page { padding: 10px 12px; gap: 8px; }
.pf-view .pf-card .pf-cardhead { padding: 10px 14px 0; }
.pf-view .pf-card .pf-cardhead p, .pf-view .pf-step, .pf-view .form-text, .pf-view .pf-students-head { display: none; }
.pf-view .pf-card .pf-cardhead h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: #857c8f; }
.pf-view .pf-card .pf-cardbody { padding: 6px 14px 12px; gap: 8px; }
.pf-view .form-label { margin-bottom: 2px; font-size: 11.5px; color: #9a93a3; }
.pf-view .form-control, .pf-view .form-select { min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 14px; }
.pf-view textarea.form-control { min-height: 0; }
.pf-view .pf-choice button { min-height: 30px; padding: 3px 12px; font-size: 13px; }
.pf-view .pf-count { grid-template-columns: repeat(2, 44px); }
.pf-view .pf-grid { gap: 8px 12px; }
.pf-view .pf-num { width: 24px; height: 24px; font-size: 12px; }
.pf-view .modal-footer { padding: 10px 16px; }
.pf-view .modal-footer .btn { min-height: 36px; padding: 6px 14px; }
/* the table number in the Project details header */
.pf-tablepill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: #5b2178; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.pf-tablepill.none { background: #f1edf5; color: #857c8f; }
.pf-view .pf-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
/* ---- the edit / add form, more compact too */
.pf-dialog { max-width: 740px; }
.pf-modal .modal-header { padding: 16px 20px 12px; }
.pf-modal .modal-title { font-size: 19px; }
.pf-modal .pf-progress { margin-top: 8px; }
.pf-modal .modal-body.pf-page { padding: 12px 14px; gap: 10px; }
.pf-modal .pf-cardhead { padding: 12px 16px 0; }
.pf-modal .pf-cardhead p { display: none; }
.pf-modal .pf-cardhead h3 { font-size: 15px; }
.pf-modal .pf-step { width: 24px; height: 24px; font-size: 12px; }
.pf-modal .pf-cardhead .pf-step { height: 24px; }
.pf-modal .pf-cardbody { padding: 10px 16px 14px 52px; gap: 10px; }
.pf-modal .form-label { margin-bottom: 4px; font-size: 12.5px; }
.pf-modal .form-control, .pf-modal .form-select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 14.5px; }
.pf-modal textarea.form-control { min-height: 64px; }
.pf-modal .pf-choice button { min-height: 32px; padding: 4px 14px; font-size: 13.5px; }
.pf-modal .pf-grid { gap: 10px 14px; }
.pf-modal .modal-footer { padding: 10px 16px; }
.pf-modal .modal-footer .btn { min-height: 38px; padding: 6px 16px; }
.pf-modal .pf-division-hint { min-height: calc(2 * 1.35em); line-height: 1.35; font-size: 12px; }
@media (max-width: 760px) { .pf-modal .pf-cardbody { padding: 10px 14px 14px; } }
/* ---- Projects toolbar on every screen width: nothing squeezes or overlaps
   wide:      [search .........] [All | Submitted | Drafts] [Needs power] [Display board] [Missing info]  120 projects  [⤓][⤒]
   narrower:  the three need chips show only their icon and count (the name is in the tooltip)
   narrow:    search on its own line, the rest wraps under it */
.reg .rg-tools { display: flex; flex-wrap: wrap !important; align-items: center; gap: 8px 10px; }
.reg .rg-tools .rg-search { flex: 1 1 240px; min-width: 200px; max-width: 420px; }
.reg .rg-tools .status-filter { flex: none; display: inline-grid !important; grid-template-columns: repeat(3, auto); }
.reg .rg-tools .status-filter .status-pill { white-space: nowrap; }
.reg .rg-tools .need-filter { flex: none; display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.reg .rg-tools .need-check { white-space: nowrap; }
.reg .rg-tools #shown { min-width: 0; white-space: nowrap; }
.reg .rg-tools > .flex-grow-1 { flex: 1 1 0; min-width: 0; }
.reg .rg-tools .rg-icon-btn, .reg .rg-tools .dropdown { flex: none; }
@media (max-width: 1500px) {
  .reg .need-check > span:not(.need-ico) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .reg .need-check { gap: 6px; padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 900px) {
  .reg .rg-tools .rg-search { flex-basis: 100%; max-width: none; }
}
/* tighter status switch and need chips so the toolbar fits on one line down to about 1100px */
.reg .rg-tools .status-filter .status-pill { min-width: 0 !important; padding: 5px 12px; gap: 6px; }
.reg .rg-tools .status-filter b, .reg .rg-tools .need-filter b { min-width: calc(3ch + 8px); padding-left: 4px; padding-right: 4px; }
.reg .rg-tools .need-check { padding-top: 4px; padding-bottom: 4px; }
@media (max-width: 1300px) { .reg .rg-tools #shown { display: none; } }
/* the two icon buttons stay together at the right, also when they wrap to their own line */
.reg .rg-tools #importProjects, .reg .rg-tools > .flex-grow-1 + .dropdown { margin-left: auto; }
.reg .rg-tools > .flex-grow-1 { flex: 0 0 0; }
@media (max-width: 1100px) { .reg .rg-tools .rg-search { flex-basis: 180px; min-width: 160px; } }
/* the search box can shrink; import and export stay together at the right */
.reg .rg-search .grid-search { min-width: 0 !important; }
.reg .rg-tools .rg-actions { display: inline-flex; gap: 8px; margin-left: auto; flex: none; }
.reg .rg-tools .rg-actions #importProjects, .reg .rg-tools .rg-actions .dropdown { margin-left: 0; }

/* ---- the room itself on the map: doors, windows, walls, bleachers, stage ... */
.mi-door rect, .mi-door2 rect { fill: #fff7ec; stroke: #b7791f; stroke-width: 1.5; }
.mi-exit rect { fill: #e8f6ec; stroke: #1f9d55; stroke-width: 1.5; }
.mi-window rect { fill: #e8f2fd; stroke: #3b7fd1; stroke-width: 1.5; }
.mi-wall rect { fill: #4b4356; stroke: #2a2430; stroke-width: 1; }
.mi-pillar rect { fill: #9a93a3; stroke: #4b4356; stroke-width: 1.5; }
.mi-bleachers rect { fill: #ece7f1; stroke: #8d7a9c; stroke-width: 1.5; }
.mi-bleachers rect { fill: #ece7f1; }
.mi-stage rect { fill: #f3ecf8; stroke: #5b2178; stroke-width: 2; }
.mi-stairs rect { fill: #f4f2f6; stroke: #6b6274; stroke-width: 1.5; stroke-dasharray: 4 3; }
.mi-restroom rect { fill: #eef2f7; stroke: #6b7a90; stroke-width: 1.5; }
.mi-wall .mi-icon, .mi-pillar .mi-icon { stroke: #fff; }
.mi-room-label { font-weight: 700; fill: #4b4356; }
.mi-wall .mi-room-label { fill: #fff; }
.mi-door .mi-room-label, .mi-door2 .mi-room-label { fill: #8a5a12; }
.mi-exit .mi-room-label { fill: #1f7a3e; }
.mi-window .mi-room-label { fill: #2456a6; }

/* text size control in the map item panel */
.fs-row { display: flex; align-items: center; gap: 6px; }
.fs-row .mt-btn { min-width: 40px; justify-content: center; font-weight: 800; }
.fs-value { min-width: 46px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f1a24; }

/* ---- project form, space used well: fields side by side, three sections */
.pf-modal .pf-row { display: grid; gap: 10px 14px; align-items: start; }
.pf-modal .pf-row-st { grid-template-columns: minmax(150px, 1fr) 2fr; }
.pf-modal .pf-row-2 { grid-template-columns: auto 1fr; }
.pf-modal .pf-row-4 { grid-template-columns: 1.4fr .8fr 1fr 1fr; }
.pf-modal .pf-row-4:not(:has(> :nth-child(4))) { grid-template-columns: 1.6fr 1fr 1fr; }
.pf-modal .pf-row > .pf-field { min-width: 0; }
.pf-modal .pf-division-hint { min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-modal .pf-stud-top { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.pf-modal .pf-stud-top .pf-nostud { margin-bottom: 1px; padding: 6px 12px; }
.pf-modal .pf-needs, .pf-modal .pf-row-4 .pf-yesno { width: 100%; }
.pf-modal .pf-row-4 .pf-yesno button { padding-left: 6px; padding-right: 6px; }
.pf-modal .pf-cardbody { padding-left: 16px; }
@media (max-width: 760px) {
  .pf-modal .pf-row-st, .pf-modal .pf-row-2 { grid-template-columns: 1fr; }
  .pf-modal .pf-row-4, .pf-modal .pf-row-4:not(:has(> :nth-child(4))) { grid-template-columns: 1fr 1fr; }
}
/* students: 1 and 2 stacked on the left, each beside its own name row */
.pf-modal .pf-stud-grid { display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: start; }
.pf-modal .pf-stud-left .pf-count { display: inline-grid !important; grid-template-columns: 52px !important; grid-template-rows: 38px 38px; row-gap: 8px; }
.pf-modal .pf-stud-left .pf-count button { min-height: 38px; }
.pf-modal .pf-stud-grid .pf-students-part .pf-student .pf-num { display: none; }
.pf-modal .pf-stud-grid .pf-student { grid-template-columns: minmax(0, 1fr) 150px; }
.pf-modal .pf-stud-grid .pf-students-head { grid-template-columns: minmax(0, 1fr) 150px; padding-left: 0; }
.pf-modal .pf-stud-grid .pf-student + .pf-student { margin-top: 8px; }
.pf-modal .pf-nostud { align-self: start; justify-self: start; }
/* the column names above the student rows and the "Students" label above 1/2 have the same height, so 1 and 2 sit beside their rows */
.pf-modal .pf-stud-grid .pf-students-head { display: flex !important; gap: 10px; height: 20px; margin: 0 0 6px; align-items: flex-end; }
.pf-modal .pf-stud-grid .pf-students-head::before { content: none !important; display: none !important; }
.pf-modal .pf-stud-grid .pf-students-head > span:first-child { flex: 1; }
.pf-modal .pf-stud-grid .pf-students-head > span:last-child { flex: 0 0 150px; }
.pf-modal .pf-stud-left .form-label { height: 20px; margin: 0 0 6px; display: flex; align-items: flex-end; }
.pf-modal .pf-stud-grid .pf-student { min-height: 38px; }
.pf-modal .pf-stud-left .form-label { margin-bottom: 3px; }
/* "No students needed" on the right of the Students heading */
.pf-modal .pf-cardhead { align-items: center; }
.pf-modal .pf-cardhead > .pf-nostud { margin-left: auto; padding: 4px 10px; font-size: 13px; }
.pf-modal .pf-cardhead > .pf-nostud b { font-size: 13px; }
.pf-view .pf-cardhead > .pf-nostud:not(:has(input:checked)) { display: none; }
/* 1 and 2: two neat number buttons, not one chunky track */
.pf-modal .pf-stud-spacer { height: 23px; }
.pf-modal .pf-stud-left .pf-count { padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; gap: 8px !important; grid-template-rows: 38px 38px; grid-template-columns: 38px !important; }
.pf-modal .pf-stud-left .pf-count button { width: 38px; height: 38px; min-height: 38px; padding: 0 !important; border-radius: 10px !important; border: 1.5px solid #d6cce2 !important;
  background: #fff !important; color: #6b6274 !important; font-size: 15px !important; font-weight: 800; box-shadow: none !important; }
.pf-modal .pf-stud-left .pf-count button:not(.on):hover:not(:disabled) { border-color: #5b2178 !important; color: #5b2178 !important; }
.pf-modal .pf-stud-left .pf-count button.on { background: #5b2178 !important; border-color: #5b2178 !important; color: #fff !important; box-shadow: 0 2px 6px rgba(91, 33, 120, .3) !important; }
.pf-modal .pf-stud-left .pf-count button.on::before { content: none !important; }
.pf-modal .pf-stud-spacer { height: 26px; }
/* ================= project form: every pick-one control uses the same separate buttons as 1 / 2 =================
   white with a thin border; the chosen one filled (purple; Yes green, No grey); hovering never hides the text */
.pf-modal .pf-choice { padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; gap: 8px !important; display: inline-flex; }
.pf-modal .pf-yesno, .pf-modal .pf-type { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
.pf-modal .pf-choice button { min-height: 38px; padding: 4px 12px !important; border-radius: 10px !important; border: 1.5px solid #d6cce2 !important; background: #fff !important;
  color: #4b4356 !important; font-weight: 700 !important; box-shadow: none !important; justify-content: center; transition: border-color .12s, background .12s, color .12s; }
.pf-modal .pf-choice button:not(.on):hover:not(:disabled) { border-color: #5b2178 !important; color: #5b2178 !important; background: #faf7fc !important; }
.pf-modal .pf-choice button.on { background: #5b2178 !important; border-color: #5b2178 !important; color: #fff !important; box-shadow: 0 2px 6px rgba(91, 33, 120, .28) !important; }
.pf-modal .pf-yesno button[data-v="true"].on { background: #1f9d55 !important; border-color: #1f9d55 !important; box-shadow: 0 2px 6px rgba(31, 157, 85, .28) !important; }
.pf-modal .pf-yesno button[data-v="false"].on { background: #4b5563 !important; border-color: #4b5563 !important; box-shadow: 0 2px 6px rgba(75, 85, 99, .25) !important; }
.pf-modal .pf-choice button.on:hover { color: #fff !important; filter: brightness(1.06); }
.pf-modal .pf-choice button:disabled { opacity: .5; }
.pf-view .pf-choice button:disabled { opacity: 1; }
.pf-view .pf-choice button:disabled:not(.on) { color: #b5adbf !important; border-color: #ece7f1 !important; }
/* the 1 / 2 buttons keep their square size */
.pf-modal .pf-stud-left .pf-count { display: inline-grid !important; }
.pf-modal .pf-stud-left .pf-count button { padding: 0 !important; width: 38px; }
/* Project details: the "2" button and its (empty) row stay visible, so it reads like the edit form */
.pf-view .pf-student.off { display: grid !important; opacity: .45; }
.pf-view .pf-choice button:disabled:not(.on) { color: #8b8494 !important; border-color: #ddd5e6 !important; background: #fff !important; }
/* Project details (looking only): a one-student project shows only its one student; the 1 / 2 choice is for editing */
.pf-view .pf-student.off { display: none !important; }
.pf-view .pf-stud-left .pf-count button:not(.on) { display: none !important; }
.pf-view .pf-stud-left .pf-count { grid-template-rows: 38px !important; }
/* Project details: no 1 / 2 choice at all, just the students, each with its number in a small circle */
.pf-view .pf-stud-left { display: none !important; }
.pf-view .pf-stud-grid { grid-template-columns: 1fr; }
.pf-view .pf-stud-grid .pf-student { grid-template-columns: 26px minmax(0, 1fr) 150px; }
.pf-view .pf-stud-grid .pf-student .pf-num { display: grid !important; place-items: center; }
.pf-view .pf-stud-grid .pf-students-head { padding-left: 36px; }
/* Students: both rows always open; 1 and 2 are just numbers beside them (one name = one student, two names = two) */
.pf-modal .pf-stud-left { display: none !important; }
.pf-modal .pf-stud-grid { grid-template-columns: 1fr; }
.pf-modal .pf-stud-grid .pf-student { grid-template-columns: 30px minmax(0, 1fr) 150px; }
.pf-modal .pf-stud-grid .pf-student .pf-num { display: grid !important; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #f1ebf6; color: #5b2178; font-size: 14px; font-weight: 800; }
.pf-modal .pf-stud-grid .pf-students-head { padding-left: 40px; }
.pf-modal .pf-student-note:empty { display: none; }
/* instructor · needs power · display board · table number */
.pf-modal .pf-row-4 { grid-template-columns: 1.4fr 1fr 1fr .8fr; }
.pf-modal .pf-row-4:not(:has(> :nth-child(4))) { grid-template-columns: 1.6fr 1fr 1fr; }
/* Project details: empty student rows are not shown */
.pf-view .pf-student:has(input:placeholder-shown) { display: none !important; }
.pf-view .pf-students-part:not(:has(.pf-student input:not(:placeholder-shown))) .pf-students-head { display: none; }
/* Project details with no students: a clear note instead of empty boxes */
.pf-students-note { padding: 10px 12px; border-radius: 10px; background: #fde8e7; border: 1px solid #f5c2bd; color: #b42318; font-weight: 700; font-size: 13.5px; }
.pf-students-note.ok { background: #f1edf5; border-color: #e2dbe9; color: #4b4356; }
.pf-students-note[hidden] { display: none; }
.pf-view .pf-students-part.empty > .pf-field { display: none; }
/* "No students needed" in the list: a small grey tag, not slanted text that gets its bottom cut off */
.reg .plist .pc-students li.nostud { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #f1edf5; border: 1px solid #e2dbe9;
  color: #5f5669; font-style: normal; font-size: 12.5px; font-weight: 600; line-height: 1.4; overflow: visible; white-space: nowrap; }

/* ---- T-shirts: the students who wear the picked size */
.sl-head, .sl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) 110px minmax(0, 1.2fr) 90px 90px; gap: 12px; align-items: center; padding: 0 18px 0 21px; }
.sl-head { padding-top: 8px; padding-bottom: 8px; background: #faf9fc; border-bottom: 1px solid var(--hair); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sl-row { min-height: 52px; border-bottom: 1px solid #f0ecf4; cursor: pointer; }
.sl-row:last-child { border-bottom: 0; }
.sl-row:hover { background: #fcfaff; }
.sl-row:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.sl-inst { color: #7c7386; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-inst.none { color: #d92d20; font-weight: 700; }
.sl-name { min-width: 0; display: flex; flex-direction: column; }
.sl-name b { font-size: 14.5px; color: #1f1a24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-name small { font-size: 12px; color: #9a93a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-grade { font-size: 13.5px; color: #3a3342; }
.sl-div { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #3a3342; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-div i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.sl-size { justify-self: start; padding: 2px 10px; border-radius: 7px; background: #f1ebf6; color: #5b2178; font-weight: 800; font-size: 13px; }
.sl-size.none { background: #fde8e7; color: #b42318; }
.sl-table { font-weight: 800; color: var(--brand); }
.sl-table.none { color: #c4bacd; font-weight: 500; }
@media (max-width: 860px) {
  .sl-head { display: none; }
  .sl-row { grid-template-columns: 1fr auto; grid-template-areas: "name size" "inst table" "grade div"; padding-top: 10px; padding-bottom: 10px; row-gap: 4px; }
  .sl-name { grid-area: name; } .sl-size { grid-area: size; justify-self: end; } .sl-inst { grid-area: inst; } .sl-table { grid-area: table; justify-self: end; }
  .sl-grade { grid-area: grade; } .sl-div { grid-area: div; justify-self: end; }
}
/* import / export: a sheet icon with an arrow in or out, and a short word beside it */
.reg .rg-tools .rg-icon-btn { width: auto; min-width: 36px; padding: 0 12px !important; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.reg .rg-tools .rg-caret { margin-left: -2px; opacity: .7; }
@media (max-width: 1300px) { .reg .rg-tools .rg-btn-word, .reg .rg-tools .rg-caret { display: none; } .reg .rg-tools .rg-icon-btn { padding: 0 !important; width: 36px; justify-content: center; } }

/* ---- the map's color legend */
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 2px 0 10px; padding: 8px 12px; border: 1px solid #ece7f1; border-radius: 10px; background: #fff; font-size: 12.5px; color: #3a3342; }
.map-legend[hidden] { display: none; }
.ml-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9a93a3; margin-right: 2px; }
.ml-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.ml-item i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ml-item i.empty { background: #fff !important; box-shadow: inset 0 0 0 1.5px #9a93a3; }
.ml-bolt { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #ffd54f; box-shadow: 0 0 0 1.5px #d39b00; font-size: 10px; }

/* ---- the color legend down the left side of the map */
.map-stage { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.map-stage > .mapbox { flex: 1 1 auto; min-width: 0; }
.map-stage > .map-legend { flex: none; width: 190px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin: 0; padding: 12px; position: sticky; top: 70px; }
.map-stage > .map-legend .ml-item { white-space: normal; line-height: 1.25; }
.map-stage > .map-legend .ml-item i { flex: none; }
.map-stage > .map-legend[hidden] { display: none; }
@media (max-width: 1100px) {
  .map-stage { flex-direction: column; }
  .map-stage > .map-legend { position: static; width: auto; flex-direction: row; flex-wrap: wrap; }
}

/* ---- printing maps: only the maps, one room per page, landscape */
#mapPrint { display: none; }
@media print {
  @page { size: landscape; margin: 10mm; }
  @page maplist { size: portrait; margin: 10mm; }
  body.printing-maps > *:not(#mapPrint) { display: none !important; }
  body.printing-maps { background: #fff !important; }
  body.printing-maps #mapPrint { display: block; }
  .print-page { page-break-after: always; break-after: page; display: flex; flex-direction: column; gap: 8px; height: 185mm; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid #3b0f4f; padding-bottom: 4px; }
  .print-page h1 { margin: 0; font-size: 20pt; font-weight: 800; color: #1f1a24; }
  .print-page header span { font-size: 9pt; color: #6b6274; }
  .print-legend { display: grid !important; gap: 0; border: 1px solid #d9d3e0; border-radius: 6px; overflow: hidden; font-size: 8pt; }
  .print-legend[hidden] { display: none !important; }
  .pl-key { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 4px 7px; border-left: 1px solid #e6e1eb; line-height: 1.15; color: #1f1a24; font-weight: 700; }
  .pl-key:first-child { border-left: 0; }
  .pl-key i { flex: none; width: 13px; height: 13px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
  .pl-key span { flex: 1; min-width: 0; }
  .pl-key b { flex: none; min-width: 18px; padding: 1px 5px; border: 1px solid #cfc7d6; border-radius: 9px; color: #3b0f4f; font-size: 7.5pt; text-align: center; }
  /* the heading: the logo, then "KC STEM Fest · Gym Floor Plan"; no fill */
  .print-page header.print-head { justify-content: flex-start; align-items: center; gap: 5mm; background: none; }
  .ph-logo { display: inline-flex; align-items: center; gap: 2mm; flex: none; padding-right: 5mm; border-right: 1px solid #cfc7d6; }
  .ph-logo img { height: 11mm; width: auto; }
  .ph-words { display: flex; flex-direction: column; line-height: 1; }
  .ph-words b { font-size: 11pt; font-weight: 800; letter-spacing: .06em; color: #1f1a24; }
  .ph-words span { font-size: 11pt; font-weight: 800; letter-spacing: .06em; color: #3b0f4f; }
  .print-head h1 { font-size: 18pt !important; }
  .print-svg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
  .print-svg svg { width: 100%; height: 100%; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

@media print {
  /* the back of a room's sheet: upright, every division on one page; --row and --fs are set to fit */
  .print-list { page: maplist; height: auto; min-height: 0; gap: 3mm; }
  .pl-cols { display: grid; gap: 6mm; align-items: start; }
  .pl-cols.n2 { grid-template-columns: 1fr 1fr; }
  .pl-col { min-width: 0; }
  .pl-div { margin-bottom: calc(var(--row) * .8); }
  .pl-div h2 { display: flex; align-items: center; gap: 5px; margin: 0; height: var(--row); font-size: calc(var(--fs) + 1.5pt); font-weight: 800; color: #1f1a24; }
  .pl-div h2 i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
  .pl-div h2 small { margin-left: auto; font-size: var(--fs); color: #6b6274; font-weight: 700; }
  .pl-div table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs); }
  .pl-div col.c-t { width: 11mm; }
  .pl-div col.c-p { width: 55%; }
  .pl-div th, .pl-div td { height: var(--row); padding: 0 1.2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
  .pl-div th { text-align: left; font-size: calc(var(--fs) - 1pt); text-transform: uppercase; letter-spacing: .04em; color: #6b6274; border-bottom: 1px solid #bbb; }
  .pl-div td { border-bottom: 1px solid #e8e4ec; }
  .pl-div td.pt { font-weight: 800; }
}
.map-stage > .map-legend { margin-top: 14px; }
/* ---- judge map: the judge's own projects stand out; scored ones get a clear green check */
.scored-dot { fill: #16a34a; stroke: #fff; stroke-width: 2.5; }
.tick { stroke: #fff; stroke-width: 3; }
.judge-mine rect { stroke: #1f1a24 !important; stroke-width: 2.5 !important; }
.judge-mine text { font-weight: 800 !important; }

/* ---- scoring sheet: a level's points on one row */
.criterion .pts { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px !important; }
.criterion .pt { height: 44px; font-size: 17px; border-radius: 9px; }
@media (max-width: 700px) { .criterion .pt { height: 46px !important; font-size: 16px !important; } }

/* ---- scoring sheet: the 4-minute stopwatch, top right */
.sheet-timer { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #f1edf5;
  border: 1.5px solid #ddd5e6; color: #3a3342; font-variant-numeric: tabular-nums; transition: background .3s, color .3s, border-color .3s; }
.sheet-timer svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sheet-timer b { font-size: 17px; font-weight: 800; min-width: 3.2ch; }
.sheet-timer small { font-size: 12px; font-weight: 700; color: #857c8f; }
.sheet-timer.warn { background: #fff3d6; border-color: #f0b429; color: #8a5a00; }
.sheet-timer.over { background: #d92d20; border-color: #b42318; color: #fff; animation: timerPulse 1.2s ease-in-out infinite; }
.sheet-timer.over small { color: #fff; }
@keyframes timerPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .5); } 50% { box-shadow: 0 0 0 6px rgba(217, 45, 32, 0); } }
@media (prefers-reduced-motion: reduce) { .sheet-timer.over { animation: none; } }
.sheet-head > .d-flex { width: 100%; }

/* judge map: other divisions' tables are dim and not clickable-looking */
.judge-other { cursor: default !important; }
.judge-other rect { stroke: #ddd8e4 !important; }
.judge-other rect { stroke: #cfc8d8 !important; } .judge-other text { font-weight: 600 !important; }

/* scoring sheet: an unfinished sheet brought back */
.draft-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: #eaf4ff; border: 1px solid #bcd8f5; color: #1d4f86; font-size: 14px; }
.draft-note .btn-link { margin-left: auto; padding: 0; font-weight: 700; }
/* "Progress saved" beside the total on the scoring sheet */
.sheet-saved { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #e6f5eb; color: #1f7a3e; font-size: 12.5px; font-weight: 700; }
.sheet-saved i { font-style: normal; font-weight: 900; }
.sheet-saved.bad { background: #fde8e7; color: #b42318; }
.sheet-saved[hidden] { display: none; }

/* judge sign-in: divisions set by the organizers are locked unless the master PIN is used */
#catPick.cat-locked .catpick { cursor: default; opacity: .95; }
#catPick.cat-locked input:not(:checked) + .chip { opacity: .35; }
.cat-lock-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 13px; color: #5b5266; }
.cat-lock-note .btn-link { padding: 0; font-weight: 700; font-size: 13px; }

/* ---- dashboard announcement: countdown to the event and to judging */
.live-badge[hidden] { display: none !important; }
.live-stat .cd-label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffc533; }
.live-stat .cd { display: flex; gap: 6px; }
.live-stat .cd > span { flex: 1; min-width: 46px; padding: 6px 4px 5px; border-radius: 10px; text-align: center; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.live-stat .cd b { display: block; font-size: 24px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.live-stat .cd small { display: block; margin: 2px 0 0; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.live-note[data-phase="before"] .live-stat, .live-note[data-phase="open"] .live-stat, .live-note[data-phase="beforeJudging"] .live-stat { min-width: 240px; }

/* ---- settings: the event day schedule */
.sched-set { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #e3dde9; border-radius: 12px; background: #faf8fc; }
.sched-set legend { float: none; width: auto; margin: 0; padding: 0 6px; font-size: 14px; font-weight: 800; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; }
.sched-grid .field { margin: 0; }

/* ---- map editor: the numbering path */
.num-menu { width: 300px; padding: 10px 6px; }
.num-menu .dropdown-item { white-space: normal; border-radius: 6px; font-size: 14px; }
.num-menu .dropdown-item:disabled { opacity: .45; }
.num-menu .num-auto { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.num-menu .num-auto input { margin-top: 3px; }
.num-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px; padding: 10px 14px; border-radius: 12px;
  background: #fdeaf4; border: 1px solid #f3b6d4; color: #6b0f3f; font-size: 14px; }
.num-bar[hidden] { display: none; }
.num-bar-btns { margin-left: auto; display: flex; gap: 6px; }
.num-path { pointer-events: none; }
.num-path polyline { fill: none; stroke: #e0007a; stroke-width: 5; stroke-dasharray: 14 10; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.num-path .np-start { fill: #e0007a; stroke: #fff; stroke-width: 3; }
.num-path .np-arrow { fill: #e0007a; opacity: .85; }
.num-path .np-pt { fill: #fff; stroke: #e0007a; stroke-width: 3; }
.num-path.drawing polyline { opacity: 1; }
svg.path-mode { cursor: crosshair !important; }
svg.path-mode .mi { cursor: crosshair !important; }

@media print {
  /* printed maps: a plain white sheet (no page tint), and a small legend that only takes the room it needs */
  html, body, body.printing-maps, #mapPrint, .print-page { background: #fff !important; background-image: none !important; }
  body.printing-maps::before, body.printing-maps::after { display: none !important; }
  .print-legend { display: flex !important; flex-wrap: wrap; gap: 3px 5px; border: 0 !important; border-radius: 0; overflow: visible; font-size: 7pt; grid-template-columns: none !important; }
  .pl-key { flex: none; gap: 4px; padding: 2px 7px 2px 4px; border: 1px solid #ddd6e4 !important; border-radius: 999px; font-weight: 700; line-height: 1.1; }
  .pl-key i { width: 9px; height: 9px; border-radius: 2px; }
  .pl-key span { flex: none; }
  .pl-key b { min-width: 0; padding: 0 0 0 3px; border: 0; border-left: 1px solid #ddd6e4; border-radius: 0; font-size: 6.5pt; color: #6b6274; }
}

/* ---- Schedule: the event day agenda */
.sched-page { max-width: 980px; }
.sched-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 6px 0 16px; }
.sched-top h1 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.01em; color: #1f1a24; }
.sched-top > div:first-child { flex: 1; min-width: 0; }
.sched-actions { display: flex; gap: 8px; }
.sched-now { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sn-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #3b0f4f, #5b2178); box-shadow: 0 6px 18px rgba(59, 15, 79, .18); }
.sn-card.sn-next { background: #fff; color: #1f1a24; border: 1.5px solid #e3dde9; box-shadow: none; }
.sn-card small { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #ffc533; }
.sn-card.sn-next small { color: #b45309; }
.sn-card b { font-size: 19px; font-weight: 800; line-height: 1.2; }
.sn-card span { font-size: 14px; opacity: .85; }
.sched-day h2 { margin: 18px 0 8px; font-size: 16px; font-weight: 800; color: #3b0f4f; }
.sched-line { list-style: none; margin: 0; padding: 0; position: relative; }
.si { display: grid; grid-template-columns: 96px 22px minmax(0, 1fr); align-items: start; position: relative; }
.si::before { content: ""; position: absolute; left: 106px; top: 0; bottom: 0; width: 2px; background: #e3dde9; }
.si:first-child::before { top: 18px; }
.si:last-child::before { bottom: calc(100% - 18px); }
.si-time { padding: 12px 10px 12px 0; text-align: right; line-height: 1.15; }
.si-time b { display: block; font-size: 15px; font-weight: 800; color: #1f1a24; font-variant-numeric: tabular-nums; }
.si-time small { font-size: 12px; color: #857c8f; }
.si-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin: 15px 0 0 3px; border-radius: 50%; background: #fff; border: 3px solid #b9aec6; }
.si-body { margin: 6px 0; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid #ebe6f0; }
.si-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.si-head > b { font-size: 16px; font-weight: 800; color: #1f1a24; margin-right: 2px; }
.si-tag { padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.si-tag.now { background: #16a34a; color: #fff; }
.si-tag.next { background: #fff3d6; color: #8a5a00; border: 1px solid #f0b429; }
.si-tag.aud { background: #f1edf5; color: #5b2178; }
.si-tag.auto { background: #eaf4ff; color: #1d4f86; }
.si-loc { margin-top: 2px; font-size: 13.5px; font-weight: 700; color: #5b2178; }
.si-loc::before { content: "\1F4CD"; margin-right: 4px; font-size: 12px; }
.si-note { margin: 4px 0 0; font-size: 14px; color: #5b5266; }
.si-past .si-body { opacity: .55; }
.si-past .si-time b { color: #857c8f; }
.si-now .si-dot { background: #16a34a; border-color: #bbf7d0; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.si-now .si-body { border-color: #86efac; box-shadow: 0 4px 14px rgba(22, 163, 74, .12); }
.si-next .si-dot { border-color: #f0b429; }
.si-auto .si-body { background: #fbfaff; border-style: dashed; }
.sched-empty { padding: 32px 20px; text-align: center; border: 1.5px dashed #d9d1e3; border-radius: 16px; color: #5b5266; background: #fff; }
.sched-editor { gap: 12px; }
.se-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; justify-content: space-between; }
.se-day { display: flex; flex-direction: column; gap: 2px; min-width: 170px; }
.se-rows { display: flex; flex-direction: column; gap: 8px; }
.se-row { display: grid; grid-template-columns: 112px 112px minmax(140px, 2fr) minmax(100px, 1fr) 112px minmax(120px, 2fr) 30px; gap: 6px; align-items: end; padding: 8px; border: 1px solid #ebe6f0; border-radius: 10px; background: #fcfbfd; }
.se-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; }
.se-f small, .se-day small { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #857c8f; }
.se-del { height: 31px; border: 0; border-radius: 8px; background: transparent; color: #b42318; font-size: 20px; line-height: 1; }
.se-del:hover { background: #fde8e7; }
.se-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .se-row { grid-template-columns: 1fr 1fr 30px; }
  .se-row .se-title, .se-row .se-loc, .se-row .se-aud, .se-row .se-note { grid-column: 1 / 3; }
  .se-row .se-del { grid-column: 3; grid-row: 1; }
}
@media (max-width: 560px) {
  .si { grid-template-columns: 70px 20px minmax(0, 1fr); }
  .si::before { left: 79px; }
  .si-time b { font-size: 13.5px; }
}
@media print {
  body:has(.sched-page) .app-bar, .sched-actions, #schedNow { display: none !important; }
  body:has(.sched-page) { background: #fff !important; }
  .si-body { break-inside: avoid; opacity: 1 !important; }
}

/* ---- phones and small iPads: the menu gets its own full-width row under the logo, and scrolls sideways if it must */
@media (max-width: 860px) {
  .app-bar { flex-wrap: wrap; row-gap: 4px; }
  .app-bar > .nav { order: 10; flex: 1 1 100%; width: 100%; margin: 0 !important; grid-auto-columns: minmax(max-content, 1fr) !important;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .app-bar > .nav::-webkit-scrollbar { display: none; }
  .app-bar > .nav .nav-link { min-height: 40px; padding: 0 12px !important; font-size: 14.5px !important; white-space: nowrap; }
}
@media (max-width: 600px) {
  /* one tidy first row: logo, event name, Sign out; the menu row under it says which page this is */
  .app-bar > .who, .app-bar .navbar-brand + .who { display: none !important; }
  .app-bar .fs-words { display: none; }
  .app-bar .navbar-brand { flex: 1 1 auto; min-width: 0; font-size: 17px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-bar #logout { margin-left: auto; padding: 4px 10px; font-size: 13px; min-height: 34px; }
  .app-bar .fs-plate { width: 36px; height: 36px; }
}

/* ---- Projects page on a phone */
@media (max-width: 600px) {
  .rg-badge { height: auto !important; min-height: 36px; padding: 6px 12px !important; font-size: 13.5px !important; white-space: normal; line-height: 1.25; }
  .rg-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .rg-tab { justify-content: center; gap: 6px; padding: 0 6px; font-size: 14px; white-space: nowrap; }
  .rg-tab em { padding: 1px 6px; font-size: 11.5px; }
  .rg-tiles, .rg-tiles.view-shirts { grid-auto-columns: 152px !important; }
  .rg-tile .t-name { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 6px; white-space: normal; -webkit-line-clamp: unset; min-height: 0; }
  .rg-tile .t-name .t-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
}

/* ---- the map pages on iPads and phones: the map uses the full width, the tools wrap instead of running off the screen */
@media (max-width: 1100px) {
  .map-stage { align-items: stretch; }
  .map-stage > .mapbox { width: 100%; }
}
@media (max-width: 600px) {
  .map-tools { flex-wrap: wrap; row-gap: 6px; }
  .map-tools .mt-btn > span { display: none; }   /* icons only; each has a title */
  .loc-tab { height: 36px; padding: 0 10px; font-size: 13.5px; max-width: 60vw; }
  .loc-tool { height: 32px; font-size: 12.5px; }
  .map-stage > .map-legend { gap: 4px 10px; padding: 8px 10px; font-size: 12.5px; }
}
/* the six division tiles: 3 + 3 on an iPad, 2 per row on a phone */
@media (min-width: 601px) and (max-width: 1024px) { .rg-tiles.dash-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rg-tiles.dash-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .rg-tiles { grid-auto-columns: minmax(132px, 1fr); }
  .rg-tile .t-name { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 6px; white-space: normal; -webkit-line-clamp: unset; min-height: 0; }
  .rg-tile .t-name .t-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
}
/* iPad landscape and small laptops: six menu tabs leave no room for the signed-in name, so only Sign out stays */
@media (max-width: 1200px) { .app-bar > .who:not(.me-auto) { display: none !important; } }
@media (min-width: 861px) and (max-width: 1200px) {
  .app-bar .fs-words { display: none; }
  .app-bar > .nav { grid-auto-columns: max-content !important; margin-left: auto !important; margin-right: 8px !important; }
  .app-bar > .nav .nav-link { padding: 0 13px !important; font-size: 15px !important; }
}

/* ---- the project form on a phone: name and T-shirt size side by side at full width; the instructor on its own row */
@media (max-width: 600px) {
  .pf-modal .pf-student { grid-template-columns: 26px minmax(0, 1fr) 92px !important; gap: 8px; }
  .pf-modal .pf-student select { grid-column: auto !important; }
  .pf-modal .pf-row-4, .pf-modal .pf-row-4:not(:has(> :nth-child(4))) { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important; }
  .pf-modal .pf-row-4 > :first-child { grid-column: 1 / -1; }
}
/* the judge list on a phone: the table scrolls sideways inside its card instead of widening the page */
@media (max-width: 600px) { .judge-card { overflow-x: auto; } .judge-card #judgeTable { min-width: 460px; } }

/* ---- map hover card: a light card with a band in the project's division color */
.maptip { min-width: 230px; max-width: 300px; padding: 0 !important; overflow: hidden; background: #fff !important; color: #1f1a24 !important;
  border-radius: 12px !important; border: 1px solid rgba(31, 26, 36, .1); box-shadow: 0 12px 32px rgba(31, 26, 36, .22), 0 2px 6px rgba(31, 26, 36, .08) !important; font-size: 13.5px; }
.maptip .tip-band { padding: 9px 13px 8px; background: var(--tc); color: var(--tc-ink); }
.maptip .tip-band-top { display: flex; align-items: baseline; gap: 10px; }
.maptip .tip-where { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.maptip .tip-size { margin: 0 0 0 auto !important; font-size: 11.5px !important; font-weight: 700 !important; color: inherit !important; opacity: .8; white-space: nowrap; }
.maptip .tip-divname { margin-top: 1px; font-size: 14px; font-weight: 800; line-height: 1.25; }
.maptip .tip-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 13px 12px; }
.maptip .tip-title { font-size: 16px; font-weight: 800; line-height: 1.25; color: #1f1a24; }
.maptip .tip-row { display: flex; align-items: flex-start; gap: 7px; line-height: 1.35; color: #3f3848; }
.maptip .tip-row svg { flex: none; margin-top: 2px; fill: none; stroke: #8a8194; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.maptip .tip-teacher { font-weight: 600; }
.maptip .tip-power { align-self: flex-start; margin: 2px 0 0; padding: 2px 9px; border-radius: 999px; background: #fff3d6; color: #8a5a00 !important; font-size: 12.5px; font-weight: 800; }
.maptip .tip-power.bad { background: #fde8e7; color: #b42318 !important; }
.maptip .tip-line { font-size: 13px; opacity: 1; color: #3f3848; padding-left: 10px; position: relative; }
.maptip .tip-line::before { content: ''; position: absolute; left: 0; top: .55em; width: 4px; height: 4px; border-radius: 50%; background: #8a8194; }
@media (min-width: 861px) and (max-width: 1000px) {
  .app-bar > .nav .nav-link { padding: 0 9px !important; font-size: 14px !important; }
  .app-bar .navbar-brand { font-size: 16px !important; }
  .app-bar { gap: 8px; }
}
/* the area / booth card: one small block per project */
.maptip { max-width: 320px; }
.maptip .tip-count { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a8194; }
.maptip .tip-proj { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 0; border-top: 1px solid #eee9f2; }
.maptip .tip-count + .tip-proj { border-top: 0; padding-top: 2px; }
.maptip .tip-proj-title { display: flex; align-items: baseline; gap: 6px; font-size: 14.5px; font-weight: 800; line-height: 1.25; color: #1f1a24; }
.maptip .tip-proj-title i { flex: none; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-1px); }
.maptip .tip-bolt { margin-left: auto; padding: 0 6px; border-radius: 999px; background: #fff3d6; font-size: 11px; }
.maptip .tip-body > .tip-proj:first-child { border-top: 0; padding-top: 0; }

@media print {
  /* No page margin at all: some browsers fill the margin with the page's own tint, which printed as a grey frame.
     The white space round the edge is inside our own white pages instead. */
  @page { size: landscape; margin: 0; background: #fff; }
  @page maplist { size: portrait; margin: 0; background: #fff; }
  :root { --bs-body-bg: #fff; --soft: #fff; }
  .print-page { box-sizing: border-box; padding: 10mm; }
  .print-map-page { height: 100vh; max-height: 100vh; overflow: hidden; }
  .print-list { min-height: 100vh; }

  /* the back page: every name in full; a long one wraps onto a second line (the size is chosen so it all fits) */
  .pl-div { margin-bottom: 2.4mm; }
  .pl-div h2 { height: auto; padding: .4mm 0 .6mm; line-height: 1.15; }
  .pl-div th, .pl-div td { height: auto; padding: .45mm 1.2mm; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.18; vertical-align: top; }
  .pl-div col.c-p { width: 56%; }
}

/* ---- the back page of a printed room: the same rules on screen (while it is measured) and on paper */
#mapPrint.pl-measure { display: block !important; position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
#mapPrint.pl-measure .print-list { width: 215.9mm; min-height: 0 !important; height: auto !important; }
#mapPrint .print-list { box-sizing: border-box; padding: 10mm; display: flex; flex-direction: column; gap: 3mm; font-family: var(--font-sans); color: #1f1a24; background: #fff; }
#mapPrint .print-list .print-head { display: flex; align-items: center; gap: 5mm; padding-bottom: 4px; border-bottom: 2px solid #3b0f4f; }
#mapPrint .print-list .print-head h1 { margin: 0; font-size: 18pt; font-weight: 800; }
#mapPrint .print-list .ph-logo { display: inline-flex; align-items: center; gap: 2mm; padding-right: 5mm; border-right: 1px solid #cfc7d6; }
#mapPrint .print-list .ph-logo img { height: 11mm; width: auto; }
#mapPrint .print-list .ph-words { display: flex; flex-direction: column; line-height: 1; }
#mapPrint .print-list .ph-words b { font-size: 11pt; font-weight: 800; letter-spacing: .06em; }
#mapPrint .print-list .ph-words span { font-size: 11pt; font-weight: 800; letter-spacing: .06em; color: #3b0f4f; }
#mapPrint .pl-flow.n2 { column-count: 2; column-gap: 6mm; column-fill: balance; }
#mapPrint .pl-flow .pl-div { margin: 0 0 2.4mm; break-inside: auto; }
#mapPrint .pl-flow .pl-div h2 { display: flex; align-items: center; gap: 5px; height: auto; margin: 0; padding: .4mm 0 .6mm; font-size: calc(var(--fs) + 1.5pt); font-weight: 800; line-height: 1.15; break-after: avoid; }
#mapPrint .pl-flow .pl-div h2 i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
#mapPrint .pl-flow .pl-div h2 small { margin-left: auto; font-size: var(--fs); color: #6b6274; font-weight: 700; }
#mapPrint .pl-flow table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs); }
#mapPrint .pl-flow col.c-t { width: 11mm; }
#mapPrint .pl-flow col.c-p { width: 56%; }
#mapPrint .pl-flow th, #mapPrint .pl-flow td { height: auto; padding: .45mm 1.2mm; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.18; vertical-align: top; text-align: left; }
#mapPrint .pl-flow th { font-size: calc(var(--fs) - 1pt); text-transform: uppercase; letter-spacing: .04em; color: #6b6274; border-bottom: 1px solid #bbb; }
#mapPrint .pl-flow td { border-bottom: 1px solid #e8e4ec; }
#mapPrint .pl-flow td.pt { font-weight: 800; }
#mapPrint .pl-flow tr { break-inside: avoid; }
#mapPrint .pl-flow thead { display: table-header-group; }
@media print { #mapPrint .print-list { min-height: 100vh; } }
/* the back page, tighter so the text can stay bigger */
#mapPrint .print-list { padding: 8mm 9mm; gap: 2.5mm; }
#mapPrint .print-list .ph-logo img { height: 9mm; }
#mapPrint .print-list .print-head h1 { font-size: 16pt; }
#mapPrint .pl-flow.n2 { column-gap: 5mm; }
#mapPrint .pl-flow .pl-div { margin-bottom: 1.8mm; }
#mapPrint .pl-flow th, #mapPrint .pl-flow td { padding: .25mm .9mm; line-height: 1.12; }
#mapPrint .pl-flow col.c-t { width: 9mm; }
#mapPrint .pl-flow col.c-p { width: 54%; }
/* the back page on paper: crisp hairlines between rows, and solid black text a weight up so small print does not look faded */
#mapPrint .pl-flow td { border-bottom: .5pt solid #8f879a !important; color: #000; font-weight: 500; -webkit-font-smoothing: auto; }
#mapPrint .pl-flow td.pt { font-weight: 800; }
#mapPrint .pl-flow th { border-bottom: .9pt solid #3f3848 !important; color: #3f3848; font-weight: 700; }
#mapPrint .pl-flow .pl-div h2 { color: #000; }
#mapPrint .pl-flow table { border-collapse: collapse; }
@media print { #mapPrint .pl-flow td, #mapPrint .pl-flow th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.se-row { grid-template-columns: 140px 112px 112px minmax(140px, 2fr) minmax(100px, 1fr) 112px minmax(120px, 2fr) 30px; }
@media (max-width: 900px) { .se-row { grid-template-columns: 1fr 1fr 30px; } .se-row .se-date { grid-column: 1 / 3; } }

/* ---- Schedule, redesigned: a header card, a key for who each item is for, and each day as a timeline */
.sched-page { max-width: 1040px; }
.sched-page:has(.sh-hero) .sched-top > div:first-child { display: none; }
.sched-page:has(.sh-hero) .sched-top { justify-content: flex-end; margin-bottom: 10px; }
.sh-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 26px 28px; border-radius: 20px; color: #fff;
  background: radial-gradient(120% 160% at 0% 0%, #8a3fb3 0%, #5b2178 42%, #2d0c42 100%); box-shadow: 0 14px 34px rgba(45, 12, 66, .28); }
.sh-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%); mask-image: linear-gradient(90deg, transparent 35%, #000 100%); }
.sh-hero-text { position: relative; z-index: 1; flex: 1 1 260px; min-width: 0; }
.sh-hero-text small { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #ffc533; }
.sh-hero-text h1 { margin: 4px 0 6px; font-size: 34px; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.sh-when { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); font-size: 14.5px; font-weight: 700; }
.sh-keys { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; flex: 2 1 420px; }
.sh-key { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.sh-key small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.sh-key b { display: block; margin: 3px 0 1px; font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sh-key span { font-size: 12.5px; color: rgba(255,255,255,.75); }
.sh-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 2px 4px; font-size: 13.5px; font-weight: 700; color: #4a4655; }
.sh-legend-title { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8a8194; }
.sh-aud { display: inline-flex; align-items: center; gap: 6px; }
.sh-aud i { width: 11px; height: 11px; border-radius: 3px; background: var(--ac); }
.sh-day { margin-top: 18px; }
.sh-day-head { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.sh-date { display: grid; place-items: center; width: 56px; height: 60px; border-radius: 14px; background: #fff; border: 1.5px solid #e3dde9; box-shadow: 0 2px 6px rgba(45, 12, 66, .06); line-height: 1; }
.sh-date b { font-size: 24px; font-weight: 900; color: #3b0f4f; }
.sh-date small { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #b45309; }
.sh-day-head h2 { margin: 0; font-size: 21px; font-weight: 900; color: #1f1a24; }
.sh-day-head span { font-size: 13.5px; font-weight: 600; color: #857c8f; }
.sh-line { list-style: none; margin: 0; padding: 0; }
.sh-slot { display: grid; grid-template-columns: 78px 22px minmax(0, 1fr); align-items: start; position: relative; }
.sh-slot::before { content: ""; position: absolute; left: 88px; top: 0; bottom: 0; width: 2px; background: #e3dde9; }
.sh-slot:first-child::before { top: 20px; }
.sh-slot:last-child::before { bottom: calc(100% - 20px); }
.sh-slot-time { padding: 13px 10px 0 0; text-align: right; }
.sh-slot-time b { font-size: 15px; font-weight: 900; color: #1f1a24; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin: 16px 0 0 4px; border-radius: 50%; background: #fff; border: 3px solid #b9aec6; }
.sh-slot.sh-now .sh-dot { background: #16a34a; border-color: #bbf7d0; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.sh-slot.sh-next .sh-dot { border-color: #f0b429; }
.sh-cards { display: grid; gap: 10px; margin: 6px 0 8px; }
.sh-cards.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sh-cards.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 11px 14px 12px 17px; border-radius: 14px; background: #fff; border: 1px solid #ebe6f0; box-shadow: 0 2px 8px rgba(45, 12, 66, .05); overflow: hidden; }
.sh-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--ac); }
.sh-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sh-time { font-size: 12.5px; font-weight: 800; color: var(--ac); font-variant-numeric: tabular-nums; }
.sh-for { margin-left: auto; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--ac); background: color-mix(in srgb, var(--ac) 12%, #fff); }
.sh-flag { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.sh-flag.now { background: #16a34a; color: #fff; }
.sh-flag.next { background: #fff3d6; color: #8a5a00; border: 1px solid #f0b429; }
.sh-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.25; color: #1f1a24; }
.sh-loc { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #5b5266; }
.sh-loc svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sh-note { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: #5b5266; }
.sh-auto-note { font-size: 11.5px; font-weight: 700; color: #1d4f86; }
.sh-card.sh-past { opacity: .55; }
.sh-card.sh-now { border-color: #86efac; box-shadow: 0 6px 18px rgba(22, 163, 74, .14); }
.sh-card.sh-auto { border-style: dashed; }
@media (max-width: 760px) {
  .sh-hero { padding: 20px; } .sh-hero-text h1 { font-size: 26px; }
  .sh-cards.n2, .sh-cards.n3 { grid-template-columns: minmax(0, 1fr); }
  .sh-slot { grid-template-columns: 62px 20px minmax(0, 1fr); } .sh-slot::before { left: 71px; }
  .sh-slot-time b { font-size: 13.5px; }
}
@media print {
  .sh-hero { box-shadow: none; } .sh-card { break-inside: avoid; box-shadow: none; opacity: 1 !important; }
  .sh-slot { break-inside: avoid; }
}
.sh-hero + .sched-now { margin: 14px 0 0; } .sh-key b { white-space: nowrap; }

/* ---- Settings home: sections of rows, each with a live status, and a search box */
.set-home { max-width: 1180px; }
.set-home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 6px 0 20px !important; }
.set-home-head h2 { margin: 0; font-size: 28px !important; font-weight: 900 !important; letter-spacing: -.02em; color: #1f1a24; }
.set-home-head p { margin: 4px 0 0 !important; font-size: 15px; color: #6b6274; }
.set-search-box { position: relative; display: flex; align-items: center; width: min(340px, 100%); margin: 0; }
.set-search-box > span { position: absolute; left: 12px; font-size: 17px; color: #8a8194; pointer-events: none; }
.set-search { width: 100%; height: 42px; padding: 0 14px 0 36px; border: 1px solid #d6cce2; border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: #1f1a24; }
.set-search:focus { outline: none; border-color: #5b2178; box-shadow: 0 0 0 3px rgba(91, 33, 120, .15); }
.set-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.set-group { background: #fff; border: 1px solid #e4ddee; border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 26, 36, .04); overflow: hidden; }
.set-group > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 14px 18px 10px; border-bottom: 1px solid #efeaf4; background: #fbfafd; }
.set-group > header h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #3b0f4f; }
.set-group > header span { font-size: 13px; color: #8a8194; }
.set-group.danger { border-color: #f3c5c1; }
.set-group.danger > header { background: #fff6f5; border-bottom-color: #f8dcd9; }
.set-group.danger > header h3 { color: #b42318; }
.set-rows { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px 13px 18px; border: 0; border-top: 1px solid #f1edf5; background: #fff; text-align: left; font: inherit; color: #1f1a24; cursor: pointer; transition: background .12s; }
.set-row:first-child { border-top: 0; }
.set-row:hover { background: #faf7fc; }
.set-row:focus-visible { outline: 3px solid rgba(91, 33, 120, .3); outline-offset: -3px; }
.set-row .set-ico { flex: none; display: grid; place-items: center; width: 40px !important; height: 40px !important; border-radius: 11px !important; }
.set-row.tone-purple .set-ico { background: #f1ebf6; color: #5b2178; }
.set-row.tone-blue .set-ico { background: #e8f0fd; color: #2456a6; }
.set-row.tone-green .set-ico { background: #e6f5eb; color: #1f7a3e; }
.set-row.tone-amber .set-ico { background: #fff3d9; color: #9a6400; }
.set-row.tone-red .set-ico { background: #fde8e7; color: #b42318; }
.set-row .set-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.set-row .set-text b { font-size: 15.5px; font-weight: 800; line-height: 1.25; }
.set-row .set-text small { margin-top: 1px; font-size: 13px; color: #6b6274; line-height: 1.3; }
.set-status { flex: none; max-width: 46%; padding: 3px 10px; border-radius: 999px; background: #f3f0f7; color: #4a4655; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-status.ok { background: #e6f5eb; color: #1f7a3e; }
.set-status.warn { background: #fff3d6; color: #8a5a00; }
.set-chev { flex: none; font-size: 22px; line-height: 1; color: #b9aec6; transition: transform .12s, color .12s; }
.set-row:hover .set-chev { color: #5b2178; transform: translateX(2px); }
.set-group.danger .set-row:hover { background: #fff8f7; }
.set-none { grid-column: 1 / -1; padding: 24px; text-align: center; color: #6b6274; background: #fff; border: 1px dashed #d6cce2; border-radius: 14px; }
@media (max-width: 900px) { .set-groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .set-status { display: none; } .set-row { padding: 12px 12px 12px 14px; gap: 12px; } }
/* the sections stack in two independent columns (no gap under a short one) */
.set-groups { display: block !important; column-count: 2; column-gap: 18px; }
.set-group { break-inside: avoid; margin: 0 0 18px; display: inline-block; width: 100%; }
@media (max-width: 900px) { .set-groups { column-count: 1; } }
/* the signed-in name needs room: shown only on wide screens */
@media (max-width: 1365px) { .app-bar > .who:not(.me-auto) { display: none !important; } }

/* ---- Schedule as a run of show: plain heading, one status line, and a table per day */
.sched-page { max-width: 1000px; }
.sched-top { align-items: flex-end; margin: 8px 0 18px !important; padding-bottom: 14px; border-bottom: 2px solid #1f1a24; }
.sched-top h1 { font-size: 28px !important; font-weight: 800 !important; letter-spacing: -.01em; color: #1f1a24; }
#schedSub { margin-top: 2px; font-size: 15px; color: #4a4655 !important; }
.sched-actions .btn { min-width: 72px; }
.rs-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 22px; padding: 10px 14px; border: 1px solid #ddd6e4; border-left: 3px solid #5b2178; background: #fff; font-size: 14.5px; color: #1f1a24; }
.rs-status b { font-weight: 700; }
.rs-muted { color: #6b6274; }
.rs-sep { color: #c9c1d3; }
.rs-day { margin: 0 0 28px; }
.rs-day h2 { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #1f1a24; }
.rs-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; border-top: 1px solid #1f1a24; font-size: 15px; }
.rs-table col.c-time { width: 170px; }
.rs-table col.c-where { width: 170px; }
.rs-table col.c-for { width: 110px; }
.rs-table th { padding: 8px 12px; border-bottom: 1px solid #cfc7d6; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; background: #faf9fb; }
.rs-table td { padding: 11px 12px; border-bottom: 1px solid #e6e1eb; vertical-align: top; color: #1f1a24; }
.rs-time { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-title { font-weight: 600; }
.rs-note { margin-top: 3px; font-size: 14px; line-height: 1.4; color: #5b5266; }
.rs-meta { display: none; }
.rs-where, .rs-for { color: #3f3848; }
.rs-live { margin-left: 8px; font-size: 12px; font-weight: 700; color: #1f7a3e; }
.rs-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #16a34a; vertical-align: 1px; }
.rs-table tr.rs-now td { background: #f6fbf7; }
.rs-table tr.rs-now td:first-child { box-shadow: inset 3px 0 0 #16a34a; }
.rs-table tr.rs-past td { color: #9a93a3; }
.rs-table tr.rs-past .rs-note { color: #b0a9b8; }
@media (max-width: 700px) {
  .rs-table thead, .rs-table col, .rs-where, .rs-for { display: none; }
  .rs-table, .rs-table tbody, .rs-table tr, .rs-table td { display: block; width: 100%; }
  .rs-table tr { padding: 10px 2px; border-bottom: 1px solid #e6e1eb; }
  .rs-table td { padding: 0; border: 0; }
  .rs-time { font-size: 13.5px; color: #5b2178; }
  .rs-title { margin-top: 2px; font-size: 16px; }
  .rs-meta { display: block; margin-top: 3px; font-size: 13.5px; color: #6b6274; }
  .rs-table tr.rs-now { box-shadow: inset 3px 0 0 #16a34a; padding-left: 10px; background: #f6fbf7; }
  .rs-table tr.rs-now td { background: none; box-shadow: none; }
}
@media print {
  .rs-status { display: none; }
  .sched-top { border-bottom-width: 1.5pt; }
  .rs-table { font-size: 10.5pt; }
  .rs-table tr { break-inside: avoid; }
  .rs-table tr.rs-past td, .rs-table tr.rs-past .rs-note { color: #1f1a24; }
  .rs-table tr.rs-now td { background: none; box-shadow: none; }
  .rs-live { display: none; }
}
.rs-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.rs-day-head h2 { margin: 0 !important; }
.rs-day-head span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5b2178; }
.rs-table tr.rs-same td { border-top: 0; }
.rs-table tr:has(+ tr.rs-same) td { border-bottom-color: #f3f0f6; }

/* ---- judge list: each judge's own PIN */
.judge-pin { white-space: nowrap; }
.judge-pin code { padding: 2px 8px; border-radius: 6px; background: #f3f0f7; color: #1f1a24; font-size: 14px; font-weight: 700; letter-spacing: .12em; font-family: ui-monospace, Consolas, monospace; }
.judge-newpin { margin-left: 6px; padding: 2px 8px; border: 1px solid #d6cce2; border-radius: 6px; background: #fff; font-size: 12px; font-weight: 700; color: #5b2178; cursor: pointer; }
.judge-newpin:hover { border-color: #5b2178; background: #f7f2fb; }
.judge-pin-wait { font-size: 12.5px; color: #8a8194; font-style: italic; }
.judge-pin-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 16px 10px; padding: 10px 14px; border: 1px solid #f0d58a; border-radius: 10px; background: #fff8e6; color: #6b4a00; font-size: 14px; }
.judge-pin-note[hidden] { display: none; }

/* ---- printed judge cards: eight to a Letter page, cut along the dashed lines */
#cardPrint { display: none; }
@media print {
  body.printing-cards > *:not(#cardPrint) { display: none !important; }
  body.printing-cards { background: #fff !important; }
  body.printing-cards #cardPrint { display: block; page: cards; background: #fff; }
  .jc-sheet { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 62mm; box-sizing: border-box; padding: 10mm; break-after: page; }
  .jc-sheet:last-child { break-after: auto; }
  @page cards { size: portrait; margin: 0; }
  .jc { box-sizing: border-box; display: flex; flex-direction: column; gap: 2.5mm; padding: 6mm 7mm; border: 1px dashed #9a92a4; break-inside: avoid; font-family: var(--font-sans); color: #1f1a24; }
  .jc-head { display: flex; align-items: center; gap: 2.5mm; font-size: 8.5pt; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3b0f4f; }
  .jc-head img { height: 6mm; }
  .jc-name { font-size: 17pt; font-weight: 800; line-height: 1.1; }
  .jc-divs { display: flex; flex-wrap: wrap; gap: 1.5mm 4mm; font-size: 9pt; font-weight: 600; }
  .jc-divs span { display: inline-flex; align-items: center; gap: 1.5mm; }
  .jc-divs i { width: 3mm; height: 3mm; border-radius: .7mm; }
  .jc-pin { display: flex; align-items: baseline; gap: 3mm; margin-top: auto; }
  .jc-pin small { font-size: 9pt; font-weight: 700; color: #6b6274; }
  .jc-pin b { font-size: 26pt; font-weight: 900; letter-spacing: .18em; font-family: ui-monospace, Consolas, monospace; }
  .jc-how { font-size: 8pt; line-height: 1.35; color: #4a4655; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ---- Judges screen, refined: a quiet header, a coverage strip, clean rows and a save bar */
.judge-card { max-width: 1100px !important; border: 1px solid #e4ddee; border-radius: 16px; box-shadow: 0 1px 2px rgba(31, 26, 36, .04); overflow: visible; }
.judge-head { align-items: center !important; padding: 18px 20px 14px !important; }
.judge-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px !important; font-size: 17px !important; font-weight: 800; color: #1f1a24; }
.judge-count { margin: 0 !important; padding: 2px 9px !important; font-size: 12px !important; vertical-align: 0 !important; }
.judge-head p { font-size: 13.5px !important; max-width: 520px; }
.judge-tools { flex-wrap: wrap; gap: 8px !important; }
.judge-tools input { width: 200px !important; height: 34px; border-radius: 9px; }
.judge-tools .btn { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; }
.judge-pin-note { margin: 0 20px 14px !important; }
.judge-coverline { gap: 6px 8px !important; padding: 10px 20px !important; background: #fbfafd !important; }
.judge-coverlabel { font-size: 11px !important; letter-spacing: .1em !important; margin-right: 6px !important; }
.judge-cover { gap: 6px; padding: 2px 4px 2px 9px !important; border-color: #e4ddee !important; font-size: 12.5px !important; }
.judge-cover b { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f1ebf6; text-align: center; font-size: 12px; }
.judge-cover.low { border-color: #f0d58a !important; background: #fffaeb !important; }
.judge-cover.low b { background: #fff0c2; color: #8a5a00; }
.judge-cover.none { border-color: #f3c5c1 !important; background: #fff6f5 !important; }
.judge-cover.none b { background: #fde2df; color: #b42318; }
.judge-table th { padding: 10px 10px !important; font-size: 11px !important; letter-spacing: .1em !important; background: #fff; }
.judge-table td { padding: 8px 10px !important; border-bottom-color: #f1edf5 !important; }
.judge-table th:first-child, .judge-table td:first-child { padding-left: 20px !important; width: 44px !important; }
.judge-table th:nth-child(2), .judge-table td:nth-child(2) { width: 28% !important; }
.judge-table th:nth-child(4), .judge-table td:nth-child(4) { width: 140px; }
.judge-table tbody tr:hover { background: #fbf9fd !important; }
.judge-name.form-control { font-size: 15px; font-weight: 700 !important; color: #1f1a24; padding: 6px 8px !important; }
.judge-cats { gap: 6px !important; }
.judge-tags { gap: 4px !important; }
.judge-tag { padding: 2px 2px 2px 8px !important; border-color: #e4ddee !important; font-size: 12.5px !important; font-weight: 600; background: #fff; }
.judge-tag i { width: 8px !important; height: 8px !important; }
.judge-tag button { font-size: 14px !important; padding: 0 5px !important; opacity: .55; }
.judge-tag:hover button { opacity: 1; }
.judge-assign { flex: none; border: 1px solid transparent !important; background: transparent !important; color: #5b2178 !important; font-size: 12.5px !important; font-weight: 700 !important; padding: 3px 8px !important; border-radius: 8px !important; opacity: .7; }
.judge-table tbody tr:hover .judge-assign, .judge-assign.show { opacity: 1; border-color: #e4ddee !important; background: #fff !important; }
.judge-none { font-size: 13px !important; color: #b45309 !important; font-style: normal !important; font-weight: 600; }
.judge-pin code { display: inline-block; min-width: 58px; padding: 3px 8px !important; border: 1px solid #e4ddee; border-radius: 7px !important; background: #fbfafd !important; text-align: center; font-size: 14px !important; }
.judge-newpin { opacity: .65; }
.judge-table tbody tr:hover .judge-newpin { opacity: 1; }
.judge-remove { width: 28px !important; height: 28px !important; font-size: 18px !important; opacity: .6; }
.judge-table tbody tr:hover .judge-remove { opacity: 1; }
.judge-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 20px !important; border-top: 1px solid #efeaf4; background: #fbfafd; border-radius: 0 0 16px 16px; }
.judge-foot #saveJudges { padding: 7px 18px; border-radius: 10px; font-weight: 700; }
.judge-card:has(#judgeDirty:not([hidden])) .judge-foot { background: #fff8e6; border-top-color: #f0d58a; }
.judge-dirty { font-size: 13.5px; font-weight: 700; color: #8a5a00 !important; }
@media (max-width: 760px) {
  .judge-tools input { width: 100% !important; flex: 1 1 100%; }
  .judge-table th:nth-child(2), .judge-table td:nth-child(2) { width: auto !important; }
}

/* ---- the KC STEM Fest logo */
.login-logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 4px auto 14px; }
.sched-top { gap: 12px 18px; }
.sched-logo { flex: none; height: 54px; width: auto; }
@media (max-width: 600px) { .sched-logo { height: 40px; } }
#mapPrint .ph-event, .print-head .ph-event { height: 11mm; width: auto; padding-right: 5mm; border-right: 1px solid #cfc7d6; }
#mapPrint .print-list .ph-event { height: 9mm; }
.jc-head img { height: 9mm !important; }
.jc-head span { margin-left: auto; padding: .6mm 2.5mm; border: 1px solid #3b0f4f; border-radius: 999px; font-size: 8pt; }

/* ---- the judge list, grouped by division */
.jg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 4px 20px 18px; }
.jg-card { display: flex; flex-direction: column; border: 1px solid #e4ddee; border-top: 3px solid var(--dc); border-radius: 12px; background: #fff; overflow: hidden; }
.jg-card > header { display: flex; align-items: center; gap: 8px; padding: 11px 12px 9px 14px; border-bottom: 1px solid #f1edf5; }
.jg-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--dc); }
.jg-card h4 { flex: 1; min-width: 0; margin: 0; font-size: 14.5px; font-weight: 800; color: #1f1a24; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jg-count { flex: none; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f3f0f7; color: #4a4655; }
.jg-count.low { background: #fff3d6; color: #8a5a00; }
.jg-count.bad { background: #fde8e7; color: #b42318; }
.jg-add { flex: none; padding: 2px 8px; border: 1px solid #e4ddee; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 700; color: #5b2178; cursor: pointer; }
.jg-add:hover { border-color: #5b2178; background: #f7f2fb; }
.jg-list { display: flex; flex-direction: column; padding: 4px 0; }
.jg-judge { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 14px; border: 0; background: none; text-align: left; font: inherit; color: #1f1a24; cursor: pointer; }
.jg-judge:hover { background: #faf7fc; }
.jg-judge:focus-visible { outline: 2px solid rgba(91, 33, 120, .35); outline-offset: -2px; }
.jg-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jg-judge.new .jg-name::after { content: "new"; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e8f0fd; color: #2456a6; font-size: 11px; font-weight: 700; }
.jg-also { display: inline-flex; gap: 3px; }
.jg-also i { width: 8px; height: 8px; border-radius: 50%; }
.jg-pin { flex: none; min-width: 52px; padding: 1px 6px; border: 1px solid #e4ddee; border-radius: 6px; background: #fbfafd; text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: #3f3848; }
.jg-pin.none { font-family: inherit; letter-spacing: 0; font-weight: 600; font-size: 11.5px; color: #8a8194; }
.jg-empty { margin: 0; padding: 12px 14px; font-size: 13px; color: #b42318; }
.jg-empty:empty { display: none; }
.je-modal .modal-body { display: flex; flex-direction: column; gap: 6px; }
.je-label { margin: 8px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
.je-label:first-child { margin-top: 0; }
.je-divs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.je-div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #ddd6e4; border-radius: 9px; background: #fff; text-align: left; font: inherit; font-size: 13.5px; font-weight: 600; color: #3f3848; cursor: pointer; }
.je-div i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--dc); }
.je-div:hover { border-color: #b9a6cc; }
.je-div.on { border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc); background: color-mix(in srgb, var(--dc) 8%, #fff); color: #1f1a24; }
.je-div.on::after { content: "\2713"; margin-left: auto; font-weight: 800; color: var(--dc); }
.je-pin { display: flex; align-items: center; gap: 10px; }
.je-pin code { padding: 4px 12px; border: 1px solid #e4ddee; border-radius: 8px; background: #fbfafd; font-size: 18px; font-weight: 800; letter-spacing: .16em; color: #1f1a24; }
@media (max-width: 520px) { .je-divs { grid-template-columns: minmax(0, 1fr); } .jg-grid { padding: 4px 12px 14px; } }
.sched-top > div:not(.sched-actions) { flex: 1; min-width: 0; } .sched-actions { margin-left: auto; }
@media (max-width: 1365px) { .app-bar .navbar-brand + .who { display: none !important; } }

/* ---- judge badges: 4 x 3 in (standard badge holder), six to a Letter page, cut along the dashed lines */
@media print {
  body.printing-cards #cardPrint { display: block; page: cards; background: #fff; }
  .jb-sheet { display: grid !important; grid-template-columns: repeat(2, 4in); grid-auto-rows: 3in; justify-content: center; align-content: center;
    box-sizing: border-box; width: 8.5in; height: 11in; padding: 0 !important; break-after: page; }
  .jb-sheet:last-child { break-after: auto; }
  .jb { box-sizing: border-box; display: flex; flex-direction: column; width: 4in; height: 3in; border: 1px dashed #9a92a4; overflow: hidden; background: #fff;
    font-family: var(--font-sans); color: #1f1a24; break-inside: avoid; }
  .jb-top { display: flex; align-items: center; justify-content: space-between; padding: .14in .2in .1in; border-bottom: .035in solid #3b0f4f; }
  .jb-logo { height: .42in; width: auto; }
  .jb-role { padding: .03in .16in; border-radius: 999px; background: #3b0f4f; color: #fff; font-size: 12pt; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
  .jb-main { flex: 1; display: flex; gap: .14in; padding: .14in .2in .06in; min-height: 0; }
  .jb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .1in; }
  .jb-name { font-size: 22pt; font-weight: 900; line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
  .jb-divs { display: flex; flex-direction: column; gap: .04in; }
  .jb-divs span { display: flex; align-items: center; gap: .06in; font-size: 9.5pt; font-weight: 700; color: #3f3848; line-height: 1.15; }
  .jb-divs i { flex: none; width: .12in; height: .12in; border-radius: .025in; }
  .jb-scan { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .03in; }
  .jb-qr { width: 1.18in; height: 1.18in; }
  .jb-qr svg { display: block; width: 100%; height: 100%; }
  .jb-scan small { font-size: 7pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
  .jb-foot { display: flex; align-items: center; justify-content: space-between; gap: .1in; padding: .06in .2in .1in; border-top: 1px solid #e6e1eb; font-size: 8pt; color: #6b6274; }
  .jb-foot b { margin-left: .04in; font-size: 11pt; font-weight: 900; letter-spacing: .14em; color: #1f1a24; font-family: ui-monospace, Consolas, monospace; }
}

/* ---- judge badges: the on-screen preview (the same badges are printed) */
#cardPrint.open { display: block; position: fixed; inset: 0; z-index: 2000; overflow: auto; background: #3d3644; }
body.previewing-cards { overflow: hidden; }
.jb-toolbar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 20px; background: #1f1a24; color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.jb-toolbar > div:first-child { display: flex; flex-direction: column; }
.jb-toolbar b { font-size: 16px; font-weight: 800; }
.jb-toolbar > div:first-child span { font-size: 13px; color: rgba(255, 255, 255, .7); }
.jb-warn { flex: 1 1 260px; padding: 6px 10px; border-radius: 8px; background: #fff3d6; color: #6b4a00; font-size: 13px; font-weight: 600; }
.jb-actions { display: flex; gap: 8px; margin-left: auto; }
.jb-actions .btn { min-width: 84px; font-weight: 700; }
.jb-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 16px 40px; }
#cardPrint .jb-sheet { display: grid; grid-template-columns: repeat(2, 4in); grid-auto-rows: 3in; justify-content: center; align-content: center;
  box-sizing: border-box; width: 8.5in; height: 11in; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
#cardPrint .jb { box-sizing: border-box; display: flex; flex-direction: column; width: 4in; height: 3in; border: 1px dashed #9a92a4; overflow: hidden; background: #fff; font-family: var(--font-sans); color: #1f1a24; }
#cardPrint .jb-top { display: flex; align-items: center; justify-content: space-between; padding: .14in .2in .1in; border-bottom: .035in solid #3b0f4f; }
#cardPrint .jb-logo { height: .42in; width: auto; }
#cardPrint .jb-role { padding: .03in .16in; border-radius: 999px; background: #3b0f4f; color: #fff; font-size: 12pt; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
#cardPrint .jb-main { flex: 1; display: flex; gap: .14in; padding: .14in .2in .06in; min-height: 0; }
#cardPrint .jb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .1in; }
#cardPrint .jb-name { font-size: 22pt; font-weight: 900; line-height: 1.02; letter-spacing: -.01em; overflow-wrap: anywhere; }
#cardPrint .jb-divs { display: flex; flex-direction: column; gap: .04in; }
#cardPrint .jb-divs span { display: flex; align-items: center; gap: .06in; font-size: 9.5pt; font-weight: 700; color: #3f3848; line-height: 1.15; }
#cardPrint .jb-divs i { flex: none; width: .12in; height: .12in; border-radius: .025in; }
#cardPrint .jb-scan { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .03in; }
#cardPrint .jb-qr { width: 1.18in; height: 1.18in; }
#cardPrint .jb-qr svg { display: block; width: 100%; height: 100%; }
#cardPrint .jb-scan small { font-size: 7pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
#cardPrint .jb-foot { display: flex; align-items: center; justify-content: space-between; gap: .1in; padding: .06in .2in .1in; border-top: 1px solid #e6e1eb; font-size: 8pt; color: #6b6274; }
#cardPrint .jb-foot b { margin-left: .04in; font-size: 11pt; font-weight: 900; letter-spacing: .14em; color: #1f1a24; font-family: ui-monospace, Consolas, monospace; }
@media print {
  /* on paper: only the pages, at full size, no preview frame */
  #cardPrint.open { position: static; overflow: visible; background: #fff; }
  #cardPrint .jb-toolbar { display: none !important; }
  #cardPrint .jb-pages { display: block; padding: 0; zoom: 1 !important; }
  #cardPrint .jb-sheet { box-shadow: none; margin: 0; break-after: page; }
  #cardPrint .jb-sheet:last-child { break-after: auto; }
  body.printing-cards { overflow: visible !important; }
}

/* ---- organizers: a list of people */
.org-card { border: 1px solid #e4ddee; border-radius: 16px; }
.org-add { display: flex; gap: 8px; }
.org-add input { flex: 1; height: 40px; border-radius: 10px; }
.org-add .btn { min-width: 76px; border-radius: 10px; font-weight: 700; }
#orgError:empty { display: none; }
#orgError { margin-top: 6px !important; }
.org-list { display: flex; flex-direction: column; margin-top: 14px; border: 1px solid #ece7f1; border-radius: 12px; overflow: hidden; }
.org-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #f1edf5; background: #fff; }
.org-row:first-child { border-top: 0; }
.org-avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f1ebf6; color: #5b2178; font-size: 13px; font-weight: 800; }
.org-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.org-who b { font-size: 14.5px; font-weight: 700; color: #1f1a24; }
.org-who small { font-size: 12.5px; color: #6b6274; }
.org-email { flex: none; max-width: 40%; font-size: 13px; color: #4a4655; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-fixed { flex: none; padding: 2px 9px; border-radius: 999px; background: #f3f0f7; color: #5b5266; font-size: 12px; font-weight: 700; }
.org-remove { flex: none; padding: 4px 10px; border: 1px solid #e4ddee; border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 700; color: #b42318; cursor: pointer; }
.org-remove:hover { border-color: #e5847b; background: #fff6f5; }
@media (max-width: 600px) { .org-email { display: none; } }

/* ---- judge list: each division a full-width row, its judges as tiles */
.jg-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
.jg-card { border-top-width: 1px !important; border-left: 4px solid var(--dc) !important; }
.jg-card > header { padding: 10px 14px !important; background: #fbfafd; }
.jg-card h4 { flex: 0 1 auto !important; font-size: 15px !important; white-space: normal !important; overflow: visible !important; }
.jg-card .jg-count { margin-right: auto; }
.jg-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; padding: 12px 14px !important; }
.jg-judge { padding: 9px 12px !important; border: 1px solid #e4ddee !important; border-radius: 10px; background: #fff !important; box-shadow: 0 1px 2px rgba(31, 26, 36, .04); }
.jg-judge:hover { border-color: #b9a6cc !important; background: #faf7fc !important; }
.jg-empty { padding: 12px 14px !important; }
/* ---- judge list: each judge a full-width row inside its division */
.jg-list { display: flex !important; flex-direction: column; gap: 0 !important; padding: 0 !important; }
.jg-judge { gap: 12px !important; padding: 10px 16px !important; border: 0 !important; border-top: 1px solid #f1edf5 !important; border-radius: 0 !important; box-shadow: none !important; }
.jg-judge:first-child { border-top: 0 !important; }
.jg-judge:hover { background: #faf7fc !important; }
.jg-name { flex: 0 1 260px !important; font-size: 15px !important; font-weight: 700 !important; }
.jg-also { flex: 1; display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 6px !important; }
.jg-also small { font-size: 11.5px; font-weight: 700; color: #8a8194; text-transform: uppercase; letter-spacing: .06em; }
.jg-also-div { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border: 1px solid #e4ddee; border-radius: 999px; font-size: 12px; font-weight: 600; color: #4a4655; }
.jg-also-div i { width: 8px !important; height: 8px !important; border-radius: 50%; }
.jg-judge:not(:has(.jg-also)) .jg-pin { margin-left: auto; }
.jg-edit { flex: none; font-size: 12.5px; font-weight: 700; color: #b9aec6; }
.jg-judge:hover .jg-edit { color: #5b2178; }
@media (max-width: 600px) { .jg-also { display: none !important; } .jg-name { flex: 1 !important; } .jg-pin { margin-left: auto; } }
/* ---- judge badges: two-sided; the back carries the private sign-in QR code and PIN */
#cardPrint .jb-sheet { position: relative; }
#cardPrint .jb-side { position: absolute; top: .3in; left: 50%; transform: translateX(-50%); font-size: 9pt; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9a92a4; }
#cardPrint .jb-front { align-items: center; }
#cardPrint .jb-front .jb-name { font-size: 26pt; }
#cardPrint .jb-front .jb-divs span { font-size: 11pt; }
#cardPrint .jb-front .jb-divs i { width: .15in; height: .15in; }
#cardPrint .jb-blank { border-color: transparent; }
#cardPrint .jb-back-head { display: flex; align-items: baseline; justify-content: space-between; gap: .1in; padding: .12in .2in .08in; border-bottom: .03in solid #3b0f4f; }
#cardPrint .jb-back-head b { font-size: 11pt; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #3b0f4f; }
#cardPrint .jb-back-head span { font-size: 9pt; font-weight: 700; color: #4a4655; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cardPrint .jb-back-main { flex: 1; display: flex; align-items: center; gap: .16in; padding: .1in .2in; min-height: 0; }
#cardPrint .jb-back .jb-qr { flex: none; width: 1.75in; height: 1.75in; }
#cardPrint .jb-back-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .08in; }
#cardPrint .jb-back-text ol { margin: 0; padding-left: .17in; font-size: 8.5pt; line-height: 1.3; color: #3f3848; }
#cardPrint .jb-back-pin small { display: block; font-size: 7.5pt; font-weight: 700; color: #6b6274; }
#cardPrint .jb-back-pin b { font-size: 20pt; font-weight: 900; letter-spacing: .16em; color: #1f1a24; font-family: ui-monospace, Consolas, monospace; }
#cardPrint .jb-back-site { font-size: 7.5pt; color: #6b6274; overflow-wrap: anywhere; }
#cardPrint .jb-back-foot { padding: .05in .2in .08in; border-top: 1px solid #e6e1eb; font-size: 7.5pt; font-weight: 700; color: #b42318; }
@media print { #cardPrint .jb-side { display: none; } }
.jg-also.bad, .jg-also.bad small { color: #b42318; }
.jg-also.bad .jg-also-div { border-color: #f3c5c1; background: #fff6f5; }
.judge-multi-note { border-color: #f3c5c1 !important; background: #fff6f5 !important; color: #8f1d14 !important; }
.judge-multi-note[hidden] { display: none !important; }
.org-add[hidden] { display: none !important; }
.org-role { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #f3f0f7; color: #5b5266; }
.org-role.system-admin { background: #3b0f4f; color: #fff; }
.org-role.district-admin { background: #f1ebf6; color: #5b2178; }
.org-remove-space { flex: none; width: 66px; }
.org-fixed { display: none; }

/* ==== every setting page: one look ==== */
/* the page heading: back button, Settings > Title, what the setting is for, and its icon on the right */
.set-back { align-items: flex-start !important; gap: 16px !important; margin: 4px 0 20px !important; padding: 0 0 18px !important; max-width: 1040px; }
.set-back > div:nth-child(2) { flex: 1; min-width: 0; }
.set-back h2 { font-size: 26px !important; font-weight: 900 !important; letter-spacing: -.015em; color: #1f1a24; }
.set-sub { margin: 4px 0 0; max-width: 760px; font-size: 14.5px; line-height: 1.5; color: #6b6274; }
.set-sub:empty { display: none; }
.set-head-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #f1ebf6; color: #5b2178; }
.set-head-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.set-head-icon.tone-blue { background: #e8f0fd; color: #2456a6; }
.set-head-icon.tone-green { background: #e6f5eb; color: #1f7a3e; }
.set-head-icon.tone-amber { background: #fff3d9; color: #9a6400; }
.set-head-icon.tone-red { background: #fde8e7; color: #b42318; }
.set-hidden { display: none !important; }

/* the panel */
#settings .card.set-page { max-width: 1040px !important; margin-bottom: 18px; padding: 24px 26px 0 !important; border: 1px solid #e4ddee !important; border-radius: 16px !important;
  background: #fff; box-shadow: 0 1px 2px rgba(31, 26, 36, .04), 0 8px 24px rgba(31, 26, 36, .04); overflow: visible; }
#settings .card.set-page.judge-card { padding: 0 !important; }
#settings .set-page > *:first-child { margin-top: 0; }

/* fields: small caps labels, roomy inputs, a clear focus ring */
#settings .set-page label.field { display: block; margin: 0 0 16px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
#settings .set-page label.field input, #settings .set-page label.field select, #settings .set-page label.field textarea,
#settings .set-page .form-control, #settings .set-page .form-select {
  margin-top: 6px; border: 1px solid #d6cce2; border-radius: 10px; background-color: #fff; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #1f1a24; }
#settings .set-page label.field input:not([type=checkbox]):not([type=radio]):not([type=color]), #settings .set-page label.field select { min-height: 42px; padding: 8px 12px; }
#settings .set-page table .form-control, #settings .set-page table .form-select, #settings .set-page .form-control-sm { margin-top: 0; font-size: 14px; border-radius: 8px; }
#settings .set-page .form-control:focus, #settings .set-page .form-select:focus, #settings .set-page label.field input:focus, #settings .set-page label.field select:focus, #settings .set-page label.field textarea:focus {
  border-color: #5b2178; box-shadow: 0 0 0 3px rgba(91, 33, 120, .14); outline: none; }
#settings .set-page textarea { font-family: var(--font-sans) !important; font-size: 14.5px !important; line-height: 1.5; }
#settings .set-page fieldset { margin: 4px 0 18px; padding: 16px 18px 4px; border: 1px solid #ece7f1; border-radius: 12px; background: #fbfafd; }
#settings .set-page fieldset legend { float: none; width: auto; margin: 0 0 6px; padding: 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #3b0f4f; }
#settings .set-page p.text-muted { color: #6b6274 !important; }
#settings .set-page .catpick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #e4ddee; border-radius: 10px; background: #fff; font-size: 14.5px; font-weight: 600; }

/* tables */
#settings .set-page table:not(.judge-table) { width: 100%; border-collapse: separate; border-spacing: 0; }
#settings .set-page table:not(.judge-table) thead th { padding: 10px 10px; border-bottom: 1px solid #e4ddee; background: #fbfafd; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b6274; }
#settings .set-page table:not(.judge-table) tbody td { padding: 10px 10px; border-bottom: 1px solid #f1edf5; vertical-align: middle; }
#settings .set-page table:not(.judge-table) tbody tr:hover td { background: #fcfbfd; }

/* buttons inside a page */
#settings .set-page .btn { border-radius: 10px; font-weight: 700; }
#settings .set-page .btn-outline-danger { border-color: #f3c5c1; color: #b42318; }
#settings .set-page .btn-outline-danger:hover { background: #fff6f5; border-color: #e5847b; color: #b42318; }

/* the action bar at the bottom of the page */
.set-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin: 22px -26px 0; padding: 14px 26px;
  border-top: 1px solid #ece7f1; border-radius: 0 0 16px 16px; background: rgba(251, 250, 253, .96); backdrop-filter: blur(6px); }
.set-actions > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 !important; }
.set-actions .btn-primary { min-width: 120px; padding: 9px 20px; border-radius: 10px; font-weight: 800; }
@media (max-width: 600px) {
  #settings .card.set-page { padding: 18px 16px 0 !important; }
  .set-actions { margin: 18px -16px 0; padding: 12px 16px; }
  .set-head-icon { display: none; }
}
/* pages without a Save bar keep room at the bottom */
#settings .card.set-page:not(:has(.set-actions)) { padding-bottom: 24px !important; }
#settings .set-page fieldset[hidden] { display: none; }
/* Reset Data: a danger panel */
.danger-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 18px; border: 1px solid #f3c5c1; border-radius: 12px; background: #fff8f7; }
.danger-row > div { flex: 1 1 360px; display: flex; flex-direction: column; gap: 3px; }
.danger-row b { font-size: 15.5px; font-weight: 800; color: #8f1d14; }
.danger-row span { font-size: 14px; line-height: 1.45; color: #6b4a47; }
.danger-row .btn { flex: none; background: #fff; }
.danger-row .btn:hover { background: #b42318 !important; border-color: #b42318 !important; color: #fff !important; }
/* sign-in: the KC STEM Fest logo on a white plate at the top of the card */
.signin-logo { display: inline-flex; align-items: center; justify-content: center; margin: 0 0 14px; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.signin-logo img { display: block; height: 44px; width: auto; }

/* ---- settings pages: every control on a line is the same height, checkboxes in the site's purple */
#settings .set-page { --ctl: 42px; }
#settings .set-page input[type=checkbox], #settings .set-page input[type=radio] { accent-color: #5b2178; width: 18px; height: 18px; margin: 0; flex: none; }
#settings .set-page .form-control:not(textarea), #settings .set-page .form-select, #settings .set-page input.inline {
  height: var(--ctl); min-height: var(--ctl); padding-top: 0; padding-bottom: 0; margin-top: 0; }
#settings .set-page label.field .form-select, #settings .set-page label.field input:not([type=checkbox]):not([type=radio]):not([type=color]) { margin-top: 6px; }
#settings .set-page .catpick { display: inline-flex; align-items: center; gap: 10px; height: var(--ctl); margin: 0 !important; padding: 0 14px; border-color: #d6cce2; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: #1f1a24; cursor: pointer; }
#settings .set-page .catpick:has(input:checked) { border-color: #5b2178; background: #f7f2fb; }
#settings .set-page .d-flex.gap-2 { gap: 10px !important; }
#settings .set-page .d-flex > .btn, #settings .set-page fieldset .btn, #settings .set-page .set-actions .btn { height: var(--ctl); display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; }
#settings .set-page .btn-sm { height: 34px !important; padding: 0 12px !important; }
#settings .set-page .btn-outline-secondary { border-color: #d6cce2; color: #3b0f4f; background: #fff; }
#settings .set-page .btn-outline-secondary:hover { border-color: #5b2178; background: #f7f2fb; color: #3b0f4f; }
#settings .set-page fieldset .d-flex + div { display: flex; align-items: center; gap: 12px; }
#settings .set-page fieldset .ms-2 { margin-left: 0 !important; }
#settings .set-page #liveState { margin: -4px 0 18px !important; font-size: 14.5px; }
#settings .set-page label.field[style*="max-width"] select { width: 100%; }
#settings .set-page .catpick { min-height: 0 !important; height: var(--ctl) !important; box-sizing: border-box; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1; }

/* ---- Schools: a clean row per school; the details are edited in a dialog */
.schools-card .school-head, .schools-card > p.small { display: none !important; }
.schools-card .schools-total { margin-left: auto; }
#bRows { display: flex; flex-direction: column; margin-top: 6px; border: 1px solid #ece7f1; border-radius: 12px; overflow: hidden; }
.sch-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 76px 200px auto; align-items: center; gap: 18px; padding: 14px 18px; border-top: 1px solid #f1edf5; background: #fff; }
.sch-row:first-child { border-top: 0; }
.sch-row:hover { background: #fcfbfd; }
.sch-row .school-fields { display: none; }
.sch-swatch { width: 14px; height: 40px; border-radius: 4px; }
.sch-who { display: flex; flex-direction: column; min-width: 0; }
.sch-who b { font-size: 15.5px; font-weight: 800; color: #1f1a24; }
.sch-who small { font-size: 13px; color: #4a4655; }
.sch-who .sch-meta { margin-top: 2px; font-size: 12px; color: #8a8194; }
.sch-goal, .sch-entered, .sch-division { display: flex; flex-direction: column; gap: 4px; }
.sch-goal > small, .sch-entered > small, .sch-division > small { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a8194; }
.sch-row .school-stepper { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid #d6cce2; border-radius: 10px; overflow: hidden; background: #fff; }
.sch-row .school-stepper .btn { width: 34px; height: 34px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #fbfafd; color: #3b0f4f; font-size: 16px; }
.sch-row .school-stepper .btn:hover { background: #f1ebf6; }
#settings .set-page .sch-row .school-stepper .school-slots { width: 56px; height: 34px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-left: 1px solid #ece7f1 !important; border-right: 1px solid #ece7f1 !important; border-radius: 0 !important;
  text-align: center; font-size: 15px; font-weight: 800; -moz-appearance: textfield; }
.sch-row .school-slots::-webkit-inner-spin-button, .sch-row .school-slots::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sch-entered .school-entered { align-self: flex-start; min-width: 40px; padding: 4px 10px; border: 1px solid #e4ddee; border-radius: 999px; background: #fbfafd; text-align: center; font-size: 14px; font-weight: 800; color: #4a4655; }
.sch-entered .school-entered.full { border-color: #9fd8b3; background: #e8f6ee; color: #1f7a3e; }
.sch-div { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 13.5px; font-weight: 600; color: #3f3848; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-div i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.sch-none { font-weight: 500; color: #9a92a4; }
.sch-edit { padding: 7px 14px; border: 1px solid #d6cce2; border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.sch-edit:hover { border-color: #5b2178; background: #f7f2fb; }
@media (max-width: 900px) {
  .sch-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .sch-entered, .sch-division { display: none; }
  .sch-edit { grid-column: 2 / -1; justify-self: start; }
}
/* the edit dialog */
.sch-form { display: flex; flex-direction: column; gap: 14px; }
.sch-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 12px; }
.sch-form-row.three { grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; }
.sch-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.sch-field > span { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
.sch-field > small { font-size: 12.5px; color: #8a8194; }
.sch-form .form-control, .sch-form .form-select { height: 42px; border: 1px solid #d6cce2; border-radius: 10px; font-size: 15px; }
.sch-form .form-control:focus, .sch-form .form-select:focus { border-color: #5b2178; box-shadow: 0 0 0 3px rgba(91, 33, 120, .14); }
.sch-form input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1px solid #d6cce2; border-radius: 10px; background: #fff; cursor: pointer; }
.sch-match { margin: 0; padding: 14px 16px; border: 1px solid #ece7f1; border-radius: 12px; background: #fbfafd; }
.sch-match legend { float: none; width: auto; margin: 0 0 8px; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3b0f4f; }
.sch-match > small { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: #6b6274; }
.sch-modal .modal-footer .btn { height: 40px; border-radius: 10px; font-weight: 700; }
/* Schools, refined: no total box, no Entered column, centred - and + , and colour swatches in the editor */
.schools-card .schools-total { display: none !important; }
.sch-row { grid-template-columns: 14px minmax(0, 1fr) auto 220px auto !important; }
.sch-row .school-stepper .btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; line-height: 1 !important; font-size: 18px !important; font-weight: 700; }
.sch-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sch-sw { position: relative; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.sch-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.sch-sw.on::after { content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900; }
.sch-custom { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 32px; padding: 0 12px 0 4px; border: 1px solid #d6cce2; border-radius: 999px; background: #fff; box-shadow: none; font-size: 13px; font-weight: 700; color: #3b0f4f; }
.sch-custom.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); }
.sch-custom.on::after { content: none; }
.sch-custom input[type=color] { width: 24px !important; height: 24px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: none !important; cursor: pointer; }
.sch-custom input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.sch-custom input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.sch-row .school-stepper .btn svg { display: block; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
/* Schools: the divisions a school can submit to */
.sch-row { grid-template-columns: 14px minmax(0, 1fr) auto minmax(180px, 280px) auto !important; }
.sch-div { flex-wrap: wrap; gap: 4px !important; white-space: normal !important; overflow: visible !important; }
.sch-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid #e4ddee; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 600; color: #3f3848; white-space: nowrap; }
.sch-chip i { width: 8px; height: 8px; border-radius: 50%; }
.sch-divs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sch-divs .je-div.on::after { content: "\2713"; }
#settings .set-page .sch-row .school-stepper .btn, .sch-row .school-stepper .btn { height: 34px !important; min-height: 0 !important; max-height: 34px !important; padding: 0 !important; align-self: center; }
/* Schools: every row the same height; the divisions stay on one line */
.sch-row { min-height: 84px; grid-template-columns: 14px minmax(0, 1fr) auto minmax(260px, 340px) auto !important; }
.sch-div { flex-wrap: nowrap !important; overflow: hidden !important; }
.sch-chip { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sch-more { flex: none; background: #f3f0f7; color: #5b2178; font-weight: 700; cursor: help; }
.sch-row { grid-template-columns: 14px minmax(0, 1fr) auto minmax(330px, 400px) auto !important; } .sch-chip { padding: 2px 7px; font-size: 11.5px; }
/* Schools: divisions on up to two lines; every row the same height */
.sch-row { height: 96px; min-height: 0 !important; }
.sch-div { flex-wrap: wrap !important; align-content: flex-start; row-gap: 4px !important; max-height: 50px; overflow: hidden !important; }
.sch-chip { max-width: 100%; }
/* Schools: one header row for the list */
.sch-head { display: grid; grid-template-columns: 14px minmax(0, 1fr) 104px minmax(330px, 400px) 58px; gap: 18px; align-items: end; padding: 0 18px 8px; }
.sch-head span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8a8194; }
.sch-row { grid-template-columns: 14px minmax(0, 1fr) 104px minmax(330px, 400px) 58px !important; }
.sch-goal > small, .sch-division > small { display: none; }
.sch-row .sch-edit { justify-self: end; }
@media (max-width: 900px) { .sch-head { display: none; } .sch-goal > small, .sch-division > small { display: block; } }
/* Schools: the header is the top bar of the list box */
.sch-head { margin-top: 6px; padding: 11px 18px !important; border: 1px solid #e4ddee; border-bottom: 0; border-radius: 12px 12px 0 0; background: #f6f2fa; align-items: center !important; }
.sch-head span { font-size: 12.5px !important; font-weight: 800 !important; letter-spacing: .08em !important; color: #4a3d58 !important; }
.sch-head + #bRows { margin-top: 0 !important; border-color: #e4ddee; border-radius: 0 0 12px 12px; border-top: 1px solid #e4ddee; }

/* ==== Judges: a toolbar, then one list box with a header bar and a section per division ==== */
#settings .judge-card { padding: 0 !important; }
.judge-head { align-items: center !important; padding: 20px 22px 14px !important; }
.judge-head h3 { font-size: 0 !important; margin: 0 !important; }               /* the page heading already names it */
.judge-head h3 .judge-count { font-size: 13px !important; padding: 4px 12px !important; }
.judge-head p { display: none; }
.judge-tools .form-control { height: 38px !important; min-height: 0 !important; }
.judge-tools .btn { height: 38px !important; padding: 0 14px !important; border-radius: 10px !important; display: inline-flex; align-items: center; }
.judge-pin-note, .judge-multi-note { margin: 0 22px 14px !important; }
.jt { display: block !important; margin: 0 22px 20px; padding: 0 !important; border: 1px solid #e4ddee; border-radius: 12px; overflow: hidden; background: #fff; }
.jt-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px 70px; gap: 16px; padding: 11px 18px; background: #f6f2fa; border-bottom: 1px solid #e4ddee; }
.jt-head span { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; }
.jt-group + .jt-group { border-top: 1px solid #e4ddee; }
.jt-group-head { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: #fcfbfd; border-bottom: 1px solid #f1edf5; }
.jt-bar { flex: none; width: 4px; height: 18px; border-radius: 2px; background: var(--dc); }
.jt-group-head b { font-size: 14.5px; font-weight: 800; color: #1f1a24; }
.jt-count { padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f3f0f7; color: #4a4655; }
.jt-count.low { background: #fff3d6; color: #8a5a00; }
.jt-count.bad { background: #fde8e7; color: #b42318; }
.jt-add { margin-left: auto; padding: 5px 12px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.jt-add:hover { border-color: #5b2178; background: #f7f2fb; }
.jt-rows { display: flex; flex-direction: column; }
.jt-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 70px; gap: 16px; align-items: center; width: 100%; min-height: 54px; padding: 8px 18px 8px 32px; border: 0; border-top: 1px solid #f4f1f7; background: #fff; text-align: left; font: inherit; color: #1f1a24; cursor: pointer; }
.jt-row:first-child { border-top: 0; }
.jt-row:hover { background: #faf7fc; }
.jt-row:focus-visible { outline: 2px solid rgba(91, 33, 120, .35); outline-offset: -2px; }
.jt-who { display: flex; flex-direction: column; min-width: 0; }
.jt-who b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-new { padding: 0 7px; border-radius: 999px; background: #e8f0fd; color: #2456a6; font-size: 11px; font-weight: 800; font-style: normal; }
.jt-warn { margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #b42318; }
.jt-pin { justify-self: start; min-width: 68px; padding: 4px 10px; border: 1px solid #e4ddee; border-radius: 8px; background: #fbfafd; text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 800; letter-spacing: .14em; color: #1f1a24; }
.jt-pin.none { font-family: inherit; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: #8a8194; }
.jt-edit { justify-self: end; padding: 5px 12px; border: 1px solid #d6cce2; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #3b0f4f; }
.jt-row:hover .jt-edit { border-color: #5b2178; background: #f7f2fb; }
.jt-empty { margin: 0; padding: 14px 32px; font-size: 13.5px; color: #b42318; }
@media (max-width: 600px) {
  .jt-head { display: none; }
  .jt-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 18px; }
  .jt-edit { display: none; }
  .jt { margin: 0 12px 16px; }
}

/* ---- judge badges, design 2: the judge's division colour down the left, JUDGE written vertically */
#cardPrint .jb2 { flex-direction: row; border: 1px dashed #b8b0c2; }
#cardPrint .jb2-band { flex: none; display: flex; align-items: center; justify-content: center; width: .78in; background: var(--dc); color: var(--dc-ink); }
#cardPrint .jb2-band span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 26pt; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; line-height: 1; }
#cardPrint .jb2-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: .16in .2in .12in .22in; }
#cardPrint .jb2-logo { align-self: flex-end; height: .4in; width: auto; }
#cardPrint .jb2-name { margin-top: auto; font-size: 25pt; font-weight: 900; line-height: 1.02; letter-spacing: -.015em; color: #1f1a24; overflow-wrap: anywhere; }
#cardPrint .jb2-div { display: flex; align-items: center; gap: .07in; margin-top: .1in; padding-top: .08in; border-top: .03in solid var(--dc); font-size: 11pt; font-weight: 800; color: #3f3848; }
#cardPrint .jb2-div i { flex: none; width: .14in; height: .14in; border-radius: .03in; background: var(--dc); }
#cardPrint .jb2-foot { margin-top: auto; padding-top: .1in; font-size: 7.5pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a8194; }
/* the back */
#cardPrint .jb2-back { flex-direction: column; }
#cardPrint .jb2-stripe { flex: none; height: .12in; background: var(--dc); }
#cardPrint .jb2-back-main { flex: 1; display: flex; align-items: center; gap: .18in; padding: .12in .2in; min-height: 0; }
#cardPrint .jb2-qr { flex: none; width: 1.9in; height: 1.9in; padding: .04in; border: 1px solid #e6e1eb; border-radius: .06in; }
#cardPrint .jb2-qr svg { display: block; width: 100%; height: 100%; }
#cardPrint .jb2-back-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .05in; }
#cardPrint .jb2-back-text > b { font-size: 10pt; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #3b0f4f; }
#cardPrint .jb2-back-name { font-size: 10pt; font-weight: 700; color: #1f1a24; overflow-wrap: anywhere; }
#cardPrint .jb2-back-text ol { margin: .04in 0 0; padding-left: .16in; font-size: 8.5pt; line-height: 1.35; color: #3f3848; }
#cardPrint .jb2-pin { margin-top: .08in; padding: .06in .08in; border-radius: .05in; background: #f6f2fa; }
#cardPrint .jb2-pin small { display: block; font-size: 7pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
#cardPrint .jb2-pin b { font-size: 19pt; font-weight: 900; letter-spacing: .18em; color: #1f1a24; font-family: ui-monospace, Consolas, monospace; }
#cardPrint .jb2-private { flex: none; padding: .05in .2in .08in; font-size: 7pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #b42318; }

/* ---- judge badges, design 3: conference style (division colour band on top, name centred, STEM colour stripe) */
#cardPrint .jb3 { flex-direction: column; border: 1px dashed #b8b0c2; background: #fff; }
#cardPrint .jb3-top { flex: none; display: flex; align-items: center; justify-content: space-between; height: .82in; padding: 0 .22in; background: var(--dc); }
#cardPrint .jb3-logo { display: inline-flex; align-items: center; padding: .05in .1in; border-radius: .08in; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
#cardPrint .jb3-logo img { display: block; height: .4in; width: auto; }
#cardPrint .jb3-role { font-size: 24pt; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; color: var(--dc-ink); }
#cardPrint .jb3-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .06in; padding: .08in .25in; text-align: center; }
#cardPrint .jb3-name { font-size: 26pt; font-weight: 900; line-height: 1.02; letter-spacing: -.015em; color: #1f1a24; overflow-wrap: anywhere; }
#cardPrint .jb3-div { display: inline-flex; align-items: center; gap: .06in; padding: .03in .14in; border: .02in solid var(--dc); border-radius: 999px; font-size: 10.5pt; font-weight: 800; color: #3f3848; }
#cardPrint .jb3-stem { flex: none; display: flex; height: .1in; }
#cardPrint .jb3-stem i { flex: 1; }
#cardPrint .jb3-stem i:nth-child(1) { background: #e7425f; }
#cardPrint .jb3-stem i:nth-child(2) { background: #fd8204; }
#cardPrint .jb3-stem i:nth-child(3) { background: #00a6cf; }
#cardPrint .jb3-stem i:nth-child(4) { background: #00b287; }
/* the back */
#cardPrint .jb3-back-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: .2in; padding: .14in .22in .04in; min-height: 0; }
#cardPrint .jb3-qr { flex: none; width: 1.95in; height: 1.95in; }
#cardPrint .jb3-qr svg { display: block; width: 100%; height: 100%; }
#cardPrint .jb3-back-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .06in; }
#cardPrint .jb3-back-text > b { font-size: 12pt; font-weight: 900; color: #1f1a24; }
#cardPrint .jb3-back-text > span { font-size: 8.5pt; line-height: 1.35; color: #4a4655; }
#cardPrint .jb3-pin { display: flex; flex-direction: column; margin-top: .06in; padding: .06in .1in; border: 1px solid #e4ddee; border-radius: .06in; }
#cardPrint .jb3-pin small { font-size: 7pt; font-weight: 800; letter-spacing: .12em; color: #8a8194; }
#cardPrint .jb3-pin b { font-size: 21pt; font-weight: 900; letter-spacing: .2em; color: #1f1a24; font-family: ui-monospace, Consolas, monospace; }
#cardPrint .jb3-who { font-size: 8pt !important; font-weight: 700; color: #6b6274 !important; overflow-wrap: anywhere; }
#cardPrint .jb3-private { flex: none; padding: .02in .22in .06in; text-align: center; font-size: 7pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #b42318; }
#cardPrint .jb3-role { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
#cardPrint .jb3-role b { font-size: 24pt; font-weight: 900; letter-spacing: .24em; margin-right: -.24em; }
#cardPrint .jb3-role small { margin-top: .04in; font-size: 11pt; font-weight: 800; letter-spacing: .3em; margin-right: -.3em; opacity: .85; }

/* ---- Divisions settings: one list, a row per division (colour, name, projects, order, Edit) */
.dv-head, .dv-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) 90px 84px 64px; gap: 18px; align-items: center; }
.dv-head { margin-top: 6px; padding: 11px 18px; border: 1px solid #e4ddee; border-bottom: 0; border-radius: 12px 12px 0 0; background: #f6f2fa; }
.dv-head span { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; }
.dv-list { margin-bottom: 10px; border: 1px solid #e4ddee; border-radius: 0 0 12px 12px; overflow: hidden; }
.dv-list:empty::before { content: 'No divisions yet. Add the first one below.'; display: block; padding: 22px 18px; color: #6b6274; }
.dv-row { min-height: 64px; padding: 10px 18px; border-top: 1px solid #f1edf5; background: #fff; }
.dv-row:first-child { border-top: 0; }
.dv-bar { align-self: stretch; width: 8px; border-radius: 4px; }
.dv-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dv-name b { font-size: 16px; font-weight: 800; color: #1f1a24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-num { font-size: 15px; font-weight: 700; color: #3f3848; }
.dv-order { display: flex; gap: 6px; }
.dv-move { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #d6cce2; border-radius: 9px; background: #fff; font-size: 16px; font-weight: 800; line-height: 1; color: #3b0f4f; cursor: pointer; }
.dv-move:hover { border-color: #5b2178; background: #f7f2fb; }
.dv-row:first-child .dv-move:first-child, .dv-row:last-child .dv-move:last-child { visibility: hidden; }
.dv-edit { justify-self: end; padding: 7px 14px; border: 1px solid #d6cce2; border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.dv-edit:hover { border-color: #5b2178; background: #f7f2fb; }
.dv-dirty { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: #8a5a00; }
@media (max-width: 700px) {
  .dv-head { display: none; }
  .dv-list { border-radius: 12px; }
  .dv-row { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px 14px; }
  .dv-num { justify-self: end; }
  .dv-order { grid-column: 2; } .dv-edit { grid-column: 3; }
}

/* ---- Form Options: two panels of chips (T-shirt sizes, instructors) */
.fo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fo-panel { display: flex; flex-direction: column; border: 1px solid #e4ddee; border-radius: 12px; overflow: hidden; background: #fff; }
.fo-panel-head { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; background: #f6f2fa; border-bottom: 1px solid #e4ddee; }
.fo-panel-head b { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; }
.fo-count { padding: 1px 9px; border-radius: 999px; background: #fff; border: 1px solid #e4ddee; font-size: 12px; font-weight: 800; color: #5b2178; }
.fo-count:empty { display: none; }
.fo-sort { margin-left: auto; padding: 4px 11px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 12.5px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.fo-sort:hover { border-color: #5b2178; background: #f7f2fb; }
.fo-help { margin: 12px 16px 0; font-size: 13.5px; color: #6b6274; }
.fo-chips { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-height: 150px; margin: 12px 16px 16px; padding: 10px; border: 1px solid #d6cce2; border-radius: 10px; cursor: text; }
.fo-chips:focus-within { border-color: #7a3fa0; box-shadow: 0 0 0 3px rgba(122, 63, 160, .15); }
.fo-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 8px; border: 1px solid #ddd3e8; border-radius: 8px; background: #faf8fc; font-size: 14px; font-weight: 700; color: #2b2233; cursor: grab; user-select: none; }
.fo-chip.dragging { opacity: .45; }
.fo-chip.over { border-color: #5b2178; box-shadow: -3px 0 0 #5b2178; }
.fo-grip { width: 6px; height: 14px; background: radial-gradient(circle, #b3a8bf 1.2px, transparent 1.4px) 0 0 / 3px 4.6px; }
.fo-x { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; font-size: 17px; line-height: 1; color: #8a8194; cursor: pointer; }
.fo-x:hover { background: #fde8e7; color: #b42318; }
.fo-empty { align-self: center; font-size: 13.5px; color: #8a8194; }
.fo-add { flex: 1 0 180px; height: 34px; min-width: 0; padding: 0 6px; border: 0; outline: 0; background: transparent; font-size: 14px; }
.fo-note { margin: 14px 0 0; font-size: 13.5px; color: #6b6274; }
@media (max-width: 760px) { .fo-grid { grid-template-columns: 1fr; } }

/* ---- T-Shirts: sizes as rows; the size deadline */
.ts-deadline { display: grid; grid-template-columns: auto 200px; gap: 4px 14px; align-items: center; margin-bottom: 18px; }
.ts-deadline > span { font-size: 13px; font-weight: 800; color: #3f3848; }
.ts-deadline > small { grid-column: 1 / -1; font-size: 13px; color: #6b6274; }
.dv-head.ts-row, .dv-row.ts-row { grid-template-columns: minmax(0, 1fr) 84px 40px; }
.dv-row.ts-row { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.ts-size { font-size: 15.5px; font-weight: 800; letter-spacing: .02em; color: #1f1a24; }
.dv-move:disabled { visibility: hidden; }
.ts-remove { justify-self: end; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; font-size: 20px; line-height: 1; color: #8a8194; cursor: pointer; }
.ts-remove:hover { border-color: #f6cfcb; background: #fef3f2; color: #b42318; }
.ts-add { display: flex; gap: 8px; max-width: 360px; }

/* ---- Notifications: a row each (colour, message, when, status, Edit) */
.dv-head.nt-row, .dv-row.nt-row { grid-template-columns: 12px minmax(0, 1fr) 230px 110px 64px; }
.dv-row.nt-row { min-height: 68px; }
.nt-dot { width: 12px; height: 12px; border-radius: 50%; }
.nt-dot.red, .nt-tone.red i { background: #d92d20; } .nt-dot.amber, .nt-tone.amber i { background: #dc8a00; }
.nt-dot.blue, .nt-tone.blue i { background: #2563eb; } .nt-dot.green, .nt-tone.green i { background: #16a34a; }
.nt-text { font-size: 15px; font-weight: 700; line-height: 1.35; color: #1f1a24; overflow-wrap: anywhere; }
.nt-when { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; color: #2b2233; }
.nt-when small { font-size: 12.5px; font-weight: 600; color: #6b6274; }
.nt-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.nt-state.ok { background: #e8f6ee; color: #146c3a; }
.nt-state.later { background: #eaf1ff; color: #1d4fa8; }
.nt-state.over { background: #f1eff4; color: #6b6274; }
#noticeRows:empty::before { content: 'No notifications yet.'; }
.nt-entry { margin-top: 22px; padding: 14px 16px; border: 1px solid #e4ddee; border-radius: 12px; }
.nt-entry legend { float: none; width: auto; margin: 0; padding: 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; }
.nt-counter { align-self: flex-end; }
.nt-tones { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-tone { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid #d6cce2; border-radius: 9px; font-size: 14px; font-weight: 700; color: #3f3848; cursor: pointer; }
.nt-tone input { position: absolute; opacity: 0; pointer-events: none; }
.nt-tone i { width: 12px; height: 12px; border-radius: 50%; }
.nt-tone:has(input:checked) { border-color: #3b0f4f; box-shadow: 0 0 0 2px #3b0f4f inset; color: #1f1a24; }
.nt-tone:has(input:focus-visible) { outline: 3px solid rgba(122, 63, 160, .35); }
.nt-times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* a long notification wraps on the Projects page */
.rg-badge.rg-note { height: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; line-height: 1.3; }
.rg-badge.green { background: #ecfdf3; border-color: #b7e7c9; color: #146c3a; }
@media (max-width: 760px) {
  .dv-head.nt-row { display: none; }
  .dv-row.nt-row { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .nt-when { grid-column: 2; } .nt-row .dv-edit { grid-column: 3; grid-row: 1; }
  .nt-times { grid-template-columns: 1fr; }
}
.ts-deadline { justify-content: start; grid-template-columns: 120px 200px !important; }
.ts-add .btn { flex: none; white-space: nowrap; }
#noticeAdd { align-self: flex-start; width: auto; margin-top: 4px; }

/* ---- Project Entry: one on/off switch */
.pe-switch { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid #e4ddee; border-radius: 12px; cursor: pointer; }
.pe-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pe-track { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: #cfc6da; transition: background .15s; }
.pe-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.pe-switch input:checked + .pe-track { background: #16a34a; }
.pe-switch input:checked + .pe-track::after { transform: translateX(22px); }
.pe-switch input:focus-visible + .pe-track { outline: 3px solid rgba(122, 63, 160, .35); outline-offset: 2px; }
.pe-text { display: flex; flex-direction: column; }
.pe-text b { font-size: 16px; font-weight: 800; color: #1f1a24; }
.pe-text small { font-size: 13.5px; color: #6b6274; }
.ts-add { align-items: stretch; max-width: 380px; }
.ts-add .form-control, .ts-add .btn { height: 42px; }
.ts-add .btn { display: inline-flex; align-items: center; padding: 0 16px; }
.ts-deadline { grid-template-columns: 120px 200px 1fr !important; }

.nt-entry .ts-deadline { margin-bottom: 0; grid-template-columns: 80px 200px !important; }
.nt-entry .ts-deadline > small { grid-column: 1 / -1; }
.nt-times { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.nt-times > .sch-field { min-width: 0; }
.nt-times .form-control { width: 100%; min-width: 0; }
.nt-entry .ts-deadline { grid-template-columns: 80px 200px 1fr !important; }
#noticeAdd { margin-top: 12px; }

/* ---- Staff (DataHub directory) */
.st-page { max-width: 1240px; }
.st-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 18px; }
.st-head h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.01em; color: #1f1a24; }
.st-head p { margin: 4px 0 0; font-size: 14.5px; color: #6b6274; }
.st-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.st-search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border: 1px solid #d6cce2; border-radius: 10px; background: #fff; }
.st-search:focus-within { border-color: #7a3fa0; box-shadow: 0 0 0 3px rgba(122, 63, 160, .15); }
.st-search svg { flex: none; fill: none; stroke: #8a8194; stroke-width: 2; stroke-linecap: round; }
.st-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.st-tools .form-select { width: auto; min-width: 180px; height: 42px; border-color: #d6cce2; border-radius: 10px; }
.st-seg { display: inline-flex; padding: 3px; border: 1px solid #d6cce2; border-radius: 10px; background: #fff; }
.st-seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; font-size: 13.5px; font-weight: 700; color: #4a3d58; cursor: pointer; }
.st-seg button.on { background: #3b0f4f; color: #fff; }
.st-count { margin-left: auto; font-size: 13.5px; font-weight: 700; color: #6b6274; }
.st-table { max-height: calc(100vh - 280px); overflow: auto; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; }
.st-table table { width: 100%; border-collapse: separate; border-spacing: 0; }
.st-table thead th { position: sticky; top: 0; z-index: 1; padding: 11px 16px; background: #f6f2fa; border-bottom: 1px solid #e4ddee; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; text-align: left; white-space: nowrap; }
.st-table thead th button { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.st-table thead th button::after { content: '\2195'; margin-left: 6px; opacity: .35; }
.st-table thead th button[data-dir=up]::after { content: '\2191'; opacity: 1; }
.st-table thead th button[data-dir=down]::after { content: '\2193'; opacity: 1; }
.st-table tbody td { padding: 10px 16px; border-bottom: 1px solid #f1edf5; font-size: 14px; color: #2b2233; vertical-align: middle; }
.st-table tbody tr:last-child td { border-bottom: 0; }
.st-table tbody tr:hover td { background: #faf8fc; }
.st-person { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.st-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #efe7f6; font-size: 13px; font-weight: 800; color: #5b2178; }
.st-who { display: flex; flex-direction: column; min-width: 0; }
.st-who b { font-size: 14.5px; font-weight: 800; color: #1f1a24; }
.st-who a { font-size: 12.5px; color: #6b6274; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.st-who a:hover { color: #5b2178; text-decoration: underline; }
.st-campus { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #f3f0f7; font-size: 12.5px; font-weight: 800; color: #3f3848; white-space: nowrap; }
.st-num { font-family: ui-monospace, Consolas, monospace; font-size: 13px !important; color: #6b6274 !important; }
.st-none { color: #b3a8bf; }
.st-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.st-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-status.on { background: #e8f6ee; color: #146c3a; }
.st-status.off { background: #f1eff4; color: #6b6274; }
.st-off .st-who b, .st-off td { color: #8a8194; }
.st-act { text-align: right; }
.st-viewas { padding: 6px 12px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; white-space: nowrap; cursor: pointer; }
.st-viewas:hover { border-color: #5b2178; background: #f7f2fb; }
.st-empty { padding: 28px 16px !important; text-align: center; color: #6b6274 !important; }
.st-note { margin: 10px 2px 0; font-size: 13px; color: #6b6274; }
@media (max-width: 1000px) { .st-hide-md { display: none; } }
@media (max-width: 700px) {
  .st-hide-sm { display: none; }
  .st-head { flex-direction: column; align-items: stretch; }
  .st-count { margin-left: 0; }
}

/* ---- DataHub: the two lists, then the connection */
.dh-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dh-list { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; }
.dh-list header { display: flex; align-items: center; gap: 12px; }
.dh-list header b { display: block; font-size: 16px; font-weight: 800; color: #1f1a24; }
.dh-list header small { display: block; font-size: 13px; color: #6b6274; }
.dh-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #efe7f6; }
.dh-ic svg { width: 22px; height: 22px; fill: none; stroke: #5b2178; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dh-num { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.dh-num strong { font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: -.02em; color: #1f1a24; }
.dh-num span { font-size: 14px; font-weight: 700; color: #6b6274; }
.dh-when { min-height: 20px; margin: 0; font-size: 13.5px; color: #6b6274; }
.dh-btns { display: flex; gap: 8px; margin-top: 8px; }
.dh-btns .btn { height: 38px; display: inline-flex; align-items: center; padding: 0 16px; font-size: 14px; font-weight: 700; }
.dh-conn { margin-top: 18px; padding: 14px 18px 16px; border: 1px solid #e4ddee; border-radius: 12px; }
.dh-conn legend { float: none; width: auto; margin: 0; padding: 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #4a3d58; }
.dh-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 150px; gap: 14px; }
.dh-fields label { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.dh-fields label > span:first-child { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #3f3848; }
.dh-fields .form-control { height: 42px; }
.dh-fields em { padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-style: normal; font-weight: 800; }
.dh-fields em.ok { background: #e8f6ee; color: #146c3a; }
.dh-fields em.no { background: #fef3f2; color: #a8231a; }
.dh-hours { position: relative; display: block; }
.dh-hours input { padding-right: 56px; }
.dh-hours i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-style: normal; font-weight: 700; color: #8a8194; pointer-events: none; }
.dh-foot { display: block; margin-top: 10px; font-size: 12.5px; color: #8a8194; }
@media (max-width: 760px) { .dh-lists, .dh-fields { grid-template-columns: 1fr; } }

/* Staff page: the settings page header, as a link back */
.st-page .set-back { max-width: none; }
.st-page .set-backbtn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.st-page .set-crumb a { color: var(--brand); font-weight: 600; text-decoration: none; }
.st-page .set-crumb a:hover { text-decoration: underline; }
.st-tools #reload { height: 42px; border-color: #d6cce2; border-radius: 10px; font-weight: 700; }
.st-count { margin-left: auto; }

/* ---- Change log: filters, then entries grouped by day */
.lg-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lg-tools .form-select { width: auto; min-width: 200px; max-width: 280px; height: 42px; border-color: #d6cce2; border-radius: 10px; }
.lg-tools .btn { height: 42px; border-color: #d6cce2; border-radius: 10px; font-weight: 700; margin-left: auto; }
.lg-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.lg-type { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid #d6cce2; border-radius: 999px; background: #fff; font-size: 13.5px; font-weight: 700; color: #3f3848; cursor: pointer; }
.lg-type span { min-width: 22px; padding: 0 6px; border-radius: 999px; background: #f3f0f7; font-size: 12px; text-align: center; color: #6b6274; }
.lg-type:hover { border-color: #5b2178; }
.lg-type.on { border-color: #3b0f4f; background: #3b0f4f; color: #fff; }
.lg-type.on span { background: rgba(255, 255, 255, .2); color: #fff; }
.lg-list { max-height: calc(100vh - 360px); min-height: 240px; overflow: auto; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; }
.lg-day { position: sticky; top: 0; z-index: 1; padding: 9px 18px; background: #f6f2fa; border-bottom: 1px solid #e4ddee; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #4a3d58; }
.lg-row { display: grid; grid-template-columns: 74px 210px 92px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 18px; border-bottom: 1px solid #f1edf5; }
.lg-row:hover { background: #faf8fc; }
.lg-time { padding-top: 6px; font-size: 13px; font-weight: 700; color: #6b6274; white-space: nowrap; }
.lg-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lg-who b { font-size: 14px; font-weight: 800; color: #1f1a24; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #efe7f6; font-size: 11.5px; font-weight: 800; color: #5b2178; }
.lg-pill { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.t-edit.lg-pill { background: #e3ecfb; color: #1f4e9c; }
.t-delete.lg-pill { background: #fde8e7; color: #a8231a; }
.t-setup.lg-pill { background: #efe7f6; color: #5b2178; }
.t-access.lg-pill { background: #fff3d6; color: #8a5a00; }
.t-import.lg-pill { background: #e8f6ee; color: #146c3a; }
.lg-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 3px; }
.lg-what > b { font-size: 14px; font-weight: 800; color: #1f1a24; }
.lg-change { font-size: 14px; line-height: 1.45; color: #3f3848; overflow-wrap: anywhere; }
.lg-field { margin-right: 6px; font-weight: 700; color: #6b6274; }
.lg-field::after { content: ':'; }
.lg-change del { color: #8a8194; text-decoration-color: #c9a9a6; }
.lg-change ins { text-decoration: none; font-weight: 700; color: #1f1a24; }
.lg-arrow { margin: 0 6px; color: #8a8194; }
.lg-empty { padding: 36px 18px; text-align: center; color: #6b6274; }
.lg-more { padding: 14px; text-align: center; }
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 13px; color: #6b6274; }
.lg-clear { padding: 6px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 700; color: #b42318; cursor: pointer; }
.lg-clear:hover { border-color: #f6cfcb; background: #fef3f2; }
@media (max-width: 800px) {
  .lg-row { grid-template-columns: 64px minmax(0, 1fr); }
  .lg-row > span:nth-child(3) { grid-column: 2; }
  .lg-what { grid-column: 1 / -1; }
  .lg-tools .btn { margin-left: 0; }
}

/* ---- sign-in page: the event on the left, the two ways in on the right */
.sgn { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); background: #fff; }
.sgn-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px 40px; color: #fff; overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(600px 340px at 100% 0%, rgba(56, 189, 248, .28), transparent 60%),
    radial-gradient(520px 320px at 0% 100%, rgba(231, 66, 95, .22), transparent 60%),
    linear-gradient(150deg, #2a0b3b 0%, #3b0f4f 50%, #1e2a6b 100%); }
.sgn-brand-in { margin: auto 0; max-width: 520px; }
.sgn-logo { display: inline-flex; padding: 16px 22px; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(0, 0, 0, .28); }
.sgn-logo img { display: block; height: 92px; width: auto; }
.sgn-eyebrow { margin: 36px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #a5e3fb; }
.sgn-brand h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 900; line-height: 1.04; letter-spacing: -.025em; }
.sgn-date { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 15px; font-weight: 700; }
.sgn-date svg { width: 18px; height: 18px; fill: none; stroke: #a5e3fb; stroke-width: 1.8; stroke-linecap: round; }
.sgn-stem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 40px 0 0; padding: 0; list-style: none; }
.sgn-stem li { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.sgn-stem i { height: 5px; border-radius: 3px; }
.sgn-stem li:nth-child(1) i { background: #e7425f; } .sgn-stem li:nth-child(2) i { background: #fd8204; }
.sgn-stem li:nth-child(3) i { background: #00a6cf; } .sgn-stem li:nth-child(4) i { background: #00b287; }
.sgn-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px 28px; background: #faf8fc; }
.sgn-panel { width: 100%; max-width: 440px; margin: auto 0; }
.sgn-panel h2 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.02em; color: #1f1a24; }
.sgn-lead { margin: 6px 0 24px; font-size: 15px; color: #6b6274; }
.sgn-option { padding: 20px; border: 1px solid #e4ddee; border-radius: 16px; background: #fff; box-shadow: 0 2px 10px rgba(29, 19, 38, .04); }
.sgn-option + .sgn-option { margin-top: 14px; }
.sgn-option-head { display: flex; gap: 14px; margin-bottom: 16px; }
.sgn-option-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: #1f1a24; }
.sgn-option-head p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: #6b6274; }
.sgn-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: #efe7f6; }
.sgn-ic svg { width: 22px; height: 22px; fill: none; stroke: #5b2178; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sgn-ic.judge { background: #e6f5f9; } .sgn-ic.judge svg { stroke: #0a6f8a; }
.sgn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 50px; border: 1px solid #d6cce2; border-radius: 12px; background: #fff; font-size: 15.5px; font-weight: 800; color: #1f1a24; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sgn-google svg { width: 20px; height: 20px; }
.sgn-google:hover { border-color: #5b2178; box-shadow: 0 4px 14px rgba(59, 15, 79, .12); }
.sgn-judge { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px; background: #3b0f4f; font-size: 15.5px; font-weight: 800; color: #fff; text-decoration: none; transition: background .15s; }
.sgn-judge:hover { background: #551a70; color: #fff; }
.sgn-dev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e4ddee; }
.sgn-dev span { width: 100%; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a8194; }
.sgn-dev button { padding: 6px 12px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; color: #3f3848; cursor: pointer; }
.sgn-foot { display: flex; align-items: center; gap: 8px; margin: 24px 0 0; font-size: 13px; font-weight: 700; color: #8a8194; }
.sgn-foot img { height: 18px; width: auto; }
@media (max-width: 860px) {
  .sgn { grid-template-columns: 1fr; }
  .sgn-brand { padding: 28px 22px 22px; }
  .sgn-logo img { height: 60px; }
  .sgn-eyebrow { margin-top: 20px; }
  .sgn-stem { margin-top: 24px; }
  .sgn-main { padding: 28px 16px 22px; }
}

/* ---- judge sign-in: division choices as white rows with a colour stripe */
#catPick { display: grid; gap: 8px; }
.catpick.jdiv { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 0 14px; border: 1px solid #d6cce2; border-left: 6px solid var(--dc); border-radius: 10px; background: #fff; cursor: pointer; transition: background .12s, border-color .12s; }
.jdiv input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid #b3a8bf; border-radius: 50%; background: #fff; cursor: pointer; }
.jdiv input:checked { border-color: var(--dc); background: radial-gradient(circle, var(--dc) 0 5px, #fff 5.5px); }
.jdiv input:focus-visible { outline: 3px solid rgba(122, 63, 160, .35); outline-offset: 2px; }
.jdiv-name { font-size: 16px; font-weight: 700; color: #1f1a24; }
.jdiv:hover { border-color: #b3a8bf; border-left-color: var(--dc); }
.jdiv:has(input:checked) { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 9%, #fff); }
.jdiv:has(input:checked) .jdiv-name { font-weight: 800; }
.jdiv:has(input:disabled) { cursor: default; }
#catPick.cat-locked .jdiv:not(:has(input:checked)) { opacity: .45; }

/* judge sign-in divisions: full colour rows with white text */
.catpick.jdiv { border: 0 !important; background: var(--dc) !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.jdiv .jdiv-name { color: #fff; font-weight: 800; letter-spacing: .005em; }
.jdiv input { border-color: rgba(255, 255, 255, .85); background: transparent; }
.jdiv input:checked { border-color: #fff; background: radial-gradient(circle, #fff 0 5px, transparent 5.5px); }
.jdiv:hover { filter: brightness(1.06); }
.jdiv:has(input:checked) { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--dc), 0 6px 16px rgba(0, 0, 0, .18); }

.jdiv .jdiv-name { color: var(--df, #fff); }
.jdiv input { border-color: var(--df, #fff); opacity: .9; }
.jdiv input:checked { border-color: var(--df, #fff); opacity: 1; background: radial-gradient(circle, var(--df, #fff) 0 5px, transparent 5.5px); }

/* ---- judge sign-in, calmer: a clean card, divisions as white rows with a colour dot */
#loginForm.login { max-width: 460px; margin: 6vh auto 40px; padding: 28px 28px 26px; border: 1px solid #e4ddee; border-radius: 18px; box-shadow: 0 18px 50px rgba(29, 19, 38, .10); }
#loginForm .login-logo { width: 170px; margin: 0 auto 18px; }
#loginTitle { margin: 0 0 4px !important; font-size: 24px !important; font-weight: 900; letter-spacing: -.015em; color: #1f1a24; text-align: center; }
#loginForm > p.text-muted { margin-bottom: 22px; text-align: center; font-size: 14.5px; }
#loginForm .field { font-size: 13px; font-weight: 800; color: #3f3848; }
#loginForm .field input { height: 48px; margin-top: 6px; border-radius: 10px; font-size: 16px; font-weight: 500; }
#loginForm #judgePin { letter-spacing: .3em; font-family: ui-monospace, Consolas, monospace; font-size: 18px; }
#loginForm legend { font-size: 13px !important; font-weight: 800 !important; color: #3f3848; margin-bottom: 8px !important; }
#catPick { gap: 6px; }
#catPick .jdiv { min-height: 50px; padding: 0 14px; border: 1px solid #ddd5e6 !important; border-radius: 10px; background: #fff !important; box-shadow: none !important; filter: none !important; }
#catPick .jdiv:hover { border-color: #b3a8bf !important; background: #fcfbfd !important; }
#catPick .jdiv input { position: absolute; opacity: 0; pointer-events: none; }
#catPick .jdiv-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--dc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc) 18%, transparent); }
#catPick .jdiv-name { flex: 1; color: #1f1a24 !important; font-size: 15.5px; font-weight: 600 !important; }
#catPick .jdiv-check { flex: none; width: 22px; height: 22px; border: 2px solid #cfc6da; border-radius: 50%; }
#catPick .jdiv:has(input:checked) { border-color: #3b0f4f !important; background: #f8f4fb !important; box-shadow: 0 0 0 1px #3b0f4f inset !important; }
#catPick .jdiv:has(input:checked) .jdiv-name { font-weight: 800 !important; }
#catPick .jdiv:has(input:checked) .jdiv-check { border-color: #3b0f4f; background: #3b0f4f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
#catPick .jdiv:has(input:focus-visible) { outline: 3px solid rgba(122, 63, 160, .35); outline-offset: 2px; }
#catPick.cat-locked .jdiv:not(:has(input:checked)) { opacity: .5; }
#loginForm > .btn-primary { height: 50px; margin-top: 4px; border-radius: 12px; font-size: 16px; font-weight: 800; }

.cat-wait { margin: 0; padding: 14px 16px; border: 1px dashed #d6cce2; border-radius: 10px; font-size: 14px; color: #6b6274; text-align: center; }
#catPick .jdiv[hidden] { display: none !important; }
.cat-lock-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; color: #6b6274; }
#catPick, #catWait { clear: both; }

/* ---- Schedule: header band, audience filter, a timeline per day */
.sx.sched-page { max-width: 1040px; }
.sx .sx-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 24px; margin: 10px 0 18px !important; padding: 26px 28px !important; border: 0 !important; border-radius: 20px; color: #fff; overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(520px 260px at 100% 0%, rgba(56, 189, 248, .26), transparent 60%),
    linear-gradient(140deg, #2a0b3b 0%, #3b0f4f 55%, #1e2a6b 100%); }
.sx-logo { display: inline-flex; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.sx-logo img { display: block; height: 58px; width: auto; }
.sx-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #a5e3fb; }
.sx .sx-hero h1 { margin: 0; font-size: 32px !important; font-weight: 900 !important; letter-spacing: -.02em; color: #fff !important; }
.sx-dates { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .82); }
.sx .sched-actions { align-self: start; display: flex; gap: 8px; }
.sx-btn { height: 38px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.sx-btn:hover { background: rgba(255, 255, 255, .16); }
.sx-btn-solid { border-color: #fff; background: #fff; color: #3b0f4f; }
.sx-btn-solid:hover { background: #f3eef8; }
.sx-now { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sx-now[hidden] { display: none; }
.sx-now-part { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); }
.sx-now-label { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }
.sx-now-part.is-now .sx-now-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .25); }
.sx-now-part b { font-size: 17px; font-weight: 800; color: #fff; }
.sx-now-part small { font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.sx-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.sx-filter:empty { display: none; }
.sx-filter-label { margin-right: 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b6274; }
.sx-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid #d6cce2; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 700; color: #3f3848; cursor: pointer; }
.sx-chip svg, .sx-aud svg, .sx-meta svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sx-chip:hover { border-color: #5b2178; }
.sx-chip.on { border-color: #3b0f4f; background: #3b0f4f; color: #fff; }
.sx-day { margin: 0 0 22px; padding: 22px 24px 10px; border: 1px solid #e4ddee; border-radius: 18px; background: #fff; }
.sx-day-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid #f1edf5; }
.sx-cal { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px; border-radius: 14px; background: #f6f2fa; border: 1px solid #e4ddee; overflow: hidden; }
.sx-cal small { width: 100%; padding: 2px 0; background: #3b0f4f; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-align: center; text-transform: uppercase; color: #fff; }
.sx-cal b { flex: 1; display: flex; align-items: center; font-size: 24px; font-weight: 900; color: #1f1a24; }
.sx-day.is-main .sx-cal small { background: #e7425f; }
.sx-kind { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8a5a9e; }
.sx-day-head h2 { margin: 2px 0 0; font-size: 21px; font-weight: 900; letter-spacing: -.01em; color: #1f1a24; }
.sx-day-head p { margin: 2px 0 0; font-size: 13.5px; color: #6b6274; }
.sx-line { margin: 0; padding: 0; list-style: none; }
.sx-slot { display: grid; grid-template-columns: 64px 26px minmax(0, 1fr); gap: 0 10px; }
.sx-when { padding-top: 12px; text-align: right; line-height: 1.1; }
.sx-when b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: #1f1a24; }
.sx-when small { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: #8a8194; }
.sx-rail { position: relative; display: flex; justify-content: center; }
.sx-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: #ebe5f1; }
.sx-slot:first-child .sx-rail::before { top: 18px; }
.sx-slot:last-child .sx-rail::before { bottom: auto; height: 18px; }
.sx-rail i { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 15px; border-radius: 50%; background: #fff; border: 3px solid #b9aec6; }
.sx-slot.is-now .sx-rail i { border-color: #16a34a; background: #16a34a; box-shadow: 0 0 0 5px rgba(22, 163, 74, .18); }
.sx-slot.is-next .sx-rail i { border-color: #3b0f4f; }
.sx-slot.is-past .sx-rail i { border-color: #ddd5e6; }
.sx-cards { display: grid; gap: 8px; padding: 6px 0 12px; }
.sx-card { padding: 12px 16px; border: 1px solid #ebe6f0; border-radius: 12px; background: #fff; transition: border-color .12s; }
.sx-card:hover { border-color: #d6cce2; }
.sx-card.is-now { border-color: #16a34a; background: #f6fbf7; box-shadow: 0 0 0 1px #16a34a inset; }
.sx-card.is-next { border-color: #cdbfe0; }
.sx-card.is-past { opacity: .6; }
.sx-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sx-card h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; color: #1f1a24; }
.sx-badge { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.sx-badge.now { background: #16a34a; color: #fff; }
.sx-badge.next { background: #efe7f6; color: #5b2178; }
.sx-note { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #5b5266; }
.sx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: #6b6274; }
.sx-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.sx-aud { padding: 2px 9px 2px 7px; border-radius: 999px; font-weight: 700; }
.a-all.sx-aud { background: #f1eff4; color: #4a4655; }
.a-staff.sx-aud { background: #efe7f6; color: #5b2178; }
.a-judges.sx-aud { background: #e3ecfb; color: #1f4e9c; }
.a-students.sx-aud { background: #e8f6ee; color: #146c3a; }
.a-families.sx-aud { background: #fff1e6; color: #9a4a00; }
.sx-none { margin: 0 0 14px; padding: 14px; font-size: 14px; color: #6b6274; text-align: center; }
@media (max-width: 700px) {
  .sx .sx-hero { grid-template-columns: 1fr; padding: 20px !important; }
  .sx-logo img { height: 44px; }
  .sx .sx-hero h1 { font-size: 26px !important; }
  .sx .sched-actions { align-self: auto; }
  .sx-day { padding: 16px 14px 6px; }
  .sx-slot { grid-template-columns: 50px 20px minmax(0, 1fr); gap: 0 6px; }
  .sx-when b { font-size: 15px; }
}
@media print {
  .sx .sx-hero { padding: 0 0 10pt !important; border-radius: 0; color: #000; background: none !important; border-bottom: 1.5pt solid #000 !important; }
  .sx .sx-hero h1, .sx-dates, .sx-eyebrow { color: #000 !important; }
  .sx-logo { box-shadow: none; padding: 0; }
  .sx-now, .sx-filter, .sx .sched-actions { display: none !important; }
  .sx-day { padding: 0; border: 0; break-inside: auto; }
  .sx-slot { break-inside: avoid; }
  .sx-card { padding: 6pt 8pt; opacity: 1 !important; box-shadow: none !important; background: #fff !important; }
  .sx-aud, .sx-cal small { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.sx .sx-hero .sx-dates { color: rgba(255, 255, 255, .85) !important; }
.sx .sx-hero #schedSub { color: rgba(255, 255, 255, .85) !important; }

/* ---- Projects: the header as a soft branded band with the STEM colours along its foot */
.reg .rg-head { position: relative; overflow: hidden; margin: 6px 0 16px !important; padding: 20px 24px 24px !important; border: 1px solid #e4ddee !important; border-radius: 16px !important;
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(122, 63, 160, .14), transparent 70%),
    radial-gradient(420px 160px at 100% 100%, rgba(0, 166, 207, .10), transparent 70%),
    linear-gradient(120deg, #f6f0fb 0%, #ffffff 55%, #f1f8fc 100%) !important;
  box-shadow: 0 1px 3px rgba(29, 19, 38, .05) !important; }
.reg .rg-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #e7425f 0 25%, #fd8204 25% 50%, #00a6cf 50% 75%, #00b287 75% 100%); }
.reg .rg-title h1 { font-size: 28px; font-weight: 900; letter-spacing: -.02em; color: #2a0b3b; }

/* ---- the All tile looks like the others: white, and a ring when it is the one selected */
.rg-tile.all, .rg-tile.all.on { background: #fff !important; color: var(--ink) !important; border-color: #c9c2d4; border-top-color: var(--brand) !important; --tile-done: var(--brand); }
.rg-tile.all.on { border-color: var(--brand) !important; box-shadow: 0 0 0 2px var(--brand) !important; }
.rg-tile.all .t-big small, .rg-tile.all .t-sub { color: var(--muted) !important; }
.rg-tile.all .t-bar { background: #ebe8f0 !important; }
.rg-tile.all .t-people { background: #f3f0f7 !important; border-color: #e4ddee !important; color: #4a4655 !important; }
.rg-tile.all .t-name { color: var(--ink) !important; }

/* ---- the project description card on hover (Projects list) */
.desc-tip { position: fixed; z-index: 1080; max-width: 380px; padding: 12px 14px 13px; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgba(29, 19, 38, .16), 0 2px 6px rgba(29, 19, 38, .06); pointer-events: none; animation: desc-in .12s ease-out; }
.desc-tip[hidden] { display: none; }
.desc-tip-label { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8a5a9e; }
.desc-tip p { margin: 0; font-size: 14px; line-height: 1.5; color: #2b2233; }
.desc-tip p.none { color: #8a8194; font-style: italic; }
@keyframes desc-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (hover: none) { .desc-tip { display: none !important; } }

/* school header band on the Projects list: a little deeper tint of the school colour */
.reg .pl-school { background: color-mix(in srgb, var(--school) 22%, #fff) !important; }

/* school names on the Projects tiles, a size larger */
.rg-tile .t-name { font-size: 16.5px !important; font-weight: 800; }
@media (max-width: 700px) { .rg-tile .t-name { font-size: 14.5px !important; } }

/* the notification badge beside the Projects title: squarer corners, a size larger */
.reg .rg-badge { height: auto !important; min-height: 44px; padding: 8px 20px 8px 16px !important; border-radius: 10px !important; font-size: 16.5px !important; gap: 10px; }
.reg .rg-badge.red::before { font-size: 19px; }
.reg .rg-badge i { width: 10px; height: 10px; }

/* phones: long division names wrap instead of being cut off */
@media (max-width: 700px) { .dv-name b { white-space: normal; overflow: visible; line-height: 1.25; } }
@media (max-width: 560px) { .st-hide-xs { display: none; } .st-person { min-width: 0; } .st-table tbody td, .st-table thead th { padding-left: 10px; padding-right: 10px; } }

/* ---- phones: Projects toolbar and tiles tidied */
@media (max-width: 700px) {
  .reg .status-filter { width: 100%; grid-template-columns: auto 1fr 1fr; box-sizing: border-box; }
  .reg .status-filter .status-pill { min-width: 0; justify-content: center; padding-left: 10px; padding-right: 10px; }
  .reg .need-filter { flex: 1; }
  .rg-tile .t-name { display: flex !important; align-items: center; white-space: nowrap; min-height: 0 !important; font-size: 14px !important; -webkit-line-clamp: unset; }
  .rg-tile .t-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rg-tile .t-people { margin-left: auto; padding: 0 6px; font-size: 11px; }
  .rg-tile .t-people svg { width: 12px; height: 12px; }
}
@media (max-width: 700px) { .rg-tile .t-name { flex-wrap: nowrap !important; gap: 6px; } .rg-tile .t-name > i { flex: none; } .rg-tile .t-people { flex: none; } }
@media (max-width: 700px) { .rg-tiles, .rg-tiles.view-shirts { grid-auto-columns: minmax(176px, 1fr) !important; } .rg-tiles.view-shirts { grid-auto-columns: minmax(120px, 1fr) !important; } }

/* ---- judge badges, two-sided printing: always US Letter with no page margins, so the mirrored backs land exactly
   behind their fronts (flip on the long edge); cut lines on the fronts only, so a printer's small shift on the back
   never shows as a second line */
@media print {
  @page cards { size: letter portrait; margin: 0; }
  #cardPrint .jb-sheet { width: 8.5in; height: 11in; overflow: hidden; break-inside: avoid; }
  #cardPrint .jb3-back, #cardPrint .jb-blank { border-color: transparent !important; }
  #cardPrint .jb-side { display: none; }
}

/* judge sign-in: clearer box edges */
#loginForm .field input { border: 1.5px solid #a99cb8; background: #fff; }
#loginForm .field input:focus { border-color: #5b2178; box-shadow: 0 0 0 3px rgba(91, 33, 120, .15); }

/* ---- judge sign-in: the master PIN dialog for changing a division */
.master-dlg { border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(29, 19, 38, .25); }
.master-dlg .modal-body { padding: 22px 22px 8px; }
.master-dlg h2 { margin: 0 0 4px; font-size: 19px; font-weight: 900; color: #1f1a24; }
.master-dlg p { margin: 0 0 14px; font-size: 14px; color: #6b6274; }
.master-dlg input { height: 50px; border: 1.5px solid #a99cb8; border-radius: 10px; font-size: 22px; letter-spacing: .35em; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.master-dlg .text-danger { margin-top: 8px !important; }
.master-dlg .modal-footer { padding: 12px 22px 18px; border-top: 0; gap: 8px; }
.master-dlg .modal-footer .btn { flex: 1; height: 44px; border-radius: 10px; font-weight: 800; }
#judgePin.pin-master { background: #f3fbf5; border-color: #16a34a; color: #146c3a; }

/* ---- rubric points: one row when the level box is wide enough; in a narrow box (an iPad held upright, four levels
   side by side) two rows of three, so every number stays a comfortable size to tap */
.criterion .level { container-type: inline-size; }
@container (max-width: 300px) {
  .criterion .pts { grid-auto-flow: row !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
  .criterion .pt { height: 48px !important; font-size: 18px !important; }
}

/* ---- judge view: the judge's name first in the bar */
.judge-me { display: inline-flex; align-items: center; gap: 9px; margin-right: 6px; padding-right: 14px; border-right: 1px solid #e4ddee; }
.judge-me:empty { display: none; }
.judge-me-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #3b0f4f; font-size: 13px; font-weight: 800; color: #fff; }
.judge-me-text { display: flex; flex-direction: column; line-height: 1.1; }
.judge-me-text small { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8a8194; }
.judge-me-text b { font-size: 15.5px; font-weight: 800; color: #1f1a24; }
/* the scored check on the map: a solid green disc with a white ring and tick, inside the table */
.scored-badge .scored-dot { fill: #12a150 !important; stroke: #fff !important; stroke-width: 2 !important; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.scored-badge .tick { fill: none; stroke: #fff !important; stroke-linecap: round; stroke-linejoin: round; }

/* ---- judge list: drag rows between divisions; a company column */
.jt-head, .jt-row { grid-template-columns: 18px minmax(0, 1.2fr) minmax(0, 1fr) 96px 62px !important; }
.jt-row { cursor: grab; }
.jt-row.dragging { opacity: .45; }
.jt-row:active { cursor: grabbing; }
.jt-grip { width: 8px; height: 16px; justify-self: center; background: radial-gradient(circle, #b3a8bf 1.3px, transparent 1.6px) 0 0 / 4px 5.3px; }
.jt-row:hover .jt-grip { background-image: radial-gradient(circle, #5b2178 1.3px, transparent 1.6px); }
.jt-company { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 14px; color: #3f3848; cursor: text; }
.jt-company::placeholder { color: #b3a8bf; }
.jt-row:hover .jt-company { border-color: #e4ddee; background: #fff; }
.jt-company:focus { outline: 0; border-color: #7a3fa0 !important; background: #fff; box-shadow: 0 0 0 3px rgba(122, 63, 160, .15); }
.jt-edit { justify-self: end; padding: 5px 12px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.jt-edit:hover { border-color: #5b2178; background: #f7f2fb; }
.jt-group.drop { outline: 2px dashed var(--dc); outline-offset: -2px; background: color-mix(in srgb, var(--dc) 7%, #fff); }
.jt-group.drop .jt-group-head { background: color-mix(in srgb, var(--dc) 14%, #fff); }
@media (max-width: 760px) {
  .jt-head { display: none !important; }
  .jt-row { grid-template-columns: 14px minmax(0, 1fr) auto auto !important; row-gap: 4px; }
  .jt-company { grid-column: 2 / -1; grid-row: 2; }
}
.jt-row { padding-left: 18px !important; }

/* ==== Awards show (projector) ==== */
body:has(.aw) { margin: 0; overflow: hidden; background: #1a0826; }
.aw { position: fixed; inset: 0; outline: 0; font-family: var(--font-sans); color: #fff; background: #1a0826; }
.aw-stage { position: absolute; inset: 0; cursor: pointer; }
.aw-slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; animation: aw-in .55s cubic-bezier(.2, .7, .2, 1); }
@keyframes aw-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.aw-stem { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: 1.1vh; }
.aw-stem i { flex: 1; } .aw-stem i:nth-child(1) { background: #e7425f; } .aw-stem i:nth-child(2) { background: #fd8204; } .aw-stem i:nth-child(3) { background: #00a6cf; } .aw-stem i:nth-child(4) { background: #00b287; }
.aw-top { position: absolute; top: 3.5vh; left: 4vw; right: 4vw; display: flex; align-items: center; justify-content: space-between; }
.aw-logo-sm { height: 6.5vh; width: auto; padding: .8vh 1.1vw; border-radius: 1.2vh; background: #fff; box-shadow: 0 .6vh 2vh rgba(0, 0, 0, .25); }

/* opening and closing */

.aw-open-in { max-width: 80vw; }

@keyframes aw-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
/* a division's title */

@keyframes aw-rise { from { opacity: 0; transform: translateY(4vh); } to { opacity: 1; transform: none; } }
/* one winner */

/* all three together */

/* confetti on 1st place and the close */
.aw-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.aw-confetti i { position: absolute; top: -4vh; width: 1vh; height: 1.8vh; border-radius: .2vh; opacity: .9; animation: aw-fall linear infinite; }
@keyframes aw-fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .aw-slide, .aw-slide * { animation: none !important; } .aw-confetti { display: none; } }
/* controls: fade away during the show */
.aw-bar { position: absolute; left: 50%; bottom: 2.4vh; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(10, 4, 16, .6); backdrop-filter: blur(6px); transition: opacity .4s; }
.aw-bar.quiet { opacity: 0; pointer-events: none; }
.aw-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 9px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer; }
.aw-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.aw-dots { display: flex; gap: 4px; }
.aw-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.aw-dots i.on { background: #fff; transform: scale(1.4); }
.aw-hint { font-size: 12.5px; color: rgba(255, 255, 255, .6); white-space: nowrap; }

/* the Present winners button beside Release */
.present-btn { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; background: linear-gradient(135deg, #e7425f, #fd8204); border: 0; color: #fff !important; font-weight: 800; }
.present-btn::before { content: '\25B6'; font-size: 11px; }
.present-btn:hover { filter: brightness(1.08); }
.present-btn[hidden] { display: none; }

/* awards: school and instructor on their own rows; winner and podium slides in the division's own colour, deepened */

/* awards winner slide, restructured: place and title as the headline, then three labelled columns */

/* awards winner slide, split layout: a medal on the left, the certificate text on the right */

/* awards: Frontier Schools at the top left, KC STEM Fest at the top right of every slide */
.aw-top { z-index: 2; }

/* awards: both logos on matching white tiles, the same height */
.aw-top .aw-logo-sm { height: 7.5vh; }

/* awards: the two corner logos in tiles of exactly the same size, each logo fitted inside without stretching */
.aw-top .aw-logo-sm { box-sizing: border-box; width: 24vh; height: 9vh; padding: 1vh 1.6vh; object-fit: contain; }

/* awards opening slide: the Frontier Schools logo under "Awards Ceremony" */

/* awards: the corner logos as one white band across the top (.logos-band); .logos-tiles keeps the separate tiles */
.aw.logos-band .aw-top { top: 0; left: 0; right: 0; height: 11vh; padding: 0 4vw; background: rgba(255, 255, 255, .97); box-shadow: 0 .6vh 2.4vh rgba(0, 0, 0, .25); }
.aw.logos-band .aw-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: .6vh;
  background: linear-gradient(90deg, #e7425f 0 25%, #fd8204 25% 50%, #00a6cf 50% 75%, #00b287 75% 100%); }
.aw.logos-band .aw-top .aw-logo-sm { width: 26vh; height: 8vh; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }

/* awards: logos in the bottom corners (.logos-bottom), small matching white tiles just above the STEM stripe */
.aw.logos-bottom .aw-top { top: auto; bottom: 3.4vh; }
.aw.logos-bottom .aw-top .aw-logo-sm { width: 21vh; height: 7.6vh; }

/* awards: both logos as one co-branded pill at the top centre (.logos-lockup) */
.aw.logos-lockup .aw-top { left: 50%; right: auto; top: 3.2vh; transform: translateX(-50%); gap: 0; padding: 1.2vh 1.4vw; border-radius: 999px; background: #fff; box-shadow: 0 1vh 3vh rgba(0, 0, 0, .3); }
.aw.logos-lockup .aw-top .aw-logo-sm { width: 19vh; height: 6.6vh; padding: 0 1.2vw; border-radius: 0; background: transparent; box-shadow: none; }
.aw.logos-lockup .aw-top .aw-logo-sm + .aw-logo-sm { border-left: .25vh solid #e4ddee; }

/* awards lockup, refined: roomier pill, equal halves, a short soft divider, a glow ring; it never animates */
.aw-sep { display: none; }
.aw.logos-lockup .aw-top { top: 3vh; padding: 1.4vh 2vw; gap: 2vw; animation: none !important;
  box-shadow: 0 0 0 .6vh rgba(255, 255, 255, .16), 0 1.2vh 3.6vh rgba(0, 0, 0, .32); }
.aw.logos-lockup .aw-top .aw-logo-sm { width: 21vh; height: 7.2vh; padding: 0; border: 0 !important; }
.aw.logos-lockup .aw-sep { display: block; flex: none; width: .25vh; height: 5vh; border-radius: 1vh; background: linear-gradient(#fff, #d6cce2 25%, #d6cce2 75%, #fff); }

/* awards first and last slides: the two-logo pill, large */
.aw-lockup-big { display: inline-flex; align-items: center; gap: 3vw; padding: 3vh 4vw; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1vh rgba(255, 255, 255, .16), 0 2.4vh 6vh rgba(0, 0, 0, .35); animation: aw-pop .8s .1s both cubic-bezier(.2, 1.4, .4, 1); }
.aw-lockup-big img { display: block; box-sizing: border-box; width: 38vh; height: 15vh; object-fit: contain; }
.aw-sep-big { flex: none; width: .4vh; height: 11vh; border-radius: 1vh; background: linear-gradient(#fff, #d6cce2 25%, #d6cce2 75%, #fff); }

/* the Dashboard's Export menu, styled like the Projects page one */
.dash-export .rg-icon-btn { width: auto; min-width: 36px; height: 36px; padding: 0 12px !important; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.dash-export .rg-caret { margin-left: -2px; opacity: .7; }

/* Dashboard scores: one bar on top of the table (which division is shown, Export at the right), joined to it */
.dash-scores-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; border: 1px solid #e4ddee; border-bottom: 0; border-radius: 14px 14px 0 0; background: #faf8fc; }
.dash-scores-bar p { font-size: 13.5px; font-weight: 600; color: #6b6274; }
.dash-scores-bar + .podium + .dash-panel, .dash-scores-bar + .dash-panel { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }

/* ---- Projects on an upright iPad (600-860px), redone so every piece has its place, two lines per project:
   line 1: #  · project title · students · table · Edit      line 2: · instructor · division · needs */
@media (min-width: 600px) and (max-width: 860px) {
  .reg .plist .pl-head { display: none !important; }
  .reg .plist .prow, .reg .plist.has-table .prow {
    grid-template-columns: 34px minmax(0, 1.5fr) minmax(0, 1.25fr) 74px auto !important;
    grid-template-areas: "no main stud table edit" "no inst kind need edit" !important;
    row-gap: 4px !important; column-gap: 14px !important; align-items: center !important;
    padding-top: 12px !important; padding-bottom: 12px !important; min-height: 0 !important; }
  .reg .plist .prow > .pr-no { grid-area: no !important; align-self: start !important; padding-top: 2px; }
  .reg .plist .prow > .pr-main { grid-area: main !important; min-width: 0; }
  .reg .plist .prow > .pr-main h3 { margin: 0; white-space: normal; font-size: 15.5px; line-height: 1.3; }
  .reg .plist .prow > .pr-inst { grid-area: inst !important; align-self: start; font-size: 13px; color: #6b6274; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .reg .plist .prow > .pc-students { grid-area: stud !important; align-self: center; }
  .reg .plist .prow > .pr-kind { grid-area: kind !important; align-self: start; min-width: 0; }
  .reg .plist .prow > .pr-needcol { grid-area: need !important; align-self: start; justify-self: center; display: flex; gap: 4px; }
  .reg .plist .prow > .pr-table-input, .reg .plist .prow > .pr-table { grid-area: table !important; justify-self: center !important; align-self: center; }
  .reg .plist .prow > :last-child { grid-area: edit !important; align-self: center !important; justify-self: end; }
}
/* upright iPad: the school tiles keep the name and student count on one line and "/ 126 goal" together */
@media (min-width: 701px) and (max-width: 1100px) {
  .rg-tiles, .rg-tiles.view-shirts { grid-auto-columns: minmax(180px, 1fr) !important; }
  .rg-tiles.view-shirts { grid-auto-columns: minmax(124px, 1fr) !important; }
  .rg-tile .t-name { display: flex !important; align-items: center; flex-wrap: nowrap !important; gap: 6px; white-space: nowrap; min-height: 0 !important; font-size: 15px !important; }
  .rg-tile .t-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .rg-tile .t-people { flex: none; margin-left: auto; padding: 0 6px; font-size: 11.5px; }
  .rg-tile .t-big { white-space: nowrap; }
}
@media (min-width: 701px) and (max-width: 1100px) { .rg-tiles { grid-auto-columns: minmax(200px, 1fr) !important; } .rg-tiles.view-shirts { grid-auto-columns: minmax(124px, 1fr) !important; } }

/* the project title in the list: only these words open the description card */
.reg .pr-main .pr-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .reg .plist .pr-main .pr-title-text { white-space: normal; } }

/* ---- Visit log: the numbers at the top, role colours, the device line */
.vl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.vl-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid #e4ddee; border-radius: 12px; background: #fff; }
.vl-stat b { font-size: 24px; font-weight: 800; line-height: 1.1; color: #1f1a24; }
.vl-stat span { font-size: 12.5px; font-weight: 600; color: #6b6274; }
.lg-pill.vl-organizer { background: #efe7f6; color: #5b2178; }
.lg-pill.vl-staff { background: #e3ecfb; color: #1f4e9c; }
.lg-pill.vl-judge { background: #e8f6ee; color: #146c3a; }
.vl-device { font-size: 13px; color: #6b6274; }
.lg-tools #visitReload { margin-left: auto; }
.lg-tools .vl-csv { margin-left: 0; }
@media (max-width: 800px) { .vl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lg-tools #visitReload { margin-left: 0; } }

/* ---- two instructors: one name per line in the list; "Add instructor" in the form */
.inst-line { display: block; }
.inst-line + .inst-line { margin-top: 2px; }
.pf-insts { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-inst2 { position: relative; }
.pf-inst2[hidden] { display: none; }
.pf-inst2 .form-control { padding-right: 36px; }
.pf-inst2-x { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; line-height: 1; color: #8a8194; cursor: pointer; }
.pf-inst2-x:hover { background: #fde8e7; color: #b42318; }
.pf-addinst { align-self: flex-start; padding: 2px 4px; border: 0; background: transparent; font-size: 13.5px; font-weight: 700; color: #5b2178; cursor: pointer; }
.pf-addinst[hidden] { display: none; }
.pf-addinst:hover { text-decoration: underline; }
.pf-row-4 { align-items: start; }

/* ---- a remove button inside each student name box (shown once the box has a name) */
.pf-stud-name { position: relative; display: block; min-width: 0; }
.pf-stud-name .form-control { width: 100%; padding-right: 38px; }
.pf-stud-x { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; font-size: 19px; line-height: 1; color: #8a8194; cursor: pointer; }
.pf-stud-x:hover { background: #fde8e7; color: #b42318; }
.pf-stud-name input:placeholder-shown + .pf-stud-x, .pf-stud-name input:disabled + .pf-stud-x { display: none; }

/* ---- the year menu in the top bar (organizers): a white pill like the name; amber when it is not the live year */
.year-menu { height: 34px; padding: 0 30px 0 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath fill=%27none%27 stroke=%27white%27 stroke-width=%272%27 d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E") no-repeat right 10px center / 12px; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; -webkit-appearance: none; appearance: none; }
.year-menu:hover { background-color: rgba(255,255,255,.2); }
.year-menu:focus-visible { outline: 2px solid #ffd54f; outline-offset: 2px; }
.year-menu option { color: #1f1a24; background: #fff; }
.year-menu.not-live { border-color: #ffd54f; background-color: #ffd54f; color: #3b2a00; background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath fill=%27none%27 stroke=%27%233b2a00%27 stroke-width=%272%27 d=%27M4 6l4 4 4-4%27/%3E%3C/svg%3E"); }
.year-menu[hidden] { display: none; }

/* ---- backup judges: the last group, grey, with a note; drag a backup onto a division when a judge does not come */
.jt-backup { border-top: 2px dashed #ddd5e6; }
.jt-backup .jt-group-head { background: #f7f5fa; }
.jt-backup-note { font-size: 12.5px; font-weight: 500; color: #6b6274; }
.jt-count.spare { background: #eeeaf3; color: #4a3d58; }
.jt-empty.spare { color: #6b6274; }
@media (max-width: 760px) { .jt-backup-note { display: none; } }

/* the backup judges: their own box, set apart from the division table */
.jt.jt-backup-box { margin-top: 28px; }
.jt.jt-backup-box[hidden] { display: none !important; }
.jt-backup-box .jt-backup { border-top: 0; }

/* ---- Tasks tab: the hero with counts, filters, then one card per task (tick, text, people, Edit) */
.tk-page { max-width: 1040px; }
.sx .tk-hero { grid-template-columns: minmax(0, 1fr) auto; }
.tk-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.tk-stat { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.tk-stat b { font-size: 22px; font-weight: 900; color: #fff; }
.tk-stat span { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .85); }
.tk-stat.me { background: #ffd54f; } .tk-stat.me b, .tk-stat.me span { color: #3b2a00; }
.tk-stat.late { background: #e7425f; }
.tk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.tk-tools .st-search { flex: 1 1 260px; }
.tk-tools .form-select { width: auto; min-width: 180px; height: 42px; border-color: #d6cce2; border-radius: 10px; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-list { display: flex; flex-direction: column; gap: 10px; }
.tk-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 260px) auto; gap: 14px; align-items: start; padding: 16px 18px; border: 1px solid #e4ddee; border-radius: 14px; background: #fff; }
.tk-card.mine { border-left: 4px solid #ffb300; }
.tk-card.late { border-color: #f3b4bf; }
.tk-card.done { background: #faf9fb; }
.tk-card.done h2 { color: #8a8194; text-decoration: line-through; text-decoration-color: #c9c1d2; }
.tk-tick { width: 30px; height: 30px; margin-top: 1px; border: 2px solid #b9aec6; border-radius: 9px; background: #fff; font-size: 17px; font-weight: 900; line-height: 1; color: #fff; cursor: pointer; }
.tk-tick:hover:not(:disabled) { border-color: #1a9850; }
.tk-tick.on { border-color: #1a9850; background: #1a9850; }
.tk-tick:disabled { cursor: default; opacity: .55; }
.tk-titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-main h2 { margin: 0; font-size: 17px; font-weight: 800; color: #1f1a24; }
.tk-tag { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.tk-tag.me { background: #fff3d6; color: #8a5a00; }
.tk-tag.late { background: #fde8e7; color: #b42318; }
.tk-notes { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #3f3848; white-space: pre-line; }
.tk-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; font-weight: 600; color: #6b6274; }
.tk-card.late .tk-when { color: #b42318; }
.tk-doneby { color: #1a7f45; }
.tk-people, .tk-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-person { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 999px; background: #f3eef8; font-size: 13px; font-weight: 700; color: #3b2a4f; }
.tk-person i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #5b2178; font-size: 10.5px; font-style: normal; font-weight: 800; color: #fff; }
.tk-nobody { font-size: 13px; color: #8a8194; font-style: italic; }
.tk-x { margin-left: 2px; border: 0; background: none; font-size: 16px; line-height: 1; color: #8a8194; cursor: pointer; }
.tk-x:hover { color: #b42318; }
.tk-chosen { margin-bottom: 8px; }
.tk-edit { padding: 5px 12px; border: 1px solid #d6cce2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.tk-edit:hover { border-color: #5b2178; background: #f7f2fb; }
.tk-empty { padding: 48px 18px; border: 1px dashed #d6cce2; border-radius: 14px; background: #fff; text-align: center; color: #6b6274; }
@media (max-width: 760px) {
  .tk-card { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .tk-people { grid-column: 2 / -1; grid-row: 2; }
}

/* ---- the top bar with the Tasks tab and the year menu: keep it on one row on laptops and iPads in landscape */
@media (min-width: 861px) and (max-width: 1200px) {
  .app-bar > .nav .nav-link { padding: 0 10px !important; }
  .year-menu { height: 32px; padding: 0 26px 0 10px; font-size: 13px; background-position: right 8px center; }
}
@media (min-width: 861px) and (max-width: 1000px) {
  .app-bar > .nav .nav-link { padding: 0 7px !important; font-size: 13.5px !important; }
  .app-bar > .nav { margin-right: 4px !important; }
}
@media (max-width: 860px) { .year-menu { height: 32px; font-size: 13px; } }
/* seven tabs plus the year menu: tabs as wide as their words, with spacing that shrinks with the screen */
@media (min-width: 861px) { .app-bar > .nav { grid-auto-columns: max-content !important; } }
@media (min-width: 1201px) and (max-width: 1500px) { .app-bar > .nav .nav-link { padding: 0 12px !important; font-size: 15.5px !important; } }
@media (min-width: 1001px) and (max-width: 1200px) { .app-bar > .nav .nav-link { padding: 0 8px !important; font-size: 14.5px !important; } }
@media (min-width: 861px) and (max-width: 960px) { .app-bar .navbar-brand { display: none !important; } }

/* Place by hand: Recent moves */
.pp-history {margin:10px 0 4px;border:1px solid var(--line,#e4e0ea);border-radius:10px;background:#fff}
.pp-history>summary {cursor:pointer;padding:8px 12px;font-weight:600;display:flex;align-items:center;gap:8px}
.pp-history>summary em {font-style:normal;font-size:12px;background:#f1eef6;border-radius:999px;padding:0 8px;color:#5b5368}
.pp-history ol {list-style:none;margin:0;padding:0 10px 8px;max-height:320px;overflow:auto}
.pp-history ol>li {border-top:1px solid #eee9f3;padding:8px 2px}
.pp-history ol>li.undone {opacity:.55}
.pp-h-top {display:flex;align-items:center;justify-content:space-between;gap:8px}
.pp-h-top .btn {padding:1px 10px;font-size:12px}
.pp-h-when {font-size:12px;color:#6b6274}
.pp-h-tag {font-size:11px;font-weight:600;color:#6b6274;background:#f1eef6;border-radius:6px;padding:1px 7px}
.pp-h-note {font-size:13px;margin:2px 0}
.pp-history ul {margin:0;padding-left:16px;font-size:12px;color:#4a4356}
.pp-history ul b {font-weight:600}
.pp-h-more {list-style:none;color:#6b6274}

/* ---- Tasks: view switch, run sheet, by person, print */
.tk-page { max-width: 1240px; }
.tk-modes { display: inline-flex; padding: 3px; border: 1px solid #d6cce2; border-radius: 10px; background: #fff; }
.tk-modes button { padding: 6px 12px; border: 0; border-radius: 7px; background: none; font-size: 13px; font-weight: 700; color: #5b5368; cursor: pointer; }
.tk-modes button:hover { color: #3b0f4f; }
.tk-modes button.on { background: #3b0f4f; color: #fff; }
.tk-print { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border: 1px solid #d6cce2; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 700; color: #3b0f4f; cursor: pointer; }
.tk-print svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.tk-print:hover { border-color: #5b2178; background: #f7f2fb; }

.tk-sheet { border: 1px solid #e4ddee; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(40, 20, 60, .04); }
.tk-row { display: grid; grid-template-columns: 44px 112px minmax(0, 1fr) 150px minmax(0, 240px) 168px; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid #f0ebf5; }
.tk-row:hover:not(.tk-thead) { background: #fcfaff; }
.tk-thead { padding-top: 10px; padding-bottom: 10px; border-top: 0; background: #faf8fc; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6274; }
.tk-day { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid #e4ddee; background: #f5f1f9; font-size: 13px; font-weight: 800; color: #3b0f4f; }
.tk-day em { font-style: normal; font-size: 12px; font-weight: 700; color: #6b6274; }
.tk-row .tk-tick { width: 26px; height: 26px; margin: 0; border-radius: 8px; font-size: 15px; }
.tk-c-time { display: flex; flex-direction: column; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tk-c-time b { font-size: 14px; font-weight: 800; color: #1f1a24; }
.tk-c-time span { font-size: 12px; font-weight: 600; color: #6b6274; }
.tk-any { font-size: 13px; color: #a39bab; }
.tk-c-task { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-c-task b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #1f1a24; }
.tk-c-task small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; color: #5b5368; }
.tk-c-task small.tk-doneby { color: #1a7f45; font-weight: 600; }
.tk-c-where { font-size: 13.5px; font-weight: 600; color: #3f3848; }
.tk-c-people { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.tk-person.sm { padding: 2px 9px 2px 2px; gap: 6px; font-size: 12.5px; }
.tk-person.sm i { width: 22px; height: 22px; font-size: 9.5px; }
.tk-c-edit { text-align: right; }
.tk-row.done .tk-c-task b { color: #8a8194; text-decoration: line-through; text-decoration-color: #c9c1d2; }
.tk-row.done .tk-c-time b, .tk-row.done .tk-c-where { color: #8a8194; }
.tk-row.mine { box-shadow: inset 3px 0 0 #ffb300; }
.tk-row.late .tk-c-time b { color: #b42318; }

.tk-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.tk-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tk-status.done { background: #e7f6ec; color: #1a7f45; }
.tk-status.late { background: #fde8e7; color: #b42318; }
.tk-status.now { background: #e6f0ff; color: #1d5bd6; }
.tk-status.soon { background: #f3eef8; color: #5b2178; }
.tk-status.todo { background: #f2f1f4; color: #6b6274; }

.tk-people-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; gap: 14px; }
.tk-pcard { border: 1px solid #e4ddee; border-radius: 14px; background: #fff; overflow: hidden; }
.tk-pcard.mine { border-color: #ffcf5c; }
.tk-pcard header { display: grid; grid-template-columns: 38px minmax(0, 1fr) 70px; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #f0ebf5; background: #faf8fc; }
.tk-pcard header i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #5b2178; font-size: 13px; font-style: normal; font-weight: 800; color: #fff; }
.tk-pcard header i.none { background: #cfc9da; }
.tk-pcard header b { display: block; font-size: 15px; font-weight: 800; color: #1f1a24; }
.tk-pcard header small { font-size: 12px; font-weight: 600; color: #6b6274; }
.tk-meter { height: 6px; border-radius: 99px; background: #ece6f2; overflow: hidden; }
.tk-meter span { display: block; height: 100%; border-radius: 99px; background: #1a9850; }
.tk-pcard ul { margin: 0; padding: 4px 0; list-style: none; }
.tk-pcard li { display: grid; grid-template-columns: 30px auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 14px; }
.tk-pcard li + li { border-top: 1px solid #f5f1f9; }
.tk-pcard li .tk-tick { width: 24px; height: 24px; margin: 0; border-radius: 7px; font-size: 14px; }
.tk-p-time { font-size: 12.5px; font-weight: 700; color: #3f3848; font-variant-numeric: tabular-nums; }
.tk-p-task { display: flex; flex-direction: column; min-width: 0; }
.tk-p-task b { font-size: 14px; font-weight: 700; color: #1f1a24; }
.tk-p-task small { font-size: 12px; color: #6b6274; }
.tk-pcard li.done .tk-p-task b { color: #8a8194; text-decoration: line-through; }

@media (max-width: 1100px) {
  .tk-row { grid-template-columns: 40px 96px minmax(0, 1fr) 130px 168px; }
  .tk-row .tk-c-people { grid-column: 3 / 5; }
  .tk-thead span:nth-child(5) { display: none; }
}
@media (max-width: 760px) {
  .tk-thead { display: none; }
  .tk-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
  .tk-row > .tk-c-tick { grid-row: 1 / span 4; align-self: start; }
  .tk-row > .tk-c-time { grid-column: 2; grid-row: 1; flex-direction: row; gap: 6px; }
  .tk-row > .tk-c-edit { grid-column: 3; grid-row: 1; }
  .tk-row > .tk-c-task, .tk-row > .tk-c-where, .tk-row > .tk-c-people { grid-column: 2 / 4; }
  .tk-row > .tk-c-where:has(.tk-any) { display: none; }
  .tk-people-view { grid-template-columns: 1fr; }
}

#tkPrint { display: none; }
@media print {
  @page tklist { size: portrait; margin: 12mm; }
  body.printing-tasks > *:not(#tkPrint) { display: none !important; }
  body.printing-tasks { background: #fff !important; }
  body.printing-tasks #tkPrint { display: block; page: tklist; color: #1f1a24; font-size: 9.5pt; }
  #tkPrint .print-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #3b0f4f; padding-bottom: 5px; }
  #tkPrint .tkp-sub { margin: 5px 0 8px; font-size: 8.5pt; color: #6b6274; }
  #tkPrint table { width: 100%; border-collapse: collapse; }
  #tkPrint th { padding: 5px 6px; border-bottom: 1.5px solid #3b0f4f; text-align: left; font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; color: #3b0f4f; }
  #tkPrint td { padding: 6px; border-bottom: 1px solid #ddd6e5; vertical-align: top; }
  #tkPrint tr { break-inside: avoid; }
  #tkPrint td div { margin-top: 2px; font-size: 8.5pt; color: #4a4356; white-space: pre-line; }
  #tkPrint .tkp-time { width: 22mm; white-space: nowrap; font-weight: 700; }
  #tkPrint .tkp-box { width: 12mm; text-align: center; }
  #tkPrint .tkp-box::before { content: ""; display: inline-block; width: 4mm; height: 4mm; margin-right: -4mm; border: 1.2px solid #3b0f4f; border-radius: 1mm; vertical-align: middle; }
}

.tk-acts { display: inline-flex; justify-content: flex-end; gap: 6px; }
.tk-dup { color: #5b5368; }

.jt-email { font-size: 12.5px; font-weight: 500; color: #6b6274; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jt-email:hover { color: #5b2178; text-decoration: underline; }

/* ---- scoring sheet on small tablets (about 8 inch) and phones: a level keeps no empty room for its point buttons;
   they appear under it once it is tapped, so the whole rubric is far shorter to scroll. Larger iPads keep the fixed tiles. */
@media (max-width: 760px), (max-height: 700px) {
  .criterion .pts { display: none !important; }
  .criterion .level.open .pts { display: grid !important; visibility: visible; }
  .criterion .levels { gap: 8px; }
  .criterion .level { padding: 10px 12px; }
  .criterion .level.open { padding: 9px 11px; }
  .criterion .level b { font-size: 17px; }
  .criterion .level span { font-size: 15px; line-height: 1.35; }
}
/* a short screen (a small tablet held sideways): the scoring sheet fills the screen and its header and footer are
   tighter, so more of the rubric shows at once */
@media (max-height: 700px) and (min-width: 768px) {
  .modal-dialog.modal-fullscreen-md-down:has(.sheet-head) { margin: 0 auto; height: 100%; max-height: 100%; }
  .modal-dialog.modal-fullscreen-md-down:has(.sheet-head) .modal-content { height: 100%; max-height: 100%; border-radius: 0; }
  .modal-header.sheet-head { padding: 8px 16px; }
  .modal-header.sheet-head h2 { font-size: 18px; }
  .sheet-head .meta { margin-top: 1px; font-size: 14px; }
  .sheet-head .cap { font-size: 11px; }
  .modal:has(.sheet-head) .modal-footer { padding-top: 6px; padding-bottom: 6px; }
}

/* ---- judge badges: stripes that survive cutting and two-sided printing
   front: the cut line is drawn on top of the badge (an outline, not a border), so the colour band and the STEM stripe
   run right up to it with no white hairline; back: a printer always shifts the second side a little, so the stripe there
   sits inside the badge as a rounded bar, well clear of the cut line, and lines up whatever the shift */
#cardPrint .jb3:not(.jb3-back) { border: 0 !important; outline: 1px dashed #b8b0c2; outline-offset: -.5px; }
#cardPrint .jb3-back .jb3-stem { margin: 0 .32in .24in; height: .09in; border-radius: .045in; overflow: hidden; }
#cardPrint .jb3-back .jb3-private { padding-bottom: .07in; }

/* navy-look pieces of the dashboard (theme-navy.css shows them); hidden in the classic look */
.dash-jump, .stem-signs { display: none; }

/* ---- dashboard judging board: each column scrolls on its own, so a long Waiting list does not stretch the page */
.jb-cards { max-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
.dj-actions { display: none; }
html.look-navy .dash-jump .dj-actions { display: flex; }

/* ---- demo judging: a gold band at the top */
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 16px 0; padding: 10px 16px; border: 1px solid #f0d58a; border-radius: 12px; background: #fff8e6; color: #6b4a00; font-size: 14px; }
.demo-banner b { padding: 2px 10px; border-radius: 999px; background: #ffb504; color: #3a2a00; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* judge sign-in: the practice run box */
.practice-pick { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1.5px dashed #f0b429; border-radius: 12px; background: #fffaf0; cursor: pointer; }
.practice-pick input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: #b07400; }
.practice-pick span { display: flex; flex-direction: column; line-height: 1.3; }
.practice-pick b { font-size: 15px; color: #6b4a00; }
.practice-pick small { font-size: 12.5px; color: #8a6a1f; }
.practice-pick:has(input:checked) { border-style: solid; background: #fff1cc; }

/* ---- score sheet: comments with the camera beside them, the photos underneath */
.comment-box { margin-top: 6px; }
.comment-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.comment-head label { font-weight: 700; font-size: 15px; color: var(--ink); }
.comment-head .photo-note { font-size: 13px; font-weight: 600; color: var(--muted); }
.comment-row { display: flex; align-items: stretch; gap: 10px; }
.comment-row textarea { flex: 1; min-width: 0; min-height: 64px; padding: 10px 12px; border: 1.5px solid #c9c2d4; border-radius: 12px; font-size: 16px; resize: vertical; }
.comment-row textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 15, 79, .12); }
.comment-row .photo-take { flex: none; align-self: stretch; width: 64px; height: auto; min-height: 64px; border-radius: 12px; border: 1.5px solid #c9c2d4; background: #fff; color: var(--brand); }
.comment-row .photo-take:hover:not(:disabled) { border-color: var(--brand); background: #f7f2fb; }
.comment-row .photo-take:disabled { opacity: .45; }
.comment-box .photo-strip { margin-top: 10px; }
html.look-navy .comment-row .photo-take { color: #001842; border-color: #cfd4dd; }
html.look-navy .comment-row textarea:focus { border-color: #001842; box-shadow: 0 0 0 3px rgba(0, 24, 66, .1); }

/* ---- staff Dashboard: the note shown until the winners are released */
.staff-note { display: flex; align-items: center; gap: 12px; margin: 10px 0 16px; padding: 12px 16px; border: 1px solid #f0d58a; border-radius: 12px; background: #fff8e6; color: #6b4a00; font-size: 14px; line-height: 1.4; }
.staff-note[hidden] { display: none; }
.staff-note-ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #ffb504; color: #3a2a00; box-shadow: 0 2px 6px rgba(176, 116, 0, .25); }
.staff-note-ico svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.staff-note b { color: #4a3300; margin-right: 4px; }

/* keep the page's own colours and backgrounds when it is printed, saved as a PDF or captured (some full-page capture
   tools render the page like a print, and browsers drop backgrounds there unless told not to) */
html, html * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* ---- printed maps: the power bolt key in the legend; the back page's heading the same size as the front page's */
.print-legend .pl-key.pl-power .pl-bolt { display: inline-grid; place-items: center; width: 4mm; height: 4mm; border-radius: 50%; background: #ffd54f; border: 1px solid #a87400; font-size: 6pt; font-style: normal; line-height: 1; }
#mapPrint .power-badge circle { fill: #ffd54f; stroke: #a87400; stroke-width: 1.5; }
#mapPrint .power-badge path { fill: #6b4700; }
#mapPrint .print-list .ph-logo img { height: 11mm; }
#mapPrint .print-list .print-head h1 { font-size: 18pt; }

/* ---- printed project list: tables, easels, posters, areas; division dot and power bolt by the number */
#mapPrint .pl-flow col.c-t { width: 15mm; }
#mapPrint .pl-flow td.pt .pt-in { display: inline-flex; align-items: center; gap: 1.2mm; white-space: nowrap; }
#mapPrint .pt-dot { flex: none; width: 2.4mm; height: 2.4mm; border-radius: 50%; }
#mapPrint .pt-bolt { display: inline-grid; place-items: center; width: 3.4mm; height: 3.4mm; border-radius: 50%; background: #ffd54f; border: .6pt solid #a87400; font-size: 5.5pt; font-weight: 400; line-height: 1; }
#mapPrint .pl-keyline { display: flex; flex-wrap: wrap; gap: 1mm 4mm; font-size: 7.5pt; font-weight: 700; color: #3f3848; }
#mapPrint .pl-keyline span { display: inline-flex; align-items: center; gap: 1.2mm; }
#mapPrint .pl-keyline i { width: 2.4mm; height: 2.4mm; border-radius: 50%; }
#mapPrint .pl-flow .pl-areas col.c-t { width: 30mm; }
#mapPrint .pl-flow .pl-areas td.pt .pt-in { white-space: normal; }
#mapPrint .pt-dot { display: inline-grid; place-items: center; width: 3.6mm !important; height: 3.6mm !important; border-radius: 50%; }
#mapPrint .pt-dot svg { width: 2.6mm; height: 2.6mm; }
#mapPrint .pt-dot svg path { fill: #fff; stroke: #1f1a24; stroke-width: 1.8; stroke-linejoin: round; paint-order: stroke; }
/* the dot grows and shrinks with the list's text size, so it never makes a row taller than its text */
#mapPrint .pt-dot { width: calc(var(--fs) * 1.35) !important; height: calc(var(--fs) * 1.35) !important; }
#mapPrint .pt-dot svg { width: 74%; height: 74%; }
#mapPrint .pl-flow col.c-t { width: 12mm; }
#mapPrint .pl-flow td.pt .pt-in { gap: .9mm; }
#mapPrint .pl-flow .pl-areas col.c-t { width: 20mm; }
#mapPrint .pl-flow .pl-areas col.c-p { width: 44%; }

/* the back page flows like an ordinary page when printed: the colour key, then the list; if it is ever a little too
   long, only the last rows move on, never the whole list */
@media print {
  #mapPrint .print-list { display: block !important; min-height: 0 !important; height: auto !important; }
  #mapPrint .print-list .pl-keyline { margin-bottom: 2.5mm; }
}

/* ==========================================================================================================
   Settings > Print (wwwroot/js/print-center.js)
   ========================================================================================================== */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pc-tile { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pc-tile:first-child { grid-row: span 2; }
.pc-tile header { display: flex; align-items: flex-start; gap: 12px; }
.pc-tile header b { display: block; font-size: 15px; color: var(--ink); }
.pc-tile header small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.pc-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #e8ecf5; color: #001842; }
.pc-ico svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.pc-fields.one { grid-template-columns: 1fr; }
.pc-fields .pc-field:nth-child(1), .pc-fields .pc-field:nth-child(2) { grid-column: 1 / -1; }
.pc-fields.one .pc-field { grid-column: auto; }
.pc-field { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.pc-field > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pc-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.pc-go small, .pc-count { font-size: 12.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 700px) { .pc-tile:first-child { grid-row: auto; } }

/* the preview: like the badge preview */
#pcOut { position: fixed; inset: 0; z-index: 2000; overflow: auto; background: #3d3644; }
body.pc-previewing { overflow: hidden; }
#pcOut .pc-pages { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 16px 40px; }
.pc-page { position: relative; box-sizing: border-box; width: 8.5in; height: 11in; overflow: hidden; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  font-family: var(--font-sans); color: #1f1a24; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pc-list { height: auto; min-height: 11in; padding: 12mm 14mm; overflow: visible; }

/* ---- certificate, classic */
.pc-cert { text-align: center; }

.pc-classic h1 { position: relative; margin: .1in 0 0; font-family: var(--serif); font-size: 46pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #222; }
.pc-classic h2 { position: relative; margin: .02in 0 .3in; font-family: var(--serif); font-size: 15pt; font-weight: 400; letter-spacing: .3em; text-transform: uppercase; color: #222; }

/* ---- lists (T-shirts, check-in) */
.pc-lhead { display: flex; align-items: center; gap: 5mm; padding-bottom: 3mm; margin-bottom: 4mm; border-bottom: 2px solid #001842; }
.pc-lhead .ph-logo { display: inline-flex; align-items: center; gap: 2mm; padding-right: 5mm; border-right: 1px solid #cfd4dd; }
.pc-lhead .ph-logo img { height: 11mm; width: auto; }
.pc-lhead .ph-words { display: flex; flex-direction: column; line-height: 1; }
.pc-lhead .ph-words b { font-size: 11pt; font-weight: 800; letter-spacing: .06em; }
.pc-lhead .ph-words span { font-size: 11pt; font-weight: 800; letter-spacing: .06em; color: #b8862b; }
.pc-lhead h1 { margin: 0; font-size: 18pt; font-weight: 800; color: #001842; }
.pc-lhead small { font-size: 9pt; color: #5d6679; }
.pc-sizes { display: flex; flex-wrap: wrap; gap: 2mm; margin-bottom: 4mm; }
.pc-sizes span { display: inline-flex; align-items: center; gap: 1.5mm; padding: 1mm 3mm; border: 1px solid #d3d9e3; border-radius: 999px; font-size: 9pt; }
.pc-sizes b { color: #001842; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.pc-table th { padding: 1.6mm 2mm; border-bottom: 1.5px solid #001842; text-align: left; font-size: 8pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #001842; }
.pc-table td { padding: 1.6mm 2mm; border-bottom: 1px solid #e2e5eb; vertical-align: top; }
.pc-table tr { break-inside: avoid; }
.pc-table thead { display: table-header-group; }
.pc-totals td:not(:first-child), .pc-totals th:not(:first-child) { text-align: center; }
.pc-totals tfoot td { border-top: 1.5px solid #001842; font-weight: 800; }
.pc-box { width: 6mm; }
.pc-box::before { content: ''; display: inline-block; width: 3.6mm; height: 3.6mm; border: 1px solid #001842; border-radius: .8mm; vertical-align: middle; }
.pc-dot { display: inline-block; width: 2.6mm; height: 2.6mm; margin-right: 1.6mm; border-radius: 50%; vertical-align: middle; }

/* ---- printing: only the pages, at full size */
@media print {
  @page pccert { size: letter portrait; margin: 0; }
  @page pclist { size: letter portrait; margin: 0; }
  body.pc-printing > *:not(#pcOut) { display: none !important; }
  body.pc-printing { overflow: visible !important; background: #fff !important; }
  body.pc-printing #pcOut { position: static; overflow: visible; background: #fff; }
  body.pc-printing #pcOut .jb-toolbar { display: none !important; }
  body.pc-printing #pcOut .pc-pages { display: block; padding: 0; zoom: 1 !important; }
  body.pc-printing .pc-page { box-shadow: none; margin: 0; break-after: page; }
  body.pc-printing .pc-page:last-child { break-after: auto; }
  body.pc-printing .pccert .pc-page { page: pccert; }
  body.pc-printing .pclist .pc-page { page: pclist; min-height: 0; }
}

/* ---- the top 3: one student per line, and on a wide screen a podium: 2nd, 1st (in the middle, highest), 3rd */
.pod-names > span { display: flex !important; flex-direction: column; -webkit-line-clamp: unset !important; overflow: visible !important; min-height: calc(2 * 1.35em); }
.pod-name { display: block; }
@media (min-width: 761px) {
  .win-podium { align-items: start !important; }
  .win-podium .pod-2 { order: 1 !important; margin-top: 26px; }
  .win-podium .pod-1 { order: 2 !important; margin-top: 0; box-shadow: 0 14px 32px rgba(214, 160, 0, .22); }
  .win-podium .pod-3 { order: 3 !important; margin-top: 46px; }
  .win-podium.n2 .pod-2 { order: 1 !important; } .win-podium.n2 .pod-1 { order: 2 !important; }
}

/* certificates keep their own type, whatever the site's look */
.pc-certscope .pc-classic h1 { color: #222; font-family: var(--serif); font-size: 46pt; font-weight: 700; letter-spacing: .06em; }
.pc-certscope .pc-classic h2 { color: #222; font-family: var(--serif); font-size: 15pt; font-weight: 400; letter-spacing: .3em; }

#pcOut .pc-table th, #pcOut .pc-table td { background: #fff !important; box-shadow: none !important; }

.pc-btns { display: inline-flex; gap: 6px; }
.pc-compare { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pc-compare-label { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; color: #fff; }

/* ---- certificate, professional: border band and inner rules (SVG), then three fixed parts: logos, words, and the
   signature | seal | date row at the bottom. Serif lettering throughout; the division colour is only an accent. */

/* ---- certificates: Laurel, Modern award, Executive (landscape) */
.pc-cert .pc-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-exec { --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', serif; color: #1c2333; }
.pc-exec .pc-pro-line { display: flex; flex-direction: column; align-items: center; padding-bottom: .1in; }
.pc-exec .pc-pro-sig, .pc-exec .pc-pro-date {
  display: block; width: 100%; min-height: .4in; border-bottom: .75pt solid #1c2333; line-height: .48in; white-space: nowrap; text-align: center; }
.pc-exec .pc-pro-sig { font-family: 'Snell Roundhand', 'Segoe Script', 'Brush Script MT', 'Lucida Handwriting', cursive; font-size: 16pt; }
.pc-exec .pc-pro-date { font-family: var(--serif); font-size: 11.5pt; }
.pc-exec .pc-pro-line b { margin-top: .06in; font-family: var(--serif); font-size: 9.5pt; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #4a5266; }

/* Laurel */

/* Modern award */

/* Executive (landscape) */
.pc-page.pc-landscape { width: 11in; height: 8.5in; }
.pc-exec { text-align: center; }
.pc-exec .pc-exec-in { position: absolute; inset: .78in .95in .7in; display: flex; flex-direction: column; }
.pc-exec .pc-exec-top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-bottom: .12in; border-bottom: .75pt solid #d9c69a; }
.pc-exec .pc-exec-top > :last-child { justify-self: end; }
.pc-exec .pc-pro-fs { justify-self: start; display: inline-flex; align-items: center; gap: .07in; }
.pc-exec .pc-pro-fs img { height: .42in; width: auto; }
.pc-exec .pc-pro-fs > span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.pc-exec .pc-pro-fs b { font-family: var(--font-sans); font-size: 11pt; font-weight: 800; letter-spacing: .08em; color: #0b1f45; }
.pc-exec .pc-pro-fs small { font-family: var(--font-sans); font-size: 11pt; font-weight: 800; letter-spacing: .08em; color: #9c7322; }   /* same size as FRONTIER */
.pc-exec .pc-pro-logo { height: .5in; width: auto; }
.pc-exec .pc-exec-kicker { margin: 0; font-family: var(--serif); font-size: 10.5pt; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--dc); }
.pc-exec.part .pc-exec-kicker { color: #9c7322; }
.pc-exec .pc-exec-mid { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pc-certscope .pc-exec h1 { margin: 0 0 .2in; font-family: var(--serif); font-size: 34pt; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: #0b1f45; }
.pc-exec .pc-pro-lead { margin: 0; font-family: var(--serif); font-size: 12.5pt; font-style: italic; color: #4a5266; }
.pc-exec .pc-exec-name { max-width: 7.5in; margin: .06in 0 .16in; padding: 0 .4in .06in; border-bottom: .75pt solid #b8923e; font-family: 'Snell Roundhand', 'Segoe Script', 'Brush Script MT', 'Lucida Handwriting', cursive; line-height: 1.25; color: #0b1f45; }
.pc-exec .pc-exec-body { max-width: 7.2in; margin: 0; font-family: var(--serif); font-size: 12.5pt; line-height: 1.6; color: #2c3446; }
.pc-exec .pc-exec-body b, .pc-exec .pc-exec-body em { color: #0b1f45; }
.pc-exec .pc-exec-foot { flex: none; display: grid; grid-template-columns: 1fr 1.6in 1fr; align-items: end; gap: .5in; padding: 0 .3in; }
.pc-exec .pc-pro-sealbox svg { display: block; width: 1.6in; height: auto; }
@media print {
  @page pccertL { size: letter landscape; margin: 0; }
  body.pc-printing .pc-page.pc-landscape { page: pccertL; }
}
/* tuning: Executive title on one line; Modern award larger and more evenly spaced */
.pc-certscope .pc-exec h1 { font-size: 30pt; letter-spacing: .1em; white-space: nowrap; }

/* ---- the preview of a paper-only printout (floor maps): pages on a dark backdrop, a bar with Close and Print */
#mapPrint.pv { position: fixed; inset: 0; z-index: 2000; display: block !important; overflow: auto; padding: 70px 16px 40px; background: #3d3644 !important; }
#mapPrint.pv .pv-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: #1f1a24; color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
#mapPrint.pv .pv-bar > div:first-child { display: flex; flex-direction: column; }
#mapPrint.pv .pv-bar b { font-size: 16px; } #mapPrint.pv .pv-bar span { font-size: 13px; color: rgba(255, 255, 255, .7); }
#mapPrint.pv .pv-actions { display: flex; gap: 8px; } #mapPrint.pv .pv-actions .btn { min-width: 84px; font-weight: 700; }
#mapPrint.pv .print-page { box-sizing: border-box; margin: 0 auto 24px; padding: 10mm; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
#mapPrint.pv .print-map-page { width: 279.4mm; height: 215.9mm; }
#mapPrint.pv .print-list { width: 215.9mm; min-height: 279.4mm; }
@media print { #mapPrint .pv-bar { display: none !important; } #mapPrint.pv { position: static; overflow: visible; padding: 0; background: #fff !important; } #mapPrint.pv .print-page { margin: 0; box-shadow: none; } }

/* ---- Settings > Print as a list: a row per printout; a click opens its choices, then the preview */
.pc-list-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.pc-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 0; border-top: 1px solid #eceef2; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pc-row:first-child { border-top: 0; }
.pc-row:hover { background: #f7f8fb; }
.pc-row:focus-visible { outline: 3px solid rgba(0, 24, 66, .25); outline-offset: -3px; }
.pc-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-row-text b { font-size: 14.5px; color: var(--ink); }
.pc-row-text small { font-size: 12.5px; color: var(--muted); }
.pc-row-status { flex: none; padding: 3px 10px; border-radius: 999px; background: #eef1f6; font-size: 12px; font-weight: 600; color: #3f4a61; white-space: nowrap; }
.pc-row-chev { flex: none; font-size: 20px; color: #9aa3b5; }
.pc-modal .modal-header { gap: 12px; align-items: flex-start; }
.pc-modal .modal-header small { display: block; font-size: 12.5px; color: var(--muted); }
.pc-modal .pc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.pc-modal .pc-fields .pc-field { grid-column: auto; }
.pc-modal .pc-fields .pc-field.wide, .pc-modal .pc-check.wide { grid-column: 1 / -1; }
.pc-modal .pc-check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.pc-modal .modal-footer .pc-count { font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { .pc-row-status { display: none; } .pc-modal .pc-fields { grid-template-columns: 1fr; } }

/* ---- Print windows: white, grouped settings, and (certificates) a live sample on the right */
.pc-modal { border: 0; border-radius: 18px; background: #fff !important; box-shadow: 0 24px 70px rgba(0, 24, 66, .28); overflow: hidden; }
.pc-modal .modal-header { align-items: center; gap: 14px; padding: 20px 24px; border-bottom: 1px solid #eceef2; background: #fff; }
.pc-modal .modal-header .pc-ico { width: 44px; height: 44px; border-radius: 12px; background: #001842; color: #fff; }
.pc-modal .pc-modal-title { flex: 1; min-width: 0; }
.pc-modal .pc-modal-title h2 { margin: 0; font-size: 19px; font-weight: 700; color: #001842; }
.pc-modal .pc-modal-title small { display: block; margin-top: 2px; font-size: 13px; color: #5d6679; }
.pc-modal .modal-body { padding: 0; background: #fff; }
.pc-modal-grid { display: grid; grid-template-columns: 1fr; }
.pc-modal.with-side .pc-modal-grid { grid-template-columns: minmax(0, 1fr) 330px; }
.pc-form { display: flex; flex-direction: column; gap: 20px; padding: 22px 24px 24px; }
.pc-group h3 { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5d6679; }
.pc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc-two + .pc-two { margin-top: 12px; }
.pc-modal .pc-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.pc-modal .pc-field > span { font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #3f4a61; }
.pc-modal .form-control, .pc-modal .form-select { height: 42px; border-color: #d3d9e3; border-radius: 10px; font-size: 14.5px; color: #001842; }
.pc-modal .form-control:focus, .pc-modal .form-select:focus { border-color: #001842; box-shadow: 0 0 0 3px rgba(0, 24, 66, .1); }
/* the certificate type as a two-way switch */
.pc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: #eef1f6; }
.pc-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.pc-seg button b { font-size: 14px; color: #3f4a61; } .pc-seg button small { font-size: 12px; color: #5d6679; }
.pc-seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0, 24, 66, .12), 0 0 0 1.5px #001842; }
.pc-seg button.on b { color: #001842; }
/* the designs as cards */
.pc-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pc-design { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #e2e5eb; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.pc-design:hover { border-color: #b8c0cf; }
.pc-design.on { border-color: #001842; background: #f6f8fc; box-shadow: 0 0 0 1px #001842; }
.pc-design b { display: block; font-size: 13.5px; color: #001842; } .pc-design small { display: block; font-size: 11.5px; color: #5d6679; }
.pc-design-dot { flex: none; width: 26px; height: 34px; border-radius: 4px; border: 1px solid #d3d9e3; }
.pc-design-dot.d-pro { background: linear-gradient(#fff, #fff) padding-box, #0b1f45; border: 4px solid #0b1f45; box-shadow: inset 0 0 0 1px #d4af5a; }
.pc-design-dot.d-exec { width: 34px; height: 26px; background: #fffdf6; border: 4px solid #0b1f45; box-shadow: inset 0 0 0 1px #d4af5a; }
.pc-design-dot.d-laurel { background: #fffdf6; border: 1.5px solid #b8923e; box-shadow: inset 0 0 0 2px #fffdf6, inset 0 0 0 3px #b8923e; }
.pc-design-dot.d-modern { background: linear-gradient(90deg, #0b1f45 0 34%, #fff 34%); }
.pc-design-dot.d-classic { background: linear-gradient(135deg, #3b0f4f 0 18%, #e2b648 18% 24%, #fff 24% 76%, #e2b648 76% 82%, #c2185b 82%); }
/* the live sample */
.pc-side { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-left: 1px solid #eceef2; background: #f6f7fa; }
.pc-side h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #5d6679; }
.pc-mini { position: relative; width: 100%; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(0, 24, 66, .18); }
.pc-mini > .pc-page { position: absolute; left: 0; top: 0; box-shadow: none; }
.pc-mini-empty { padding: 40px 16px; margin: 0; text-align: center; font-size: 13px; color: #5d6679; }
.pc-check { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14.5px; color: #001842; }
.pc-check input { width: 20px; height: 20px; margin: 0; }
.pc-help { margin: 0; font-size: 13.5px; line-height: 1.55; color: #3f4a61; }
.pc-modal .modal-footer { gap: 10px; padding: 16px 24px; border-top: 1px solid #eceef2; background: #fff; }
.pc-count-pill { padding: 5px 12px; border-radius: 999px; background: #eef1f6; font-size: 13px; font-weight: 600; color: #001842; }
.pc-count-pill:empty { display: none; }
.pc-modal .modal-footer .btn { height: 42px; padding: 0 20px; border-radius: 10px; font-weight: 600; }
.pc-modal .pc-go-btn { background: #001842; border-color: #001842; }
@media (max-width: 991px) { .pc-modal.with-side .pc-modal-grid { grid-template-columns: 1fr; } .pc-side { border-left: 0; border-top: 1px solid #eceef2; } }
@media (max-width: 520px) { .pc-two { grid-template-columns: 1fr; } }

/* ---- the award family of certificates (Gold wave, Gold wave portrait, Gold corners, Sapphire) */
.pc-aw { --serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif; --script: 'Brush Script MT', 'Segoe Script', 'Snell Roundhand', cursive; color: #1c2333; text-align: center; }
.pc-aw .pc-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-aw .pc-aw-in { position: absolute; inset: .62in .95in 1.55in; display: flex; flex-direction: column; }
.pc-aw .pc-aw-top { display: flex; align-items: center; justify-content: space-between; height: .5in; }
.pc-aw .pc-aw-fs { display: inline-flex; align-items: center; gap: .07in; }
.pc-aw .pc-aw-fs img { height: .4in; width: auto; }
.pc-aw .pc-aw-fs > span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.pc-aw .pc-aw-fs b { font-family: var(--font-sans); font-size: 10.5pt; font-weight: 800; letter-spacing: .08em; color: #0b1f45; }
.pc-aw .pc-aw-fs small { font-family: var(--font-sans); font-size: 10.5pt; font-weight: 800; letter-spacing: .08em; color: #9c7322; }   /* same size as FRONTIER */
.pc-aw .pc-aw-logo { height: .5in; width: auto; }
.pc-aw .pc-aw-mid { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pc-certscope .pc-aw h1 { margin: 0; font-family: var(--font-sans); font-size: 50pt; font-weight: 800; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: #141a2b; }
.pc-aw .pc-aw-sub { margin: .06in 0 0; font-family: var(--font-sans); font-size: 13pt; font-weight: 700; letter-spacing: .36em; text-transform: uppercase; color: #b8892c; }
.pc-aw .pc-aw-lead { margin: .2in 0 0; font-family: var(--font-sans); font-size: 10pt; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #3f4a61; }
.pc-aw .pc-aw-name { max-width: 100%; min-width: 5.4in; margin: .02in 0 0; padding: 0 .3in .02in; border-bottom: 1pt solid #3f4a61; font-family: var(--script); font-weight: 400; line-height: 1.25; color: #b8892c; overflow-wrap: anywhere; }
.pc-aw .pc-aw-line { margin: .14in 0 0; font-family: var(--font-sans); font-size: 11.5pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0b1f45; }
.pc-aw .pc-aw-body { max-width: 6in; margin: .06in 0 0; font-family: var(--font-sans); font-size: 10.5pt; line-height: 1.5; color: #3f4a61; }
.pc-aw .pc-aw-project em { font-style: italic; color: #1c2333; }
.pc-aw .pc-aw-foot { display: grid; grid-template-columns: 2.4in 1fr 2.4in; align-items: end; gap: .2in; }
.pc-aw .pc-aw-sign { display: flex; flex-direction: column; align-items: center; }
.pc-aw .pc-aw-sig, .pc-aw .pc-aw-date { display: block; width: 100%; min-height: .42in; border-bottom: .9pt solid #3f4a61; line-height: .5in; white-space: nowrap; overflow: hidden; }
.pc-aw .pc-aw-sig { font-family: var(--script); font-size: 20pt; color: #1c2333; }
.pc-aw .pc-aw-date { font-family: var(--font-sans); font-size: 11pt; color: #1c2333; }
.pc-aw .pc-aw-sign b { margin-top: .06in; font-family: var(--font-sans); font-size: 8.5pt; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #3f4a61; }
.pc-aw .pc-aw-medal { justify-self: center; line-height: 0; }
.pc-aw .pc-aw-medal svg { width: 1.45in; height: 1.45in; }
.pc-aw .pc-aw-foot .pc-aw-medal { margin-bottom: -.7in; }
.pc-aw .pc-aw-foot .pc-aw-medal svg { width: 1.8in; height: 1.8in; }
.pc-aw .pc-aw-mid .pc-aw-medal { margin: .1in 0 -.08in; }
.pc-aw .pc-aw-mid .pc-aw-medal svg { width: 1.3in; height: 1.3in; }
/* portrait layouts */

/* Gold corners: room for the side shapes */
.pc-aw.pc-corners .pc-aw-in { inset: .62in 1.55in .78in; }
.pc-aw.pc-corners .pc-aw-mid .pc-aw-medal svg { width: 1.35in; height: 1.35in; }
/* Sapphire: serif title, navy, a little smaller */

.pc-design-dot.d-wave { width: 34px; height: 26px; background: linear-gradient(160deg, #fff 0 62%, #d4af5a 62% 70%, #0b1f45 70%); }
.pc-design-dot.d-waveP { background: linear-gradient(170deg, #fff 0 64%, #d4af5a 64% 72%, #0b1f45 72%); }
.pc-design-dot.d-corners { width: 34px; height: 26px; background: linear-gradient(60deg, #0b1f45 0 14%, #d4af5a 14% 19%, #fff 19% 81%, #d4af5a 81% 86%, #0b1f45 86%); }
.pc-design-dot.d-sapphire { background: linear-gradient(#fff 0 70%, #d4af5a 70% 76%, #1d4f8c 76%); border: 1.5px solid #d4af5a; }

/* ---- the top 3 as a podium: each card stands on its step, 2nd | 1st (tallest) | 3rd, the steps joined into one stand */
.win-podium { align-items: end !important; gap: 0 !important; min-height: 0; }
.pod-col { display: flex; flex-direction: column; min-width: 0; }
.win-podium .pod-col .pod { margin: 0 10px 12px !important; }
.pod-col-2 { order: 1; } .pod-col-1 { order: 2; } .pod-col-3 { order: 3; }
.pod-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 12px; color: #fff;
  background: linear-gradient(180deg, var(--st1), var(--st2)); box-shadow: inset 0 4px 0 var(--st0), inset 0 -10px 18px rgba(0, 0, 0, .12); }
.pod-step b { font-size: 42px; font-weight: 900; line-height: 1; text-shadow: 0 2px 3px rgba(0, 0, 0, .22); font-variant-numeric: tabular-nums; }
.pod-step span { margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .92; }
.pod-col-1 .pod-step { --st0: #f8dc7c; --st1: #e4b432; --st2: #b8860b; height: 132px; border-radius: 12px 12px 0 0; z-index: 1; box-shadow: inset 0 4px 0 var(--st0), inset 0 -10px 18px rgba(0, 0, 0, .12), 0 -6px 18px rgba(214, 160, 0, .25); }
.pod-col-1 .pod-step b { font-size: 54px; }
.pod-col-2 .pod-step { --st0: #e6eaf0; --st1: #b9c2ce; --st2: #8794a5; height: 96px; border-radius: 12px 0 0 0; }
.pod-col-3 .pod-step { --st0: #efc4a2; --st1: #c98652; --st2: #9c5a2c; height: 70px; border-radius: 0 12px 0 0; }
.pod-col-3 .pod-step b { font-size: 34px; }
.win-podium.n1 .pod-col-1 .pod-step, .win-podium.n2 .pod-col-1 .pod-step { border-top-right-radius: 12px; }
.win-podium::after { content: none; }
.podium-wrap .win-podium { border-bottom: 6px solid #1f2a44; border-radius: 0 0 4px 4px; }
.win-podium .pod-col .pod-rank { display: none; }
.win-podium .pod-1 { box-shadow: inset 0 3px 0 var(--m1), 0 14px 32px rgba(214, 160, 0, .2) !important; }
@media (max-width: 860px) {
  .win-podium { gap: 12px !important; border-bottom: 0 !important; }
  .pod-col-1 { order: 1; } .pod-col-2 { order: 2; } .pod-col-3 { order: 3; }
  .win-podium .pod-col .pod { margin: 0 !important; }
  .pod-step { display: none; }
  .win-podium .pod-col .pod-rank { display: grid; }
}
.win-podium .pod-col > .pod { order: 0 !important; } .pod-col > .pod-step { order: 1; }

/* ---- the podium, refined: light stone blocks with a top face, a metal band, a medal disc with the place, a navy plinth */
.podium-wrap .win-podium { border-bottom: 0 !important; padding-bottom: 14px; position: relative; }
.podium-wrap .win-podium::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, #1b2d52, #001842); box-shadow: 0 10px 22px -8px rgba(0, 24, 66, .45); }
.pod-step { --st1: #fbfcfd; --st2: #eef1f5; position: relative; padding-top: 22px; color: #001842; border-radius: 0 !important;
  background: linear-gradient(180deg, var(--st1), var(--st2)) !important;
  box-shadow: inset 0 0 0 1px #dde2ea, inset 0 -18px 24px -18px rgba(0, 24, 66, .14) !important; }
/* the top face, seen slightly from above */
.pod-step::before { content: ''; position: absolute; left: 0; right: 0; top: -9px; height: 9px; background: linear-gradient(180deg, #fff, #f3f5f8);
  box-shadow: inset 0 0 0 1px #dde2ea; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%); }
/* the metal band along the front edge */
.pod-step::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--mt2), var(--mt1) 50%, var(--mt2)); }
.pod-col-1 .pod-step { --mt1: #f3d77e; --mt2: #b8892c; height: 150px; z-index: 1; box-shadow: inset 0 0 0 1px #dde2ea, inset 0 -18px 24px -18px rgba(0, 24, 66, .14), 0 -4px 20px rgba(0, 24, 66, .08) !important; }
.pod-col-2 .pod-step { --mt1: #e8ecf1; --mt2: #9aa4b2; height: 108px; }
.pod-col-3 .pod-step { --mt1: #eab98f; --mt2: #9c5a2c; height: 78px; }
/* the medal disc with the place number */
.pod-step b { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-size: 21px !important; font-weight: 800; color: #1f1a10; text-shadow: none !important;
  background: radial-gradient(circle at 35% 30%, var(--mt1), var(--mt2) 75%); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--mt2), 0 4px 10px rgba(0, 24, 66, .18); }
.pod-col-1 .pod-step b { width: 56px; height: 56px; font-size: 26px !important; }
.pod-col-3 .pod-step b { width: 40px; height: 40px; font-size: 18px !important; color: #2b1606; }
.pod-step span { margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #42506a; opacity: 1; }
.pod-col-3 .pod-step { padding-top: 14px; } .pod-col-3 .pod-step span { margin-top: 6px; }
/* the cards: one quiet style, the metal colour only as a thin top line */
.win-podium .pod-col .pod { margin: 0 12px 18px !important; border: 1px solid #e3e7ee !important; border-radius: 12px !important; background: #fff !important;
  box-shadow: inset 0 3px 0 var(--m1), 0 1px 2px rgba(0, 24, 66, .05), 0 8px 20px rgba(0, 24, 66, .07) !important; }
.win-podium .pod-col-1 .pod { box-shadow: inset 0 3px 0 var(--m1), 0 1px 2px rgba(0, 24, 66, .05), 0 14px 30px rgba(0, 24, 66, .12) !important; }
@media (max-width: 860px) { .podium-wrap .win-podium::before { content: none; } .podium-wrap .win-podium { padding-bottom: 0; } }
.win-podium .pod-col .pod-step { background: linear-gradient(180deg, #fbfcfd, #eceff4) !important; }
.win-podium .pod-col-1 .pod-step { height: 156px; } .win-podium .pod-col-2 .pod-step { height: 116px; } .win-podium .pod-col-3 .pod-step { height: 92px; }
.win-podium .pod-col .pod-step { background: linear-gradient(180deg, #f2f4f8, #dfe4ec) !important; box-shadow: inset 0 0 0 1px #d3d9e3, inset 0 -22px 26px -20px rgba(0, 24, 66, .18) !important; }
.win-podium .pod-col-1 .pod-step { box-shadow: inset 0 0 0 1px #d3d9e3, inset 0 -22px 26px -20px rgba(0, 24, 66, .18), 0 -6px 22px rgba(0, 24, 66, .1) !important; }
.pod-step::before { background: linear-gradient(180deg, #ffffff, #f4f6f9); box-shadow: inset 0 0 0 1px #d3d9e3; }

/* ---- the winners' stage (Dashboard top 3): navy backdrop, gold ribbon, metal-framed cards with laurel medals on pedestals */
.gala { --g1-hi: #fff3c4; --g1: #f0c84a; --g1-lo: #b8860b; --g2-hi: #ffffff; --g2: #d7dde6; --g2-lo: #8f9aab; --g3-hi: #ffe1c8; --g3: #e0a06c; --g3-lo: #a8622f;
  position: relative; overflow: hidden; margin: 0 -18px -18px; padding: 26px 26px 34px; border-radius: 0 0 14px 14px; isolation: isolate;
  background: radial-gradient(ellipse 70% 60% at 50% 38%, #1f4f9a 0%, #0f2a5c 45%, #071633 100%); color: #fff; }
.gala::before { content: ''; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at 50% 35%, rgba(120, 180, 255, .28), transparent 70%); }
/* sweeping light arcs at the sides */
.gala::after { content: ''; position: absolute; inset: 10px -30% auto; height: 170%; border-radius: 50%; z-index: -1; pointer-events: none;
  border: 2px solid rgba(110, 170, 255, .35); box-shadow: 0 0 30px rgba(80, 150, 255, .25), inset 0 0 30px rgba(80, 150, 255, .18); }
.gala-backdrop { position: absolute; inset: 0; z-index: -1; color: #5ea2ff; opacity: .22; pointer-events: none; }
.gala-backdrop .gala-art { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(94, 162, 255, .9)); }
.gala-title { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; text-align: center; }
.gala-event { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.01em; line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 30%, #c9d8f0); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); }
.gala-ribbon { position: relative; margin-top: 10px; padding: 0 34px; }
.gala-ribbon span { position: relative; z-index: 1; display: block; padding: 8px 28px; font-size: 16px; font-weight: 800; color: #2b1d02; white-space: nowrap;
  background: linear-gradient(180deg, #ffe38a, #f0c84a 45%, #c8941c); box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
  clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%, 3% 50%); }
.gala-ribbon::before, .gala-ribbon::after { content: ''; position: absolute; top: 9px; bottom: -9px; width: 46px; background: linear-gradient(180deg, #d9a92e, #9c7012); }
.gala-ribbon::before { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 26% 50%); }
.gala-ribbon::after { right: 0; clip-path: polygon(0 0, 100% 0, 74% 50%, 100% 100%, 0 100%); }
/* the three columns: 2nd | 1st | 3rd, the cards standing on their pedestals */
.gala-podium { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.14fr 1fr; align-items: end; gap: 0 22px; padding-top: 6px; }
.gala.n1 .gala-podium { grid-template-columns: minmax(0, 440px); justify-content: center; }
.gala.n2 .gala-podium { grid-template-columns: 1fr 1.14fr; }
.gala-col { --hi: var(--g2-hi); --m: var(--g2); --lo: var(--g2-lo); display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.gala-col.g-1 { --hi: var(--g1-hi); --m: var(--g1); --lo: var(--g1-lo); order: 2; }
.gala-col.g-2 { order: 1; } .gala-col.g-3 { --hi: var(--g3-hi); --m: var(--g3); --lo: var(--g3-lo); order: 3; }
.gala-medal { position: relative; z-index: 2; align-self: center; width: 118px; margin-bottom: -40px; line-height: 0; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.gala-col.g-1 .gala-medal { width: 146px; margin-bottom: -46px; filter: drop-shadow(0 0 18px rgba(255, 205, 80, .55)) drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.gala-medal svg { width: 100%; height: auto; }
/* the metal frame around each card */
.gala-card { position: relative; z-index: 1; padding: 6px; border-radius: 18px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
  background: linear-gradient(145deg, var(--hi), var(--m) 35%, var(--lo) 70%, var(--m)); box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
.gala-col.g-1 .gala-card { box-shadow: 0 0 34px rgba(255, 196, 60, .35), 0 16px 38px rgba(0, 0, 0, .5); }
.gala-card:hover { transform: translateY(-3px); }
.gala-card:focus-visible { outline: 3px solid #9cc7ff; outline-offset: 3px; }
.gala-frame { overflow: hidden; border-radius: 13px; background: linear-gradient(180deg, #ffffff, #f4f6fa); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); color: #10203f; }
.gala-head { display: flex; align-items: center; gap: 10px; padding: 46px 16px 12px; text-align: left;
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 30%, #fff), color-mix(in srgb, var(--m) 14%, #fff)); border-bottom: 1px solid color-mix(in srgb, var(--lo) 30%, #fff); }
.gala-col.g-1 .gala-head { padding-top: 52px; }
.gala-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 800; line-height: 1.25; color: #0b1f45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gala-col.g-1 .gala-head h3 { font-size: 20px; }
.gala-score { flex: none; display: inline-flex; align-items: baseline; gap: 2px; padding: 4px 9px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lo) 40%, #fff); }
.gala-score b { font-size: 15px; font-weight: 900; color: #0b1f45; font-variant-numeric: tabular-nums; }
.gala-score small { font-size: 10.5px; font-weight: 700; color: #6b7487; }
.gala-rows { display: flex; flex-direction: column; padding: 6px 14px 12px; }
.gala-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e8ecf2; }
.gala-row:last-child { border-bottom: 0; }
.gala-pill { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 11px 4px 9px; border-radius: 999px; background: #0b1f45; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.gala-pill svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.gala-val { min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.3; color: #10203f; overflow-wrap: anywhere; text-align: left; }
.gala-name { display: block; }
/* the pedestals: a round metal platform under each card; 1st stands on a tall one */
.gala-base { position: relative; height: 34px; margin: -6px -6px 0; border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: linear-gradient(180deg, var(--lo), var(--m) 35%, var(--hi) 55%, var(--lo)); box-shadow: 0 16px 26px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .2) inset; }
.gala-base::before { content: ''; position: absolute; left: 4%; right: 4%; top: 0; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .35); filter: blur(3px); }
.gala-col.g-1 .gala-base { height: 92px; margin: -6px -12px 0; border-radius: 6px 6px 50% 50% / 6px 6px 26px 26px; display: grid; place-items: center;
  background: linear-gradient(90deg, var(--lo), var(--m) 20%, var(--hi) 50%, var(--m) 80%, var(--lo)); }
.gala-col.g-1 .gala-base span { margin-top: -8px; font-size: 15px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: #3a2804; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.gala-col.g-2 .gala-base { height: 52px; } .gala-col.g-3 .gala-base { height: 34px; }
/* the glowing floor ring */
.gala-floor { position: absolute; left: 4%; right: 4%; bottom: 8px; height: 70px; border-radius: 50%; z-index: 0; pointer-events: none;
  border: 2px solid rgba(255, 190, 80, .75); box-shadow: 0 0 22px rgba(255, 170, 60, .55), inset 0 0 22px rgba(255, 170, 60, .3);
  background: radial-gradient(ellipse at center, rgba(255, 200, 100, .12), transparent 70%); }
@media (prefers-reduced-motion: reduce) { .gala-card { transition: none; } .gala-card:hover { transform: none; } }
@media (max-width: 860px) {
  .gala { margin: 0 -12px -12px; padding: 20px 12px 26px; }
  .gala-podium, .gala.n2 .gala-podium { grid-template-columns: 1fr; gap: 26px; }
  .gala-col.g-1 { order: 1; } .gala-col.g-2 { order: 2; } .gala-col.g-3 { order: 3; }
  .gala-col.g-1 .gala-base { height: 40px; } .gala-col.g-1 .gala-base span { display: none; }
  .gala-event { font-size: 24px; } .gala-ribbon span { font-size: 14px; padding: 7px 18px; white-space: normal; }
  .gala-floor { display: none; }
  .gala-row { grid-template-columns: 104px minmax(0, 1fr); }
}
.gala-medal { width: 150px; margin-bottom: -52px; }
.gala-col.g-1 .gala-medal { width: 190px; margin-bottom: -62px; }
.gala-head { padding-top: 56px; } .gala-col.g-1 .gala-head { padding-top: 66px; }
.gala-col.g-1 .gala-base { height: 116px; } .gala-col.g-2 .gala-base { height: 56px; } .gala-col.g-3 .gala-base { height: 30px; }
.gala-floor { bottom: 2px; height: 90px; }
@media (max-width: 860px) { .gala-medal { width: 120px; margin-bottom: -42px; } .gala-col.g-1 .gala-medal { width: 140px; } .gala-col .gala-base, .gala-col.g-1 .gala-base { height: 30px; } }

/* ---- the podium, compact: no backdrop, smaller medals, tighter cards, and a solid three-step stand underneath */
.gala { margin: 0; padding: 4px 0 0; border-radius: 0; background: none; color: inherit; overflow: visible; }
.gala::before, .gala::after { content: none; }
.gala-podium { gap: 0; padding-top: 0; }
.gala-card { margin: 0 10px; padding: 4px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 24, 66, .12), 0 0 0 1px rgba(255, 255, 255, .3) inset; }
.gala-col.g-1 .gala-card { box-shadow: 0 8px 22px rgba(184, 134, 11, .22), 0 0 0 1px rgba(255, 255, 255, .3) inset; }
.gala-card:hover { transform: translateY(-2px); }
.gala-frame { border-radius: 11px; }
.gala-medal, .gala-col.g-1 .gala-medal { width: 92px; margin-bottom: -32px; filter: drop-shadow(0 3px 5px rgba(0, 24, 66, .25)); }
.gala-col.g-1 .gala-medal { width: 112px; margin-bottom: -38px; }
.gala-head, .gala-col.g-1 .gala-head { padding: 34px 12px 8px; }
.gala-col.g-1 .gala-head { padding-top: 40px; }
.gala-head h3, .gala-col.g-1 .gala-head h3 { font-size: 15.5px; }
.gala-col.g-1 .gala-head h3 { font-size: 16.5px; }
.gala-score { padding: 2px 7px; } .gala-score b { font-size: 13.5px; }
.gala-rows { padding: 2px 12px 6px; }
.gala-row { grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 4px 0; }
.gala-pill { padding: 2px 9px 2px 7px; font-size: 11px; gap: 5px; }
.gala-val { font-size: 13px; }
/* the stand: three blocks side by side, each with a lit top face, a navy front and the place number in its metal */
.gala-base, .gala-col.g-1 .gala-base, .gala-col.g-2 .gala-base, .gala-col.g-3 .gala-base {
  position: relative; display: grid; place-items: center; margin: 10px 0 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(180deg, #1c3566, #0b1f45 70%, #071633); }
.gala-base::before { content: none; }
.gala-col.g-1 .gala-base { height: 74px; z-index: 1; box-shadow: 0 -2px 0 rgba(0, 0, 0, .05), 6px 0 10px -6px rgba(0, 0, 0, .35), -6px 0 10px -6px rgba(0, 0, 0, .35); }
.gala-col.g-2 .gala-base { height: 52px; }
.gala-col.g-3 .gala-base { height: 36px; }
/* the top face, in the block's metal */
.gala-top { position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: linear-gradient(90deg, var(--lo), var(--hi) 50%, var(--lo));
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); }
.gala-col.g-2 .gala-top { clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%); }
.gala-col.g-3 .gala-top { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%); }
.gala-base b { font-size: 34px; font-weight: 900; line-height: 1; background: linear-gradient(180deg, var(--hi), var(--m) 55%, var(--lo));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.gala-col.g-1 .gala-base b { font-size: 44px; }
.gala-col.g-3 .gala-base b { font-size: 24px; }
.gala-base span { display: none; }
.gala.n1 .gala-col .gala-top { clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%); }
@media (max-width: 860px) {
  .gala { margin: 0; padding: 0; }
  .gala-podium { gap: 18px; }
  .gala-card { margin: 0; }
  .gala-base, .gala-col.g-1 .gala-base, .gala-col.g-2 .gala-base, .gala-col.g-3 .gala-base { display: none; }
  .gala-medal, .gala-col.g-1 .gala-medal { width: 88px; margin-bottom: -30px; }
}

/* ---- the stand, finished: three solid blocks with a lit top face, a metal band, the place in metal, a plinth and a floor shadow */
.gala-podium { position: relative; z-index: 1; }
.gala-base, .gala-col.g-1 .gala-base, .gala-col.g-2 .gala-base, .gala-col.g-3 .gala-base {
  margin: 16px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1) 50%, rgba(255, 255, 255, .02)), linear-gradient(180deg, #213c70 0%, #102a59 45%, #0a1d40 100%);
  box-shadow: inset 0 -10px 16px -8px rgba(0, 0, 0, .35); }
.gala-col.g-1 .gala-base { height: 100px; z-index: 2; box-shadow: inset 0 -10px 16px -8px rgba(0, 0, 0, .35), 10px 0 14px -8px rgba(0, 0, 0, .45), -10px 0 14px -8px rgba(0, 0, 0, .45); }
.gala-col.g-2 .gala-base { height: 74px; }
.gala-col.g-3 .gala-base { height: 56px; }
/* darker inner ends where the side blocks meet the centre one */
.gala-col.g-2 .gala-base { background-image: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02) 80%, rgba(0, 0, 0, .25)), linear-gradient(180deg, #213c70, #102a59 45%, #0a1d40); }
.gala-col.g-3 .gala-base { background-image: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(255, 255, 255, .02) 20%, rgba(255, 255, 255, .06)), linear-gradient(180deg, #213c70, #102a59 45%, #0a1d40); }
/* the top face, seen from slightly above */
.gala-top { top: -16px; height: 16px; background: linear-gradient(180deg, #f6f8fb, #d9dfe8); }
.gala-col.g-1 .gala-top { clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
.gala-col.g-2 .gala-top { clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); }
.gala-col.g-3 .gala-top { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
.gala.n1 .gala-col .gala-top { clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%); }
/* the metal band along the top of the front */
.gala-band { position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--lo), var(--hi) 30%, var(--m) 55%, var(--hi) 75%, var(--lo)); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
.gala-base b { margin-top: 4px; font-size: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.gala-col.g-1 .gala-base b { font-size: 52px; }
.gala-col.g-3 .gala-base b { font-size: 30px; }
.gala-base span, .gala-col.g-1 .gala-base span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .32em; text-transform: uppercase; color: var(--m); opacity: .9; padding-left: .32em; }
.gala-col.g-3 .gala-base span { display: none; }
/* the plinth under all three, and the soft shadow on the floor */
.gala-plinth { position: relative; height: 12px; margin: 0 -8px; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #0a1d40, #061430); }
.gala-plinth::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: -14px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0, 24, 66, .28), transparent 70%); }
.gala { padding-bottom: 14px; }
@media (max-width: 860px) { .gala-plinth { display: none; } .gala { padding-bottom: 0; } }
.gala-top { background: linear-gradient(180deg, color-mix(in srgb, var(--hi) 70%, #fff), color-mix(in srgb, var(--m) 75%, #fff)); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }

/* ---- the top 3 as crystal trophies: a faceted glass plaque in a metal rim, a laurel medal with stars, a title band,
   the details, and a two-tier base (1st on a gold base with a name plate) */
.gala-podium { gap: 0 20px !important; align-items: end; }
.gala-plinth { display: none; }
.tr { --shape: polygon(0 20%, 16% 0, 84% 0, 100% 20%, 100% 100%, 0 100%); position: relative; z-index: 1; padding: 5px; cursor: pointer; clip-path: var(--shape);
  background: linear-gradient(150deg, var(--hi), var(--m) 30%, var(--lo) 55%, var(--m) 75%, var(--hi)); transition: transform .2s ease; }
.tr:hover { transform: translateY(-3px); }
.tr:focus-visible { outline: none; } .tr:focus-visible .tr-glass { box-shadow: inset 0 0 0 3px #4d8dff; }
.gala-col { filter: drop-shadow(0 10px 16px rgba(0, 24, 66, .18)); }
.gala-col.g-1 { filter: drop-shadow(0 0 16px rgba(240, 190, 60, .35)) drop-shadow(0 12px 18px rgba(0, 24, 66, .2)); }
/* the glass: pale, with facet highlights in the corners */
.tr-glass { position: relative; display: flex; flex-direction: column; align-items: stretch; clip-path: var(--shape); padding: 0 0 10px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, .95) 0 14%, transparent 14.2%),
    linear-gradient(235deg, rgba(255, 255, 255, .8) 0 14%, transparent 14.2%),
    linear-gradient(160deg, #ffffff 0%, color-mix(in srgb, var(--m) 18%, #f4f7fb) 45%, #ffffff 70%, color-mix(in srgb, var(--m) 22%, #eef2f7) 100%); }
.tr-glass::before { content: ''; position: absolute; inset: 6px; clip-path: var(--shape); border: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 48%, transparent 56%); }
.tr-crown { position: relative; z-index: 1; align-self: center; width: 132px; margin: 6px 0 -1px; line-height: 0; }
.gala-col.g-1 .tr-crown { width: 160px; }
.tr-crown svg { width: 100%; height: auto; }
/* the title band */
.tr-band { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 14px; background: linear-gradient(180deg, #13306a, #0b1f45); color: #fff;
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--m) 70%, #fff), 0 3px 6px rgba(0, 24, 66, .2); }
.gala-col.g-3 .tr-band { background: linear-gradient(180deg, #7a3d14, #55290b); }
.gala-col.g-3 .tr-crown path:first-child { fill: #55290b; }
.tr-band h3 { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 800; line-height: 1.2; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gala-col.g-1 .tr-band h3 { font-size: 18px; }
.tr-score { flex: none; display: inline-flex; align-items: baseline; gap: 2px; padding: 3px 8px; border-radius: 7px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.tr-score b { font-size: 14px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; } .tr-score small { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .7); }
/* the details */
.tr-rows { position: relative; z-index: 1; margin: 8px 10px 0; padding: 2px 10px; border-radius: 8px; background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px rgba(0, 24, 66, .06); }
.tr-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #e3e8ef; text-align: left; }
.tr-row:last-child { border-bottom: 0; }
.tr-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: #0b1f45; white-space: nowrap; }
.tr-label svg { flex: none; fill: none; stroke: #0b1f45; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tr-val { min-width: 0; font-size: 13.5px; font-weight: 650; line-height: 1.3; color: #10203f; overflow-wrap: anywhere; }
.tr-name { display: block; }
/* the base: a navy tier, then a wider metal tier */
.tr-base { position: relative; z-index: 0; display: flex; flex-direction: column; align-items: center; }
.tr-base-top { display: block; width: 104%; height: 14px; background: linear-gradient(180deg, #1d3a6e, #0b1f45); clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%); }
.tr-base-foot { display: grid; place-items: center; width: 112%; height: 20px; clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, var(--hi), var(--m) 40%, var(--lo)); }
.gala-col.g-1 .tr-base-top { height: 16px; }
.gala-col.g-1 .tr-base-foot { height: 52px; width: 116%; padding: 0 12%; }
.tr-plate { display: block; max-width: 100%; padding: 4px 18px; border-radius: 4px; background: linear-gradient(180deg, #fff3c4, #e9c25a); box-shadow: inset 0 0 0 2px #0b1f45, 0 1px 0 rgba(255, 255, 255, .6);
  font-size: 14px; font-weight: 900; letter-spacing: .02em; color: #0b1f45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .tr { transition: none; } .tr:hover { transform: none; } }
@media (max-width: 860px) {
  .gala-podium { gap: 22px !important; }
  .tr-base-foot, .gala-col.g-1 .tr-base-foot { width: 108%; height: 16px; } .tr-plate { display: none; }
  .tr-crown, .gala-col.g-1 .tr-crown { width: 120px; }
}
.tr-band h3, html.look-navy .tr-band h3 { color: #fff !important; }
.gala-podium { max-width: 1120px; margin: 0 auto; padding: 0 14px; grid-template-columns: 1fr 1.15fr 1fr; }
.tr-crown { width: 150px; } .gala-col.g-1 .tr-crown { width: 182px; }
.gala-col.g-2 .tr-crown, .gala-col.g-3 .tr-crown { margin-top: 4px; }
@media (max-width: 860px) { .gala-podium, .gala.n2 .gala-podium { grid-template-columns: 1fr !important; padding: 0; } .gala-col.g-1 { order: 1; } .gala-col.g-2 { order: 2; } .gala-col.g-3 { order: 3; } }
/* the trophies keep one size whatever the division: the title always takes two lines, the students two lines, the rest one */
.tr-band { min-height: 0; height: 58px; } .gala-col.g-1 .tr-band { height: 62px; }
.tr-band h3 { min-height: calc(2 * 1.2em); display: -webkit-box !important; -webkit-line-clamp: 2; align-content: center; }
.tr-row:first-child .tr-val { height: calc(2 * 1.3em); overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.tr-row:first-child .tr-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-row:not(:first-child) .tr-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gala-podium { min-height: 0; }

/* ---- trophy fixes: full titles and instructors, the score beside the medal, clearer medals, separate stands,
   a fuller 1st place, softer glass and a rim all round */
/* the top row: an empty cell, the medal, the score */
.tr-top { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 0 14px; }
.tr-top .tr-crown { margin: 4px 0 -1px; }
.gala-col.g-1 .tr-top .tr-crown { width: 200px; margin-top: 0; }
.tr-score { justify-self: end; flex-direction: column; align-items: center; gap: 0; margin-bottom: 10px; padding: 5px 10px; border-radius: 10px;
  background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lo) 60%, #fff), 0 2px 6px rgba(0, 24, 66, .12); }
.tr-score small { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #5d6679; }
.tr-score b { font-size: 17px; font-weight: 900; color: #0b1f45; font-variant-numeric: tabular-nums; line-height: 1.1; }
/* the title: the full band width, always two lines' room; a long title is made smaller (in the script), not cut */
.tr-band, .gala-col.g-1 .tr-band { height: auto; min-height: 0; padding: 9px 16px; justify-content: center; text-align: center; }
.tr-band h3, .gala-col.g-1 .tr-band h3 { display: block !important; -webkit-line-clamp: unset; height: calc(2 * 1.22em); min-height: 0; line-height: 1.22; overflow: hidden;
  display: flex !important; align-items: center; justify-content: center; text-align: center; }
/* students and instructors: two lines each, one name per line */
.tr-row:first-child .tr-val, .tr-row:last-child .tr-val { height: calc(2 * 1.3em); overflow: hidden; display: flex; flex-direction: column; justify-content: center; white-space: normal; }
.tr-row:last-child .tr-val .tr-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-row:not(:first-child):not(:last-child) .tr-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* softer glass reflections */
.tr-glass { background:
    linear-gradient(125deg, rgba(255, 255, 255, .7) 0, rgba(255, 255, 255, 0) 16%),
    linear-gradient(235deg, rgba(255, 255, 255, .6) 0, rgba(255, 255, 255, 0) 16%),
    linear-gradient(160deg, #ffffff 0%, color-mix(in srgb, var(--m) 16%, #f4f7fb) 45%, #ffffff 70%, color-mix(in srgb, var(--m) 20%, #eef2f7) 100%); }
/* the metal rim all the way round, the bottom included */
.tr { padding: 5px 5px 7px; width: 90%; align-self: center; }
/* each stand under its own trophy: a navy tier, then a wider metal foot, both within the column */
.tr-base { width: 100%; }
.tr-base-top, .gala-col.g-1 .tr-base-top { width: 94%; height: 14px; clip-path: polygon(2.5% 0, 97.5% 0, 100% 100%, 0 100%); }
.tr-base-foot, .gala-col.g-1 .tr-base-foot { width: 100%; height: 20px; padding: 0; clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%); }
.gala-col.g-1 .tr-base-top { height: 16px; }
.gala-col.g-1 .tr-base-foot { height: 50px; padding: 0 8%; }
.gala-podium { gap: 0 28px !important; }
@media (max-width: 860px) {
  .tr { width: 100%; }
  .gala-col.g-1 .tr-base-foot { height: 16px; }
  .gala-col.g-1 .tr-top .tr-crown { width: 150px; }
}
.tr-row { grid-template-columns: 96px minmax(0, 1fr); } .tr-label { font-size: 12.5px; gap: 6px; } .tr-row:first-child .tr-val, .tr-row:last-child .tr-val { height: 2.7em; }
.tr-band h3 { height: 40px !important; } .gala-col.g-1 .tr-band h3 { height: 44px !important; } .tr-row:first-child .tr-val, .tr-row:last-child .tr-val { height: 36px !important; } .tr-row:not(:first-child):not(:last-child) .tr-val { height: 18px; line-height: 18px; }

/* ---- the trophy labels sit at the top of their row (students and instructors take two lines) */
.tr-row { align-items: start; }
.tr-label { padding-top: 1px; }
.tr-row:not(:first-child):not(:last-child) { align-items: center; }

/* ---- the stands, wider and finer: a navy plinth with a lit bevel, a polished metal foot with a bevelled top edge and
   reflections, and a soft shadow on the floor */
.tr-base { position: relative; width: 100%; padding-bottom: 6px; }
.tr-base::after { content: ''; position: absolute; left: 2%; right: 2%; bottom: -4px; height: 14px; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 24, 66, .32), rgba(0, 24, 66, 0) 70%); }
.tr-base-top, .gala-col.g-1 .tr-base-top { position: relative; width: 98%; height: 16px; clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28) 0, rgba(255, 255, 255, .28) 1.5px, rgba(255, 255, 255, 0) 2px),
    linear-gradient(90deg, #08183a 0%, #1a3768 18%, #2a4c86 50%, #1a3768 82%, #08183a 100%); }
.gala-col.g-1 .tr-base-top { height: 18px; }
.tr-base-foot, .gala-col.g-1 .tr-base-foot { position: relative; width: 108%; height: 24px; clip-path: polygon(2.5% 0, 97.5% 0, 100% 72%, 100% 100%, 0 100%, 0 72%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .75) 0, rgba(255, 255, 255, 0) 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 68%, rgba(0, 0, 0, .22) 72%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(90deg, var(--lo) 0%, var(--m) 10%, var(--hi) 24%, var(--m) 38%, var(--lo) 50%, var(--m) 62%, var(--hi) 76%, var(--m) 90%, var(--lo) 100%); }
.gala-col.g-1 .tr-base-foot { width: 112%; height: 58px; padding: 0 9%; clip-path: polygon(2.5% 0, 97.5% 0, 100% 86%, 100% 100%, 0 100%, 0 86%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .8) 0, rgba(255, 255, 255, 0) 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 84%, rgba(0, 0, 0, .22) 86%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(90deg, var(--lo) 0%, var(--m) 10%, var(--hi) 24%, var(--m) 38%, var(--lo) 50%, var(--m) 62%, var(--hi) 76%, var(--m) 90%, var(--lo) 100%); }
/* the name plate on 1st: navy with an engraved gold edge */
.tr-plate { margin-bottom: 6px; padding: 5px 20px; border-radius: 5px; background: linear-gradient(180deg, #13306a, #0b1f45); color: #f6d77a;
  box-shadow: inset 0 0 0 1.5px #e9c25a, inset 0 0 0 3px #0b1f45, inset 0 0 0 4px rgba(233, 194, 90, .55), 0 2px 4px rgba(0, 0, 0, .25);
  font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 860px) { .tr-base-foot, .gala-col.g-1 .tr-base-foot { width: 104%; height: 18px; } }

/* ---- the faceted stands (drawn in the script): wider than the trophy, with a floor shadow; 1st carries a chamfered plate */
.tr-base, .tr-base.first { position: relative; display: block; width: 112%; margin: 0 -6%; align-self: center; padding: 0; }
.tr-base svg { display: block; width: 100%; height: 60px; filter: drop-shadow(0 6px 8px rgba(0, 24, 66, .28)); }
.tr-base.first { width: 116%; margin: 0 -8%; }
.tr-base.first svg { height: 104px; }
.tr-base::after { bottom: -6px; left: 4%; right: 4%; }
.tr-base-top, .tr-base-foot { display: none; }
/* the plate: a gold chamfered frame around a navy chamfered panel, on the front of the gold base */
.tr-plate { position: absolute; left: 50%; top: 48px; transform: translateX(-50%); margin: 0; padding: 2px; border-radius: 0; box-shadow: none; max-width: 78%;
  background: linear-gradient(180deg, #fff1b8, #d9a72c 60%, #a77a14);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); }
.tr-plate > span { display: block; padding: 7px 22px; background: linear-gradient(180deg, #1b3a74, #0b1f45);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  font-size: 13.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f6d77a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .tr-base, .tr-base.first { width: 104%; margin: 0 -2%; }
  .tr-base svg, .tr-base.first svg { height: 40px; }
  .tr-plate { display: none; }
}
.tr-plate { top: 46px; } .tr-plate > span { padding: 8px 26px; font-size: 15px; }
.tr-row:first-child .tr-val, .tr-row:last-child .tr-val { justify-content: flex-start !important; }
/* 1st place always stands in front of its neighbours (their wider bases overlap at the edges) */
.gala-col { position: relative; z-index: 1; } .gala-col.g-1 { z-index: 3; }

/* ---- stands: each its own block, only a little wider than its trophy, stepped 1st > 2nd > 3rd, with gaps between */
.gala-podium { gap: 0 40px !important; }
.tr-base, .tr-base.first { width: 102%; margin: 0 -1%; }
.tr-base.p2 svg { height: 80px; }
.tr-base.p3 svg { height: 62px; }
.tr-base.first svg { height: 104px; }
/* a dark seam where each plaque meets its stand */
.tr-base::before { content: ''; position: absolute; z-index: 1; left: 5%; right: 5%; top: -1px; height: 3px; border-radius: 2px; background: rgba(3, 12, 32, .55); filter: blur(.6px); }
/* the plate on 1st: smaller, so the faceted gold front shows round it */
.tr-plate { top: 54px; max-width: 64%; }
.tr-plate > span { padding: 5px 16px; font-size: 12.5px; letter-spacing: .07em; }
/* instructors: one line, or two when some winner this year has two instructors (every division keeps one size) */
.tr-row:last-child .tr-val { height: 18px !important; }
.gala.two-instr .tr-row:last-child .tr-val { height: 36px !important; }
.tr-rows { padding-bottom: 4px; }
@media (max-width: 860px) { .tr-base.p2 svg, .tr-base.p3 svg, .tr-base.first svg { height: 40px; } .gala-podium { gap: 22px !important; } }
.gala-podium { max-width: 1300px; } .tr { width: 94%; }
/* instructors on one line; the 1st place stars clear of the rim; a softer corner reflection on the silver glass */
.tr-row:last-child .tr-val, .gala.two-instr .tr-row:last-child .tr-val { height: 18px !important; line-height: 18px; display: block !important; white-space: nowrap; overflow: hidden; }
.tr-row:last-child { align-items: center; }
.gala-col.g-1 .tr-top { padding-top: 12px; }
.gala-col.g-2 .tr-glass { background:
    linear-gradient(125deg, rgba(255, 255, 255, .35) 0, rgba(255, 255, 255, 0) 14%),
    linear-gradient(235deg, rgba(255, 255, 255, .3) 0, rgba(255, 255, 255, 0) 14%),
    linear-gradient(160deg, #f7f9fc 0%, color-mix(in srgb, var(--m) 22%, #eef2f7) 45%, #f9fafc 70%, color-mix(in srgb, var(--m) 26%, #e9edf3) 100%); }
.tr-band h3 { text-wrap: balance; }
/* the 1st place plate: two lines, the event small over "Division Champion" */
.tr-plate { top: 44px; max-width: 74%; }
.tr-plate > span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 22px 6px; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.tr-plate small { font-size: 9.5px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: #c9d6ee; padding-left: .26em; }
.tr-plate b { display: inline-flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff3c4, #f0c84a 55%, #c8941c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tr-plate b i { font-style: normal; font-size: 11px; }
.tr-plate { top: 40px; } .tr-plate > span { padding: 3px 20px 4px; gap: 0; }

/* once the winners are released the notice is no longer needed: the navy look hides the bar (its buttons live in the
   section bar); the classic look keeps the buttons and drops the message */
html.look-navy #releaseBar.released { display: none !important; }
#releaseBar.released .release-text, #releaseBar.released .release-dot { display: none; }

/* ---- the top 3, a little more compact: smaller medals, tighter rows, lower stands */
.tr-crown { width: 124px; } .gala-col.g-1 .tr-top .tr-crown { width: 164px; }
.gala-col.g-1 .tr-top { padding-top: 8px; }
.tr-score { margin-bottom: 6px; padding: 4px 9px; } .tr-score b { font-size: 15px; }
.tr-band, .gala-col.g-1 .tr-band { padding: 6px 14px; }
.tr-band h3 { height: 36px !important; font-size: 15px; } .gala-col.g-1 .tr-band h3 { height: 40px !important; font-size: 16.5px; }
.tr-rows { margin-top: 6px; }
.tr-row { padding: 3px 0; }
.tr-glass { padding-bottom: 6px; }
.tr-base.first svg { height: 86px; } .tr-base.p2 svg { height: 64px; } .tr-base.p3 svg { height: 50px; }
.tr-plate { top: 34px; } .tr-plate > span { padding: 2px 18px 3px; }
.tr-plate small { font-size: 8.5px; } .tr-plate b { font-size: 14px; }

/* ==========================================================================================================
   The Project pool (Views/Pool/Index.cshtml)
   ========================================================================================================== */
.pl-page, .pl-dlg { --navy: #001842; --ink: #10203f; --muted: #5d6679; --line: #e3e7ee; }
.pl-page { padding-bottom: 60px; }
.pl-ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pl-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 22px 0 16px; }
.pl-eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b8892c; }
.pl-hero h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.pl-sub { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }
.pl-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid #cfd5df; border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; white-space: nowrap; }
.pl-btn:hover { border-color: var(--navy); }
.pl-btn-solid { border-color: var(--navy); background: var(--navy); color: #fff; }
.pl-btn-solid:hover { background: #0b2a66; }
/* the tools: search, subjects, grade levels, more */
.pl-tools { position: sticky; top: 58px; z-index: 5; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; margin: 0 -2px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 24, 66, .05); }
.pl-search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid #d3d9e3; border-radius: 11px; background: #fff; }
.pl-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 24, 66, .1); }
.pl-search svg { fill: none; stroke: #7a8396; stroke-width: 2; stroke-linecap: round; }
.pl-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 15px; color: var(--ink); background: none; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { --c: var(--navy); display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid #d9dee7; border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 600; color: #2b3650; cursor: pointer; }
.pl-chip:hover { border-color: var(--c); }
.pl-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--navy); box-shadow: inset 0 0 0 1px var(--c); }
.pl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.pl-n { padding: 1px 7px; border-radius: 999px; background: #eef1f6; font-size: 11.5px; font-weight: 700; color: #4a556b; font-variant-numeric: tabular-nums; }
.pl-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.pl-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: #eef1f6; }
.pl-seg button, .pl-seg label { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 600; color: #4a556b; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pl-seg button.on, .pl-seg label.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 24, 66, .14); }
.pl-seg label input { display: none; }
.pl-checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.pl-check { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13.5px; font-weight: 600; color: #3f4a61; cursor: pointer; }
.pl-check input { width: 17px; height: 17px; accent-color: var(--navy); }
.pl-page .pl-count { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pl-page .pl-count:empty { display: none; }
/* the cards, in a section per subject */
.pl-section { --c: var(--navy); margin-bottom: 26px; }
.pl-section h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 19px; font-weight: 800; color: var(--navy); }
.pl-section h2 span { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #000); }
.pl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.pl-card { --c: var(--navy); display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 24, 66, .04); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pl-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: 0 10px 24px rgba(0, 24, 66, .1); }
.pl-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 60%, #fff); outline-offset: 2px; }
.pl-card.is-hidden { opacity: .55; }
.pl-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: color-mix(in srgb, var(--c) 8%, #f4f6f9); }
.pl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.pl-card:hover .pl-photo img { transform: scale(1.04); }
.pl-nophoto { display: grid; place-items: center; width: 100%; height: 100%; color: color-mix(in srgb, var(--c) 55%, #fff); }
.pl-subject { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: 11.5px; font-weight: 700;
  color: color-mix(in srgb, var(--c) 75%, #000); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.pl-play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 24, 66, .82); color: #fff; }
.pl-play .pl-ic { fill: #fff; stroke: none; margin-left: 2px; }
.pl-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 11px 13px 12px; }
.pl-levels { display: flex; flex-wrap: wrap; gap: 4px; }
.pl-lv, .pl-kit, .pl-subject-tag { padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.pl-lv.lv-ES { background: #e7f5ec; color: #1f6b3a; } .pl-lv.lv-MS { background: #e8f1fd; color: #1b4f99; } .pl-lv.lv-HS { background: #efe9fb; color: #4b2a99; }
.pl-kit { background: #fff3dc; color: #8a5a00; }
.pl-subject-tag { background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); }
.pl-card h3 { margin: 0; font-size: 15.5px; font-weight: 750; line-height: 1.3; color: var(--ink); }
.pl-sum { margin: 0; font-size: 13px; line-height: 1.45; color: #4a556b; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-muted { color: #9aa2b1; font-style: italic; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 600; color: #6b7487; }
.pl-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pl-warn { color: #b45309 !important; }
.pl-review { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 0; padding: 6px 8px; border-radius: 8px; background: #fff7e0; font-size: 12px; font-weight: 600; color: #7a5200; }
.pl-review.big { margin: 0 0 14px; padding: 10px 12px; font-size: 13.5px; }
.pl-page .pl-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 50px 20px; border: 1px dashed #cfd5df; border-radius: 14px; color: var(--muted); }
.pl-page .pl-empty b { font-size: 16px; color: var(--ink); }
/* one project, in a large window */
body.pl-locked { overflow: hidden; }
.pl-dlg { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0, 24, 66, .35); overflow: auto; }
.pl-dlg::backdrop { background: rgba(6, 16, 38, .55); backdrop-filter: blur(2px); }
.pl-view { --c: var(--navy); color: #1c2333; }
.pl-view-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid #eceef2; background: rgba(255, 255, 255, .97); }
.pl-view-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-view-title h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--navy, #001842); }
.pl-x { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #f1f3f7; color: #3f4a61; cursor: pointer; }
.pl-x:hover { background: #e4e8ef; }
.pl-view-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; padding: 20px 22px 26px; }
.pl-media { margin-bottom: 18px; overflow: hidden; border-radius: 14px; background: #0b1020; }
.pl-hero-img { display: block; width: 100%; max-height: 440px; object-fit: contain; background: #f4f6f9; }
.pl-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pl-video-cover { position: absolute; inset: 0; padding: 0; border: 0; background: #000; cursor: pointer; }
.pl-video-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.pl-video-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: #e02424; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.pl-video-play .pl-ic { fill: #fff; stroke: none; }
.pl-video-cover:hover .pl-video-play { background: #ff1f1f; }
.pl-video-title { position: absolute; left: 0; right: 0; top: 0; padding: 12px 14px 22px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); color: #fff; font-size: 14px; font-weight: 600; text-align: left; }
.pl-sec { margin-bottom: 20px; }
.pl-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 16px; font-weight: 800; color: var(--navy, #001842); }
.pl-sec h3 .pl-ic { color: var(--c); }
.pl-sec p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; color: #2c3446; }
.pl-safety { padding: 14px 16px; border: 1px solid #f3c98b; border-left: 4px solid #e8890c; border-radius: 12px; background: #fff8ec; }
.pl-safety h3, .pl-safety h3 .pl-ic { color: #a04f00; }
.pl-safety p { color: #5b3a12; font-size: 14px; }
.pl-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 48px; border: 1px solid #e8ebf1; border-radius: 11px; background: #fbfcfd; font-size: 14.5px; line-height: 1.55; color: #24304a; }
.pl-steps li::before { content: counter(step); position: absolute; left: 12px; top: 9px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c); color: #fff; font-size: 13px; font-weight: 800; }
.pl-tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.55; color: #2c3446; }
.pl-more-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pl-more-videos .pl-video { border-radius: 12px; overflow: hidden; }
.pl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pl-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid #e8ebf1; }
.pl-view-side { display: flex; flex-direction: column; }
.pl-side-img { width: 100%; margin-bottom: 16px; border-radius: 14px; border: 1px solid #e8ebf1; }
.pl-view-side .pl-sec { padding: 14px 16px; border: 1px solid #e8ebf1; border-radius: 14px; background: #fbfcfd; }
.pl-materials ul { list-style: none; margin: 0; padding: 0; }
.pl-materials li { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eceff4; }
.pl-materials li:last-child { border-bottom: 0; }
.pl-materials li b { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.35; color: #1c2333; }
.pl-amt { display: block; font-size: 12.5px; color: var(--muted, #5d6679); }
.pl-materials li a { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; background: #eef3fb; font-size: 11.5px; font-weight: 700; color: #1b4f99; text-decoration: none; white-space: nowrap; }
.pl-materials li a:hover { background: #dde8f8; }
.pl-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-links a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #e3e7ee; border-radius: 10px; background: #fff; color: #1c2333; text-decoration: none; }
.pl-links a:hover { border-color: #001842; }
.pl-links a span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-links a small { font-size: 11.5px; color: #7a8396; }
.pl-links .pl-ic { color: #1b4f99; }
.pl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 6px 2px 0; font-size: 12px; color: #8a93a5; }
.pl-foot a { color: #5d6679; }
/* the editor */
.pl-edit-body { padding: 18px 22px; }
.pl-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.pl-f { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; }
.pl-f > span { font-size: 12.5px; font-weight: 700; color: #3f4a61; }
.pl-f > small { font-size: 12px; color: #7a8396; }
.pl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pl-rows { display: flex; flex-direction: column; gap: 6px; }
.pl-row { display: flex; gap: 6px; }
.pl-row .form-control { min-width: 0; height: 36px; font-size: 13.5px; }
.pl-icon-btn { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e3e7ee; border-radius: 9px; background: #fff; color: #9b2c2c; cursor: pointer; }
.pl-photo-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-photo-edit img, .pl-photo-edit .pl-nophoto { width: 160px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid #e3e7ee; }
.pl-edit-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid #eceef2; background: #fff; }
@media (max-width: 900px) {
  .pl-view-body, .pl-edit-grid { grid-template-columns: 1fr; }
  .pl-hero { flex-direction: column; align-items: flex-start; }
  .pl-tools { top: 0; position: static; }
}
@media (max-width: 520px) {
  .pl-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pl-sum, .pl-meta { display: none; }
  .pl-view-title h2 { font-size: 19px; }
  .pl-dlg { width: 100vw; max-height: 100vh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .pl-card, .pl-photo img { transition: none; } .pl-card:hover, .pl-card:hover .pl-photo img { transform: none; } }

/* ---- the project view, restructured: the media and "at a glance" on top, a section bar, materials as a checklist
   beside the safety panel, steps as numbered cards to tick off, tips as cards, then resources */
.pl-view-head { padding: 14px 22px; }
.pl-tabs { position: sticky; top: 77px; z-index: 2; display: flex; gap: 4px; overflow-x: auto; padding: 8px 22px; border-bottom: 1px solid #eceef2; background: rgba(250, 251, 253, .97); }
.pl-tabs button { flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font-size: 13.5px; font-weight: 650; color: #3f4a61; cursor: pointer; }
.pl-tabs button:hover { background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--navy); }
.pl-view-inner { padding: 20px 22px 28px; }
.pl-view-inner .pl-sec { scroll-margin-top: 140px; margin-bottom: 26px; }
.pl-view-inner .pl-sec > h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid color-mix(in srgb, var(--c) 22%, #fff); font-size: 18px; }
/* top: media + at a glance */
.pl-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 20px; margin-bottom: 24px; }
.pl-top .pl-media { margin: 0; align-self: start; border-radius: 14px; }
.pl-nophoto.big { aspect-ratio: 16 / 10; color: color-mix(in srgb, var(--c) 50%, #fff); background: color-mix(in srgb, var(--c) 8%, #f4f6f9); }
.pl-glance { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid #e6e9ef; border-radius: 14px; background: linear-gradient(180deg, #fbfcfe, #f5f7fb); }
.pl-glance-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.pl-glance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-glance-n { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #e6e9ef; border-radius: 11px; background: #fff; }
.pl-glance-n .pl-ic { grid-row: span 2; color: var(--c); }
.pl-glance-n b { font-size: 20px; font-weight: 800; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.pl-glance-n span { font-size: 12px; font-weight: 600; color: var(--muted); }
.pl-glance-safety { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 11px; text-align: left; }
.pl-glance-safety span { display: flex; flex-direction: column; } .pl-glance-safety b { font-size: 14px; } .pl-glance-safety small { font-size: 12px; opacity: .85; }
.pl-glance-safety.warn { border: 1px solid #f3c98b; background: #fff4e3; color: #8a4500; cursor: pointer; }
.pl-glance-safety.warn:hover { background: #ffecd0; }
.pl-glance-safety.ok { border: 1px solid #cfe9d8; background: #effaf3; color: #1f6b3a; }
.pl-glance-facts { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-glance-facts div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.pl-glance-facts dt { font-weight: 600; color: var(--muted); } .pl-glance-facts dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }
.pl-prose { max-width: none; } .pl-prose p { font-size: 15px; line-height: 1.7; }
/* materials and safety side by side */
.pl-two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 4px; }
.pl-two-col.one { grid-template-columns: 1fr; }
.pl-card-sec { padding: 14px 16px; border: 1px solid #e6e9ef; border-radius: 14px; background: #fff; }
.pl-view-inner .pl-card-sec > h3, .pl-view-inner .pl-safety > h3 { border-bottom: 0; padding-bottom: 0; }
.pl-h-note { margin-left: auto; font-size: 12px; font-weight: 600; color: #8a93a5; }
.pl-checklist { list-style: none; margin: 0; padding: 0; }
.pl-checklist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef0f4; }
.pl-checklist li:last-child { border-bottom: 0; }
.pl-checklist label { display: flex; align-items: flex-start; gap: 10px; margin: 0; min-width: 0; cursor: pointer; }
.pl-checklist input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: #1f8a4c; }
.pl-cl-text { display: flex; flex-direction: column; min-width: 0; }
.pl-cl-text b { font-size: 14px; font-weight: 650; line-height: 1.35; color: #1c2333; }
.pl-checklist li.done .pl-cl-text b { color: #8a93a5; text-decoration: line-through; }
.pl-checklist li a { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; background: #eef3fb; font-size: 12px; font-weight: 700; color: #1b4f99; text-decoration: none; white-space: nowrap; }
.pl-checklist li a:hover { background: #dde8f8; }
.pl-view-inner .pl-safety { padding: 16px 18px; }
/* steps */
.pl-progress { margin-left: 6px; padding: 2px 10px; border-radius: 999px; background: #eef1f6; font-size: 12px; font-weight: 700; color: #4a556b; }
.pl-progress.all { background: #e3f6ea; color: #1f6b3a; }
.pl-linkbtn { margin-left: auto; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: #5d6679; cursor: pointer; text-decoration: underline; }
.pl-steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: none; }
.pl-steplist li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid #e6e9ef; border-left: 4px solid var(--c); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 24, 66, .04); transition: background .15s ease, border-color .15s ease; }
.pl-step-n { flex: none; position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--c); color: #fff; cursor: pointer; }
.pl-step-num { font-size: 16px; font-weight: 800; }
.pl-step-n .pl-ic { position: absolute; opacity: 0; stroke-width: 3; }
.pl-step-text { flex: 1; min-width: 0; padding-top: 6px; font-size: 15px; line-height: 1.65; color: #1f2a40; }
.pl-steplist li.done { background: #f6fbf8; border-left-color: #1f8a4c; }
.pl-steplist li.done .pl-step-n { background: #1f8a4c; }
.pl-steplist li.done .pl-step-num { opacity: 0; } .pl-steplist li.done .pl-step-n .pl-ic { opacity: 1; }
.pl-steplist li.done .pl-step-text { color: #7a8396; }
.pl-caution { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 2px; padding: 7px 10px; border-radius: 8px; background: #fff4e3; color: #8a4500; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.pl-caution .pl-ic { margin-top: 3px; }
/* tips */
.pl-tipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pl-tip { position: relative; padding: 12px 14px 12px 16px; border-radius: 11px; background: #fffbea; border: 1px solid #f4e3a3; font-size: 14px; line-height: 1.55; color: #3d3510; }
/* resources */
.pl-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; margin-top: 10px; }
.pl-res a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #e3e7ee; border-radius: 11px; background: #fff; color: #1c2333; text-decoration: none; }
.pl-res a:hover { border-color: var(--navy); box-shadow: 0 2px 8px rgba(0, 24, 66, .08); }
.pl-res-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: #eef3fb; color: #1b4f99; }
.pl-res a.is-doc .pl-res-ic { background: #fdecec; color: #b42318; }
.pl-res-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-res-text b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-res-text small { font-size: 12px; color: #7a8396; }
.pl-view-inner .pl-gallery { margin-top: 10px; }
@media (max-width: 900px) {
  .pl-top, .pl-two-col { grid-template-columns: 1fr; }
  .pl-tabs { top: 0; position: relative; }
}
@media (prefers-reduced-motion: reduce) { .pl-steplist li { transition: none; } }
/* no video: the "at a glance" panel runs across the top in one row */
.pl-top.no-media { grid-template-columns: 1fr; }
.pl-top.no-media .pl-glance { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; }
.pl-top.no-media .pl-glance-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .pl-top.no-media .pl-glance { grid-template-columns: 1fr; } .pl-top.no-media .pl-glance-grid { grid-template-columns: 1fr 1fr; } }
/* the title and the section bar stay together at the top of the window, solid */
.pl-sticky { position: sticky; top: 0; z-index: 3; background: #fff; box-shadow: 0 1px 0 #eceef2; }
.pl-sticky .pl-view-head, .pl-sticky .pl-tabs { position: static; }
.pl-sticky .pl-view-head { background: #fff; }

/* ---- steps as a walkthrough: one large step at a time, a progress bar, numbered dots, Back / Next */
.pl-bar { height: 6px; margin: -4px 0 14px; border-radius: 999px; background: #eceff4; overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width .3s ease; }
.pl-step-card { display: flex; align-items: flex-start; gap: 20px; min-height: 150px; padding: 24px 26px; border: 1px solid #e6e9ef; border-left: 6px solid var(--c); border-radius: 16px;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--c) 4%, #fff)); box-shadow: 0 6px 18px rgba(0, 24, 66, .07); animation: pl-step-in .25s ease; }
@keyframes pl-step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.pl-step-big { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--c); color: #fff; font-size: 26px; font-weight: 900;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); }
.pl-step-big.ok { background: #1f8a4c; box-shadow: 0 4px 12px rgba(31, 138, 76, .35); }
.pl-step-big .pl-ic { stroke-width: 3; }
.pl-step-body { flex: 1; min-width: 0; }
.pl-step-body small { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 70%, #000); }
.pl-step-card .pl-step-text { padding-top: 0; font-size: 17.5px; line-height: 1.65; color: #16203a; }
.pl-step-done { align-items: center; }
.pl-step-done > div { flex: 1; } .pl-step-done b { font-size: 19px; color: #1f6b3a; } .pl-step-done p { margin: 2px 0 0; font-size: 14px; color: #4a556b; }
.pl-stepnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pl-stepnav[hidden] { display: none; }
.pl-stepnav .pl-btn { height: 44px; padding: 0 18px; font-size: 15px; }
.pl-stepnav .pl-btn:disabled { opacity: .4; cursor: default; }
.pl-next { min-width: 130px; justify-content: center; background: var(--c) !important; border-color: var(--c) !important; }
.pl-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pl-dots button { width: 30px; height: 30px; padding: 0; border: 1px solid #d9dee7; border-radius: 50%; background: #fff; font-size: 12px; font-weight: 700; color: #5d6679; cursor: pointer; }
.pl-dots button.past { border-color: color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 70%, #000); }
.pl-dots button.on { border-color: var(--c); background: var(--c); color: #fff; transform: scale(1.12); }
.pl-steplist li .pl-step-n { cursor: default; }
@media (max-width: 600px) {
  .pl-step-card { flex-direction: column; gap: 12px; padding: 18px; }
  .pl-step-big { width: 46px; height: 46px; font-size: 21px; }
  .pl-dots { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pl-step-card { animation: none; } .pl-bar i { transition: none; } }

/* ---- the project editor: grouped sections, list-style steps and tips, chips for subject and grades, type cards */
.pl-edit { --c: #001842; }
.pl-edit-sub { font-size: 13px; color: #5d6679; }
.pl-edit-body { padding: 18px 22px 8px; background: #f6f7fa; }
.pl-edit-grid { gap: 0 18px; align-items: start; }
.pl-eg { margin-bottom: 16px; padding: 14px 16px 16px; border: 1px solid #e3e7ee; border-radius: 14px; background: #fff; }
.pl-eg > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pl-eg h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 800; color: #001842; }
.pl-eg h3 .pl-ic { color: #b8892c; }
.pl-eg > header small { font-size: 12px; color: #7a8396; text-align: right; }
.pl-eg .pl-f:last-child { margin-bottom: 0; }
.pl-edit .form-control { border-color: #d3d9e3; border-radius: 9px; font-size: 14px; }
.pl-edit .form-control:focus { border-color: #001842; box-shadow: 0 0 0 3px rgba(0, 24, 66, .1); }
.pl-edit textarea.form-control { resize: none; overflow: hidden; line-height: 1.5; }
/* chips: subject and grade levels */
.pl-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-pick-chip { --c: #001842; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 1.5px solid #d9dee7; border-radius: 999px; background: #fff;
  font-size: 13.5px; font-weight: 650; color: #3f4a61; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.pl-pick-chip:hover { border-color: color-mix(in srgb, var(--c) 55%, #fff); }
.pl-pick-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); color: #001842; }
.pl-pick-chip.lv-ES { --c: #1f8a4c; } .pl-pick-chip.lv-MS { --c: #1c64c8; } .pl-pick-chip.lv-HS { --c: #6b3fd1; }
.pl-tick { display: grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid #c4cbd8; border-radius: 5px; color: transparent; }
.pl-pick-chip.on .pl-tick { border-color: var(--c); background: var(--c); color: #fff; }
.pl-tick .pl-ic { stroke-width: 3.2; }
/* type: two cards */
.pl-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-kind { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #d9dee7; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.pl-kind:hover { border-color: #9aa6ba; }
.pl-kind.on { border-color: #001842; background: #f3f6fb; box-shadow: 0 0 0 1px #001842; }
.pl-kind-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #eef1f6; color: #3f4a61; }
.pl-kind.on .pl-kind-ic { background: #001842; color: #fff; }
.pl-kind b { display: block; font-size: 14px; color: #001842; } .pl-kind small { display: block; font-size: 12px; color: #6b7487; line-height: 1.3; }
/* steps and tips: numbered boxes with tools */
.pl-tl { display: flex; flex-direction: column; gap: 8px; }
.pl-tl-row { display: flex; align-items: flex-start; gap: 8px; }
.pl-tl-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 5px; border-radius: 50%; background: #001842; color: #fff; font-size: 12.5px; font-weight: 800; }
.pl-tl-row textarea { flex: 1; min-height: 38px; }
.pl-tl-tools { flex: none; display: flex; gap: 4px; margin-top: 2px; }
.pl-tl-empty { margin: 0; padding: 10px; border-radius: 9px; background: #f6f7fa; font-size: 13px; color: #8a93a5; text-align: center; }
.pl-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #e3e7ee; border-radius: 8px; background: #fff; color: #4a556b; cursor: pointer; }
.pl-icon-btn:hover { border-color: #9aa6ba; color: #001842; }
.pl-icon-btn.danger { color: #b42318; } .pl-icon-btn.danger:hover { border-color: #f1b4ae; background: #fef3f2; }
.pl-icon-btn.off { opacity: .3; pointer-events: none; }
.pl-add-row { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; border: 1.5px dashed #b9c4d6; border-radius: 10px; background: #fbfcfe;
  font-size: 13.5px; font-weight: 700; color: #1b4f99; cursor: pointer; }
.pl-add-row:hover { border-color: #1b4f99; background: #eef3fb; }
.pl-add-row span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1b4f99; color: #fff; }
.pl-add-row span .pl-ic { stroke-width: 3; }
/* rows: materials, documents, links, videos */
.pl-rows { gap: 8px; }
.pl-row { align-items: center; }
.pl-row-head { padding: 0 2px; }
.pl-row-head span { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a93a5; }
.pl-row-pad { flex: none; width: 32px; }
.pl-yt { flex: none; display: grid; place-items: center; width: 54px; height: 36px; overflow: hidden; border-radius: 7px; background: #eef1f6; color: #8a93a5; }
.pl-yt img { width: 100%; height: 100%; object-fit: cover; }
.pl-yt.bad { background: #fef3f2; color: #b42318; }
/* photo */
.pl-photo-edit { align-items: flex-start; }
.pl-photo-btns { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pl-photo-btns small { font-size: 12px; color: #7a8396; }
.pl-btn-quiet { border-color: transparent; color: #b42318; }
/* hide from staff: a switch */
.pl-switch { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; cursor: pointer; }
.pl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pl-switch-ui { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; background: #cfd5df; transition: background .15s ease; }
.pl-switch-ui::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.pl-switch input:checked + .pl-switch-ui { background: #001842; }
.pl-switch input:checked + .pl-switch-ui::after { transform: translateX(18px); }
.pl-switch input:focus-visible + .pl-switch-ui { box-shadow: 0 0 0 3px rgba(0, 24, 66, .2); }
.pl-switch b { display: block; font-size: 14px; color: #001842; } .pl-switch small { display: block; font-size: 12px; color: #7a8396; }
.pl-edit-foot .pl-btn { height: 42px; padding: 0 18px; }
@media (max-width: 600px) { .pl-kinds { grid-template-columns: 1fr; } .pl-row { flex-wrap: wrap; } .pl-row .form-control { flex: 1 1 100% !important; } .pl-row-head { display: none; } }

/* Project pool <-> Projects: "Use for STEM Fest" in a pool project, the banner while choosing one, and the
   "Add a project" chooser on the Projects page (start from scratch, or choose from the pool) */
.pl-btn.pl-use { text-decoration: none; white-space: nowrap; }
.pl-picking { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border: 1px solid #cfe0f7; border-radius: 12px; background: #eef5ff; color: #173a6b; font-size: 14px; }
.pl-picking .pl-ic { color: #1b4f99; }
.pl-picking a { margin-left: auto; font-weight: 700; color: #1b4f99; text-decoration: none; white-space: nowrap; }
.pl-picking a:hover { text-decoration: underline; }
.ps-modal .modal-content { border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 24, 66, .25); }
.ps-modal .modal-header { align-items: flex-start; padding: 18px 20px 6px; border-bottom: 0; }
.ps-modal .modal-title { margin: 0; font-size: 20px; font-weight: 800; color: #001842; }
.ps-sub { margin: 2px 0 0; font-size: 14px; color: #5d6679; }
.ps-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 22px; }
.ps-option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1.5px solid #e1e5ec; border-radius: 13px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ps-option:hover, .ps-option:focus-visible { border-color: #1b4f99; box-shadow: 0 6px 18px rgba(0, 24, 66, .1); transform: translateY(-1px); outline: none; }
.ps-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 21px; background: #f1f3f7; color: #3f4a61; }
.ps-pool .ps-mark { background: #e8f1ff; color: #1b4f99; }
.ps-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ps-text b { font-size: 15.5px; color: #10203f; }
.ps-text small { font-size: 13px; color: #5d6679; }
.ps-go { flex: none; font-size: 18px; color: #9aa3b5; transition: color .15s, transform .15s; }
.ps-option:hover .ps-go { color: #1b4f99; transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .ps-option, .ps-go { transition: none; } .ps-option:hover { transform: none; } }

/* the Tasks tab switched off under Settings: its link is hidden on every page */
html.tasks-off a.nav-link[href="/Tasks"] { display: none !important; }

/* Project pool: a step or material listed twice is marked (editors), in the project and in the edit window */
.pl-twice { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fff1d6; border: 1px solid #f3c98b;
  font-size: 11.5px; font-weight: 700; color: #8a4500; white-space: nowrap; vertical-align: 2px; }
.pl-twice .pl-ic { stroke-width: 2.4; }
.pl-checklist li.pl-dup { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; background: #fff8ea; }
.pl-steplist li.pl-dup, .pl-step-card.pl-dup { border-color: #f3c98b; border-left-color: #e8930c; background: #fffaf0; }
.pl-step-card.pl-dup small .pl-twice { margin-left: 10px; }
.pl-step-text > .pl-twice { margin: 0 0 6px; }
.pl-dots button.dup { box-shadow: 0 0 0 2px #e8930c; }
.pl-tl-row.pl-dup, .pl-rows .pl-row.pl-dup { flex-wrap: wrap; padding: 6px; margin: -2px -6px; border-radius: 10px; background: #fff8ea; outline: 1.5px solid #f3c98b; }
.pl-tl-row.pl-dup textarea, .pl-rows .pl-row.pl-dup input { border-color: #f3c98b; }
.pl-tl-row.pl-dup > .pl-twice, .pl-rows .pl-row.pl-dup > .pl-twice { order: 99; margin: 4px 0 0 36px; }
.pl-rows .pl-row.pl-dup > .pl-twice { margin-left: 0; }

/* Project pool drafts (editors only): a ribbon on the card, a badge and a banner in the project, and Publish */
.pl-card.is-hidden { opacity: 1; border-style: dashed; border-color: #d9a441; }
.pl-card.is-hidden .pl-photo img { filter: saturate(.55); }
.pl-draft-tag { position: absolute; z-index: 1; top: 10px; right: 10px; padding: 2px 10px; border-radius: 999px; background: #8a4500; color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pl-draft-badge { padding: 1px 8px; border-radius: 6px; background: #8a4500; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pl-draft-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 11px 14px; border: 1px solid #f3c98b; border-radius: 12px; background: #fff6e6; color: #6b3a00; font-size: 14px; }
.pl-btn.pl-btn-publish { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.pl-btn.pl-btn-publish:hover { background: #18703d; border-color: #18703d; }
.pl-unpublish { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: #8a93a5; text-decoration: underline; cursor: pointer; }

/* awards show: readable on every division color. Winner and podium slides are a darker shade of the division color,
   and the small labels (Students, School, Instructor) are soft white instead of the medal color, which disappeared on
   gold and brown divisions. */

/* the place words ("3rd Place") in a lighter tint of the medal, so bronze still reads on red and brown divisions */

/* winner titles: a soft dark shadow keeps white text crisp on light division colors (yellow, gold); 1st place keeps its glow */

/* ==========================================================================================================
   Awards show (awards.js build): a dark navy stage with spotlights, medals in gold, silver and
   bronze, the division colour only as an accent.
   ========================================================================================================== */
.aw.design-gala, body:has(.aw.design-gala) { background: #050b1f; }
.g-slide { color: #fff; background: radial-gradient(120vw 90vh at 50% -10%, #13275a 0%, #0a1636 45%, #050b1f 100%); }
.g-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-beam { position: absolute; top: -20vh; width: 34vw; height: 130vh; transform-origin: 50% 0; opacity: .5;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 75%); filter: blur(1.2vh); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); }
.g-beam.b1 { left: 8vw; transform: rotate(16deg); animation: g-sway 9s ease-in-out infinite alternate; }
.g-beam.b2 { left: 33vw; opacity: .35; }
.g-beam.b3 { right: 8vw; transform: rotate(-16deg); animation: g-sway 9s 1.5s ease-in-out infinite alternate-reverse; }
@keyframes g-sway { from { rotate: -3deg; } to { rotate: 3deg; } }
.g-glow { position: absolute; left: 50%; bottom: -30vh; width: 90vw; height: 60vh; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent, #3d6fd8) 45%, transparent), transparent); opacity: .55; }
.g-slide > div:not(.g-bg):not(.aw-confetti):not(.aw-stem):not(.g-stage) { position: relative; z-index: 1; }
.g-slide > .aw-confetti { z-index: 0; opacity: .75; }
.g-slide .aw-top { z-index: 2; }
@keyframes g-rise { from { opacity: 0; transform: translateY(3.5vh); } to { opacity: 1; transform: none; } }
@keyframes g-pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes g-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* shared text */
.g-kicker { margin: 0 0 1.6vh; font-size: 2.3vh; font-weight: 800; letter-spacing: .34em; text-transform: uppercase; color: #f2cf6b; animation: g-rise .7s .1s both; }
.g-sub { margin: 2.6vh 0 0; font-size: 2.9vh; font-weight: 500; color: #c9d5ee; animation: g-rise .7s .45s both; }
.g-rule { display: flex; align-items: center; justify-content: center; gap: 1.4vh; margin: 3vh auto 0; animation: g-rise .7s .35s both; }
.g-rule i { width: 12vh; height: .3vh; background: linear-gradient(90deg, transparent, #e2b33c); }
.g-rule i:last-child { transform: scaleX(-1); }
.g-rule b { width: 1.4vh; height: 1.4vh; transform: rotate(45deg); background: #e2b33c; box-shadow: 0 0 2vh rgba(226, 179, 60, .7); }
.g-chip { display: inline-flex; align-items: center; gap: 1.1vh; padding: .9vh 2vh; border-radius: 999px; background: rgba(255, 255, 255, .08); border: .2vh solid rgba(255, 255, 255, .16);
  font-size: 2.1vh; font-weight: 800; letter-spacing: .04em; color: #fff; animation: g-rise .6s .05s both; }
.g-chip i { width: 1.5vh; height: 1.5vh; border-radius: 50%; box-shadow: 0 0 0 .35vh rgba(255, 255, 255, .15); }
.g-chip em { margin-left: .6vh; padding-left: 1.3vh; border-left: .2vh solid rgba(255, 255, 255, .22); font-style: normal; font-weight: 600; color: #b9c6e2; }

/* opening and closing */
.g-open-in { max-width: 82vw; text-align: center; }
.g-open .aw-lockup-big { animation: g-pop .9s .05s both; }
.g-open h1 { margin: 0; font-size: 12vh; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; color: #fff;
  background: linear-gradient(100deg, #fff 0%, #fff 40%, #fbe7a1 50%, #fff 60%, #fff 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: g-rise .8s .2s both, g-shine 5s 1.2s ease-in-out infinite; }
.g-open .g-kicker { margin-top: 5vh; }
.g-close h1 { font-size: 13vh; }

/* division */
.g-div-in { text-align: center; max-width: 84vw; }
.g-div h2 { margin: 0; font-size: 11vh; font-weight: 900; letter-spacing: -.025em; line-height: 1.04; color: #fff; animation: g-rise .8s .2s both; text-wrap: balance; }
.g-accent-bar { width: 22vh; height: .8vh; margin: 3.4vh auto 0; border-radius: 999px; background: var(--accent); box-shadow: 0 0 3vh color-mix(in srgb, var(--accent) 70%, transparent); animation: g-grow .8s .4s both; }
@keyframes g-grow { from { width: 0; opacity: 0; } to { width: 22vh; opacity: 1; } }

/* winner */
.g-win-in { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5vw; width: 100%; max-width: 88vw; margin-top: 6vh; text-align: left; }
.g-emblem { position: relative; display: grid; justify-items: center; width: 40vh; }
.g-laurel { position: absolute; top: -3vh; width: 40vh; height: 40vh; fill: var(--m2); opacity: .95; filter: drop-shadow(0 .4vh .8vh rgba(0, 0, 0, .4)); animation: g-pop .9s .1s both; }
.g-laurel .g-stem { fill: none; stroke: var(--m3); stroke-width: 2.2; stroke-linecap: round; }
.g-disc { position: relative; display: grid; place-items: center; align-content: center; width: 24vh; height: 24vh; margin-top: 5vh; border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, var(--m1) 0%, var(--m2) 48%, var(--m3) 100%);
  box-shadow: inset 0 .6vh 1.4vh rgba(255, 255, 255, .55), inset 0 -1.2vh 2vh rgba(0, 0, 0, .25), 0 2.4vh 5vh rgba(0, 0, 0, .5), 0 0 7vh color-mix(in srgb, var(--m2) 45%, transparent);
  animation: g-pop .8s .25s both; }
.g-disc::after { content: ""; position: absolute; inset: 1.6vh; border-radius: 50%; border: .35vh solid rgba(255, 255, 255, .45); }
.g-disc b { font-size: 13vh; font-weight: 900; line-height: .9; color: #1b1407; text-shadow: 0 .3vh 0 rgba(255, 255, 255, .45); }
.place-2 .g-disc b { color: #1d2430; } .place-3 .g-disc b { color: #2a1508; }
.g-disc small { margin-top: .4vh; font-size: 2.2vh; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: rgba(0, 0, 0, .55); }
.g-ord { margin-top: 5vh; padding: 1vh 3.2vh; border-radius: 999px; background: linear-gradient(90deg, var(--m3), var(--m2), var(--m3)); color: #fff;
  font-size: 2.6vh; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 .2vh .4vh rgba(0, 0, 0, .55); box-shadow: 0 1vh 2.4vh rgba(0, 0, 0, .4); animation: g-rise .7s .45s both; }
.g-text { min-width: 0; }
.g-title { margin: 2.4vh 0 0; font-size: 8.4vh; font-weight: 900; letter-spacing: -.025em; line-height: 1.04; color: #fff; text-wrap: balance; text-shadow: 0 .4vh 2vh rgba(0, 0, 0, .45); animation: g-rise .8s .3s both; }
.place-1 .g-title { font-size: 9vh; }
.g-facts { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 1.6vh; margin-top: 4.4vh; animation: g-rise .8s .55s both; }
.g-fact { display: flex; flex-direction: column; gap: 1vh; min-width: 0; padding: 2vh 2.2vh; border-radius: 1.8vh; background: rgba(255, 255, 255, .06); border: .2vh solid rgba(255, 255, 255, .12);
  border-top: .5vh solid var(--m2); }
.g-fact small { font-size: 1.7vh; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #aebbd8; }
.g-fact span { font-size: 3.1vh; font-weight: 800; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }

/* podium */
.g-pod { justify-content: flex-start; padding-top: 15vh; }
.g-pod-head { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; }
.g-pod-head h2 { margin: 0; font-size: 6.4vh; font-weight: 900; letter-spacing: -.02em; color: #fff; animation: g-rise .7s .1s both; }
.g-slide > .g-stage { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 26vw); align-items: end; gap: 1.6vw; z-index: 1; }
.g-stage.n2 { grid-template-columns: repeat(2, 28vw); }
.g-col { display: flex; flex-direction: column; animation: g-rise .8s both; }
.g-col.place-3 { animation-delay: .25s; } .g-col.place-2 { animation-delay: .45s; } .g-col.place-1 { animation-delay: .7s; }
.g-card { display: flex; flex-direction: column; gap: .9vh; padding: 2.2vh 1.8vw 2.4vh; border-radius: 2vh 2vh 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: .2vh solid rgba(255, 255, 255, .14); border-bottom: 0; text-align: center; }
.g-card-place { align-self: center; padding: .5vh 1.6vh; border-radius: 999px; background: var(--m2); color: #14100a; font-size: 1.8vh; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.place-2 .g-card-place { color: #1d2430; }
.g-card b { font-size: 3vh; font-weight: 800; line-height: 1.2; color: #fff; text-wrap: balance; }
.g-card small { font-size: 2vh; font-weight: 600; color: #dbe3f3; }
.g-card em { font-style: normal; font-size: 1.8vh; font-weight: 700; letter-spacing: .08em; color: #aebbd8; }
.g-step { display: grid; place-items: start center; padding-top: 1.6vh; border-radius: 0 0 1vh 1vh;
  background: linear-gradient(180deg, var(--m1) 0%, var(--m2) 45%, var(--m3) 100%); box-shadow: inset 0 .5vh 0 rgba(255, 255, 255, .45), 0 2vh 4vh rgba(0, 0, 0, .45); }
.g-step span { font-size: 7.4vh; font-weight: 900; line-height: 1; color: rgba(0, 0, 0, .55); text-shadow: 0 .3vh 0 rgba(255, 255, 255, .35); }
.g-col.place-1 .g-step { height: 22vh; } .g-col.place-2 .g-step { height: 16vh; } .g-col.place-3 .g-step { height: 12vh; }
.g-col.place-1 .g-card { box-shadow: 0 0 6vh rgba(226, 179, 60, .25); border-color: rgba(251, 231, 161, .45); }

.aw.design-gala .aw-dots i.on { background: #f2cf6b; }
@media (prefers-reduced-motion: reduce) { .g-beam, .g-open h1 { animation: none !important; } }

/* Gala winner medal (awards.js medal()): ribbon, milled coin, engraved wreath and star, stamped number; the caption
   below is engraved-style text between two thin rules instead of a pill */
.g-emblem { width: 42vh; }
.g-medal { display: block; width: 40vh; height: auto; overflow: visible; filter: drop-shadow(0 2vh 3vh rgba(0, 0, 0, .45)); animation: g-drop .9s .1s both cubic-bezier(.2, 1.2, .4, 1); transform-origin: 50% 0; }
@keyframes g-drop { 0% { opacity: 0; transform: translateY(-6vh) rotate(-6deg); } 60% { opacity: 1; transform: translateY(.6vh) rotate(2deg); } 100% { transform: none; } }
.g-medal-num { font-family: var(--font-sans); font-size: 96px; font-weight: 900; letter-spacing: -2px; }
.g-medal-shine { opacity: 0; animation: g-glint 5.5s 1.4s ease-in-out infinite; }
@keyframes g-glint { 0%, 70% { opacity: 0; transform: translateX(-60px); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(60px); } }
.g-medal-shine { transform-box: fill-box; }
.g-win.place-1 .g-medal { filter: drop-shadow(0 2vh 3vh rgba(0, 0, 0, .45)) drop-shadow(0 0 4vh rgba(226, 179, 60, .35)); }
.g-ord { display: flex; align-items: center; gap: 1.6vh; margin-top: 2.6vh; padding: 0; border-radius: 0; background: none; box-shadow: none; text-shadow: none;
  font-size: 2.7vh; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: var(--m1); animation: g-rise .7s .55s both; }
.g-ord span { padding-left: .3em; white-space: nowrap; }
.g-ord i { width: 5vh; height: .25vh; background: linear-gradient(90deg, transparent, var(--m2)); }
.g-ord i:last-child { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { .g-medal, .g-medal-shine { animation: none !important; } }

/* ---- Gala design, round 3: animations and the students / school / instructor layout ---- */
/* slide entrances: the opening zooms out of a soft blur, a division opens like an iris, a winner slides in from the
   right, the podium fades up */
.aw-slide.g-slide { animation: g-enter-fade .9s cubic-bezier(.2, .8, .2, 1) both; }
.aw-slide.g-open { animation: g-enter-zoom 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.aw-slide.g-div { animation: g-enter-iris 1.1s cubic-bezier(.65, 0, .25, 1) both; }
.aw-slide.g-win { animation: g-enter-slide .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes g-enter-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes g-enter-zoom { from { opacity: 0; transform: scale(1.08); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes g-enter-iris { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(150% at 50% 50%); } }
@keyframes g-enter-slide { from { opacity: 0; transform: translateX(6vw); } to { opacity: 1; transform: none; } }

/* the spotlights fade up, then sway; sparkles twinkle */
.g-beam { animation: g-beam-in 1.6s .1s both; }
.g-beam.b1 { animation: g-beam-in 1.6s .1s both, g-sway 9s 1.7s ease-in-out infinite alternate; }
.g-beam.b3 { animation: g-beam-in 1.6s .3s both, g-sway 9s 1.9s ease-in-out infinite alternate-reverse; }
@keyframes g-beam-in { from { opacity: 0; } }
.g-sparkles { position: absolute; inset: 0; }
.g-sparkles i { position: absolute; width: .55vh; height: .55vh; border-radius: 50%; background: #fff; box-shadow: 0 0 1.2vh 0.2vh rgba(255, 255, 255, .8); opacity: 0; animation: g-twinkle 3s ease-in-out infinite; }
@keyframes g-twinkle { 0%, 100% { opacity: 0; } 50% { opacity: .75; } }

/* headings appear word by word: each word rises out of a blur */
.g-w { display: inline-block; animation: g-word .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes g-word { from { opacity: 0; transform: translateY(.55em) rotateX(-50deg); filter: blur(.12em); } to { opacity: 1; transform: none; filter: none; } }
.g-title, .g-div h2, .g-pod-head h2 { animation: none; perspective: 60vh; }
.g-open h1 { animation: none; background: none; -webkit-text-fill-color: currentColor; color: #fff; text-shadow: 0 0 5vh rgba(242, 207, 107, .25); perspective: 60vh; }

/* the medal: rings burst out behind it as it lands */
.g-emblem { position: relative; }
.g-burst { position: absolute; left: 50%; top: 57%; width: 28vh; height: 28vh; margin: -14vh 0 0 -14vh; border-radius: 50%; border: .45vh solid var(--m2); opacity: 0; pointer-events: none;
  animation: g-burst 1.4s .75s cubic-bezier(.2, .8, .2, 1) both; }
.g-burst.b2 { border-width: .25vh; animation-delay: .95s; }
@keyframes g-burst { 0% { opacity: .9; transform: scale(.55); } 100% { opacity: 0; transform: scale(1.9); } }
.g-medal-shine { display: none; }

/* students: name chips with an initials badge */
.g-people { margin-top: 4vh; }
.g-label { display: block; margin-bottom: 1.4vh; font-size: 1.7vh; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: #aebbd8; animation: g-rise .6s var(--after, 1s) both; animation-delay: calc(var(--after, 1s) - .5s); }
.g-kids { display: flex; flex-wrap: wrap; gap: 1.4vh 1.6vh; }
.g-kid { display: inline-flex; align-items: center; gap: 1.5vh; max-width: 100%; padding: .9vh 2.6vh .9vh .9vh; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05)); border: .2vh solid rgba(255, 255, 255, .16); box-shadow: 0 1vh 2.4vh rgba(0, 0, 0, .25);
  animation: g-chip-in .7s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes g-chip-in { from { opacity: 0; transform: translateY(2vh) scale(.85); } to { opacity: 1; transform: none; } }
.g-kid i { flex: none; display: grid; place-items: center; width: 6vh; height: 6vh; border-radius: 50%; font-style: normal; font-size: 2.3vh; font-weight: 900; letter-spacing: .04em; color: #1b1407;
  background: radial-gradient(circle at 34% 28%, var(--m1), var(--m2) 55%, var(--m3)); box-shadow: inset 0 .3vh .6vh rgba(255, 255, 255, .5), 0 .4vh 1vh rgba(0, 0, 0, .35); }
.place-2 .g-kid i { color: #1d2430; } .place-3 .g-kid i { color: #2a1508; }
.g-kid b { font-size: 3.2vh; font-weight: 800; line-height: 1.2; color: #fff; }

/* school and instructor: one bar, an icon for each */
.g-info { display: flex; align-items: stretch; max-width: 100%; margin-top: 3.2vh; border-radius: 2vh; overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); border: .2vh solid rgba(255, 255, 255, .12); border-left: .6vh solid var(--m2);
  animation: g-rise .8s both; animation-delay: var(--after, 1.2s); }
.g-info-item { flex: 1; display: flex; align-items: center; gap: 2vh; min-width: 0; padding: 2.1vh 2.8vh; }
.g-info-ic { flex: none; display: grid; place-items: center; width: 6vh; height: 6vh; border-radius: 1.6vh; color: var(--m1); background: color-mix(in srgb, var(--m2) 20%, transparent); border: .2vh solid color-mix(in srgb, var(--m2) 40%, transparent); }
.g-info-ic svg { width: 3.4vh; height: 3.4vh; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.g-info-item div { display: flex; flex-direction: column; gap: .5vh; min-width: 0; }
.g-info-item small { font-size: 1.6vh; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: #aebbd8; }
.g-info-item b { font-size: 3vh; font-weight: 800; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.g-info-sep { flex: none; width: .2vh; margin: 2vh 0; background: rgba(255, 255, 255, .14); }
.g-facts { display: none; }

/* podium: the steps rise from the floor one after another, then each card drops onto its step */
.g-col { animation: none; }
.g-step { transform-origin: 50% 100%; animation: g-step-up .9s cubic-bezier(.2, .9, .3, 1.15) both; }
.g-card { animation: g-card-drop .8s cubic-bezier(.2, 1.2, .4, 1) both; }
.g-col.place-3 .g-step { animation-delay: .35s; } .g-col.place-3 .g-card { animation-delay: 1.05s; }
.g-col.place-2 .g-step { animation-delay: .6s; }  .g-col.place-2 .g-card { animation-delay: 1.3s; }
.g-col.place-1 .g-step { animation-delay: .85s; } .g-col.place-1 .g-card { animation-delay: 1.6s; }
@keyframes g-step-up { from { transform: scaleY(0); } to { transform: none; } }
@keyframes g-card-drop { from { opacity: 0; transform: translateY(-5vh); } to { opacity: 1; transform: none; } }
.g-col.place-1 .g-card { animation: g-card-drop .8s 1.6s cubic-bezier(.2, 1.2, .4, 1) both, g-pulse 3s 2.6s ease-in-out infinite; }
@keyframes g-pulse { 0%, 100% { box-shadow: 0 0 6vh rgba(226, 179, 60, .2); } 50% { box-shadow: 0 0 9vh rgba(226, 179, 60, .45); } }

@media (prefers-reduced-motion: reduce) {
  .aw-slide.g-slide, .g-w, .g-kid, .g-info, .g-label, .g-step, .g-card, .g-burst, .g-sparkles i, .g-beam { animation: none !important; opacity: 1; }
  .g-burst, .g-sparkles { display: none; }
}
/* Gala: student chips are names only (no initials badge) */
.g-kid { padding: 1.2vh 2.8vh; }

/* medal, round 3: one soft shadow (no second offset coin), the number pressed in with a soft inner shadow, a tighter
   caption, and no confetti around the medal and its caption */
.g-medal { filter: drop-shadow(0 1.4vh 2.2vh rgba(0, 0, 0, .38)); }
.g-win.place-1 .g-medal { filter: drop-shadow(0 1.4vh 2.2vh rgba(0, 0, 0, .38)) drop-shadow(0 0 3.5vh rgba(226, 179, 60, .3)); }
.g-medal-num { paint-order: stroke; stroke: rgba(0, 0, 0, .18); stroke-width: 3px; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .25)); }
.g-ord { gap: 1.4vh; font-size: 2.8vh; letter-spacing: .16em; }
.g-ord span { padding-left: .16em; }
.g-ord i { width: 4vh; }
.g-win > .aw-confetti { -webkit-mask-image: radial-gradient(22vw 46vh at 19% 58%, transparent 70%, #000 92%); mask-image: radial-gradient(22vw 46vh at 19% 58%, transparent 70%, #000 92%); }
/* medal number: no outline; a thin light edge below only, like an engraving catching the light */
.g-medal-num { stroke: none; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .32)); }

/* podium, round 2: solid cards (confetti goes behind them), real podium blocks with a lit top surface and a darker
   front, large engraved numbers centred in each block, a brighter school line, and the stage lifted off the bottom */
.g-slide > .g-stage { bottom: 10vh; }
.g-card { background: linear-gradient(180deg, #1c2b55 0%, #121d3d 100%); border-color: rgba(255, 255, 255, .16); box-shadow: 0 -1vh 3vh rgba(0, 0, 0, .25); }
.g-col.place-1 .g-card { background: linear-gradient(180deg, #24335f 0%, #15204a 100%); }
.g-card em { color: #d6deef; font-size: 1.9vh; }
.g-step { position: relative; display: grid; place-items: center; padding-top: 2.6vh; border-radius: 0 0 1.2vh 1.2vh;
  background: linear-gradient(180deg, var(--m2) 0%, var(--m3) 100%);
  box-shadow: inset 0 -1.4vh 2.4vh rgba(0, 0, 0, .22), 0 2vh 4vh rgba(0, 0, 0, .45); }
.g-step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2.6vh;   /* the lit top surface of the block */
  background: linear-gradient(180deg, var(--m1), color-mix(in srgb, var(--m1) 55%, var(--m2))); box-shadow: 0 .3vh .6vh rgba(0, 0, 0, .25); }
.g-step span { position: relative; font-size: 9vh; font-weight: 900; line-height: 1; text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
  color: color-mix(in srgb, var(--m3) 55%, #000); }
.g-col.place-1 .g-step { height: 24vh; } .g-col.place-2 .g-step { height: 17vh; } .g-col.place-3 .g-step { height: 12.5vh; }
.g-col.place-3 .g-step span { font-size: 7.5vh; }
/* podium: the top surface of each block is a thinner strip in a deeper metal tone (silver no longer reads as a white band) */
.g-step::before { height: 2vh; background: linear-gradient(180deg, color-mix(in srgb, var(--m1) 60%, var(--m2)), var(--m2)); }
.g-col.place-2 .g-step::before { background: linear-gradient(180deg, #d9e0ea, #b9c3d1); }

/* ==========================================================================================================
   Staff feedback (wwwroot/js/feedback.js): the button in the top bar, the form, and the responses page
   ========================================================================================================== */
.fb-ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fb-ic.fill { fill: currentColor; stroke-width: 1.2; }
.fb-open { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .12); color: #fff !important; font-weight: 700; white-space: nowrap; }
.fb-open:hover { background: #fff; color: #001842 !important; border-color: #fff; }

/* the form */
.fb-dlg { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 18px; background: #f6f8fb; color: #10203f;
  box-shadow: 0 30px 80px rgba(0, 24, 66, .35); overflow: hidden; }
.fb-dlg::backdrop { background: rgba(6, 14, 34, .55); backdrop-filter: blur(3px); }
.fb-dlg[open] { animation: fb-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes fb-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fb-dlg-in { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.fb-dlg-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 16px; background: linear-gradient(135deg, #001842, #13306b); color: #fff; }
.fb-dlg-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .14); }
.fb-dlg-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: #fff !important; }
.fb-dlg-sub { margin: 3px 0 0; font-size: 13.5px; color: #c9d5ee; }
.fb-view-link { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; align-self: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.fb-view-link:hover { background: #fff; color: #001842; }
.fb-x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.fb-dlg-head .fb-view-link + .fb-x { margin-left: 4px; }
.fb-dlg-head > div + .fb-x { margin-left: auto; }
.fb-x:hover { background: rgba(255, 255, 255, .22); }
.fb-last { margin: 0; padding: 9px 22px; background: #eef5ff; border-bottom: 1px solid #d9e6f8; font-size: 13px; color: #1b4f99; }
.fb-form { overflow-y: auto; padding: 16px 22px 0; }
.fb-sec { margin-bottom: 14px; padding: 16px 18px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff; }
.fb-sec-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.fb-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #001842; color: #fff; font-size: 13px; font-weight: 800; }
.fb-sec-head h3 { margin: 2px 0 0; font-size: 16px; font-weight: 800; color: #10203f; }
.fb-sec-head p { margin: 2px 0 0; font-size: 12.5px; color: #6b7487; }
/* overall: big stars */
.fb-overall { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fb-stars { display: flex; gap: 6px; }
.fb-stars button { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1.5px solid #e1e6ee; border-radius: 12px; background: #fff; color: #d3d9e3; cursor: pointer;
  transition: transform .12s ease, color .12s ease, background .12s ease, border-color .12s ease; }
.fb-stars button:hover { transform: translateY(-2px); }
.fb-stars button.on { color: #e2a400; background: #fff8e1; border-color: #f2cf6b; }
.fb-star-word { font-size: 15px; font-weight: 700; color: #8a93a5; }
.fb-star-word.set { color: #8a5a00; }
/* each part: 1-5 and N/A */
.fb-areas { display: flex; flex-direction: column; }
.fb-area { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid #eef1f5; }
.fb-area:first-child { border-top: 0; padding-top: 0; }
.fb-area-text { display: flex; flex-direction: column; min-width: 0; }
.fb-area-text b { font-size: 14px; font-weight: 700; color: #1c2333; }
.fb-area-text small { font-size: 12px; color: #7a8396; }
.fb-scale { flex: none; display: flex; gap: 4px; }
.fb-scale button { width: 36px; height: 34px; padding: 0; border: 1.5px solid #e1e6ee; border-radius: 9px; background: #fff; font-size: 14px; font-weight: 700; color: #3f4a61; cursor: pointer; }
.fb-scale button.na { width: 46px; font-size: 12px; color: #7a8396; }
.fb-scale button:hover { border-color: #9fb2d3; }
.fb-scale button.on { background: #001842; border-color: #001842; color: #fff; }
.fb-scale button.na.on { background: #6b7487; border-color: #6b7487; }
/* take part again */
.fb-chips { display: flex; gap: 8px; }
.fb-chip { min-width: 96px; height: 40px; padding: 0 18px; border: 1.5px solid #e1e6ee; border-radius: 999px; background: #fff; font-size: 14.5px; font-weight: 700; color: #3f4a61; cursor: pointer; }
.fb-chip.yes.on { background: #e3f6ea; border-color: #1f8a4c; color: #1f6b3a; }
.fb-chip.maybe.on { background: #fff4e0; border-color: #d48a00; color: #8a5a00; }
.fb-chip.no.on { background: #fdecec; border-color: #c2412d; color: #a12c1c; }
/* text */
.fb-field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 10px; }
.fb-field:last-child { margin-bottom: 0; }
.fb-field span { font-size: 13.5px; font-weight: 700; color: #1c2333; }
.fb-field textarea { resize: vertical; min-height: 70px; font-size: 14px; }
.fb-error { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: #fdecec; color: #a12c1c; font-size: 13.5px; font-weight: 600; }
/* footer */
.fb-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 -22px; padding: 12px 22px;
  border-top: 1px solid #e3e8f0; background: rgba(246, 248, 251, .97); }
.fb-anon { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.fb-anon input { width: 18px; height: 18px; margin: 0; }
.fb-anon span { display: flex; flex-direction: column; } .fb-anon b { font-size: 13.5px; } .fb-anon small { font-size: 12px; color: #7a8396; }
.fb-foot-btns { display: flex; gap: 8px; margin-left: auto; }
.fb-send { min-width: 140px; font-weight: 700; }
/* thank you */
.fb-thanks { display: flex; flex-direction: column; align-items: center; padding: 46px 28px 34px; text-align: center; }
.fb-thanks-ic { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: #e3f6ea; color: #1f8a4c; animation: fb-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.fb-thanks-ic .fb-ic { stroke-width: 2.6; }
@keyframes fb-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-thanks h2 { margin: 16px 0 6px; font-size: 24px; font-weight: 800; color: #10203f !important; }
.fb-thanks p { max-width: 42ch; margin: 0; font-size: 15px; color: #5d6679; }
.fb-thanks-btns { display: flex; gap: 10px; margin-top: 22px; }
.fb-thanks-btns .fb-view-link { margin: 0; background: #eef3fb; color: #1b4f99; }
@media (max-width: 600px) {
  .fb-area { flex-direction: column; align-items: flex-start; }
  .fb-stars button { width: 44px; height: 44px; }
  .fb-dlg-head .fb-view-link { display: none; }
}

/* the responses page */
.fb-page { padding-top: 22px; padding-bottom: 60px; }
.fb-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fb-eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6b7487; }
.fb-hero h1 { margin: 2px 0 0; font-size: 26px; font-weight: 800; }
.fb-sub { margin: 4px 0 0; color: #5d6679; }
.fb-hero-tools { display: flex; gap: 8px; }
.fb-hero-tools select { width: auto; }
.fb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.fb-stat { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff; }
.fb-stat small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7487; }
.fb-stat b { font-size: 26px; font-weight: 800; color: #001842; font-variant-numeric: tabular-nums; }
.fb-stat span { font-size: 12.5px; color: #7a8396; }
.fb-stat.gold b { color: #8a5a00; } .fb-stat.green b { color: #1f6b3a; }
.fb-stat .fb-mini-stars { color: #e2a400; }
.fb-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-bottom: 22px; }
.fb-card { padding: 16px 18px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff; }
.fb-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.fb-bar-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 34px 26px; align-items: center; gap: 10px; padding: 6px 0; }
.fb-bar-row.dist { grid-template-columns: 96px minmax(0, 1fr) 30px; }
.fb-bar-label { font-size: 13.5px; font-weight: 600; color: #1c2333; }
.fb-bar { position: relative; height: 10px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.fb-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: #8a93a5; transition: width .5s ease; }
.fb-bar i.good { background: #1f8a4c; } .fb-bar i.ok { background: #d48a00; } .fb-bar i.low { background: #c2412d; } .fb-bar i.gold { background: #e2a400; }
.fb-bar-val { font-size: 14px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.fb-bar-n { font-size: 11.5px; color: #8a93a5; }
.fb-mini-stars { display: inline-flex; gap: 1px; color: #e2a400; }
.fb-mini-stars .fb-ic:not(.fill) { color: #d3d9e3; }
.fb-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fb-list-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.fb-list-head input { max-width: 280px; }
.fb-list { display: flex; flex-direction: column; gap: 10px; }
.fb-resp { padding: 14px 16px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff; }
.fb-resp header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fb-who { display: flex; flex-direction: column; margin-right: auto; } .fb-who b { font-size: 15px; } .fb-who small { font-size: 12px; color: #7a8396; }
.fb-resp-overall { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #8a5a00; }
.fb-again { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fb-again.yes { background: #e3f6ea; color: #1f6b3a; } .fb-again.maybe { background: #fff4e0; color: #8a5a00; } .fb-again.no { background: #fdecec; color: #a12c1c; }
.fb-resp-ratings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fb-resp-ratings:empty { display: none; }
.fb-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #f1f4f8; font-size: 12px; font-weight: 600; color: #3f4a61; }
.fb-pill b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11.5px; background: #8a93a5; }
.fb-pill.r4 b, .fb-pill.r5 b { background: #1f8a4c; } .fb-pill.r3 b { background: #d48a00; } .fb-pill.r1 b, .fb-pill.r2 b { background: #c2412d; }
.fb-text { margin-top: 10px; padding: 9px 12px; border-radius: 10px; border-left: 3px solid #8a93a5; background: #f8fafc; }
.fb-text.well { border-left-color: #1f8a4c; } .fb-text.improve { border-left-color: #d48a00; } .fb-text.other { border-left-color: #1b4f99; }
.fb-text small { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7487; }
.fb-text p { margin: 2px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; color: #1c2333; }
.fb-empty { padding: 34px; border: 1px dashed #cfd5df; border-radius: 14px; text-align: center; color: #6b7487; }
@media (max-width: 900px) { .fb-stats { grid-template-columns: 1fr 1fr; } .fb-grid { grid-template-columns: 1fr; } }

/* feedback, round 2: no ratings. The form: four kind cards, part-of-the-event chips and the message; the page:
   one tile per kind, a bar per part of the event (both filter the list), and the notes */
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-kind { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid #e1e6ee; border-radius: 12px; background: #fff; text-align: left; cursor: pointer;
  transition: border-color .12s ease, background .12s ease, transform .12s ease; }
.fb-kind:hover { border-color: #9fb2d3; transform: translateY(-1px); }
.fb-kind-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--kbg); color: var(--kfg); }
.fb-kind-text { display: flex; flex-direction: column; min-width: 0; }
.fb-kind-text b { font-size: 14.5px; font-weight: 800; color: #10203f; }
.fb-kind-text small { font-size: 12.5px; color: #6b7487; line-height: 1.35; }
.fb-kind.on { border-color: var(--kfg); background: var(--kbg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kfg) 18%, transparent); }
.fb-kind.on .fb-kind-ic { background: var(--kfg); color: #fff; }
.fb-kind.improve, .fb-kind-tag.improve, .fb-stat.improve, .fb-resp.improve { --kbg: #eef3fb; --kfg: #1b4f99; }
.fb-kind.add, .fb-kind-tag.add, .fb-stat.add, .fb-resp.add { --kbg: #e7f6ee; --kfg: #1f7a45; }
.fb-kind.problem, .fb-kind-tag.problem, .fb-stat.problem, .fb-resp.problem { --kbg: #fdeeee; --kfg: #b42318; }
.fb-kind.other, .fb-kind-tag.other, .fb-stat.other, .fb-resp.other { --kbg: #f3eefb; --kfg: #6a3fb0; }
.fb-stat.all { --kbg: #eef1f6; --kfg: #001842; }
.fb-chips { flex-wrap: wrap; }
.fb-chip { min-width: 0; height: 36px; padding: 0 14px; font-size: 13.5px; }
.fb-chip.on { background: #001842; border-color: #001842; color: #fff; }
.fb-message { min-height: 140px; font-size: 15px; line-height: 1.5; resize: vertical; }
.fb-count { display: block; margin-top: 4px; text-align: right; font-size: 11.5px; color: #8a93a5; }
.fb-need { align-self: center; margin-right: 6px; font-size: 12.5px; color: #8a93a5; }
@media (max-width: 600px) { .fb-kinds { grid-template-columns: 1fr; } .fb-need { display: none; } }

/* the page */
.fb-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fb-stat { position: relative; align-items: flex-start; text-align: left; cursor: pointer; font: inherit; transition: border-color .12s ease, box-shadow .12s ease; }
.fb-stat:hover { border-color: #b8c4d8; }
.fb-stat.on { border-color: var(--kfg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kfg) 16%, transparent); }
.fb-stat-ic { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--kbg); color: var(--kfg); }
.fb-stat b { color: var(--kfg); }
.fb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.fb-side { position: sticky; top: 76px; }
.fb-side .fb-bar-row { width: 100%; grid-template-columns: minmax(0, 1fr) 70px 26px; padding: 7px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; font: inherit; }
.fb-side .fb-bar-row:hover { background: #f3f6fa; }
.fb-side .fb-bar-row.on { background: #eef3fb; }
.fb-side .fb-bar i { background: #1b4f99; }
.fb-list-head { margin-bottom: 10px; }
.fb-filters { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: #3f4a61; }
.fb-clear { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: #1b4f99; text-decoration: underline; cursor: pointer; }
.fb-resp { border-left: 4px solid var(--kfg); }
.fb-resp header { gap: 8px; }
.fb-kind-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--kbg); color: var(--kfg); font-size: 12px; font-weight: 800; }
.fb-area-tag { padding: 3px 10px; border-radius: 999px; background: #f1f4f8; color: #3f4a61; font-size: 12px; font-weight: 700; }
.fb-resp .fb-who { margin-left: auto; margin-right: 0; flex-direction: column; align-items: flex-end; text-align: right; }
.fb-msg { margin: 10px 0 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; color: #1c2333; }
@media (max-width: 1000px) { .fb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fb-layout { grid-template-columns: 1fr; } .fb-side { position: static; } }

/* feedback, round 3: several notes in one form, three kinds, no anonymous option */
.fb-notes { display: flex; flex-direction: column; gap: 12px; }
.fb-note { padding: 14px 16px 16px; border: 1px solid #e3e8f0; border-radius: 14px; background: #fff; scroll-margin-top: 12px; animation: fb-note-in .25s ease; }
@keyframes fb-note-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fb-note-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fb-note-num { display: inline-flex; align-items: center; height: 24px; padding: 0 11px; border-radius: 999px; background: #001842; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.fb-note-x { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #f1c7c2; border-radius: 9px; background: #fff; color: #b42318; cursor: pointer; }
.fb-note-x:hover { background: #fdeeee; }
.fb-q { margin-top: 12px; }
.fb-q:first-of-type { margin-top: 0; }
.fb-q > b { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 800; color: #10203f; }
.fb-q > b small { font-weight: 600; color: #8a93a5; }
.fb-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fb-kind { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
.fb-message { min-height: 104px; }
.fb-add-note { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px; margin: 12px 0 14px; border: 1.5px dashed #b9c4d6; border-radius: 12px;
  background: #fbfcfe; color: #1b4f99; font-size: 14px; font-weight: 800; cursor: pointer; }
.fb-add-note:hover { border-color: #1b4f99; background: #eef3fb; }
.fb-foot .fb-need { margin-right: auto; margin-left: 0; }
@media (max-width: 640px) { .fb-kinds { grid-template-columns: 1fr; } .fb-kind { flex-direction: row; align-items: center; } }

/* feedback, round 4: a more formal form. A white header with the event, an intro line, each note as a plain panel
   with labelled fields (type as a three-way choice, then the text), and the actions in the footer */
.fb-dlg { width: min(680px, calc(100vw - 24px)); border-radius: 14px; background: #fff; }
.fb-dlg-head { align-items: center; padding: 18px 22px 14px; background: #fff; color: #10203f; border-bottom: 1px solid #e6e9ef; }
.fb-dlg-head h2 { color: #001842 !important; font-size: 19px; }
.fb-dlg-sub { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: #6b7487; }
.fb-dlg-head .fb-view-link { background: #eef3fb; color: #1b4f99; }
.fb-dlg-head .fb-view-link:hover { background: #dde8f8; color: #13407d; }
.fb-dlg-head .fb-x { margin-left: 8px; background: #f1f4f8; color: #3f4a61; }
.fb-dlg-head .fb-x:hover { background: #e3e8f0; }
.fb-dlg-head > div:first-child { margin-right: auto; }
.fb-intro { margin: 0; padding: 14px 22px 0; font-size: 14px; line-height: 1.55; color: #3f4a61; }
.fb-last { margin: 12px 22px 0; border: 1px solid #d9e6f8; border-radius: 10px; }
.fb-form { padding: 14px 22px 0; background: #fff; }
.fb-notes { gap: 14px; }
.fb-note { padding: 16px 18px 14px; border: 1px solid #dfe4ec; border-radius: 12px; background: #fbfcfd; animation: fb-note-in .25s ease; }
.fb-note-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #e9edf3; }
.fb-note-title { margin: 0; font-size: 15px; font-weight: 800; color: #001842; }
.fb-note-remove { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; color: #b42318; text-decoration: underline; cursor: pointer; }
.fb-note .fb-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.fb-note .fb-field:last-child { margin-bottom: 0; }
.fb-label { font-size: 13px; font-weight: 700; color: #1c2333; }
.fb-req { margin-left: 3px; font-style: normal; color: #b42318; }
.fb-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cfd6e1; border-radius: 10px; overflow: hidden; background: #fff; }
.fb-type { display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 10px; border: 0; border-left: 1px solid #cfd6e1; background: #fff;
  font-size: 13.5px; font-weight: 700; color: #3f4a61; cursor: pointer; transition: background .12s ease, color .12s ease; }
.fb-type:first-child { border-left: 0; }
.fb-type:hover { background: #f3f6fa; }
.fb-type.on { background: #001842; color: #fff; }
.fb-type:focus-visible { outline: 2px solid #1b4f99; outline-offset: -2px; }
.fb-type-hint { margin: 0; font-size: 12.5px; color: #6b7487; }
.fb-message { min-height: 110px; background: #fff; border-color: #cfd6e1; font-size: 14.5px; }
.fb-message:focus { border-color: #1b4f99; box-shadow: 0 0 0 3px rgba(27, 79, 153, .15); }
.fb-count { margin-top: -2px; }
.fb-foot { margin: 14px -22px 0; padding: 12px 22px; background: #f6f8fb; border-top: 1px solid #e6e9ef; }
.fb-add-note { width: auto; height: 36px; margin: 0; padding: 0 14px; border: 1px solid #cfd6e1; border-style: solid; border-radius: 9px; background: #fff; font-size: 13.5px; }
.fb-add-note:hover { border-color: #1b4f99; background: #eef3fb; }
.fb-foot .fb-need { margin: 0 auto 0 4px; }
.fb-foot-btns { margin-left: 0; }
.fb-send { min-width: 150px; }
.fb-thanks h2 { font-size: 21px; }
.fb-thanks-ic { width: 62px; height: 62px; }
@media (max-width: 640px) { .fb-types { grid-template-columns: 1fr; } .fb-type { border-left: 0; border-top: 1px solid #cfd6e1; justify-content: flex-start; } .fb-type:first-child { border-top: 0; } .fb-add-note { width: 100%; } }
/* the page: four tiles (All and the three types) */
.fb-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fb-type span { font-size: inherit; font-weight: inherit; color: inherit; }

/* feedback, round 5: a branded header, notes as numbered rows (no box in a box), the prompt following the type,
   "Add another note" under the notes, and a quiet footer; missing fields are pointed out where they are */
.fb-dlg { width: min(660px, calc(100vw - 24px)); border-radius: 16px; }
.fb-dlg-head { gap: 14px; padding: 18px 22px; border-bottom: 1px solid #e6e9ef; }
.fb-logo { flex: none; width: 92px; height: 44px; object-fit: contain; padding-right: 14px; border-right: 1px solid #e6e9ef; }
.fb-head-text { margin-right: auto; min-width: 0; }
.fb-dlg-head h2 { font-size: 20px; letter-spacing: -.01em; }
.fb-dlg-sub { font-size: 13px; font-weight: 600; color: #6b7487; }
.fb-intro { padding: 16px 24px 4px; font-size: 14.5px; color: #3f4a61; }
.fb-last { margin: 10px 24px 0; }
.fb-form { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.fb-scroll { overflow-y: auto; padding: 6px 24px 4px; }
.fb-notes { gap: 0; }
.fb-note { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 16px 0 18px; border: 0; border-top: 1px solid #edf0f4; border-radius: 0; background: none; }
.fb-note:first-child { border-top: 0; }
.fb-note-rail { display: flex; justify-content: center; }
.fb-note-badge { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #001842; color: #fff; font-size: 13.5px; font-weight: 800; }
.fb-note.solo { grid-template-columns: 1fr; }
.fb-note.solo .fb-note-rail { display: none; }
.fb-note-body { min-width: 0; }
.fb-note-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.fb-label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .01em; color: #1c2333; }
.fb-note-body > label.fb-label { margin: 16px 0 7px; }
.fb-note-remove { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 6px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: #8a93a5; text-decoration: none; cursor: pointer; }
.fb-note-remove:hover { background: #fdeeee; color: #b42318; }
.fb-types { border-radius: 10px; }
.fb-types.bad, .fb-message.bad { border-color: #d14b3a !important; box-shadow: 0 0 0 3px rgba(209, 75, 58, .14); }
.fb-type { height: 44px; font-size: 14px; }
.fb-type.on { background: #001842; color: #fff; }
.fb-text-wrap { position: relative; }
.fb-message { min-height: 120px; padding-bottom: 26px; border-radius: 10px; }
.fb-text-wrap .fb-count { position: absolute; right: 12px; bottom: 7px; margin: 0; font-size: 11.5px; color: #9aa3b5; pointer-events: none; }
.fb-field-err { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: #b42318; }
.fb-add-note { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 44px; margin: 2px 0 14px; border: 1.5px dashed #c5cfdd; border-radius: 10px;
  background: #fbfcfe; color: #1b4f99; font-size: 14px; font-weight: 700; }
.fb-add-note:hover { border-color: #1b4f99; border-style: dashed; background: #eef3fb; }
.fb-foot { position: static; display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 24px; background: #f7f9fb; border-top: 1px solid #e6e9ef; }
.fb-foot-note { margin-right: auto; font-size: 12.5px; color: #7a8396; }
.fb-foot-btns { display: flex; gap: 8px; }
.fb-send { min-width: 156px; font-weight: 700; }
.fb-send:disabled { opacity: .7; }
@media (max-width: 640px) {
  .fb-logo { display: none; }
  .fb-note { grid-template-columns: 1fr; } .fb-note-rail { justify-content: flex-start; }
  .fb-foot-note { display: none; }
}

/* feedback: the type of each note as three cards (icon in a soft colour, name, one line); the chosen card is outlined
   in its colour, tinted and ticked. The colours match the types on the feedback page. */
.fb-tcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-radius: 12px; }
.fb-tcards.bad { outline: 2px solid #d14b3a; outline-offset: 3px; }
.fb-tcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding: 12px 13px 12px; border: 1.5px solid #dfe4ec; border-radius: 12px;
  background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease; }
.fb-tcard.improve { --kbg: #eef3fb; --kfg: #1b4f99; } .fb-tcard.add { --kbg: #e7f6ee; --kfg: #1f7a45; } .fb-tcard.other { --kbg: #f3eefb; --kfg: #6a3fb0; }
.fb-tcard:hover { border-color: color-mix(in srgb, var(--kfg) 45%, #dfe4ec); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 24, 66, .06); }
.fb-tcard:focus-visible { outline: 2px solid var(--kfg); outline-offset: 2px; }
.fb-tcard-ic { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 50%; background: var(--kbg); color: var(--kfg); transition: background .15s ease, color .15s ease; }
.fb-tcard b { font-size: 14px; font-weight: 800; line-height: 1.25; color: #10203f; }
.fb-tcard small { font-size: 12px; line-height: 1.35; color: #6b7487; }
.fb-tcard-tick { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d3d9e3; background: #fff; color: transparent; transition: all .15s ease; }
.fb-tcard-tick .fb-ic { stroke-width: 3; }
.fb-tcard.on { border-color: var(--kfg); background: var(--kbg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--kfg) 14%, transparent); }
.fb-tcard.on .fb-tcard-ic { background: var(--kfg); color: #fff; }
.fb-tcard.on .fb-tcard-tick { border-color: var(--kfg); background: var(--kfg); color: #fff; }
.fb-tcard.on b { color: var(--kfg); }
@media (max-width: 640px) { .fb-tcards { grid-template-columns: 1fr; } .fb-tcard { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; } .fb-tcard-ic { margin: 0; } .fb-tcard small { flex-basis: 100%; padding-left: 44px; margin-top: -4px; } }

/* feedback type cards, take 2: compact rows (icon tile on the left, name and a short line), no radio circle; the
   chosen card fills with its colour, white text and a small tick */
.fb-tcards { gap: 8px; }
.fb-tcard { flex-direction: row; align-items: center; gap: 11px; padding: 10px 12px; min-height: 60px; border: 1px solid #dfe4ec; border-radius: 11px; }
.fb-tcard:hover { transform: none; box-shadow: none; border-color: var(--kfg); background: color-mix(in srgb, var(--kbg) 60%, #fff); }
.fb-tcard-ic { flex: none; width: 38px; height: 38px; margin: 0; border-radius: 9px; }
.fb-tcard-text { display: flex; flex-direction: column; min-width: 0; }
.fb-tcard-text b { font-size: 13.5px; font-weight: 800; line-height: 1.2; color: #10203f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-tcard-text small { font-size: 12px; color: #6b7487; white-space: nowrap; }
.fb-tcard-tick { position: static; flex: none; margin-left: auto; width: 20px; height: 20px; border: 0; background: rgba(255, 255, 255, .25); color: #fff; opacity: 0; transform: scale(.6); }
.fb-tcard.on { background: var(--kfg); border-color: var(--kfg); box-shadow: 0 4px 12px color-mix(in srgb, var(--kfg) 30%, transparent); }
.fb-tcard.on .fb-tcard-ic { background: rgba(255, 255, 255, .18); color: #fff; }
.fb-tcard.on .fb-tcard-text b { color: #fff; }
.fb-tcard.on .fb-tcard-text small { color: rgba(255, 255, 255, .82); }
.fb-tcard.on .fb-tcard-tick { opacity: 1; transform: none; background: rgba(255, 255, 255, .22); border: 0; color: #fff; }
@media (max-width: 640px) { .fb-tcard { flex-wrap: nowrap; } .fb-tcard small { flex-basis: auto; padding: 0; margin: 0; } }
.fb-tcard-text b { white-space: normal; overflow: visible; text-overflow: clip; }
.fb-tcard-tick { display: none; }
.fb-tcard.on .fb-tcard-tick { display: grid; }
.fb-tcard-ic { width: 36px; height: 36px; }
.fb-tcard.on .fb-tcard-tick { position: absolute; top: 6px; right: 6px; width: 17px; height: 17px; margin: 0; }
.fb-tcard.on .fb-tcard-tick .fb-ic { width: 11px; height: 11px; }
.fb-foot { justify-content: flex-end; }

/* PIN entries show dots, not digits (text inputs keep the number keypad and no "save password" prompt) */
.pin-mask { -webkit-text-security: disc; text-security: disc; letter-spacing: .25em; }

/* feedback page: delete a note (viewers) */
.fb-resp header { position: relative; }
.fb-del { margin-left: auto; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #9aa3b5; cursor: pointer; }
.fb-del:hover { background: #fdeeee; color: #b42318; }

/* practice / demo judging: a watermark over the whole screen that clicks pass through */
.demo-watermark { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
.demo-watermark span { display: flex; flex-direction: column; align-items: center; transform: rotate(-24deg); color: rgba(200, 30, 30, .12); font-family: Arial, sans-serif; text-transform: uppercase; line-height: .9; white-space: nowrap; }
.demo-watermark b { font-size: min(14vw, 26vh); font-weight: 900; letter-spacing: .02em; }
.demo-watermark small { font-size: min(4.5vw, 8vh); font-weight: 900; letter-spacing: .25em; }
@media print { .demo-watermark { display: none; } }

/* Settings > Judging off: links and the judge sign-in are hidden (organizers keep them), and judges get a closed screen */
html.judging-off a.nav-link[href="/judging"], html.judging-off .sgn-option:has(.sgn-judge) { display: none !important; }
.judging-off-note { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #f3c98b; border-radius: 10px; background: #fff7e8; color: #6b4300; font-size: 14px; }
#main > .judging-off-note { margin: 10px 16px 0; }
.judging-closed { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: #f4f6fa; }
.judging-closed-card { width: min(440px, 100%); padding: 32px 28px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(0, 24, 66, .1); text-align: center; }
.judging-closed-card img { width: 150px; margin-bottom: 18px; }
.judging-closed-card h2 { margin: 0 0 8px; font-size: 24px; color: #001842; }
.judging-closed-card p { margin: 0 0 20px; color: #4a5468; }

/* sign-in: the Frontier Schools logo beside the KC STEM Fest one, in the same white card */
.sgn-logo { align-items: center; gap: 22px; }
.sgn-logo-rule { align-self: stretch; width: 1px; margin: 6px 0; background: #e3e6ec; }
.sgn-logo img, .sgn-logo img.sgn-logo-fs { width: 200px; height: auto; }   /* the two logos the same width */
@media (max-width: 640px) { .sgn-logo { gap: 12px; padding: 12px 16px; max-width: 100%; } .sgn-logo img, .sgn-logo img.sgn-logo-fs { width: 130px; height: auto; } }

/* Settings > Email: two columns (server, sender), then the test */
.em-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.em-sec { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px 14px; align-content: start; margin: 0; padding: 16px 18px; border: 1px solid #e6e9ef; border-radius: 12px; }
.em-sec legend { float: none; width: auto; margin: 0 0 0 -4px; padding: 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #6b7487; }
.em-sec > :not(.em-f):not(.em-ssl), .em-wide { grid-column: 1 / -1; }
.em-ssl { margin: 0; padding: 8px 12px; border-radius: 10px; background: #f7f9fb; }
.em-f { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; }
.em-f > span { font-size: 13px; font-weight: 700; color: #1c2333; }
.em-f em { margin-left: 6px; font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.em-f em.ok { background: #e7f6ec; color: #1d7a3e; } .em-f em.no { background: #fdeeee; color: #b42318; }
.em-err { min-height: 0; font-size: 12.5px; font-weight: 600; color: #b42318; }
.em-err:empty { display: none; }
.em-ssl { align-self: end; }
.em-sec:first-child { grid-template-areas: none; }
.em-pw { position: relative; display: block; }
.em-pw .form-control { padding-right: 64px; }
.em-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); border: 0; border-radius: 6px; padding: 4px 9px; background: #eef1f6; color: #1b4f99; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.em-eye:hover { background: #dfe6f1; }
.em-foot { margin: 2px 0 0; font-size: 12.5px; color: #6b7487; }
.em-test { margin-top: 20px; padding: 16px 18px; border-radius: 12px; background: #f7f9fb; border: 1px solid #e6e9ef; }
.em-test h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.em-test p { margin: 0 0 12px; font-size: 13px; color: #6b7487; }
.em-test-row { display: flex; align-items: flex-start; gap: 12px; }
.em-test-row .em-f { flex: 1; max-width: 420px; }
.em-test-row .btn { margin-top: 24px; }
.em-result { margin: 12px 0 0 !important; padding: 9px 12px; border-radius: 8px; font-size: 13.5px !important; font-weight: 600; }
.em-result.ok { background: #e7f6ec; color: #1d7a3e !important; } .em-result.bad { background: #fdeeee; color: #b42318 !important; }
@media (max-width: 760px) {
  .em-grid { grid-template-columns: 1fr; }
  .em-test-row { flex-direction: column; align-items: stretch; } .em-test-row .btn { margin-top: 0; } .em-test-row .em-f { max-width: none; }
}

/* printout tables wrap inside the page (an older .pc-table rule for table-number pills would keep them on one line) */
table.pc-table { white-space: normal; table-layout: auto; }
table.pc-table td { overflow-wrap: break-word; }
table.pc-table td.pc-instr div + div { margin-top: .6mm; }   /* two instructors: one per line */
table.pc-table td.pc-instr div { white-space: nowrap; }   /* a name stays on one line; the project column wraps instead */

/* check-in list: power and display board as icons, with a key above the table */
.pc-need { display: inline-grid; place-items: center; width: 4mm; height: 4mm; vertical-align: middle; }
.pc-need svg { width: 100%; height: 100%; }
table.pc-table td.pc-needs { white-space: nowrap; }
td.pc-needs .pc-need + .pc-need { margin-left: 1mm; }
.pc-need-key { display: flex; gap: 6mm; margin: -1mm 0 3mm; font-size: 8.5pt; font-weight: 600; color: #4a5468; }
.pc-need-key span { display: inline-flex; align-items: center; gap: 1.5mm; }
.pc-need-key .pc-need { width: 3.6mm; height: 3.6mm; }
table.pc-table td.pc-nowrap { white-space: nowrap; }   /* numbers (#, table) stay on one line */

/* the Classic design uses the shared gold seal (drawn as SVG) in place of its CSS one */

.pc-seal-svg svg, .pc-pro-seal { filter: drop-shadow(0 .03in .05in rgba(0, 0, 0, .28)); }
.pc-seal-svg svg { display: block; width: 100%; height: 100%; }

/* certificates: Merriweather for all the lettering (signatures keep their handwriting font) */
.pc-page.pc-cert { --serif: 'Merriweather', Georgia, 'Times New Roman', serif; }

/* ---- Classic, matched to the sample certificate (letter page, measured in inches) */

.pc-certscope .pc-classic h1 { margin: .56in 0 0; font-family: var(--serif); font-size: 48pt; font-weight: 900; line-height: 1; letter-spacing: 0; color: #1e1e1e; }
.pc-certscope .pc-classic h2 { margin: .17in 0 0; font-family: var(--serif); font-size: 17.5pt; font-weight: 700; line-height: 1; letter-spacing: .3em; color: #1e1e1e; }

/* ---- Classic: the organizers' certificate files rebuilt (picture background, text on the page's own points) */
.pc-certscope .pc-classic { position: relative; overflow: hidden; background: #fff; }
.pc-certscope .pc-classic .pc-cl-bg, .pc-certscope .pc-classic .pc-cl-text { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-certscope .pc-classic .pc-cl-body { position: absolute; left: 0; right: 0; margin: 0 auto; width: 380pt; text-align: center;
  font-family: "Abhaya Libre", Georgia, serif; font-size: 16pt; line-height: 19.2pt; color: #404143; transform: translateY(-14.25pt); }   /* the first baseline lands on top */
.pc-certscope .pc-classic .pc-cl-body p { margin: 0; }
.pc-certscope .pc-classic .pc-cl-body b { font-weight: 700; color: #66114a; }
.pc-certscope .pc-classic .pc-cl-body sup { font-size: 9.33pt; line-height: 0; vertical-align: 5.33pt; }
.pc-certscope .pc-classic .pc-cl-congrats { margin-top: 15.2pt !important; }
.pc-certscope .pc-classic .pc-cl-logo { position: absolute; left: 26.9pt; top: 681pt; height: 50pt; width: auto; }   /* the file has blank sides: the visible logo starts 29.8pt in, at 56.7pt as in the PDF */

/* laurel, modern and executive designs: the scripts come from Google Fonts (the same on every computer), and the
   signature and the date sit at the same height above their lines */

.pc-certscope .pc-exec .pc-pro-sig { font-family: 'Mrs Saint Delafield', 'Snell Roundhand', cursive; font-size: 24pt; }
.pc-certscope .pc-exec .pc-pro-sig, .pc-certscope .pc-exec .pc-pro-date {
  display: flex; align-items: flex-end; justify-content: center; height: .48in; min-height: 0; padding-bottom: .05in; box-sizing: border-box; line-height: 1; overflow: visible; }

/* Gold corners and Executive: the scripts from Google Fonts (the same on every computer), the project on its own line,
   and the signature and the date at the same height above their lines */
.pc-certscope .pc-aw { --script: 'Great Vibes', 'Snell Roundhand', cursive; }
.pc-certscope .pc-aw .pc-aw-sig { font-family: 'Mrs Saint Delafield', 'Snell Roundhand', cursive; font-size: 26pt; }
.pc-certscope .pc-aw .pc-aw-sig, .pc-certscope .pc-aw .pc-aw-date { display: flex; align-items: flex-end; justify-content: center; height: .48in; min-height: 0; padding-bottom: .05in; box-sizing: border-box; line-height: 1; overflow: visible; }
.pc-certscope .pc-aw .pc-aw-project { max-width: 6in; margin: .05in 0 0; font-family: var(--font-sans); font-size: 10.5pt; color: #3f4a61; }
.pc-certscope .pc-aw .pc-aw-project em { color: #1c2333; }
.pc-certscope .pc-exec .pc-exec-name { font-family: 'Great Vibes', 'Snell Roundhand', cursive; }
.pc-certscope .pc-exec .pc-exec-project { margin: .06in 0 0; font-family: var(--serif); font-size: 12pt; color: #2c3446; }
.pc-certscope .pc-exec .pc-exec-project em { color: #0b1f45; }
.pc-certscope .pc-exec .pc-exec-body, .pc-certscope .pc-aw .pc-aw-body { text-wrap: balance; }   /* no word left alone on the last line */

/* Gold corners and Executive use Classic's fonts: Merriweather for the heading, Abhaya Libre for the words
   (a touch larger, as Abhaya runs small), Great Vibes and Mrs Saint Delafield for the name and the signature */
.pc-certscope .pc-exec, .pc-certscope .pc-aw { --serif: 'Abhaya Libre', Georgia, serif; }
.pc-certscope .pc-exec h1, .pc-certscope .pc-aw h1 { font-family: Merriweather, Georgia, serif; }
.pc-certscope .pc-aw .pc-aw-sub, .pc-certscope .pc-aw .pc-aw-lead, .pc-certscope .pc-aw .pc-aw-line, .pc-certscope .pc-aw .pc-aw-body,
.pc-certscope .pc-aw .pc-aw-date, .pc-certscope .pc-aw .pc-aw-sign b { font-family: 'Abhaya Libre', Georgia, serif; }
.pc-certscope .pc-aw .pc-aw-body { font-size: 13pt; }
.pc-certscope .pc-aw .pc-aw-lead { font-size: 11pt; }
.pc-certscope .pc-aw .pc-aw-line { font-size: 13pt; }
.pc-certscope .pc-aw .pc-aw-date { font-size: 14pt; }
.pc-certscope .pc-aw .pc-aw-sign b { font-size: 10pt; }
.pc-certscope .pc-exec .pc-exec-body { font-size: 15pt; }
.pc-certscope .pc-exec .pc-pro-lead { font-size: 14pt; }
.pc-certscope .pc-exec .pc-pro-date { font-size: 14pt; }
.pc-certscope .pc-exec .pc-pro-line b { font-size: 11pt; }
.pc-certscope .pc-exec .pc-exec-kicker { font-size: 12pt; }

/* Settings > Email: who is emailed when staff submit feedback */
.em-notify form { max-width: 520px; }
.em-notify-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.em-notify-state { font-size: 13px; color: #6b7487; }
