/* OpenSlides-lite — visual system.
 *
 * Type and colour are taken from berlin-bezahlbar-machen.de: Work Sans 900 for
 * headings with negative tracking, Inter 500 for text at 150% leading, and a
 * five-colour palette. Both faces are vendored into dist/, so the page still
 * never requests anything from an external host.
 */

/* ---- fonts ------------------------------------------------------------- */

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/work-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

/* ---- tokens ------------------------------------------------------------ */

:root {
  /* The reference site's entire palette is five colours. Keeping that
     discipline is most of what makes it look deliberate. Colour comes from
     using purple as a *surface*, not from adding more hues. */
  --purple: #632199;
  --purple-deep: #4a1873;
  --purple-light: #ebebff;
  --purple-dark: #2c0f45;
  --gray: #404040;
  --black: #000;
  --white: #fff;

  /* Results need to be readable at a glance from the back of a room, so the
     ballot keeps a semantic pair on top of the brand palette. Red stays
     reserved for alerts and Nein — it is never brand furniture, so a red thing
     on screen always means something. */
  --ja: #1a7a46;
  --nein: #d81f11;
  --neutral: var(--gray);

  --rule: #cdc6e0;

  /* Hard-edged, offset shadows rather than soft blurs, lifted from the
     reference: elements sit on the page like pasted paper. */
  --shadow-card: 4px 4px 3px rgba(0, 0, 0, 0.25);
  --shadow-button: 0 4px 4px rgba(0, 0, 0, 0.25);
  --shadow-banner: 4px 4px 6px rgba(0, 0, 0, 0.25);

  --font-display: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Fluid scale, matching the reference: 40→64, 36→40, 24→32, 20→24,
     18→21 body, 14→16 small, 12→14 caption. */
  --text-h1: clamp(2.5rem, 1.55rem + 4.2vw, 4rem);
  --text-h2: clamp(2.25rem, 2.05rem + 0.9vw, 2.5rem);
  --text-h3: clamp(1.5rem, 1.15rem + 1.6vw, 2rem);
  --text-h4: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --text-body: clamp(1.125rem, 1.05rem + 0.33vw, 1.3125rem);
  --text-small: clamp(0.875rem, 0.83rem + 0.2vw, 1rem);
  --text-caption: clamp(0.75rem, 0.72rem + 0.16vw, 0.875rem);

  --measure: 46rem;
  --gap: clamp(1.25rem, 0.9rem + 1.5vw, 2.5rem);
  --stack: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  /* Sharp corners throughout: this is placards, not cards. */
  border-radius: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Column layout so short pages push the footer to the bottom instead of
     leaving it floating in the middle of the screen. */
  display: flex;
  flex-direction: column;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-h1);
  line-height: 0.9;
}
h2 {
  font-size: var(--text-h2);
}
h3 {
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
}
h4 {
  font-size: var(--text-h4);
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--purple);
  font-weight: 600;
  text-underline-offset: 0.2em;
}

strong {
  font-weight: 700;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--purple-light);
  padding: 0.1em 0.4em;
}

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

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

/* Kicker / eyebrow: the one place small-caps styling earns its keep. */
.kicker,
.poll__kicker,
.motion-group__title,
.motion__reason-title,
.admin-form__title,
.agenda__number {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
}

/* ---- masthead ---------------------------------------------------------- */

/* Tinted rather than white, so there is colour on every page rather than only
   on the start page — but light, so it does not stack into one slab with the
   purple hero directly beneath it. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--purple-light);
  border-bottom: 4px solid var(--purple);
  box-shadow: var(--shadow-banner);
}

.masthead__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem var(--gap);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.masthead__brand {
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
}

.masthead__brand:hover {
  color: var(--purple);
}

.masthead__nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Not uppercase: the reference sets nav in Work Sans extrabold at reading
   size, which is louder than small caps without shouting. */
.masthead__nav a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--black);
  padding: 0.15em 0.5em;
  /* The reference tilts its nav links on hover. It is the smallest possible
     amount of hand-made-ness and it carries a lot of the character. */
  transition: rotate 0.18s var(--ease), background-color 0.15s var(--ease),
    color 0.15s var(--ease);
}

.masthead__nav a:hover {
  rotate: -4deg;
  background: var(--purple);
  color: var(--white);
}

.masthead__offline {
  margin: 0;
  padding: 0.5rem var(--gap);
  background: var(--nein);
  color: var(--white);
  font-size: var(--text-small);
  font-weight: 700;
  text-align: center;
}

