/* AgMarketDashPro — agmarketdashpro.com
   Dark theme, large high-contrast type. */

:root {
  --page-bg: #111612;          /* near-black page background */
  --panel-bg: #1a201a;         /* slightly lifted card background */
  --tab-selected: #285c3d;     /* selected section tab green */
  --text: #f2f5f0;             /* near-white body text */
  --text-dim: #c9d4c6;         /* dimmer text for dates/subtext */
  --gold: #d8a94e;             /* gold rule / accent */
  --up: #6fdc73;               /* green ink for up moves */
  --down: #ff6b61;             /* red ink for down moves */
  --border: #2c352c;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 1.25rem;             /* 20px, was 24px */
  line-height: 1.55;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / masthead ---------- */
/* The masthead shares the page background exactly: one continuous dark
   field, just the gold medallion lying in it. */
.masthead {
  background: var(--page-bg);
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
}

.masthead img.logo {
  width: 11rem;
  max-width: 55vw;
  height: auto;
  display: block;
  margin: 0 auto;
}

.site-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 1.25rem 0 0.25rem;
  color: var(--text);
}

.byline {
  font-size: 1rem;
  color: var(--text-dim);
  margin: 0;
}

/* ---------- Section tabs ---------- */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.2rem;
  padding: 0 0.5rem;
  max-width: 72rem;
  margin: 0 auto 1.5rem;
}

.tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--page-bg);
  color: #b7d9ae;
  /* 14px bold nav labels: "INTERNATIONAL" fits its column on a 390px phone
     (matches the original edition's tab sizing). Body text stays at/above
     the 18px floor. */
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.875rem 0.125rem;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  min-width: 0;                 /* let grid columns shrink on narrow screens */
  overflow-wrap: break-word;    /* wrap at spaces first; break only if needed */
}

/* ---------- Hamburger menu ---------- */
.masthead { position: relative; }

.menu-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.75rem;
  height: 3.75rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.menu-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.site-menu {
  position: absolute;
  top: 5.25rem;
  right: 1rem;
  z-index: 20;
  min-width: 14rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.site-menu[hidden] { display: none; }

.site-menu a {
  padding: 1.1rem 1.5rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  border-top: 1px solid var(--border);
}

.site-menu a:first-child { border-top: 0; }

.site-menu a:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.tab[aria-selected="true"] {
  background: var(--tab-selected);
  color: #ffffff;
  border-color: var(--tab-selected);
}

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

@media (min-width: 60rem) {
  .tabs { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Edition meta / headings ---------- */
.edition-date {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cfe3c8;
  margin: 0 0 0.25rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #d7e8d1;
  margin: 0 0 1.5rem;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 0.35rem;
  background: var(--gold);
}

/* On phones the 40px section titles (e.g. "INTERNATIONAL MARKETS") are wider
   than the screen, which used to let the whole page slide sideways. */
@media (max-width: 40rem) {
  .section-heading { font-size: 1.25rem; }
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ---------- Story cards ---------- */
.story {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin: 0 0 1.5rem;
}

.story .kicker {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.story .story-date {
  font-size: 1rem;
  color: var(--text-dim);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.story h3 {
  font-size: 1.75rem;             /* 28px, was 32px */
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.story p {
  margin: 0 0 1rem;
}

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

.story .source {
  font-size: 1rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

.story .source a {
  color: #9fd0ff;
}

/* ---------- MARKETS board ---------- */
.board {
  border: 1px solid var(--border);
  background: var(--panel-bg);
  margin: 0 0 2rem;
  overflow-x: auto;
}

.board-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1.25rem 1.5rem 0.25rem;
  margin: 0;
}

.board-sub {
  font-size: 1rem;
  color: var(--text-dim);
  padding: 0 1.5rem 1rem;
  margin: 0;
}

.board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.125rem;          /* 22px */
}

.board caption {
  text-align: left;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
  padding: 0.75rem 1.5rem 0.25rem;
}

.board th, .board td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

.board td.price {
  font-weight: 800;
  white-space: nowrap;
}

.board td.change {
  white-space: nowrap;
  font-weight: 700;
}

.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- AG STOCKS board ---------- */
.stock-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.stock-id { font-size: 1.125rem; font-weight: 700; }
.stock-id .ticker { color: var(--text-dim); font-weight: 600; }

.stock-quote { text-align: right; }
.stock-price { font-size: 1.75rem; font-weight: 800; white-space: nowrap; }
.stock-change { font-size: 1rem; font-weight: 700; white-space: nowrap; }

/* ---------- Homepage hero / lists ---------- */
.hero {
  text-align: center;
  padding: 1rem 0 2rem;
}

.hero .edition-date { font-size: 1.75rem; }

.hero h2 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin: 0.75rem 0 1.5rem;
}

.btn {
  display: inline-block;
  background: var(--tab-selected);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  padding: 1rem 2.25rem;
  border: 1px solid var(--tab-selected);
}

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

.edition-list { list-style: none; margin: 0 0 2rem; padding: 0; }

.edition-list li {
  border: 1px solid var(--border);
  background: var(--panel-bg);
  margin: 0 0 1rem;
}

.edition-list a {
  display: block;
  padding: 1.25rem 1.5rem;
  color: var(--text);
  text-decoration: none;
}

.edition-list a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.edition-list .d {
  font-size: 1rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.edition-list .h {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.3;
}

.section-label {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin: 2.5rem 0 1rem;
}

/* ---------- Archive month groups ---------- */
.month-group {
  list-style: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.month-heading {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 1rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  font-size: 1rem;
  color: var(--text-dim);
}

footer p { margin: 0.25rem 0; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
