/* ============================================================
   stock-portfolio — shared styles
   Palette: ink navy / slate panels / amber signal
   Type: Space Grotesk (display) + IBM Plex Mono (numbers)
   ============================================================ */
:root {
  --bg: #0d1321;
  --panel: #17202f;
  --panel-2: #1d2839;
  --line: #2a3648;
  --text: #e9eef7;
  --muted: #8b96a8;
  --accent: #f2b134;
  --gain: #3ddc84;
  --loss: #ff6b6b;
  --radius: 10px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---- header ---- */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 24px;
}
.site-head h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.02em; }
.site-head h1 a { color: var(--text); text-decoration: none; }
.site-head .asof { color: var(--muted); font-size: 0.85rem; margin-left: auto; }
.tag { color: var(--accent); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---- summary cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.card .label { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.card .value { font-size: 1.45rem; font-weight: 600; }

/* ---- table ---- */
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
thead th {
  text-align: right; padding: 12px 14px; font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
thead th:first-child, tbody td:first-child { text-align: left; }
tbody td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
.ticker a { color: var(--accent); text-decoration: none; font-weight: 600; }
.ticker a:hover, .ticker a:focus { text-decoration: underline; }
.ticker .no-link { color: var(--text); font-weight: 600; }
.name { color: var(--muted); font-size: 0.8rem; }

.pos { color: var(--gain); }
.neg { color: var(--loss); }

/* ---- weight bar ---- */
.wbar { display: inline-block; width: 90px; height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.wbar span { display: block; height: 100%; background: var(--accent); }

/* ---- notes / footer ---- */
.notes { margin-top: 20px; color: var(--muted); font-size: 0.85rem; }
.notes li { margin-left: 18px; margin-bottom: 4px; }
footer { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 0.78rem; }

/* ---- stock page bits ---- */
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.back:hover { color: var(--text); }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.section h2 { font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section ul { margin-left: 18px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kv div .label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.kv div .value { font-size: 1.1rem; font-weight: 600; }

@media (max-width: 640px) {
  .wrap { padding: 18px 12px 40px; }
  thead th, tbody td { padding: 9px 8px; font-size: 0.8rem; }
  .wbar { width: 50px; }
}