/* ---- page scaffolding -------------------------------------------------- */

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  /* Top padding keeps the first heading clear of the sticky masthead. The hero
     pulls itself back up, because it is meant to sit flush against it. */
  padding: var(--stack) var(--gap);
}

.page--narrow {
  max-width: 28rem;
}

/* Full-bleed inside the measure-constrained page. */
.hero,
.section--accent {
  margin-inline: calc(var(--gap) * -1);
  padding-inline: var(--gap);
}

/* Purple rather than black. White on #632199 is about 9:1, so unlike a red
   band this one can carry the welcome paragraph as well as the title. */
.hero {
  background: var(--purple);
  color: var(--white);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  margin-top: calc(var(--stack) * -1);
  margin-bottom: var(--stack);
}

.hero__title {
  margin-bottom: 0.25em;
}

.hero__subtitle {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-h4);
  font-weight: 800;
  letter-spacing: 0.02em;
  /* The reference's tilted label, in white-on-purple's inverse. */
  background: var(--white);
  color: var(--purple);
  padding: 0.15em 0.5em;
  rotate: -4deg;
  margin-bottom: 1.25rem;
}

.hero__body {
  max-width: 38ch;
  color: var(--purple-light);
}

.section {
  margin-bottom: var(--stack);
}

/* Every page gets a band, so the site does not feel like two different sites
   depending on whether you landed on the home page. */
.section__title {
  padding-bottom: 0.35em;
  border-bottom: 4px solid var(--purple);
  margin-bottom: 1.25rem;
}

.section--accent {
  background: var(--purple-light);
  border-block: 6px solid var(--purple);
  padding-block: 2rem 2.25rem;
  margin-bottom: var(--stack);
}

.section__lead,
.panel__lead {
  color: var(--gray);
  font-size: var(--text-small);
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

.section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.loading,
.empty {
  color: var(--gray);
  font-size: var(--text-small);
  padding: 1.25rem 0;
}

.empty {
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
}

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.4rem;
  border: 3px solid var(--purple);
  background: var(--white);
  color: var(--purple);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.12s var(--ease), color 0.12s var(--ease),
    transform 0.06s var(--ease), border-color 0.12s var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--purple);
  color: var(--white);
}

/* A real press, because most of these are tapped on a phone. */
.btn:active:not(:disabled) {
  transform: translateY(2px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--purple);
  color: var(--white);
  box-shadow: var(--shadow-button);
}

.btn--primary:hover:not(:disabled) {
  background: var(--purple-deep);
  border-color: var(--purple-deep);
}

/* Press flattens the shadow, so the button physically goes down. */
.btn--primary:active:not(:disabled) {
  box-shadow: none;
}

/* A disabled solid button washes out to pale lavender at low opacity, which
   reads as "broken" rather than "not available". Grey it explicitly instead. */
.btn--primary:disabled {
  background: var(--rule);
  border-color: var(--rule);
  color: var(--gray);
  box-shadow: none;
  opacity: 1;
}

/* Tertiary: for "back" links and other things that must not compete with the
   action someone actually came to the page for. */
.btn--ghost {
  border-color: var(--rule);
  color: var(--black);
  font-weight: 700;
  padding: 0.7rem 1.1rem;
}

.btn--ghost:hover:not(:disabled) {
  background: var(--purple-light);
  border-color: var(--purple);
  color: var(--purple);
}

.btn--danger {
  border-color: var(--rule);
  color: var(--nein);
}

.btn--danger:hover:not(:disabled) {
  background: var(--nein);
  border-color: var(--nein);
  color: var(--white);
}

.btn--tiny {
  padding: 0.4rem 0.7rem;
  font-size: var(--text-caption);
  border-width: 2px;
}

/* The most-tapped control in the app: full width, thumb-sized, colour-coded. */
.btn--vote {
  display: block;
  width: 100%;
  padding: 1.15rem 1rem;
  font-size: var(--text-h4);
  font-weight: 800;
  margin-bottom: 0.65rem;
  background: var(--white);
  box-shadow: var(--shadow-button);
}

.btn--vote:active:not(:disabled) {
  box-shadow: none;
}

.btn--vote-0 {
  border-color: var(--ja);
  color: var(--ja);
}
.btn--vote-0:hover:not(:disabled) {
  background: var(--ja);
  border-color: var(--ja);
  color: var(--white);
}
.btn--vote-1 {
  border-color: var(--nein);
  color: var(--nein);
}
.btn--vote-1:hover:not(:disabled) {
  background: var(--nein);
  border-color: var(--nein);
  color: var(--white);
}
.btn--vote-2 {
  border-color: var(--gray);
  color: var(--gray);
}
.btn--vote-2:hover:not(:disabled) {
  background: var(--gray);
  border-color: var(--gray);
  color: var(--white);
}

