/* ==========================================================================
   A Chorus Line — Sydney Musical Theatre
   Black & white, deep red accent (#870102), softly rounded edges, minimal motion.
   ========================================================================== */

/* Object Sans is a licensed font from Pangram Pangram. Once you have the web
   font files, put them in static/fonts/ and uncomment this block.
@font-face { font-family: "Object Sans"; src: url("../fonts/ObjectSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Object Sans"; src: url("../fonts/ObjectSans-Heavy.woff2") format("woff2"); font-weight: 700; font-display: swap; }
*/

/* Pinto Inline (licensed font, supplied by Sydney Musical Theatre) for the
   "A Chorus Line" heading. */
@font-face { font-family: "Pinto Inline"; src: url("../fonts/PintoInline.ttf") format("truetype"); font-display: swap; }

:root {
  --black: #000;
  --ink: #111;
  --white: #fff;
  --paper: #f5f5f5;
  --line: #d9d9d9;
  --line-strong: #111;
  --muted: #6b6b6b;
  --accent: #870102;
  --accent-hover: #6a0102;
  --accent-tint: #f7e8e8;
  --radius: 8px;
  --radius-sm: 6px;
  --yes: #15803d;
  --yes-tint: #e6f4ea;
  --maybe: #d97706;
  --maybe-tint: #fdf1e1;
  --no: #b91c1c;
  --no-tint: #fbe9e9;
  --error: #b91c1c;
  --font-display: "League Spartan", "Helvetica Neue", Arial, sans-serif;
  --font-title: "Pinto Inline", "League Spartan", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Object Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 26px; } }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font-body);
  padding: 13px 22px;
  border: 1.5px solid var(--black);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  background: var(--white);
  color: var(--black);
  white-space: nowrap;
}
.btn--primary { background: var(--black); color: var(--white); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--outline:hover { background: var(--black); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { border-color: var(--white); }
.btn--small { padding: 8px 12px; font-size: 13px; }
.btn--large { padding: 18px 40px; font-size: 17px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Inputs ------------------------------------------------------------ */
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .label {
  display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0;
}
.optional { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=url],
input[type=password], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%;
  font: 16px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
  padding-right: 38px;
}
input:hover, select:hover, textarea:hover { border-color: #999; }
input:focus, select:focus, textarea:focus { border-color: var(--black); outline: none; }
textarea { resize: vertical; }
.field__hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.field__error { font-size: 13px; color: var(--error); margin: 8px 0 0; font-weight: 600; }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--error); }

/* Visually hidden but still focusable for validation messages */
.segmented__option input, .upload input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}

