@font-face {
  font-family: "EAF Inter";
  src: local("Inter");
  font-display: swap;
}

@font-face {
  font-family: "EAF Oswald";
  src: local("Oswald");
  font-display: swap;
}

:root {
  --navy-950: #061b33;
  --navy-900: #002b6f;
  --navy-800: #073c79;
  --blue-700: #003b8f;
  --blue-600: #0752a6;
  --blue-100: #e8f0fa;
  --blue-50: #f3f7fc;
  --gold-500: #ffd23f;
  --gold-600: #e6b800;
  --green-700: #146c43;
  --green-100: #e1f5ea;
  --red-700: #a82b36;
  --red-100: #fdebed;
  --amber-700: #8a5b05;
  --amber-100: #fff4d6;
  --ink: #16243a;
  --muted: #637187;
  --muted-strong: #46556c;
  --line: #d9e1eb;
  --line-strong: #c1ccd9;
  --surface: #ffffff;
  --canvas: #f4f6f9;
  --canvas-strong: #e9edf3;
  --shadow-sm: 0 1px 3px rgba(6, 27, 51, 0.08);
  --shadow-md: 0 14px 36px rgba(6, 27, 51, 0.12);
  --shadow-lg: 0 28px 80px rgba(6, 27, 51, 0.2);
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;
  --header-height: 76px;
  --sidebar-width: 252px;
  --content-max: 1500px;
  font-family: "EAF Inter", Inter, "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: var(--blue-700);
}

img {
  max-width: 100%;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

::selection {
  color: white;
  background: var(--blue-700);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--navy-950);
  background: var(--gold-500);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 80;
  top: 0;
  display: grid;
  grid-template-columns: minmax(280px, var(--sidebar-width)) minmax(0, 1fr) auto;
  align-items: center;
  height: var(--header-height);
  padding: 0 clamp(16px, 2vw, 30px);
  color: white;
  background: var(--navy-900);
  border-bottom: 3px solid var(--gold-500);
  box-shadow: 0 4px 14px rgba(6, 27, 51, 0.18);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand__logo-wrap {
  position: relative;
  display: grid;
  width: 66px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
}

.brand__logo {
  position: relative;
  z-index: 2;
  width: 66px;
  height: 48px;
  object-fit: contain;
}

.brand__logo:not([src]),
.brand__logo.is-missing {
  display: none;
}

.brand__fallback {
  position: absolute;
  inset: 3px 8px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.1;
}

.brand__copy strong {
  overflow: hidden;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 0.91rem;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__copy span {
  color: #cdd9e7;
  font-size: 0.71rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.header-context {
  overflow: hidden;
  padding: 0 28px;
  color: #d8e2ed;
  font-size: 0.82rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-context strong {
  color: white;
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  color: #dbe8f2;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9cabb8;
  box-shadow: 0 0 0 3px rgba(156, 171, 184, 0.16);
}

.connection-pill--online .connection-pill__dot {
  background: #4ee093;
  box-shadow: 0 0 0 3px rgba(78, 224, 147, 0.18);
}

.connection-pill--offline,
.connection-pill--error {
  color: #ffe1e4;
  border-color: rgba(255, 182, 190, 0.35);
}

.connection-pill--offline .connection-pill__dot,
.connection-pill--error .connection-pill__dot {
  background: #ff8792;
  box-shadow: 0 0 0 3px rgba(255, 135, 146, 0.18);
}

.connection-pill--pending .connection-pill__dot {
  background: var(--gold-500);
  animation: pulse 1.5s infinite;
}

.user-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 4px 7px 4px 5px;
  color: white;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}

.user-button:hover,
.user-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
}

.user-button__avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: var(--navy-950);
  background: var(--gold-500);
  font-size: 0.73rem;
  font-weight: 900;
}

.user-button__text {
  display: grid;
  max-width: 150px;
  gap: 1px;
}

.user-button__text strong,
.user-button__text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-button__text strong {
  font-size: 0.78rem;
}

.user-button__text span {
  color: #c4d3e1;
  font-size: 0.65rem;
}

.user-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 12px);
  right: 0;
  width: 210px;
  padding: 7px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.user-menu a,
.user-menu button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: var(--ink);
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
}

.user-menu a:hover,
.user-menu button:hover {
  background: var(--blue-50);
}

.app-body {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: var(--header-height);
  display: flex;
  height: calc(100vh - var(--header-height));
  flex-direction: column;
  padding: 24px 16px 18px;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.nav-section + .nav-section {
  margin-top: 24px;
}

.nav-label {
  display: block;
  padding: 0 11px 8px;
  color: #8491a3;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  color: var(--muted-strong);
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--navy-900);
  background: var(--blue-50);
}

