/* ==========================================================================
   DA+IA Portal — shared style sheet
   Link this into every page's <head> instead of re-writing these rules:
     <link rel="stylesheet" href="assets/style.css">
   Colours, fonts, logo, buttons, cards, nav, tables and modals all live here
   once. Only page-specific layout (e.g. the tube map, a form's unique
   fields) should stay in a page's own <style> block.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- brand tokens: colours + fonts -------------------------------------- */
:root {
  --indigo: #16112E;
  --indigo-deep: #0E0A20;
  --elizabeth: #2B1C50;
  --gold-1: #FFC06B;
  --gold-2: #BE7800;
  --central: #CD1B46;
  --circle: #FF9F00;
  --dlr: #078370;
  --hair: rgba(237,234,246,.08);
  --muted: rgba(237,234,246,.55);

  /* line colours used only for hover/status accents, not tokenised above */
  --pink: #ff6b8f;
  --teal: #37d3b6;

  --serif: 'Butler', 'Georgia', 'Times New Roman', serif;
  --sans: 'Futura PT', 'Futura', 'Century Gothic', 'Trebuchet MS', sans-serif;
}

/* --- base ---------------------------------------------------------------- */
body {
  background: var(--indigo-deep);
  color: var(--gold-1);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1 { font-size: 1.4rem; margin-bottom: 6px; }
.subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }

/* Pages with the full dashboard nav (topbar + menu-fixed) need room for both
   fixed bars; pages with just the topbar (auth/forms) only need the one. */
body.has-subnav { padding-top: 118px; }
body.topbar-only { padding-top: 78px; }

/* --- topbar: logo, search, avatar menu ----------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 28px;
  background: var(--indigo);
  border-bottom: 1px solid var(--hair);
  z-index: 6;
}
.brand { font-weight: 700; display: flex; align-items: center; gap: 10px; }
a.brand { color: inherit; text-decoration: none; }   /* on login pages it links home */
.brand-logo { height: 28px; width: auto; display: block; }
.search {
  justify-self: center;
  width: 100%;
  max-width: 400px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  border-radius: 100px;
  padding: 8px 14px;
}
.avatar-wrap { position: absolute; top: 50%; right: 28px; transform: translateY(-50%); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold-1);
  color: #1c1330;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
}
.avatar-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.avatar-menu-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 10px 8px; }
.avatar-menu-item { display: block; padding: 9px 10px; border-radius: 9px; font-size: .85rem; color: var(--gold-1); text-decoration: none; }
.avatar-menu-item:hover { background: rgba(255,255,255,.06); }
.avatar-signout { width: 100%; text-align: left; border-top: 1px solid var(--hair); border-radius: 0 0 9px 9px; margin-top: 4px; }

/* --- secondary nav: pill tabs + the fixed sub-menu ----------------------- */
.tabbar {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 12px 28px;
  background: var(--indigo-deep);
  border-bottom: 1px solid var(--hair);
}
.tab { padding: 9px 16px; border-radius: 100px; color: var(--gold-1); font-size: .85rem; }
.tab:hover { background: rgba(255,255,255,.05); }
.tab.on { background: var(--gold-2); color: #1c1330; }

.menu-fixed {
  position: fixed;
  top: 63px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 28px;
  background: var(--elizabeth);
  border-bottom: 1px solid var(--hair);
  overflow-x: auto;
  z-index: 5;
}
.menu-fixed .side-title { margin: 0; flex-shrink: 0; white-space: nowrap; }
.side-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 12px; }
.side-nav { display: flex; flex-direction: row; flex: 1; gap: 4px; min-width: 0; }
.side-link {
  flex: 1 1 0;
  min-width: 120px;
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gold-1);
  font-size: .85rem;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.side-link:hover { background: rgba(255,255,255,.05); }
