@font-face {
  font-display: swap;
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  src: url("assets/fonts/GeistMono-Latin.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  src: url("assets/fonts/SpaceGrotesk-Latin.woff2") format("woff2");
}

/* Demo stage: the Black Spruce side. Each product inside keeps its own look. */

.demo {
  margin-top: 28px;
}

.demo-fallback {
  margin: 0;
  padding: 28px;
  background: #e8e8e4;
  color: var(--muted);
}

/* The fallback is only for browsers without JavaScript. Otherwise, hold the demo's space until it mounts, so the page doesn't jump. */
@media (scripting: enabled) {
  .demo-fallback {
    display: none;
  }

  .demo-setttle:has(> .demo-fallback) {
    min-height: 540px;
  }

  .demo-countback:has(> .demo-fallback) {
    min-height: 770px;
  }
}

@media (scripting: enabled) and (max-width: 560px) {
  .demo-setttle:has(> .demo-fallback) {
    min-height: 680px;
  }

  .demo-countback:has(> .demo-fallback) {
    min-height: 650px;
  }
}

.demo-stage {
  padding: clamp(14px, 3.4vw, 32px);
  background:
    radial-gradient(circle at 1px 1px, rgb(16 16 16 / 9%) 1px, transparent 0) 0 0 / 14px 14px,
    #e8e8e4;
}

.demo-setttle .demo-stage {
  padding: 38px clamp(12px, 2.4vw, 22px) clamp(12px, 2.4vw, 22px);
}

.demo-countback .demo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: clamp(20px, 4vw, 40px);
}

.demo button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.demo button:disabled {
  cursor: default;
}

/* Setttle, following its own design system */

.st-app {
  --st-canvas: #f6f6f4;
  --st-surface: #ffffff;
  --st-subtle: #fafaf9;
  --st-fill: #f1f1ee;
  --st-border: rgb(24 24 20 / 8%);
  --st-border-strong: rgb(24 24 20 / 14%);
  --st-hover: rgb(24 24 20 / 3.5%);
  --st-fg: #1b1b19;
  --st-fg-2: #5d5d58;
  --st-fg-3: #6b6b65;
  --st-warn: #9a5b00;
  --st-warn-dot: #e09a1a;
  --st-warn-bg: #fcf4e4;
  --st-ok: #24694b;
  --st-ok-dot: #3a9a6c;
  --st-ok-bg: #eaf4ee;
  --st-ease: cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border-radius: 12px;
  background: var(--st-surface);
  box-shadow:
    0 0 0 1px var(--st-border-strong),
    0 24px 64px -16px rgb(24 24 20 / 28%);
  color: var(--st-fg);
  font-family: "Geist Sans", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.st-header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--st-border);
}

.st-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--st-fg-2);
  white-space: nowrap;
}

.st-avatar {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: var(--st-fg);
  color: var(--st-surface);
  font-size: 11px;
  font-weight: 600;
}

.st-rule {
  width: 1px;
  height: 10px;
  background: var(--st-border-strong);
}

.st-title {
  font-size: 14px;
  font-weight: 550;
}

.st-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  margin-left: auto;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--st-surface);
  box-shadow:
    0 0 0 1px var(--st-border-strong),
    0 1px 2px rgb(24 24 20 / 5%);
  font-size: 12px;
  white-space: nowrap;
}

.st-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--st-fill);
  color: var(--st-fg-2);
  font-size: 11px;
  text-align: center;
}

.st-head,
.st-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 96px 96px;
  gap: 4px 16px;
  align-items: center;
  padding: 0 16px;
}

.st-head {
  height: 30px;
  border-bottom: 1px solid var(--st-border-strong);
  background: var(--st-subtle);
  color: var(--st-fg-3);
  font-size: 11.5px;
}

.st-head-amount {
  font-family: "Geist Mono", ui-monospace, monospace;
  text-align: right;
}

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

.st-row {
  min-height: 62px;
  padding-block: 10px;
  border-bottom: 1px solid var(--st-border);
  transition: background-color 200ms var(--st-ease);
}

.st-row:hover {
  background: var(--st-hover);
}

.st-row.is-open {
  background: var(--st-canvas);
}