.nav-link.is-active {
  color: var(--navy-900);
  background: var(--blue-100);
  border-left-color: var(--gold-500);
  font-weight: 800;
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: currentColor;
  font-size: 1.05rem;
}

.nav-link__badge {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 6px;
  color: white;
  background: var(--blue-700);
  border-radius: 99px;
  font-size: 0.63rem;
  text-align: center;
}

.sidebar__footer {
  margin-top: auto;
  padding: 22px 11px 4px;
  border-top: 1px solid var(--line);
}

.sidebar__motto {
  margin: 0;
  color: var(--navy-900);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar__version {
  margin: 6px 0 0;
  color: #929dac;
  font-size: 0.65rem;
}

.main-content {
  min-width: 0;
}

.mobile-nav {
  display: none;
}

.route-outlet {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: clamp(26px, 3.2vw, 48px);
}

.app-shell.no-navigation .app-body {
  display: block;
}

.app-shell.no-navigation .route-outlet {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - var(--header-height));
  padding: 0;
}

.loading-view {
  display: grid;
  min-height: 60vh;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
}

.loading-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: var(--navy-900);
  border: 3px solid var(--gold-500);
  border-radius: 50%;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-weight: 850;
  letter-spacing: 0.08em;
  animation: breathe 1.8s infinite ease-in-out;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-header__copy {
  max-width: 820px;
}

