:root {
  --bg:      #000000;
  --bg-card: #0a0a0a;
  --border:  #1a1a1a;
  --ink:     #cccccc;
  --dim:     #999999;
  --green:   #00ff41;
  --amber:   #ffb000;
  --red:     #ff3333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--amber); }

/* topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  flex-wrap: wrap;
  gap: 4px;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo {
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}
.sep { color: var(--border); }
.ticker { color: var(--dim); font-size: 12px; }

.topbar-right a {
  color: var(--dim);
  font-size: 12px;
}
.topbar-right a:hover { color: var(--green); }

/* layout */
.container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  min-height: calc(100vh - 37px);
}
.col-left {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.col-right {
  display: flex;
  flex-direction: column;
}

/* panels */
.panel {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-head {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.panel-head .dim { color: var(--dim); font-weight: 400; }
.panel-muted { opacity: 0.7; }

/* notes */
.note {
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.6;
}
.dim { color: var(--dim); }

/* progress bar */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
  transition: width 0.4s;
}
.progress-pct {
  color: var(--green);
  font-size: 12px;
  min-width: 36px;
  text-align: right;
}
.progress-detail {
  color: var(--dim);
  font-size: 11px;
}

/* data tables */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  text-align: left;
  color: var(--dim);
  font-weight: 400;
  padding: 4px 8px 6px 0;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid #0f0f0f;
  white-space: nowrap;
}
.data-table tr:hover td { background: #050505; }
.data-table .val-green { color: var(--green); }
.data-table .val-amber { color: var(--amber); }
.data-table .val-red { color: var(--red); }

.empty {
  color: var(--dim);
  font-size: 12px;
  padding: 12px 0;
  font-style: italic;
}

/* inline progress in table */
.inline-prog {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--border);
  position: relative;
  vertical-align: middle;
  margin-right: 6px;
}
.inline-prog-fill {
  height: 100%;
  background: var(--green);
}

/* stats */
.stats-list { display: flex; flex-direction: column; gap: 6px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.stat-row span:last-child { color: var(--ink); font-weight: 700; }

/* mechanism ascii */
.mechanism {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.4;
  overflow-x: auto;
}

/* actions */
.actions-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.action-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.1s, background 0.1s;
}
.action-btn:hover:not(:disabled) {
  border-color: var(--green);
  background: #001a00;
}
.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.action-btn .label {
  color: var(--green);
  font-weight: 700;
}
.action-btn .desc {
  color: var(--dim);
  margin-left: 8px;
}
.action-btn .bounty {
  color: var(--amber);
  float: right;
}

/* responsive */
@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
  }
  .col-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .topbar-left .ticker:nth-child(n+6) { display: none; }
}

@media (max-width: 500px) {
  .topbar { font-size: 11px; }
  .topbar-left .sep:nth-child(n+4),
  .topbar-left .ticker:nth-child(n+4) { display: none; }
}