.st-row.is-working {
  background: linear-gradient(90deg, transparent, var(--st-hover), transparent) 0 0 / 200% 100%;
  animation: st-sweep 900ms linear infinite;
}

.st-row.is-fresh .st-main,
.st-row.is-fresh .st-badge {
  animation: st-in 360ms var(--st-ease);
}

@keyframes st-sweep {
  to {
    background-position: -200% 0;
  }
}

@keyframes st-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.st-date {
  color: var(--st-fg-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.st-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.st-desc {
  max-width: 100%;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.st-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--st-subtle);
  box-shadow: 0 0 0 1px var(--st-border);
  color: var(--st-fg-2);
  font-size: 12px;
  white-space: nowrap;
}

.st-chip.is-warn {
  background: var(--st-warn-bg);
  box-shadow: none;
  color: var(--st-warn);
}

.st-spark {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--st-fg-3);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.st-code,
.st-meta,
.st-amount {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.st-code,
.st-meta {
  color: var(--st-fg-3);
  font-size: 11.5px;
}

.st-result {
  color: var(--st-fg-3);
  font-size: 12px;
}

.st-amount {
  text-align: right;
  white-space: nowrap;
}

.st-amount.is-in {
  color: var(--st-ok);
}

.st-cur {
  margin-right: 6px;
  color: var(--st-fg-3);
  font-size: 11px;
}

.st-row.is-done .st-desc,
.st-row.is-done .st-amount {
  color: var(--st-fg-2);
}

.st-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.st-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.st-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.st-badge.is-draft {
  padding: 0;
  color: var(--st-fg-3);
}

.st-badge.is-draft .st-dot {
  background: none;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.st-badge.is-working {
  background: var(--st-fill);
  color: var(--st-fg-2);
}

.st-badge.is-working .st-dot {
  background: var(--st-fg-3);
}

.st-badge.is-working .st-dot {
  animation: st-pulse 900ms ease-in-out infinite alternate;
}

@keyframes st-pulse {
  to {
    opacity: 0.25;
  }
}

.st-badge.is-warn {
  background: var(--st-warn-bg);
  color: var(--st-warn);
}

.st-badge.is-warn .st-dot {
  background: var(--st-warn-dot);
}

/* Settled, as in Setttle's Badge: a quiet green check and the word, no pill. */
.st-badge.is-ok {
  padding: 0;
  color: var(--st-fg-2);
}

.st-check {
  width: 12px;
  height: 12px;
  flex: none;
  background: var(--st-ok-dot);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.st-secondary {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--st-surface);
  box-shadow:
    0 0 0 1px var(--st-border-strong),
    0 1px 2px rgb(24 24 20 / 5%);
  font-size: 12px !important;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 150ms var(--st-ease);
}

.st-secondary:hover:not(:disabled) {
  background: var(--st-fill);
}

.st-secondary:disabled {
  opacity: 0.45;
}

.st-question {
  grid-column: 2 / -1;
  padding: 6px 0 4px;
}

.st-question p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--st-fg-2);
}

.st-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-options .st-secondary {
  height: 32px;
}

.st-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 60px;
  padding: 12px 16px;
  background: var(--st-subtle);
  transition: background-color 200ms var(--st-ease);
}

.st-foot.is-clear {
  background: var(--st-ok-bg);
}

.st-status {
  margin: 0;
  color: var(--st-fg-2);
}

.st-foot.is-clear .st-status {
  color: var(--st-ok);
  font-weight: 500;
}

.st-primary {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--st-fg);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 14%),
    0 1px 0 rgb(0 0 0 / 30%);
  color: #fff !important;
  font-weight: 500;
  transition: background-color 150ms var(--st-ease);
}

.st-primary:hover:not(:disabled) {
  background: #000;
}

.st-primary:disabled {
  opacity: 0.7;
}

/* Countback, following its own design system */

.cb-scene {
  display: flex;
  align-items: center;
}

