@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("PlusJakartaSans-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Light theme and coral accent from the IvaBoard product tokens. */
:root {
  color-scheme: light;
  --background: #fbf8f3;
  --surface: #ffffff;
  --surface-muted: #f5f1eb;
  --border: #e4ddd3;
  --border-strong: #8f8781;
  --foreground: #1c1917;
  --muted-foreground: #57534e;
  --primary: #c2410c;
  --primary-hover: #9a3412;
  --primary-foreground: #ffffff;
  --primary-tint: #ffedd5;
  --focus: #c2410c;
  --warning: #92400e;
  --warning-tint: #fffbeb;
  --success: #166534;
  --success-tint: #f0fdf4;
  --status-open: #6b21a8;
  --status-open-tint: #f3e8ff;
  --status-planned: #075985;
  --status-planned-tint: #e0f2fe;
  --status-declined: #44403c;
  --status-declined-tint: #e7e5e4;
  --type-chip: 13px;
  --type-body: 16px;
  --type-title: 20px;
  --type-headline: 30px;
  --type-display: 40px;
  --radius-control: 12px;
  --radius-sheet: 16px;
  --elevation-sheet: 0 1px 2px rgb(28 25 23 / 0.06), 0 8px 24px rgb(28 25 23 / 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--surface);
  color: var(--foreground);
  cursor: default;
  font: var(--type-body)/1.5 "Plus Jakarta Sans", system-ui, sans-serif;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--type-title); line-height: 1.35; font-weight: 800; letter-spacing: -0.015em; }
button {
  appearance: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  color: inherit;
  font: inherit;
}
button:enabled { cursor: pointer; }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button, .vote-tile { -webkit-user-drag: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--surface-muted);
  color: var(--muted-foreground);
  font-size: var(--type-chip);
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}
.notice {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  background: var(--surface-muted);
  font-size: 15px;
  line-height: 23px;
}
.notice[data-tone="warning"] {
  background: var(--warning-tint);
  border-color: var(--warning);
  color: var(--warning);
}
.notice[data-tone="success"] {
  background: var(--success-tint);
  border-color: var(--success);
  color: var(--success);
}
.button {
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  padding: 8px 16px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 750;
}
.button:enabled:hover { background: var(--surface-muted); border-color: var(--foreground); }
.primary-button:enabled {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
}
.primary-button:enabled:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button:disabled { border-color: var(--border); background: var(--surface-muted); color: var(--muted-foreground); }

.portal { background: var(--background); }
.portal-width { width: min(936px, calc(100% - 40px)); margin-inline: auto; }
.portal-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.portal-header-inner { height: 65px; display: flex; justify-content: space-between; align-items: center; }
.workspace { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; }
.workspace-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 16px;
}
.board-content { padding-top: 24px; }
.board-heading h1 { font-size: var(--type-display); }
.board-heading p { margin-top: 7px; color: var(--muted-foreground); }
.list-heading { display: flex; align-items: center; justify-content: space-between; margin: 21px 0 11px; }
.idea-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: var(--elevation-sheet);
}
.idea {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 13px 19px;
}
.idea + .idea { border-top: 1px solid var(--border); }
.idea-title { font-size: var(--type-title); font-weight: 800; line-height: 26px; letter-spacing: -0.015em; }
.idea-summary { margin-top: 3px; color: var(--muted-foreground); }
.idea-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--muted-foreground); font-size: var(--type-chip); }
.idea-meta .chip { border: 0; padding-block: 2px; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip[data-status="Planned"] { color: var(--status-planned); background: var(--status-planned-tint); }
.status-chip[data-status="Under review"] { color: var(--status-declined); background: var(--status-declined-tint); }
.status-chip[data-status="Open"] { color: var(--status-open); background: var(--status-open-tint); }

.vote-tile {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 52px;
  min-height: 57px;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.vote-tile:enabled:hover { background: var(--primary-tint); border-color: var(--primary); }
.vote-marker {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 1px;
  color: var(--primary);
  transform: rotate(45deg);
}
.vote-tile[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.vote-tile[aria-pressed="true"] .vote-marker {
  width: 12px;
  height: 7px;
  border: 0;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: inherit;
  transform: rotate(-45deg);
}
.details-toggle {
  margin: -3px 0;
  min-height: 28px;
  padding: 2px 5px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--primary-hover);
  font-size: 15px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.details-toggle:enabled:hover { background: var(--primary-tint); }
.idea-details { margin-top: 10px; }
.vote-notice { margin-top: 12px; }
.vote-notice:empty { visibility: hidden; }

.console-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 45px 0; }
.console-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.console-heading h1 { font-size: var(--type-headline); }
.flag-name { white-space: nowrap; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sheet {
  border: 1px solid var(--border);
  border-radius: var(--radius-sheet);
  background: var(--surface);
  box-shadow: var(--elevation-sheet);
}
.result-card { padding: 23px 25px; }
.result-count {
  margin: 11px 0 1px;
  font-size: 58px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.result-count span { color: var(--muted-foreground); font-weight: 500; }
.result-rate { color: var(--muted-foreground); font-size: 17px; font-weight: 650; }
.experiment-summary { margin: 20px 0 15px; }
#budget-toggle { min-width: 190px; }
.budget-slot { min-height: 95px; padding-top: 10px; }
#budget-panel { max-width: 920px; }
.conclusion { background: var(--surface); }
.source { margin-top: 19px; color: var(--muted-foreground); font-size: 14px; }

.rollback-banner { margin-bottom: 18px; font-weight: 700; }
.rehearsal-card { display: flex; flex-direction: column; padding: 18px; }
.rehearsal-card header p { margin-top: 4px; min-height: 23px; color: var(--muted-foreground); font-size: 15px; }
.mini-preview { margin: 14px 0; min-height: 219px; } /* the expanded mini card height: buttons never move when the cards collapse */
.mini-preview .idea { padding: 12px; gap: 11px; grid-template-columns: 45px minmax(0, 1fr); }
.mini-preview .idea-title { font-size: 17px; line-height: 24px; }
.mini-preview .idea-summary { font-size: 15px; line-height: 22px; }
.mini-preview .idea-details { padding: 8px 10px; line-height: 22px; }
.mini-preview .vote-tile { width: 45px; min-height: 48px; font-size: 17px; }
.flag-state {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-weight: 750;
  font-size: 15px;
}
.rehearsal-actions { display: flex; gap: 10px; margin-top: 20px; }

.public-nav { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; padding: 12px max(20px, calc((100% - 1120px) / 2)); background: var(--surface-muted); border-bottom: 1px solid var(--border); }
.public-nav a, .source a { color: var(--primary-hover); font-size: 14px; font-weight: 700; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 700px) {
  .portal-header-inner { height: auto; min-height: 65px; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
  .console-heading { align-items: flex-start; flex-wrap: wrap; }
  .console-heading .chip { max-width: 100%; white-space: normal; }
  .console-heading h1 { font-size: 25px; }
  .flag-name { white-space: normal; overflow-wrap: anywhere; }
  .two-columns { grid-template-columns: 1fr; }
  .rehearsal-actions { flex-wrap: wrap; }
  .mini-preview { min-height: 0; }
  .board-heading h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
