/* ═══════════════════════════════════════════════════════════════════════════
   DataPowerDemand — WSJ-Inspired Redesign
   "Power Infrastructure Intelligence" as a daily newspaper
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

:root {
  --wsj-bg: #f7f7f7;
  --wsj-surface: #ffffff;
  --wsj-border: #e0e0e0;
  --wsj-text: #1a1a1a;
  --wsj-text-secondary: #555555;
  --wsj-text-muted: #999999;
  --wsj-accent: #9b1d20;       /* deep power red */
  --wsj-accent-light: #c0392b;
  --wsj-ticker-bg: #1a1d23;    /* dark ticker bar */
  --wsj-ticker-text: #e0e0e0;
  --wsj-ticker-value: #ffffff;
  --wsj-ticker-up: #16a34a;
  --wsj-ticker-down: #dc2626;
  --wsj-nav-bg: #ffffff;
  --wsj-nav-border: #d4d4d4;
  --wsj-font-serif: Georgia, "Times New Roman", Times, serif;
  --wsj-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wsj-max-width: 1280px;
  --wsj-content-width: 1200px;
}

body {
  font-family: var(--wsj-font-sans);
  background: var(--wsj-bg);
  color: var(--wsj-text);
  line-height: 1.5;
}

/* ── Ticker Bar ── */
.ticker-bar {
  background: var(--wsj-ticker-bg);
  border-bottom: 1px solid #333;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-inner {
  max-width: var(--wsj-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 1rem;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  padding: 0 0.75rem;
  border-right: 1px solid #333;
  color: var(--wsj-ticker-text);
  white-space: nowrap;
}
.ticker-item:last-child { border-right: none; }
.ticker-label { font-weight: 600; color: var(--wsj-ticker-value); }
.ticker-value { font-weight: 700; color: var(--wsj-ticker-value); }
.ticker-change { font-size: 0.65rem; }
.ticker-change.up { color: var(--wsj-ticker-up); }
.ticker-change.down { color: var(--wsj-ticker-down); }

/* ── Masthead ── */
.masthead {
  background: var(--wsj-surface);
  border-bottom: 1px solid var(--wsj-border);
  text-align: center;
  padding: 1.25rem 1rem 0.75rem;
}
.masthead-inner {
  max-width: var(--wsj-content-width);
  margin: 0 auto;
}
.masthead-date {
  font-size: 0.72rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.masthead-title {
  font-family: var(--wsj-font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--wsj-accent);
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-decoration: none;
}
.masthead-title:hover { color: var(--wsj-accent-light); }
.masthead-tagline {
  font-size: 0.75rem;
  color: var(--wsj-text-secondary);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ── Navigation ── */
.main-nav {
  background: var(--wsj-nav-bg);
  border-bottom: 2px solid var(--wsj-accent);
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-nav-inner {
  max-width: var(--wsj-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 1rem;
}
.main-nav a {
  color: var(--wsj-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 0 0.75rem;
  height: 40px;
  line-height: 40px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--wsj-accent);
  border-bottom-color: var(--wsj-accent);
}
.main-nav .nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.main-nav .nav-search {
  background: none;
  border: 1px solid var(--wsj-border);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: var(--wsj-text);
  outline: none;
  width: 140px;
}
.main-nav .nav-search:focus { border-color: var(--wsj-accent); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--wsj-text); }

/* ── Main Layout ── */
.site-wrapper {
  max-width: var(--wsj-content-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Top Stories / Lead Section ── */
.top-stories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.lead-story { grid-column: 1; }
.lead-story .story-headline {
  font-family: var(--wsj-font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.lead-story .story-headline a {
  color: var(--wsj-text);
  text-decoration: none;
}
.lead-story .story-headline a:hover { color: var(--wsj-accent); }
.lead-story .story-summary {
  font-size: 0.9rem;
  color: var(--wsj-text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.lead-story .story-meta {
  font-size: 0.75rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.story-rail {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.rail-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--wsj-border);
}
.rail-item:last-child { border-bottom: none; }
.rail-item .rail-headline {
  font-family: var(--wsj-font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}
.rail-item .rail-headline a {
  color: var(--wsj-text);
  text-decoration: none;
}
.rail-item .rail-headline a:hover { color: var(--wsj-accent); }
.rail-item .rail-meta {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  margin-top: 0.2rem;
}

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--wsj-border);
}
.section-header .section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wsj-accent);
  white-space: nowrap;
}
.section-header .section-line {
  flex: 1;
  height: 1px;
  background: var(--wsj-border);
}
.section-header .section-link {
  font-size: 0.75rem;
  color: var(--wsj-text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.section-header .section-link:hover { color: var(--wsj-accent); }

/* ── Story Grid (3-column) ── */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.story-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1rem;
  transition: box-shadow 0.2s;
}
.story-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.story-card .card-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wsj-accent);
  margin-bottom: 0.4rem;
}
.story-card .card-headline {
  font-family: var(--wsj-font-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}
.story-card .card-headline a {
  color: var(--wsj-text);
  text-decoration: none;
}
.story-card .card-headline a:hover { color: var(--wsj-accent); }
.story-card .card-summary {
  font-size: 0.82rem;
  color: var(--wsj-text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.story-card .card-meta {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.story-card .card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  text-transform: uppercase;
}
.badge-signal-high { background: #dc2626; color: #fff; }
.badge-signal-med { background: #f59e0b; color: #fff; }
.badge-signal-low { background: #6b7280; color: #fff; }
.badge-stage-construction { background: #16a34a; color: #fff; }
.badge-stage-permitting { background: #2563eb; color: #fff; }
.badge-stage-site { background: #7c3aed; color: #fff; }

/* ── Horizontal Story List ── */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.list-item {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--wsj-border);
  align-items: start;
}
.list-item:last-child { border-bottom: none; }
.list-item .item-headline {
  font-family: var(--wsj-font-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.list-item .item-headline a {
  color: var(--wsj-text);
  text-decoration: none;
}
.list-item .item-headline a:hover { color: var(--wsj-accent); }
.list-item .item-summary {
  font-size: 0.82rem;
  color: var(--wsj-text-secondary);
  margin-bottom: 0.25rem;
}
.list-item .item-meta {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
}
.list-item .item-stat {
  text-align: right;
  font-size: 0.85rem;
}
.list-item .item-stat-value {
  font-weight: 700;
  font-family: var(--wsj-font-sans);
}
.list-item .item-stat-label {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
}

/* ── 2-Column Section ── */
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.sidebar-stories {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--wsj-border);
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 0.75rem;
  align-items: start;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item .sidebar-number {
  font-family: var(--wsj-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wsj-accent);
  line-height: 1;
  opacity: 0.5;
}
.sidebar-item .sidebar-headline {
  font-family: var(--wsj-font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}
.sidebar-item .sidebar-headline a {
  color: var(--wsj-text);
  text-decoration: none;
}
.sidebar-item .sidebar-headline a:hover { color: var(--wsj-accent); }
.sidebar-item .sidebar-meta {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  margin-top: 0.15rem;
}

/* ── Stats Bar (homepage hero) ── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--wsj-border);
  border: 1px solid var(--wsj-border);
  margin-bottom: 1.5rem;
}
.hero-stat {
  background: var(--wsj-surface);
  padding: 1rem;
  text-align: center;
}
.hero-stat-value {
  font-family: var(--wsj-font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wsj-accent);
  line-height: 1.1;
}
.hero-stat-label {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.15rem;
}
.hero-stat-change {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 0.15rem;
}
.hero-stat-change.up { color: var(--wsj-ticker-up); }
.hero-stat-change.down { color: var(--wsj-ticker-down); }

/* ── Footer ── */
.site-footer {
  background: var(--wsj-ticker-bg);
  color: var(--wsj-ticker-text);
  padding: 2rem 1rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--wsj-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand .footer-title {
  font-family: var(--wsj-font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.5;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  font-size: 0.8rem;
  color: #999;
  text-decoration: none;
  padding: 0.2rem 0;
}
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 0.75rem; }
.footer-social a { color: #999; }
.footer-social a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--wsj-content-width);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.72rem;
  color: #666;
  text-align: center;
}

/* ── Content Page (blog, about, FAQ) ── */
.content-page {
  max-width: 720px;
  margin: 0 auto;
}
.content-page h1 {
  font-family: var(--wsj-font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.content-page h2 {
  font-family: var(--wsj-font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
}
.content-page p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--wsj-text-secondary);
  margin-bottom: 1rem;
}
.content-page ul, .content-page ol {
  margin: 0 0 1rem 1.5rem;
  font-size: 0.95rem;
  color: var(--wsj-text-secondary);
  line-height: 1.6;
}

/* ── Page Hero (non-homepage) ── */
.page-hero {
  background: var(--wsj-surface);
  border-bottom: 1px solid var(--wsj-border);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
}
.page-hero h1 {
  font-family: var(--wsj-font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
}
.page-hero p {
  font-size: 0.9rem;
  color: var(--wsj-text-secondary);
  margin-top: 0.5rem;
}

/* ── Company/Utility/Project Detail Pages ── */
.detail-header {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-header h1 {
  font-family: var(--wsj-font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--wsj-text-secondary);
  margin-bottom: 0.75rem;
}
.detail-meta strong { color: var(--wsj-text); font-weight: 600; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.stat-card {
  background: var(--wsj-bg);
  padding: 0.75rem;
  text-align: center;
  border: 1px solid var(--wsj-border);
}
.stat-card-value {
  font-family: var(--wsj-font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--wsj-accent);
}
.stat-card-label {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Signal Score Badge (inline) ── */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.score-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.score-high .score-dot { background: #16a34a; }
.score-high { color: #16a34a; }
.score-med .score-dot { background: #f59e0b; }
.score-med { color: #f59e0b; }
.score-low .score-dot { background: #dc2626; }
.score-low { color: #dc2626; }

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--wsj-border);
  border-radius: 2px;
  color: var(--wsj-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tag:hover { border-color: var(--wsj-accent); color: var(--wsj-accent); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 1.5rem; margin: 1rem 0; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 0; bottom: 0;
  width: 2px; background: var(--wsj-border);
}
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.35rem; top: 0.35rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--wsj-accent); border: 2px solid var(--wsj-surface);
}
.timeline-date { font-size: 0.72rem; color: var(--wsj-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.timeline-event { font-size: 0.85rem; color: var(--wsj-text-secondary); margin-top: 0.15rem; }
.timeline-project { font-size: 0.8rem; font-weight: 600; color: var(--wsj-accent); text-decoration: none; }
.timeline-project:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .top-stories { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .list-item { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .masthead-title { font-size: 1.6rem; }
  .main-nav a { font-size: 0.7rem; padding: 0 0.4rem; }
  .main-nav .nav-search { width: 80px; }
  .sidebar-item { grid-template-columns: 30px 1fr; }
}

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes tickerFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.story-card, .lead-story, .hero-stat {
    animation: fadeInUp 0.5s ease both;
}
.story-card:nth-child(1) { animation-delay: 0.05s; }
.story-card:nth-child(2) { animation-delay: 0.1s; }
.story-card:nth-child(3) { animation-delay: 0.15s; }
.story-card:nth-child(4) { animation-delay: 0.2s; }
.story-card:nth-child(5) { animation-delay: 0.25s; }

/* ── Search Results ── */
.search-form { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.search-form input {
  flex: 1; padding: 0.5rem 0.75rem; font-size: 0.9rem;
  border: 1px solid var(--wsj-border); border-radius: 3px;
  background: var(--wsj-surface); color: var(--wsj-text);
}
.search-form button {
  padding: 0.5rem 1rem; background: var(--wsj-accent); color: #fff;
  border: none; border-radius: 3px; font-weight: 600; cursor: pointer;
}
.search-form button:hover { background: var(--wsj-accent-light); }
.search-result { padding: 0.75rem 0; border-bottom: 1px solid var(--wsj-border); }
.search-result h3 { font-family: var(--wsj-font-serif); font-size: 1.05rem; }
.search-result h3 a { color: var(--wsj-text); text-decoration: none; }
.search-result h3 a:hover { color: var(--wsj-accent); }
.search-result p { font-size: 0.85rem; color: var(--wsj-text-secondary); }

/* ── Admin overrides ── */
.admin-layout { background: var(--wsj-bg); }

/* ═══════════════════════════════════════════════════════════════════════════
   Legacy compatibility — old page content styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* Page titles used by old templates */
.section-title {
  font-family: var(--wsj-font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-title .accent {
  color: var(--wsj-accent);
}
.page-hero h1 {
  font-family: var(--wsj-font-serif);
  font-size: 2.2rem;
  font-weight: 700;
}
.page-hero p {
  font-size: 0.9rem;
  color: var(--wsj-text-secondary);
}

/* Cards for detail pages */
.detail-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.detail-card h2 {
  font-family: var(--wsj-font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.detail-card p, .detail-card li {
  font-size: 0.88rem;
  color: var(--wsj-text-secondary);
  line-height: 1.6;
}
.detail-card ul {
  margin: 0 0 0.5rem 1.25rem;
}

/* Signal gauge for project detail */
.signal-gauge {
  margin: 1rem 0;
}
.gauge-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.gauge-bar {
  height: 8px;
  background: var(--wsj-border);
  border-radius: 4px;
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}
.gauge-fill.high { background: #16a34a; }
.gauge-fill.med { background: #f59e0b; }
.gauge-fill.low { background: #dc2626; }
.gauge-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--wsj-font-serif);
  margin-top: 0.25rem;
}
.gauge-value.high { color: #16a34a; }
.gauge-value.med { color: #f59e0b; }
.gauge-value.low { color: #dc2626; }

/* Detail grids used by company, utility pages */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Market / company header info */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.info-item {
  background: var(--wsj-bg);
  padding: 0.75rem;
  border: 1px solid var(--wsj-border);
}
.info-item-label {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.info-item-value {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* Badge styles */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}
.badge-sector {
  background: var(--wsj-bg);
  border: 1px solid var(--wsj-border);
  color: var(--wsj-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Container class used by old templates */
.container {
  max-width: var(--wsj-content-width);
  margin: 0 auto;
}
.section {
  margin-bottom: 1.5rem;
}

/* Description text */
.section-description {
  font-size: 0.88rem;
  color: var(--wsj-text-secondary);
  margin-bottom: 1rem;
}
.section-link {
  font-size: 0.78rem;
  color: var(--wsj-accent);
  text-decoration: none;
  font-weight: 600;
}
.section-link:hover {
  text-decoration: underline;
}

/* Signals grid */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.signal-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1rem;
}

/* Companies grid */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.company-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1rem;
}

/* Markets grid */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.market-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1rem;
}

/* Market detail cards */
.market-detail-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

/* Timeline (old) */
.recent-updates { margin: 2rem 0; }
.timeline { position: relative; padding-left: 1.5rem; margin: 1rem 0; }
.timeline-line { display: none; }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.35rem; top: 0.35rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--wsj-accent);
}
.timeline-date { font-size: 0.72rem; color: var(--wsj-text-muted); text-transform: uppercase; }
.timeline-event { font-size: 0.85rem; color: var(--wsj-text-secondary); }
.timeline-project { font-size: 0.8rem; font-weight: 600; color: var(--wsj-accent); }

/* Utilities grid */
.utilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.utility-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1rem;
}

/* Detail description */
.detail-description { font-size: 0.9rem; color: var(--wsj-text-secondary); line-height: 1.6; margin-bottom: 0.75rem; }

/* Key drivers list */
.key-drivers { list-style: none; padding: 0; }
.key-drivers li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--wsj-border);
  font-size: 0.85rem;
  color: var(--wsj-text-secondary);
}
.key-drivers li:last-child { border-bottom: none; }

/* Definition lists for detail pages */
.definition-list { margin: 1rem 0; }
.definition-list dt {
  font-size: 0.7rem;
  color: var(--wsj-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.75rem;
}
.definition-list dd {
  font-size: 0.9rem;
  color: var(--wsj-text);
  margin-top: 0.1rem;
}

/* Admin dashboard overrides */
.admin-layout { background: var(--wsj-bg); }
.admin-layout body { background: var(--wsj-bg); }

/* ═══════════════════════════════════════════════════════════════════════════
   Legacy compatibility — old page content styles
   ═══════════════════════════════════════════════════════════════════════════ */

.section-title {
  font-family: var(--wsj-font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-title .accent { color: var(--wsj-accent); }
.page-hero h1 {
  font-family: var(--wsj-font-serif);
  font-size: 2.2rem;
  font-weight: 700;
}
.page-hero p { font-size: 0.9rem; color: var(--wsj-text-secondary); }

.detail-card {
  background: var(--wsj-surface);
  border: 1px solid var(--wsj-border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.detail-card h2 {
  font-family: var(--wsj-font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.detail-card p, .detail-card li { font-size: 0.88rem; color: var(--wsj-text-secondary); line-height: 1.6; }
.detail-card ul { margin: 0 0 0.5rem 1.25rem; }

.gauge-bar { height: 8px; background: var(--wsj-border); border-radius: 4px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 4px; transition: width 1s ease; }
.gauge-fill.high { background: #16a34a; }
.gauge-fill.med { background: #f59e0b; }
.gauge-fill.low { background: #dc2626; }
.gauge-value { font-size: 1.5rem; font-weight: 700; font-family: var(--wsj-font-serif); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.info-item { background: var(--wsj-bg); padding: 0.75rem; border: 1px solid var(--wsj-border); }
.info-item-label { font-size: 0.7rem; color: var(--wsj-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-item-value { font-size: 0.95rem; font-weight: 600; margin-top: 0.15rem; }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 2px; }
.badge-sector { background: var(--wsj-bg); border: 1px solid var(--wsj-border); color: var(--wsj-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.container { max-width: var(--wsj-content-width); margin: 0 auto; }
.section { margin-bottom: 1.5rem; }
.section-description { font-size: 0.88rem; color: var(--wsj-text-secondary); margin-bottom: 1rem; }
.section-link { font-size: 0.78rem; color: var(--wsj-accent); text-decoration: none; font-weight: 600; }
.section-link:hover { text-decoration: underline; }

.signals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.signal-card { background: var(--wsj-surface); border: 1px solid var(--wsj-border); padding: 1rem; }
.companies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.company-card { background: var(--wsj-surface); border: 1px solid var(--wsj-border); padding: 1rem; }
.markets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.market-card { background: var(--wsj-surface); border: 1px solid var(--wsj-border); padding: 1rem; }
.market-detail-card { background: var(--wsj-surface); border: 1px solid var(--wsj-border); padding: 1.25rem; margin-bottom: 1rem; }
.utilities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.utility-card { background: var(--wsj-surface); border: 1px solid var(--wsj-border); padding: 1rem; }

.detail-description { font-size: 0.9rem; color: var(--wsj-text-secondary); line-height: 1.6; margin-bottom: 0.75rem; }
.key-drivers { list-style: none; padding: 0; }
.key-drivers li { padding: 0.4rem 0; border-bottom: 1px solid var(--wsj-border); font-size: 0.85rem; color: var(--wsj-text-secondary); }
.key-drivers li:last-child { border-bottom: none; }

.definition-list { margin: 1rem 0; }
.definition-list dt { font-size: 0.7rem; color: var(--wsj-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.75rem; }
.definition-list dd { font-size: 0.9rem; color: var(--wsj-text); margin-top: 0.1rem; }