/* ---- cards and chips --------------------------------------------------- */

.card {
  display: block;
  background: var(--white);
  border: 2px solid var(--purple);
  box-shadow: var(--shadow-card);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease),
    background-color 0.12s var(--ease);
}

/* Lifts off the page on hover rather than sliding sideways. */
.card--link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 3px rgba(0, 0, 0, 0.25);
  background: var(--purple-light);
}

.card--active {
  border-color: var(--purple);
  border-left-width: 8px;
  background: var(--purple-light);
}

.card__head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

/* Identifier: solid, because it is a label rather than a status. */
.card__badge,
.admin-list__badge {
  display: inline-block;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-caption);
  letter-spacing: 0.02em;
  padding: 0.25rem 0.6rem;
  /* Tilted, as on the reference. Sits in its own margin so the rotation does
     not collide with the title beside it. */
  rotate: -4deg;
  margin-right: 0.35rem;
}

.card__title {
  font-size: var(--text-h4);
  margin: 0 0 0.3rem;
}

.card__meta,
.admin-list__meta {
  margin: 0;
  font-size: var(--text-small);
  color: var(--gray);
}

.card__body {
  margin: 0.5rem 0 0;
  font-size: var(--text-small);
}

/* Status: outlined, so it reads as a different kind of thing from the
   identifier sitting next to it. */
.chip {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border: 2px solid currentColor;
  background: var(--white);
}

.chip--draft,
.chip--withdrawn {
  color: var(--gray);
}
.chip--published {
  color: var(--purple);
}
.chip--voting {
  color: var(--white);
  background: var(--purple);
  border-color: var(--purple);
}
.chip--accepted {
  color: var(--ja);
}
.chip--rejected {
  color: var(--nein);
}

/* ---- agenda ------------------------------------------------------------ */

.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agenda__item {
  background: var(--white);
  border: 2px solid var(--rule);
  border-left-width: 8px;
  box-shadow: var(--shadow-card);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s var(--ease);
}

.agenda__item.is-active {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

.agenda__item.is-active .agenda__number,
.agenda__item.is-active .agenda__description {
  color: var(--purple-light);
}

.agenda__item.is-active .agenda__flag {
  background: var(--white);
  color: var(--purple);
}

.agenda__item.is-done {
  background: var(--purple-light);
  box-shadow: none;
  opacity: 0.6;
}

.agenda__title {
  font-size: var(--text-h4);
  margin: 0.2rem 0 0;
}

.agenda__flag,
.speakers__flag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--purple);
  color: var(--white);
  padding: 0.15rem 0.45rem;
  margin-top: 0.4rem;
}

.agenda__description {
  margin: 0.5rem 0 0;
  font-size: var(--text-small);
  color: var(--gray);
}

/* ---- motions ----------------------------------------------------------- */

.motion-group {
  margin-bottom: 2.5rem;
}

.motion-group__title {
  border-bottom: 2px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.motion__title {
  margin: 0.5rem 0 0.4rem;
}

.motion__meta {
  color: var(--gray);
  font-size: var(--text-small);
  margin-bottom: 1.5rem;
}

.motion__body {
  border-left: 4px solid var(--purple);
  padding-left: 1.25rem;
  margin: 0 0 2rem;
}

.motion__reason {
  background: var(--purple-light);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: var(--text-small);
}

.motion__reason-title {
  margin-bottom: 0.6rem;
}

/* ---- polls ------------------------------------------------------------- */

.poll {
  background: var(--white);
  border: 2px solid var(--purple);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.poll:last-child {
  margin-bottom: 0;
}



.poll--temperature {
  border-left-style: dashed;
}

.poll__kicker {
  margin-bottom: 0.5rem;
}

.poll__question {
  font-size: var(--text-h4);
  margin-bottom: 1rem;
}

.poll__options {
  margin: 1rem 0 0.75rem;
}

.poll__done {
  background: var(--ja);
  color: var(--white);
  padding: 0.9rem 1.1rem;
  font-weight: 500;
}

.poll__turnout {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h4);
  letter-spacing: -0.01em;
}

.poll__hint {
  margin: 0.4rem 0 0;
  font-size: var(--text-small);
  color: var(--gray);
}

.poll__error {
  margin: 0.75rem 0 0;
  background: var(--white);
  border: 3px solid var(--nein);
  color: var(--nein);
  padding: 0.7rem 1rem;
  font-size: var(--text-small);
  font-weight: 700;
}

/* ---- tally ------------------------------------------------------------- */

.tally {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.tally__row {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tally__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-small);
  letter-spacing: -0.01em;
}

.tally__bar {
  display: block;
  height: 1.6rem;
  background: var(--white);
  border: 2px solid var(--rule);
}

.section--accent .tally__bar,
.projector .tally__bar {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.tally__fill {
  display: block;
  height: 100%;
  background: var(--purple);
  transition: width 0.35s var(--ease);
}

.tally__row--0 .tally__fill {
  background: var(--ja);
}
.tally__row--1 .tally__fill {
  background: var(--nein);
}
.tally__row--2 .tally__fill {
  background: var(--gray);
}

.tally__count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-h4);
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
  text-align: right;
}

