/* Bulls Run Wild — shared stylesheet
 *
 * Palette is calibrated to the logo:
 *   --navy: dark indigo of the bull and bars
 *   --green: accent bar / "up" color
 *   --red:   "down" / High severity
 *   --amber: Medium severity
 *   --blue:  Bullish catalyst
 */
:root {
  color-scheme: light;
  --navy: #1a2942;
  --navy-soft: #2d3e5e;
  --navy-ink: #0e1628;
  --green: #3f6b4e;
  --green-dark: #2e5139;
  --green-light: #a9c7b1;
  --green-soft: #f0f5f1;
  --red: #c53030;
  --red-soft: #fef2f2;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --blue: #1d4ed8;
  --blue-soft: #eff6ff;
  --bg: #fafaf9;
  --card: #ffffff;
  --card-alt: #f7f5f0;
  --text: #1a1a1a;
  --text-soft: #525252;
  --text-mute: #8a8a8a;
  --border: rgba(26, 41, 66, 0.10);
  --border-strong: rgba(26, 41, 66, 0.22);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 22, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(14, 22, 40, 0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

/* ---------- Header / nav ---------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.brand-mark {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--navy);
}
.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-soft);
}
.nav a {
  color: var(--text-soft);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy); text-decoration: none; border-bottom-color: var(--border-strong); }
.nav a.active { color: var(--navy); border-bottom-color: var(--navy); }

@media (max-width: 600px) {
  .site-header-inner { padding: 10px 14px; flex-wrap: wrap; }
  .brand img { height: 30px; }
  .brand-mark { font-size: 16px; }
  .nav { width: 100%; gap: 14px; font-size: 12px; }
}

/* ---------- Page container ---------- */

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.page-header { margin: 12px 0 28px; }
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-dark);
  margin-bottom: 6px;
}
h1.page-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.15;
}
.page-subtitle {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
}
.breadcrumb {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.breadcrumb a { color: var(--text-mute); }

/* ---------- Summary stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  margin-bottom: 3px;
}
.stat-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
}
.stat-value.high { color: var(--red); }
.stat-value.med { color: var(--amber); }
.stat-value.pos { color: var(--green-dark); }
.stat-sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat-value { font-size: 16px; }
}

/* ---------- Sections ---------- */

.section { margin: 0 0 32px; }
.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.section-count { color: var(--text-mute); font-weight: 500; }

.prose p { margin: 0 0 10px; color: var(--text-soft); }
.prose p strong { color: var(--text); font-weight: 600; }
.prose ul { margin: 0 0 10px; padding-left: 20px; color: var(--text-soft); }
.prose li { margin-bottom: 4px; }
.prose a { color: var(--green-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Flag cards (High / Med / Bull) ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card.high { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft) 0%, var(--card) 40%); }
.card.med { border-left-color: var(--amber); background: linear-gradient(90deg, var(--amber-soft) 0%, var(--card) 40%); }
.card.bull { border-left-color: var(--blue); background: linear-gradient(90deg, var(--blue-soft) 0%, var(--card) 40%); }
.card.low { border-left-color: var(--green); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.card-title .full {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 400;
  margin-left: 6px;
}
.sev-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.sev-tag.high { background: var(--red); color: #fff; }
.sev-tag.med { background: var(--amber); color: #fff; }
.sev-tag.bull { background: var(--blue); color: #fff; }
.sev-tag.low { background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--green-light); }

.card-trigger {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 10px;
}
.card-body { font-size: 14px; color: var(--text-soft); margin: 0 0 10px; }
.card-body p { margin: 0 0 8px; }
.card-body ul { margin: 6px 0 10px; padding-left: 20px; }
.card-body li { margin-bottom: 4px; }
.card-rec {
  font-size: 13px;
  background: var(--card-alt);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  margin-top: 8px;
  border-left: 3px solid var(--green);
}
.card-rec strong { font-weight: 700; color: var(--green-dark); }

/* ---------- Compact holdings table ---------- */

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.holdings-table th, .holdings-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.holdings-table th {
  background: var(--card-alt);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mute);
}
.holdings-table tr:last-child td { border-bottom: 0; }
.holdings-table tr:hover td { background: var(--card-alt); }
.holdings-table .sym { font-weight: 700; color: var(--navy); }
.holdings-table .sym a { color: var(--navy); }
.holdings-table .sev { white-space: nowrap; }

/* ---------- Portfolio grid (tiles) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 110px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.tile.high { border-left-color: var(--red); background: var(--red-soft); }
.tile.med { border-left-color: var(--amber); background: var(--amber-soft); }
.tile.bull { border-left-color: var(--blue); background: var(--blue-soft); }
.tile.low { border-left-color: var(--green); }
.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.tile-sym {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
}
.tile-name {
  font-size: 11px;
  color: var(--text-mute);
  margin: -1px 0 0;
  font-weight: 400;
  line-height: 1.3;
}
.tile-note {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

/* ---------- History (per-ticker) ---------- */

.history-entry {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.history-date {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 4px;
}
.history-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.history-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  margin: 10px 0 4px;
}

/* ---------- Archive list ---------- */

.archive-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.archive-item:last-child { border-bottom: 0; }
.archive-item:hover { background: var(--card-alt); text-decoration: none; }
.archive-date {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--navy);
  min-width: 150px;
}
.archive-summary {
  font-size: 13px;
  color: var(--text-soft);
  flex: 1;
}

/* ---------- Outcomes table ---------- */

.outcome-row-hit { color: var(--green-dark); }
.outcome-row-miss { color: var(--red); }
.outcome-row-partial { color: var(--amber); }

/* ---------- Disclaimer / footer ---------- */

.disclaimer {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-soft);
  margin: 24px 0;
}
.disclaimer strong { color: var(--text); font-weight: 700; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  background: var(--card);
  margin-top: 40px;
}
.site-footer a { color: var(--text-soft); }

/* ---------- Utility ---------- */

.text-up { color: var(--green-dark); font-weight: 600; }
.text-down { color: var(--red); font-weight: 600; }
.text-flat { color: var(--text-mute); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
