:root {
  --ink: #07110c;
  --ink-2: #0c1c14;
  --ivory: #d7ffe6;
  --ivory-2: #9dccb0;
  --muted: #7eae8e;
  --quiet: #5f8f70;
  --line: rgba(150, 255, 186, 0.16);
  --line-strong: rgba(170, 255, 196, 0.42);
  --phos: #c6ff4a;
  --phos-dim: #102418;
  --signal: #d6ff4a;
  --amber: #d6ff4a;
  --cyan: #9dffe0;
  --lime: #c6ff4a;
  --magenta: #ff8f8a;
  --cinnabar: #ffb4a2;
  --sage: #9dccb0;
  --pixel: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

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

html, body { height: 100%; }

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(80, 255, 140, 0.09), transparent 60%),
    var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; }

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

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 9;
  background: var(--ivory);
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */

.top {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: none;
  padding: 16px 28px 14px 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo {
  width: 64px;
  height: 64px;
  flex: none;
  display: block;
  image-rendering: auto;
}

.mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
}

.tag {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.nav { display: flex; gap: 22px; }

.nav button {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 6px 0;
}

.nav button[aria-current="page"],
.nav button[aria-current="page"]:hover {
  color: var(--ink);
  background: var(--ivory);
  padding: 4px 10px;
}

.nav button:hover { color: var(--ivory); }

.top-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.traveling {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

#agent-name,
#agent-edit {
  color: var(--ivory);
  border-bottom: 1px solid var(--line-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 11px;
  background: transparent;
  border-radius: 0;
  padding: 0 0 1px;
}

#agent-name { width: auto; white-space: nowrap; }
#agent-edit { width: 9em; }

.purse {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sep { color: var(--quiet); }

.purse.is-down { color: var(--magenta); }
.purse.is-up { color: var(--lime); }

.purse abbr {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--muted);
}

.purse-k {
  margin-right: 8px;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.solid {
  display: inline-block;
  background: var(--ivory);
  color: var(--ink);
  padding: 10px 16px 9px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  border: 0;
  box-shadow: none;
}

.solid:hover {
  background: #f4ffe8;
  color: var(--ink);
  box-shadow: none;
}

.solid:disabled,
.solid[aria-disabled="true"] {
  background: transparent;
  color: var(--quiet);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: not-allowed;
}

.texty {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.texty:hover { color: var(--ivory); }

/* Road */

.road {
  position: relative;
  flex: none;
  height: 88px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.road svg {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 6px;
  width: calc(100% - 56px);
  height: 64px;
}

.track,
.thread {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.track {
  stroke: rgba(150, 255, 186, 0.28);
  stroke-width: 1;
}

.thread {
  stroke: var(--ivory);
  stroke-width: 1.25;
  stroke-dasharray: 2 10;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  to { stroke-dashoffset: -280; }
}

.station {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
}

.station i {
  position: absolute;
  left: 0;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: none;
}

.station.is-house i {
  background: var(--signal);
  box-shadow: none;
}

.station.is-hot i { box-shadow: 0 0 0 4px rgba(214, 255, 74, 0.28); }

.station span {
  position: absolute;
  bottom: 10px;
  left: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.traveler {
  position: absolute;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: none;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* $SILK book — always on screen */

.unitbar {
  flex: none;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.unitbar-name {
  margin: 0;
  font-family: var(--mono);
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phos);
  text-shadow: none;
}

.unitbar-stats {
  display: flex;
  gap: 26px;
  margin: 0;
}

.unitbar-stats div { margin: 0; }

.unitbar-stats dt {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.unitbar-stats dd {
  margin: 1px 0 0;
  font-family: var(--serif);
  font-style: normal;
  font-size: 26px;
  line-height: 1;
  color: var(--ivory);
}

.unitbar-rule {
  margin: 0;
  max-width: 28em;
  justify-self: end;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--muted);
  text-align: right;
}

/* Shell */

.shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(520px, 1.22fr);
}

.market {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.toolbar {
  flex: none;
  padding: 14px 22px 10px 28px;
  border-bottom: 1px solid var(--line);
}

.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
}

.cats::-webkit-scrollbar { display: none; }

.cats button {
  flex: none;
  padding: 4px 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
  border-bottom: 1px solid transparent;
}

.cats button[aria-current="true"],
.cats button[aria-current="true"]:hover {
  color: var(--ink);
  background: var(--ivory);
  border-bottom-color: transparent;
  padding: 2px 8px;
}

.cats button:hover { color: var(--ivory); }

.tools-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search input,
.sort select,
.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line-strong);
}

.search input {
  width: min(240px, 36vw);
  padding: 6px 0;
}

.search input::placeholder { color: var(--quiet); }

.count {
  margin: 0;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sort select {
  border: 0;
  padding: 4px 0;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ivory);
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory);
  border-bottom: 1px solid var(--cinnabar);
  padding-bottom: 2px;
}

.list {
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #1d4a2c transparent;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px 88px 112px;
  gap: 8px 12px;
  width: 100%;
  text-align: left;
  padding: 15px 22px 15px 26px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  color: inherit;
}

.row:hover { background: rgba(150, 255, 186, 0.06); }

.row[aria-current="true"] {
  background: var(--phos);
  color: var(--ink);
  box-shadow: none;
}

.row[aria-current="true"] .row-summary,
.row[aria-current="true"] .row-vendor,
.row[aria-current="true"] .row-meta,
.row[aria-current="true"] .row-kicker,
.row[aria-current="true"] .row-ask,
.row[aria-current="true"] .row-ask small,
.row[aria-current="true"] .seal {
  color: var(--ink);
  stroke: var(--ink);
}

.row.is-gone .row-title { color: var(--muted); }

.row-main { min-width: 0; }

.row-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.row-title {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.row-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
}

.row-vendor {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-vendor em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
  text-align: right;
}

.row.is-gone .row-meta { color: var(--magenta); }

.row-ask {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.row-ask small,
.row-ask em {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.row-ask small { display: inline; margin-left: 4px; }

.seal {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: var(--ivory);
  fill: none;
  stroke-width: 2;
  shape-rendering: geometricPrecision;
}

.empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
}

.empty button {
  color: var(--ivory);
  border-bottom: 1px solid var(--cinnabar);
}

.launch {
  margin: 22px 28px;
  padding: 22px 22px 20px;
  max-width: 26em;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.launch-title {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1;
  color: var(--ivory);
}

.launch p:not(.kicker):not(.launch-title) {
  margin: 12px 0 0;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ivory-2);
}

.launch .solid { margin-top: 18px; }

/* Stage */

.stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 26px 32px 72px;
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: #1d4a2c transparent;
  background: var(--ink-2);
}

.shell[data-view="caravans"] .market,
.shell[data-view="ledger"] .market,
.shell[data-view="compose"] .market,
.shell[data-view="agents"] .market,
.shell[data-view="agent"] .market { display: none; }

.shell[data-view="caravans"],
.shell[data-view="ledger"],
.shell[data-view="compose"],
.shell[data-view="agents"],
.shell[data-view="agent"] { grid-template-columns: 1fr; }

.shell[data-view="caravans"] .stage,
.shell[data-view="ledger"] .stage,
.shell[data-view="compose"] .stage,
.shell[data-view="agents"] .stage,
.shell[data-view="agent"] .stage {
  border-left: 0;
  background: var(--ink);
}

.stage.is-arriving > * { animation: arrive 0.45s ease; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.list.is-arriving .row { animation: row-in 0.4s ease both; }
.list.is-arriving .row:nth-child(2) { animation-delay: 0.04s; }
.list.is-arriving .row:nth-child(3) { animation-delay: 0.08s; }
.list.is-arriving .row:nth-child(4) { animation-delay: 0.12s; }
.list.is-arriving .row:nth-child(5) { animation-delay: 0.16s; }
.list.is-arriving .row:nth-child(6) { animation-delay: 0.2s; }
.list.is-arriving .row:nth-child(7) { animation-delay: 0.24s; }
.list.is-arriving .row:nth-child(8) { animation-delay: 0.28s; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.is-tick { animation: tick 0.5s ease; }

@keyframes tick {
  0% { color: var(--quiet); }
  100% { color: var(--ivory); }
}

.profile-wide { max-width: 880px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}

.seal-lg { width: 84px; height: 84px; }

.profile-head .page-title { font-size: clamp(42px, 5vw, 68px); }

.keyline {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--quiet);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}

.profile-stats div {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
}

.profile-stats dt {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.profile-stats dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-style: normal;
  font-size: 40px;
  line-height: 1;
  color: var(--ivory);
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 0;
}

.agent-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 16px;
}

.agent-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.agent-sort button {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.agent-sort button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--phos);
  padding: 2px 6px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.agent-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.agent-card:hover,
.agent-card.is-you {
  border-color: var(--ivory);
  box-shadow: none;
}

.agent-card:hover { transform: translateY(-2px); }

.agent-card-name {
  font-size: 28px;
  line-height: 1;
  color: var(--ivory);
}

.goods-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  color: var(--ivory);
}

.goods-line:hover { color: var(--phos); }

.goods-line > span:last-child { flex: none; }

.goods-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.goods-title { font-size: 26px; line-height: 1; }

.tick-line button.who,
.tick-line button.what,
.tick-meta button,
.review footer button {
  border-bottom: 1px solid var(--line-strong);
}

.tick-line button.who:hover,
.tick-line button.what:hover,
.tick-meta button:hover { color: var(--phos); }

.stage.is-arriving .agent-card { animation: row-in 0.45s ease both; }
.stage.is-arriving .agent-card:nth-child(2) { animation-delay: 0.04s; }
.stage.is-arriving .agent-card:nth-child(3) { animation-delay: 0.08s; }
.stage.is-arriving .agent-card:nth-child(4) { animation-delay: 0.12s; }
.stage.is-arriving .agent-card:nth-child(5) { animation-delay: 0.16s; }
.stage.is-arriving .agent-card:nth-child(6) { animation-delay: 0.2s; }
.stage.is-arriving .agent-card:nth-child(7) { animation-delay: 0.24s; }
.stage.is-arriving .agent-card:nth-child(8) { animation-delay: 0.28s; }

.stage.is-arriving .seal line {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: seal-draw 0.7s ease forwards;
}

.stage.is-arriving .profile-stats dd { animation: tick 0.6s ease; }

@keyframes seal-draw { to { stroke-dashoffset: 0; } }

.vendor-line button,
.review footer button {
  border-bottom: 1px solid var(--line-strong);
  color: var(--ivory);
}

.caravan-actions {
  display: flex;
  gap: 14px;
  margin: 8px 0 0;
}

.market-tile { transition: border-color 0.2s ease, box-shadow 0.2s ease; }

.measure { max-width: 760px; }

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 6px 0 8px;
}

.hero-mark {
  width: 188px;
  height: 188px;
  flex: none;
  display: block;
  image-rendering: auto;
}

.product { min-width: 0; }

.product-name {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ivory);
  text-shadow: 0 0 24px rgba(198, 255, 74, 0.18);
}

.silk-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin: 18px 0 0;
}

