:root {
  --bg: #f7f6f2;
  --surface: #fffdfa;
  --surface-2: #f1efe9;
  --line: #ded9cf;
  --line-strong: #c9c1b4;
  --text: #171614;
  --muted: #68655f;
  --good: #117a42;
  --bad: #b42318;
  --watch: #8a5b11;
  --ink: #22201d;
  --accent: #345c72;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, .92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 8px; flex: 0 0 auto; }
.brand p { margin: 0 0 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.brand h1 { margin: 0; font-size: 20px; line-height: 1.1; }
.logout { color: var(--muted); font-weight: 700; text-decoration: none; font-size: 13px; }

main {
  width: min(1480px, calc(100vw - 28px));
  margin: 24px auto 54px;
}

.hero {
  min-height: 188px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 18px;
  align-items: end;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(255,253,250,.96), rgba(255,253,250,.78)),
    radial-gradient(circle at 85% 20%, rgba(52, 92, 114, .18), transparent 32%),
    #fffdfa;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 66px);
  line-height: .96;
  max-width: 920px;
}

.muted { color: var(--muted); }

.hero-callout {
  align-self: stretch;
  display: grid;
  place-items: center start;
  padding: 22px;
  border-left: 4px solid var(--accent);
  background: rgba(241, 239, 233, .72);
  border-radius: 6px;
  font-weight: 900;
  line-height: 1.45;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric, .panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.metric { padding: 16px; min-height: 104px; }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.metric strong { display: block; font-size: clamp(20px, 2vw, 28px); line-height: 1.05; white-space: nowrap; }
.metric small { display: block; color: var(--muted); margin-top: 8px; font-weight: 700; }

.split {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-top: 14px;
}

.panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h3 { margin: 0; font-size: 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.pill.good { color: var(--good); border-color: rgba(17, 122, 66, .35); background: rgba(17, 122, 66, .08); }
.pill.bad { color: var(--bad); border-color: rgba(180, 35, 24, .35); background: rgba(180, 35, 24, .08); }
.pill.watch { color: var(--watch); border-color: rgba(138, 91, 17, .35); background: rgba(138, 91, 17, .08); }
.pill.neutral { color: var(--accent); border-color: rgba(52, 92, 114, .35); background: rgba(52, 92, 114, .08); }

.queue-body, .memory-body {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.queue-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.queue-counts div { background: var(--surface-2); border-radius: 6px; padding: 10px; }
.queue-counts strong { display: block; color: var(--text); font-size: 22px; }

.holdings-panel { margin-top: 14px; padding: 0; overflow: hidden; }
.holdings-panel .panel-head { padding: 18px 18px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
td { font-size: 14px; }
.holding-name { font-weight: 900; }
.holding-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.number { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.positive { color: var(--good); }
.negative { color: var(--bad); }
.thesis { max-width: 360px; color: var(--muted); line-height: 1.45; }
.thesis strong { color: var(--text); }

@media (max-width: 980px) {
  .hero, .split { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; }
  .brand h1 { font-size: 18px; }
  .hero { padding: 22px; }
  .summary-grid { grid-template-columns: 1fr; }
  .queue-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
