@font-face { font-family: VT323; src: url(../assets/embedded-3.woff2) format('woff2'); font-display: block; }
@font-face { font-family: 'Permanent Marker'; src: url(../assets/embedded-4.woff2) format('woff2'); font-display: block; }
:root {
  --ink: #ece7da; --dim: rgba(236,231,218,.56); --faint: rgba(236,231,218,.3);
  --ljc: #ffb000; --decu: #3dff7a; --trunoest: #e2f1ff; --hanko: #d4372b; --night: #04060b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: VT323, 'Courier New', monospace; color: var(--ink); -webkit-font-smoothing: antialiased; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .055; mix-blend-mode: overlay; z-index: 5; }
#vig { position: fixed; inset: 0; pointer-events: none; z-index: 4; background: radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(0,0,6,.55) 100%); }

/* boot */
#boot { position: fixed; inset: 0; z-index: 40; background: #000; display: grid; place-items: center; transition: opacity .9s ease; }
#boot.done { opacity: 0; pointer-events: none; }
#boot pre { margin: 0; font: 26px/1.3 VT323, monospace; color: #c9d1c3; min-width: min(420px, 86vw); white-space: pre-wrap; }
#boot pre::after { content: '_'; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* hud */
.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.hud.on { opacity: 1; }
.hud::before, .hud::after { content: ''; position: absolute; left: 0; right: 0; pointer-events: none; }
.hud::before { top: 0; height: 180px; background: linear-gradient(rgba(0,0,4,.55), transparent); }
.hud::after { bottom: 0; height: 200px; background: linear-gradient(transparent, rgba(0,0,4,.6)); }
.hud a, .hud button { pointer-events: auto; }
.shadow { text-shadow: 0 1px 2px #000, 0 0 18px rgba(0,0,0,.8); }
.brand { position: absolute; left: max(26px, env(safe-area-inset-left)); top: max(20px, env(safe-area-inset-top)); }
.brand h1 { margin: 0; display: flex; align-items: center; gap: 14px; font-weight: 400; font-size: 68px; line-height: .8; letter-spacing: .01em; }
.brand p { margin: 10px 0 0; font-size: 23px; line-height: 1.05; color: var(--dim); max-width: 21ch; }
.token-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; max-width: min(480px, 88vw); }
.token-line strong { color: var(--ink); font-size: 22px; font-weight: 400; letter-spacing: .03em; }
.token-x { color: var(--dim); font-size: 20px; pointer-events: auto; text-decoration: none; border-bottom: 1px dotted currentColor; }
.token-x:hover, .token-x:focus-visible { color: var(--ink); }
.token-line .cabox { padding: 4px 8px; gap: 8px; }
.token-line .cabox .lbl, .token-line #ca { font-size: 20px; }

.rightcol { position: absolute; right: max(26px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.race { text-align: right; min-width: 230px; }
.race .round { font-size: 20px; color: var(--dim); }
.race ol { list-style: none; margin: 4px 0 0; padding: 0; }
.race li { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; font-size: 30px; line-height: 1.02; color: var(--c); }
.race li span:first-child { color: var(--faint); }
.race li .nm { text-align: left; }

.cabox { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 12px; border: 1px solid var(--faint); border-radius: 3px; background: rgba(4,6,11,.72); text-shadow: none; max-width: min(430px, 88vw); }
.cabox .lbl { font-size: 22px; color: var(--dim); }
#ca { font: inherit; font-size: 24px; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#ca:disabled { color: var(--dim); cursor: default; }
#cabtn, #back { font: inherit; font-size: 22px; color: var(--ink); background: none; border: 1px solid var(--faint); border-radius: 2px; padding: 0 10px; cursor: pointer; }
#cabtn:hover, #back:hover { border-color: var(--ink); }
.links { display: flex; gap: 26px; }
.links a { color: var(--ink); font-size: 28px; text-decoration: none; border-bottom: 1px solid transparent; line-height: 1; }
.links a:hover { border-color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ljc); outline-offset: 3px; }
#hint { position: absolute; left: max(26px, env(safe-area-inset-left)); bottom: max(20px, env(safe-area-inset-bottom)); max-width: 30ch; font-size: 23px; line-height: 1.05; color: var(--dim); transition: opacity .8s; }
#hint.gone { opacity: 0; }

/* focus mode */
.focusbar { position: absolute; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 18px; align-items: baseline; opacity: 0; transition: opacity .5s; font-size: 22px; }
.focused .focusbar { opacity: 1; }
.focused .focusbar #back { pointer-events: auto; }
.focusbar #back { pointer-events: none; }
.focusbar small { font-size: 20px; color: var(--dim); }
.focused .brand, .focused .rightcol { opacity: 0; transition: opacity .4s; pointer-events: none; }
.focused .rightcol * { pointer-events: none; }
.brand, .rightcol { transition: opacity .6s; }

/* floating name tags + speech */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 8; }
.tag { position: absolute; left: 0; top: 0; font-size: 21px; color: var(--c); white-space: nowrap; transition: opacity .35s; text-shadow: 0 0 10px rgba(0,0,0,.9), 0 1px 2px #000; }
.tag .pl { color: var(--ink); opacity: .75; }
.tag::after { content: ''; display: block; width: 1px; height: 18px; margin: 3px auto 0; background: linear-gradient(var(--c), transparent); opacity: .7; }
.tag.hot .nm { background: var(--c); color: #000; text-shadow: none; padding: 0 4px; }
.bubble { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px); width: max-content; max-width: 250px; white-space: normal; padding: 6px 10px 7px; font-size: 20px; line-height: 1.05; color: var(--ink); background: rgba(4,6,11,.86); border: 1px solid var(--c); border-radius: 2px; opacity: 0; transition: opacity .3s, transform .3s; text-shadow: none; }
.tag.talk .bubble { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .brand h1 { font-size: 46px; }
  .brand p { font-size: 19px; max-width: 17ch; }
  .race { min-width: 0; }
  .race li { font-size: 22px; gap: 8px; grid-template-columns: 12px 1fr auto; }
  .race .round { font-size: 16px; max-width: 16ch; margin-left: auto; }
  .links a { font-size: 22px; }
  .links { gap: 16px; }
  .cabox .lbl, #ca { font-size: 19px; }
  #cabtn { font-size: 18px; }
  #hint { max-width: 40vw; font-size: 18px; }
  .focusbar small { display: none; }
  .hud::before { height: 230px; }
  .tag { font-size: 17px; }
  .bubble { font-size: 16px; max-width: 170px; }
}
@media (prefers-reduced-motion: reduce) { #boot pre::after { animation: none; } }

/* KOLDESK additions preserve the original office and CRT typography. */
.eyebrow { font-size: 17px; letter-spacing: .09em; color: var(--dim); margin: 0 0 12px; }
.brand h1 { font-size: 64px; }
.focused .brand * { pointer-events: none; }
.brand p { max-width: 25ch; }
.source-link { font: inherit; font-size: 18px; color: #c4bfaf; background: none; border: 0; border-bottom: 1px dotted #6b6a5f; padding: 0 0 2px; margin-top: 14px; cursor: pointer; }
.source-link:hover { color: #fff; }
.desk-shortcuts { display: flex; gap: 7px; margin-top: 15px; }
.desk-shortcuts button { font: inherit; font-size: 17px; border: 1px solid #57584f; background: rgba(0,0,0,.45); color: var(--c, #ece7da); padding: 4px 7px; cursor: pointer; }
.desk-shortcuts button:hover { background: #20221f; border-color: var(--c, #ece7da); }
.paper-label { font-size: 17px; color: #b7b7a8; }
.paper-label span { display: inline-block; width: 6px; height: 6px; background: #bdc097; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.links button { border: 0; border-bottom: 1px solid transparent; font: inherit; font-size: 28px; color: var(--ink); padding: 0; background: none; cursor: pointer; line-height: 1; }
.links button:hover { border-bottom-color: var(--ink); }
.panel { background: #11130f; border: 1px solid #575b4d; color: var(--ink); width: min(660px, calc(100vw - 32px)); padding: 34px; box-shadow: 0 0 80px #000; max-height: calc(100dvh - 36px); overflow-y: auto; }
.panel::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.panel h2 { font-size: 44px; line-height: 1; font-weight: 400; margin: 0 0 12px; }
.panel p { font-size: 21px; line-height: 1.2; }
.panel .eyebrow, .panel .source-date { font-size: 17px; color: #acb09b; }
.panel .panel-note { color: #a7ab9a; font-size: 18px; }
.panel a { color: #d4d9bb; font-size: 20px; }
.panel-close { position: absolute; top: 10px; right: 12px; font: inherit; font-size: 30px; color: var(--ink); background: none; border: none; cursor: pointer; padding: 4px 8px; }
.roster-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 15px; padding: 20px 0; border-top: 1px solid #34392d; text-decoration: none; }
.roster-row strong { display: block; font-size: 30px; font-weight: 400; color: var(--c); }
.roster-row small { display: block; color: #8f9582; font-size: 16px; }
.roster-rank { color: #818972; }
.roster-pnl { color: var(--c); }
.roster-row:hover { background: #1c2016; }
.roster-row { background: none; border: 0; border-top: 1px solid #34392d; width: 100%; text-align: left; color: var(--ink); font: inherit; font-size: 20px; cursor: pointer; }
.roster-row[aria-pressed="true"] { background: #20251a; }
.wallet-address { display: block; overflow-wrap: anywhere; font-size: 17px !important; }
#wallet-detail h3 { font-size: 24px; font-weight: 400; margin: 30px 0 10px; letter-spacing: .04em; }
.wallet-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.wallet-metrics > div { background: #191e14; border: 1px solid #353e29; padding: 12px; }
.wallet-metrics small { display: block; font-size: 15px; color: #a4ad93; }
.wallet-metrics strong { display: block; margin-top: 5px; font-size: 28px; font-weight: 400; }
.panel .wallet-caption { font-size: 16px; color: #a1ab91; }
.panel .wallet-empty, .panel .wallet-warning { font-size: 18px; padding: 12px; border: 1px dashed #485139; }
.panel .wallet-warning { color: #ffce82; }
.wallet-trades { list-style: none; padding: 0; margin: 14px 0; }
.wallet-trades li { display: grid; grid-template-columns: 1fr auto; gap: 5px; padding: 12px 0; border-bottom: 1px solid #34392d; font-size: 20px; }
.wallet-trades small { grid-column: 1 / -1; color: #a1ab91; font-size: 16px; }
.positive { color: #3dff7a; } .negative { color: #ff997f; }
.holdings-table { width: 100%; border-collapse: collapse; font-size: 18px; margin-bottom: 22px; table-layout: fixed; }
.holdings-table th { color: #a1ab91; font-size: 15px; font-weight: 400; }
.holdings-table th, .holdings-table td { text-align: right; padding: 9px 4px; border-bottom: 1px solid #34392d; overflow-wrap: anywhere; }
.holdings-table th:first-child, .holdings-table td:first-child { text-align: left; }
#feed-status[data-state="live"] span { background: #3dff7a; box-shadow: 0 0 8px #3dff7a80; }
#feed-status[data-state="waiting"] span { background: #ffb000; }
.brand-banner { width: 100%; height: auto; }
.brand-assets { display: flex; align-items: center; gap: 25px; }
.brand-assets img { width: 145px; height: 145px; object-fit: contain; }
.brand-assets a { display: block; margin: 10px 0; }
.no-script { position: fixed; inset: 0; z-index: 100; background: #080a07; color: white; display: grid; place-content: center; padding: 20px; font: 24px monospace; }
@media (max-width: 720px) {
  .brand { left: 18px; top: 18px; }
  .brand h1 { font-size: 43px; }
  .eyebrow { font-size: 14px; margin-bottom: 10px; }
  .brand p { font-size: 17px; max-width: 22ch; }
  .source-link { font-size: 15px; margin-top: 10px; }
  .desk-shortcuts { margin-top: 10px; gap: 4px; }
  .desk-shortcuts button { font-size: 15px; padding: 3px 6px; }
  .desk-shortcuts button span { display: none; }
  .rightcol { right: 18px; bottom: 18px; gap: 9px; }
  .paper-label { font-size: 14px; }
  .links button { font-size: 22px; }
  #hint { left: 18px; bottom: 18px; max-width: 35vw; font-size: 16px; }
  .panel { padding: 26px 20px; }
  .panel h2 { font-size: 34px; }
  .roster-row { grid-template-columns: 22px 1fr auto; gap: 8px; }
  .roster-row strong { font-size: 25px; }
  .roster-pnl { font-size: 18px; }
  .brand-assets img { width: 110px; height: 110px; }
}
