:root {
  --bg: #f3f6f4;
  --bg-elevated: #ffffff;
  --bg-muted: #e7eee9;
  --text-primary: #1a2420;
  --text-secondary: #5a6b63;
  --accent: #0f6b4c;
  --accent-soft: #d8ebe2;
  --accent-hover: #0c563d;
  --warn: #9a4a1c;
  --warn-soft: #f3e2d4;
  --good: #1f6b45;
  --good-soft: #d9eee3;
  --divider: #c9d5ce;
  --card-shadow: 0 12px 40px rgba(26, 36, 32, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --hero-glow: radial-gradient(ellipse 80% 60% at 15% 20%, rgba(15, 107, 76, 0.18), transparent 55%),
               radial-gradient(ellipse 70% 50% at 90% 10%, rgba(154, 74, 28, 0.12), transparent 50%),
               linear-gradient(165deg, #eef4f0 0%, #f7faf8 45%, #e8f0eb 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(243, 246, 244, 0.92), rgba(243, 246, 244, 0.92)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(15, 107, 76, 0.03) 11px,
      rgba(15, 107, 76, 0.03) 12px
    );
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.47059;
}

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

/* --- Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 250, 248, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(26, 36, 32, 0.08);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.nav__mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(160deg, #146b4d 0%, #0f5740 100%);
  color: #f4faf7;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(15, 107, 76, 0.22);
}

.nav__brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.nav__brand-text strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__brand-text small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.nav__menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.nav__links a {
  padding: 8px 11px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--accent);
  background: rgba(15, 107, 76, 0.08);
}

.nav__links a.is-active {
  color: var(--accent);
  background: rgba(15, 107, 76, 0.12);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid rgba(26, 36, 32, 0.1);
}

.nav__auth-form {
  display: inline;
  margin: 0;
}

.nav__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav__action--quiet {
  color: var(--text-secondary);
  background: transparent;
}

.nav__action--quiet:hover {
  color: var(--accent);
  background: rgba(15, 107, 76, 0.08);
}

.nav__action--primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 107, 76, 0.2);
}

.nav__action--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav__menu {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav__links {
    order: 2;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  .nav__links::-webkit-scrollbar {
    display: none;
  }

  .nav__links a {
    flex: 0 0 auto;
  }

  .nav__actions {
    order: 1;
    width: 100%;
    justify-content: flex-end;
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .nav__brand-text small {
    display: none;
  }

  .nav__mark {
    width: 34px;
    height: 34px;
  }
}
/* --- Hero --- */
.hero {
  background: var(--hero-glow);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 64px);
  animation: fade-up 0.7s ease both;
}

.hero__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 0 28px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--divider);
}

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

.btn--lg {
  padding: 14px 24px;
  font-size: 15px;
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* --- Layout --- */
.section {
  padding: 56px clamp(20px, 5vw, 64px);
  max-width: 1120px;
  margin: 0 auto;
  animation: fade-up 0.6s ease both;
}

.section--muted {
  max-width: none;
  background: rgba(231, 238, 233, 0.55);
  border-block: 1px solid rgba(26, 36, 32, 0.05);
}

.section--muted > .section__head,
.section--muted > .flashcard-grid,
.section--muted > .topic-grid,
.section--muted > .insight-grid,
.section--muted > .post-list,
.section--muted > .home-subject-grid,
.section--muted > .home-trend,
.section--muted > .home-mode-grid,
.section--muted > .hub-pulse,
.section--muted > .hub-glossary-band {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.section-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0;
}

.section-lead strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* --- Topic cards --- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
}

.topic-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 150px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
  border-color: rgba(15, 107, 76, 0.35);
}

.topic-card__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.topic-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 10px 0 8px;
  letter-spacing: -0.02em;
}

.topic-card__blurb {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Insight cards --- */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 720px) {
  .insight-grid {
    grid-template-columns: 1fr;
  }
}

.insight-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  border: 1px solid rgba(26, 36, 32, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fade-up 0.55s ease both;
}