.side-link.on { background: var(--gold-2); color: #1c1330; font-weight: 600; }

/* pill-style nav used on the line-map concept page */
.nav-pill { color: var(--gold-1); font-size: .85rem; padding: 9px 16px; border-radius: 100px; text-decoration: none; }
.nav-pill:hover { background: rgba(255,255,255,.05); }
.nav-pill.on { background: var(--gold-2); color: #1c1330; font-weight: 600; border-color: transparent; }

/* --- page layout & headings ---------------------------------------------- */
.layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
}
.layout.narrow { max-width: 480px; padding: 40px 28px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; color: var(--gold-1); }
.page-head p { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* --- cards, stat blocks, bento/summary grids ------------------------------ */
.card {
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 20px;
}
.k { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.v { font-family: Georgia, serif; font-size: 2rem; }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.summary-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.summary-row .v { font-size: 1.8rem; }
.stat, .summary-row .stat { padding: 0 6px; }
.stat:not(:last-child), .summary-row .stat:not(:last-child) { border-right: 1px solid var(--hair); }

@media (max-width: 900px) {
  .summary-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .bento, .summary-row { grid-template-columns: 1fr; gap: 14px; }
  .stat:not(:last-child), .summary-row .stat:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--hair);
    padding-bottom: 14px;
  }
}

/* --- pills / status badges ------------------------------------------------ */
.pill {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}
.pill.gold { background: rgba(255,192,107,.15); color: var(--gold-1); }
.pill.dlr { background: rgba(7,131,112,.18); color: var(--teal); }
.pill.central { background: rgba(205,27,70,.16); color: var(--pink); }
.pill.circle { background: rgba(255,159,0,.16); color: var(--circle); }

/* --- buttons --------------------------------------------------------------
   One shared visual language: solid gold-2 pill for primary actions
   (lightens to gold-1 on hover), soft translucent gold for secondary/
   row-level actions. Keep existing class names below as aliases so no
   markup changes are needed on the pages already using them. */
.add-btn, .submit-btn, .pay-btn, .copy-btn, .todo-add-btn, .btn-allocate {
  font-size: .8rem;
  font-weight: 600;
  color: #1c1330;
  background: var(--gold-2);
  border-radius: 100px;
  padding: 9px 18px;
}
.add-btn:hover, .submit-btn:hover, .pay-btn:hover, .copy-btn:hover, .todo-add-btn:hover, .btn-allocate:hover {
  background: var(--gold-1);
}
.submit-btn, .pay-btn { width: 100%; margin-top: 22px; padding: 12px; text-align: center; text-decoration: none; display: block; }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.copy-btn { flex-shrink: 0; padding: 0 16px; border-radius: 10px; }
.btn-allocate { border-radius: 10px; padding: 8px 16px; }

.btn-allocate-row {
  background: rgba(255,192,107,.15);
  color: var(--gold-1);
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  flex-shrink: 0;
}
.btn-allocate-row:hover { background: var(--gold-2); color: #1c1330; }

/* --- forms ------------------------------------------------------------------ */
label {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 16px 0 6px;
}
/* Only the very first label of a form or card sits flush to the top. (This
   used to be label:first-of-type, which also hit the first label inside every
   show/hide block, so blocks that appeared jammed up against the field above.) */
form > label:first-child,
.card > label:first-child,
.modal-section-title + label { margin-top: 0; }

input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: .9rem;
  color: var(--gold-1);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 10px 14px;
  color-scheme: dark;              /* dark calendar pop-ups and scrollbars */
  transition: border-color .15s ease, background-color .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: rgba(255,192,107,.25); }
textarea { resize: vertical; min-height: 70px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); background: rgba(255,255,255,.06); box-shadow: 0 0 0 3px rgba(190,120,0,.18); }
input[readonly] { opacity: .75; cursor: default; }

/* dropdowns: our own gold chevron instead of the browser's grey one */
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23FFC06B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
select:invalid, select option[value=""] { color: var(--muted); }
select option, select optgroup { background: var(--elizabeth); color: var(--gold-1); }
select optgroup { font-style: normal; font-weight: 600; color: var(--muted); }

/* date fields: gold calendar icon, same height as text fields */
input[type="date"] { min-height: 42px; cursor: text; }
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .85;
  width: 16px;
  height: 16px;
  color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23FFC06B' stroke-width='1.4' stroke-linecap='round'%3E%3Crect x='2' y='3' width='12' height='11' rx='2'/%3E%3Cpath d='M2 6.5h12M5.5 1.5v3M10.5 1.5v3'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
input[type="date"]:invalid::-webkit-datetime-edit { color: var(--muted); }