.cb-phone {
  position: relative;
  z-index: 1;
  flex: none;
  outline: none;
  --cb-paper: #faf9f6;
  --cb-card: #ffffff;
  --cb-hunter: #044935;
  --cb-sand: #cca57f;
  --cb-charcoal: #192619;
  --cb-muted: oklch(0.36 0.022 150);
  --cb-putty: #cccbbf;
  --cb-border: oklch(0.91 0.005 95);
  --cb-wash: color-mix(in oklab, var(--cb-hunter) 10%, transparent);
  --cb-leather: color-mix(in oklab, var(--cb-sand) 26%, var(--cb-card));
  width: 300px;
  max-width: 100%;
  padding: 9px;
  border-radius: 50px;
  background: #1a1a18;
  box-shadow:
    inset 0 0 0 1.5px #3a3a36,
    0 30px 60px -20px rgb(24 24 20 / 45%);
}

/* iPhone Pro Max screen: 440 x 956 points. */
.cb-screen {
  display: flex;
  aspect-ratio: 440 / 956;
  flex-direction: column;
  overflow: hidden;
  border-radius: 41px;
  background: var(--cb-paper);
  color: var(--cb-charcoal);
  font-family: "Geist Sans", Arial, sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.cb-statusbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 4px 28px 0 32px;
  font-size: 12px;
  font-weight: 600;
}

.cb-island {
  width: 74px;
  height: 22px;
  border-radius: 999px;
  background: #1a1a18;
}

.cb-battery {
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(90deg, currentColor 70%, transparent 0) 1px 1px / calc(100% - 2px) calc(100% - 2px) no-repeat;
}

.cb-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 14px;
}


.cb-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, var(--cb-paper) 0 4px, transparent 4.5px),
    var(--cb-hunter);
}

.cb-league {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.cb-league strong,
.cb-hole-number,
.cb-hole-meta strong,
.cb-stepper strong,
.cb-section strong {
  font-family: "Space Grotesk", "Geist Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cb-league strong {
  font-size: 15px;
  white-space: nowrap;
}

.cb-league span,
.cb-hole-meta span {
  color: var(--cb-muted);
  font-size: 11.5px;
}

.cb-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--cb-leather);
  box-shadow: 0 0 0 2px var(--cb-card);
  color: var(--cb-charcoal);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cb-avatar.is-you {
  background: var(--cb-hunter);
  color: var(--cb-paper);
}

.cb-card-wrap {
  margin: 0 12px;
}

.cb-card {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11.5px;
  text-align: center;
}

.cb-card th,
.cb-card td {
  height: 24px;
  padding: 0;
}

.cb-card th[scope="row"] {
  width: 30px;
  color: var(--cb-muted);
  font-weight: 500;
  text-align: left;
}

.cb-card th[scope="col"] {
  color: var(--cb-muted);
  font-weight: 500;
}

.cb-card th.is-current {
  color: var(--cb-hunter);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--cb-hunter);
}

.cb-par td {
  color: var(--cb-muted);
}

.cb-card tr + tr th,
.cb-card tr + tr td {
  border-top: 1px solid var(--cb-border);
}

.cb-card th:first-child {
  width: 32px;
}

.cb-card th:last-child,
.cb-card td:last-child {
  width: 30px;
  border-left: 1px solid var(--cb-border);
  font-weight: 600;
}

/* Scorecard convention: circle a birdie, box a bogey. */
.cb-score {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-weight: 600;
  line-height: 1;
}

.cb-score.is-new {
  animation: cb-pop 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-score.is-under {
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--cb-hunter);
  color: var(--cb-hunter);
}

.cb-score.is-over {
  box-shadow: 0 0 0 1px var(--cb-muted);
}

@keyframes cb-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

.cb-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 12px 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border);
}

.cb-hole {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cb-hole-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--cb-charcoal);
  color: var(--cb-paper);
  font-size: 16px;
}

.cb-hole-meta {
  display: flex;
  flex-direction: column;
}

.cb-hole-meta strong {
  font-size: 15px;
}

.cb-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 4px;
  border-radius: 10px;
  background: var(--cb-paper);
  box-shadow: inset 0 0 0 1px var(--cb-border);
}

.cb-stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border), 0 1px 2px rgb(25 38 25 / 8%);
  font-size: 20px !important;
  transition: transform 120ms ease;
}

.cb-stepper button:active:not(:disabled) {
  transform: scale(0.94);
}

.cb-stepper button:disabled {
  opacity: 0.4;
}