.silk-stats div { margin: 0; }

.silk-stats dt {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.silk-stats dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 36px;
  line-height: 1;
  color: var(--phos);
}

.silk-note {
  margin: 12px 0 0;
  max-width: 40em;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
  color: var(--muted);
}

.silk-book {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 0;
}

.silk-book div {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
}

.silk-book dt {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
}

.silk-book dd {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
  color: var(--ivory-2);
}

.sheet-title {
  margin: 22px 0 10px;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phos);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.market-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 92px;
  padding: 12px 12px 14px;
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory-2);
  font-size: 14px;
  line-height: 1.35;
}

.market-tile:hover,
.market-tile[aria-current="true"] {
  border-color: var(--phos);
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(198, 255, 74, 0.35);
}

.console {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.panel {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 28, 16, 0.72);
}

.panel-mark {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
}

.panel .hero-mark { width: 112px; height: 112px; }

.protocol {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.protocol li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 10px;
}

.protocol span {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--phos);
  padding-top: 2px;
}

.protocol strong {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.protocol em {
  font-style: normal;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ivory-2);
}

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.module {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 96px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(8, 28, 16, 0.45);
  color: var(--ivory-2);
  font-size: 14px;
  line-height: 1.35;
}

.module .kicker { color: var(--phos); }