.pref-hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* label + info tooltip, for a field that needs a short hover explanation */
.label-row { display: flex; align-items: center; gap: 6px; margin: 16px 0 6px; }
.label-row label { margin: 0; }
.info-tip { position: relative; display: inline-flex; }
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .68rem;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: help;
}
.info-tip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 240px;
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: .72rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--gold-1);
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 30;
  pointer-events: none;
}
.info-tip:hover .info-tip-text,
.info-tip:focus .info-tip-text,
.info-tip:focus-within .info-tip-text,
.info-tip.holding .info-tip-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
/* touch screens: touch and hold to show (assets/portal.js), not a plain tap */
.info-tip { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
@media (hover: none) {
  .info-tip:hover:not(.holding) .info-tip-text,
  .info-tip:focus:not(.holding) .info-tip-text,
  .info-tip:focus-within:not(.holding) .info-tip-text {
    opacity: 0;
    visibility: hidden;
  }
}

.form-error {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(205,27,70,.16);
  color: var(--pink);
  font-size: .82rem;
}
.form-error.show { display: block; }

.institution-banner {
  display: none;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  font-size: .85rem;
}
.institution-banner.show { display: block; }
.institution-banner .k { font-size: .68rem; margin-bottom: 2px; }

.success-panel { display: none; }
.success-panel.show { display: block; }
.success-panel .k { margin-bottom: 8px; }
.success-note { margin-top: 16px; font-size: .82rem; color: var(--muted); }

.invite-link-row { display: flex; gap: 8px; margin-top: 8px; }
.invite-link-row input { flex: 1; }

/* --- to-do list component --------------------------------------------------- */
.todo-header { display: flex; align-items: center; justify-content: space-between; }
.todo-header .k { margin-bottom: 0; }
.todo-reset {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--hair);
}
.todo-reset:hover { color: var(--pink); border-color: rgba(255,107,143,.4); }
.todo-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.todo-list li { display: flex; align-items: center; gap: 10px; }
.todo-list li label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; font-size: .9rem; color: var(--gold-1); margin: 0; text-transform: none; letter-spacing: normal; }
.todo-list input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--gold-2); cursor: pointer; }
.todo-text { flex: 1; min-width: 0; outline: none; cursor: text; border-radius: 4px; }
.todo-text:focus { outline: 1px dashed var(--hair); padding: 0 4px; }
.todo-list li:has(input:checked) .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-remove { flex-shrink: 0; font-size: 1rem; line-height: 1; color: var(--muted); padding: 2px 7px; border-radius: 6px; }
.todo-remove:hover { background: rgba(255,255,255,.08); color: var(--pink); }

.todo-columns { display: flex; align-items: center; gap: 10px; padding: 0 2px 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.todo-columns .col-task { flex: 1; }
.todo-columns .col-assignee { width: 112px; flex-shrink: 0; }
.todo-columns .col-spacer { width: 24px; flex-shrink: 0; }

.todo-assignee {
  width: 112px;
  flex-shrink: 0;
  font-size: .8rem;
  padding: 6px 10px;
  border-radius: 100px;
}
.todo-add { display: flex; gap: 8px; margin-top: 14px; }
.todo-input { flex: 1; min-width: 0; font-size: .85rem; border-radius: 100px; padding: 8px 14px; }
.todo-add-btn { flex-shrink: 0; padding: 8px 16px; }

/* --- activity feed ------------------------------------------------------------ */
.activity-item { padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: .8rem; color: var(--muted); }
.activity-item:last-child { border-bottom: none; }
.activity-item strong { display: block; font-size: .85rem; color: var(--gold-1); margin-bottom: 2px; }

/* --- tables: search/filter controls + data tables ------------------------------ */
.table-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.table-search {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  border-radius: 100px;
  padding: 8px 14px;
  color: var(--gold-1);
  font-family: inherit;
  font-size: .85rem;
}
.table-search::placeholder { color: var(--muted); }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: .8rem;
  color: var(--gold-1);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
}
.filter-chip:hover { background: rgba(255,255,255,.08); }
.filter-chip.on { background: var(--gold-2); color: #1c1330; font-weight: 600; border-color: transparent; }
.is-hidden { display: none !important; }

.table-wrap { overflow-x: auto; margin-top: 18px; }
.committee-table, .delegate-table, .seat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.committee-table th, .delegate-table th, .seat-table th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}
.committee-table td, .delegate-table td, .seat-table td {
  padding: 12px;
  border-bottom: 1px solid var(--hair);
  color: var(--gold-1);
  vertical-align: top;
}
.committee-table tr:last-child td, .delegate-table tr:last-child td, .seat-table tr:last-child td { border-bottom: none; }
.delegate-table tr.is-hidden { display: none; }
.committee-row, .delegate-table tbody tr { cursor: pointer; transition: background-color .15s ease; }
.committee-row:hover, .delegate-table tbody tr:hover { background: rgba(255,255,255,.03); }
.committee-row:focus-visible { outline: 2px solid var(--gold-1); outline-offset: -2px; }