.cb-stepper output {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.cb-stepper strong {
  font-size: 26px;
}

.cb-stepper output span {
  color: var(--cb-muted);
  font-size: 11px;
}

.cb-stepper output span.is-under {
  color: var(--cb-hunter);
  font-weight: 600;
}

.cb-primary {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--cb-hunter);
  color: var(--cb-paper) !important;
  font-weight: 600;
  transition: background-color 150ms ease, transform 120ms ease;
}

.cb-primary:hover {
  background: color-mix(in oklab, var(--cb-hunter) 80%, black);
}

.cb-primary:active {
  transform: translateY(1px);
}

.cb-status {
  margin: 10px 16px 12px;
  color: var(--cb-muted);
  font-size: 12px;
}

.cb-entry .cb-primary {
  grid-column: 1 / -1;
}

.cb-final {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 14px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--cb-sand) 22%, var(--cb-card));
}

.cb-final.is-new {
  animation: cb-pop 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-final strong {
  font-family: "Space Grotesk", "Geist Sans", sans-serif;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cb-final-label,
.cb-final-rel {
  color: var(--cb-muted);
  font-size: 12px;
}

.cb-final-label {
  margin-bottom: 6px;
  font-weight: 500;
}

.cb-board {
  --cb-paper: #faf9f6;
  --cb-card: #ffffff;
  --cb-hunter: #044935;
  --cb-sand: #cca57f;
  --cb-charcoal: #192619;
  --cb-muted: oklch(0.36 0.022 150);
  --cb-border: oklch(0.91 0.005 95);
  --cb-leather: color-mix(in oklab, var(--cb-sand) 26%, var(--cb-card));
  width: 276px;
  flex: none;
  margin-left: -20px;
  padding: 12px 8px 8px 28px;
  border-radius: 16px;
  background: var(--cb-paper);
  box-shadow:
    0 0 0 1px var(--cb-border),
    0 24px 48px -20px rgb(24 24 20 / 30%);
  color: var(--cb-charcoal);
  font-family: "Geist Sans", Arial, sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cb-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 8px;
}

.cb-section strong {
  font-size: 14px;
}

.cb-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cb-leather);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, oklch(0.624 0.071 66) 35%, transparent);
  font-size: 10.5px;
  font-weight: 500;
}

.cb-standings {
  position: relative;
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border);
  list-style: none;
}

.cb-standings li {
  display: grid;
  grid-template-columns: 24px 24px 1fr auto 26px;
  gap: 8px;
  align-items: center;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--cb-card);
}

.cb-standings li.is-you {
  position: relative;
  z-index: 1;
  background: color-mix(in oklab, var(--cb-hunter) 10%, var(--cb-card));
  color: var(--cb-hunter);
  font-weight: 600;
}

.cb-pos,
.cb-thru {
  color: var(--cb-muted);
  font-size: 11.5px;
}

.cb-standings li.is-you .cb-pos,
.cb-standings li.is-you .cb-thru {
  color: inherit;
}

.cb-rel {
  font-weight: 600;
  text-align: right;
}

.cb-name,
.cb-thru {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-group-wrap {
  margin: 0 12px;
}

.cb-group-title {
  margin: 0 4px 6px;
  color: var(--cb-muted);
  font-size: 11.5px;
  font-weight: 500;
}

.cb-group {
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border);
  list-style: none;
}

.cb-group li {
  display: grid;
  grid-template-columns: 24px 1fr auto 26px;
  gap: 8px;
  align-items: center;
  height: 32px;
  padding: 0 8px;
}

.cb-group li + li {
  box-shadow: 0 -1px 0 var(--cb-border);
}

.cb-group .cb-thru {
  color: var(--cb-muted);
  font-size: 11.5px;
}

.cb-group li.is-you {
  color: var(--cb-hunter);
  font-weight: 600;
}

.cb-tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: auto;
  padding: 8px 8px 4px;
  border-top: 1px solid var(--cb-border);
  background: var(--cb-card);
  color: var(--cb-muted);
  font-size: 9.5px;
  font-weight: 500;
}

.cb-tabbar > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cb-tabbar .is-active {
  color: var(--cb-hunter);
  font-weight: 600;
}

.cb-tab-icon {
  width: 18px;
  height: 18px;
  border: 1.75px solid currentColor;
  border-radius: 6px;
}

