/* blipnik panels: direction A "night market". every co-website is a stall door: tarp slate panel, an
   awning header in the zone color, lantern paper ink. blip cyan = ai, lantern amber = the house,
   hive bone = the hive, jade/rekt = up/down. palette and fonts from the slice's DIRECTION.md. */
:root {
  --asphalt: #121B22;
  --tarp: #1E2D37;
  --tarp-hi: #273a47;
  --paper: #F4E8CF;
  --paper-soft: #c9bda5;
  --cyan: #58D6E0;
  --cyan-deep: #2E7F8E;
  --amber: #FFB84D;
  --jade: #43D98C;
  --rekt: #FF5A5F;
  --bone: #E8F1F4;
  --hive: #06090C;
  --awning: var(--cyan-deep);
  --display: 'DotGothic16', 'Pixelify Sans', ui-monospace, monospace;
  --text: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --data: 'Martian Mono', ui-monospace, 'Courier New', monospace;
  color-scheme: dark;
}
body.house { --awning: #b7792a; }
body.hive { --awning: #2a2f38; }
body.risk { --awning: #9c3a3d; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--asphalt); color: var(--paper); font: 16px/1.5 var(--text); padding: 0 16px 16px; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.15; letter-spacing: .02em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; margin-top: 22px; color: var(--amber); }
h3 { font-size: 17px; }
p { margin: 6px 0; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
[hidden] { display: none !important; }
code, .mono, .num { font-family: var(--data); font-size: 13px; font-variant-numeric: tabular-nums; }
.mono { word-break: break-all; }
.quiet { color: var(--paper-soft); font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }

/* the awning: zone-colored header with a pixel scalloped edge */
.top { margin: 0 -16px 14px; padding: 14px 16px 16px; background: var(--awning); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; position: relative; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px;
  background: radial-gradient(circle at 6px 0, var(--awning) 5px, transparent 5.5px) 0 0 / 12px 6px repeat-x; }
.kicker { font-family: var(--data); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: rgba(244,232,207,.8); }
.sticker, .badge { display: inline-block; font-family: var(--data); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border: 2px solid var(--asphalt); background: var(--tarp); color: var(--paper); white-space: nowrap; }
.badge.sim, .sticker { background: var(--cyan-deep); color: var(--bone); }
.badge.live { background: var(--rekt); color: var(--asphalt); }
.badge.ai { background: var(--cyan); color: var(--asphalt); }
.badge.house { background: var(--amber); color: var(--asphalt); }

/* labels: three redundant cues, never color alone */
.tag { display: inline-block; font-family: var(--data); font-size: 12px; padding: 1px 7px; border: 1px solid var(--cyan); color: var(--cyan); background: rgba(88,214,224,.08); white-space: nowrap; }
.tag.house { border-color: var(--amber); color: var(--asphalt); background: var(--amber); }
.tag.hive { border-color: var(--bone); color: var(--bone); background: var(--hive); text-transform: lowercase; }

.card { background: var(--tarp); border: 2px solid var(--asphalt); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--tarp-hi); padding: 12px; }
.card.ai { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--cyan-deep); }
.card.warn { box-shadow: 0 0 0 1px var(--amber); }
.card.bad-card { box-shadow: 0 0 0 1px var(--rekt); }
/* the risk tag: the only light card, read first */
.risk-tag { position: relative; background: var(--paper); color: var(--asphalt); padding: 12px 14px 12px 28px; border: 2px solid var(--asphalt); }
.risk-tag::before { content: ''; position: absolute; left: 10px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--asphalt); }
.risk-tag .stamp { position: absolute; right: 10px; top: 8px; transform: rotate(-8deg); border: 2px solid var(--cyan-deep); color: var(--cyan-deep); font: 700 12px var(--data); padding: 0 6px; }
.risk-tag.real .stamp { border-color: var(--rekt); color: var(--rekt); }
.risk-tag a { color: var(--cyan-deep); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font: 700 15px var(--text); padding: 8px 16px; border: 2px solid var(--asphalt); background: var(--cyan); color: var(--asphalt); cursor: pointer; text-decoration: none;
  clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px); box-shadow: inset 0 -3px 0 var(--cyan-deep); }
