/* Public Economic Calendar page shell — /calendar/.
   Self-contained the same way /pattern-game/page.css and /course/course.css are:
   tokens, nav, footer and card language are copied from the landing page
   (public/index.html) so the calendar reads as the same product. The calendar
   widget itself is styled by /calendar/calendar.css. */

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

:root {
  --bg:      #06090e;
  --sidebar: #090d14;
  --surface: #0e141d;
  --border:  #1c2531;
  --accent:  #00d4ff;
  --accent-2:#7a9bff;
  --violet:  #a78bfa;
  --buy:     #00e676;
  --sell:    #ff3d57;
  --text:    #cbd7e4;
  --muted:   #55677d;
  --mono:    'Roboto Mono', monospace;
  --sans:    'Inter', -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
  --sub-color: #8ba0b8;
  --card-bg: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  --card-border: rgba(255,255,255,0.08);
  --ring: rgba(0,212,255,0.35);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 450;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(0,212,255,0.25); color: #fff; }
img { max-width: 100%; }

/* ── NAV ───────────────────────────────────────────────────────────── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  background: rgba(6,9,14,0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; gap: 16px;
}
.nav-logo {
  font-family: var(--display);
  font-size: 19px; font-weight: 700; letter-spacing: 2.5px; color: #fff;
  text-decoration: none; white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: #b7c5d6;
  text-decoration: none; padding: 8px 10px; border-radius: 8px;
  transition: color .15s ease, background .15s ease; white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--accent); }
.nav-cta-group { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  font-family: var(--sans); font-size: 12px; font-weight: 650; letter-spacing: 0.07em;
  padding: 9px 18px; border: 1px solid rgba(255,255,255,0.14); border-radius: 10px;
  background: rgba(255,255,255,0.03); color: #eaf2fa; cursor: pointer;
  transition: border-color .15s, background .15s; text-decoration: none; display: inline-block;
}
.btn-ghost:hover { border-color: var(--ring); background: rgba(0,212,255,0.06); }
.btn-accent {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.07em;
  padding: 9px 18px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #22ddff, #00a9e8);
  color: #001018; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,212,255,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .15s, box-shadow .15s; text-decoration: none; display: inline-block;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(0,212,255,0.4), inset 0 1px 0 rgba(255,255,255,0.35); }
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.nav-mobile-ctas { display: none; }
.nav-hamburger span { display: block; width: 18px; height: 2px; background: #cbd7e4; border-radius: 2px; }

/* ── SHARED SECTION HEADERS ────────────────────────────────────────── */
.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.24em; color: var(--accent);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.6vw, 46px); font-weight: 700; color: #f4f9ff; line-height: 1.1;
  letter-spacing: -0.022em; margin-bottom: 18px;
}
.section-title span {
  background: linear-gradient(100deg, #22ddff, #eaf6ff 94%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-sub { font-size: 15px; font-weight: 450; color: var(--sub-color); line-height: 1.75; }

main { padding-top: 64px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
/* The live calendar carries a 7-column table AND the reaction rail beside it, so
   it gets a wider measure than the prose sections below it. */
.wrap-wide { max-width: 1340px; }

/* ── HERO ──────────────────────────────────────────────────────────── */
.ec-hero {
  position: relative;
  padding: 48px 0 34px;
  overflow: hidden;
}
.ec-hero::before {
  content: ''; position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 620px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,212,255,0.14), transparent 72%);
}
.ec-hero-inner { position: relative; }
.ec-hero-copy { max-width: 760px; }
.ec-hero h1 {
  font-family: var(--display);
  font-size: clamp(31px, 4.4vw, 50px); font-weight: 700; line-height: 1.06;
  letter-spacing: -0.028em; color: #f4f9ff; margin-bottom: 20px;
}
.ec-hero h1 span {
  background: linear-gradient(100deg, #22ddff, #eaf6ff 94%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ec-hero-lead { font-size: 16px; line-height: 1.75; color: var(--sub-color); margin-bottom: 22px; }
.ec-hero-lead strong { color: #dfeaf6; font-weight: 620; }

.ec-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.ec-fact {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 9px;
  background: rgba(255,255,255,0.035); border: 1px solid var(--card-border);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  color: #b7c5d6;
}
.ec-fact svg { width: 14px; height: 14px; color: var(--accent); flex: none; }

/* Live widget shell. The widget paints its own surface, so this only frames it. */
.ec-widget { position: relative; margin-top: 6px; }

/* ── GENERIC CONTENT SECTIONS ──────────────────────────────────────── */
.ec-section { padding: 64px 0; border-top: 1px solid var(--border); }
.ec-section-head { max-width: 760px; margin-bottom: 38px; }
.ec-prose { max-width: 820px; }
.ec-prose p { font-size: 15px; line-height: 1.82; color: var(--sub-color); margin-bottom: 18px; }
.ec-prose p:last-child { margin-bottom: 0; }
.ec-prose strong { color: #dfeaf6; font-weight: 620; }
.ec-prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(0,212,255,0.28); }
.ec-prose a:hover { border-bottom-color: var(--accent); }
.ec-prose h3 {
  font-family: var(--display);
  font-size: 19px; font-weight: 650; color: #eaf2fa; margin: 30px 0 12px; letter-spacing: -0.012em;
}
.ec-prose ul { list-style: none; display: grid; gap: 10px; margin: 4px 0 20px; }
.ec-prose li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.7; color: var(--sub-color); }
.ec-prose li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

.ec-cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ec-tile {
  padding: 22px 20px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--card-border);
}
.ec-tile-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(0,212,255,0.09); border: 1px solid rgba(0,212,255,0.22);
  color: var(--accent); margin-bottom: 14px;
}
.ec-tile-ico svg { width: 19px; height: 19px; }
.ec-tile h3 { font-family: var(--display); font-size: 16.5px; font-weight: 650; color: #eaf2fa; margin-bottom: 9px; }
.ec-tile p { font-size: 13.5px; line-height: 1.7; color: var(--sub-color); }

/* impact table */
.ec-table-wrap { overflow-x: auto; }
.ec-table {
  width: 100%; min-width: 520px; border-collapse: collapse;
  border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden;
}
.ec-table th, .ec-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ec-table th {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  color: #fff; background: rgba(255,255,255,0.04);
}
.ec-table td { font-size: 13.5px; color: var(--sub-color); }
.ec-table td:first-child { font-family: var(--mono); font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.ec-table tr:last-child td { border-bottom: none; }

/* two-column explainer for the direction panel */
.ec-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; }
.ec-split-demo {
  padding: 20px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  display: grid; gap: 14px;
}
.ec-demo-head { display: flex; flex-direction: column; gap: 5px; }
.ec-demo-ev { font-size: 13.5px; font-weight: 650; color: #eaf2fa; }
.ec-demo-meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); }
.ec-demo-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ec-demo-label { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted); }
.ec-demo-note { font-size: 12px; line-height: 1.6; color: var(--muted); }