.cb-tabbar > span:nth-child(2) .cb-tab-icon {
  border-radius: 3px;
  box-shadow: inset 0 3px 0 currentColor;
}

.cb-tabbar > span:nth-child(3) .cb-tab-icon {
  border: 0;
  border-radius: 0;
  background: linear-gradient(currentColor, currentColor) 1px 100% / 4px 9px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 100% / 4px 16px no-repeat,
    linear-gradient(currentColor, currentColor) 13px 100% / 4px 12px no-repeat;
}

.cb-tabbar > span:nth-child(4) .cb-tab-icon {
  border-radius: 50%;
}

.cb-tabbar .is-active .cb-tab-icon {
  background: currentColor;
  box-shadow: inset 0 0 0 4px var(--cb-card);
}

.cb-home {
  display: block;
  width: 108px;
  height: 4px;
  flex: none;
  margin: 6px auto 8px;
  border-radius: 999px;
  background: var(--cb-charcoal);
}

@media (max-width: 560px) {
  /* Visitors are already on a phone, so drop the device frame and keep it compact. */
  .demo-countback .demo-stage {
    padding: 12px;
  }

  .cb-scene {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .cb-phone {
    width: auto;
    padding: 0;
    border-radius: 16px;
    background: none;
    box-shadow:
      0 0 0 1px oklch(0.91 0.005 95),
      0 16px 32px -18px rgb(24 24 20 / 30%);
  }

  .cb-screen {
    aspect-ratio: auto;
    border-radius: 16px;
  }

  .cb-tabbar,
  .cb-home,
  .cb-group-wrap {
    display: none;
  }

  .cb-statusbar {
    display: none;
  }

  .cb-top {
    padding: 14px 12px 8px;
  }

  .cb-entry {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
  }

  .cb-stepper {
    grid-template-columns: 40px 64px 40px;
  }

  .cb-stepper button {
    width: 40px;
    height: 40px;
  }

  .cb-status {
    margin: 10px 12px 12px;
  }

  .cb-board {
    width: auto;
    margin: 0;
    padding: 12px 8px 8px;
    box-shadow:
      0 0 0 1px var(--cb-border),
      0 16px 32px -18px rgb(24 24 20 / 30%);
  }

  .cb-standings li {
    height: 32px;
  }

  .st-header .st-switcher {
    display: none;
  }

  .st-header .st-rule {
    display: none;
  }

  .st-head {
    display: none;
  }

  .st-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .st-date {
    display: none;
  }

  .st-amount {
    align-self: start;
  }

  .st-state {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .st-question {
    grid-column: 1 / -1;
  }

}


/* Stage furniture */

/* On /work the whole page is the canvas, so the stage drops its own plate. */
.page-work .demo-stage {
  background: none;
  padding-inline: 0;
}

.demo-stage {
  position: relative;
}

.demo-try {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 5px 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
}

.demo-try.is-gone {
  opacity: 0;
  transform: translateY(-4px);
}

.demo-tabs {
  display: flex;
  width: fit-content;
  margin: 0 auto clamp(16px, 3vw, 28px);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.demo-tabs button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  background: none;
  font-size: 0.8rem !important;
  font-weight: 500;
}

.demo-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper) !important;
}

/* Setttle: totals, reasons and journal entries */

.st-totals {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--st-border);
}

.st-totals > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-total-label {
  color: var(--st-fg-3);
  font-size: 12px;
}

.st-figure {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.st-total-cur {
  margin-left: auto;
  color: var(--st-fg-3);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
}

.st-ghost {
  height: 22px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--st-fg-2) !important;
  font-size: 12px !important;
  text-decoration: underline;
  text-decoration-color: var(--st-border-strong);
  text-underline-offset: 3px;
}

.st-ghost:hover {
  background: var(--st-fill);
}

.st-entry {
  grid-column: 2 / -1;
  padding: 4px 0 2px;
  animation: st-in 260ms var(--st-ease);
}

.st-why {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--st-fg-2);
}

.st-journal {
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  border-collapse: collapse;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--st-border);
  font-size: 12px;
}

.st-journal th {
  height: 26px;
  padding: 0 10px;
  border-bottom: 1px solid var(--st-border-strong);
  background: var(--st-subtle);
  color: var(--st-fg-3);
  font-size: 11.5px;
  font-weight: 400;
  text-align: left;
}

