:root {
  --ink: #101b33;
  --ink-soft: #1c2a48;
  --paper: #fff;
  --ivory: #f0f3f8;
  --line: #dce3ee;
  --muted: #465673;
  --gold: #3255cb;
  --gold-light: #e5ecff;
  --shadow: 0 12px 30px #152b5510;
  --blue: #2548bf;
  --blue-dark: #143298;
  --deep: #101b33;
}
body { background: var(--ivory); }
button, select, input { touch-action: manipulation; }
:where(button, select, input, a):focus-visible {
  outline: 3px solid #4168e4;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.jury-wordmark, .jury-top-title { display: flex; align-items: center; gap: 12px; }
.jury-wordmark { font-weight: 800; font-size: 15px; letter-spacing: .09em; }
.jury-wordmark small { display: block; margin-top: 3px; font-size: 11px; }
.jury-wordmark img, .jury-top-title img { width: 42px; height: 42px; border-radius: 9px; }
.jury-top-title b { font-size: 15px; }
.sidebar { padding: 28px 18px; background: var(--deep); }
.sidebar .jury-wordmark { margin: 0 0 42px 6px; }
.nav { gap: 8px; }
.nav button { min-height: 48px; color: #d3ddf8; font-size: 14px; }
.nav button span { min-width: 22px; color: inherit; font-size: 19px; text-align: center; }
.nav button.active { background: #293d6a; color: #fff; }
.nav button.active::before { display: none; }
.side-bottom { border-top-color: #506180; }
.side-user small { color: #b6c7ec; }
.topbar { background: #fffffff5; border-color: var(--line); }
.jury-logout { min-width: 44px; min-height: 44px; color: var(--ink); font-size: 20px; }
.content { padding-top: 28px; }
.title, .welcome h1 { color: var(--ink); }
.welcome, .results-final-header { margin-bottom: 20px; }
.subtitle, .feature-info p, .modal p { color: var(--muted); font-size: 14px; }
.eyebrow, .stat-label, .rating-sheet-head { color: var(--blue-dark); }
.phase-pill { background: #e5ecff; border: 1px solid #c9d6ff; color: #183790; font-size: 11px; }
.card, .panel, .table-wrap, .selection-card, .rating-sheet {
  border-color: var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.btn {
  min-height: 46px;
  padding-inline: 16px;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.btn:hover { background: var(--blue-dark); }
.btn.gold { background: #dce7ff; color: #183790; }
.btn.gold:hover { background: #cddcff; }
.btn.outline { background: #fff; color: var(--blue-dark); border-color: #c0cde5; }
.btn.outline:hover { background: #eef3ff; }
.btn.small { min-height: 44px; font-size: 12px; }
.input, .search { color: var(--ink); border-color: #c5d0e3; }
.jury-intro, .jury-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.jury-intro { margin-bottom: 20px; }
.jury-intro p { margin: 0 0 5px; color: var(--blue-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.jury-intro h1 { margin: 0; font: 500 clamp(31px,5vw,56px)/1.08 var(--serif); }
.jury-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .75fr);
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(140deg,#101b33,#253e76);
  color: #fff;
  box-shadow: 0 18px 35px #162c542b;
}
.jury-dashboard-copy { padding: clamp(24px, 5vw, 56px); }
.jury-dashboard h2 { margin: 0 0 12px; color: #d1dfff; font-size: 16px; }
.jury-total { display: flex; align-items: baseline; gap: 8px; margin: 0 0 16px; }
.jury-total strong { font: 500 clamp(44px, 7vw, 76px)/1 var(--serif); }
.jury-total span, .jury-next { color: #e1eaff; font-size: 14px; }
.jury-dashboard .home27-track { height: 7px; background: #4a608d; }
.jury-dashboard .home27-track i { background: #a7bdff; }
.jury-next { margin: 16px 0; }
.jury-resume { justify-content: space-between; gap: 20px; background: #fff; color: #162f80; }
.jury-resume:hover { background: #dce7ff; }
.jury-editorial { position: relative; margin: 0; min-height: 250px; }
.jury-editorial img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 26%; }
.jury-editorial figcaption { position: absolute; right: 12px; bottom: 12px; padding: 9px 13px; border-radius: 10px; background: #101b33; color: white; font-weight: 700; }
.jury-editorial figcaption span { display: block; color: #c6d6fb; font-size: 11px; font-weight: 500; }
.jury-discover { margin-top: 30px; }
.jury-section-title { margin-bottom: 13px; }
.jury-section-title h2 { margin: 0; font: 500 29px var(--serif); }
.jury-section-title > span { color: var(--muted); font-size: 13px; }
.discover-carousel, .discover-feature, .candidate-feature { border-radius: 17px; }
.discover-image, .selection-photo-wrap { background: #e8edf7; }
.discover-copy p, .discover-actions-left span { color: var(--muted); font-size: 13px; }
.discover-detail-button, .discover-note, .discover-next-unseen, .discover-nav { min-height: 44px; }
.discover-note, .discover-next-unseen { background: var(--blue-dark); color: #fff; }
.discover-region, .selection-caption span, .results-region { color: var(--blue-dark); }
.candidate-switch button { min-height: 44px; }
.feature-img { background: #e8edf7; }
.rating-sheet { background: #f1f5ff; }
.rating-adjust { width: 44px; height: 44px; color: var(--blue-dark); }
.rating-preset { min-height: 44px; color: var(--ink); font-size: 12px; }
.rating-preset.active { border-color: #7999ff; background: #dce7ff; color: var(--blue-dark); }
.rating-slider { accent-color: var(--blue); }
.rating-hint { color: var(--muted); font-size: 12px; }
.selection-card.selected { border-color: var(--blue); background: #eaf0ff; }
.selection-bar { border-color: var(--line); background: #fffffff5; }
.selection-bar .btn { min-height: 44px; font-size: 12px; }
.results-podium-card, .results-podium-card.leading { background: #fff; border-color: #cbd9f4; }
.results-podium-card.leading { background: #eaf0ff; }
.results-score { color: var(--blue-dark); }
.results-closure-banner, .selection-steps, .jury-averages { border-color: var(--line); }
.admin-tabs { gap: 8px; padding-bottom: 10px; }
.admin-tabs button { min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 12px; }
.admin-tabs button.active { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.table-wrap { overflow-x: auto; }
.table-wrap th { background: #eaf0fb; color: var(--ink); }
.table-wrap td { color: var(--ink); }
.stat-value { color: var(--blue-dark); }
.modal { max-height: calc(100dvh - 36px); overflow: auto; border-radius: 20px; background: #fff; }
.login-page { background: #e5ebf7; }
.login-shell { grid-template-columns: 1fr 1fr; min-height: 560px; border: 0; border-radius: 26px; box-shadow: 0 22px 65px #12274d30; }
.login-visual { isolation: isolate; min-height: 0; padding: 0; background: var(--deep); }
.login-visual::before { display: none; }
.login-candidate-photo {
  inset: 0; height: 100%; width: 100%; max-width: none; object-fit: cover; object-position: center 26%;
  filter: none; opacity: 1;
}
.login-photo-shade { bottom: 0; height: 50%; background: linear-gradient(0deg,#101b33dc,transparent); }
.login-copy { bottom: 27px; left: 28px; width: auto; padding: 0; color: #fff; background: none; }
.login-copy span { font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.login-copy strong { display: block; margin-top: 8px; font: 500 clamp(35px, 5vw, 63px)/.95 var(--serif); }
.login-form-side { background: #fff; }
.login-form h1 { margin: 24px 0; font: 500 clamp(35px,5vw,49px)/1.05 var(--serif); }
.login-form .login-field label { color: var(--ink); font-size: 13px; }
.login-form #login-name, .login-form #login-pin { min-height: 50px; border: 1px solid #b9c9e6; border-radius: 10px; font-size: 16px; }
.login-form #login-submit { justify-content: space-between; min-height: 50px; background: var(--blue); color: #fff; font-size: 14px; }
.login-form .notice { margin-bottom: 13px; color: #25365a; background: #eaf0ff; border-color: #c8d6f1; font-size: 12px; }
.login-form .login-demo-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  .login-page { padding: 0; }
  .login-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto 1fr; min-height: 100dvh; border-radius: 0; }
  .login-visual { height: clamp(190px,33svh,315px); }
  .login-copy { bottom: 16px; left: 18px; width: auto; padding: 0; }
  .login-copy strong { font-size: clamp(34px,10vw,50px); }
  .login-form-side { padding: 20px 20px max(16px,env(safe-area-inset-bottom)); }
  .login-form h1 { margin: 15px 0 19px; }
  .topbar { height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .jury-top-title img { width: 32px; height: 32px; }
  .content { padding: 16px max(13px,env(safe-area-inset-right)) calc(86px + env(safe-area-inset-bottom)) max(13px,env(safe-area-inset-left)); }
  .mobile-nav { height: calc(64px + env(safe-area-inset-bottom)); background: #fff; border-color: var(--line); }
  .mobile-nav button {
    display: flex; min-width: 0; flex: 1 1 0; min-height: 48px; flex-direction: column; justify-content: center;
    align-items: center; gap: 3px; padding: 3px 1px; border-radius: 9px; color: #435472; font-size: 9px;
  }
  .mobile-nav button span { color: inherit; font-size: 18px; }
  .mobile-nav button.active { background: #e5ecff; color: #173794; }
  .jury-intro { margin-bottom: 13px; }
  .jury-dashboard { grid-template-columns: minmax(0,1fr); }
  .jury-dashboard-copy { padding: 21px; }
  .jury-editorial { min-height: clamp(125px,25svh,210px); }
  .jury-editorial img { object-position: center 24%; }
  .jury-resume { width: 100%; }
  .jury-discover { margin-top: 23px; }
  .selection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .selection-bar { top: calc(56px + env(safe-area-inset-top)); }
  .modal-back.show { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; padding-bottom: max(22px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Each profile supplies an accent, a readable text color and a light surface. */
[data-juror-theme="blue"]   { --profile-accent:#2548bf; --profile-dark:#143298; --profile-light:#e4ecff; }
[data-juror-theme="violet"] { --profile-accent:#713caa; --profile-dark:#532483; --profile-light:#f1e7ff; }
[data-juror-theme="yellow"] { --profile-accent:#f0c32d; --profile-dark:#634800; --profile-light:#fff3bd; }
[data-juror-theme="green"]  { --profile-accent:#1a774b; --profile-dark:#105638; --profile-light:#dbf5e6; }
[data-juror-theme="orange"] { --profile-accent:#dc692f; --profile-dark:#833608; --profile-light:#ffe7d7; }
[data-juror-theme="teal"]   { --profile-accent:#008179; --profile-dark:#005852; --profile-light:#d9f6f2; }
[data-juror-theme="red"]    { --profile-accent:#b92e40; --profile-dark:#871b2a; --profile-light:#ffe5e8; }
[data-juror-theme="pink"]   { --profile-accent:#af3779; --profile-dark:#812357; --profile-light:#fce5f2; }

body[data-juror-theme] {
  --blue: var(--profile-dark,#2548bf);
  --blue-dark: var(--profile-dark,#143298);
  --gold-light: var(--profile-light,#e5ecff);
}
.login-profiles { min-inline-size: 0; margin: 0 0 16px; padding: 0; border: 0; }
.login-profiles legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.login-profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.login-profile { position: relative; min-width: 0; cursor: pointer; }
.login-profile input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.login-profile > span {
  display: grid;
  min-height: 48px;
  align-content: center;
  gap: 2px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--profile-accent,#7183a3);
  border-radius: 8px;
  background: var(--profile-light,#f0f3f8);
  color: var(--profile-dark,#101b33);
  overflow-wrap: anywhere;
}
.login-profile b { font-size: 13px; }
.login-profile small { font-size: 11px; }
.login-profile input:checked + span { box-shadow: inset 0 0 0 2px var(--profile-dark,#101b33); }
.login-profile input:focus-visible + span { outline: 2px solid var(--profile-dark,#101b33); outline-offset: 2px; }

body[data-juror-theme] .login-shell,
body[data-juror-theme] .topbar { border-top: 4px solid var(--profile-accent,#2548bf); }
body[data-juror-theme] .nav button.active,
body[data-juror-theme] .mobile-nav button.active,
body[data-juror-theme] .phase-pill {
  background: var(--profile-light,#e5ecff);
  color: var(--profile-dark,#143298);
  border-color: var(--profile-accent,#c9d6ff);
}
body[data-juror-theme] .jury-dashboard {
  background: linear-gradient(140deg, #101b33, var(--profile-dark,#253e76));
}
body[data-juror-theme] .jury-dashboard .home27-track i { background: var(--profile-accent,#a7bdff); }
body[data-juror-theme] .jury-resume,
body[data-juror-theme] .rating-sheet,
body[data-juror-theme] .selection-card.selected,
body[data-juror-theme] .results-podium-card.leading { background: var(--profile-light,#f1f5ff); }
body[data-juror-theme] .jury-resume { color: var(--profile-dark,#162f80); }
body[data-juror-theme] .jury-resume:hover { background: #fff; }

@media (max-width: 720px) {
  body[data-juror-theme] .topbar { height: calc(60px + env(safe-area-inset-top)); }
  body[data-juror-theme] .selection-bar { top: calc(60px + env(safe-area-inset-top)); }
  .login-shell:has(.login-profiles) .login-visual { height: clamp(155px,26svh,240px); min-height: 155px; }
}
.login-profile[data-juror-theme="default"] {
  --profile-accent:#7183a3;
  --profile-dark:#344361;
  --profile-light:#f0f3f8;
}

.notes-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.notes-filters button {
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}
.notes-filters button[aria-pressed="true"] { border-color: var(--blue-dark); background: var(--gold-light); color: var(--blue-dark); font-weight: 700; }
.notes-filters button span { margin-inline-start: 3px; font-variant-numeric: tabular-nums; }
.notes-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.notes-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.notes-row .portrait { width: 38px; height: 50px; }
.notes-person, .notes-score { display: grid; gap: 3px; }
.notes-person { overflow-wrap: anywhere; }
.notes-person small, .notes-score small { color: var(--muted); font-size: 12px; }
.notes-score { justify-items: end; }
.notes-score > span { padding: 4px 7px; border-radius: 7px; background: #edf0f5; color: #394861; font-size: 11px; font-weight: 700; }
.notes-score [data-note-state="draft"] { background: #fff1c8; color: #694800; }
.notes-score [data-note-state="validated"] { background: #dff3ea; color: #15563c; }
.notes-back { margin-bottom: 12px; }
.note-feedback { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 9px 11px; border-radius: 9px; background: #e7eefb; color: #25365a; font-size: 13px; font-weight: 700; }
.note-feedback[data-state="saved"], .jury-readiness.ready { background: #dff3ea; color: #15563c; }
.note-feedback[data-state="failed"] { background: #ffe6e9; color: #8a1e2c; }
.jury-readiness { margin: 0 0 12px; font-size: 13px; font-weight: 700; }

.video-portrait-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid var(--blue-dark);
  border-radius: 9px;
  background: var(--gold-light);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.video-portrait-link:hover { text-decoration: underline; }
.video-portrait-link small { font-size: 11px; }
.discover-button-row .video-portrait-link { margin-top: 0; }
.discover-profile-modal .video-portrait-link { display: flex; }