/* Segmented choice buttons (radios) */
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.segmented--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.segmented--inline { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.segmented__option { position: relative; margin: 0 !important; font-weight: 500 !important; }
.segmented__option span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 10px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 15px; background: var(--white);
}
.segmented__option span:hover { border-color: #999; }
.segmented__option input:checked + span {
  background: var(--black); color: var(--white); border-color: var(--black); position: relative; z-index: 2;
}
.segmented__option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; z-index: 3; position: relative; }
.segmented--inline .segmented__option span { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.seg-yes input:checked + span { background: var(--yes); border-color: var(--yes); }
.seg-maybe input:checked + span { background: var(--maybe); border-color: var(--maybe); }
.seg-no input:checked + span { background: var(--no); border-color: var(--no); }
.seg-pending input:checked + span { background: var(--muted); border-color: var(--muted); }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.segmented--mode input:checked + span { background: var(--accent); border-color: var(--accent); }
@media (max-width: 700px) { .segmented--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* File upload */
.upload { display: flex !important; align-items: stretch; position: relative; cursor: pointer; margin: 0 !important; font-weight: 400 !important; }
.upload__button {
  flex: none; display: flex; align-items: center; padding: 0 18px; min-height: 48px;
  background: var(--black); color: var(--white); font-weight: 600; font-size: 14px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.upload__name {
  flex: 1; display: flex; align-items: center; padding: 0 14px; min-width: 0;
  border: 1.5px solid var(--line); border-left: 0; color: var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px;
}
.upload:hover .upload__button { background: var(--accent); }
.upload input:focus-visible ~ .upload__button { outline: 2px solid var(--accent); outline-offset: 2px; }
.field--invalid .upload__name { border-color: var(--error); }

/* Checkbox */
.check { display: flex !important; gap: 14px; align-items: flex-start; font-weight: 500 !important; cursor: pointer; font-size: 15px !important; line-height: 1.5; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--black); cursor: pointer; }

/* Searchable dropdown */
.combo { position: relative; }
.combo input { padding-right: 48px; }
.combo__toggle {
  position: absolute; right: 0; top: 0; bottom: 0; width: 46px;
  border: 0; background: transparent; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.combo__toggle svg { width: 12px; height: 8px; }
.combo__list {
  position: absolute; z-index: 20; left: 0; right: 0; top: 100%;
  padding: 4px; list-style: none;
  background: var(--white); border: 1.5px solid var(--black); border-radius: var(--radius-sm);
  margin-top: 4px; max-height: 300px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.combo__list li { padding: 10px 12px; cursor: pointer; font-size: 15px; border-radius: 4px; }
.combo__list li[aria-selected=true] { font-weight: 700; }
.combo__list li:hover, .combo__list li.is-active { background: var(--accent); color: var(--white); }
.combo__empty { color: var(--muted); cursor: default !important; background: none !important; color: var(--muted) !important; }

.alert {
  border-left: 4px solid var(--error); background: var(--no-tint);
  padding: 14px 18px; margin: 0 0 24px; font-size: 15px; border-radius: var(--radius-sm);
}
.alert--ok { border-color: var(--yes); background: var(--yes-tint); }
.notice { border: 1.5px solid var(--accent); background: var(--accent-tint); padding: 16px 20px; margin: 0 0 20px; border-radius: var(--radius); }
.notice p { margin: 0 0 6px; }
.notice code { font-size: 18px; font-weight: 700; background: var(--white); padding: 4px 10px; border: 1px solid var(--line); user-select: all; }

/* ==========================================================================
   Public audition page
   ========================================================================== */
.wrap--narrow { max-width: 680px; }

/* Header: uploadable banner photo, then the plain title */
.hero { background: var(--black); }
.hero--empty { height: 160px; }
.hero__img { display: block; width: 100%; height: clamp(140px, 22vw, 340px); object-fit: cover; object-position: center; }
.title {
  font-family: var(--font-title); font-weight: 400;   /* Pinto Inline only has a regular weight */
  font-size: clamp(40px, 8vw, 72px); line-height: 1; letter-spacing: -0.02em;
  text-transform: uppercase; margin: 56px 0 28px;
}
.title__sub { display: block; font-family: var(--font-display); font-weight: 800; font-size: .5em; letter-spacing: 0; margin-top: 16px; color: var(--accent); }
@media (max-width: 600px) { .hero--empty { height: 100px; } .title { margin-top: 32px; } }

/* One column, top to bottom */
.audition-form { padding: 24px 0; }
.form-section { padding: 36px 0 14px; border-top: 1.5px solid var(--black); }
.form-section:first-of-type { border-top: 0; }
.form-section h2 { font-size: 28px; margin-bottom: 24px; }
.notice--preview { margin-top: 24px; }

.intro { padding: 4px 0 40px; border-bottom: 1.5px solid var(--black); font-size: 17px; }
.intro__lede { margin-bottom: 18px; }
.intro__facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.intro__facts li { padding-left: 18px; position: relative; }
.intro__facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.intro .btn { margin-top: 4px; }
@media (max-width: 600px) { .intro .btn { width: 100%; } }

.privacy { border-top: 1.5px solid var(--black); padding: 40px 0 8px; font-size: 14px; color: #3d3d3d; }
.privacy h2 { font-size: 18px; margin-bottom: 12px; color: var(--ink); }
.privacy p { max-width: 720px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { padding: 24px 0 64px; }
.contact-line { margin: 28px 0 0; font-size: 15px; color: #3d3d3d; }
@media (max-width: 600px) { .submit-row .btn { width: 100%; } }

.confirm { padding: 40px 24px 120px; }
.confirm__mark {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--white); font-size: 32px; margin-bottom: 28px; border-radius: 50%;
}
.confirm h2 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 20px; }
.confirm p { font-size: 18px; }

.site-footer { border-top: 1.5px solid var(--black); padding: 28px 0; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.social { display: flex; gap: 14px; flex-basis: 100%; }
.social a { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1.5px solid var(--line); border-radius: 50%; color: var(--ink); }
.social a:hover { border-color: var(--ink); }
.social svg { width: 18px; height: 18px; }

/* ==========================================================================
   Staff area
   ========================================================================== */
body.staff { background: var(--paper); }
.staffbar { background: var(--accent); color: var(--white); }
.staffbar__inner {
  max-width: 1320px; margin: 0 auto; padding: 0 24px; min-height: 64px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.staffbar__brand { color: var(--white); text-decoration: none; display: flex; align-items: baseline; gap: 10px; }
.staffbar__show { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 20px; letter-spacing: -0.01em; }
.staffbar__sub { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .75); }
.staffbar__nav { display: flex; gap: 4px; flex: 1; }
.staffbar__nav a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: 22px 12px; font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
.staffbar__nav a:hover { color: var(--white); }
.staffbar__nav a[aria-current=page] { color: var(--white); border-bottom-color: var(--white); }
.staffbar__user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.staffbar__user form { margin: 0; }
@media (max-width: 760px) {
  .staffbar__inner { gap: 8px 16px; padding: 12px 16px 0; }
  .staffbar__nav { order: 3; flex-basis: 100%; }
  .staffbar__nav a { padding: 12px 10px; }
  .staffbar__user { margin-left: auto; }
  .staffbar__user span { display: none; }
}

.staff-main { max-width: 1320px; margin: 0 auto; padding: 40px 24px 80px; }
@media (max-width: 600px) { .staff-main { padding: 24px 16px 64px; } }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 40px; }
.page-head p { margin: 0; font-size: 13px; }

.auth-card { max-width: 440px; margin: 40px auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.auth-card h1 { font-size: 32px; margin-bottom: 8px; }
.auth-card form { margin-top: 24px; }
@media (max-width: 600px) { .auth-card { padding: 28px 20px; margin: 8px auto; } }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.panel--flush { padding: 28px 0 0; }
.panel--flush > .panel__head, .panel--flush > .filters { padding: 0 28px; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.panel__head h2 { font-size: 22px; }
.panel__head p { margin: 0; font-size: 13px; }
.count { font-family: var(--font-body); font-weight: 500; font-size: 15px; color: var(--muted); margin-left: 6px; }
@media (max-width: 600px) {
  .panel { padding: 20px 16px; }
  .panel--flush { padding: 20px 0 0; }
  .panel--flush > .panel__head, .panel--flush > .filters { padding: 0 16px; }
}

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { background: var(--white); padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.tile--highlight { background: var(--black); color: var(--white); border-color: var(--black); }
.tile--highlight .tile__label { color: rgba(255, 255, 255, .8); }
.tile__label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin: 0 0 10px; }
.tile__value { font-family: var(--font-display); font-weight: 700; font-size: 48px; line-height: 1; margin: 0; }
@media (max-width: 820px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile__value { font-size: 36px; } }

/* Per-day chart */
.daychart { display: flex; align-items: stretch; gap: 12px; height: 240px; padding-bottom: 4px; }
.daychart__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; cursor: default; }
.daychart__col:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.daychart__count { font-size: 15px; font-weight: 700; line-height: 1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.daychart__track { flex: 1; width: 100%; display: flex; align-items: flex-end; border-bottom: 1.5px solid var(--black); }
.daychart__bar { width: 100%; background: var(--accent); min-height: 0; border-radius: 4px 4px 0 0; }
.daychart__col:hover .daychart__bar { background: var(--black); }
.daychart__label { font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 600px) { .daychart { gap: 6px; } .daychart__label { font-size: 10px; } }

/* Collapsible panel */
.collapsible > summary { list-style: none; cursor: pointer; margin-bottom: 0; position: relative; padding-right: 36px; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}
.collapsible[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.collapsible[open] > summary { margin-bottom: 20px; }
.collapsible > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Per-character chart */
.charchart { display: grid; gap: 6px; }
.charchart__row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 36px; align-items: center; gap: 14px; font-size: 14px; }
.charchart__track { height: 22px; background: var(--paper); border-radius: 4px; overflow: hidden; }
.charchart__bar { height: 100%; background: var(--accent); border-radius: 4px; }
.charchart__count { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .charchart__row { grid-template-columns: 110px minmax(0, 1fr) 28px; gap: 8px; font-size: 13px; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; width: auto; min-height: 40px; padding: 8px 12px; }
.filters select { width: auto; min-height: 40px; padding: 8px 36px 8px 12px; font-size: 14px; flex: 0 1 auto; }

/* Cards */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px; padding: 0 28px 28px;
}
@media (max-width: 600px) { .cards { padding: 0 16px 16px; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }
.card {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column;
  background: var(--white); cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.card:hover { border-color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.card__photo { position: relative; aspect-ratio: 4 / 5; background: var(--paper); overflow: hidden; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__photo .badge { position: absolute; top: 12px; left: 12px; }
.card__photo .badge--corner { left: auto; right: 12px; }
.badge.badge--outline { background: var(--white); color: var(--ink); border: 1px solid currentColor; }
.badge--outline.badge--yes { color: var(--yes); }
.badge--outline.badge--maybe { color: var(--maybe); }
.badge--outline.badge--no { color: var(--no); }
.badge--outline.badge--pending { color: var(--muted); }
.card__overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, 0));
  color: var(--white);
}
.card__name { font-family: var(--font-body); font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: 0; margin: 0 0 2px; }
.card__meta { font-size: 15px; color: rgba(255, 255, 255, .82); margin: 0; }
.card__body { padding: 14px 16px 14px; display: flex; flex-direction: column; flex: 1; gap: 14px; }
.card__roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role { display: flex; flex-direction: column; min-width: 0; }
.role__label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.role__name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.card__mine { color: var(--muted); font-weight: 700; }
.card__mine--yes { color: var(--yes); }
.card__mine--maybe { color: var(--maybe); }
.card__mine--no { color: var(--no); }
@media (max-width: 600px) {
  .card__roles { grid-template-columns: 1fr; gap: 8px; }
  .card__name { font-size: 18px; }
  .card__foot { flex-direction: column; align-items: flex-start; }
}
.empty { padding: 40px 28px; color: var(--muted); margin: 0; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 9px; color: var(--white); background: var(--muted); line-height: 1; border-radius: 4px;
}
.badge--yes { background: var(--yes); }
.badge--maybe { background: var(--maybe); }
.badge--no { background: var(--no); }
.badge--none { background: var(--paper); color: var(--muted); }
.badge--pending { background: var(--white); color: var(--muted); border: 1px solid var(--line); }

.tally { display: inline-flex; gap: 6px; }
.tally { gap: 12px; }
.tally__item { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.tally__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tally__item--yes .tally__dot { background: var(--yes); }
.tally__item--maybe .tally__dot { background: var(--maybe); }
.tally__item--no .tally__dot { background: var(--no); }

/* Modal */
.modal {
  width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: 12px;
  display: none; flex-direction: column; overflow: hidden; color: var(--ink); position: relative;
}
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(0, 0, 0, .6); }
.modal__head { display: flex; gap: 20px; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.modal__photo { width: 72px; height: 90px; object-fit: cover; flex: none; background: var(--paper); border-radius: var(--radius-sm); }
.modal__title { flex: 1; min-width: 0; }
.modal__title h2 { font-size: 28px; }
.modal__title p { margin: 4px 0 0; font-size: 14px; }
.modal__close { all: unset; cursor: pointer; font-size: 32px; line-height: 1; width: 40px; height: 40px; text-align: center; align-self: flex-start; border-radius: 50%; }
.modal__close:hover { background: var(--paper); }
.modal__body { overflow-y: auto; padding: 24px 28px 32px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
@media (max-width: 600px) {
  .modal { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; border-radius: 0; }
  .modal__head { padding: 16px; gap: 14px; }
  .modal__photo { width: 56px; height: 70px; }
  .modal__title h2 { font-size: 22px; }
  .modal__body { padding: 16px 16px 24px; }
}

.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 28px; gap: 4px; }
.tab {
  all: unset; cursor: pointer; padding: 14px 4px; margin-right: 24px; font-weight: 600; font-size: 15px;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab[aria-selected=true] { color: var(--black); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); }
@media (max-width: 600px) { .tabs { padding: 0 16px; } }

.video { aspect-ratio: 16 / 9; background: var(--black); margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video__none { color: #cfcfcf; padding: 24px; margin: 0; }
.video:has(.video__none) { aspect-ratio: auto; }

.answers { margin: 0; }
.answers__row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.answers__row dt { color: var(--muted); font-size: 13px; font-weight: 600; padding-top: 2px; }
.answers__row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 600px) { .answers__row { grid-template-columns: 1fr; gap: 2px; } }

#pane-feedback h3 { font-size: 18px; margin-bottom: 6px; }
.vote-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 24px; max-width: 480px; }
.vote {
  font: 700 15px/1 var(--font-body); padding: 14px; cursor: pointer; border-radius: var(--radius-sm);
  background: var(--white); border: 2px solid currentColor;
}
.vote--yes { color: var(--yes); }
.vote--maybe { color: var(--maybe); }
.vote--no { color: var(--no); }
.vote--yes:hover { background: var(--yes-tint); }
.vote--maybe:hover { background: var(--maybe-tint); }
.vote--no:hover { background: var(--no-tint); }
.vote[aria-pressed=true] { color: var(--white); }
.vote--yes[aria-pressed=true] { background: var(--yes); border-color: var(--yes); }
.vote--maybe[aria-pressed=true] { background: var(--maybe); border-color: var(--maybe); }
.vote--no[aria-pressed=true] { background: var(--no); border-color: var(--no); }
.save-row { display: flex; align-items: center; gap: 16px; margin: 14px 0 36px; font-size: 14px; }
.my-comment { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; margin: 12px 0 8px; }
.save-confirm { margin: 0 0 24px; font-weight: 600; color: var(--yes) !important; }
#m-editor { margin-bottom: 8px; }
.panel-feedback-title { margin-top: 28px;  padding-top: 24px; border-top: 1.5px solid var(--black); }
.feedback-list { list-style: none; margin: 16px 0 0; padding: 0; }
.feedback-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.feedback-item__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.feedback-item__notes { margin: 8px 0 0; white-space: pre-line; font-size: 15px; }
.feedback-item__time { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; padding: 16px; border: 1px solid var(--no); border-radius: var(--radius-sm); background: var(--no-tint); }
.danger-zone p { margin: 4px 0 0; font-size: 13px; }
.btn--danger { background: var(--no); border-color: var(--no); color: var(--white); }
.btn--danger:hover { background: #7f1414; border-color: #7f1414; }
@media (max-width: 600px) { .danger-zone { flex-direction: column; align-items: flex-start; } }

/* In-popup headshot / CV viewer */
.viewer { position: absolute; inset: 0; z-index: 10; background: var(--white); display: flex; flex-direction: column; }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer__actions { display: flex; gap: 8px; }
.viewer__frame { flex: 1; min-height: 0; background: #e9e9e9; display: flex; align-items: center; justify-content: center; }
.viewer__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer__frame img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.modal[open] { height: calc(100vh - 48px); }
@media (max-width: 600px) { .modal[open] { height: 100%; } }

/* Admin */
.window-status { font-weight: 700; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.window-status--open { background: var(--yes-tint); color: var(--yes); }
.window-status--before { background: var(--maybe-tint); color: #92400e; }
.window-status--after { background: var(--no-tint); color: var(--no); }
.settings-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.settings-form .field { margin: 0; }
.settings-form .btn { min-height: 48px; }
.subhead { font-size: 18px; margin: 32px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.banner-preview { display: block; width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--black); }
.banner-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; }
@media (max-width: 820px) { .settings-form { grid-template-columns: 1fr; } }
.export fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.export__buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; margin: 0 -4px 28px; }
.profiles { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 820px; }
.profiles th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 4px; border-bottom: 1.5px solid var(--black); }
.profiles td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.profiles td input:not([type=checkbox]), .profiles td select { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.profiles td select { padding-right: 32px; }
.profiles input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--black); }
.profiles .center { text-align: center; }
.profiles .actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.profiles tr.is-inactive td { opacity: .55; }
.add-profile { border-top: 1.5px solid var(--black); padding-top: 24px; }
.add-profile h3 { font-size: 18px; margin-bottom: 16px; }
.add-profile__fields { display: grid; grid-template-columns: 1fr 1.4fr 160px auto; gap: 12px; align-items: end; }
.add-profile__fields .field { margin: 0; }
.add-profile__fields .btn { min-height: 48px; }
@media (max-width: 820px) { .add-profile__fields { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