.st-journal td {
  height: 28px;
  padding: 0 10px;
  border-bottom: 1px solid var(--st-border);
}

.st-journal tr:last-child td {
  border-bottom: 0;
}

.st-journal th + th,
.st-journal td + td {
  width: 84px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.st-journal .st-code {
  margin-right: 6px;
}

.st-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--st-surface);
  box-shadow:
    0 0 0 1px var(--st-border-strong),
    0 1px 2px rgb(24 24 20 / 5%);
  text-align: left;
  transition: background-color 150ms var(--st-ease);
}

.st-option:hover {
  background: var(--st-fill);
}

.st-option.is-likely {
  box-shadow:
    0 0 0 1.5px var(--st-fg),
    0 1px 2px rgb(24 24 20 / 5%);
}

.st-option-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
}

.st-option-detail {
  color: var(--st-fg-3);
  font-size: 12px;
}

.st-likely {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--st-fg);
  color: var(--st-surface);
  font-size: 10.5px;
  font-weight: 500;
}

/* Countback: the course staff desk */

.cb-scene[data-view="staff"] {
  display: block;
  align-self: stretch;
}

.cb-desk {
  --cb-paper: #faf9f6;
  --cb-card: #ffffff;
  --cb-hunter: #044935;
  --cb-sand: #cca57f;
  --cb-charcoal: #192619;
  --cb-muted: oklch(0.36 0.022 150);
  --cb-border: oklch(0.91 0.005 95);
  --cb-leather: color-mix(in oklab, var(--cb-sand) 26%, var(--cb-card));
  overflow: hidden;
  border-radius: 14px;
  background: var(--cb-paper);
  box-shadow:
    0 0 0 1px var(--cb-border),
    0 24px 64px -20px rgb(24 24 20 / 32%);
  color: var(--cb-charcoal);
  font-family: "Geist Sans", Arial, sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cb-desk-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--cb-border);
  background: var(--cb-card);
}

.cb-desk-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  padding: 16px;
}

.cb-desk-side .cb-board {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.cb-queue {
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border);
  list-style: none;
}

.cb-queue li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 8px;
}

.cb-queue li + li {
  box-shadow: 0 -1px 0 var(--cb-border);
}

.cb-queue li.is-flagged {
  background: var(--cb-leather);
  box-shadow: none;
}

.cb-queue li.is-flagged + li {
  box-shadow: none;
}

.cb-queue li.is-out {
  color: var(--cb-muted);
}

.cb-q-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.cb-q-name {
  font-weight: 600;
}

.cb-q-note {
  color: var(--cb-muted);
  font-size: 12px;
}

.cb-q-total {
  font-family: "Space Grotesk", "Geist Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.cb-q-actions {
  display: flex;
  grid-column: 2 / -1;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
}

.cb-secondary {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--cb-card);
  box-shadow: 0 0 0 1px var(--cb-border), 0 1px 2px rgb(25 38 25 / 8%);
  font-size: 12px !important;
  font-weight: 500;
}

.cb-secondary:hover {
  background: var(--cb-paper);
}

.cb-secondary.is-strong {
  background: var(--cb-hunter);
  box-shadow: none;
  color: var(--cb-paper) !important;
}

.cb-secondary.is-strong:hover {
  background: color-mix(in oklab, var(--cb-hunter) 80%, black);
}

.cb-desk-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
}

.cb-staff-note {
  margin: 0;
  color: var(--cb-muted);
  font-size: 12px;
}

.cb-desk-foot .cb-primary {
  padding: 0 18px;
}

.cb-desk-foot .cb-primary:disabled {
  background: var(--cb-putty, #cccbbf);
  color: var(--cb-muted) !important;
  cursor: default;
}

.cb-chip.is-final {
  background: var(--cb-hunter);
  box-shadow: none;
  color: var(--cb-paper);
}

@media (max-width: 720px) {
  .cb-desk-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .st-totals {
    gap: 20px;
  }

  .st-figure {
    font-size: 17px;
  }

  .st-total-cur {
    display: none;
  }

  .st-entry {
    grid-column: 1 / -1;
  }

  .demo-try {
    font-size: 0.65rem;
  }

  .cb-desk-body {
    padding: 12px;
  }
}

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