:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #19283d;
  background: #f6f8fb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: #087f83;
}

a:hover {
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #19aeb1;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: white;
  padding: 12px;
  z-index: 10;
}

.skip:focus {
  left: 12px;
}

.top {
  background: #101d32;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(24px, calc((100vw - 1100px) / 2));
  gap: 24px;
}

.brand {
  color: white;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand > span:last-child {
  color: #66d5cd;
  margin-left: -9px;
}

.brandmark {
  background: #18aaa7;
  color: #08262b;
  padding: 6px 11px;
  border-radius: 10px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.top nav a,
.menu summary {
  color: #dce7f1;
  text-decoration: none;
  font-size: 14px;
}

.menu {
  position: relative;
}

.menu summary {
  cursor: pointer;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 26px;
  min-width: 185px;
  background: white;
  box-shadow: 0 12px 40px #101d322b;
  border-radius: 10px;
  padding: 14px;
  z-index: 2;
}

.dropdown a {
  color: #15243b !important;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 90px;
  min-height: 75vh;
}

.hero {
  padding: 80px 0 95px;
  max-width: 760px;
}

.eyebrow {
  color: #008d8b;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(48px, 7vw, 82px);
  letter-spacing: -3px;
  line-height: 1.06;
  margin: 22px 0;
}

.hero em {
  font-style: normal;
  color: #078d8b;
}

.hero p,
.intro p {
  font-size: 19px;
  color: #607086;
  line-height: 1.65;
  max-width: 620px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 13px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  min-height: 46px;
}

.primary {
  background: #078c8a;
  color: white;
}

.primary:hover {
  background: #06716f;
  text-decoration: none;
}

.ghost {
  border: 1px solid #cbd6e2;
  background: white;
  color: #17314b;
}

.ghost:hover {
  background: #eef5f7;
}

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

.tile,
.panel {
  background: white;
  border: 1px solid #e0e7ef;
  border-radius: 17px;
  box-shadow: 0 10px 35px #18324a0b;
  padding: 30px;
}

.tileicon {
  background: #d9f5f1;
  color: #007c7b;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  font-size: 25px;
}

.tile h2,
.panel h2 {
  font-size: 22px;
  margin: 18px 0 9px;
}

.tile p,
.panel p {
  color: #64748b;
  line-height: 1.55;
}

.tile a {
  font-weight: 700;
}

.muted {
  background: #f9fafc;
}

.intro {
  margin-bottom: 35px;
}

.intro h1 {
  font-size: clamp(38px, 5vw, 56px);
  letter-spacing: -1.8px;
  margin: 12px 0;
}

.narrow {
  max-width: 620px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

label {
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #b9c9d9;
  border-radius: 9px;
  padding: 13px 14px;
  color: #182a40;
  background: white;
}

form .btn {
  align-self: flex-start;
  margin-top: 10px;
}

.error {
  background: #fff1f1;
  border: 1px solid #d65d5d;
  color: #902626;
  padding: 14px;
  border-radius: 9px;
  margin-top: 20px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 22px;
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sectionhead h2 {
  margin: 0;
}

.pill {
  background: #d9f5f1;
  color: #006e70;
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.secondary {
  color: #64748b;
}

.small {
  font-size: 13px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.cardvote {
  border: 2px solid #d4e0e9;
  background: #fff;
  border-radius: 12px;
  min-height: 112px;
  font-size: 27px;
  font-weight: 800;
  color: #16314d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background .15s, border-color .15s,
    transform .15s;
}

.cardvote::before {
  content: '♠';
  font-size: 17px;
  color: #7fa1ae;
}

.cardvote:hover:not(:disabled) {
  border-color: #18aaa7;
  transform: translateY(-2px);
}

.cardvote.selected {
  border-color: #008d8b;
  background: #e0f6f2;
}

/* Participant management */

.people {
  padding: 0;
  margin: 18px 0 22px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.people li.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2eaf0;
  border-radius: 11px;
  background: #f9fbfd;
  min-width: 0;
}

.participant-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #19324c;
  overflow-wrap: anywhere;
  min-width: 0;
}

.participant-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.people li .participant-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 9px;
  background: #e9f4f3;
  color: #087774;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.people li.participant-offline {
  background: #f5f6f8;
  border-color: #e6e9ed;
}

.participant-offline .participant-name {
  color: #8390a0;
}

.people li.participant-offline .participant-status {
  background: #e7ebef;
  color: #667487;
}

.participant-remove {
  appearance: none;
  border: 1px solid #e5bfc1;
  border-radius: 8px;
  background: #fff;
  color: #a3313b;
  padding: 6px 9px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

.participant-remove:hover {
  background: #fff0f0;
  border-color: #c9767e;
}

.participant-remove:active {
  background: #fbe2e4;
}

.participant-remove:focus-visible {
  outline: 3px solid #19aeb1;
  outline-offset: 2px;
}

#votedCount {
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

#copyLink {
  max-width: 100%;
}

/* Facilitator controls */

.host {
  margin-top: 22px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Revealed results */

.resultgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.resultcard {
  background: #eef7f7;
  border: 1px solid #d2e7e6;
  border-radius: 12px;
  min-width: 90px;
  text-align: center;
  padding: 15px;
}

.resultcard strong {
  display: block;
  font-size: 30px;
}

.resultcard span {
  font-size: 13px;
}

.stats {
  margin-top: 15px;
  font-weight: 700;
}

.stats span {
  margin-right: 20px;
}

footer {
  text-align: center;
  color: #758399;
  padding: 30px;
  border-top: 1px solid #e3e9ef;
  font-size: 13px;
}

/* Tablet and mobile */

@media (max-width: 750px) {
  .top {
    padding: 15px 20px;
  }

  .top nav {
    gap: 12px;
  }

  .container {
    padding: 28px 18px 70px;
  }

  .hero {
    padding: 45px 0;
  }

  .tiles,
  .layout {
    grid-template-columns: 1fr;
  }

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

  .cardvote {
    min-height: 95px;
  }

  .panel,
  .tile {
    padding: 22px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  #votedCount {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .people li.participant-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .participant-actions {
    width: 100%;
    justify-content: space-between;
  }

  .participant-remove {
    min-height: 36px;
    padding: 8px 12px;
  }

  .cardvote {
    min-height: 82px;
    font-size: 24px;
  }
}

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


/* SAC WEB VOTING MODES */

.voting-mode-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid #d4e0e9;
  border-radius: 12px;
}

.voting-mode-picker legend {
  font-weight: 700;
  padding: 0 6px;
}

.voting-mode-picker label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 2px solid #d4e0e9;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.voting-mode-picker label:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}

.voting-mode-picker input {
  width: auto;
  margin: 0;
  accent-color: #2563eb;
}

.cardvote-emoji {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 115px;
  padding: 12px 8px;
  font-size: 17px;
  line-height: 1.3;
  text-align: center;
}

.cardvote-emoji::before {
  content: none;
}

.vote-emoji {
  font-size: 34px;
  line-height: 1.2;
}

.vote-value {
  display: block;
}

.cards:has(.cardvote-emoji) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cards:has(.cardvote-emoji:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resultcard strong {
  overflow-wrap: anywhere;
}

@media (max-width: 750px) {
  .voting-mode-picker {
    flex-direction: column;
  }

  .voting-mode-picker label {
    width: 100%;
  }

  .cards:has(.cardvote-emoji) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards:has(.cardvote-emoji:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cardvote-emoji {
    min-height: 100px;
    font-size: 14px;
  }

  .vote-emoji {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .cards:has(.cardvote-emoji:nth-child(3):last-child) {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
