/* STAFFED — a pixel office that launches your token. Warm charcoal grid, cream paper, amber highlight. */
:root {
  --bg: #2a2724;
  --bg-line: rgba(247, 242, 228, 0.05);
  --paper: #f7f2e4;
  --paper-2: #ece4cf;
  --ink: #262320;
  --ink-2: #5a524a;
  --mute: #9b9082;
  --pick: #e0782f;
  --pick-2: #b85c1d;
  --teal: #3fa7a0;
  --tomato: #d9483b;
  --sun: #f2c14e;
  --leaf: #5aa05a;
  --sky: #4a8fe0;
  --violet: #7b5ea7;
  --ok: #5aa05a;
  --pixel: "Jersey 10", system-ui, sans-serif;
  --term: "VT323", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-variant-ligatures: none; }
html { background: var(--bg); overflow-x: clip; }
body {
  font-family: var(--term); font-size: 22px; line-height: 1.25; color: var(--paper); min-height: 100vh; overflow-x: clip;
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-line) 2px, transparent 2px), linear-gradient(90deg, var(--bg-line) 2px, transparent 2px);
  background-size: 36px 36px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.px { shape-rendering: crispEdges; }
img.pix, canvas { image-rendering: pixelated; }

/* ---------- page + scroll animations ---------- */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.js body { animation: page-in 0.5s var(--ease) both; }
body.leaving { opacity: 0; transform: translateY(-6px); }
.js [data-r] { opacity: 0; transform: translateY(18px); filter: blur(3px); transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms), filter 0.7s var(--ease) var(--d, 0ms); }
.js [data-r].in { opacity: 1; transform: none; filter: none; }
@keyframes bob { 50% { transform: translateY(-2px); } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.92); } to { opacity: 1; transform: none; } }
.fresh { animation: pop 0.4s var(--ease) both; }

/* ---------- top strip: logo, CA, pages, X ---------- */
.strip { display: flex; align-items: center; gap: 14px; padding: 9px 16px; background: rgba(0, 0, 0, 0.3); border-bottom: 2px solid rgba(0, 0, 0, 0.4); font-size: 19px; }
.strip .home { font-family: var(--pixel); font-size: 26px; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.strip .home svg { width: 26px; height: 26px; }
.strip .ca { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.strip .ca b { background: var(--sun); color: var(--ink); padding: 0 8px; font-weight: 400; flex: none; }
.strip .ca a, .strip .ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.strip .ca a { text-decoration: underline; }
.strip .ca span { color: rgba(247, 242, 228, 0.7); }
.strip .ca button { background: none; border: 2px solid rgba(247, 242, 228, 0.4); padding: 0 8px; flex: none; }
.strip nav { display: flex; gap: 16px; white-space: nowrap; }
.strip nav a { color: rgba(247, 242, 228, 0.7); }
.strip nav a:hover, .strip nav a[aria-current] { color: var(--sun); }
.xbtn { display: grid; place-items: center; width: 34px; height: 34px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4); flex: none; }
.xbtn:hover { background: var(--sun); }

/* ---------- paper card ---------- */
.card { background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: var(--shadow), inset 0 0 0 4px var(--paper-2); padding: 24px; position: relative; }
.card.lined { background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(38, 35, 32, 0.045) 5px 6px); }
.title { font-family: var(--pixel); letter-spacing: 0.03em; line-height: 0.95; color: var(--ink); }
.label { font-family: var(--pixel); font-size: 19px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pick-2); }
.sub { color: var(--ink-2); }
.muted { color: var(--mute); }
.demo { display: inline-block; font-size: 18px; color: var(--ink); background: var(--sun); border: 2px dashed var(--ink); padding: 0 8px; }
.rule { border: 0; border-top: 3px dotted rgba(38, 35, 32, 0.22); margin: 18px 0; }

