:root {
  --bg: #d4d8cc;
  --bg-deep: #c5cbb8;
  --cabinet: #353d32;
  --cabinet-2: #2a3128;
  --cabinet-3: #414a3c;
  --metal: #c9d0c0;
  --card: #eef1e6;
  --card-line: rgba(53, 61, 50, 0.1);
  --ink: #1c2119;
  --muted: #5a6354;
  --tab: #a3443a;
  --tab-ink: #f6f1ea;
  --accent: #a3443a;
  --border: rgba(28, 33, 25, 0.16);
  --shell: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.25rem);
  --font: "Bricolage Grotesque", "Onest", "Segoe UI", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --ease: 280ms cubic-bezier(0.22, 0.8, 0.32, 1);
  --ease-out: 640ms cubic-bezier(0.16, 1, 0.3, 1);
  --mast: 3.6rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(212, 216, 204, 0.93) 0%, rgba(212, 216, 204, 0.88) 48%, rgba(197, 203, 184, 0.92) 100%),
    url("assets/bay.svg");
  background-size: auto, 210px 250px;
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 0 var(--mast);
  overflow-x: clip;
}

img,
svg {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.8rem;
  background: var(--cabinet);
  color: var(--card);
}

.skip:focus {
  top: 0.75rem;
}

.shell {
  width: min(100% - var(--pad) * 2, var(--shell));
  margin-inline: auto;
}

.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cabinet);
  color: var(--metal);
}

.mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 2.1rem;
  min-height: var(--mast);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1.12rem;
  line-height: 1;
  transition: opacity var(--ease);
}

.brand-word {
  padding: 0.08em 0.04em 0.06em 0;
}

.brand:hover {
  opacity: 0.88;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
}

.mast-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.5rem);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding-left: 2.1rem;
  border-left: 1px solid rgba(201, 208, 192, 0.28);
}

.mast-nav a {
  position: relative;
  text-decoration: none;
  color: var(--metal);
  padding: 0.4rem 0;
  transition: color var(--ease);
}

.mast-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.18rem;
  height: 1px;
  background: var(--tab);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.mast-nav a:hover {
  color: #fff;
}

.mast-nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  padding: 2.8rem 0 1.4rem;
  isolation: isolate;
}

.hero-bay {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 4.6rem));
  justify-content: center;
  gap: 0.35rem;
  margin: 0 auto 1.35rem;
  width: min(100% - var(--pad) * 2, 26rem);
  pointer-events: none;
}

.cell {
  aspect-ratio: 4 / 5;
  background: linear-gradient(180deg, #414a3c, var(--cabinet-2));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 10px 18px rgba(28, 33, 25, 0.16);
  position: relative;
}

.cell::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 12%;
  height: 28%;
  background:
    radial-gradient(circle at 11% 50%, var(--cabinet) 1.15px, transparent 1.25px),
    radial-gradient(circle at 89% 50%, var(--cabinet) 1.15px, transparent 1.25px),
    var(--card);
}

.cell::after {
  content: "";
  position: absolute;
  left: 42%;
  width: 16%;
  height: 5%;
  bottom: 22%;
  background: #1c2119;
}

.cell.is-this {
  background: linear-gradient(180deg, #4a5446, #2a3128);
}

.cell.is-this::before {
  background:
    radial-gradient(circle at 11% 50%, var(--cabinet) 1.15px, transparent 1.25px),
    radial-gradient(circle at 89% 50%, var(--cabinet) 1.15px, transparent 1.25px),
    #e7ebdc;
}

.cell-tag {
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  z-index: 1;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--tab);
  text-align: center;
}

.oration {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7.4vw, 5.2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.02;
  overflow: visible;
}

.lede {
  margin: 0.95rem 0 0;
  font-size: clamp(1.28rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.deck {
  margin: 0.9rem auto 0;
  max-width: 36ch;
  color: var(--muted);
}

.well {
  padding: 0 0 4.5rem;
  scroll-margin-top: calc(var(--mast) + 0.8rem);
}

.cabinet-box {
  background: var(--cabinet);
  padding: 0.75rem 0.9rem 1.1rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 22px 50px rgba(28, 33, 25, 0.2);
}

.cabinet-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  color: var(--metal);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem 0.7rem;
}

#stamp {
  min-width: 7ch;
  text-align: right;
}

#stamp.is-hot {
  color: #f0c9c4;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.28rem;
  padding: 0 0.85rem;
  position: relative;
  z-index: 2;
  margin-bottom: -1px;
}

.tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-height: 2.45rem;
  padding: 0.42rem 1.05rem 0.62rem;
  background: #b7bfad;
  color: var(--ink);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
}

.tab.is-on {
  background: var(--tab);
  color: var(--tab-ink);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  min-height: 20rem;
  padding: 1.5rem 1.4rem 1.3rem;
  cursor: pointer;
  outline: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 16px 28px rgba(0, 0, 0, 0.18);
}

.card.is-over {
  background-color: #f4f6ee;
}

.card.is-loaded {
  cursor: default;
}

#preview {
  width: 100%;
  height: 18rem;
  object-fit: contain;
  background: #e2e6d8;
  position: relative;
  z-index: 1;
}

.drop-copy {
  position: relative;
  z-index: 1;
  padding: 5.2rem 1.4rem 2.4rem;
  text-align: center;
}

