@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;500;600;700&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --bg-ink: #0f172a;
  --bg-deep: #0b1224;
  --bg-soft: #f4f1ea;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-warm: #f59e0b;
  --text-primary: #0f172a;
  --text-strong: #0f172a;
  --text-muted: #475569;
  --text-light: #e2e8f0;
  --stroke: rgba(15, 23, 42, 0.12);
  --shadow: 0 30px 60px -40px rgba(15, 23, 42, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Sora', sans-serif;
  margin: 0;
  color: var(--text-strong);
  background: radial-gradient(circle at top left, #ccfbf1 0%, rgba(204,251,241,0.3) 40%, transparent 60%),
    linear-gradient(160deg, #f8fafc 0%, #f0fdf8 35%, #fffbeb 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(245,158,11,0.18), transparent 42%),
    radial-gradient(circle at 85% 15%, rgba(15,118,110,0.22), transparent 48%),
    radial-gradient(circle at 50% 85%, rgba(139,92,246,0.08), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
}

.skip-link:focus {
  position: fixed;
  left: 1.5rem;
  top: 1.5rem;
  z-index: 10;
  background: var(--panel-strong);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  position: sticky;
  top: 1rem;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.site-header > *,
.section-header > *,
.grid-3 > *,
.grid-2 > *,
.mini-grid > *,
.policy-links > * {
  min-width: 0;
}

.brand {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
  letter-spacing: 0.08em;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  margin: 0;
}

.brand-tag {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav a {
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  border-color: var(--accent-warm);
  color: var(--text-strong);
}

.header-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.section {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

.section.simulator,
.section#simulator {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.section:hover {
  box-shadow: 0 32px 72px -36px rgba(15,23,42,0.45), 0 0 0 1px rgba(255,255,255,0.7) inset;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1rem 1.1rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--accent-strong);
  margin: 0;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 0;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-note {
  margin: 0.5rem 0 0;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.metric-value {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.metric-label {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-card {
  background: var(--bg-deep);
  color: var(--text-light);
  border-radius: 20px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 30px 60px -50px rgba(15, 23, 42, 0.8);
}

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.7);
  margin: 0;
}

.card-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  color: rgba(226, 232, 240, 0.9);
}

.card-list li {
  padding-left: 1.4rem;
  position: relative;
}

.card-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-warm);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.45rem;
}

.card-cta {
  margin-top: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0.4rem 0 0;
}

.section-title--sm {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.section-description {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0;
  line-height: 1.6;
}

h1.section-title {
  margin: 0.4rem 0 0;
}

.grid-3 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.feature-card,
.step-card,
.source-card {
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 40px -35px rgba(15, 23, 42, 0.4);
}

.feature-card h3,
.step-card h3,
.source-card h3 {
  margin-top: 0;
}

.step-number {
  font-weight: 600;
  color: var(--accent-strong);
  letter-spacing: 0.12em;
}

.source-note {
  margin-top: 1rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.disclosure {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #fff;
  color: var(--text-muted);
}

.policy-links {
  margin-top: 2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.faq-list {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.article-library {
  align-items: stretch;
}

.article-library h2 {
  font-size: 1.1rem;
  margin-top: 0;
}

.resource-callout {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.12));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.resource-callout-text {
  margin: 0;
  font-weight: 600;
}

.resource-link-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.resource-link-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--panel-strong);
  box-shadow: 0 18px 40px -35px rgba(15, 23, 42, 0.4);
  font-weight: 500;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.resource-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(255, 255, 255, 0.98);
}

.reference-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.reference-list a {
  color: var(--accent-strong);
  text-decoration: underline;
}

.simulator {
  overflow: hidden;
}

stock-calculator {
  display: block;
}

.mini-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mini-card {
  background: var(--panel-strong);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px -35px rgba(15, 23, 42, 0.4);
}

.mini-card h3 {
  margin-top: 0;
}

.emphasis-grid .mini-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 241, 0.98));
}

.cta-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.1));
}

.cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
}

.small {
  font-size: 0.9rem;
}

.footer a {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 20px 40px -30px rgba(15, 118, 110, 0.8);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-outline:hover {
  background: rgba(15, 118, 110, 0.08);
}

.light-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.light-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  border-color: rgba(15, 118, 110, 0.2);
  color: var(--accent-strong);
}

.btn-ghost:hover {
  background: rgba(15, 118, 110, 0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

.delay-6 {
  animation-delay: 0.6s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    position: static;
    padding: 1.25rem;
  }

  .nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .header-cta {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-2,
  .mini-grid,
  .resource-link-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 1.5rem;
    margin-top: 2.5rem;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 1rem 0.85rem 2.5rem;
  }

  .section-header {
    align-items: flex-start;
  }

  .site-header {
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tag {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .nav {
    gap: 0.75rem 1rem;
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .section {
    padding: 1.35rem 1rem;
    border-radius: 18px;
    margin-top: 1.5rem;
  }

  .section-kicker {
    letter-spacing: 0.18em;
    font-size: 0.64rem;
  }

  .section-title,
  h1.section-title {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
    line-height: 1.2;
  }

  .section-description {
    max-width: none;
    font-size: 0.96rem;
  }

  .mini-grid,
  .grid-2,
  .grid-3 {
    gap: 0.85rem;
  }

  .feature-card,
  .step-card,
  .source-card,
  .mini-card,
  .resource-link-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .hero-actions,
  .policy-links,
  .cta-actions {
    width: 100%;
  }

  .nav .btn,
  .hero-actions .btn,
  .policy-links .btn,
  .header-cta .btn {
    width: 100%;
  }

  .header-cta {
    width: 100%;
  }

  .footer {
    margin-top: 2rem;
  }
}

@media (max-width: 420px) {
  .page {
    padding-inline: 0.7rem;
  }

  .site-header {
    top: 0.5rem;
  }

  .nav {
    font-size: 0.86rem;
  }

  .btn {
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
  }
}

.content-page {
  min-height: 100vh;
}

.content-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.content-article {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem;
  line-height: 1.8;
}

.content-article h1,
.content-article h2 {
  font-family: 'Fraunces', serif;
}

.content-article h1 {
  margin-top: 0;
}

.content-article a {
  color: var(--accent-strong);
  text-decoration: underline;
}

.content-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── News widget (homepage) ─────────────────────────────────────────────── */

.news-widget-card {
  display: block;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.news-widget-card:hover {
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.news-widget-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.news-widget-source,
.news-widget-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-widget-headline {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-strong);
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.news-widget-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.news-more-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent-strong);
  font-weight: 500;
  text-decoration: none;
}

.news-more-link:hover {
  text-decoration: underline;
}

/* ── News page (news.html) ──────────────────────────────────────────────── */

.news-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.news-filter-btn {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--panel-strong);
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.news-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text-strong);
}

.news-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.news-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-card-source,
.news-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-card-headline {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.news-card-headline a {
  color: var(--text-strong);
  text-decoration: none;
}

.news-card-headline a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.news-card-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Category badges ────────────────────────────────────────────────────── */

.news-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.news-badge--market  { background: #dbeafe; color: #1d4ed8; }
.news-badge--tsla    { background: #d1fae5; color: #065f46; }
.news-badge--nvda    { background: #fef9c3; color: #854d0e; }
.news-badge--amd     { background: #ede9fe; color: #5b21b6; }
.news-badge--pltr    { background: #fee2e2; color: #991b1b; }

/* ── Shared empty / loading states ─────────────────────────────────────── */

.news-loading,
.news-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 1rem 0;
}
