:root {
  --ink: #2a1a10;
  --muted: #7a624c;
  --cream: #fff8ec;
  --paper: #fffdf8;
  --wood: #3d2414;
  --sky: #9ed8f4;
  --grass: #7dcc55;
  --dirt: #e4b15c;
  --overall: #2f4f96;
  --straw: #f6e2a8;
  --good: #e5f6d4;
  --hold: #fff1cc;
  --shut: #f3ece4;
  --term: #1a120c;
  --acid: #dff56a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f3e4c8;
  color: var(--ink);
  font-family: Nunito, "Trebuchet MS", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: var(--overall); }
button, .socials a {
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: var(--straw);
  border: 3px solid var(--wood);
  box-shadow: 3px 3px 0 var(--wood);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .socials a:hover { transform: translate(-1px, -1px); }
button:focus-visible, a:focus-visible, .gate:focus-visible {
  outline: 3px solid var(--overall);
  outline-offset: 2px;
}
::selection { background: #f0a0a4; color: var(--ink); }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 248, 236, 0.94);
  border-bottom: 3px solid var(--wood);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: Silkscreen, monospace;
  font-size: 15px;
  line-height: 1;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--wood);
  animation: mark-bob 0.7s steps(2, end) infinite;
}
.brand .exe { color: var(--overall); }
nav { display: flex; gap: 0.9rem; }
nav a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}
nav a:hover { color: var(--ink); }
.bar-meta {
  margin: 0 0 0 auto;
  display: flex;
  gap: 0.7rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
}
#chrome-sol { color: var(--overall); font-weight: 500; }
#pen-state {
  padding: 0.1rem 0.4rem;
  background: var(--shut);
  border: 2px solid var(--wood);
}
#pen-state.live { background: var(--good); }

