@font-face {
  font-family: Outfit;
  src: url("./fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("./fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("./fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #090a0e;
  --text: #f3efe6;
  --muted: #d2c8b6;
  --quiet: #b3a894;
  --line: #313642;
  --gold: #f5b942;
  --gold-ink: #1c160c;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-sans: Outfit, "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --color-gray-200: #f3efe6;
  --color-gray-300: #e6dccb;
  --color-gray-400: #d2c8b6;
  --color-gray-500: #b3a894;
  --color-gray-600: #3a404c;
  --color-gray-700: #2a303c;
  --color-gray-800: #171b24;
  --color-gray-900: #10131a;
  --color-gray-950: #090a0e;
  --color-indigo-300: #f3efe6;
  --color-indigo-400: #f5b942;
  --color-indigo-500: #e2a42d;
  --color-indigo-600: #c98a1e;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--text);
  background:
    radial-gradient(80rem 28rem at 50% -18rem, rgba(245, 185, 66, 0.14), transparent 70%),
    var(--ink);
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}

* {
  scrollbar-width: thin;
  scrollbar-color: #3a404c transparent;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 40;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem 1.15rem 1.5rem;
  color: var(--text);
}

.app-frame {
  width: min(100%, 68rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mast {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  margin: 0;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.12rem;
}

.mast-note {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.stage {
  margin-top: 0.35rem;
}

.stage:focus {
  outline: none;
}

.arrival {
  width: 100%;
  padding: 2.6rem 0 0.5rem;
  text-align: left;
}

.arrival h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

.lede {
  margin: 0.8rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.drop {
  display: block;
  margin-top: 1.7rem;
  padding: 2.15rem 1.2rem 1.9rem;
  text-align: center;
  border: 1.5px solid #3a404c;
  border-radius: 16px;
  background: #12151c;
  cursor: pointer;
  box-shadow: 0 18px 36px -26px rgba(0, 0, 0, 0.9);
  transition:
    border-color 180ms var(--ease),
    background-color 180ms var(--ease),
    box-shadow 220ms var(--ease);
}

.drop:hover,
.drop.is-hot {
  border-color: #a07828;
  background: #171b24;
  box-shadow:
    0 18px 34px -22px rgba(0, 0, 0, 0.85),
    0 14px 28px -18px rgba(245, 185, 66, 0.45);
}

.drop:focus-within {
  outline: 2px solid var(--gold) !important;
  outline-offset: 3px;
}

.sr-only:focus {
  outline: none !important;
}

.drop-icon {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  margin-inline: auto;
  color: var(--muted);
  transition: color 180ms var(--ease);
}

.drop:hover .drop-icon,
.drop.is-hot .drop-icon {
  color: var(--gold);
}

.drop-title {
  display: block;
  margin-top: 0.8rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.drop-hint {
  display: block;
  margin-top: 0.28rem;
  color: var(--quiet);
  font-size: 0.875rem;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.95rem;
  margin-top: 1.15rem;
}

.sample-note {
  margin: 0;
  color: var(--quiet);
  font-size: 0.875rem;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.fact {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-name {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.fact-body {
  margin: 0.28rem 0 0;
  color: var(--quiet);
  font-size: 0.875rem;
  line-height: 1.45;
}

.alert {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #6a3034;
  border-radius: 10px;
  background: #2a1618;
  color: #ffd0cc;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
}

.work {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: 4.25rem 1rem 3rem;
  text-align: center;
}

.stage:has(.work) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46vh;
}

.work svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--gold);
}

.work-title {
  margin: 0;
  max-width: 34rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.work-note {
  margin: 0;
  max-width: 28rem;
  color: var(--quiet);
  font-size: 0.875rem;
  line-height: 1.45;
}

.meter {
  width: min(100%, 16rem);
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #2a303c;
}

.meter-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 280ms var(--ease);
}

.meter-fill.is-indet {
  width: 100%;
  opacity: 0.4;
  animation: meter 1.1s var(--ease) infinite;
}

@keyframes meter {
  50% { opacity: 1; }
}

.colophon {
  margin-top: 2.5rem;
  padding: 0 0 0.4rem;
  color: var(--quiet);
  font-size: 0.875rem;
  text-align: center;
}

.colophon p {
  margin: 0;
}

.colophon a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  margin-top: 0.15rem;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.colophon a:hover {
  color: var(--text);
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.btn-primary {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-primary:hover {
  background: #ffd078;
}

.btn-primary:active {
  background: #e2a42d;
}

.btn-quiet {
  margin-top: 1rem;
  background: transparent;
  color: var(--text);
  border-color: #4a5160;
}

.btn-quiet:hover {
  background: #171b24;
  border-color: #8d8070;
}

.actions .btn-quiet {
  margin-top: 0;
}

.btn:disabled,
.btn[aria-busy="true"] {
  background: #1a1e26;
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.action-slot {
  width: 100%;
}

.action-slot .btn {
  width: 100%;
}

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 1.35rem 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.tabs-wrap,
.subtabs-wrap {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.tabs {
  display: flex;
  gap: 1.15rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab,
.tab-sub {
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--quiet);
}

.tab {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0.8rem 0.05rem 0.7rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
}

.tab.is-on {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.subtabs-wrap {
  padding-top: 0.8rem;
  padding-bottom: 0.15rem;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tab-sub {
  min-height: 40px;
  padding: 0.35rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.tab-sub:hover {
  color: var(--text);
  border-color: var(--line);
}

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

.stage h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stage h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stage h4 {
  margin-bottom: 0.45rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.stage select {
  min-height: 44px;
  background-color: #171b24;
  color: var(--text);
  border-color: var(--line);
  border-radius: 10px;
}

.stage input[type="range"] {
  height: 1.35rem;
  accent-color: var(--gold);
}

.stage input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--gold);
}

.reel {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.65rem 0 0.75rem;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.strip {
  display: flex;
  width: 100%;
  height: 4.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #000;
  cursor: pointer;
  transition: border-color 160ms var(--ease);
}

.strip:hover {
  border-color: var(--gold);
}

.shot {
  flex: 0 0 auto;
  width: 16rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #141820;
  box-shadow: 0 14px 28px -20px rgba(0, 0, 0, 0.9);
}

.shot-wide {
  width: 20rem;
}

.empty-note {
  margin: 0.5rem 1.5rem 2rem;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
}

.empty-note p {
  margin: 0;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 40rem) {
  .app {
    padding: 1.75rem 2rem 1.75rem;
  }

  .results-bar,
  .tabs-wrap,
  .subtabs-wrap {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .action-slot,
  .action-slot .btn {
    width: auto;
  }

  .empty-note {
    margin-left: 2.5rem;
    margin-right: 2.5rem;
  }
}

@media (min-width: 50rem) {
  .mast {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .mast-note {
    max-width: 22rem;
    text-align: right;
  }

  .arrival {
    padding-top: 3.15rem;
  }

  .arrival h1 {
    font-size: 3rem;
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
  }

  .fact {
    padding: 1.05rem 1.2rem 0 0;
    border-bottom: 0;
  }

  .fact + .fact {
    padding-left: 1.2rem;
    box-shadow: inset 1px 0 0 var(--line);
  }
}

@media (max-width: 40rem) {
  .tabs {
    flex-direction: column;
    gap: 0;
    overflow: visible;
  }

  .tab {
    white-space: normal;
    text-align: left;
    min-height: 44px;
    padding: 0.7rem 0.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .meter-fill.is-indet {
    animation: none;
    width: 100%;
    opacity: 0.7;
  }
}