.delegate-name { font-weight: 600; }
.delegate-sub { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.committee-dash { color: var(--muted); }
.table-empty { display: none; padding: 24px 0; text-align: center; color: var(--muted); font-size: .85rem; }
.table-empty.show { display: block; }

.seat-table .seat-delegate-empty { color: var(--muted); }
.seat-empty { font-size: .8rem; color: var(--muted); padding: 10px 0; }

.bento-name { font-family: var(--serif); font-weight: 400; color: var(--gold-1); line-height: 1.2; font-size: 1rem; }
.bento-sub { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.bento-topic { font-size: .8rem; color: var(--gold-1); opacity: .85; }
.bento-chairs { font-size: .8rem; color: var(--gold-1); }
.chair-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }

.capacity-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.capacity-bar { flex: 1; min-width: 60px; height: 6px; border-radius: 100px; background: rgba(255,255,255,.08); overflow: hidden; }
.capacity-bar-fill { height: 100%; background: var(--teal); border-radius: 100px; }
.capacity-bar-fill.full { background: var(--pink); }
.capacity-label { font-size: .75rem; color: var(--muted); white-space: nowrap; }

@media (max-width: 700px) {
  .table-controls { flex-direction: column; align-items: stretch; }
  .table-search { max-width: none; }
}

/* --- modals -------------------------------------------------------------------
   .modal-panel / .modal-head is the preferred pattern for new pages.
   .modal-window / .modal-header is kept as an alias (Committee Management
   was built with this naming before the two converged). */
/* the blur behind pop-ups is costly on phones and tablets, so they just get
   a slightly darker tint instead (!important also covers pages' own copies) */
@media (max-width: 900px), (pointer: coarse) {
  .modal-overlay { backdrop-filter: none !important; background: rgba(9,7,20,.8) !important; }
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9,7,20,.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-panel, .modal-window {
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-radius: 20px;
  width: min(680px, 100%);
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 55px rgba(0,0,0,.45);
  transform: translateY(10px);
  transition: transform .16s ease;
}
.modal-overlay.open .modal-panel, .modal-overlay.open .modal-window { transform: translateY(0); }
.modal-panel.detail-panel { max-width: 720px; }

.modal-head, .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--hair);
}
.modal-head h2, .modal-header h2 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--gold-1); }
.modal-head p, .modal-header p { font-size: .75rem; color: var(--muted); margin-top: 3px; }
.modal-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.modal-close {
  width: 29px; height: 29px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}
.modal-close:hover { background: rgba(255,255,255,.1); color: var(--gold-1); }
.modal-body { overflow-y: auto; padding: 20px 22px; }
.modal-section-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 10px; }
.modal-empty { padding: 30px 20px; text-align: center; font-size: .85rem; color: var(--muted); display: none; }
.modal-empty.show { display: block; }

.allocate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; }
.allocate-row:hover { background: rgba(255,255,255,.04); }
.allocate-row .delegate-name, .allocate-row .delegate-sub { display: block; }