/* ---------- title menu ---------- */
.stage { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 40px 16px; }
.menu { width: min(680px, 100%); text-align: center; }
.menu h1 { font-size: clamp(64px, 12vw, 108px); }
.menu .tag { margin-top: 6px; font-size: 25px; color: var(--ink-2); letter-spacing: 0.02em; }
.opts { display: grid; gap: 12px; margin-top: 24px; text-align: left; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--paper-2); border: 3px solid var(--ink); padding: 8px 16px; transition: background 0.12s, color 0.12s, transform 0.12s; }
.opt b { font-family: var(--pixel); font-weight: 400; font-size: 32px; letter-spacing: 0.03em; }
.opt small { font-size: 21px; color: var(--mute); }
.opt::before { content: "▶"; font-size: 16px; opacity: 0; margin-right: -6px; transition: opacity 0.12s; }
.opt span { flex: 1; }
.opt:hover, .opt.sel { background: var(--pick); color: var(--paper); transform: translateX(4px); }
.opt:hover small, .opt.sel small { color: #ffe3c8; }
.opt:hover::before, .opt.sel::before { opacity: 1; }
.payroll { margin-top: 18px; }
.payroll p { font-size: 20px; color: var(--mute); letter-spacing: 0.08em; }
.faces { display: flex; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.face { width: 60px; display: grid; gap: 4px; justify-items: center; }
.face .fr { width: 56px; height: 56px; background: var(--paper-2); border: 3px solid var(--ink); display: grid; place-items: center; transition: transform 0.12s; }
.face:hover .fr { transform: translateY(-3px); }
.face .fr svg { width: 46px; height: 46px; }
.face i { display: block; width: 48px; height: 5px; background: var(--c); }
.status-line { margin-top: 14px; font-size: 19px; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.status-line::before { content: ""; width: 10px; height: 10px; background: var(--mute); }
.status-line.ok::before { background: var(--ok); animation: blink 1.6s steps(2) infinite; }
.status-line.down::before { background: var(--tomato); }

/* ---------- page shell ---------- */
.page { width: min(1200px, 100%); margin: 0 auto; padding: 34px 16px 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-family: var(--pixel); font-weight: 400; font-size: clamp(50px, 7vw, 80px); line-height: 0.95; color: var(--paper); text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4); letter-spacing: 0.02em; }
.page-head p { font-size: 24px; color: rgba(247, 242, 228, 0.8); max-width: 36em; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); padding: 3px 16px; font-family: var(--pixel); font-size: 25px; letter-spacing: 0.05em; text-transform: uppercase; transition: transform 0.1s, box-shadow 0.1s, background 0.1s; white-space: nowrap; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35); }
.btn.go { background: var(--pick); color: var(--paper); }
.btn.sun { background: var(--sun); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }

