/* =====================================================================
   Startup Arena · jury scoring — visual identity
   Ursa design style (warm neutral surfaces, Nunito, soft radii, line icons,
   pale accent states), with blue as the dominant colour.
   ===================================================================== */

/* ---------- Nunito (SIL Open Font License), self-hosted, variable weight */
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url('../fonts/nunito-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url('../fonts/nunito-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: italic; font-display: swap; font-weight: 200 1000;
  src: url('../fonts/nunito-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- design tokens */
:root {
  --ink: #11100E;
  --text: #353430;
  --muted: #736F67;
  --faint: #9A968E;
  --bg: #FBFAF8;          /* content surface (Ursa editor pane) */
  --side: #F5F4F0;        /* sidebar (Ursa navigation pane) */
  --surface: #FFFFFF;     /* cards and lists (Ursa list pane) */
  --line: #EDECE7;
  --line-2: #DEDBD6;

  --brand: #1E5FD8;       /* dominant blue */
  --brand-600: #1A52BD;
  --brand-700: #1747A6;
  --brand-800: #103581;
  --brand-50: #F3F7FE;
  --brand-100: #E8F0FD;
  --brand-200: #D2E1FA;

  --green: #55A067;  --green-ink: #2C7342;  --green-bg: #EAF4EC;
  --orange: #DF8734; --orange-ink: #93500F; --orange-bg: #FCF0E3;
  --red: #CE4848;    --red-ink: #A33434;    --red-bg: #FBEBEB;
  --purple: #8365BA; --purple-ink: #5B4394; --purple-bg: #F1ECF8;
  --amber: #E0BD4E;  --amber-ink: #7E600A;  --amber-bg: #FBF4DF;

  --r-sm: 8px; --r: 11px; --r-lg: 16px; --r-xl: 20px;
  --shadow-1: 0 1px 2px rgba(17, 16, 14, .04), 0 1px 1px rgba(17, 16, 14, .02);
  --shadow-2: 0 1px 2px rgba(17, 16, 14, .04), 0 12px 32px rgba(17, 16, 14, .07);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Bootstrap bridge */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.55;
  --bs-body-color: var(--text);
  --bs-body-bg: var(--bg);
  --bs-emphasis-color: var(--ink);
  --bs-heading-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--side);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--r);
  --bs-border-radius-sm: var(--r-sm);
  --bs-border-radius-lg: var(--r-lg);
  --bs-border-radius-pill: 999px;
  --bs-primary: #1E5FD8;
  --bs-primary-rgb: 30, 95, 216;
  --bs-link-color: var(--brand-700);
  --bs-link-color-rgb: 23, 71, 166;
  --bs-link-hover-color: var(--brand);
  --bs-link-hover-color-rgb: 30, 95, 216;
  --bs-focus-ring-color: rgba(30, 95, 216, .22);
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); font-weight: 800; letter-spacing: -.012em; }
h1, .h1, .h2, .h3 { font-weight: 900; letter-spacing: -.02em; }
.h3 { font-size: 1.7rem; }
strong, b, .fw-bold { font-weight: 800 !important; }
.fw-semibold { font-weight: 700 !important; }
.text-muted { color: var(--muted) !important; }
.small, small { font-size: .86em; }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
code { color: var(--brand-700); background: var(--brand-50); padding: .08em .35em; border-radius: 6px; font-size: .86em; }
.min-w-0 { min-width: 0; }
::selection { background: var(--brand-200); }

/* ---------- line icons (Lucide) */
.ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; }

