/* Playfair Display for the wordmark and buttons, Inter for everything that has to be read at
   length. Both self-hosted — see fonts.css. */

:root {
  --yellow: #ffd21e;
  --orange: #ff8a00;
  --ink: #16160f;
  --muted: #6b6b63;
  --line: #e4e4dd;
  --bg: #ffffff;
  --tint: #fff8ec;
  --radius: 12px;

  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Column layout so the footer sits at the bottom of the viewport on short pages instead of
   hanging directly under the content. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Wide enough that a full poll link fits on one line next to its label, tag and Copy button. */
.page {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 48px 64px;
}

.footer {
  flex: 0 0 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 48px 32px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: #a3a39a;
  font-size: 14px;
}

.footer-sep { color: var(--line); }

.footer-version { font-family: var(--mono); font-size: 13px; }

/* --- type ---------------------------------------------------------------- */

.brand {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 84px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand-sm {
  font-size: 34px;
  line-height: 1.2;
}

.tagline {
  font-size: 24px;
  color: var(--muted);
  margin: 14px 0 40px;
  white-space: nowrap;
}

.poll-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
}

/* The title doubles as the heading and its own input: borderless until hovered or focused, so it
   reads as a heading but invites editing. */
.title-edit {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 28px;
}

.poll-title-input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
}

.poll-title-input::placeholder { color: #bdbdb4; }

.poll-title-input:hover { border-color: var(--line); }

.poll-title-input:focus {
  outline: none;
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14);
}

.title-status {
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}

.title-status.is-error { color: #c62828; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 16px;
}

.hint, .link-desc, .note, .empty, .field-hint {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.note { margin: 16px 0 0; }
.note-top { margin: 0 0 18px; }
.empty { margin: 0; }

.hero {
  padding: 120px 0 0;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.topbar-split { justify-content: space-between; }

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

.btn {
  background: var(--yellow);
  color: var(--ink);
  border: none;
  border-radius: var(--radius);
  padding: 13px 26px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  background: var(--orange);
  color: #fff;
}

.btn:active:not(:disabled) {
  background: var(--orange);
  color: #fff;
  transform: translateY(1px);
}

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

a.btn { text-decoration: none; display: inline-block; }

.btn-lg { padding: 20px 56px; font-size: 26px; }

.btn-copy { padding: 11px 20px; font-size: 17px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
}

/* --- inputs -------------------------------------------------------------- */

.input {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--text);
  font-size: 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.14);
}

.input-question { font-size: 22px; padding: 18px 20px; }

.input-comment {
  margin-top: 10px;
  font-size: 17px;
  color: var(--muted);
}

.input-comment:focus { color: var(--ink); }

.field {
  display: block;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}

.field-hint { display: block; margin-top: 8px; }

.setup-form { margin: 0; }

/* --- share links --------------------------------------------------------- */

.links {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 44px;
}

/* Deliberately one line per link: the label, the tag, the URL and Copy stay side by side rather
   than wrapping. The URL field takes whatever width is left. */
.link-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
}

.link-row + .link-row { margin-top: 16px; }

.link-meta {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 190px;
}

.link-label { font-weight: 700; font-size: 17px; white-space: nowrap; }
.link-desc { white-space: nowrap; }

.link-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--mono);
  color: var(--muted);
  background: #fafaf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-overflow: ellipsis;
}

.link-input:focus { outline: none; border-color: var(--orange); color: var(--ink); }

