/* Trajectory — dark editorial / space theme */

:root {
  --bg: #050608;
  --bg-elev: #0e1117;
  --bg-elev-2: #161b22;
  --ink: #ece9e3;
  --muted: #7a8088;
  --rule: #1d232c;
  --accent: #e94e3a;
  --accent-hot: #ff6b58;
  --accent-soft: rgba(233, 78, 58, 0.18);
  --accent-line: rgba(233, 78, 58, 0.28);

  /* Outlook chip colors */
  --bull: #4ade80;
  --bull-bg: rgba(74, 222, 128, 0.08);
  --bear: #f87171;
  --bear-bg: rgba(248, 113, 113, 0.08);
  --neutral: #9ca3af;
  --neutral-bg: rgba(156, 163, 175, 0.06);

  --max: 760px;
  --serif: "Charter", Georgia, "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle layered atmosphere — radial glow + thin orbital arcs in the
   background. Pure CSS. Low opacity so they read as texture, not subject. */
body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(233, 78, 58, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(80, 70, 130, 0.08) 0%, transparent 60%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 25% 18%, rgba(255, 255, 255, 0.5) 50%, transparent 100%),
    radial-gradient(1px 1px at 78% 62%, rgba(255, 255, 255, 0.35) 50%, transparent 100%),
    radial-gradient(1px 1px at 12% 78%, rgba(255, 255, 255, 0.3) 50%, transparent 100%),
    radial-gradient(1px 1px at 88% 12%, rgba(255, 255, 255, 0.4) 50%, transparent 100%),
    radial-gradient(0.8px 0.8px at 55% 35%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  background-size: 100% 100%;
  opacity: 0.6;
  z-index: 0;
}

main, .site-header, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── Site header ─────────────────────────────────────────── */

.site-header {
  padding-top: 2.75rem;
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-block {
  flex: 1;
  min-width: 0;
}

.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 14px var(--accent-soft),
    0 0 4px var(--accent);
  display: inline-block;
}

.tagline {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
  letter-spacing: 0.01em;
}

.site-nav {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 100ms, border-color 100ms;
  padding-bottom: 2px;
}

.site-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ── Typography ───────────────────────────────────────────── */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 0.6rem;
  position: relative;
  padding-left: 1.4rem;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--accent);
  transform: translateY(-50%);
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin: 3.5rem 0 1.75rem;
  font-weight: 600;
}

h3 {
  font-size: 1.22rem;
  line-height: 1.32;
  margin: 0 0 0.45rem;
  color: var(--ink);
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  transition: border-color 100ms, color 100ms;
}

a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent-hot);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elev);
  padding: 0.12rem 0.42rem;
  border-radius: 3px;
  color: var(--ink);
}

/* ── Issue body ───────────────────────────────────────────── */

.issue h1 {
  margin-bottom: 0.7rem;
}

.preheader {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 2.75rem;
  font-size: 1.06rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.story {
  margin-bottom: 3rem;
  padding-bottom: 0.5rem;
}

.story:last-child {
  margin-bottom: 0;
}

.story .meta {
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 500;
}

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

.story .category::after {
  content: "·";
  margin-left: 0.55rem;
  color: var(--rule);
}

.story .tickers .ticker,
.tickers .ticker,
li .ticker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--ink);
  background: var(--bg-elev-2);
  border: 1px solid var(--rule);
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
  display: inline-block;
}

/* TradingView mini-chart widget */
.chart-widget {
  margin: 1.25rem 0;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.85rem 0.95rem 0.6rem;
}

.chart-widget .tradingview-widget-container {
  min-height: 220px;
}

.chart-attribution {
  font-family: var(--sans);
  font-size: 0.74rem;
  margin: 0.55rem 0 0;
  text-align: right;
  letter-spacing: 0.04em;
}

.chart-attribution a {
  color: var(--muted);
  border-bottom: 1px dotted var(--rule);
}

.chart-attribution a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Outlook block — color-coded by bias */

.outlook {
  font-family: var(--sans);
  font-size: 0.93rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--neutral);
  background: var(--neutral-bg);
  border-radius: 0 4px 4px 0;
  line-height: 1.55;
}

.outlook.bullish {
  border-left-color: var(--bull);
  background: var(--bull-bg);
}

.outlook.bearish {
  border-left-color: var(--bear);
  background: var(--bear-bg);
}

.outlook .label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.6rem;
  display: inline-block;
}

.outlook .bias {
  font-weight: 700;
  margin-right: 0.4rem;
  letter-spacing: 0.01em;
}

.outlook.bullish .bias { color: var(--bull); }
.outlook.bearish .bias { color: var(--bear); }
.outlook.neutral .bias, .outlook.mixed .bias { color: var(--neutral); }

.sources {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.8rem;
}

.briefs ul {
  padding-left: 1.25rem;
  margin: 0;
}

.briefs li {
  margin-bottom: 0.7rem;
  line-height: 1.6;
}

/* ── Post navigation (prev / next) ────────────────────────── */

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3.5rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
}

.post-nav a {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.95rem 1.05rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg-elev);
  transition: border-color 100ms, color 100ms, background 100ms;
  display: block;
}

.post-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-elev-2);
}

.post-nav .direction {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 0.3rem;
}

.post-nav .post-nav-title {
  font-size: 0.95rem;
  line-height: 1.3;
  display: block;
  font-weight: 500;
}

.post-nav .next {
  text-align: right;
}

.post-nav-spacer {
  /* Keeps grid 2-col when one side is missing */
}

/* ── Disclaimer ───────────────────────────────────────────── */

.disclaimer {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  line-height: 1.6;
}

/* ── Index page ───────────────────────────────────────────── */

.latest {
  margin-bottom: 3.5rem;
  padding-bottom: 0;
}

.latest .eyebrow {
  margin-bottom: 0.55rem;
}

.latest h2 {
  font-family: var(--sans);
  font-size: 2rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--ink);
  border: 0;
  padding: 0;
  margin: 0.3rem 0 0.7rem;
  line-height: 1.16;
  font-weight: 700;
}

.latest h2 a {
  color: inherit;
  border: 0;
}

.latest h2 a:hover {
  color: var(--accent);
}

.latest .lede {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.latest .cta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--accent);
  display: inline-block;
  margin-top: 0.75rem;
  padding-bottom: 2px;
}

.archive h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 3.5rem 0 1.25rem;
  font-family: var(--sans);
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

.archive ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive li {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.95rem;
  align-items: baseline;
}

.archive-date {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  flex: 0 0 110px;
  letter-spacing: 0.04em;
}

.archive li a {
  color: var(--ink);
  border: 0;
  flex: 1;
}

.archive li a:hover {
  color: var(--accent);
}

/* ── Footer ───────────────────────────────────────────────── */

footer {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
  margin-top: 4.5rem;
  border-top: 1px solid var(--rule);
}

footer a {
  color: var(--muted);
  border: 0;
}

footer a:hover {
  color: var(--accent);
}

footer .sep {
  margin: 0 0.7rem;
  color: var(--rule);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.65rem; }
  .latest h2 { font-size: 1.55rem; }
  .archive li { flex-direction: column; gap: 0.2rem; }
  .archive-date { flex: none; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
}
