/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --silver-50: #f8f9fa;
  --silver-100: #f1f3f5;
  --silver-200: #e9ecef;
  --silver-300: #dee2e6;
  --silver-400: #ced4da;
  --silver-500: #adb5bd;
  --silver-600: #868e96;
  --silver-700: #495057;
  --silver-800: #343a40;
  --silver-900: #212529;

  --accent: #4263eb;
  --accent-light: #5c7cfa;
  --accent-dark: #3b5bdb;
  --accent-bg: #edf2ff;

  --green: #2b8a3e;
  --green-bg: #ebfbee;
  --red: #c92a2a;
  --red-bg: #fff5f5;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--silver-800);
  background: var(--silver-50);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Header ===== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--silver-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--silver-500), var(--silver-700));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.5px;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--silver-900);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--silver-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--silver-600);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-bg);
  text-decoration: none;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--silver-700);
  border-radius: 2px;
  transition: 0.2s;
}

/* ===== Hero / Live Price ===== */
.hero {
  background: linear-gradient(135deg, var(--silver-900) 0%, var(--silver-700) 100%);
  color: #fff;
  padding: 48px 0 56px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #51cf66;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.hero-date {
  font-size: 15px;
  color: var(--silver-400);
  margin-bottom: 32px;
}

.price-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.price-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 16px;
  backdrop-filter: blur(4px);
  transition: transform 0.2s, background 0.2s;
}

.price-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.price-card-main {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.2);
}

.price-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--silver-400);
  margin-bottom: 8px;
  font-weight: 600;
}

.price-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.price-change {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.price-change.up {
  color: #51cf66;
}

.price-change.down {
  color: #ff6b6b;
}

.price-sublabel {
  margin-top: 6px;
  font-size: 12px;
  color: var(--silver-500);
}

.data-source {
  margin-top: 24px;
  font-size: 12px;
  color: var(--silver-500);
}

/* ===== Sections ===== */
.section {
  padding: 56px 0;
}

.section-alt {
  background: #fff;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--silver-900);
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--silver-600);
  text-align: center;
  margin-bottom: 32px;
}

/* ===== Chart ===== */
.chart-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.chart-btn {
  padding: 8px 20px;
  border: 1px solid var(--silver-300);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--silver-600);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.chart-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.chart-container {
  background: #fff;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  max-height: 400px;
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat {
  background: #fff;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--silver-500);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--silver-900);
}

/* ===== History Table ===== */
.table-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.select-control {
  padding: 8px 16px;
  border: 1px solid var(--silver-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--silver-700);
  background: #fff;
  cursor: pointer;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--silver-200);
  box-shadow: var(--shadow);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.price-table thead {
  background: var(--silver-100);
}

.price-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver-600);
  border-bottom: 2px solid var(--silver-200);
  white-space: nowrap;
}

.price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--silver-100);
  white-space: nowrap;
}

.price-table tbody tr:hover {
  background: var(--silver-50);
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.loading-cell {
  text-align: center;
  color: var(--silver-500);
  padding: 40px 16px !important;
}

.change-up {
  color: var(--green);
  font-weight: 600;
}

.change-down {
  color: var(--red);
  font-weight: 600;
}

/* ===== Calculator ===== */
.calculator-card {
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.calc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--silver-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--silver-300);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font);
  color: var(--silver-800);
  transition: border-color 0.2s;
}

.calc-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66,99,235,0.1);
}

.calc-result {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--silver-900), var(--silver-700));
  border-radius: var(--radius-sm);
  color: #fff;
}

.calc-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--silver-400);
  margin-bottom: 8px;
}

.calc-result-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.calc-result-note {
  font-size: 12px;
  color: var(--silver-500);
  margin-top: 8px;
}

/* ===== Info Cards ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-card {
  background: var(--silver-50);
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--silver-900);
  margin-bottom: 10px;
}

.info-card p {
  font-size: 14px;
  color: var(--silver-600);
  line-height: 1.7;
}

/* ===== SEO Section ===== */
.seo-section {
  background: var(--silver-50);
}

.seo-content {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content p {
  font-size: 15px;
  color: var(--silver-600);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

/* ===== Footer ===== */
.footer {
  background: var(--silver-900);
  color: var(--silver-400);
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-logo-text {
  font-weight: 700;
  color: #fff;
  font-size: 16px;
}

.footer-desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-links h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  color: var(--silver-400);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}

.disclaimer {
  margin-top: 8px;
  font-size: 12px;
  color: var(--silver-600);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--silver-200);
    box-shadow: var(--shadow-md);
  }

  .nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-title {
    font-size: 24px;
  }

  .price-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .price-value {
    font-size: 20px;
  }

  .chart-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .calc-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .hero {
    padding: 32px 0 40px;
  }
}

