/* ============================================================================
   BLUE HERON BRIEF — styles.css
   ============================================================================
   Design system carried over from the existing Morning Brief Artifact/email
   (documented in Claude's memory as the "ARTIFACT DESIGN SYSTEM"):
     - Georgia/Times New Roman serif for headings & body copy
     - Arial for small caps / labels / captions
     - Courier New for prices and other tabular figures
     - Warm cream page background, near-black header band, amber accent
     - Category colors: Markets amber, Geopolitics red, Canada blue,
       Greece green, AI/Tech purple, Books orange, Money gold
   This file only re-implements that system with real CSS (flex/grid,
   custom properties, media queries) instead of the email's nested-table
   markup, since this is a real website, not an email client target.
   ============================================================================ */

:root {
  /* ---- brand palette (unchanged from the Artifact/email) ---- */
  --ink: #111111;
  --ink-soft: #333333;
  --paper: #FFFFFF;
  --wash: #EDEAE5;
  --card: #FAFAF8;
  --hairline: #EDEAE5;
  --hairline-soft: #F0EBE3;
  --muted: #888888;
  --muted-soft: #AAAAAA;
  --muted-strong: #777777;

  --amber: #AD6000;      /* Markets & Economy, primary accent */
  --red: #B71C1C;        /* Geopolitics */
  --blue: #1565C0;       /* Canada */
  --green: #2E7D32;      /* Greece / positive */
  --purple: #6A1B9A;     /* AI & Tech */
  --orange: #E65100;     /* Books & Ideas */
  --gold: #F9A825;       /* Money / Daily Idea */
  --slate: #546E7A;      /* VIX / neutral index */
  --violet: #4527A0;     /* WTI crude */
  --fx-blue: #35608A;    /* USD/CAD */
  --heron: #3E6E80;      /* new: Blue Heron Brief brand accent, used sparingly */

  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: 'Courier New', Courier, monospace;

  --radius: 6px;
  --radius-sm: 3px;
  --max-width: 780px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink-soft);
  font-family: var(--serif);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------------------------------------------------------------- header */

.site-header { background: var(--ink); }

/* ---- hero (zen/heron artwork masthead) ---- */
.hero {
  position: relative;
  min-height: 420px;
  background-size: cover;
  /* Anchored to the TOP of the image (not a %) so the heron's head near
     the top edge is never cropped, regardless of how wide/short the
     hero box ends up being on a real desktop window (cover crops more
     aggressively at wide aspect ratios than a square-ish test viewport
     showed — a percentage offset that looked fine at 900px got clipped
     at ~1360px). Excess height is cropped from the BOTTOM instead. */
  background-position: center top;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 18, 20, 0.10) 0%,
    rgba(10, 18, 20, 0.20) 45%,
    rgba(8, 14, 16, 0.78) 88%,
    rgba(6, 10, 12, 0.92) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 24px 16px 26px;
  width: 100%;
}

.site-header .eyebrow {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.site-header h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1.05;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.site-header .meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: #D8D8D2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.site-header .meta .dot { color: #999999; padding: 0 8px; }

@media (max-width: 620px) {
  .hero { min-height: 320px; background-position: center top; }
}

/* ------------------------------------------------------------ tab nav */

.tab-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid #262626;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 0 0 auto;
  appearance: none;
  border: none;
  background: transparent;
  color: #999999;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.tab-btn:hover { color: #DDDDDD; }

.tab-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.tab-btn[aria-selected="true"] {
  color: #FFFFFF;
  border-bottom-color: var(--amber);
}

/* ------------------------------------------------------------- panels */

main { background: var(--paper); }

.panel-inner {
  padding: 32px 0 8px;
}

.tab-panel { display: none; }
.tab-panel[data-active="true"] { display: block; animation: fade-in 0.18s ease; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-eyebrow {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--amber);
  text-transform: uppercase;
}

h2.section-title {
  margin: 0 0 22px;
  font-size: 22px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.3px;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 32px 0;
}

/* ------------------------------------------------------------ top 5 */

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

.story {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.story:last-child { border-bottom: none; }

.story .rank {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 800;
  color: #E8E0D5;
  line-height: 1;
  padding-top: 3px;
  min-width: 30px;
}

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  margin-bottom: 6px;
}
.badge-canada { color: var(--blue); }
.badge-geo { color: var(--red); }
.badge-markets { color: var(--amber); }
.badge-greece { color: var(--green); }
.badge-ai { color: var(--purple); }
.badge-books { color: var(--orange); }

.story h3, .article-title {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.story h3 a, .article-title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.15s ease;
}
.story h3 a:hover, .article-title a:hover { background-size: 100% 1px; }

.story p, .article-summary {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.related-links {
  margin: 4px 0 24px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted-strong);
}
.related-links button.linklike {
  appearance: none; border: none; background: none; padding: 0;
  font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline;
}

/* --------------------------------------------------------- market pulse */

.pulse-note {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}
.pulse-note em { color: var(--muted-soft); font-style: italic; }

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

@media (max-width: 620px) {
  .pulse-grid { grid-template-columns: repeat(2, 1fr); }
}

.pulse-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 12px 8px 10px;
  text-align: center;
}
.pulse-card .name {
  margin: 0 0 1px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.pulse-card .sym {
  margin: 0 0 5px;
  font-family: var(--sans);
  font-size: 8px;
  color: var(--muted-soft);
  font-style: italic;
}
.pulse-card .price {
  margin: 0 0 2px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.pulse-card .pts {
  margin: 0 0 1px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}
.pulse-card .pct {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
}
.pulse-card .pill {
  display: inline-block;
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 3px;
  padding: 2px 6px;
}
.up { color: var(--green); }
.down { color: var(--red); }

.prices-asof {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted-soft);
}

details.movers-detail {
  margin-top: 18px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 4px;
}
details.movers-detail summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
details.movers-detail summary::-webkit-details-marker { display: none; }
details.movers-detail summary::before {
  content: '▸';
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--amber);
}
details.movers-detail[open] summary::before { transform: rotate(90deg); }