.page-title,
.login-title,
.presentation-title {
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.page-title {
  margin: 5px 0 0;
  color: var(--navy-950);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.page-description {
  max-width: 720px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--blue-700);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #b9cee5;
}

.eyebrow--gold {
  color: var(--gold-500);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 31px 0 13px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  color: white;
  background: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:hover:not(:disabled) {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled,
.button[aria-disabled="true"] {
  color: #8390a0;
  background: #e7ebef;
  border-color: #dce2e8;
  cursor: not-allowed;
}

.button--secondary {
  color: var(--navy-900);
  background: white;
  border-color: var(--line-strong);
}

.button--secondary:hover:not(:disabled) {
  color: var(--navy-900);
  background: var(--blue-50);
  border-color: var(--blue-700);
}

.button--quiet {
  color: var(--muted-strong);
  background: transparent;
  border-color: transparent;
}

.button--quiet:hover:not(:disabled) {
  color: var(--navy-900);
  background: var(--blue-50);
  border-color: transparent;
}

.button--gold {
  color: var(--navy-950);
  background: var(--gold-500);
  border-color: var(--gold-500);
}

.button--gold:hover:not(:disabled) {
  color: var(--navy-950);
  background: #ffdc68;
  border-color: #ffdc68;
}

.button--success {
  background: var(--green-700);
  border-color: var(--green-700);
}

.button--danger {
  background: var(--red-700);
  border-color: var(--red-700);
}

.button--danger:hover:not(:disabled) {
  background: #851f29;
  border-color: #851f29;
}

.button--large {
  min-height: 54px;
  padding: 13px 22px;
  font-size: 0.86rem;
}

.button--block {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--muted-strong);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--navy-900);
  border-color: var(--blue-700);
}

.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card--accent {
  border-top: 4px solid var(--blue-700);
}

.card--gold {
  border-top: 4px solid var(--gold-500);
}

.card--dark {
  color: white;
  background: var(--navy-950);
  border-color: var(--navy-950);
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.card__header h2,
.card__header h3 {
  margin: 3px 0 0;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.018em;
  text-transform: uppercase;
}

.card--dark .card__header {
  border-color: rgba(255, 255, 255, 0.14);
}

.card--dark .card__header h2,
.card--dark .card__header h3 {
  color: white;
}

.card__body {
  padding: 23px;
}

.card__footer {
  padding: 16px 23px;
  background: #fafbfd;
  border-top: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.span-12 { grid-column: span 12; }
.span-9 { grid-column: span 9; }
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric {
  min-height: 112px;
  padding: 20px;
  background: white;
}

.metric__label {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric__value {
  display: block;
  margin-top: 8px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 2rem;
  font-weight: 650;
  line-height: 1;
}

.metric__detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.metric--positive .metric__value {
  color: var(--green-700);
}

.metric--warning .metric__value {
  color: var(--amber-700);
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: var(--muted-strong);
  background: #edf1f5;
  border: 1px solid #dfe5eb;
  border-radius: 99px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.065em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge--open,
.status-badge--online,
.status-badge--released,
.status-badge--verified,
.status-badge--established,
.status-badge--accepted {
  color: var(--green-700);
  background: var(--green-100);
  border-color: #bfdfcd;
}

.status-badge--staged,
.status-badge--ready,
.status-badge--pending,
.status-badge--paused {
  color: var(--amber-700);
  background: var(--amber-100);
  border-color: #efdba6;
}

.status-badge--closed,
.status-badge--archived,
.status-badge--draft {
  color: #596679;
  background: #edf1f5;
}

.status-badge--cancelled,
.status-badge--offline,
.status-badge--failed,
.status-badge--not-established {
  color: var(--red-700);
  background: var(--red-100);
  border-color: #efc6cb;
}

.progress {
  height: 10px;
  overflow: hidden;
  background: #e7ebf0;
  border-radius: 99px;
}

.progress__bar {
  height: 100%;
  background: var(--blue-700);
  border-radius: inherit;
  transition: width 320ms ease;
}

.progress--gold .progress__bar {
  background: var(--gold-500);
}

.turnout-line {
  display: grid;
  gap: 9px;
}

.turnout-line__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.74rem;
}

.turnout-line__meta strong {
  color: var(--navy-950);
  font-size: 0.86rem;
}

.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
}

.data-table th {
  padding: 12px 14px;
  color: var(--muted);
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: var(--blue-50);
}

.table-primary {
  color: var(--ink);
  font-weight: 750;
}

.table-secondary {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 450;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.table-empty {
  padding: 50px 24px !important;
  color: var(--muted) !important;
  text-align: center;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  position: relative;
  min-width: min(340px, 100%);
  flex: 1;
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 39px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.search-field::before {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  content: "⌕";
  font-size: 1.25rem;
  transform: translateY(-52%);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.toggle-field {
  display: grid;
  gap: 7px;
}

.field--full {
  grid-column: 1 / -1;
}

.field > span,
.fieldset-label {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.field em {
  margin-left: 5px;
  color: var(--red-700);
  font-size: 0.59rem;
  font-style: normal;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.field textarea {
  line-height: 1.5;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field input:focus {
  border-color: var(--blue-700);
  outline: 3px solid rgba(0, 59, 143, 0.13);
}

.field small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.toggle {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.toggle__copy {
  display: grid;
  gap: 3px;
}

.toggle__copy strong {
  font-size: 0.78rem;
}

.toggle__copy span {
  color: var(--muted);
  font-size: 0.67rem;
}

.toggle input {
  width: 41px;
  height: 23px;
  flex: 0 0 auto;
  accent-color: var(--blue-700);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 17px;
  color: var(--muted-strong);
  background: var(--blue-50);
  border: 1px solid #cedced;
  border-left: 4px solid var(--blue-700);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  line-height: 1.55;
}

.callout strong {
  color: var(--navy-950);
}

.callout--warning {
  background: var(--amber-100);
  border-color: #ecd899;
  border-left-color: var(--gold-600);
}

.callout--danger {
  background: var(--red-100);
  border-color: #ebc0c5;
  border-left-color: var(--red-700);
}

.callout--success {
  background: var(--green-100);
  border-color: #bcdcc9;
  border-left-color: var(--green-700);
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-content: center;
  justify-items: center;
  padding: 42px 24px;
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 50%;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.empty-state h2,
.empty-state h3 {
  margin: 18px 0 7px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 650;
  text-transform: uppercase;
}

.empty-state p {
  max-width: 470px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Sign in */
.login-page {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--header-height));
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  overflow: hidden;
  background: var(--navy-950);
}

.login-page::before {
  position: absolute;
  inset: 0 42% 0 0;
  background:
    linear-gradient(125deg, rgba(255, 210, 63, 0.08), transparent 42%),
    repeating-linear-gradient(120deg, transparent 0 54px, rgba(255, 255, 255, 0.025) 55px 56px);
  content: "";
}

.login-intro {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 820px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 110px);
  color: white;
}

.login-title {
  max-width: 700px;
  margin: 14px 0 22px;
  font-size: clamp(3.25rem, 7.5vw, 7.4rem);
  line-height: 0.87;
}

.login-intro__lead {
  max-width: 610px;
  margin: 0;
  color: #c5d3e1;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 44px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #dbe5ee;
  font-size: 0.73rem;
  font-weight: 700;
}

.trust-item::before {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: var(--navy-950);
  background: var(--gold-500);
  border-radius: 50%;
  content: "✓";
  font-size: 0.71rem;
  font-weight: 900;
}

.login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  background: var(--canvas);
  box-shadow: -25px 0 70px rgba(1, 15, 31, 0.22);
}

.login-card {
  width: min(100%, 490px);
  padding: clamp(27px, 4vw, 43px);
  background: white;
  border-top: 5px solid var(--gold-500);
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  margin: 8px 0 12px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 2rem;
  font-weight: 650;
  text-transform: uppercase;
}

.login-card > p:not(.eyebrow) {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.sso-button {
  width: 100%;
  min-height: 58px;
  justify-content: space-between;
  padding-inline: 20px;
  font-size: 0.82rem;
}

.login-security {
  display: grid;
  gap: 11px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.login-security p {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.login-security p::before {
  color: var(--green-700);
  content: "✓";
  font-weight: 900;
}

.dev-access {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}

.dev-access summary {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.dev-access__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

/* Delegate */
.delegate-page {
  max-width: 860px;
  margin: 0 auto;
}

.delegate-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.delegate-identity {
  color: var(--muted);
  font-size: 0.75rem;
}

.delegate-identity strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.86rem;
}

.ballot-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.ballot-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(23px, 5vw, 48px);
  background: var(--navy-950);
}

.ballot-card__topline .agenda-ref {
  color: var(--gold-500);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ballot-card__body {
  padding: clamp(28px, 6vw, 56px);
}

.ballot-title {
  margin: 9px 0 16px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.65rem);
  font-weight: 650;
  line-height: 1.08;
  text-transform: uppercase;
}

.ballot-question {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 550;
  line-height: 1.55;
}

.ballot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.72rem;
}

.ballot-options {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.ballot-question-block + .ballot-question-block {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ballot-option {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  color: var(--navy-950);
  background: white;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.ballot-option:hover {
  border-color: var(--blue-700);
  background: var(--blue-50);
}

.ballot-option.is-selected {
  background: var(--blue-100);
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(0, 59, 143, 0.09);
}

.ballot-option__label {
  display: grid;
  gap: 4px;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.ballot-option__label small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.ballot-option__check {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: transparent;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.ballot-option.is-selected .ballot-option__check {
  color: white;
  background: var(--blue-700);
  border-color: var(--blue-700);
}

.ballot-submit {
  margin-top: 22px;
}

.ballot-submit .button {
  min-height: 62px;
  font-size: 0.92rem;
}

.server-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  text-align: center;
}

.receipt {
  display: grid;
  justify-items: center;
  padding: clamp(35px, 8vw, 76px) clamp(23px, 6vw, 60px);
  text-align: center;
}

.receipt__check {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: white;
  background: var(--green-700);
  border-radius: 50%;
  box-shadow: 0 0 0 11px var(--green-100);
  font-size: 2.2rem;
  font-weight: 900;
}

.receipt h1 {
  margin: 29px 0 9px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 650;
  text-transform: uppercase;
}

.receipt > p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.receipt__details {
  display: grid;
  width: min(100%, 390px);
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 30px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.receipt__details div {
  padding: 15px;
  background: #f8fafc;
}

.receipt__details span {
  display: block;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.receipt__details strong {
  display: block;
  margin-top: 5px;
  color: var(--navy-950);
  font-size: 0.89rem;
}

.waiting-state {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: var(--navy-950);
}

.waiting-state::after {
  position: absolute;
  right: -120px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 210, 63, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.02), 0 0 0 160px rgba(255, 255, 255, 0.015);
  content: "";
}

.waiting-state__content {
  position: relative;
  z-index: 1;
  max-width: 690px;
  padding: clamp(37px, 7vw, 70px);
  color: white;
}

.waiting-state h1 {
  margin: 11px 0 18px;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  font-weight: 650;
  line-height: 0.98;
  text-transform: uppercase;
}

.waiting-state p:last-child {
  max-width: 500px;
  color: #c3d3e2;
  line-height: 1.6;
}

/* Live control */
.active-vote {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.55fr);
  overflow: hidden;
}

.active-vote__main {
  padding: clamp(23px, 3vw, 34px);
}

.active-vote__stats {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 27px;
  color: white;
  background: var(--navy-950);
}

.active-vote h2 {
  margin: 9px 0 10px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 650;
  text-transform: uppercase;
}

.active-vote__question {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.active-vote__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.7rem;
}

.active-vote__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.big-stat {
  display: grid;
  gap: 3px;
}

.big-stat span {
  color: #afc2d4;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.big-stat strong {
  color: white;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 2.5rem;
  font-weight: 650;
  line-height: 1;
}

.big-stat small {
  color: #afc2d4;
  font-size: 0.68rem;
}

.operator-list,
.activity-list,
.agenda-list,
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.operator-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.operator-item:last-child {
  border-bottom: 0;
}

.operator-avatar {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy-900);
  background: var(--blue-100);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 850;
}

.operator-avatar::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 8px;
  height: 8px;
  background: #42c37c;
  border: 2px solid white;
  border-radius: 50%;
  content: "";
}

.operator-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.operator-copy strong {
  overflow: hidden;
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-copy span {
  color: var(--muted);
  font-size: 0.67rem;
}

.operator-location {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.65rem;
}

.quorum-gauge {
  display: grid;
  place-items: center;
  padding: 25px;
}

.gauge-ring {
  --value: 0;
  position: relative;
  display: grid;
  width: 152px;
  height: 152px;
  place-items: center;
  background: conic-gradient(var(--green-700) calc(var(--value) * 1%), #e4e9ef 0);
  border-radius: 50%;
}

.gauge-ring::after {
  position: absolute;
  inset: 13px;
  background: white;
  border-radius: 50%;
  content: "";
}

.gauge-ring__copy {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.gauge-ring__copy strong {
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.gauge-ring__copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quorum-detail {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
  text-align: center;
}

.quorum-detail div {
  display: grid;
  gap: 3px;
}

.quorum-detail span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quorum-detail strong {
  color: var(--navy-950);
  font-size: 1rem;
}

/* Setup & round editor */
.subnav {
  display: flex;
  gap: 3px;
  margin-bottom: 25px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: thin;
}

.subnav a {
  min-width: max-content;
  padding: 11px 14px;
  color: var(--muted-strong);
  border-bottom: 3px solid transparent;
  font-size: 0.73rem;
  font-weight: 750;
  text-decoration: none;
}

.subnav a:hover,
.subnav a.is-active {
  color: var(--navy-900);
  border-bottom-color: var(--gold-500);
}

.setup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.setup-check {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.setup-check__icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 50%;
  font-weight: 900;
}

.setup-check.is-incomplete .setup-check__icon {
  color: var(--amber-700);
  background: var(--amber-100);
}

.setup-check strong {
  display: block;
  color: var(--ink);
  font-size: 0.75rem;
}

.setup-check span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 19px;
}

.editor-sidebar {
  display: grid;
  align-content: start;
  gap: 15px;
}

.compact-select {
  display: grid;
  min-width: min(360px, 70vw);
  gap: 4px;
}

.compact-select > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compact-select select {
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.rule-summary {
  display: grid;
  gap: 0;
  margin: 0;
}

.rule-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rule-summary div:last-child {
  border: 0;
}

.rule-summary dt {
  color: var(--muted);
  font-size: 0.69rem;
}

.rule-summary dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 750;
  text-align: right;
}

.option-editor-list {
  display: grid;
  gap: 9px;
  margin: 0 0 13px;
  padding: 0;
  list-style: none;
}

.question-editor-list {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.question-editor {
  padding: 17px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.question-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.question-editor__header h3,
.question-editor__header p {
  margin: 0;
}

.section-heading--compact {
  margin-top: 17px;
  margin-bottom: 10px;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr);
  align-items: center;
  gap: 8px;
}

.inline-fields > span {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.advanced-settings {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.advanced-settings > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.advanced-settings > summary::-webkit-details-marker {
  display: none;
}

.advanced-settings > summary span:first-child {
  display: grid;
  gap: 3px;
}

.advanced-settings > summary small,
.advanced-settings > summary span:last-child {
  color: var(--muted);
  font-size: 0.67rem;
}

.advanced-settings__body {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.operator-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.option-editor-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.option-editor-row__handle {
  color: var(--muted);
  text-align: center;
  cursor: grab;
}

.option-editor-row input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.preview-device {
  overflow: hidden;
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: inset 0 0 0 5px white;
}

.preview-device__bar {
  padding: 13px 18px;
  color: white;
  background: var(--navy-900);
  border-bottom: 3px solid var(--gold-500);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-device__body {
  padding: 24px;
}

.preview-device__body h3 {
  margin: 7px 0 9px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  text-transform: uppercase;
}

.preview-device__body p {
  color: var(--muted-strong);
  font-size: 0.76rem;
  line-height: 1.45;
}

.preview-options {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.preview-options span {
  padding: 9px 11px;
  color: var(--navy-900);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 800;
}

/* Oversight and results */
.oversight-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 25px;
  padding: 27px 29px;
  color: white;
  background: var(--navy-950);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.oversight-banner h2 {
  margin: 6px 0 7px;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.7rem;
  font-weight: 650;
  text-transform: uppercase;
}

.oversight-banner p:last-child {
  margin: 0;
  color: #bdcada;
  font-size: 0.77rem;
  line-height: 1.55;
}

.integrity-seal {
  display: grid;
  width: 115px;
  height: 115px;
  place-items: center;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  text-align: center;
}

.integrity-seal strong {
  display: block;
  color: var(--gold-500);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
}

.integrity-seal span {
  display: block;
  margin-top: 2px;
  color: #bdcada;
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  overflow: hidden;
}

.result-outcome {
  display: grid;
  min-height: 290px;
  align-content: center;
  padding: 34px;
  color: white;
  background: var(--navy-950);
  border-top: 5px solid var(--gold-500);
}

.result-outcome__word {
  margin: 9px 0;
  color: var(--gold-500);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 650;
  line-height: 0.95;
  text-transform: uppercase;
}

.result-outcome p:last-child {
  margin: 0;
  color: #bccbda;
  font-size: 0.76rem;
}

.result-counts {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 34px;
  background: white;
}

.result-questions {
  display: grid;
  align-content: center;
  gap: 26px;
  padding: 34px;
  background: white;
}

.result-questions--review {
  align-content: start;
  padding: 24px;
}

.result-question {
  min-width: 0;
}

.result-question + .result-question {
  padding-top: 25px;
  border-top: 1px solid var(--line-strong);
}

.result-question__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-question__header h3 {
  margin: 5px 0 0;
  color: var(--navy-950);
  font-size: 1.02rem;
  line-height: 1.4;
}

.result-question .result-counts {
  padding: 19px 0 0;
}

.result-note {
  margin: 0;
  padding: 11px 13px;
  color: var(--navy-900);
  background: var(--blue-100);
  border-left: 3px solid var(--blue-700);
  font-size: 0.73rem;
  line-height: 1.5;
}

.result-note--warning {
  color: var(--amber-700);
  background: var(--amber-100);
  border-left-color: var(--gold-500);
}

.result-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 13px;
}

.result-row__label {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.result-row__track {
  height: 11px;
  overflow: hidden;
  background: #e7ecf1;
  border-radius: 99px;
}

.result-row__fill {
  height: 100%;
  background: var(--blue-700);
  border-radius: inherit;
}

.result-row__value {
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 650;
  text-align: right;
}

.audit-chain {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-700);
  font-size: 0.68rem;
  font-weight: 800;
}

.audit-hash {
  display: block;
  max-width: 170px;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Observer */
.observer-page {
  min-height: calc(100vh - var(--header-height));
  background: var(--canvas);
}

.observer-hero {
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 70px);
  color: white;
  background: var(--navy-950);
  border-bottom: 5px solid var(--gold-500);
}

.observer-hero__inner,
.observer-content {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.observer-hero h1 {
  max-width: 800px;
  margin: 11px 0 13px;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 650;
  line-height: 0.98;
  text-transform: uppercase;
}

.observer-hero p:last-child {
  color: #bdcada;
}

.observer-content {
  padding: clamp(25px, 4vw, 48px) clamp(18px, 3vw, 24px);
}

.observer-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.observer-state__number {
  color: var(--gold-500);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 650;
  line-height: 1;
}

.observer-state h2 {
  margin: 4px 0 6px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 650;
  text-transform: uppercase;
}

.observer-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* Presentation */
body.presentation-mode {
  overflow: hidden;
  background: var(--navy-950);
}

body.presentation-mode .app-header,
body.presentation-mode .sidebar,
body.presentation-mode .mobile-nav {
  display: none !important;
}

body.presentation-mode .app-body {
  display: block;
  min-height: 100vh;
}

body.presentation-mode .route-outlet {
  width: 100%;
  max-width: none;
  height: 100vh;
  padding: 0;
}

.presentation {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  place-content: center;
  padding: 6vh 7vw;
  color: white;
  background: var(--navy-950);
  isolation: isolate;
}

.presentation::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(128deg, rgba(255, 210, 63, 0.06), transparent 38%),
    repeating-linear-gradient(120deg, transparent 0 7vw, rgba(255, 255, 255, 0.018) 7vw calc(7vw + 1px));
  content: "";
}

.presentation::after {
  position: absolute;
  z-index: -1;
  right: -19vw;
  bottom: -43vh;
  width: min(77vw, 1160px);
  aspect-ratio: 1;
  border: max(2px, 0.2vw) solid rgba(255, 210, 63, 0.25);
  border-radius: 50%;
  box-shadow: 0 0 0 8vw rgba(255, 255, 255, 0.014), 0 0 0 17vw rgba(255, 255, 255, 0.009);
  content: "";
}

.presentation__brand {
  position: absolute;
  top: 5vh;
  left: 5vw;
  display: flex;
  align-items: center;
  gap: 1.2vw;
}

.presentation__brand img {
  width: min(10vw, 170px);
  height: min(7vw, 110px);
  object-fit: contain;
}

.presentation__brand strong {
  display: block;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(0.7rem, 1.35vw, 1.55rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.presentation__brand span {
  display: block;
  margin-top: 0.4vh;
  color: #aebfd1;
  font-size: clamp(0.5rem, 0.77vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.presentation__connection {
  position: absolute;
  top: 5.5vh;
  right: 5vw;
  display: flex;
  align-items: center;
  gap: 0.55vw;
  color: #adc0d2;
  font-size: clamp(0.5rem, 0.72vw, 0.85rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.presentation__connection::before {
  width: clamp(6px, 0.55vw, 11px);
  height: clamp(6px, 0.55vw, 11px);
  background: #4ee093;
  border-radius: 50%;
  content: "";
}

.presentation__content {
  position: relative;
  z-index: 1;
  width: min(82vw, 1540px);
}

.presentation__eyebrow {
  margin: 0 0 2vh;
  color: var(--gold-500);
  font-size: clamp(0.8rem, 1.45vw, 1.75rem);
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.presentation-title {
  max-width: 76vw;
  margin: 0;
  font-size: clamp(3.4rem, 8.4vw, 10.3rem);
  line-height: 0.87;
}

.presentation-title--gold {
  color: var(--gold-500);
}

.presentation__subtitle {
  max-width: 63vw;
  margin: 3.3vh 0 0;
  color: #c4d3e1;
  font-size: clamp(1rem, 2.1vw, 2.55rem);
  line-height: 1.45;
}

.presentation__footer {
  position: absolute;
  right: 5vw;
  bottom: 4.5vh;
  left: 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #9eb1c4;
  font-size: clamp(0.55rem, 0.88vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.presentation-turnout {
  display: grid;
  width: min(74vw, 1300px);
  gap: 2.2vh;
  margin-top: 5vh;
}

.presentation-turnout__numbers {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #c4d3e1;
  font-size: clamp(1rem, 1.5vw, 1.9rem);
}

.presentation-turnout__numbers strong {
  color: white;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.8rem, 5.6vw, 6.7rem);
  font-weight: 650;
}

.presentation-turnout__bar {
  height: clamp(16px, 2.3vh, 30px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
}

.presentation-turnout__fill {
  height: 100%;
  background: var(--gold-500);
  border-radius: inherit;
  transition: width 420ms ease;
}

.presentation-results {
  display: grid;
  width: min(75vw, 1300px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2vw;
  margin-top: 5vh;
}

.presentation-result {
  padding: 2.2vh 2vw;
  background: rgba(255, 255, 255, 0.07);
  border-top: max(3px, 0.3vw) solid var(--gold-500);
}

.presentation-result span {
  display: block;
  color: #b4c5d5;
  font-size: clamp(0.7rem, 1.15vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.presentation-result strong {
  display: block;
  margin-top: 0.7vh;
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(2.8rem, 5.4vw, 6.6rem);
  font-weight: 650;
  line-height: 1;
}

.presentation-controls {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 17px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.presentation:hover .presentation-controls,
.presentation-controls:focus-within {
  opacity: 1;
}

.presentation-controls .button {
  background: rgba(6, 27, 51, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

/* Profile, errors, dialogs */
.access-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.capability-chip {
  padding: 6px 9px;
  color: var(--muted-strong);
  background: var(--blue-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
}

.error-page {
  display: grid;
  min-height: 60vh;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.error-page__code {
  color: var(--gold-600);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 5rem;
  font-weight: 650;
  line-height: 1;
}

.error-page h1 {
  margin: 8px 0;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 2rem;
  font-weight: 650;
  text-transform: uppercase;
}

.error-page p {
  max-width: 510px;
  margin: 0 0 21px;
  color: var(--muted);
  line-height: 1.55;
}

.dialog {
  width: min(calc(100% - 28px), 510px);
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}

.dialog::backdrop {
  background: rgba(3, 17, 33, 0.68);
  backdrop-filter: blur(3px);
}

.dialog__surface {
  max-height: 90vh;
  padding: 28px;
  overflow-y: auto;
  background: white;
  border-top: 5px solid var(--gold-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.dialog__icon {
  display: grid;
  width: 43px;
  height: 43px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
}

.dialog__icon--warning {
  color: var(--amber-700);
  background: var(--amber-100);
}

.dialog h2 {
  margin: 7px 0 9px;
  color: var(--navy-950);
  font-family: "EAF Oswald", "Arial Narrow", sans-serif;
  font-size: 1.65rem;
  font-weight: 650;
  text-transform: uppercase;
}

.dialog__message {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}

.dialog--sheet {
  width: min(calc(100% - 28px), 760px);
}

.toast-region {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(calc(100vw - 36px), 390px);
  gap: 9px;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 14px 15px;
  color: white;
  background: var(--navy-950);
  border-left: 4px solid var(--gold-500);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease-out;
}

.toast--success {
  border-left-color: #4ee093;
}

.toast--error {
  border-left-color: #ff7b87;
}

.toast__icon {
  color: var(--gold-500);
  font-weight: 900;
}

.toast__copy strong {
  display: block;
  font-size: 0.76rem;
}

.toast__copy span {
  display: block;
  margin-top: 3px;
  color: #bdcada;
  font-size: 0.68rem;
  line-height: 1.4;
}

.toast button {
  color: #bdcada;
  background: transparent;
  cursor: pointer;
}

.noscript {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 30px;
  color: white;
  background: var(--navy-950);
  font-weight: 700;
  text-align: center;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@keyframes breathe {
  50% { transform: scale(0.94); opacity: 0.7; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
}

@media (max-width: 1150px) {
  :root {
    --sidebar-width: 220px;
  }

  .header-context {
    display: none;
  }

  .app-header {
    grid-template-columns: minmax(280px, 1fr) auto;
  }

  .span-3 { grid-column: span 6; }
  .span-4 { grid-column: span 6; }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .setup-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 67px;
  }

  body:not(.presentation-mode) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .app-header {
    position: sticky;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0 15px;
  }

  .brand__logo-wrap {
    width: 55px;
    height: 42px;
  }

  .brand__logo {
    width: 55px;
    height: 42px;
  }

  .brand__copy strong {
    font-size: 0.76rem;
  }

  .brand__copy span {
    font-size: 0.61rem;
  }

  .connection-pill__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .connection-pill {
    min-height: 32px;
    padding: 7px;
  }

  .user-button__text,
  .user-button > span:last-child {
    display: none;
  }

  .user-button {
    padding: 3px;
  }

  .app-body {
    display: block;
  }

  .sidebar {
    display: none !important;
  }

  .route-outlet {
    padding: 27px 18px 35px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 85;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    height: calc(68px + env(safe-area-inset-bottom));
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6px 4px env(safe-area-inset-bottom);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    background: white;
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -5px 18px rgba(6, 27, 51, 0.08);
  }

  .mobile-nav a {
    display: grid;
    flex: 0 0 72px;
    min-width: 72px;
    min-height: 55px;
    scroll-snap-align: center;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: var(--muted);
    border-top: 3px solid transparent;
    font-size: 0.58rem;
    font-weight: 750;
    text-decoration: none;
  }

  .mobile-nav a.is-active {
    color: var(--navy-900);
    border-top-color: var(--gold-500);
  }

  .mobile-nav .nav-icon {
    height: 20px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 23px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .span-9,
  .span-8,
  .span-7,
  .span-6,
  .span-5,
  .span-4,
  .span-3 {
    grid-column: span 12;
  }

  .active-vote,
  .editor-layout,
  .result-hero {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    grid-row: 1;
  }

  .field-grid,
  .field-grid--3 {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: 380px;
    padding: 52px 28px;
  }

  .login-title {
    font-size: clamp(3rem, 15vw, 5.5rem);
  }

  .login-panel {
    padding: 34px 20px 55px;
  }

  .login-card {
    box-shadow: var(--shadow-sm);
  }
}

@media (max-width: 620px) {
  .brand__copy strong {
    max-width: 170px;
  }

  .brand__copy span {
    display: none;
  }

  .user-button__avatar {
    width: 33px;
    height: 33px;
  }

  .route-outlet {
    padding-inline: 14px;
  }

  .page-title {
    font-size: 2.25rem;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 98px;
    padding: 16px;
  }

  .metric__value {
    font-size: 1.7rem;
  }

  .result-questions,
  .result-questions--review {
    padding: 20px 17px;
  }

  .result-question__header {
    align-items: stretch;
    flex-direction: column;
  }

  .result-row {
    grid-template-columns: 82px minmax(0, 1fr) 38px;
    gap: 9px;
  }

  .setup-summary {
    grid-template-columns: 1fr;
  }

  .card__header,
  .card__body,
  .card__footer {
    padding-inline: 17px;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    min-width: 0;
  }

  .data-table--responsive thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table--responsive,
  .data-table--responsive tbody,
  .data-table--responsive tr,
  .data-table--responsive td {
    display: block;
    width: 100%;
  }

  .data-table--responsive tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .data-table--responsive td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }

  .data-table--responsive td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }

  .data-table--responsive td:first-child {
    display: block;
    padding-bottom: 9px;
    text-align: left;
  }

  .data-table--responsive td:first-child::before {
    display: none;
  }

  .table-actions {
    justify-content: flex-end;
  }

  .active-vote__controls .button {
    flex: 1;
  }

  .delegate-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .ballot-card__topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .ballot-option {
    min-height: 72px;
  }

  .oversight-banner {
    grid-template-columns: 1fr;
  }

  .integrity-seal {
    width: 95px;
    height: 95px;
  }

  .observer-state {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog__actions .button {
    width: 100%;
  }

  .toast-region {
    right: 12px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}

@media (orientation: portrait) and (max-width: 860px) {
  .presentation__content {
    width: 88vw;
  }

  .presentation-title {
    max-width: 88vw;
    font-size: clamp(3rem, 13vw, 7rem);
  }

  .presentation__subtitle {
    max-width: 84vw;
    font-size: clamp(1rem, 4vw, 2rem);
  }

  .presentation-results {
    width: 86vw;
    grid-template-columns: 1fr;
    gap: 1vh;
  }

  .presentation-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .presentation-result strong {
    font-size: clamp(2rem, 8vw, 4rem);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .app-header,
  .sidebar,
  .mobile-nav,
  .page-actions,
  .filter-bar,
  .button,
  .toast-region {
    display: none !important;
  }

  .app-body {
    display: block;
  }

  .route-outlet {
    width: 100%;
    padding: 0;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}