/* FAQ */
.ec-faq { display: grid; gap: 10px; max-width: 860px; }
.ec-faq details {
  border: 1px solid var(--card-border); border-radius: 13px;
  background: var(--card-bg); overflow: hidden;
}
.ec-faq summary {
  list-style: none; cursor: pointer; padding: 17px 20px;
  font-size: 14.5px; font-weight: 600; color: #eaf2fa;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.ec-faq summary::-webkit-details-marker { display: none; }
.ec-faq summary::after { content: '+'; color: var(--accent); font-size: 19px; font-weight: 400; flex: none; }
.ec-faq details[open] summary::after { content: '−'; }
.ec-faq-a { padding: 0 20px 18px; font-size: 14px; line-height: 1.75; color: var(--sub-color); }
.ec-faq-a a { color: var(--accent); text-decoration: none; }

/* related links */
.ec-related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 860px; }
.ec-related a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-radius: 12px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  color: #cfe0f0; font-size: 14px; font-weight: 550; text-decoration: none;
  transition: border-color .2s, transform .2s, color .2s;
}
.ec-related a::after { content: '→'; color: var(--accent); flex: none; }
.ec-related a:hover { border-color: rgba(0,212,255,0.32); transform: translateX(4px); color: #fff; }

/* final CTA */
.ec-cta {
  margin: 0 auto; max-width: 860px; text-align: center;
  padding: 44px 34px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(0,212,255,0.1), rgba(122,155,255,0.06) 55%, rgba(255,255,255,0.02));
  border: 1px solid rgba(0,212,255,0.24);
}
.ec-cta h2 { font-family: var(--display); font-size: clamp(23px, 3vw, 33px); font-weight: 700; color: #f4f9ff; margin-bottom: 14px; letter-spacing: -0.02em; }
.ec-cta p { font-size: 14.5px; line-height: 1.75; color: var(--sub-color); max-width: 560px; margin: 0 auto 24px; }
.ec-cta-note { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted); margin-top: 16px; }

.ec-disclaimer {
  max-width: 860px; margin: 34px auto 0;
  font-size: 12px; line-height: 1.7; color: var(--muted); text-align: center;
}

/* ── FOOTER ────────────────────────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--sidebar);
  padding: 64px 32px 34px;
}
.footer-grid {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer-logo { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: 2.5px; color: #fff; text-decoration: none; }
.footer-logo span { color: var(--accent); }
.footer-tagline { font-size: 13.5px; font-weight: 450; color: var(--sub-color); line-height: 1.7; max-width: 300px; }
.footer-col-title { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.22em; color: #fff; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: #8ba0b8; font-size: 13.5px; font-weight: 480; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1160px; margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.footer-copy { font-size: 12.5px; font-weight: 450; color: var(--muted); }
.footer-risk-note { font-size: 12px; font-weight: 500; color: #b06a76; line-height: 1.5; text-align: right; max-width: 620px; }

/* ── RESPONSIVE ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .ec-cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ec-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 900px) {
  nav.site-nav { padding: 0 18px; }
  .nav-hamburger { display: flex; }
  .nav-cta-group { display: none; }
  .nav-links {
    display: none;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(6,9,14,0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 18px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 10px; font-size: 12.5px; }
  .nav-mobile-ctas { display: flex; gap: 10px; margin-top: 12px; }
  .nav-mobile-ctas > a { flex: 1; text-align: center; }
  footer.site-footer { padding: 52px 18px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-risk-note { text-align: left; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 18px; }
  .ec-hero { padding: 30px 0 24px; }
  .ec-section { padding: 46px 0; }
  .ec-cards3 { grid-template-columns: minmax(0, 1fr); }
  .ec-related { grid-template-columns: minmax(0, 1fr); }
  .ec-cta { padding: 32px 20px; border-radius: 16px; }
}
