/* Pang V1.1 tokens. Three text styles only: num 32/700, head 18/600, body 14/400. */
:root {
  --bg: #F8F6F2;
  --surface: #FFFFFF;
  --ink: #111111;
  --slate: #6B7280;
  --orange: #FF8A3D;
  --on-orange: #111111;
  --line: rgba(17, 17, 17, 0.12);
  --track: rgba(17, 17, 17, 0.07);
  --focus: #111111;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1B1B1B;
    --ink: #F8F6F2;
    --slate: #A1A7B3;
    --line: rgba(248, 246, 242, 0.16);
    --track: rgba(248, 246, 242, 0.1);
    --focus: #F8F6F2;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.45 var(--font);
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }

.t-num  { font: 700 32px/1.1 var(--font); }
.t-head { font: 600 18px/1.3 var(--font); margin: 0; }
.t-body { font: 400 14px/1.45 var(--font); }
.muted  { color: var(--slate); }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }

.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0 16px; }
.top h1 { margin: 0; flex: 1 1 auto; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate); }
.pill[data-state="live"] { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.pill[data-state="live"] .dot { background: var(--on-orange); }

button {
  font: 600 18px/1.2 var(--font);
  min-height: 44px; padding: 8px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
button.primary { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
button:disabled { opacity: 0.6; cursor: default; }

input {
  font: 400 14px/1.45 var(--font);
  width: 100%; min-height: 44px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
}
label { display: block; margin-bottom: 4px; }
.field { margin-bottom: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px;
  min-width: 0;
}
.card > .t-head { margin-bottom: 4px; }
.src { color: var(--slate); margin-top: 8px; }
.stack { display: grid; gap: 16px; }
.narrow { max-width: 420px; margin: 48px auto 0; }
.notice { border-left: 4px solid var(--orange); padding-left: 12px; margin-bottom: 16px; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }

.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 16px; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; margin-top: 12px; }
.barcol { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar { width: 100%; background: var(--orange); border-radius: 4px 4px 0 0; min-height: 2px; }
.barcol[data-zero="1"] .bar { background: var(--track); }
.axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--slate); }

.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 12px; }
.row .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.row .fill { height: 100%; background: var(--orange); border-radius: 4px; }
.sub { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }

.feed { width: 100%; border-collapse: collapse; margin-top: 12px; }
.feed th { text-align: left; font-weight: 600; color: var(--slate); padding: 8px; border-bottom: 1px solid var(--line); }
.feed td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.feed a { color: var(--ink); }
@media (max-width: 640px) {
  .feed thead { position: absolute; left: -9999px; }
  .feed tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .feed td { display: grid; grid-template-columns: 110px 1fr; gap: 8px; border: 0; padding: 2px 0; }
  .feed td::before { content: attr(data-label); color: var(--slate); }
}
@media (prefers-reduced-motion: no-preference) {
  .feed tr.fresh { animation: fresh 1.6s ease-out; }
  @keyframes fresh { from { background: rgba(255, 138, 61, 0.28); } to { background: transparent; } }
}

.mt12 { margin-top: 12px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 0; text-align: center; }
.divider::before, .divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
#viewLogin > button { width: 100%; }
