/* Classic Felt (brand/tokens.json). Gold is the only accent: money, or "act now". */
:root {
  --bg: #0d1210;
  --bar: #17211c;
  --fg: #e9e4d4;
  --dim: #8f998f;
  --line: #3a4840;
  --field: #1a251f;
  --btn: #22302a;
  --gold: #f0bf55;
  --on-gold: #1a1408;
  color-scheme: dark;
}

@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font:
    400 1rem / 1.65 "Martian Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  max-width: 76rem;
  padding: 0 1.25rem;
}

a {
  color: var(--fg);
  text-decoration-color: var(--line);
  text-underline-offset: 0.25em;
}
a:hover {
  text-decoration-color: var(--gold);
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

code,
kbd {
  font: inherit;
}

/* The header mirrors the CLI's top bar: the gold chip, then quiet links. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}
.mark {
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  text-decoration: none;
  white-space: nowrap;
}
.top nav,
.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
}
.top nav a,
.bottom nav a {
  color: var(--dim);
}

.intro {
  padding: clamp(1.25rem, 4vw, 3rem) 0 2rem;
  max-width: 50rem;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.3rem, 6.5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 1.5rem;
}

.lede {
  color: var(--dim);
  font-size: 1.0625rem;
  max-width: 38em;
  margin: 0 0 2.25rem;
}

/* Boxes with their title cut into the top border, like the CLI's panels. */
.box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.25rem;
}
.box-title {
  position: absolute;
  top: -0.85em;
  left: 1rem;
  margin: 0;
  padding: 0 0.6ch;
  background: var(--bg);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
}

/* The one gold panel on the page, as in the game's "Your turn". */
.install {
  border-color: var(--gold);
}
.install .box-title {
  color: var(--gold);
}
.cmd {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
.cmd code {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.35rem 0;
  font-size: clamp(0.8125rem, 2.1vw, 1.0625rem);
  scrollbar-width: thin;
}
.prompt {
  color: var(--dim);
  user-select: none;
}
.cursor {
  flex: none;
  width: 0.6em;
  height: 1.15em;
  background: var(--gold);
  margin-right: auto;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }
}
#copy {
  flex: none;
  margin-left: 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-gold);
  background: var(--gold);
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
#copy:hover {
  filter: brightness(1.08);
}

.note {
  color: var(--dim);
  font-size: 0.875rem;
  margin: 1rem 0 0;
}
.note code {
  color: var(--fg);
}

.screen {
  margin: 1.5rem 0 4rem;
}
.screen img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.screen figcaption {
  color: var(--dim);
  font-size: 0.875rem;
  margin-top: 0.9rem;
  max-width: 60em;
}

/* The keys get the wide column; chips and tables stack beside them at their own height. */
.details {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-areas:
    "keys chips"
    "keys tables";
  align-items: start;
  gap: 2.75rem 1.5rem;
  margin-bottom: 5rem;
}
.details > .keys-box {
  grid-area: keys;
}
@media (max-width: 52rem) {
  .details {
    grid-template-columns: 1fr;
    grid-template-areas: "keys" "chips" "tables";
  }
}
.details p {
  margin: 0;
  color: var(--dim);
}

.keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.25rem;
  margin: 0;
}
.keys dt {
  white-space: nowrap;
}
.keys dd {
  margin: 0;
  color: var(--dim);
}
kbd {
  color: var(--gold);
  font-weight: 700;
}

.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 3rem;
  font-size: 0.875rem;
  color: var(--dim);
}
.bottom p {
  margin: 0;
}

@media (max-width: 34rem) {
  .box {
    padding: 1.4rem 1rem 1.1rem;
  }
  .top nav {
    gap: 0.25rem 1rem;
  }
  /* Show the whole command rather than hiding the end behind a scroll. */
  .cmd {
    align-items: flex-end;
  }
  .cmd code {
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 0;
  }
  #copy {
    margin-left: 0.5rem;
  }
}