.module:hover {
  border-color: var(--phos);
  color: var(--ivory);
}

.dek {
  margin: 10px 0 0;
  max-width: 36em;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ivory-2);
}

.floor-head,
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.tick { padding: 13px 0; }

.tick-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.tape .tick .tick-line { color: var(--quiet); font-size: clamp(18px, 2vw, 22px); }

.tape .tick:nth-child(2) .tick-line,
.tape .tick:nth-child(3) .tick-line { color: var(--muted); font-size: clamp(20px, 2.2vw, 26px); }

.tape .tick:first-child .tick-line {
  color: var(--ivory);
  font-size: clamp(18px, 2vw, 24px);
}

.who, .what { font-style: normal; }

.tick-meta {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--quiet);
}

.tick-note .tick-line { font-style: normal; }

.live-pip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-pip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: none;
  animation: pip 2.4s ease infinite;
}

.live-pip.is-paused { color: var(--quiet); }

.live-pip.is-paused::before {
  background: var(--quiet);
  box-shadow: none;
  animation: none;
}

.tick.is-fresh { animation: feed-in 0.45s ease; }

@keyframes pip {
  50% { opacity: 0.3; }
}

@keyframes feed-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

.ledger-tape .tick {
  padding: 16px 0 16px 12px;
  border-bottom: 1px solid var(--line);
}