.mover-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F5F2EE;
}
.mover-row:last-child { border-bottom: none; }
.mover-row .mover-label {
  flex: 0 0 100px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}
.mover-row .mover-text {
  font-family: var(--sans);
  font-size: 11px;
  color: #555555;
  line-height: 1.6;
}

/* --------------------------------------------------------------- chart */

.chart-block {
  margin: 28px 0;
  text-align: center;
}
.chart-block .chart-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.chart-link {
  display: inline-block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--hairline);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.chart-link:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.chart-link img { width: 100%; max-width: 700px; height: auto; }
.chart-caption {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted-soft);
}

/* ---------------------------------------------------------- bottom line */

.bottom-line {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.bottom-line .section-eyebrow { margin-bottom: 10px; }
.bottom-line ol {
  margin: 0;
  padding: 0 0 0 20px;
}
.bottom-line li {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 6px;
}
.bottom-line li::marker {
  font-weight: 700;
  color: var(--ink);
}

/* -------------------------------------------------------------- daily idea */

.idea-box {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 8px;
}
.idea-box h3 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.idea-box p.idea-text {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.idea-box p.idea-source {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ---------------------------------------------------------- category list */

.category-heading {
  border-bottom: 2px solid var(--amber);
  padding-bottom: 8px;
  margin: 0 0 18px;
}
.category-heading p {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
}
.category-heading.c-geo, .category-heading.c-geo p { border-color: var(--red); color: var(--red); }
.category-heading.c-canada, .category-heading.c-canada p { border-color: var(--blue); color: var(--blue); }
.category-heading.c-greece, .category-heading.c-greece p { border-color: var(--green); color: var(--green); }
.category-heading.c-ai, .category-heading.c-ai p { border-color: var(--purple); color: var(--purple); }
.category-heading.c-books, .category-heading.c-books p { border-color: var(--orange); color: var(--orange); }

.article-list { list-style: none; margin: 0 0 32px; padding: 0; }
.article-item {
  display: flex;
  gap: 12px;
  padding: 10px 0 12px;
  border-bottom: 1px solid #F5F2EE;
}
.article-item:last-child { border-bottom: none; }
.article-dot {
  flex: 0 0 auto;
  width: 4px; height: 4px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--amber);
}
.c-geo .article-dot { background: var(--red); }
.c-canada .article-dot { background: var(--blue); }
.c-greece .article-dot { background: var(--green); }
.c-ai .article-dot { background: var(--purple); }
.c-books .article-dot { background: var(--orange); }

.subhead {
  margin: 28px 0 12px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple);
}

/* --------------------------------------------------------- reading queue */

.queue-list { list-style: none; margin: 0; padding: 0; }
.queue-item {
  border-bottom: 1px solid var(--hairline-soft);
}
.queue-item:last-child { border-bottom: none; }
.queue-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 700;
  color: var(--ink);
}
.queue-item summary::-webkit-details-marker { display: none; }
.queue-item summary::before {
  content: '+';
  font-family: var(--sans);
  font-weight: 700;
  color: var(--amber);
  flex: 0 0 auto;
}
.queue-item[open] summary::before { content: '–'; }
.queue-item .queue-source {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted-soft);
}
.queue-item .queue-body {
  padding: 0 0 16px 20px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--muted-strong);
  line-height: 1.6;
}
.queue-item .queue-body a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.queue-item .queue-body a:hover { text-decoration: underline; }

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

footer {
  padding: 26px 0 40px;
  text-align: center;
}
footer p {
  margin: 0;
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--muted-soft);
  line-height: 1.7;
}

/* -------------------------------------------------------------- mobile */

@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  h2.section-title { font-size: 19px; }
  .story .rank { font-size: 21px; min-width: 24px; }
}
