:root {
  --bg: #0f1317;
  --bg-soft: #141a20;
  --surface: #1a2128;
  --surface-strong: #202a33;
  --text: #f6f2e9;
  --text-muted: #b8b4ac;
  --accent: #f5b642;
  --accent-deep: #d28b1b;
  --lime: #8dd970;
  --red: #e06a5f;
  --line: #2b3641;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  background:
    radial-gradient(circle at 8% -5%, rgba(245, 182, 66, 0.16), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(245, 182, 66, 0.1), transparent 34%),
    linear-gradient(180deg, var(--bg), #090c0f 60%);
  line-height: 1.45;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.7rem;
}

p {
  margin: 0;
  color: var(--text-muted);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 14px;
  background: var(--text);
  color: #111;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip-link:focus {
  left: 14px;
}

.container {
  width: min(1220px, calc(100vw - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 12, 16, 0.82);
  backdrop-filter: blur(10px);
}

.nav-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffd172, var(--accent-deep));
  color: #1e1306;
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.brand-word {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: 10px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--text);
  border-color: rgba(245, 182, 66, 0.35);
  background: rgba(245, 182, 66, 0.08);
}

.page-wrap {
  padding: 34px 0 90px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: linear-gradient(180deg, rgba(26, 33, 40, 0.95), rgba(18, 24, 30, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero {
  padding: clamp(20px, 4vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 22px;
  align-items: stretch;
  animation: fade-slide 480ms ease;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-copy p {
  max-width: 68ch;
}

.hero-cta {
  margin-top: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  border: none;
  cursor: pointer;
  color: #1a1204;
  background: linear-gradient(180deg, #ffd378, #f7b332);
  border-radius: 999px;
  padding: 10px 17px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-sentiment {
  border: 1px solid rgba(245, 182, 66, 0.28);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: radial-gradient(circle at top right, rgba(245, 182, 66, 0.2), transparent 50%);
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.metric-value {
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.metric-copy {
  font-size: 0.9rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
  border-radius: var(--radius-sm);
}

.metric-main {
  margin-top: 8px;
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 1.24rem;
  font-weight: 600;
}

.metric-sub {
  margin-top: 5px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.chart-section {
  padding: 16px;
}

.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

.section-head {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.range-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.range-tabs button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.range-tabs button.is-active,
.range-tabs button:hover {
  color: #1e1306;
  border-color: transparent;
  background: linear-gradient(180deg, #ffd27a, #efaf33);
}

select,
input {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 10, 13, 0.6);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.small-text {
  margin-top: 10px;
  font-size: 0.86rem;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--text-muted);
  font-size: 0.77rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  color: var(--text);
  font-size: 0.93rem;
}

.compact-table td,
.compact-table th {
  padding: 7px 8px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

.timeline strong {
  color: var(--text);
  font-size: 0.93rem;
}

.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.tool-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.tool-form label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tool-result {
  color: var(--text);
  font-size: 1rem;
}

.prose {
  padding: 20px;
}

.prose ul {
  margin: 10px 0;
  padding-left: 18px;
}

.prose code {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
  background: rgba(8, 10, 13, 0.75);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-brand {
  color: var(--text);
  font-family: 'Sora', sans-serif;
}

.footer-copy {
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.positive {
  color: var(--lime);
}

.negative {
  color: var(--red);
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .container {
    width: min(1220px, calc(100vw - 24px));
  }

  .nav-row {
    min-height: 62px;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 8px;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

.metric-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }

    .metric-card {
      padding: 12px;
    }

  .two-col {
    grid-template-columns: 1fr;
  }

  .tool-form {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-form label {
    min-width: 0;
  }
}