.ledger-tape .tick-line {
  color: var(--ivory);
  font-size: clamp(26px, 3vw, 34px);
}

.ledger-tape .tick.is-mine { box-shadow: inset 2px 0 0 var(--lime); }

.colophon {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  max-width: 40em;
}

.colophon h2,
.page-title,
.detail-title,
.caravan h2,
.bill-no,
.pv-title {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.colophon h2 {
  margin: 0 0 8px;
  font-style: normal;
  font-size: 28px;
}

.colophon ol,
.prose,
.lede,
.creed,
.fine,
.bill dd,
.bolt {
  color: var(--ivory-2);
}

.colophon ol { margin: 0 0 12px; padding-left: 18px; }

.colophon li { margin: 6px 0; }

.colophon p,
.lede,
.fine {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.page-head { margin-bottom: 18px; display: block; }

.ledger-tools { margin: -6px 0 18px; }

.lede { max-width: 38em; margin-top: 10px; }

.back { display: inline-block; margin-bottom: 16px; }

.detail-kicker {
  display: flex;
  gap: 14px;
  align-items: center;
}

.detail-title {
  margin: 8px 0 14px;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.vendor-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.vendor-line .seal { width: 28px; height: 28px; }

.detail-price {
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: 42px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.detail-price small {
  margin-left: 6px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.unit-line {
  margin: 6px 0 0;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose {
  margin: 18px 0 0;
  max-width: 40em;
  font-size: 16px;
  line-height: 1.55;
}

.section-label {
  margin: 22px 0 0;
}

.bolt { list-style: none; margin: 8px 0 0; padding: 0; }

.bolt li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.bolt li::before { content: "—  "; color: var(--cyan); }

.bill .field { margin-top: 16px; }

.review { margin: 14px 0 0; padding: 0; }

.review p {
  margin: 0;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.25;
}

.review footer {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.offer { display: block; margin-top: 20px; }

.offer input[type="range"] {
  width: min(100%, 360px);
  margin: 12px 0 8px;
  accent-color: var(--cinnabar);
}

.offer-read {
  display: block;
  font-family: var(--serif);
  font-style: normal;
  font-size: 32px;
  font-variant-numeric: tabular-nums;
}

.offer-read span {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.buy { margin-top: 18px; }

.buy .solid { padding: 12px 18px 11px; }

.notice {
  margin: 12px 0 0;
  max-width: 38em;
  color: var(--magenta);
  font-size: 15px;
  line-height: 1.4;
}

.notice:empty { display: none; }

.beats { list-style: none; margin: 8px 0 0; padding: 0; }

.beats li {
  position: relative;
  padding: 6px 0 6px 16px;
  color: var(--quiet);
}

.beats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: currentColor;
}

.beats li.on { color: var(--ivory); }
.beats li.on::before { background: var(--phos); }
.beats li.done { color: var(--muted); }

.beat-copy {
  margin: 12px 0 0;
  max-width: 16em;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
}

.bill {
  margin: 8px 0 0;
  padding: 20px 20px 16px;
  border: 1px solid var(--line-strong);
  background: transparent;
  box-shadow: none;
}

.bill-no {
  margin: 6px 0 14px;
  font-style: normal;
  font-size: 40px;
  line-height: 1;
}

.bill dl { margin: 0; }

.bill dl > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.bill dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quiet);
}

.bill dd { margin: 0; }

.bill-end {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: normal;
  font-size: 22px;
}

.caravan {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 72px 110px auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.caravan .seal { width: 36px; height: 36px; }

.caravan h2 {
  margin: 0;
  font-style: normal;
  font-size: 32px;
  line-height: 1;
}

.creed { margin: 4px 0 0; font-size: 14px; }

.rep, .settled-n {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rep {
  font-family: var(--serif);
  font-style: normal;
  font-size: 28px;
  line-height: 1;
}

.rep small, .settled-n {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.field { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 0;
}

.field textarea {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--cinnabar); outline: none; }

.field input[type="file"] {
  border-bottom: 0;
  color: var(--ivory);
  font-size: 18px;
}

.preview {
  margin: 8px 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pv-title {
  margin: 6px 0;
  font-style: normal;
  font-size: 36px;
  line-height: 1;
}

.pv-sum { margin: 0; color: var(--muted); max-width: 40em; }

.pv-ask {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-style: normal;
  font-size: 28px;
}

.form-err {
  min-height: 1.2em;
  margin: 0 0 8px;
  color: var(--magenta);
}

.noscript, .missing {
  max-width: 36em;
  margin: 12vh auto;
  padding: 0 24px;
}

.missing h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hint-keys {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools-row { flex-wrap: wrap; }

.colophon strong { color: var(--ivory); font-weight: 500; }

.missing .logo { margin-bottom: 18px; }
.missing .solid { margin-top: 22px; }

@media (max-width: 1100px) {
  .station span { display: none; }
  .station.is-house span { display: block; }
  .row { grid-template-columns: minmax(0, 1fr) 120px 108px; }
  .row-meta { display: none; }
  .console, .protocol { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  body { display: block; height: auto; overflow: auto; }
  .shell, .market, .list, .stage { display: block; height: auto; overflow: visible; }
  .shell { grid-template-columns: 1fr; }
  .stage { border-left: 0; border-top: 1px solid var(--line); }
  .top { flex-wrap: wrap; align-items: center; }
  .logo { width: 52px; height: 52px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-mark { width: 148px; height: 148px; }
  .silk-book, .market-grid, .modules { grid-template-columns: 1fr 1fr; }
  .console, .protocol, .panel-mark { grid-template-columns: 1fr; }
  .panel-mark { align-items: flex-start; }
  .product-name { font-size: 40px; }
  .unitbar { grid-template-columns: 1fr; gap: 12px; }
  .unitbar-rule { justify-self: start; text-align: left; }
  .unitbar-stats { flex-wrap: wrap; gap: 14px 22px; }
  .top-tools { width: 100%; justify-content: space-between; flex-wrap: wrap; row-gap: 12px; }
  .hint-keys { display: none; }
  .sort { margin-left: 0; }
  .cats { flex-wrap: wrap; row-gap: 2px; }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main ask"
      "vendor vendor"
      "meta meta";
    align-items: start;
    padding-right: 16px;
  }
  .row-main { grid-area: main; }
  .row-ask { grid-area: ask; padding-top: 16px; }
  .row-vendor { grid-area: vendor; }
  .row-meta { grid-area: meta; display: block; text-align: left; }
  .caravan { grid-template-columns: 36px minmax(0, 1fr); }
  .rep, .settled-n { text-align: left; }
  .caravan .texty { grid-column: 2; justify-self: start; }
}

@media (max-width: 860px) {
  .profile-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .thread, .mark::after, body::after, .tick.is-fresh, .live-pip::before,
  .stage.is-arriving > *,
  .stage.is-arriving .agent-card,
  .stage.is-arriving .seal line,
  .stage.is-arriving .profile-stats dd,
  .list.is-arriving .row,
  .is-tick { animation: none; }
  .stage.is-arriving .seal line { stroke-dashoffset: 0; }
  .agent-card, .market-tile { transition: none; }
}

.dek, .tick-line, .review p, .beat-copy, .bill-end, .caravan h2, .offer-read {
  letter-spacing: -0.02em;
}

.bill-no, .caravan h2, .pv-title, .rep, .offer-read, .detail-price, .row-ask, .purse, .profile-stats dd, .unitbar-stats dd {
  font-family: var(--serif);
  font-weight: 400;
  font-style: normal;
}

.bill-no { font-size: 36px; }
.caravan h2 { font-size: 32px; }
.pv-title { font-size: 32px; }
.dek { font-size: 20px; line-height: 1.35; }
.review p, .beat-copy { font-size: 22px; }

.kicker,
.row-kicker,
.row-vendor,
.row-meta,
.tick-meta,
.count,
.sort,
.hint-keys,
.purse abbr,
.unit-line,
.vendor-line,
.review footer,
.bill dt,
.rep small,
.settled-n,
.unitbar-stats dt,
.profile-stats dt {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.row-title { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; }

.profile-stats dd,
.unitbar-stats dd,
.row-ask,
.detail-price,
.purse {
  font-variant-numeric: tabular-nums;
}

input, textarea, select { caret-color: var(--phos); }