.drop-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0;
}

.drop-hint {
  margin: 0.55rem auto 0;
  color: var(--muted);
  max-width: 36ch;
}

.lip {
  padding: 0.95rem 0.55rem 0.15rem;
  color: var(--metal);
  text-align: center;
}

.status {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  min-height: 1.3em;
  text-align: center;
}

.press {
  margin: 0.75rem auto 0;
  max-width: 18rem;
}

.press label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
}

.press input[type="range"] {
  width: 100%;
  accent-color: var(--tab);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.15rem;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  background: var(--tab);
  color: var(--tab-ink);
}

.btn:hover {
  background: #8f3b33;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #6a403c;
}

.btn-ghost {
  background: transparent;
  color: var(--metal);
  box-shadow: inset 0 0 0 1px rgba(201, 208, 192, 0.45);
}

.btn-ghost:hover {
  background: rgba(201, 208, 192, 0.08);
  box-shadow: inset 0 0 0 1px rgba(201, 208, 192, 0.7);
}

.btn-save {
  margin-top: 0.35rem;
}

.result {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(201, 208, 192, 0.2);
  text-align: center;
}

.result p {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.held,
.ask {
  padding: 0 0 4.8rem;
  scroll-margin-top: calc(var(--mast) + 0.8rem);
}

.held h2,
.ask h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0;
  font-weight: 800;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ticker {
  overflow: hidden;
  background: var(--cabinet);
  color: var(--card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.05rem 2.5rem;
  white-space: nowrap;
  font-size: 1.06rem;
  border-right: 1px solid rgba(201, 208, 192, 0.16);
}

.ticker-item b {
  font-family: var(--mono);
  font-weight: 600;
  color: #f0c9c4;
}

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

.ticker-fallback li {
  margin: 0 0 0.7rem;
  max-width: 52ch;
}

.ledger-wrap {
  overflow-x: auto;
}

.ledger {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--cabinet);
}

.ledger col.ledger-q {
  width: 36%;
}

.ledger thead th {
  background: var(--cabinet);
  color: var(--metal);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.7rem 0.95rem;
  border-right: 1px solid rgba(201, 208, 192, 0.18);
}

.ledger thead th:last-child {
  border-right: 0;
}

.ledger tbody th,
.ledger tbody td {
  vertical-align: middle;
  padding: 0.9rem 0.95rem;
  border-right: 1px solid rgba(53, 61, 50, 0.12);
  border-bottom: 1px solid rgba(53, 61, 50, 0.12);
  text-align: center;
}

.ledger tbody th {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ledger tbody td:last-child {
  border-right: 0;
  color: var(--muted);
}

.ledger tbody tr:last-child th,
.ledger tbody tr:last-child td {
  border-bottom: 0;
}

.colophon {
  background: var(--cabinet);
  color: var(--metal);
  padding: 2rem 0 2.4rem;
}

.colophon-inner {
  text-align: center;
}

.colophon-inner p,
.colophon-legal {
  margin: 0 auto 0.45rem;
}

.colophon-legal,
.colophon-links {
  font-size: 0.92rem;
}

.colophon-legal {
  font-style: normal;
  max-width: 42rem;
  line-height: 1.55;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1.2rem;
}

.colophon a {
  color: var(--card);
  text-decoration: none;
  transition: color var(--ease);
}

.colophon a:hover {
  color: #fff;
}

.colophon a:focus-visible {
  outline-color: var(--metal);
}

.cookie {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem var(--pad);
  background: var(--card);
  border-top: 1px solid var(--border);
}

.cookie p {
  margin: 0;
  max-width: 52ch;
}

.cookie .btn-ghost {
  background: var(--cabinet);
  color: var(--card);
  box-shadow: none;
}

.cookie .btn-ghost:hover {
  background: var(--cabinet-2);
}

.legal-page {
  padding: 3rem 0 4.5rem;
  text-align: center;
}

.legal-page h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0;
}

.legal-page p {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

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

.mast a:focus-visible {
  outline-color: var(--metal);
}

@media (max-width: 860px) {
  .hero {
    padding-top: 2.1rem;
  }

  .hero-bay {
    grid-template-columns: repeat(3, minmax(0, 4.2rem));
  }

  .hero-bay .cell:first-child,
  .hero-bay .cell:last-child {
    display: none;
  }

  .drop-copy {
    padding: 3.6rem 1.1rem 1.6rem;
  }

  .card {
    min-height: 16rem;
  }

  #preview {
    height: 14rem;
  }

  .actions .btn,
  .btn-save {
    width: 100%;
  }

  .ledger {
    font-size: 0.92rem;
  }

  .ledger col.ledger-q {
    width: 40%;
  }

  .ledger thead th,
  .ledger tbody th,
  .ledger tbody td {
    padding: 0.7rem 0.7rem;
  }
}

@media (max-width: 520px) {
  .mast-inner {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0 0.65rem;
  }

  .mast-nav {
    padding-left: 0;
    border-left: 0;
    font-size: 0.7rem;
    gap: 0.9rem;
  }

  .hero h1 {
    font-size: 2.7rem;
  }

  .hero-bay {
    gap: 0.28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ticker {
    display: none;
  }

  .ticker-fallback.sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}