/* ---------- application shell: Ursa-style sidebar */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { --bs-offcanvas-width: 292px; --bs-offcanvas-bg: var(--side); --bs-offcanvas-border-color: var(--line); }
.sb-inner { display: flex; flex-direction: column; gap: 4px; min-height: 100%; width: 100%; padding: 20px 14px 16px; background: var(--side); }
@media (min-width: 992px) {
  .app-shell { background: linear-gradient(to right, var(--side) 0, var(--side) 271px, var(--line) 271px, var(--line) 272px, var(--bg) 272px); }
  .sidebar.offcanvas-lg { flex: 0 0 272px; width: 272px; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background-color: var(--side) !important; }
  .sb-inner { min-height: 100vh; }
}
.sb-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--ink); }
.brand strong { font-weight: 900; letter-spacing: -.015em; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 1.16rem; line-height: 1.1; }
.brand-text small { display: block; max-width: 172px; font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-tile { flex: 0 0 auto; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 900; font-size: .92rem; letter-spacing: .02em; box-shadow: 0 5px 14px rgba(30, 95, 216, .30); }
.logo-tile.sm { width: 32px; height: 32px; border-radius: 10px; font-size: .74rem; box-shadow: 0 3px 10px rgba(30, 95, 216, .25); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); font-weight: 700; text-decoration: none; line-height: 1.25; }
.sb-link .ico { width: 20px; height: 20px; color: #4B4740; }
.sb-link:hover { background: rgba(17, 16, 14, .045); color: var(--ink); }
.sb-link.active { background: var(--brand-100); color: var(--brand-700); }
.sb-link.active .ico { color: var(--brand); }
.sb-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-count { font-size: .8rem; font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; }
.sb-link.active .sb-count { color: var(--brand-700); }
.sb-label { margin: 20px 12px 6px; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.dot { flex: 0 0 auto; display: inline-block; width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; background: var(--faint); }
.dot-food { background: var(--green); }
.dot-energy { background: var(--orange); }
.dot-final { background: var(--purple); }
.sb-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.sb-user strong { color: var(--ink); font-size: .92rem; }
.sb-user small { color: var(--muted); font-weight: 700; font-size: .74rem; }
.avatar { flex: 0 0 auto; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 900; font-size: .74rem; }

.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(245, 244, 240, .94); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(8px); }
.topbar .brand { margin-right: auto; font-size: 1.05rem; }
.topbar.public { position: static; background: transparent; border: 0; padding: 18px 22px 0; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: 30px 34px 24px; flex: 1 0 auto; }
.content.wide { max-width: none; }
.content.narrow { max-width: 560px; }
@media (max-width: 575.98px) { .content { padding: 18px 14px 20px; } .h3 { font-size: 1.45rem; } }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--faint); }

