:root {
  --green-dark: #1b4332;
  --green: #2d6a4f;
  --green-light: #95d5b2;
  --sand: #fefae0;
  --text: #1b1b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--sand);
  color: var(--text);
}

.site-header {
  background: var(--green-dark);
  padding: 1rem 1.5rem;
}

.site-header .logo {
  color: white;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: bold;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .spotlight-matchup { flex-direction: column; }
}

label { display: block; margin-top: 0.75rem; font-weight: 600; font-size: 0.9rem; }

input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

button {
  margin-top: 1rem;
  background: var(--green);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

button:hover { background: var(--green-dark); }
button:disabled { background: #aaa; cursor: not-allowed; }

button.primary { font-size: 1.1rem; }

.link-button {
  background: none;
  border: none;
  color: #999;
  padding: 0;
  margin: 0 0 0 auto;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover { color: #c0392b; background: none; }

.session-header .code {
  font-weight: bold;
  letter-spacing: 2px;
  background: var(--green-light);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

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

.item-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
}

.item-list li small { color: #888; }

.inline-form { margin-left: auto; }

.flashes {
  list-style: none;
  padding: 0.75rem 1rem;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.champion {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--green-dark);
}

.bracket {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 200px;
}

.round h3 { text-align: center; }

.match {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.match form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slot {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.95rem;
}

.slot.empty { color: #bbb; font-style: italic; }
.slot.waiting { color: #777; }
.slot.winner { background: var(--green-light); font-weight: bold; border-color: var(--green); }
.slot.voting-now { border-color: var(--green); color: var(--green-dark); font-weight: bold; }

.voting-now-label {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  text-align: center;
  color: var(--green-dark);
  font-weight: bold;
}

.match.current-match {
  outline: 2px solid var(--green);
  border-radius: 8px;
  padding: 0.5rem;
  background: #f4fbf7;
}

.spotlight {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--green);
}

.spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.round-label {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timer {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 0.2rem 0.9rem;
  min-width: 3.5rem;
  text-align: center;
}

.timer.timer-urgent {
  background: #f8d7da;
  color: #842029;
}

.spotlight-matchup {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  margin: 0;
}

.contender {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: var(--sand);
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  margin: 0;
  width: auto;
  cursor: pointer;
}

.contender:hover { background: var(--green-light); border-color: var(--green); }

.contender.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.contender-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text);
  text-align: center;
}

.contender-votes {
  font-size: 0.85rem;
  color: #555;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e5e5;
  border-radius: 999px;
  overflow: hidden;
  display: block;
}

.progress-fill {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.3s ease;
}

.vs {
  align-self: center;
  font-weight: bold;
  color: #999;
  font-size: 1.1rem;
}

.finalize-form { margin-top: 0.75rem; }

button.finalize-btn {
  background: var(--green-dark);
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem;
  margin-top: 0;
  width: 100%;
}

.hero { max-width: 680px; margin: 2rem 0 2.5rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .98; margin: .4rem 0 1rem; }
.hero p:not(.eyebrow) { font-size: 1.15rem; color: #52645c; max-width: 560px; }
.eyebrow { color: var(--green); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .5rem; }
.session-header { margin: 1rem 0 1.5rem; }
.session-header h1 { margin: .25rem 0 .5rem; max-width: 760px; }
textarea { width: 100%; min-height: 110px; resize: vertical; padding: .75rem; margin-top: .25rem; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.live-dot { color: var(--green-dark); font-size: .8rem; font-weight: 700; }
.live-dot::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .35rem; border-radius: 50%; background: #e76f51; }
.participant-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.participant-list li, .chips span { background: #edf5ef; border: 1px solid #c9e2d1; border-radius: 999px; padding: .5rem .8rem; }
.host-card { border-left: 5px solid var(--green); }
.waiting-card { background: #f5f7f4; }
.focus-card { max-width: 720px; }
.muted { color: #718079; font-size: .9rem; }
.answer-list { display: grid; gap: .7rem; }
.answer-list form { margin: 0; }
.answer-option { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0; padding: 1rem; text-align: left; background: #f7faf7; color: var(--text); border: 2px solid #d7e3da; }
.answer-option:hover, .answer-option.selected { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }
.answer-option small { color: #718079; margin-left: 1rem; }
.spotlight { max-width: 760px; }
.winner blockquote { margin: .5rem 0 .75rem; font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.1; font-weight: 800; color: var(--green-dark); }
.winner p { color: #52645c; }
.discussion-timer { margin-top: 1.5rem; font-size: 3rem; font-weight: 800; color: var(--green-dark); }
.discussion-copy { margin-bottom: 0; color: #52645c; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.participant-strip { padding: 1rem 1.25rem; }
.secondary-button { background: #f1eee5; color: var(--green-dark); border: 1px solid #c7d0c7; margin-top: 1rem; }
.secondary-button:hover { background: #e5e0d4; }