.tally__total {
  margin-top: 0.75rem;
  font-size: var(--text-caption);
  color: var(--gray);
}

.section--accent .tally__total,
.projector .tally__total {
  color: rgba(255, 255, 255, 0.65);
}

/* ---- speakers ---------------------------------------------------------- */

.speakers {
  list-style: none;
  counter-reset: speaker;
  margin: 0 0 2rem;
  padding: 0;
}

.speakers__item {
  counter-increment: speaker;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 2px solid var(--rule);
  border-left-width: 8px;
  box-shadow: var(--shadow-card);
  margin-bottom: 0.5rem;
}

.speakers__item::before {
  content: counter(speaker);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-h4);
  color: var(--purple);
  min-width: 1.5ch;
}

.speakers__item.is-speaking {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

.speakers__item.is-speaking::before {
  color: var(--white);
}

.speakers__item.is-speaking .speakers__flag {
  background: var(--white);
  color: var(--purple);
}

.speakers__item.is-done {
  background: var(--purple-light);
  box-shadow: none;
  opacity: 0.55;
}

.speakers__item.is-mine {
  border-left-color: var(--ja);
  border-left-width: 8px;
}

.speakers__name {
  font-weight: 600;
}

.speakers__flag {
  margin: 0;
}

.speakers__flag--mine {
  background: var(--ja);
}

/* ---- forms ------------------------------------------------------------- */

.speakers__form,
.speakers__own,
.login,
.admin-form {
  background: var(--purple-light);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.speakers__form label,
.login label,
.admin-form label {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 0.6rem;
}

input[type="text"],
input[type="password"],
textarea,
.admin-select {
  font-family: var(--font-text);
  font-size: var(--text-small);
  font-weight: 500;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--rule);
  background: var(--white);
  color: var(--black);
  width: 100%;
  transition: border-color 0.12s var(--ease);
}

input:focus,
textarea:focus,
.admin-select:focus {
  border-color: var(--purple);
}

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

.speakers__form button,
.login button,
.admin-form button {
  margin-top: 1.1rem;
  align-self: flex-start;
}

.speakers__own {
  gap: 0.9rem;
}

.speakers__own p {
  margin: 0;
  font-weight: 600;
}

/* ---- login ------------------------------------------------------------- */

.login {
  margin-top: var(--stack);
}

.login__title {
  font-size: var(--text-h2);
  margin-bottom: 0.2em;
}

.login__lead {
  color: var(--gray);
  font-size: var(--text-small);
  margin-bottom: 0.5rem;
}

/* ---- admin console ----------------------------------------------------- */

.console {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.console__head {
  background: var(--purple-light);
  border-bottom: 4px solid var(--purple);
  padding: 1.25rem var(--gap) 0;
}

.console__title {
  font-size: var(--text-h3);
  margin-bottom: 0.75rem;
}

.console__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.console__tab {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 0.7rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.12s var(--ease), border-color 0.12s var(--ease);
}

.console__tab:hover {
  color: var(--purple);
}

.console__tab.is-active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.console__actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.console__body {
  flex: 1;
  padding: 2rem var(--gap) 4rem;
  max-width: 62rem;
  width: 100%;
}

.panel__title {
  font-size: var(--text-h3);
  padding-bottom: 0.35em;
  border-bottom: 4px solid var(--purple);
  margin-bottom: 1.25rem;
}

.panel__subtitle {
  font-size: var(--text-h4);
  margin-top: 2.5rem;
  border-top: 2px solid var(--rule);
  padding-top: 1.5rem;
}

.admin-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.admin-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 2px solid var(--rule);
  border-left-width: 8px;
  box-shadow: var(--shadow-card);
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
}

.admin-list__item--stacked {
  flex-direction: column;
  align-items: stretch;
}

/* In a column flex container `flex: 1 1 16rem` would stretch the header to
   fill the card, leaving a hole above the tally. */
.admin-list__item--stacked .admin-list__main {
  flex: 0 0 auto;
}

.admin-list__item.is-active {
  border-color: var(--purple);
  background: var(--purple-light);
}

.admin-list__item.is-done {
  background: var(--purple-light);
  box-shadow: none;
  opacity: 0.6;
}

.admin-list__main {
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: flex-start;
  font-size: var(--text-small);
}

.admin-list__actions {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.admin-form {
  margin-top: 2rem;
}

.admin-form--inline {
  margin: 0 0 2rem;
}

.admin-form__title {
  margin: 0;
}

.admin-form__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.admin-form__actions button {
  margin-top: 0;
}

.admin-select {
  width: auto;
  padding: 0.35rem 0.5rem;
  font-size: var(--text-caption);
}

.projector-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---- projector --------------------------------------------------------- */

.projector {
  flex: 1 0 auto;
  min-height: 100vh;
  /* Dark, because a beamer in a room with the lights down should not blast
     the wall — but a deep purple, so it belongs to the palette. */
  background: var(--purple-dark);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem);
}

.projector--idle {
  color: #9d90b5;
}

.projector__inner {
  width: 100%;
  max-width: 72rem;
}

.projector__kicker {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.75rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--purple-light);
  margin-bottom: 0.6rem;
}