.btn:hover:not(:disabled) { filter: brightness(1.08); color: var(--asphalt); }
.btn:active:not(:disabled) { box-shadow: none; transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.house { background: var(--amber); box-shadow: inset 0 -3px 0 #b7792a; }
.btn.line { background: transparent; color: var(--paper); border-color: var(--paper-soft); box-shadow: none; }
.btn.line:hover:not(:disabled) { color: var(--bone); border-color: var(--bone); }
.btn.danger { background: transparent; color: var(--rekt); border-color: var(--rekt); box-shadow: none; }
.btn.small { min-height: 34px; padding: 3px 10px; font-size: 14px; }

label { display: block; font-weight: 700; margin: 12px 0 4px; }
input, textarea, select { width: 100%; font: 16px var(--text); padding: 9px 10px; border: 2px solid var(--asphalt); background: var(--asphalt); color: var(--paper); box-shadow: 0 0 0 1px var(--tarp-hi); }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 1px var(--cyan); outline: none; }
input[type=checkbox], input[type=radio] { width: auto; box-shadow: none; accent-color: var(--cyan); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.hint { font-size: 13px; color: var(--paper-soft); }
.bad { color: var(--rekt); font-weight: 700; }
.good { color: var(--jade); font-weight: 700; }
.up { color: var(--jade); } .down { color: var(--rekt); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 4px; border-bottom: 1px dashed var(--tarp-hi); vertical-align: top; }
th { font-family: var(--data); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; color: var(--paper-soft); }
td.num, th.num { text-align: right; white-space: nowrap; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 9px 0; border-bottom: 1px dashed var(--tarp-hi); }
.coin { display: flex; gap: 10px; align-items: center; }
.coin img { width: 36px; height: 36px; object-fit: cover; border: 2px solid var(--asphalt); background: var(--tarp); }
.ticker { font-family: var(--data); font-weight: 700; color: var(--amber); }
.person { color: var(--cyan); font-weight: 700; }
.rank { font-family: var(--display); font-size: 20px; color: var(--amber); }
.agent-row { cursor: pointer; }
.agent-row:hover { background: var(--tarp-hi); }
.footer { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--tarp-hi); font-size: 13px; color: var(--paper-soft); }

/* chat: the ai speaks in tarp slate with a cyan border and chamfered corners */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px 2px; }
.msg { padding: 8px 11px; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--paper); color: var(--asphalt); }
.msg.npc { align-self: flex-start; background: var(--tarp); border: 1px solid var(--cyan);
  clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 0 calc(100% - 3px), 0 3px); }
.msg.npc.house { border-color: var(--amber); }
.msg.guard { border-style: dashed; }
.msg.note { align-self: center; font-size: 13px; color: var(--paper-soft); border: 1px dashed var(--tarp-hi); background: transparent; }
.msg .who { font-family: var(--data); font-size: 11px; letter-spacing: .04em; color: var(--paper-soft); display: block; margin-bottom: 2px; }
.msg.me .who { color: #6b5f4a; }
.status { padding: 8px 10px; background: var(--asphalt); border: 1px solid var(--tarp-hi); }
.wallets { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wallets button { justify-content: flex-start; }
.wallets img { width: 22px; height: 22px; }

/* the blipnik itself: 32px sprite sheets (4 idle frames on the first row), drawn at 3x, never smoothed */
.sprite { position: relative; width: 96px; height: 96px; flex: none; }
.sprite i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 384px auto; image-rendering: pixelated; animation: idle 1s steps(4) infinite; }
.sprite.small { width: 48px; height: 48px; }
.sprite.small i { background-size: 192px auto; animation-name: idle-small; }
@keyframes idle { from { background-position: 0 0; } to { background-position: -384px 0; } }
@keyframes idle-small { from { background-position: 0 0; } to { background-position: -192px 0; } }
@media (prefers-reduced-motion: reduce) { .sprite i { animation: none; } }

.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.choice { display: block; margin: 0; font-weight: 400; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .card { height: 100%; }
.choice input:checked + .card { box-shadow: 0 0 0 2px var(--cyan); }
.choice input:focus-visible + .card { outline: 2px solid var(--cyan); outline-offset: 2px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { margin: 0; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 2px solid var(--asphalt); background: var(--tarp); font-weight: 400; min-height: 44px; }
.swatch span b { width: 16px; height: 16px; border: 2px solid var(--asphalt); display: inline-block; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--cyan); }
.meter { height: 10px; background: var(--asphalt); border: 1px solid var(--tarp-hi); }
.meter > i { display: block; height: 100%; background: var(--cyan); }
.meter.hive > i { background: var(--bone); }
.hive-line { background: var(--hive); color: var(--bone); border-left: 3px solid var(--bone); padding: 8px 12px; font-style: italic; }
.hive-line .who { font-family: var(--data); font-style: normal; font-size: 11px; text-transform: lowercase; color: #9fb0b8; display: block; }
.flip { font-family: var(--display); font-size: 34px; color: var(--amber); background: var(--hive); padding: 6px 12px; letter-spacing: .12em; display: inline-block; border: 2px solid var(--asphalt); }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 420px) { h1 { font-size: 22px; } .flip { font-size: 26px; } th, td { padding: 6px 2px; } }