.detail-status-row { display: flex; align-items: center; gap: 10px; margin: 4px 0 18px; padding: 0 20px; }
.detail-body { padding: 0 20px 20px; overflow-y: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.detail-field { min-width: 0; }
.detail-field.span-2 { grid-column: span 2; }
.detail-field label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.detail-field .value { font-size: .88rem; color: var(--gold-1); }
.detail-field .value.muted { color: var(--muted); }
.detail-field ol { padding-left: 18px; }
.detail-field ol li { font-size: .85rem; margin-bottom: 2px; }

/* --- tube-lines: animated brand background --------------------------------
   Markup for the SVG itself is injected by assets/tube-lines.js so it never
   has to be pasted into a page by hand — this just carries the visual rules. */
.tube-lines { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.tube-lines .stop-gold-a { stop-color: var(--elizabeth); }
.tube-lines .stop-gold-b { stop-color: var(--indigo); }
.tube-lines .stop-central-a { stop-color: var(--central); }
.tube-lines .stop-central-b { stop-color: var(--pink); }
.tube-lines .stop-circle-a { stop-color: var(--circle); }
.tube-lines .stop-circle-b { stop-color: #ffcf80; }
.tube-lines .stop-dlr-a { stop-color: var(--dlr); }
.tube-lines .stop-dlr-b { stop-color: var(--teal); }

.tube-line {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .6;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: tube-draw 2.4s cubic-bezier(.25,.7,.3,1) forwards;
}
@keyframes tube-draw { to { stroke-dashoffset: 0; } }

/* --- required-field marker -------------------------------------------------- */
.required-mark { color: var(--gold-1); margin-left: 3px; font-weight: 700; }

/* --- intro / notice boxes ---------------------------------------------------- */
.intro-box {
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.intro-box .subtitle { margin-bottom: 0; }
.notice-box {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--gold-2);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
}
.notice-box strong { color: var(--gold-1); }
.notice-box.warn { border-left-color: var(--central); }
.notice-box p + p { margin-top: 8px; }

/* --- multi-step wizard: progress bar + step visibility ----------------------- */
.progress-wrap {
  position: fixed;
  top: 63px;
  left: 0; right: 0;
  z-index: 5;
  padding: 10px 28px;
  background: var(--indigo);
  border-bottom: 1px solid var(--hair);
}
.progress-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .72rem; color: var(--muted); margin-bottom: 8px; }
.progress-label strong { color: var(--gold-1); font-weight: 600; }
.progress-track { height: 6px; border-radius: 100px; background: var(--hair); overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold-2); border-radius: 100px; transition: width .25s ease; }

.step { display: none; }
.step.active { display: block; }

.step-nav { display: flex; align-items: stretch; gap: 10px; margin-top: 24px; }
.step-nav .btn-continue, .step-nav .submit-btn { flex: 1; margin-top: 0; }
.step-nav .btn-secondary { padding: 12px 24px; }
.btn-secondary {
  flex-shrink: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gold-1);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  padding: 12px 20px;
  border-radius: 100px;
}
.btn-secondary:hover { background: rgba(255,255,255,.08); }

/* --- choice chips: single-select styled as a radio/checkbox group ------------ */
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.choice-group.stack { flex-direction: column; align-items: flex-start; }
.choice-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--hair);
  color: var(--gold-1);
  font-size: .85rem;
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
  cursor: pointer;
}
.choice-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-chip:hover { background: rgba(255,255,255,.08); }
.choice-chip:has(input:checked) { background: var(--gold-2); color: #1c1330; font-weight: 600; border-color: transparent; }
.choice-chip:has(input:focus-visible) { outline: 2px solid var(--gold-1); outline-offset: 2px; }

/* --- checklists: multi-select with descriptive labels ------------------------- */
.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
/* check-items are <label>s, but read as sentences - not the small-caps field labels */
.check-item {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0;
  font-size: .85rem; line-height: 1.45;
  text-transform: none; letter-spacing: normal;
  color: var(--gold-1); cursor: pointer;
}
.check-item + .check-item { margin-top: 10px; }
.check-list .check-item + .check-item { margin-top: 0; }   /* the list's gap already spaces these */
.check-item input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--gold-2); cursor: pointer; }
.check-list .other-detail { margin: -2px 0 0 26px; width: calc(100% - 26px); }

/* blocks that appear when an answer reveals more questions */
.sub-panel {
  margin: 12px 0 4px 8px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid rgba(255,192,107,.25);
}
.sub-panel .check-list { margin-top: 0; }
/* a sub-panel directly under its tick box, inside the same list */
.check-list > .sub-panel { margin: 0 0 6px 7px; padding: 2px 0 2px 18px; }
.check-list > .sub-panel textarea { min-height: 60px; }
.sub-panel .modal-section-title { margin-bottom: 8px; }
/* --- contact footer (assets/contact.js), on every page ----------------------- */
/* the wrapper copies <main>'s classes, so the box is exactly as wide as the
   page's other boxes; it only drops the gap above (main already has one) */
.contact-footer-wrap { padding-top: 0 !important; }
.contact-footer {
  position: relative;
  z-index: 1;
  padding: 14px 18px;
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--gold-2);
  border-radius: 12px;
  font-size: .78rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.contact-footer a { color: var(--gold-1); }

/* links to other pages at the bottom of a page - same box as the contact footer */
.link-box {
  position: relative;
  z-index: 1;
  padding: 14px 18px;
  background: var(--elizabeth);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--gold-2);
  border-radius: 12px;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.link-box a { color: var(--gold-1); }

.choice-group + div > label:first-child,
.choice-group + div > .label-row:first-child { margin-top: 18px; }
.notice-box p { margin: 0; }