.projector__title {
  font-size: clamp(2.5rem, 7.5vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 0.45em;
}

.projector__lead {
  font-size: clamp(1.25rem, 2.6vw, 2rem);
  color: #d9d2e8;
  max-width: 40ch;
}

.projector__body {
  font-size: clamp(1.125rem, 2vw, 1.75rem);
  color: #d9d2e8;
  max-width: 50ch;
}

.projector__list {
  list-style: none;
  counter-reset: projector;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.projector__list li {
  counter-increment: projector;
  padding: 0.28em 0 0.28em 1.6em;
  position: relative;
  color: #9d90b5;
  border-left: 8px solid transparent;
}

.projector__list li::before {
  content: counter(projector);
  position: absolute;
  left: 0.45em;
  color: #6d5f87;
}

.projector__list li.is-active {
  color: var(--white);
  border-left-color: var(--purple);
  background: var(--purple);
}

.projector__list li.is-active::before {
  color: var(--purple-light);
}

.projector__list li.is-done {
  opacity: 0.35;
  text-decoration: line-through;
}

.projector__turnout {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.projector .tally__label {
  font-size: clamp(1.25rem, 2.6vw, 2.25rem);
}

.projector .tally__row--2 .tally__fill {
  background: #9d90b5;
}

.tally--large .tally__row {
  grid-template-columns: minmax(8rem, 14rem) 1fr auto;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.tally--large .tally__bar {
  height: clamp(2rem, 5vw, 3.5rem);
}

.tally--large .tally__count {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.tally--large .tally__total {
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  margin-top: 1.25rem;
}

.projector__offline {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.5rem;
  background: var(--nein);
  text-align: center;
  font-weight: 700;
  font-size: var(--text-small);
}

/* ---- footer ------------------------------------------------------------ */

.footer {
  flex-shrink: 0;
  border-top: 4px solid var(--purple);
  background: var(--purple-light);
}

.footer__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--gap) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
}

.footer__note {
  margin: 0;
  font-size: var(--text-caption);
  color: var(--gray);
  max-width: 40ch;
}

.footer__admin {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gray);
}

.footer__admin:hover {
  color: var(--purple);
}

/* ---- narrow screens ---------------------------------------------------- */

@media (max-width: 40rem) {
  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .masthead__nav {
    gap: 1.1rem;
  }

  .tally__row {
    grid-template-columns: minmax(4.5rem, 7rem) 1fr auto;
    gap: 0.5rem;
  }

  /* Motion text is the longest line on the site; give it back the indent so it
     does not run to the edge of a phone. */
  .motion__body {
    padding-left: 0.9rem;
  }

  .poll,
  .motion__reason {
    padding: 1.15rem;
  }

  .admin-list__item {
    flex-direction: column;
    align-items: stretch;
  }

  .section__actions .btn {
    flex: 1 1 100%;
  }

  .footer__inner {
    flex-direction: column;
  }
}

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