@media (max-width: 480px) {
  .price-cards {
    grid-template-columns: 1fr;
  }

  .chart-stats {
    grid-template-columns: 1fr;
  }

  .chart-btn {
    padding: 6px 14px;
    font-size: 12px;
  }

  .price-table {
    font-size: 12px;
  }

  .price-table th,
  .price-table td {
    padding: 10px 12px;
  }
}

/* ===== Nav Active State ===== */
.nav-active {
  color: var(--accent) !important;
  background: var(--accent-bg);
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--silver-500);
  padding: 16px 0 8px;
  flex-wrap: wrap;
}

.breadcrumb-link {
  color: var(--silver-600);
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--silver-400);
  margin: 0 2px;
}

.breadcrumb-current {
  color: var(--silver-800);
  font-weight: 600;
}

/* ===== Contextual Intro ===== */
.context-intro {
  max-width: 820px;
  margin: 0 auto 0;
  padding: 32px 0 0;
}

.context-intro h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--silver-900);
  margin-bottom: 12px;
}

.context-intro p {
  font-size: 15px;
  color: var(--silver-600);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ===== FAQ Section ===== */
.faq-section {
  background: #fff;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--silver-200);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--silver-800);
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--silver-50);
}

.faq-icon {
  font-size: 18px;
  color: var(--silver-500);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--silver-600);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ===== Latest Articles ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: #fff;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.article-card .article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.article-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--silver-900);
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-card p {
  font-size: 13px;
  color: var(--silver-600);
  line-height: 1.6;
  flex-grow: 1;
}

.article-card .article-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--silver-500);
}

.articles-cta {
  text-align: center;
  margin-top: 28px;
}

.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ===== Blog Index ===== */
.blog-hero {
  background: linear-gradient(135deg, var(--silver-900), var(--silver-700));
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: 30px;
  font-weight: 800;
}

.blog-hero p {
  font-size: 15px;
  color: var(--silver-400);
  margin-top: 8px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--silver-200);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.blog-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--silver-900);
  margin-bottom: 10px;
  line-height: 1.4;
}

.blog-card p {
  font-size: 14px;
  color: var(--silver-600);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-card .read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ===== Blog Post ===== */
.post-header {
  background: linear-gradient(135deg, var(--silver-900), var(--silver-700));
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.post-header h1 {
  font-size: 28px;
  font-weight: 800;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.3;
}

.post-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--silver-400);
}

.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 56px;
}

.post-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--silver-900);
  margin: 32px 0 14px;
}

.post-content h2:first-of-type {
  margin-top: 0;
}

.post-content p {
  font-size: 16px;
  color: var(--silver-700);
  line-height: 1.8;
  margin-bottom: 16px;
}

.post-content ul, .post-content ol {
  margin: 0 0 16px 24px;
  color: var(--silver-700);
  line-height: 1.8;
}

.post-content li {
  margin-bottom: 6px;
}

.post-content strong {
  color: var(--silver-900);
}

.post-cta {
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 24px 28px;
  background: var(--accent-bg);
  border: 1px solid #c3d4f7;
  border-radius: var(--radius);
  text-align: center;
}

.post-cta p {
  font-size: 15px;
  color: var(--silver-700);
  margin-bottom: 12px;
}

.post-cta a {
  font-weight: 700;
}

/* ===== Static Pages (About, Contact, Privacy, Terms) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--silver-900), var(--silver-700));
  color: #fff;
  padding: 40px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 30px;
  font-weight: 800;
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 56px;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--silver-900);
  margin: 28px 0 12px;
}

.page-content p, .page-content li {
  font-size: 15px;
  color: var(--silver-600);
  line-height: 1.8;
  margin-bottom: 12px;
}

.page-content ul {
  margin: 0 0 16px 24px;
}

.page-content a {
  color: var(--accent);
  font-weight: 500;
}

/* ===== Responsive additions ===== */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-content {
    grid-template-columns: 1fr !important;
  }

  .post-header h1 {
    font-size: 22px;
  }

  .blog-hero h1 {
    font-size: 24px;
  }
}

/* ===== Utility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
