/* The Ticker Digest — shared styles for the evergreen content pages
   (About, Strategy, Results). The daily issue (index.html) ships
   its own inline CSS; this file keeps the static pages visually consistent
   with the masthead, slide-out menu, and footer without duplicating markup. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@300;400;500;600;700&display=swap');

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

:root {
  --ink: #0f0f0f;
  --ink-2: #2a2a2a;
  --ink-3: #4a4a4a;
  --ink-4: #767676;
  --rule: #d4d0cb;
  --rule-light: #eae8e3;
  --cream: #faf8f4;
  --white: #ffffff;
  --red: #c0392b;
  --green: #1a7d44;
  --accent: #1a3a5c;
  --accent-light: #e8f0f8;
  --gold: #b8860b;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── MASTHEAD ── */
.masthead {
  background: var(--white);
  border-bottom: 3px solid var(--ink);
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.masthead-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
  gap: 20px;
  transition: height 0.25s ease;
  position: relative;
}
/* Collapsed (sticky) state — applied via JS once the page is scrolled. Hides
   the date, tagline, and subscribe button and shrinks the title, leaving a
   compact bar pinned to the top. */
.masthead.collapsed .masthead-inner { height: 56px; }
.masthead.collapsed .logo-wordmark { font-size: 1.9rem; }
.masthead.collapsed .masthead-meta { display: none; }
.masthead.collapsed .logo-tagline { display: none; }
.masthead.collapsed .btn-subscribe { display: none; }
.masthead-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.masthead-meta {
  font-size: 0.68rem;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: normal;
  flex: 0 1 auto;
  /* Reserve hamburger width (40px) + gap (14px) so the date keeps its position
     while the hamburger itself is absolutely anchored to the header. Applied as
     a child margin so the column's flex sizing stays symmetric and the centered
     title is unaffected. */
  margin-left: 54px;
}
.masthead-logo { text-align: center; flex: 0 0 auto; }
.masthead-logo a { text-decoration: none; color: inherit; }
.logo-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  line-height: 1;
  transition: font-size 0.25s ease;
}
.logo-wordmark .vibes-green { color: #1a7d44; }
.logo-tagline {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 400;
  margin-top: 3px;
  display: block;
  transition: font-size 0.25s ease, margin-top 0.25s ease;
}
.masthead-actions { display: flex; align-items: center; gap: 12px; flex: 1; justify-content: flex-end; }
.btn-subscribe {
  background: var(--ink);
  color: white;
  border: none;
  padding: 7px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.btn-subscribe:hover { background: var(--accent); }

/* ── HAMBURGER + SLIDE-OUT MENU ── */
.hamburger-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 38px;
  padding: 9px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  /* Anchored to the far left of the header section and vertically centered to
     the entire header (date, title, subtitle, subscribe), independent of the
     date row beside it. */
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.hamburger-btn:hover { border-color: var(--ink-3); background: var(--cream); }
.hamburger-btn span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; }
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,25,35,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 998;
}
.menu-overlay.open { opacity: 1; visibility: visible; }
.site-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 320px;
  max-width: 85vw;
  background: var(--white);
  box-shadow: 2px 0 24px rgba(0,0,0,0.18);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.site-menu.open { transform: translateX(0); }
.site-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 2px solid var(--ink);
}
.site-menu-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.site-menu-title .vibes-green { color: #1a7d44; }
.menu-close { background: none; border: none; font-size: 1.9rem; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 4px; }
.menu-close:hover { color: var(--ink); }
.menu-list { list-style: none; margin: 0; padding: 8px 0; flex: 1 0 auto; }
.menu-list > li { border-bottom: 1px solid var(--rule-light); }
.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  padding: 15px 22px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.menu-link:hover { background: var(--cream); color: var(--ink); }
.menu-link.active { color: var(--ink); font-weight: 600; }
.menu-caret { font-size: 0.7rem; color: var(--ink-4); transition: transform 0.2s ease; }
.menu-toggle[aria-expanded="true"] .menu-caret { transform: rotate(180deg); }
.menu-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--cream);
  transition: max-height 0.32s ease;
}
.menu-sublist.open { max-height: 60vh; overflow-y: auto; }
.menu-sublist li { border-top: 1px solid var(--rule-light); }
.menu-sublink { display: block; padding: 12px 22px 12px 34px; font-size: 0.85rem; color: var(--ink-3); text-decoration: none; transition: background 0.12s, color 0.12s; }
.menu-sublink:hover { background: var(--white); color: var(--ink); }
.menu-sublink .issue-date { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; color: var(--ink-4); letter-spacing: 0.04em; margin-bottom: 2px; }
.menu-subnote { padding: 14px 22px 14px 34px; font-size: 0.8rem; color: var(--ink-4); font-style: italic; }
.site-menu-footer { padding: 18px 22px; border-top: 1px solid var(--rule); }
.site-menu-footer .btn-subscribe { width: 100%; padding: 12px; text-align: center; }
body.menu-open { overflow: hidden; }