.pasture {
  background:
    linear-gradient(180deg, #c5ebf8 0%, #8ecff0 34%, #8ed45f 68%, #e6b86a 100%);
  border-bottom: 3px solid var(--wood);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: end;
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 1.35rem;
}
.hero > * { min-width: 0; }
.hero-art {
  margin: 0;
  border: 3px solid var(--wood);
  box-shadow: 6px 6px 0 var(--wood);
  background: var(--grass);
  overflow: hidden;
}
.hero-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  image-rendering: pixelated;
  transform-origin: 50% 70%;
  animation: hero-walk 1.6s steps(4, end) infinite;
}
.field-run {
  overflow: hidden;
  height: 168px;
  background: #87c4ea;
  border-bottom: 3px solid var(--wood);
}
.field-track {
  display: flex;
  width: max-content;
  animation: field-run 18s steps(90, end) infinite linear;
}
.field-track img {
  height: 168px;
  width: auto;
  max-width: none;
  display: block;
  image-rendering: pixelated;
}
@keyframes mark-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes hero-walk {
  0% { transform: translate3d(0, 0, 0) scale(1.06); }
  25% { transform: translate3d(-8px, -6px, 0) scale(1.06); }
  50% { transform: translate3d(-2px, 0, 0) scale(1.06); }
  75% { transform: translate3d(8px, -6px, 0) scale(1.06); }
  100% { transform: translate3d(0, 0, 0) scale(1.06); }
}
@keyframes field-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.hero-card {
  background: var(--cream);
  border: 3px solid var(--wood);
  box-shadow: 6px 6px 0 var(--wood);
  padding: 1.1rem 1.15rem 1rem;
  max-width: 100%;
  overflow: hidden;
}
.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--overall);
}
h1 {
  margin: 0.25rem 0 0;
  font-family: Silkscreen, monospace;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.lede {
  margin: 0.7rem 0 0;
  max-width: 38rem;
  font-size: 1.12rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sty {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.sty div {
  background: var(--paper);
  border: 3px solid var(--wood);
  padding: 0.45rem 0.55rem 0.5rem;
  min-width: 0;
}
.sty span, .sty small {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sty strong {
  display: block;
  margin: 0.15rem 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.panel {
  width: min(1120px, calc(100vw - 2rem));
  margin: 1.25rem auto 0;
  background: var(--cream);
  border: 3px solid var(--wood);
  box-shadow: 4px 4px 0 var(--wood);
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 3px solid var(--wood);
  background: #f8edd6;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.titlebar span:first-child { color: var(--ink); font-weight: 500; }
.titlebar span:last-child { margin-left: auto; text-transform: none; letter-spacing: 0; }

.gates {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.85rem;
}
.gate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.5rem 0.45rem 0.55rem;
  text-align: left;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--wood);
  box-shadow: none;
  cursor: pointer;
}
.gate strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.1;
}
.gate-k, .gate-sub {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.gate.open { background: var(--good); }
.gate.hold { background: var(--hold); }
.gate.shut { background: var(--shut); }
.gate.rule { background: #e7f1fb; }
.gate[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--overall); }
.gate-detail {
  margin: 0 0.7rem 0.7rem;
  padding: 0.75rem 0.85rem;
  background: var(--paper);
  border: 3px solid var(--wood);
}
.gate-detail p { margin: 0; }
.gate-detail strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 1.25rem;
  width: min(1120px, calc(100vw - 2rem));
  margin: 1.25rem auto 0;
  align-items: stretch;
}
.split .panel { width: auto; margin: 0; }
#pick {
  display: flex;
  flex-direction: column;
}
#filing-card { flex: 1; }
.pick { align-content: start; }

.pick {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.9rem;
}
.pick > div { min-width: 0; }
.pick img {
  width: 148px;
  height: 148px;
  object-fit: cover;
  border: 3px solid var(--wood);
}
.pick h2 {
  margin: 0;
  font-family: Silkscreen, monospace;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
}
.mint {
  margin: 0.45rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}
.pick .links { margin: 0.45rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.kicker, .symbol, .queued {
  margin: 0.35rem 0 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--overall);
}
.desc { margin: 0.45rem 0 0; font-weight: 700; }
.why {
  margin: 0.4rem 0 0;
  color: #4d3828;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty { padding: 1.2rem 0.9rem; }
.empty h2 {
  margin: 0;
  font-family: Silkscreen, monospace;
  font-size: 1.3rem;
  font-weight: 400;
}

.bits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 3px solid var(--wood);
}
.bit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-right: 3px solid var(--wood);
}
.bit:last-child { border-right: 0; }
.bit > span { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.bit .kicker { margin: 0; }
.bit strong { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 1rem; }
.pip {
  width: 10px;
  height: 10px;
  background: #c8b8a4;
  border: 2px solid var(--wood);
}
.bit.on { background: var(--good); }
.bit.on .pip { background: #3d8f32; }

.term-wrap { background: var(--term); color: #f6ecd8; }
.farm-peek {
  position: relative;
  margin: 0;
  height: 168px;
  overflow: hidden;
  border-bottom: 3px solid #4a3222;
  background: #87ceeb;
}
.farm-peek img, .farm-peek video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  image-rendering: pixelated;
}
.farm-peek .deploying {
  position: absolute;
  left: 0.55rem;
  bottom: 0.45rem;
  margin: 0;
  padding: 0.28rem 0.45rem;
  background: rgba(20, 12, 8, 0.86);
  color: #e7ff8a;
  font-family: Silkscreen, monospace;
  font-size: 1.15rem;
  line-height: 1;
}
.term-wrap .titlebar a { color: #e7ff8a; text-decoration: none; }
.term-wrap .titlebar {
  background: #24180f;
  color: #c8b49a;
  border-bottom-color: #4a3222;
}
.term-wrap .titlebar span:first-child { color: var(--acid); }
#term-log {
  margin: 0;
  padding: 0.85rem 0.9rem 0.6rem;
  min-height: 168px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--acid);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
}
.caret {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  margin-left: 0.12em;
  background: var(--acid);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.log { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.65rem 0.8rem 0.8rem; }
.chip {
  border: 2px solid #6a4a30;
  color: #f0e2cc;
  padding: 0.12rem 0.4rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}
.chip.hot { color: #ffb089; border-color: #ffb089; }
.muted, .dim { color: var(--muted); }
.term-wrap .muted { color: #b7a48e; }

.table-wrap { overflow: auto; max-height: 360px; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.5rem 0.85rem;
  border-top: 2px solid #ead7b4;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: "IBM Plex Mono", ui-monospace, monospace; }
tr.lead td { background: #fff4d4; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols > div { padding: 0.35rem 0.9rem 1rem; border-right: 3px solid var(--wood); }
.cols > div:last-child { border-right: 0; }
.cols h2 {
  margin: 0.55rem 0;
  font-family: Silkscreen, monospace;
  font-size: 1rem;
  font-weight: 400;
}
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 0.65rem 0; border-bottom: 2px solid #ead7b4; }
.list small { display: block; color: var(--muted); margin-top: 0.2rem; overflow-wrap: anywhere; }

.prose { padding: 0.35rem 1.1rem 1.35rem; max-width: 46rem; }
.prose p { margin: 0.9rem 0 0; line-height: 1.55; }

.pen .socials { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem; }
.addr, #post-note {
  margin: 0;
  padding: 0 0.9rem 0.9rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100vw - 2rem));
  margin: 1.25rem auto 1.75rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

@media (max-width: 980px) {
  .gates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sty { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .cols, .bits { display: block; }
  .bit { border-right: 0; border-bottom: 3px solid var(--wood); }
  .cols > div { border-right: 0; border-bottom: 3px solid var(--wood); }
  .pick { grid-template-columns: 112px minmax(0, 1fr); }
  .pick img { width: 112px; height: 112px; }
}
@media (max-width: 700px) {
  .bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.6rem;
    padding: 0.55rem 0.7rem;
  }
  nav { grid-column: 1 / -1; }
  .bar-meta { margin: 0; font-size: 12px; }
  .brand { font-size: 12px; min-width: 0; }
  .brand img { width: 34px; height: 34px; }
  .hero-art { width: min(100%, 280px); }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; }
  .titlebar span:last-child { display: none; }
  #scan-line { display: block; margin: 0.25rem 0 0; }
  th, td { white-space: normal; }
  .gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, .brand img, .hero-art img, .field-track { animation: none; }
  button:hover, .socials a:hover { transform: none; }
}