.insight-card:nth-child(2) { animation-delay: 0.06s; }
.insight-card:nth-child(3) { animation-delay: 0.12s; }
.insight-card:nth-child(4) { animation-delay: 0.18s; }

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.insight-card--warn {
  background: linear-gradient(160deg, #fff 0%, var(--warn-soft) 120%);
}

.insight-card--good {
  background: linear-gradient(160deg, #fff 0%, var(--good-soft) 120%);
}

.insight-card--neutral {
  background: linear-gradient(160deg, #fff 0%, var(--accent-soft) 130%);
}

.insight-card__topic {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.insight-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
  line-height: 1.2;
}

.insight-card__body {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 48ch;
}

.insight-card__metric {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* --- Flashcards --- */
.flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.flashcard {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.07);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 168px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.flashcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.flashcard--lg {
  padding: 24px;
  min-height: 190px;
  border-radius: var(--radius-lg);
  grid-column: span 1;
}

.flashcard--lg .flashcard__value {
  font-size: 36px;
}

.flashcard__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.flashcard__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.flashcard__spark {
  flex-shrink: 0;
  line-height: 0;
  color: var(--text-secondary);
}

.flashcard__spark.up { color: var(--warn); }
.flashcard__spark.down { color: var(--good); }

.sparkline {
  display: block;
}

.flashcard__value {
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 4px;
}

.flashcard__unit {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.flashcard__delta {
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.flashcard__delta.up { color: var(--warn); }
.flashcard__delta.down { color: var(--good); }
.flashcard__delta.flat {
  color: var(--text-secondary);
  font-weight: 500;
}

.flashcard__sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.flashcard__lesson {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  border-top: 1px solid rgba(26, 36, 32, 0.06);
  padding-top: 8px;
}

.flashcard__updated {
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-top: auto;
  padding-top: 6px;
}

/* --- Blog cards --- */
.card {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-link {
  display: block;
}

.card-link:hover .card {
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card__category {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 6px;
  letter-spacing: -0.02em;
}

.post-card__summary {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 10px;
}

.post-card__meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.post-body {
  font-size: 18px;
  line-height: 1.65;
  max-width: 680px;
}

.post-body p {
  margin: 0 0 20px;
}

.empty-state {
  color: var(--text-secondary);
  font-size: 15px;
  padding: 24px 0;
}

.empty-state a {
  color: var(--accent);
  font-weight: 600;
}

/* --- Public market / legal pages --- */
.page-hero {
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 64px) clamp(28px, 4vw, 40px);
  background:
    radial-gradient(ellipse 70% 60% at 10% 0%, rgba(15, 107, 76, 0.14), transparent 55%),
    linear-gradient(165deg, #eef4f0 0%, #f7faf8 50%, #e8f0eb 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.page-hero--gold {
  background:
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(180, 120, 40, 0.16), transparent 50%),
    linear-gradient(165deg, #f7f3e8 0%, #faf8f2 55%, #eef4f0 100%);
}

.page-hero--forex {
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(40, 90, 140, 0.12), transparent 50%),
    linear-gradient(165deg, #eef3f7 0%, #f7faf8 55%, #e8f0eb 100%);
}

.page-hero--fuel {
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(154, 74, 28, 0.12), transparent 50%),
    linear-gradient(165deg, #f6efe8 0%, #f7faf8 55%, #eef4f0 100%);
}

.page-hero--tool {
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, rgba(15, 107, 76, 0.16), transparent 55%),
    linear-gradient(165deg, #e8f2ec 0%, #f7faf8 60%, #eef4f0 100%);
}

.page-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
  max-width: 18ch;
}

.page-hero__lead {
  margin: 0;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 62ch;
}

.page-hero__meta {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.hub-card {
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
}

.hub-card--gold { background: linear-gradient(165deg, #fff 0%, #f4efd8 130%); }
.hub-card--forex { background: linear-gradient(165deg, #fff 0%, #e7eef5 130%); }
.hub-card--fuel { background: linear-gradient(165deg, #fff 0%, #f3ebe2 130%); }
.hub-card--tool { background: linear-gradient(165deg, #fff 0%, #eaf3ee 130%); }

.hub-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hub-card__title {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 8px 0 8px;
  letter-spacing: -0.02em;
}

.hub-card__blurb {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  flex: 1;
}

.hub-card__metric {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
}

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

.metric-row--three {
  grid-template-columns: repeat(3, 1fr);
}

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

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

.range-tabs__item {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 36, 32, 0.1);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.range-tabs__item:hover {
  color: var(--text-primary);
  border-color: rgba(15, 107, 76, 0.35);
}

.range-tabs__item.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.currency-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  padding: 2px;
}

.currency-picker__item {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 36, 32, 0.1);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.currency-picker__item.is-featured {
  border-color: rgba(40, 90, 140, 0.28);
}

.currency-picker__item.is-active {
  background: #2a4f73;
  border-color: #2a4f73;
  color: #fff;
}

.history-chart-wrap {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px 12px 8px;
  color: var(--accent);
}

.history-chart-wrap--gold {
  color: #9a6b1f;
}

.history-chart-wrap--silver {
  color: #5a6a78;
}

.history-chart-wrap--forex {
  color: #2a4f73;
}

.history-chart {
  display: block;
  color: inherit;
}

.flashcard--link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.flashcard--link:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

@media (max-width: 800px) {
  .metric-row--three {
    grid-template-columns: 1fr;
  }
}

.metric-panel {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.metric-panel__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-panel__value {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-panel__value span {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 8px;
}

.metric-panel__delta {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.metric-panel__delta.up { color: var(--warn); }
.metric-panel__delta.down { color: var(--good); }
.metric-panel__delta.flat { color: var(--text-secondary); }

.metric-panel__chart {
  margin-top: 14px;
  color: var(--accent);
}

.convert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.convert-tile {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.convert-tile span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.convert-tile strong {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.prose {
  max-width: 680px;
}

.prose--wide {
  max-width: 760px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 28px 0 10px;
}

.prose p,
.prose li {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: justify;
}

.prose ul {
  padding-left: 1.2em;
}

.prose a {
  color: var(--accent);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: rgba(231, 238, 233, 0.55);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 20px;
  align-items: start;
}

.tool-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.tool-result {
  background: linear-gradient(160deg, #10291f 0%, #1a5744 100%);
  color: #eef7f2;
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 220px;
}

.tool-result__from {
  margin: 0;
  opacity: 0.7;
  font-size: 14px;
}

.tool-result__to {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tool-result__explain {
  margin: 16px 0 0;
  font-size: 14px;
  opacity: 0.8;
  max-width: 40ch;
}

.tool-result .hint {
  color: rgba(238, 247, 242, 0.65);
}

.footer--rich {
  text-align: left;
  padding-top: 40px;
}

.footer__grid {
  max-width: 1120px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 24px;
}

.hub-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.hub-side-links {
  display: grid;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 18px;
}

.hub-side-links a {
  font-weight: 600;
  color: var(--accent);
  font-size: 14px;
}

.article-list {
  display: grid;
  gap: 10px;
}

.article-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.article-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.article-row__topic {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.article-row__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.article-row__summary {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.article-row__meta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hub-article-body h2 {
  margin-top: 1.6em;
}

/* --- Hub home (destination) --- */
.hub-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(72vh, 580px);
  padding: clamp(56px, 9vw, 100px) clamp(20px, 5vw, 64px) clamp(72px, 10vw, 120px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 12% 8%, rgba(15, 107, 76, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 45% at 92% 18%, rgba(42, 79, 115, 0.12), transparent 50%),
    linear-gradient(168deg, #dfece6 0%, #f4f8f5 42%, #e4eee8 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.hub-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.45), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.hub-hero__ridges {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(120px, 22vw, 220px);
  z-index: 0;
  color: var(--accent);
}

.hub-hero__ridge {
  animation: hub-ridge 8s ease-in-out infinite alternate;
}

.hub-hero__ridge--far {
  fill: rgba(15, 107, 76, 0.08);
  animation-delay: 0s;
}

.hub-hero__ridge--mid {
  fill: rgba(15, 107, 76, 0.14);
  animation-delay: 0.2s;
}

.hub-hero__ridge--near {
  fill: rgba(11, 70, 50, 0.2);
  animation-delay: 0.4s;
}

.hub-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.hub-hero__brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--accent);
  animation: hub-rise 0.7s ease both;
}

.hub-hero__title {
  margin: 0 0 16px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  animation: hub-rise 0.75s ease 0.08s both;
}

.hub-hero__lead {
  margin: 0;
  max-width: 48ch;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.45;
  color: var(--text-secondary);
  animation: hub-rise 0.75s ease 0.16s both;
}

.hub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  animation: hub-rise 0.75s ease 0.24s both;
}

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

.hub-featured__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-featured__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
}

.hub-featured__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hub-featured__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hub-featured__summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
}

.hub-featured__meta {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.hub-pulse__cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  min-height: 118px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hub-pulse__cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.hub-pulse__cell--gold { background: linear-gradient(165deg, #fff 0%, #f4efd8 140%); }
.hub-pulse__cell--forex { background: linear-gradient(165deg, #fff 0%, #e7eef5 140%); }
.hub-pulse__cell--fuel { background: linear-gradient(165deg, #fff 0%, #f3ebe2 140%); }
.hub-pulse__cell--tool { background: linear-gradient(165deg, #fff 0%, #eaf3ee 140%); }

.hub-pulse__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hub-pulse__value {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hub-pulse__hint {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-secondary);
}

.hub-desks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hub-desk {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  animation: hub-rise 0.6s ease both;
}

.hub-desk:nth-child(1) { animation-delay: 0.02s; }
.hub-desk:nth-child(2) { animation-delay: 0.06s; }
.hub-desk:nth-child(3) { animation-delay: 0.1s; }
.hub-desk:nth-child(4) { animation-delay: 0.14s; }
.hub-desk:nth-child(5) { animation-delay: 0.18s; }
.hub-desk:nth-child(6) { animation-delay: 0.22s; }

.hub-desk--forex { background: linear-gradient(165deg, #fff 0%, #e8eef5 160%); }
.hub-desk--gold { background: linear-gradient(165deg, #fff 0%, #f3ecd8 160%); }
.hub-desk--fuel { background: linear-gradient(165deg, #fff 0%, #f2e9e1 160%); }
.hub-desk--remit { background: linear-gradient(165deg, #fff 0%, #e6f1eb 160%); }
.hub-desk--place { background: linear-gradient(165deg, #fff 0%, #e9eef2 160%); }
.hub-desk--life { background: linear-gradient(165deg, #fff 0%, #ecf1ea 160%); }

.hub-desk__head {
  display: block;
  margin-bottom: 14px;
}

.hub-desk__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.hub-desk__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hub-desk__blurb {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.hub-desk__pages {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
}

.hub-desk__pages li + li {
  border-top: 1px solid rgba(26, 36, 32, 0.06);
}

.hub-desk__pages a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.hub-desk__pages a:hover {
  color: var(--accent);
}

.hub-desk__pages span {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.hub-desk__more {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.hub-glossary-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
}

.hub-glossary-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hub-glossary-preview {
  margin: 0;
  display: grid;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  padding: 8px 20px;
}

.hub-glossary-preview__item {
  display: grid;
  grid-template-columns: minmax(88px, 130px) 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(26, 36, 32, 0.07);
}

.hub-glossary-preview__item:last-child {
  border-bottom: 0;
}

.hub-glossary-preview__item dt {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hub-glossary-preview__item dd {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.hub-close {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(15, 107, 76, 0.1), transparent 55%),
    var(--bg-elevated);
}

.hub-close .section-title {
  margin-bottom: 8px;
}

.hub-close .section-lead {
  margin: 0;
  max-width: 48ch;
}

.hub-close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@keyframes hub-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hub-ridge {
  from { transform: translateY(6px); }
  to { transform: translateY(0); }
}

@media (max-width: 900px) {
  .hub-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hub-glossary-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hub-featured,
  .hub-desks {
    grid-template-columns: 1fr;
  }

  .hub-hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: 40px;
  }

  .hub-glossary-preview__item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero__ridge,
  .hub-hero__brand,
  .hub-hero__title,
  .hub-hero__lead,
  .hub-hero__actions,
  .hub-desk {
    animation: none;
  }
}

.glossary {
  margin: 0;
  display: grid;
  gap: 0;
}

.glossary__item {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(26, 36, 32, 0.08);
}

.glossary__item dt {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.glossary__item dd {
  margin: 0;
  color: var(--text-secondary);
}

@media (max-width: 800px) {
  .hub-split,
  .glossary__item,
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Learning platform (quiz home) --- */
.home-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 64px);
  background:
    radial-gradient(ellipse 60% 50% at 8% 0%, rgba(15, 107, 76, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 40% at 100% 10%, rgba(154, 74, 28, 0.08), transparent 50%),
    linear-gradient(165deg, #e8f0eb 0%, #f4f7f5 55%, #e6eee9 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.home-layout {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.78fr);
  gap: 22px;
  align-items: start;
}

.home-main,
.home-aside {
  min-width: 0;
}

.home-intro {
  margin-bottom: 18px;
  animation: home-rise 0.5s ease both;
}

.home-intro__title {
  margin: 0 0 10px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.home-intro__lead {
  margin: 0 0 16px;
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
}

.home-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.home-intro__secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-aside__mobile-head {
  display: none;
}

.home-search--inline {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: 16px;
  animation: home-rise 0.55s ease 0.05s both;
}

.home-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  max-width: 100%;
  animation: home-rise 0.55s ease 0.08s both;
}

.home-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(26, 36, 32, 0.1);
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.home-mode-chip span {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.home-mode-chip:hover {
  background: #fff;
  border-color: rgba(15, 107, 76, 0.3);
  transform: translateY(-1px);
}

.home-block {
  margin-bottom: 24px;
  animation: home-rise 0.55s ease 0.1s both;
}

.home-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-block__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.home-subject-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-subject-grid--compact .home-subject-card {
  padding: 16px;
}

.home-subject-grid--compact .home-subject-card p {
  font-size: 13px;
}

.home-trend__list--compact {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: 16px;
  padding: 6px 10px;
}

.home-aside {
  position: sticky;
  top: 72px;
  animation: home-rise 0.55s ease 0.12s both;
}

.home-aside__stack {
  display: grid;
  gap: 12px;
}

.home-aside__panel {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(26, 36, 32, 0.05);
}

.home-aside__panel--links {
  padding: 12px 16px;
}

.home-aside__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.home-aside__kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.home-aside__head strong {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.home-aside__head a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.home-aside__updated {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.home-aside__rates {
  display: grid;
  gap: 0;
}

.home-aside__rates a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(26, 36, 32, 0.07);
  font-variant-numeric: tabular-nums;
}

.home-aside__rates a:first-child { border-top: 0; padding-top: 2px; }

.home-aside__rates span {
  font-size: 12px;
  color: var(--text-secondary);
}

.home-aside__rates strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.home-aside__fx,
.home-aside__fuel {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.home-aside__fx li,
.home-aside__fuel li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(26, 36, 32, 0.07);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.home-aside__fx li:first-child,
.home-aside__fuel li:first-child {
  border-top: 0;
  padding-top: 2px;
}

.home-aside__fuel {
  margin-top: 4px;
}

.home-aside__fx span,
.home-aside__fuel span {
  color: var(--text-secondary);
}

.home-aside__wx {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.home-aside__wx a {
  display: grid;
  gap: 2px;
  padding: 8px 6px;
  text-align: center;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid rgba(26, 36, 32, 0.06);
}

.home-aside__wx strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.03em;
}

.home-aside__wx span {
  font-size: 10px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-aside__links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.home-aside__links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  padding: clamp(72px, 12vw, 120px) clamp(20px, 5vw, 64px) clamp(48px, 8vw, 72px);
  background:
    radial-gradient(ellipse 70% 55% at 12% 18%, rgba(15, 107, 76, 0.22), transparent 58%),
    radial-gradient(ellipse 55% 45% at 88% 8%, rgba(154, 74, 28, 0.12), transparent 52%),
    linear-gradient(165deg, #e6efe9 0%, #f4f8f5 42%, #dfeae3 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.home-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.home-hero__ridges {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: min(58%, 420px);
}

.home-hero__ridge {
  animation: home-ridge 1.2s ease both;
}

.home-hero__ridge--far {
  fill: rgba(15, 107, 76, 0.08);
  animation-delay: 0.05s;
}

.home-hero__ridge--mid {
  fill: rgba(15, 107, 76, 0.14);
  animation-delay: 0.18s;
}

.home-hero__ridge--near {
  fill: rgba(11, 70, 50, 0.22);
  animation-delay: 0.3s;
}

.home-hero__inner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.home-hero__brand {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--accent);
  animation: home-rise 0.7s ease both;
}

.home-hero__title {
  margin: 0 0 14px;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(34px, 6.2vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  animation: home-rise 0.75s ease 0.08s both;
}

.home-hero__lead {
  margin: 0 0 26px;
  max-width: 42ch;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.45;
  color: var(--text-secondary);
  animation: home-rise 0.75s ease 0.16s both;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: home-rise 0.75s ease 0.24s both;
}

.home-strip {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 clamp(20px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.home-search,
.home-strip__stats {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(26, 36, 32, 0.08);
}

.home-search {
  padding: 18px 20px;
}

.home-search__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.home-search__row {
  display: flex;
  gap: 10px;
}

.home-search__row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  font: inherit;
  background: #f8fbf9;
}

.home-search__row input:focus {
  outline: 2px solid rgba(15, 107, 76, 0.25);
  border-color: var(--accent);
}

.home-strip__stats {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.home-strip__stats li {
  display: grid;
  place-content: center;
  text-align: center;
  padding: 12px 8px;
  border-radius: 12px;
}

.home-strip__stats strong {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home-strip__stats span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.home-section {
  animation: home-rise 0.7s ease both;
}

.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

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

.home-mode-card {
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8)),
    linear-gradient(145deg, #f7faf8, #e8f0eb);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-mode-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
  border-color: rgba(15, 107, 76, 0.22);
}

.home-mode-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.home-mode-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.home-mode-card p {
  margin: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.home-mode-card__cta {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.home-mode-card--daily .home-mode-card__mark {
  background: var(--warn-soft);
  color: var(--warn);
}

.home-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-subject-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(26, 36, 32, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-subject-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(15, 107, 76, 0.08);
  pointer-events: none;
}

.home-subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.home-subject-card--loksewa {
  background: linear-gradient(155deg, #ffffff 0%, #e7eef6 100%);
}

.home-subject-card--nepal-gk {
  background: linear-gradient(155deg, #ffffff 0%, #e6f2ea 100%);
}

.home-subject-card--vocabulary {
  background: linear-gradient(155deg, #ffffff 0%, #f3efdf 100%);
}

.home-subject-card--english {
  background: linear-gradient(155deg, #ffffff 0%, #f2e9e1 100%);
}

.home-subject-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
}

.home-subject-card__kicker,
.home-subject-card__qs {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-subject-card__kicker { color: var(--accent); }
.home-subject-card__qs { color: var(--text-secondary); }

.home-subject-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.home-subject-card p {
  position: relative;
  margin: 0;
  flex: 1;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  max-width: 36ch;
}

.home-subject-card__cta {
  position: relative;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.home-topic-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 107, 76, 0.25);
  box-shadow: 0 14px 34px rgba(26, 36, 32, 0.07);
}

.home-topic-card__subject {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-topic-card__name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-topic-card__blurb {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.home-topic-card__meta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.home-trend {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.home-trend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.home-trend__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-trend__item:hover {
  transform: translateX(4px);
  box-shadow: var(--card-shadow);
}

.home-trend__n {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.home-trend__body strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.home-trend__body small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.home-trend__go {
  color: var(--accent);
  font-weight: 700;
}

.home-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: end;
  padding: 28px;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background:
    radial-gradient(ellipse 50% 70% at 100% 0%, rgba(15, 107, 76, 0.12), transparent 55%),
    linear-gradient(160deg, #ffffff, #eef5f0);
}

.home-desk__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-desk-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(26, 36, 32, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.home-desk-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 107, 76, 0.28);
}

.home-desk-card strong {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.home-desk-card span {
  font-size: 12px;
  color: var(--text-secondary);
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-ridge {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-mobile-rates {
  display: none;
}

@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr);
  }

  .home-subject-grid--compact {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .home-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Quiz first: markets stay below practice content */
  .home-aside {
    position: static;
    top: auto;
  }

  .home-mobile-rates {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .home-mobile-rates a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 52px;
    padding: 10px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(26, 36, 32, 0.08);
    text-align: left;
  }

  .home-mobile-rates span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .home-mobile-rates strong {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .home-mobile-rates__more {
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
  }

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

  .home-aside__panel--links {
    grid-column: 1 / -1;
  }

  .home-strip,
  .home-trend,
  .home-desk {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: clip;
  }

  .home-intro,
  .home-search--inline,
  .home-mode-row,
  .home-block,
  .home-aside {
    animation: none !important;
  }

  .home-shell {
    padding: 16px max(14px, env(safe-area-inset-right)) 36px max(14px, env(safe-area-inset-left));
    overflow: visible;
  }

  .home-intro {
    margin-bottom: 14px;
  }

  .home-intro__title {
    max-width: none;
    font-size: clamp(26px, 8vw, 34px);
  }

  .home-intro__lead {
    font-size: 15px;
    max-width: none;
  }

  .home-intro__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .home-intro__primary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .home-intro__secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .home-intro__secondary .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .home-mobile-rates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-search--inline {
    margin-bottom: 12px;
    padding: 12px;
  }

  .home-search__row {
    flex-direction: column;
    gap: 8px;
  }

  .home-search__row input {
    width: 100%;
    min-height: 44px;
    font-size: 16px; /* avoid iOS zoom */
  }

  .home-search__row .btn {
    width: 100%;
    min-height: 44px;
  }

  .home-mode-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -14px 16px;
    padding: 0 14px 4px;
  }

  .home-mode-row::-webkit-scrollbar {
    display: none;
  }

  .home-mode-chip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    white-space: nowrap;
  }

  .home-block {
    margin-bottom: 22px;
  }

  .home-block__head h2 {
    font-size: 20px;
  }

  .home-subject-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-subject-grid--compact .home-subject-card {
    padding: 14px 12px;
    min-height: 0;
  }

  .home-subject-grid--compact .home-subject-card h3 {
    font-size: 16px;
  }

  .home-subject-grid--compact .home-subject-card p {
    display: none;
  }

  .home-subject-card__cta {
    font-size: 12px;
  }

  .home-topic-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-topic-card {
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 14px;
  }

  .home-topic-card__subject {
    flex: 1 1 auto;
  }

  .home-topic-card__name {
    flex: 1 1 100%;
    font-size: 16px;
  }

  .home-topic-card__meta {
    margin-top: 0;
    padding-top: 0;
    margin-left: auto;
  }

  .home-trend__item {
    min-height: 48px;
    padding: 10px 8px;
  }

  .home-aside {
    margin-top: 8px;
    padding-top: 8px;
  }

  .home-aside__mobile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
  }

  .home-aside__mobile-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .home-aside__mobile-head a {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
  }

  .home-aside__stack {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 2px 14px 8px;
    scroll-snap-type: x mandatory;
  }

  .home-aside__stack::-webkit-scrollbar {
    display: none;
  }

  .home-aside__panel {
    flex: 0 0 min(78vw, 280px);
    scroll-snap-align: start;
    padding: 14px;
  }

  .home-aside__panel--links {
    grid-column: auto;
  }

  .home-aside__rates a,
  .home-aside__fx li,
  .home-aside__fuel li,
  .home-aside__wx a {
    min-height: 40px;
    align-items: center;
  }

  .home-mode-grid,
  .home-subject-grid,
  .home-desk__cards {
    grid-template-columns: 1fr;
  }

  .home-strip {
    margin-top: 20px;
  }

  .home-strip__stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer--rich {
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }
}

@media (max-width: 360px) {
  .home-subject-grid--compact {
    grid-template-columns: 1fr;
  }

  .home-intro__secondary {
    grid-template-columns: 1fr;
  }

  .nav__brand {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-intro,
  .home-search--inline,
  .home-mode-row,
  .home-block,
  .home-aside,
  .home-section {
    animation: none !important;
  }
}

/* Legacy learn helpers still used on other learn pages */
.learn-hero {
  padding: clamp(48px, 8vw, 88px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 56px);
  background:
    radial-gradient(ellipse 70% 55% at 15% 10%, rgba(15, 107, 76, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 0%, rgba(40, 90, 140, 0.1), transparent 50%),
    linear-gradient(165deg, #eef4f0 0%, #f7faf8 45%, #e8f0eb 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.learn-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.learn-hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 16px;
  max-width: 14ch;
}

.learn-hero__lead {
  margin: 0 0 22px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 58ch;
}

.learn-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mode-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.mode-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.mode-card p {
  margin: 0;
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
}

.mode-card span {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

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

.subject-card {
  display: block;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: linear-gradient(165deg, #fff 0%, #eaf3ee 130%);
  min-height: 140px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.subject-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
}

.subject-card--loksewa { background: linear-gradient(165deg, #fff 0%, #e7eef5 130%); }
.subject-card--nepal-gk { background: linear-gradient(165deg, #fff 0%, #eaf3ee 130%); }
.subject-card--vocabulary { background: linear-gradient(165deg, #fff 0%, #f4efd8 130%); }
.subject-card--english { background: linear-gradient(165deg, #fff 0%, #f3ebe2 130%); }

.subject-card__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.subject-card h3 {
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.02em;
}

.subject-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.quiz-form {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.quiz-q {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(26, 36, 32, 0.1);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.quiz-q legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 15px;
}

.quiz-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quiz-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(26, 36, 32, 0.08);
  cursor: pointer;
  font-weight: 500;
}

.quiz-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* One question per page (reference quiz.php step flow) */
.quiz-step-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 64px) 64px;
}

.quiz-step-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  font-size: 14px;
}

.quiz-step-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.quiz-step-top__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
}

.quiz-step-top__sub {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.quiz-step-top__progress {
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quiz-step-top__progress strong {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
}

.quiz-step-top__progress span {
  color: var(--text-secondary);
  font-size: 14px;
}

.quiz-step-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 36, 32, 0.08);
  overflow: hidden;
  margin-bottom: 18px;
}

.quiz-step-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #1a8f66);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.quiz-step-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: calc(var(--radius-lg) + 2px);
  padding: clamp(20px, 4vw, 28px);
  box-shadow: 0 16px 40px rgba(26, 36, 32, 0.06);
  animation: home-rise 0.45s ease both;
}

.quiz-step-card__qnum {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.quiz-step-card__prompt {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.quiz-step-card__image {
  margin: 0 0 18px;
}

.quiz-step-card__image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.quiz-step-options {
  display: grid;
  gap: 10px;
}

.quiz-step-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(26, 36, 32, 0.1);
  background: #fbfcfb;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.quiz-step-option:hover {
  border-color: rgba(15, 107, 76, 0.35);
  transform: translateY(-1px);
}

.quiz-step-option.is-selected,
.quiz-step-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz-step-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-step-option__key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(26, 36, 32, 0.1);
  font-weight: 700;
  font-size: 13px;
}

.quiz-step-option.is-selected .quiz-step-option__key,
.quiz-step-option:has(input:checked) .quiz-step-option__key {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.quiz-step-option__text {
  padding-top: 3px;
  font-size: 15px;
  line-height: 1.4;
}

.quiz-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
}

.quiz-step-actions__right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}

.quiz-step-auto {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 10ch;
}

@media (max-width: 560px) {
  .quiz-step-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .quiz-step-top__progress {
    text-align: left;
  }

  .quiz-step-auto {
    width: 100%;
    order: -1;
  }
}

.result-shell {
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px) clamp(48px, 7vw, 80px);
  background:
    radial-gradient(ellipse 55% 40% at 8% 0%, rgba(15, 107, 76, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 30% at 95% 8%, rgba(154, 74, 28, 0.08), transparent 50%),
    linear-gradient(165deg, #e8f0eb 0%, #f5f8f6 48%, #e7eee9 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.result-wrap {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 4vw, 32px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(26, 36, 32, 0.08);
  box-shadow: 0 18px 48px rgba(26, 36, 32, 0.07);
}

.result-hero__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.result-hero__lead {
  margin: 0 0 18px;
  max-width: 42ch;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
}

.result-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-score {
  justify-self: center;
  text-align: center;
}

.result-score__ring {
  --pct: 0;
  width: 148px;
  height: 148px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0);
}

.result-hero--excellent .result-score__ring { background: conic-gradient(#0f6b4c calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0); }
.result-hero--strong .result-score__ring { background: conic-gradient(#1f6b45 calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0); }
.result-hero--good .result-score__ring { background: conic-gradient(#2f6f9c calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0); }
.result-hero--fair .result-score__ring { background: conic-gradient(#9a4a1c calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0); }
.result-hero--weak .result-score__ring,
.result-hero--low .result-score__ring { background: conic-gradient(#a33b3b calc(var(--pct) * 1%), rgba(26, 36, 32, 0.1) 0); }

.result-score__inner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  gap: 2px;
  box-shadow: inset 0 0 0 1px rgba(26, 36, 32, 0.06);
}

.result-score__pct {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.result-score__grade {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.result-score__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.result-score__meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.result-stat {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(26, 36, 32, 0.08);
  display: grid;
  gap: 4px;
}

.result-stat span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.result-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.result-stat--ok { color: var(--good); }
.result-stat--bad { color: #a33b3b; }

.result-panel {
  padding: clamp(18px, 3vw, 26px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(26, 36, 32, 0.08);
  box-shadow: 0 14px 40px rgba(26, 36, 32, 0.05);
}

.result-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(26, 36, 32, 0.08);
}

.result-panel__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.result-panel__head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.result-review {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.result-item {
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: #fbfcfb;
}

.result-item.is-ok {
  border-color: rgba(31, 107, 69, 0.22);
  background: linear-gradient(165deg, #fff 0%, #eef8f2 120%);
}

.result-item.is-bad {
  border-color: rgba(163, 59, 59, 0.18);
  background: linear-gradient(165deg, #fff 0%, #faf0f0 120%);
}

.result-item__top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.result-item__n {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.result-item__badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}

.result-item.is-ok .result-item__badge {
  color: #0f6b4c;
  background: rgba(15, 107, 76, 0.1);
}

.result-item.is-bad .result-item__badge {
  color: #a33b3b;
  background: rgba(163, 59, 59, 0.1);
}

.result-item__time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(26, 36, 32, 0.05);
}

.result-item__prompt {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.result-item__image {
  margin: 0 0 12px;
}

.result-item__image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.result-item__options {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.result-item__options li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(26, 36, 32, 0.06);
  font-size: 14px;
  color: var(--text-secondary);
}

.result-item__options li.is-correct {
  color: var(--text-primary);
  border-color: rgba(15, 107, 76, 0.28);
  background: rgba(15, 107, 76, 0.08);
  font-weight: 600;
}

.result-item__options li.is-chosen {
  color: var(--text-primary);
  border-color: rgba(163, 59, 59, 0.28);
  background: rgba(163, 59, 59, 0.06);
}

.result-item__key {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(26, 36, 32, 0.06);
  color: var(--text-primary);
}

.result-item__options li.is-correct .result-item__key {
  background: var(--accent);
  color: #fff;
}

.result-item__options li em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.8;
}

.result-item__explain {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(26, 36, 32, 0.1);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.result-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding-top: 4px;
}

@media (max-width: 720px) {
  .result-hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .result-score {
    justify-self: start;
  }

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

@media (max-width: 420px) {
  .result-hero__actions .btn,
  .result-foot .btn {
    width: 100%;
    justify-content: center;
  }
}

.flash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.flip-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
}

.flip-card summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
}

.flip-card summary::-webkit-details-marker { display: none; }

.flip-card__q {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.flip-card__hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

.flip-card__a {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(26, 36, 32, 0.06);
  padding-top: 12px;
  margin: 0 16px 16px;
}

@media (max-width: 800px) {
  .subject-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .subject-grid {
    grid-template-columns: 1fr;
  }
}

.footer__grid p {
  margin: 8px 0 0;
  max-width: 36ch;
  line-height: 1.5;
}

.footer__grid a {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

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

.footer__head {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer__copy {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--divider);
  text-align: center;
}

@media (max-width: 800px) {
  .hub-grid,
  .metric-row,
  .convert-grid,
  .tool-layout,
  .footer__grid {
    grid-template-columns: 1fr;
  }

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

/* --- Local weather (viewer location) --- */
.section--tight {
  padding-top: 28px;
  padding-bottom: 12px;
}

.local-weather {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--card-shadow);
  animation: fade-up 0.55s ease both;
}

.local-weather__status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.local-weather__card {
  margin-top: 18px;
}

.local-weather__main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.local-weather__place {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.local-weather__province {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

.local-weather__temp {
  margin: 8px 0 0;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.local-weather__temp span {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 2px;
}

.local-weather__condition {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.local-weather__aqi {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.local-weather__aqi-n {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.local-weather__aqi-l {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.aqi--good { background: var(--good-soft); }
.aqi--moderate { background: #f3edd4; }
.aqi--sensitive { background: var(--warn-soft); }
.aqi--unhealthy { background: #f3d4d4; }

.local-weather__meta {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.local-weather__lesson {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(26, 36, 32, 0.06);
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 60ch;
}

/* --- Admin --- */
.admin-body {
  min-height: 100vh;
}

.admin-main {
  padding-top: 32px;
}

.admin-login {
  max-width: 420px;
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.admin-stat {
  background: var(--bg-elevated);
  border: 1px solid rgba(26, 36, 32, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
}

.admin-stat__n {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

.admin-stat__l {
  font-size: 12px;
  color: var(--text-secondary);
}

.admin-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  max-width: 820px;
}

.admin-form--narrow {
  max-width: 360px;
}

.admin-form--inline {
  margin-top: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  font: inherit;
  font-weight: 500;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
}

.admin-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.admin-form .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.admin-form .checkbox input {
  width: auto;
}

.admin-form__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-grid-2,
.admin-grid-3 {
  display: grid;
  gap: 14px;
}

.admin-grid-2 { grid-template-columns: repeat(2, 1fr); }
.admin-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .admin-grid-2,
  .admin-grid-3 {
    grid-template-columns: 1fr;
  }
}

.admin-fieldset {
  border: 1px solid rgba(26, 36, 32, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px 16px;
  margin: 0;
}

.admin-fieldset legend {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 0 6px;
}

.admin-subhead {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 28px 0 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
  vertical-align: top;
}

.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(231, 238, 233, 0.6);
}

.admin-table__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-table__actions form {
  margin: 0;
}

.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--warn);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.hint {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
}

.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flash-stack {
  margin-bottom: 16px;
}

.flash {
  margin: 0 0 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.flash--ok {
  background: var(--good-soft);
  color: var(--good);
}

.flash--error {
  background: #f3d4d4;
  color: #8a2a2a;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--divider);
  padding: 32px clamp(20px, 5vw, 64px);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  background: rgba(231, 238, 233, 0.4);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* --- Public auth --- */
.auth-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 64px) clamp(16px, 4vw, 32px);
  background:
    radial-gradient(ellipse 55% 45% at 12% 0%, rgba(15, 107, 76, 0.16), transparent 58%),
    radial-gradient(ellipse 40% 35% at 100% 10%, rgba(154, 74, 28, 0.1), transparent 55%),
    linear-gradient(165deg, #e8f0eb 0%, #f5f8f6 55%, #e7eee9 100%);
}

.auth-card {
  width: min(100%, 440px);
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(26, 36, 32, 0.08);
  box-shadow: 0 24px 60px rgba(26, 36, 32, 0.1);
  animation: home-rise 0.5s ease both;
}

.auth-card__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.auth-card__lead {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(26, 36, 32, 0.12);
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--text-primary);
}

.auth-form input:focus {
  outline: 2px solid rgba(15, 107, 76, 0.35);
  border-color: rgba(15, 107, 76, 0.45);
}

.auth-form__check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.auth-form__check input {
  width: auto;
  min-height: 0;
}

.auth-form__submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
}

.auth-card__switch {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-card__switch a {
  color: var(--accent);
  font-weight: 600;
}

/* Guest auth prompt */
html.auth-prompt-open,
html.auth-prompt-open body {
  overflow: hidden;
}

.auth-prompt {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.auth-prompt[hidden] {
  display: none !important;
}

.auth-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 28, 22, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Capture clicks so the page behind cannot be used until a choice is made. */
  pointer-events: auto;
}

.auth-prompt__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow: auto;
  margin-bottom: 8px;
  padding: 22px 20px 18px;
  border-radius: 22px 22px 18px 18px;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(15, 107, 76, 0.12), transparent 55%),
    #fff;
  border: 1px solid rgba(26, 36, 32, 0.1);
  box-shadow: 0 28px 70px rgba(14, 28, 22, 0.28);
  animation: home-rise 0.4s ease both;
  pointer-events: auto;
}

.auth-prompt__kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-prompt__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-prompt__lead {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.auth-prompt__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(26, 36, 32, 0.05);
}

.auth-prompt__tab {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-prompt__tab.is-active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(26, 36, 32, 0.08);
}

.auth-prompt__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fde8e8;
  color: #9b1c1c;
  font-size: 13px;
}

.auth-prompt__form {
  display: grid;
  gap: 12px;
}

.auth-prompt__form[hidden] {
  display: none !important;
}

.auth-prompt__form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
}

.auth-prompt__form input[type="email"],
.auth-prompt__form input[type="password"],
.auth-prompt__form input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(26, 36, 32, 0.12);
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.auth-prompt__check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.auth-prompt__check input {
  width: auto;
  min-height: 0;
}

.auth-prompt__form .btn {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
}

.auth-prompt__guest {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(26, 36, 32, 0.08);
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.auth-prompt__guest .btn {
  width: 100%;
  justify-content: center;
}

.auth-prompt__guest small {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

@media (min-width: 720px) {
  .auth-prompt {
    place-items: center;
  }

  .auth-prompt__panel {
    margin-bottom: 0;
    border-radius: 22px;
    padding: 28px 26px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* --- Study guides / blog library --- */
.guides-hero {
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 64px) clamp(28px, 4vw, 40px);
  background:
    radial-gradient(ellipse 65% 55% at 8% 0%, rgba(15, 107, 76, 0.16), transparent 55%),
    radial-gradient(ellipse 45% 40% at 95% 15%, rgba(42, 79, 115, 0.1), transparent 50%),
    linear-gradient(165deg, #e4eee8 0%, #f5f8f6 48%, #e8f0eb 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
}

.guides-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.guides-hero__brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.guides-hero__title {
  margin: 0 0 12px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.guides-hero__lead {
  margin: 0;
  max-width: 54ch;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.45;
}

.guides-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  max-width: 560px;
}

.guides-search input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid rgba(26, 36, 32, 0.12);
  border-radius: var(--radius-md);
  background: #fff;
  font: inherit;
}

.guides-hero__meta {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.guides-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.guides-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 36, 32, 0.1);
  background: var(--bg-elevated);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.guides-filters__chip span {
  font-size: 11px;
  opacity: 0.75;
}

.guides-filters__chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.guides-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.guides-topics__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-right: 4px;
}

.guides-topics__item {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 0;
}

.guides-topics__item.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guides-topics__clear {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 6px;
}

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

.guides-grid--related {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
}

.guide-card__media {
  aspect-ratio: 16 / 9;
  background: #dfe8e3;
  overflow: hidden;
}

.guide-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guide-card__media--plain {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f2ec, #d5e5db);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
}

.guide-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
  flex: 1;
}

.guide-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-card__tags span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.guide-card__summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  flex: 1;
}

.guide-card__meta {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.guides-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  font-weight: 600;
}

.guides-pagination a {
  color: var(--accent);
}

.guides-pagination .is-disabled {
  color: var(--text-secondary);
  opacity: 0.5;
}

.guides-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 36, 32, 0.08);
  background: var(--bg-elevated);
}

.guides-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-article__hero {
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(15, 107, 76, 0.12), transparent 55%),
    linear-gradient(165deg, #eef4f0 0%, #f7faf8 55%, #e8f0eb 100%);
  border-bottom: 1px solid rgba(26, 36, 32, 0.06);
  padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 64px) 0;
}

.guide-article__hero-inner {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: clamp(24px, 4vw, 36px);
}

.guide-article__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.guide-article__crumbs a {
  color: var(--accent);
  font-weight: 600;
}

.guide-article__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.guide-article__deck {
  margin: 0;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.45;
}

.guide-article__meta {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.guide-article__feature {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px) clamp(28px, 4vw, 40px);
}

.guide-article__feature img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  border: 1px solid rgba(26, 36, 32, 0.08);
}

.guide-article__body {
  max-width: 760px;
}

.guide-article__body.post-body,
.post-body {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.post-body p,
.post-body li {
  text-align: justify;
  margin: 0 0 1em;
}

.post-body h2,
.post-body h3 {
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 1.4em 0 0.55em;
  line-height: 1.25;
}

.post-body h2 { font-size: clamp(22px, 3vw, 28px); }
.post-body h3 { font-size: clamp(18px, 2.4vw, 22px); }

.post-body ul,
.post-body ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: 1.1em auto;
}

.post-body a {
  color: var(--accent);
  font-weight: 600;
}

.post-body blockquote {
  margin: 1em 0;
  padding: 0.2em 0 0.2em 1em;
  border-left: 3px solid rgba(15, 107, 76, 0.35);
  color: var(--text-secondary);
  text-align: justify;
}

.guide-article__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
}

@media (max-width: 800px) {
  .guides-grid,
  .guides-grid--related {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile polish (public) --- */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .section,
  .page-shell,
  .quiz-step-shell {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .hero,
  .guides-hero,
  .hub-hero {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .guides-search {
    flex-direction: column;
    align-items: stretch;
    max-width: none;
  }

  .guides-search input[type="search"],
  .guides-search .btn {
    width: 100%;
    min-height: 46px;
  }

  .history-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .range-tabs {
    width: 100%;
  }

  .range-tabs__item {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 42px;
  }

  .currency-picker {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .currency-picker::-webkit-scrollbar {
    display: none;
  }

  .currency-picker__item {
    flex: 0 0 auto;
    min-height: 42px;
  }

  .metric-row,
  .metric-row--three,
  .flashcard-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .table-wrap table {
    min-width: 480px;
  }

  .quiz-option {
    min-height: 48px;
    padding: 14px 14px;
    align-items: center;
  }

  .quiz-option input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .nav__links a,
  .nav__action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .footer {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .auth-prompt__panel {
    width: min(100%, 420px);
    max-height: min(92dvh, 720px);
    overflow-y: auto;
    margin: 12px;
  }

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

  .convert-grid,
  .tool-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero-title,
  .guides-hero h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .guides-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .guides-filters::-webkit-scrollbar {
    display: none;
  }

  .guides-filters__chip {
    flex: 0 0 auto;
  }
}