/* ── PAGE CONTENT ── */
.page { max-width: 860px; margin: 0 auto; padding: 36px 40px 56px; }
.breadcrumbs { font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 20px; }
.breadcrumbs a { color: var(--ink-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs span { margin: 0 6px; color: var(--rule); }
.page-kicker { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.page h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}
.page-lede { font-size: 1.08rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 8px; }
.page-rule { border: none; border-top: 2px solid var(--ink); margin: 26px 0 30px; }
.page h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 34px 0 12px;
}
.page h3 { font-family: 'Outfit', 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 22px 0 8px; }
.page p { font-size: 0.97rem; line-height: 1.75; color: var(--ink-2); margin-bottom: 16px; }
.page ul, .page ol { margin: 0 0 16px 22px; }
.page li { font-size: 0.97rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 8px; }
.page strong { color: var(--ink); }
.page a { color: var(--accent); }

.signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 22px 0 8px; }
.signal-card { border: 1px solid var(--rule); border-top: 3px solid var(--accent); background: var(--white); padding: 18px 18px 16px; }
.signal-card.green { border-top-color: var(--green); }
.signal-card.gold { border-top-color: var(--gold); }
.signal-card h3 { margin-top: 0; }
.signal-card p { font-size: 0.88rem; margin-bottom: 0; color: var(--ink-3); }

.callout { background: var(--accent-light); border-left: 4px solid var(--accent); padding: 16px 20px; margin: 22px 0; font-size: 0.95rem; line-height: 1.7; color: var(--ink-2); }

.data-table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 0.86rem; }
.data-table th, .data-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule-light); }
.data-table th { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); border-bottom: 2px solid var(--ink); }
.data-table tr:last-child td { border-bottom: none; }

.disclaimer { font-size: 0.78rem; line-height: 1.6; color: var(--ink-4); border-top: 1px solid var(--rule-light); margin-top: 36px; padding-top: 18px; }

.subscribe-box { background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--green); padding: 26px 24px; margin: 30px 0 8px; text-align: center; }
.subscribe-box h2 { margin: 0 0 8px; }
.subscribe-box p { margin-bottom: 16px; }

/* ── FOOTER ── */
footer { background: var(--ink); color: #8a8a8a; padding: 40px 40px 28px; margin-top: 20px; }
.footer-inner { max-width: 1300px; margin: 0 auto; }
.footer-top { display: flex; flex-direction: row; align-items: flex-start; gap: 48px; padding-bottom: 28px; border-bottom: 1px solid #2a2a2a; margin-bottom: 20px; }
.footer-brand { flex-shrink: 0; }
.footer-cols-group { display: flex; gap: 48px; margin-left: auto; }
.footer-brand .logo-wordmark { color: white; font-size: 1.8rem; }
.footer-brand .logo-tagline { color: #4a4a4a; margin-top: 6px; display: block; }
.footer-col-title { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #e0e0e0; margin-bottom: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-links li a { color: #6a6a6a; text-decoration: none; font-size: 0.75rem; transition: color 0.12s; }
.footer-links li a:hover { color: #c0c0c0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.65rem; color: #4a4a4a; gap: 16px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: #4a4a4a; text-decoration: none; transition: color 0.12s; }
.footer-legal a:hover { color: #8a8a8a; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .masthead { padding: 0 24px; }
  .page { padding: 28px 24px 44px; }
  footer { padding: 32px 24px 24px; }
  .footer-top { gap: 24px; }
  .footer-cols-group { gap: 32px; }
}
@media (max-width: 640px) {
  .masthead { padding: 0 16px; }
  .masthead-inner { flex-wrap: wrap; height: auto; padding: 12px 0; justify-content: center; gap: 10px; }
  .masthead-left { flex: 0 0 100%; order: -1; justify-content: center; }
  /* On mobile the hamburger stays anchored to the left edge and vertically
     centered in the masthead (the base .hamburger-btn rule applies). */
  .masthead-actions { flex: 0 0 100%; order: 2; justify-content: center; }
  .masthead-meta { white-space: normal; text-align: center; margin-left: 0; }
  .masthead-logo { flex: 0 0 100%; order: 1; }
  .logo-wordmark { font-size: 1.75rem; }
  .site-menu { width: 300px; }
  .page h1 { font-size: 2rem; }

  /* Collapsed on mobile: pull the bar back into a single row so the hamburger
     sits beside the title instead of stacked on top of it. */
  .masthead.collapsed .masthead-inner { flex-wrap: nowrap; height: 56px; padding: 0; gap: 12px; }
  .masthead.collapsed .masthead-left { flex: 0 0 auto; order: 0; justify-content: flex-start; }
  .masthead.collapsed .masthead-logo { flex: 0 0 auto; order: 0; }
  .masthead.collapsed .masthead-actions { display: none; }

  /* Keep the link columns beside the brand on mobile: the brand column
     shrinks (tagline wraps) and the wordmark scales down so
     "The Ticker Digest" stays on one line. */
  .footer-top { gap: 16px; }
  .footer-cols-group { gap: 24px; }
  .footer-brand { flex-shrink: 1; }
  .footer-brand .logo-wordmark { font-size: clamp(0.96rem, 5.3vw, 1.8rem); white-space: nowrap; }
  footer { padding: 24px 16px 20px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
  .footer-legal { flex-wrap: wrap; gap: 10px; }
}