.tag {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* The tags sit inside the label column rather than the row: "Keep secret, save for later!" is wide
   enough that, on the row, it took the width the URL field needs to show a full link. */
.link-meta .tag {
  align-self: flex-start;
  margin-top: 6px;
}

.tag-secret { background: #fdecec; color: #b3261e; }
.tag-share { background: #eaf5ec; color: #1e7b34; }

.warn {
  margin: 18px 0 0;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.6;
  color: #6d3b00;
  background: var(--tint);
  border: 1px solid #ffd9a8;
  border-radius: var(--radius);
}

.warn strong { color: #b3261e; }

/* --- composer ------------------------------------------------------------ */

.composer { margin-bottom: 52px; }

.kind-toggle {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.kind {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 17px;
  white-space: nowrap;
  cursor: pointer;
}

.kind:has(input:checked) {
  border-color: var(--orange);
  background: var(--tint);
  font-weight: 600;
}

.kind input { accent-color: var(--orange); margin: 0; width: 18px; height: 18px; }

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.option-row .input { padding: 13px 16px; font-size: 17px; }

.remove-option {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 8px;
}

.remove-option:hover { color: var(--orange); }

.composer-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}

.error {
  color: #c62828;
  font-size: 16px;
  margin: 14px 0 0;
}

/* --- question list ------------------------------------------------------- */

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

.question-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  background: #fff;
}

.question-item.dragging { opacity: 0.4; }
.question-item.drop-target { border-color: var(--orange); }

.drag-handle {
  flex: 0 0 auto;
  cursor: grab;
  color: #b8b8ae;
  font-size: 20px;
  line-height: 1.3;
  user-select: none;
}

.drag-handle:active { cursor: grabbing; }

.question-body { flex: 1 1 auto; min-width: 0; }

.question-text { font-weight: 600; font-size: 20px; }

/* The creator's note on a question, in both the editor list and the answer form. Set apart with a
   rule rather than italics so it does not compete with the question itself. */
.question-comment,
.answer-question-comment {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--yellow);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.answer-question-comment { margin: 10px 0 0; font-size: 17px; }

.badge {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--muted);
  background: #f4f4ef;
  border-radius: 999px;
  padding: 4px 11px;
  margin: 8px 0 4px;
  white-space: nowrap;
}

.option-list {
  list-style: disc;
  margin: 8px 0 0;
  padding-left: 24px;
  color: var(--muted);
  font-size: 17px;
}

.question-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  align-items: flex-start;
}

.edit-question,
.delete-question {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.edit-question:hover,
.delete-question:hover { color: var(--orange); }

.question-item.is-editing {
  border-color: var(--orange);
  background: #fffdf8;
}

.question-item.is-editing .input-question { font-size: 20px; }

/* --- answering ----------------------------------------------------------- */

.answer-question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 18px;
}

.answer-question-text {
  font-weight: 600;
  font-size: 22px;
  padding: 0 6px;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  font-size: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.answer-option:hover { border-color: var(--orange); }

.answer-option:has(input:checked) {
  border-color: var(--orange);
  background: var(--tint);
}

.answer-option input {
  accent-color: var(--orange);
  margin: 0;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* --- results ------------------------------------------------------------- */

.response {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}

.response-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.response-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
}

.response-time {
  color: var(--muted);
  font-size: 14px;
  font-family: var(--mono);
  white-space: nowrap;
}

.response-answers { margin: 0; }

.response-answers dt {
  color: var(--muted);
  font-size: 16px;
  margin-top: 12px;
}

.response-answers dt:first-child { margin-top: 0; }

.response-answers dd {
  margin: 3px 0 0;
  font-weight: 600;
  font-size: 19px;
}

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

/* Laptop widths: claw back horizontal padding and label width so the full poll link still fits on
   its single line instead of scrolling inside the field. */
@media (max-width: 1400px) {
  .page { padding: 40px 28px 64px; }
  .footer { padding: 22px 28px 32px; }
  .link-meta { min-width: 170px; }
  .links { padding: 20px; }
}

/* The no-wrap link rows only hold up while there is width for them. Below this they stack, which
   beats a URL field squeezed to nothing. */
@media (max-width: 780px) {
  html, body { font-size: 17px; }
  .page { padding: 28px 20px 48px; }
  .footer { padding: 20px 20px 28px; }
  .brand { font-size: 56px; white-space: normal; }
  .brand-sm { font-size: 28px; }
  .tagline { font-size: 20px; white-space: normal; }
  .poll-title { font-size: 34px; }
  .btn-lg { padding: 16px 36px; font-size: 22px; }
  .hero { padding: 64px 0 0; }
  .link-row { flex-wrap: wrap; }
  .link-meta { min-width: 0; }
  .link-input { flex: 1 1 100%; }
}

/* --- footer link + prose pages ------------------------------------------- */

.footer-link {
  color: #a3a39a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link:hover { color: var(--orange); }

.prose {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.65;
}

.prose .lede {
  font-size: 21px;
  line-height: 1.5;
  padding: 16px 18px;
  background: var(--tint);
  border: 1px solid #ffd9a8;
  border-radius: var(--radius);
  color: #6d3b00;
  margin: 0 0 28px;
}

.prose h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  margin: 32px 0 10px;
}

.prose p { margin: 0 0 14px; }

.prose ul { margin: 0 0 14px; padding-left: 24px; }

.prose li { margin-bottom: 8px; }

/* --- landing page --------------------------------------------------------
   The front page has to sell the thing, so it gets a narrower measure than the app pages: a full
   1320px line of body copy is unreadable however well it suits a poll editor. */

.hero-sell { padding: 96px 0 0; }

.hero-question {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 900px;
  margin: 20px auto 0;
}

.hero-lede {
  font-size: 21px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 700px;
  margin: 20px auto 36px;
}

.hero-note {
  font-size: 16px;
  color: var(--muted);
  margin: 22px 0 0;
}

.hero-note a { color: var(--muted); }
.hero-note a:hover, .hero-note a:focus-visible { color: var(--orange); }

.pitch { margin-top: 104px; }

.pitch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pitch-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  font-size: 17px;
  line-height: 1.6;
  /* Column, so the closing line can be pushed to the bottom and the three of them line up across
     cards of unequal length. Otherwise the shortest ends halfway up and looks unfinished. */
  display: flex;
  flex-direction: column;
}

.pitch-card p { margin: 0 0 14px; }
.pitch-card p:last-child { margin-bottom: 0; }

.pitch-question {
  font-family: var(--display);
  font-weight: 700;
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 16px;
}

/* The one line in each card worth carrying away from it. Specific enough to beat `.pitch-card p`
   above, which zeroes margin-top and would leave the auto margin doing nothing. */
.pitch-card .pitch-punch {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.steps { margin-top: 104px; }

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-list li { display: flex; gap: 18px; align-items: flex-start; }

.step-num {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  margin: 6px 0 8px;
}

.step-list p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.cta-band {
  margin-top: 104px;
  padding: 56px 40px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid #ffd9a8;
  text-align: center;
}

.cta-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  max-width: 760px;
  margin: 0 auto 16px;
}

.cta-note {
  font-size: 17px;
  line-height: 1.6;
  color: #6d3b00;
  max-width: 680px;
  margin: 0 auto 30px;
}

.cta-note a { color: #6d3b00; }

@media (max-width: 1100px) {
  .pitch-grid, .step-list { grid-template-columns: 1fr; }
  .pitch, .steps, .cta-band { margin-top: 72px; }
}

@media (max-width: 780px) {
  .hero-sell { padding: 56px 0 0; }
  .hero-question { font-size: 30px; }
  .hero-lede { font-size: 19px; }
  .pitch-question { font-size: 24px; }
  .cta-title { font-size: 27px; }
  .cta-band { padding: 40px 24px; }
}


/* ===========================================================================
   2i11 additions: the scoreboard, the round form and a player's own view.
   Everything above is the shared base this and the other Brightness apps use.
   =========================================================================== */

.whoami { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.whoami-name { font-weight: 700; }
.whoami-role { color: var(--muted); }

.flash {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 16px;
}
.flash-ok { background: #eaf5ec; color: #1e7b34; border: 1px solid #bfe0c8; }
.flash-bad { background: #fdecec; color: #b3261e; border: 1px solid #f2c2bf; }

.results { margin-bottom: 52px; }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 3px 9px;
  background: #f4f4ef;
  color: var(--muted);
}

/* A scoreboard is the one thing here that genuinely does not fit a phone once there are six
   players, so the table scrolls inside its own box rather than pushing the page sideways. */
.table-scroll { overflow-x: auto; margin: 8px 0 24px; }

.grid-table { width: 100%; border-collapse: collapse; font-size: 17px; }

.grid-table th, .grid-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.grid-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.grid-table tbody tr:hover { background: #fafaf7; }

/* The goal is the one column that wants to wrap: it is a sentence, not a number. */
.goal-cell { white-space: normal; min-width: 240px; color: var(--muted); }

.score-cell { font-variant-numeric: tabular-nums; font-weight: 700; }

.input-narrow { width: 110px; padding: 10px 12px; font-size: 17px; }

.input-players { font-family: var(--text); resize: vertical; }

/* The register page puts the game title straight above the player list, and the two need telling
   apart. */
.setup-form .field { margin-top: 24px; }

/* --- a player's own view -------------------------------------------------- */

.own-score {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 24px;
}

.own-figure {
  flex: 1 1 200px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  text-align: center;
}

.own-number {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.own-label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.lede-plain {
  font-size: 19px;
  line-height: 1.55;
  padding: 16px 18px;
  background: var(--tint);
  border: 1px solid #ffd9a8;
  border-radius: var(--radius);
  color: #6d3b00;
  margin: 0 0 24px;
}

/* --- the game catalogue on the front page -------------------------------- */

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

.game-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.game-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  text-decoration: none;
}

.game-name:hover, .game-name:focus-visible { color: var(--orange); }

.game-blurb { margin: 6px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

.game-levels { flex: 0 0 auto; color: var(--muted); font-size: 15px; padding-top: 8px; }

@media (max-width: 780px) {
  .own-number { font-size: 40px; }
  .game-item { flex-direction: column; gap: 6px; }
  .game-levels { padding-top: 0; }
}

/* --- the board ------------------------------------------------------------
   A column per player. Reading down a column tells you where one player stands, reading across a
   row compares everybody on one thing, and the two input rows sit directly under the figures they
   change so there is no doubt which field belongs to whom. */

.board { margin-bottom: 52px; }

.board-table { border-collapse: collapse; font-size: 17px; }

.board-table th, .board-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

/* The row labels down the left, in the same small caps as a section heading. */
.board-row-label {
  text-align: left !important;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  position: sticky;
  left: 0;
  background: var(--bg);
  min-width: 120px;
}

.board-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

.board-player {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  min-width: 130px;
}

.board-player.is-leader { background: var(--tint); }

.board-figure {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}

.board-sub {
  display: block;
  font-family: var(--text);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}

.board-input-row td { background: #fcfcfa; }

.board-input-row .input-narrow { width: 92px; text-align: center; }

/* --- the level list ------------------------------------------------------- */

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

.level-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.level-number {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-item > div { flex: 1 1 auto; }

.level-name { font-weight: 700; }

.level-goal { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* Who is standing on this level right now. Empty for most of them, which is why it is quiet. */
.level-who { flex: 0 0 auto; color: var(--orange); font-size: 15px; padding-top: 8px; }

@media (max-width: 780px) {
  .board-figure { font-size: 24px; }
  .board-player { font-size: 18px; min-width: 110px; }
  .level-item { flex-wrap: wrap; }
}

/* --- the round on deck ----------------------------------------------------
   For a game whose contracts belong to the table rather than to each player, the one thing the
   keeper needs before typing anything is which round this is and how it scores. */

.on-deck {
  border: 1px solid #ffd9a8;
  background: var(--tint);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 24px;
}

.on-deck-label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a05a00;
  font-weight: 700;
}

.on-deck-name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.15;
  margin-top: 4px;
  color: #6d3b00;
}

.on-deck-goal { margin: 8px 0 0; color: #6d3b00; font-size: 17px; line-height: 1.55; }

/* The round the table is on, in the list of rounds. */
.level-item.is-now .level-number { background: var(--orange); color: #fff; }
.level-item.is-now .level-name { color: var(--orange); }

.game-players { display: block; font-size: 14px; }

@media (max-width: 780px) {
  .on-deck-name { font-size: 24px; }
}

/* --- the buttons on the front page ---------------------------------------
   .hero-actions is defined in the sibling apps but was never brought across, so two <form>s stacked
   as blocks with nothing between them. That is the cramped row. */

.hero-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* The shared base gives .hero top padding only, which was fine when the page was a wordmark and one
   button. With sections under it, the note below the buttons ran straight into the next heading. */
.hero { padding-bottom: 76px; }

@media (max-width: 780px) {
  .hero { padding-bottom: 52px; }
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

/* White, as asked. It reads as a silhouette at rest and comes forward on hover, where the button
   itself turns orange and the label goes white too. */
.btn-icon-art {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: #fff;
  /* A hairline of the button's own ink keeps the silhouette from dissolving into the yellow. */
  stroke: rgba(22, 22, 15, 0.28);
  stroke-width: 0.6;
  transition: stroke 120ms ease;
}

.btn-icon:hover .btn-icon-art,
.btn-icon:focus-visible .btn-icon-art { stroke: rgba(22, 22, 15, 0.18); }

/* --- keeping track: the board, with the rules beside it -------------------
   At a table you are looking at the score and at what the round asks for at the same time, so having
   to scroll down to check a contract is the wrong motion. The rules become a column instead. */

.keeping-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}

.keeping-track-main { min-width: 0; }

.rules-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  /* Sticky, so a long history does not scroll the contracts off the screen. */
  position: sticky;
  top: 24px;
}

.rules-panel .section-title { margin-bottom: 12px; }

.rules-panel .level-item { padding: 12px 0; }
.rules-panel .level-item:last-of-type { border-bottom: none; }
.rules-panel .level-number { width: 30px; height: 30px; font-size: 15px; }
.rules-panel .level-goal { font-size: 15px; }
.rules-panel .level-who { font-size: 13px; padding-top: 6px; }

.rules-link { margin: 14px 0 0; font-size: 15px; }
.rules-link a { color: var(--muted); }
.rules-link a:hover, .rules-link a:focus-visible { color: var(--orange); }

/* Below this the column would be too narrow for a contract to read on one or two lines, so the
   rules go back under the board. */
@media (max-width: 1180px) {
  .keeping-track { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rules-panel { position: static; }
}

/* The footer is a single centred row in the shared base, which fitted "Rules, Privacy, Disclaimer"
   on a phone. "Regler, Personvern, Forbehold" is wider, and it pushed the page 8px sideways. It
   wraps now, which is what a row of links should have done in the first place. */
.footer { flex-wrap: wrap; }

@media (max-width: 780px) {
  .footer { row-gap: 4px; }
}