/* segmented control (language) */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(17, 16, 14, .06); }
.seg-btn { padding: 3px 10px; border-radius: 8px; font-size: .76rem; font-weight: 800; color: var(--muted); text-decoration: none; line-height: 1.5; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: #fff; color: var(--brand-700); box-shadow: 0 1px 2px rgba(17, 16, 14, .1); }

/* ---------- buttons */
.btn { --bs-btn-font-weight: 700; --bs-btn-border-radius: 10px; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: 1rem; --bs-btn-focus-box-shadow: 0 0 0 .22rem rgba(30, 95, 216, .22); display: inline-flex; align-items: center; justify-content: center; gap: .45em; }
.btn-sm { --bs-btn-border-radius: 8px; --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .7rem; --bs-btn-font-size: .85rem; }
.btn-lg { --bs-btn-border-radius: 12px; --bs-btn-padding-y: .7rem; --bs-btn-padding-x: 1.3rem; --bs-btn-font-size: 1.05rem; }
.btn .ico { width: 1.1em; height: 1.1em; vertical-align: 0; }
.btn-arena, .btn-primary {
  --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #9DB8EE; --bs-btn-disabled-border-color: #9DB8EE;
  box-shadow: 0 1px 2px rgba(30, 95, 216, .25), 0 4px 12px rgba(30, 95, 216, .16);
}
.btn-outline-secondary, .btn-outline-dark, .btn-light {
  --bs-btn-color: var(--text); --bs-btn-bg: #fff; --bs-btn-border-color: var(--line-2);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--side); --bs-btn-hover-border-color: var(--line-2);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: #ECEAE4; --bs-btn-active-border-color: var(--line-2);
  --bs-btn-disabled-color: var(--faint); --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: var(--line);
}
.btn-outline-success, .btn-outline-primary {
  --bs-btn-color: var(--brand-700); --bs-btn-bg: #fff; --bs-btn-border-color: #BFD2F6;
  --bs-btn-hover-color: var(--brand-700); --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-border-color: #9FBBF0;
  --bs-btn-active-color: var(--brand-800); --bs-btn-active-bg: var(--brand-100); --bs-btn-active-border-color: #9FBBF0;
}
.btn-dark { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: #2A2824; --bs-btn-hover-border-color: #2A2824; --bs-btn-active-bg: #000; }
.btn-success { --bs-btn-bg: #2E8A4B; --bs-btn-border-color: #2E8A4B; --bs-btn-hover-bg: #26763F; --bs-btn-hover-border-color: #26763F; --bs-btn-active-bg: #1F6334; --bs-btn-active-border-color: #1F6334; }
.btn-warning { --bs-btn-color: #3A2604; --bs-btn-bg: #F1A94A; --bs-btn-border-color: #F1A94A; --bs-btn-hover-color: #3A2604; --bs-btn-hover-bg: #E99A33; --bs-btn-hover-border-color: #E99A33; --bs-btn-active-bg: #DA8A22; --bs-btn-active-border-color: #DA8A22; --bs-btn-active-color: #3A2604; }
.btn-outline-warning { --bs-btn-color: var(--orange-ink); --bs-btn-bg: #fff; --bs-btn-border-color: #F0C99E; --bs-btn-hover-color: var(--orange-ink); --bs-btn-hover-bg: var(--orange-bg); --bs-btn-hover-border-color: #E9B67E; }
.btn-danger { --bs-btn-bg: #C23F3F; --bs-btn-border-color: #C23F3F; --bs-btn-hover-bg: #A83434; --bs-btn-hover-border-color: #A83434; }
.btn-outline-danger { --bs-btn-color: var(--red-ink); --bs-btn-bg: #fff; --bs-btn-border-color: #EFC4C4; --bs-btn-hover-color: var(--red-ink); --bs-btn-hover-bg: var(--red-bg); --bs-btn-hover-border-color: #E6A9A9; }
.btn-link { --bs-btn-color: var(--brand-700); --bs-btn-hover-color: var(--brand); font-weight: 700; }
.btn-ghost { --bs-btn-color: var(--muted); --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: rgba(17, 16, 14, .05); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: rgba(17, 16, 14, .08); --bs-btn-active-border-color: transparent; }
.btn-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); }
.btn-icon .ico { width: 20px; height: 20px; }
.btn-close:focus { box-shadow: 0 0 0 .22rem rgba(30, 95, 216, .22); }

/* ---------- forms */
.form-control, .form-select { border-color: var(--line-2); border-radius: 10px; color: var(--ink); background-color: #fff; }
.form-control::placeholder { color: var(--faint); }
.form-control:focus, .form-select:focus { border-color: #8DB0EE; box-shadow: 0 0 0 .22rem rgba(30, 95, 216, .14); }
.form-control-sm, .form-select-sm { border-radius: 8px; }
.form-label { font-weight: 700; color: var(--ink); }
.form-text { color: var(--muted); }
.form-check-input { border-color: var(--line-2); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #8DB0EE; box-shadow: 0 0 0 .22rem rgba(30, 95, 216, .18); }
.input-group-text { background: var(--side); border-color: var(--line-2); color: var(--muted); font-weight: 700; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2em; font-weight: 700; text-transform: uppercase; }

/* ---------- Ursa search field */
.ursa-search { position: relative; max-width: 440px; }
.ursa-search .ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.ursa-search .form-control { padding-left: 42px; border-radius: 12px; height: 44px; }

/* ---------- cards, panels, lists */
.card { --bs-card-border-color: var(--line); --bs-card-border-radius: var(--r-lg); --bs-card-inner-border-radius: calc(var(--r-lg) - 1px); --bs-card-cap-bg: #fff; --bs-card-bg: #fff; box-shadow: var(--shadow-1); }
.card-header { padding: .85rem 1.1rem; font-weight: 800; color: var(--ink); border-bottom-color: var(--line); }
.card-header .ico { color: var(--brand); }
.card-body { padding: 1.1rem 1.15rem; }
.list-group { --bs-list-group-border-color: var(--line); --bs-list-group-border-radius: var(--r-lg); --bs-list-group-action-hover-bg: var(--bg); --bs-list-group-action-active-bg: var(--brand-50); }
.list-group-item { padding: .9rem 1.05rem; }
.table-responsive { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); margin-bottom: 1.25rem; }
.table-responsive > .table { margin-bottom: 0; }
.card .table-responsive { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); --bs-table-hover-bg: var(--bg); --bs-table-striped-bg: var(--bg); }
.table > :not(caption) > * > * { padding: .7rem .8rem; }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.table > thead th { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); border-bottom-color: var(--line-2); vertical-align: bottom; }
.table > thead th .small, .table > thead th div { text-transform: none; letter-spacing: 0; }
.table > tbody > tr:last-child > * { border-bottom: 0; }
.table-light { --bs-table-bg: var(--bg); }

/* ---------- alerts and tags */
.alert { --bs-alert-border-radius: 12px; border: 0; border-left: 3px solid; padding: .8rem 1rem; font-weight: 600; }
.alert-success { background: var(--green-bg); color: var(--green-ink); border-left-color: var(--green); }
.alert-info, .alert-primary { background: var(--brand-50); color: var(--brand-700); border-left-color: var(--brand); }
.alert-warning { background: #FDF3E1; color: #86520E; border-left-color: #E5A13E; }
.alert-danger { background: var(--red-bg); color: var(--red-ink); border-left-color: var(--red); }
.alert-secondary { background: #F2F1EC; color: #56524B; border-left-color: #C9C5BD; }
.alert .alert-link { color: inherit; }
.alert strong { font-weight: 800; }

.pill, .st-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.pill::before, .st-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-setup { background: #F0EFEA; color: #67635B; }
.pill-open { background: var(--green-bg); color: var(--green-ink); }
.pill-deliberation { background: #FDF1E2; color: var(--orange-ink); }
.pill-validated { background: var(--brand-100); color: var(--brand-700); }
.pill-published { background: var(--ink); color: #fff; }
.st-none { background: #F0EFEA; color: var(--muted); }
.st-draft { background: #FDF1E2; color: var(--orange-ink); }
.st-submitted { background: var(--green-bg); color: var(--green-ink); }
.st-validated { background: var(--brand-100); color: var(--brand-700); }
.st-reopened { background: var(--red-bg); color: var(--red-ink); }
.st-conflict { background: #EFEDE8; color: #5F5B54; }
.badge { --bs-badge-border-radius: 999px; --bs-badge-font-weight: 800; --bs-badge-padding-x: .65em; --bs-badge-padding-y: .35em; }
.text-bg-secondary { background-color: #EFEDE8 !important; color: #5F5B54 !important; }
.text-bg-light { background-color: var(--side) !important; color: var(--text) !important; }
.text-bg-warning { background-color: var(--amber-bg) !important; color: var(--amber-ink) !important; }

/* track tag: Ursa hashtag with a coloured dot */
.trk-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; color: var(--text); letter-spacing: .01em; white-space: nowrap; }
.session-card .card-body > .d-flex:first-child { flex-wrap: wrap; row-gap: 6px; }
.trk-pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--purple); }
.trk-food .trk-pill::before, .trk-pill.trk-food::before { background: var(--green); }
.trk-energy .trk-pill::before, .trk-pill.trk-energy::before { background: var(--orange); }

/* ---------- navigation inside pages */
.nav-pills { --bs-nav-pills-border-radius: 10px; --bs-nav-pills-link-active-bg: var(--brand-100); --bs-nav-pills-link-active-color: var(--brand-700); gap: 4px; }
.nav-pills .nav-link { color: var(--text); font-weight: 700; }
.nav-pills .nav-link:hover { background: rgba(17, 16, 14, .045); }
.nav-pills .nav-link.active:hover { background: var(--brand-100); }
.nav-tabs { --bs-nav-tabs-border-color: var(--line); --bs-nav-tabs-link-active-color: var(--brand-700); --bs-nav-tabs-link-active-bg: transparent; --bs-nav-tabs-link-active-border-color: transparent; --bs-nav-tabs-link-hover-border-color: transparent; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 800; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { border-bottom-color: var(--brand); }
.pagination { --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--brand-700); --bs-pagination-border-color: var(--line-2); --bs-pagination-border-radius: 8px; }
.progress { --bs-progress-bg: #ECEAE4; --bs-progress-bar-bg: var(--brand); --bs-progress-border-radius: 99px; }
.progress-bar.bg-success { background-color: var(--brand) !important; }
.modal { --bs-modal-border-radius: 18px; --bs-modal-border-width: 0; --bs-modal-box-shadow: 0 24px 60px rgba(17, 16, 14, .18); }
.modal-content { box-shadow: 0 24px 60px rgba(17, 16, 14, .18); }
.modal-header { border-bottom-color: var(--line); }
.toast { border-radius: 12px; }

/* ---------- login */
.page-login .content.narrow { padding-top: 12px; }
.login-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 10px 26px rgba(30, 95, 216, .32); }
.login-mark .ico { width: 30px; height: 30px; }
.page-login .card-header { background: #fff; }

/* ---------- dashboard tiles and session cards */
.session-card { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.session-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #D9D6CF; }
.session-card h2 { font-weight: 850; }
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); transition: box-shadow .12s ease, border-color .12s ease; }
.tile:hover { box-shadow: var(--shadow-2); border-color: #D9D6CF; }
.tile-i { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: .6rem; border-radius: 12px; background: var(--brand-100); color: var(--brand); }
.tile-i .ico { width: 22px; height: 22px; }

/* ---------- juror list (Ursa note list) */
.startup-list { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.startup-list .list-group-item { border-left: 0; border-right: 0; border-color: var(--line); }
.startup-list .list-group-item:first-child { border-top: 0; }
.startup-list .list-group-item:last-child { border-bottom: 0; }
.startup-list .fw-semibold { color: var(--ink); font-weight: 800 !important; }
.startup-list .inactive { opacity: .55; }
.startup-list .is-live { background: var(--brand-100); box-shadow: inset 3px 0 0 var(--brand); }
.order-num { flex: 0 0 auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--side); border: 1px solid var(--line); color: var(--text); font-weight: 800; font-size: .84rem; font-variant-numeric: tabular-nums; }
.order-num.sm { width: 22px; height: 22px; border-radius: 7px; font-size: .7rem; }

/* ---------- on stage */
.onstage { border: 0; border-radius: var(--r-lg); color: #fff; background: linear-gradient(135deg, #2466DE 0%, #1747A6 100%); box-shadow: 0 12px 28px rgba(30, 95, 216, .28); }
.onstage .btn-arena { --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-color: var(--brand-700); --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-border-color: var(--brand-50); --bs-btn-hover-color: var(--brand-800); box-shadow: none; }
.onstage .h5 { color: #fff; font-weight: 900; }
.onstage-label { opacity: .82; letter-spacing: .08em; font-weight: 800; }
.onstage-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; background: #FF5A4F; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 79, .6); } 70% { box-shadow: 0 0 0 .7rem rgba(255, 90, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0); } }
.onstage-timer { font-weight: 900; font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.onstage-timer.warn { color: #FFD166; }
.onstage-timer.over { color: #FFB4AC; }
.stage-control .onstage-timer { font-size: 1rem; color: var(--brand-700); }
.stage-control .onstage-timer.warn { color: #B7791F; }
.stage-control .onstage-timer.over { color: var(--red-ink); }
.stage-btn { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; font-weight: 700; color: var(--text); }
.stage-btn:hover { background: var(--brand-50); border-color: #BFD2F6; }
.stage-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- scoring form */
.page-score .content { padding-bottom: 8rem; }
.startup-head { border: 1px solid var(--line); }
.startup-head h1 { font-size: 1.85rem; }
.crit-card { border: 1px solid var(--line); border-radius: var(--r-lg); }
.crit-card h2 { font-weight: 850; font-size: 1.02rem; }
.crit-code { flex: 0 0 auto; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 900; font-size: .84rem; box-shadow: 0 3px 10px rgba(30, 95, 216, .25); }
.weight-pill { flex: 0 0 auto; padding: .2rem .6rem; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); font-weight: 800; font-size: .84rem; }
.rubric-box { background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 12px 12px 0; padding: .8rem 1rem; }
.rubric-box dt { font-weight: 800; color: var(--ink); margin-top: .4rem; }
.rubric-box dd { margin-bottom: .2rem; color: var(--text); }
.piano { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 5px; row-gap: 6px; }
.piano .key { padding: 0; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; transition: background .08s ease, transform .08s ease, box-shadow .08s ease; touch-action: manipulation; }
.piano .k-int { grid-row: 1; height: 3.05rem; font-size: 1.2rem; }
.piano .k-half { grid-row: 2; height: 2.3rem; margin: 0 12%; font-size: .85rem; background: var(--bg); color: var(--muted); border-radius: 10px; }
.piano .key:hover:not(:disabled) { background: var(--brand-50); border-color: #BFD2F6; }
.piano .key:active:not(:disabled) { transform: scale(.96); }
.piano .key.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(30, 95, 216, .35); }
.piano .key:disabled { opacity: .65; cursor: not-allowed; }
.piano .key:disabled.on { opacity: 1; }
.piano .key:focus-visible { outline: 3px solid rgba(30, 95, 216, .4); outline-offset: 1px; }
.level-desc { min-height: 1.25rem; color: var(--text); }
.level-desc strong { color: var(--brand-700); }
.score-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: .65rem 0 calc(.65rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(17, 16, 14, .05); backdrop-filter: blur(8px); }
@media (min-width: 992px) { .with-sidebar .score-bar { left: 272px; } }
.score-total { font-size: 1.8rem; font-weight: 900; line-height: 1.05; color: var(--brand); font-variant-numeric: tabular-nums; }
.score-total small { margin-left: .1rem; font-size: .8rem; font-weight: 800; color: var(--faint); }
#save-state { font-weight: 700; }
#save-state.ok { color: var(--green-ink) !important; }
#save-state.off { color: var(--orange-ink) !important; }
#save-state.err { color: var(--red-ink) !important; }

/* ---------- deliberation */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: .8rem .6rem; box-shadow: var(--shadow-1); }
.stat-v { font-size: 1.6rem; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-l { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.matrix { font-size: .9rem; }
.matrix.table-bordered > :not(caption) > * > * { border-color: var(--line); }
.matrix th, .matrix td { white-space: nowrap; }
.matrix .sticky-col { position: sticky; left: 0; z-index: 1; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.matrix .jur-h { min-width: 3.3rem; }
.matrix .cell[role=button] { cursor: pointer; }
.matrix .cell[role=button]:hover { background: var(--brand-50); }
.matrix .cell-v { margin-right: .2rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.matrix .st-draft { background: #FFFAF2; }
.matrix .st-reopened { background: #FFF4F4; }
.ic-star { color: var(--amber); } .ic-star .ico { fill: var(--amber); }
.ic-ok { color: var(--green); } .ic-val { color: var(--brand); } .ic-draft { color: var(--orange); } .ic-reo { color: var(--red); } .ic-coi { color: var(--faint); } .ic-none { color: #C9C5BD; }
.comment-box { min-height: 2rem; padding: .55rem .75rem; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--bg); white-space: pre-wrap; }
.legend .ico { width: 1em; height: 1em; }

/* validation panel */
.validate-card { border-color: #C9DAF8; }
.validate-card .card-header { background: var(--brand-50); color: var(--brand-700); border-bottom-color: #DCE7FB; }

/* ---------- workflow */
.workflow { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: wf; }
.workflow li { counter-increment: wf; padding: .3rem .75rem .3rem .4rem; border-radius: 999px; background: #F0EFEA; color: var(--muted); font-size: .82rem; font-weight: 800; }
.workflow li::before { content: counter(wf); display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-right: .4rem; border-radius: 50%; background: #fff; font-size: .7rem; }
.workflow li.done { background: var(--brand-100); color: var(--brand-700); }
.workflow li.current { background: var(--brand); color: #fff; }
.workflow li.current::before { color: var(--brand); }

/* ---------- results */
.results-table td.fs-5 { font-weight: 900 !important; color: var(--ink); }
.podium-card { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.podium-card.rank-1 { background: linear-gradient(170deg, #FFF8E0 0%, #fff 55%); border-top: 4px solid var(--amber); }
.podium-card.rank-2 { border-top: 4px solid #A5ADB8; }
.podium-card.rank-3 { border-top: 4px solid #C58A4F; }
.podium-rank { font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); }
.podium-card .display-6 { font-weight: 900; color: var(--ink); }
.weights-table .weight-input { max-width: 8rem; }
.audit-detail code { display: block; white-space: pre-wrap; word-break: break-word; font-size: .74rem; color: var(--text); background: var(--bg); }
.help-steps li { margin-bottom: .5rem; }
.help-steps li::marker { color: var(--brand); font-weight: 800; }
details > summary { cursor: pointer; }
details > summary .ico { color: var(--brand); }

/* ---------- print pages (official record, feedback sheets, access cards) */
.print-page { background: #fff; }
.print-sheet { max-width: 900px; margin: 0 auto; padding: 1.6rem; }
.print-sheet.wide { max-width: 1100px; }
.pv-head { border-bottom: 3px solid var(--brand); padding-bottom: .8rem; margin-bottom: 1rem; }
.pv-head h1 { margin: .2rem 0; font-size: 1.65rem; color: var(--brand-700); }
.print-sheet h2 { margin-top: 1.45rem; padding-bottom: .25rem; font-size: 1.08rem; color: var(--brand-700); border-bottom: 1px solid var(--line); }
.print-sheet h3 { margin: .85rem 0 .3rem; font-size: .96rem; }
.pv-table { font-size: .85rem; }
.pv-table > thead th { color: var(--muted); }
.pv-block { break-inside: avoid; }
.fingerprint { word-break: break-all; font-size: .8rem; }
.sig-line { height: 3rem; margin-bottom: .3rem; border-bottom: 1px solid var(--ink); }
.feedback-sheet { break-after: page; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px dashed var(--line-2); }
.feedback-comments li { margin-bottom: .5rem; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.access-card { overflow: hidden; break-inside: avoid; background: #fff; border: 1.5px solid #C9D9F7; border-radius: 16px; }
.ac-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .85rem; background: var(--brand); color: #fff; font-size: .85rem; }
.ac-head strong { font-weight: 900; }
.brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: var(--brand); color: #fff; }
.ac-head .brand-mark { width: 1.55rem; height: 1.55rem; border-radius: 8px; background: rgba(255, 255, 255, .18); }
.ac-body { display: flex; align-items: flex-start; gap: .95rem; padding: .85rem; }
.ac-qr { flex: 0 0 132px; width: 132px; height: 132px; }
.ac-qr svg, .ac-qr img { display: block; width: 100%; height: 100%; }
.ac-name { font-size: 1.12rem; font-weight: 900; line-height: 1.15; color: var(--ink); }
.ac-org { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ac-sessions { margin: .35rem 0; padding-left: 1rem; font-size: .75rem; }
.ac-code-l { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ac-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .12em; color: var(--brand-700); }
.ac-foot { padding: .45rem .85rem; border-top: 1px dashed var(--line-2); font-size: .68rem; color: var(--text); }
.ac-url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; color: var(--ink); word-break: break-all; }

@media print {
  .no-print, .sidebar, .topbar, .app-footer, .toast-container { display: none !important; }
  body, .print-page { background: #fff !important; }
  .print-sheet { max-width: none; padding: 0; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ac-qr { flex-basis: 110px; width: 110px; height: 110px; }
  .ac-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: none !important; }
  @page { margin: 12mm; }
}

/* ---------- public display (projection) */
.display-page { min-height: 100vh; color: #fff; background: radial-gradient(1200px 720px at 12% -12%, #2C6FE6 0%, #123A8C 45%, #0A1D4A 100%); }
.display-wrap { display: flex; flex-direction: column; min-height: 100vh; padding: 2.5vh 4vw; }
.display-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: clamp(1rem, 1.6vw, 1.5rem); }
.display-brand { display: flex; align-items: center; gap: .7rem; font-weight: 900; }
.display-brand .brand-mark { width: 2.4rem; height: 2.4rem; border-radius: 12px; background: #fff; color: var(--brand); }
.display-event { font-weight: 700; opacity: .75; text-align: right; }
.display-live, .display-results { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.display-title { font-size: clamp(2rem, 4.4vw, 4.4rem); font-weight: 900; line-height: 1.04; letter-spacing: -.02em; color: #fff; }
.display-sub { margin-top: .5rem; font-size: clamp(1rem, 2vw, 1.8rem); font-weight: 800; color: #9EC0FF; }
.stage-label { display: flex; align-items: center; gap: .8rem; font-size: clamp(1rem, 1.8vw, 1.6rem); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.stage-name { margin-top: 1rem; font-size: clamp(2.6rem, 7vw, 7rem); font-weight: 900; line-height: 1; letter-spacing: -.025em; }
.stage-founder { margin-top: .6rem; font-size: clamp(1.1rem, 2.4vw, 2.2rem); font-weight: 700; opacity: .82; }
.stage-timer { margin-top: 2vh; font-size: clamp(3rem, 9vw, 9rem); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.stage-timer.warn { color: #FFD166; }
.stage-timer.over { color: #FF9C92; }
.stage-bar { max-width: 60vw; height: .7rem; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .16); }
.stage-bar div { width: 0; height: 100%; background: #9EC0FF; transition: width 1s linear; }
.reveal-list { display: flex; flex-direction: column-reverse; gap: 1.2vh; margin: 3vh 0 0; padding: 0; list-style: none; }
.reveal-list li { display: flex; align-items: center; gap: 2vw; padding: 1.4vh 2vw; border-radius: 18px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .08); animation: rise .6s ease both; }
.reveal-list li.top1 { background: linear-gradient(90deg, rgba(242, 208, 107, .62) 0%, rgba(224, 189, 78, .28) 45%, rgba(224, 189, 78, .08) 100%); border-color: rgba(242, 208, 107, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.reveal-list .r-rank { min-width: 5vw; font-size: clamp(1.6rem, 3.4vw, 3.4rem); font-weight: 900; color: #F2D06B; }
.reveal-list .r-name { font-size: clamp(1.4rem, 3vw, 3rem); font-weight: 900; line-height: 1.05; }
.reveal-list .r-sub { font-size: clamp(.9rem, 1.4vw, 1.3rem); font-weight: 600; opacity: .78; }
.reveal-list .r-score { margin-left: auto; font-size: clamp(1.4rem, 3vw, 3rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.reveal-list .r-podium { font-size: clamp(.8rem, 1.2vw, 1.1rem); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #F2D06B; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.display-hint { margin-top: 2vh; font-size: .9rem; opacity: .55; }
.display-hint:hover { opacity: 1; }
.display-hint .btn-outline-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .5); --bs-btn-hover-bg: rgba(255, 255, 255, .12); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #fff; }
.display-nav { margin-top: 2vh; text-align: center; font-size: .85rem; opacity: .35; }
.display-nav:hover { opacity: 1; }
.display-nav a { color: #fff; }

@media (max-width: 575.98px) {
  .piano .k-int { height: 2.85rem; }
  .score-total { font-size: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .ac-qr { flex-basis: 110px; width: 110px; height: 110px; }
  .startup-head h1 { font-size: 1.5rem; }
}
