/* base.css — layout primitives + small utility set (only what the app uses). */

/* ---- layout ---- */
.flex      { display: flex; }
.inline-flex { display: inline-flex; }
.col       { display: flex; flex-direction: column; }
.grid      { display: grid; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1 1 auto; min-width: 0; }
.grow      { flex-grow: 1; }
.shrink-0  { flex-shrink: 0; }

.gap-1 { gap: var(--s-1); }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }

.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.ml-auto { margin-left: auto; }

.w-full { width: 100%; }

/* ---- type ---- */
.text-xs  { font-size: var(--fs-xs); }
.text-sm  { font-size: var(--fs-sm); }
.text-md  { font-size: var(--fs-md); }
.text-lg  { font-size: var(--fs-lg); }
.text-xl  { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

.text-muted  { color: var(--muted); }
.text-2      { color: var(--text-2); }
.text-faint  { color: var(--faint); }
.text-accent { color: var(--accent); }
.text-win    { color: var(--win); }
.text-loss   { color: var(--loss); }
.text-ot     { color: var(--ot); }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.uppercase  { text-transform: uppercase; letter-spacing: 0.08em; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap     { white-space: nowrap; }
.center     { text-align: center; }

/* ---- app frame ---- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-8) var(--s-8) var(--s-10);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-sub { color: var(--muted); font-size: var(--fs-md); margin-top: 2px; }

.section-title {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: var(--s-3);
}

/* mobile topbar (hidden on desktop) */
.topbar { display: none; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .page { padding: var(--s-5) var(--s-4) var(--s-8); }
  .hide-mobile { display: none !important; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: var(--fs-xl); }
}
@media (min-width: 861px) {
  .only-mobile { display: none !important; }
}
