* { box-sizing: border-box; }

:root {
  --bg: #0b0d12;
  --panel: #151821;
  --panel-2: #1d212d;
  --text: #e7eaf0;
  --text-dim: #8a93a6;
  --border: #2a2f3d;
  --bmo: #fbbf24;
  --amc: #60a5fa;
  --tba: #6b7280;
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  background: var(--panel); position: sticky; top: 0; z-index: 10;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .2px; }

.weeknav { display: flex; align-items: center; gap: 8px; }
.weeknav button {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit;
}
.weeknav button:hover { background: #262b3a; }
.weeklabel { padding: 0 10px; color: var(--text-dim); min-width: 220px; text-align: center; }

.meta { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 12px; }
.meta button {
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  padding: 4px 8px; border-radius: 6px; cursor: pointer; font: inherit;
}

.legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.legend .chip { padding: 2px 8px; border-radius: 4px; font-weight: 600; color: white; }
.legend .chip-tickers { color: var(--text-dim); margin-right: 12px; }

.calendar {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--border); padding: 1px;
  min-height: calc(100vh - 130px);
}
.day { background: var(--bg); padding: 12px; min-height: 200px; }
.day.today { background: #11141d; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.day-name { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; }
.day-num { font-size: 22px; font-weight: 600; }
.day.today .day-num { color: #fbbf24; }

.section { margin-top: 10px; }
.section-label {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; padding: 1px 6px; border-radius: 3px; margin-bottom: 4px;
}
.section-label.bmo { background: rgba(251,191,36,.15); color: var(--bmo); }
.section-label.amc { background: rgba(96,165,250,.15); color: var(--amc); }
.section-label.tba { background: rgba(107,114,128,.2);  color: var(--tba); }

.tick {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; margin: 2px 0;
  border-radius: 4px; background: var(--panel); font-size: 13px;
  border-left: 3px solid var(--border);
}
.tick .sym { font-weight: 700; }
.tick .nm { color: var(--text-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick .eps { margin-left: auto; color: var(--text-dim); font-size: 11px; font-variant-numeric: tabular-nums; }

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

@media (max-width: 900px) {
  .calendar { grid-template-columns: 1fr; }
  .day { min-height: auto; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .weeklabel { min-width: auto; }
}