/* ---------- the office (launch room) ---------- */
.room { position: relative; background: #3b3530; border: 4px solid #151311; box-shadow: var(--shadow); padding: 16px; background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.08) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.08) 75%), linear-gradient(45deg, rgba(0, 0, 0, 0.08) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.08) 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.room .wallstrip { height: 34px; margin: -16px -16px 16px; background: #d9cfb6; border-bottom: 6px solid #8a6a48; display: flex; align-items: center; gap: 14px; padding: 0 16px; font-family: var(--pixel); color: #6b5238; font-size: 20px; letter-spacing: 0.1em; }
.room .wallstrip i { width: 26px; height: 18px; background: linear-gradient(#9fd6ff, #d8f1ff); border: 3px solid #fff; box-shadow: inset 0 0 0 2px #8a6a48; }
.desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.desk { position: relative; text-align: left; background: #4a423b; border: 4px solid #151311; padding: 12px; min-height: 196px; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; color: var(--paper); transition: transform 0.12s, border-color 0.12s, background 0.12s; }
.desk:hover { transform: translateY(-3px); border-color: var(--sun); }
.desk.on { border-color: var(--sun); background: #5a5047; }
.desk .who { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.desk .who b { font-family: var(--pixel); font-weight: 400; font-size: 27px; letter-spacing: 0.03em; }
.desk .who small { font-size: 18px; color: var(--c); }
.desk .scene { position: relative; height: 104px; }
.desk .scene .person { position: absolute; left: 14px; bottom: 18px; width: 68px; height: 68px; animation: bob 1.8s steps(2) infinite; }
.desk .scene .table { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: #9a7350; border-top: 4px solid #c09469; border-bottom: 4px solid #5e4430; }
.desk .scene .monitor { position: absolute; right: 16px; bottom: 24px; width: 70px; height: 50px; background: #16201f; border: 4px solid #d7ccb4; display: grid; place-items: center; }
.desk .scene .monitor i { width: 70%; height: 4px; background: var(--c); box-shadow: 0 9px 0 var(--c), 0 -9px 0 rgba(247, 242, 228, 0.35); animation: blink 1.4s steps(2) infinite; }
.desk .scene .mug { position: absolute; right: 96px; bottom: 24px; width: 12px; height: 12px; background: var(--c); border: 2px solid #151311; }
.desk .state { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.desk .state::before { content: ""; width: 10px; height: 10px; background: var(--sun); }
.desk.ready .state::before { background: var(--ok); }
.desk.auto .state::before { background: var(--teal); }
.layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.brief { position: sticky; top: 16px; }
.brief h2 { font-family: var(--pixel); font-weight: 400; font-size: 42px; line-height: 1; letter-spacing: 0.02em; }
.fields { display: grid; gap: 12px; margin-top: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: grid; gap: 4px; font-family: var(--pixel); font-size: 19px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.f small { font-family: var(--term); text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--mute); }
.f input, .f textarea { font-family: var(--term); font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--ink); background: #fffcf2; border: 3px solid var(--ink); padding: 5px 10px; width: 100%; }
.f textarea { min-height: 96px; resize: vertical; }
.f input:focus, .f textarea:focus { outline: none; background: #fff; border-color: var(--pick); }
.drop { display: flex; gap: 12px; align-items: center; border: 3px dashed var(--ink); padding: 8px; background: #fffcf2; cursor: pointer; font-family: var(--term); font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--ink-2); }
.drop .ph, .drop img { width: 70px; height: 70px; border: 3px solid var(--ink); background: var(--paper-2); flex: none; object-fit: cover; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border: 3px solid var(--ink); background: var(--c); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 3px; }
.steps { display: grid; gap: 4px; margin-top: 12px; }
.steps div { display: flex; gap: 10px; align-items: center; font-size: 20px; color: var(--mute); letter-spacing: 0.04em; }
.steps div::before { content: "□"; }
.steps div.run { color: var(--ink); }
.steps div.run::before { content: "▶"; color: var(--pick); animation: blink 0.8s steps(2) infinite; }
.steps div.ok { color: var(--ink); }
.steps div.ok::before { content: "■"; color: var(--ok); }
.steps div.bad { color: var(--tomato); }
.steps div.bad::before { content: "✕"; }
.note { font-size: 19px; color: var(--ink-2); background: var(--paper-2); border: 2px solid rgba(38, 35, 32, 0.2); padding: 8px 10px; }

/* ---------- the floor ---------- */
.floor { position: relative; height: 460px; overflow: hidden; border: 4px solid #151311; box-shadow: var(--shadow); background: #7a6a5a; background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 2px, transparent 2px), linear-gradient(rgba(0, 0, 0, 0.1) 2px, transparent 2px); background-size: 46px 46px; }
.floor .wall { position: absolute; left: 0; right: 0; top: 0; height: 118px; background: #d9cfb6; border-bottom: 8px solid #8a6a48; }
.floor .win { position: absolute; top: 18px; width: 130px; height: 66px; background: linear-gradient(#ffcf8a, #ff9e6b 60%, #b76db0); border: 6px solid #f7f2e4; box-shadow: inset 0 0 0 3px #8a6a48; }
.floor .board { position: absolute; top: 22px; width: 150px; height: 70px; background: #f7f2e4; border: 5px solid #8a6a48; padding: 6px 8px; font-family: var(--term); font-size: 15px; color: #4a3a2a; line-height: 1.1; }
.floor .prop { position: absolute; }
.floor .walker { position: absolute; width: 58px; height: 58px; transition: left 3.4s linear, top 3.4s linear; z-index: 2; }
.floor .walker svg { width: 100%; height: 100%; animation: bob 0.5s steps(2) infinite; }
.floor .walker.idle svg { animation: bob 1.8s steps(2) infinite; }
.floor .walker .say { position: absolute; bottom: 62px; left: 50%; translate: -50% 0; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); padding: 1px 8px; font-size: 17px; white-space: nowrap; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.floor .walker.talk { z-index: 4; }
.floor .walker.talk .say { opacity: 1; }
.floor .walker .say b { color: var(--c); font-weight: 400; filter: brightness(0.8); }
.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.coin { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; background: var(--paper); color: var(--ink); border: 4px solid var(--ink); box-shadow: var(--shadow); padding: 12px; transition: transform 0.12s, box-shadow 0.12s; }
.coin:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3); }
.coin img { width: 72px; height: 72px; border: 3px solid var(--ink); object-fit: cover; background: var(--paper-2); }
.coin b { font-family: var(--pixel); font-weight: 400; font-size: 28px; display: block; line-height: 1; }
.coin small { font-size: 19px; color: var(--mute); }
.coin .mc { font-size: 20px; color: var(--ink); }
.up { color: var(--leaf); } .down { color: var(--tomato); }
.empty { text-align: center; padding: 40px 20px; }

/* ---------- staff ---------- */
.staff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hire { display: grid; gap: 10px; align-content: start; }
.hire .top { display: flex; gap: 14px; align-items: center; }
.hire .fr { width: 88px; height: 88px; background: var(--paper-2); border: 3px solid var(--ink); display: grid; place-items: center; flex: none; }
.hire .fr svg { width: 72px; height: 72px; }
.hire h3 { font-family: var(--pixel); font-weight: 400; font-size: 34px; line-height: 1; }
.hire p { font-size: 21px; color: var(--ink-2); }
.badge { display: inline-block; justify-self: start; font-family: var(--pixel); font-size: 17px; letter-spacing: 0.1em; padding: 1px 8px; border: 2px solid var(--ink); background: var(--paper-2); }

/* ---------- coin file ---------- */
.file { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.file .wide { grid-column: 1 / -1; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 2px dotted rgba(38, 35, 32, 0.2); font-size: 21px; }
.rows > div:last-child { border-bottom: 0; }
.rows .k { color: var(--mute); white-space: nowrap; }
.rows .v { text-align: right; overflow-wrap: anywhere; }
.rows a { text-decoration: underline; }
.chart { width: 100%; height: 420px; border: 3px solid var(--ink); background: #111; }
.posts { display: grid; gap: 10px; }
.post { display: flex; justify-content: space-between; gap: 14px; align-items: center; background: var(--paper-2); border: 2px solid rgba(38, 35, 32, 0.25); padding: 8px 12px; font-size: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .layout, .file { grid-template-columns: 1fr; }
  .desks, .staff, .coins { grid-template-columns: 1fr 1fr; }
  .brief { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 20px; }
  .strip nav { display: none; }
  .desks, .staff, .coins, .two { grid-template-columns: 1fr; }
  .opt { flex-wrap: wrap; }
  .floor { height: 400px; }
  .floor .board { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js body, .fresh { animation: none; }
  .js [data-r] { opacity: 1; transform: none; filter: none; transition: none; }
  .desk .scene .person, .floor .walker svg { animation: none; }
  .floor .walker { transition: none; }
  body { transition: none; }
}
