/* ═══════════════════════════════════════════════════════════════════════════
   SALARYLAB GUIDES READING SYSTEM
   ───────────────────────────────────────────────────────────────────────────
   Components:
   1. Reading Progress Bar
   2. Table of Contents (TOC) — desktop sticky / mobile accordion
   3. Section Anchor Micro-interaction
   4. Fade-up on Scroll
   5. VS Split Block (Decision guides)
   6. Ink Dark Panel
   7. Contextual CTA Block
   8. Inline User Input Widget
   9. Mobile Responsive overrides
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   1. READING PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber-bright, #D97706) 100%);
  z-index: 9999;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

.reading-progress::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 8px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-bright, #D97706);
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.5);
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. TABLE OF CONTENTS — TOC
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-md) transparent;
  padding: 1rem 0;
  font-size: 0.82rem;
  line-height: 1.5;
  min-width: 180px;
  max-width: 210px;
}

.guide-toc__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 0.65rem;
  padding-left: 0.75rem;
}

.guide-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-toc__item {
  margin: 0;
}

.guide-toc__link {
  display: block;
  padding: 0.3rem 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.guide-toc__link:hover {
  color: var(--text);
  background: var(--bg-2);
}

.guide-toc__link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Mobile TOC accordion */
.guide-toc-mobile {
  display: none;
  margin: 1.25rem 0 1.5rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  overflow: hidden;
}

.guide-toc-mobile__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-2);
  border: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
}

.guide-toc-mobile__toggle svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.guide-toc-mobile__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.guide-toc-mobile__body {
  display: none;
  padding: 0.5rem 0 0.75rem;
  background: var(--bg);
}

.guide-toc-mobile__body.is-open {
  display: block;
}

.guide-toc-mobile__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-toc-mobile__link {
  display: block;
  padding: 0.4rem 1rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.guide-toc-mobile__link:hover {
  color: var(--accent);
}

/* Guide layout with sidebar */
.guide-with-toc {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  align-items: start;
}

.guide-toc-sidebar {
  /* sidebar col */
}

.guide-main-content {
  min-width: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. SECTION ANCHOR MICRO-INTERACTION
   ═══════════════════════════════════════════════════════════════════════════ */
.article h2,
.article--guide h2 {
  scroll-margin-top: 90px;
  position: relative;
  transition: color 0.2s ease;
}

.article h2.section-entered {
  animation: section-in 0.3s ease forwards;
}

@keyframes section-in {
  from {
    opacity: 0.6;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Anchor link on h2 hover */
.section-anchor {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  opacity: 0;
  color: var(--accent);
  font-size: 0.85em;
  text-decoration: none;
  transition: opacity 0.15s ease;
  vertical-align: middle;
}

.article h2:hover .section-anchor,
.article h2:focus-within .section-anchor {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. FADE-UP ON SCROLL (stat cards, callouts, panels)
   ═══════════════════════════════════════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.fade-up[data-delay="1"] { transition-delay: 0.05s; }
.fade-up[data-delay="2"] { transition-delay: 0.12s; }
.fade-up[data-delay="3"] { transition-delay: 0.19s; }
.fade-up[data-delay="4"] { transition-delay: 0.26s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reading-progress {
    transition: none;
  }
  @keyframes section-in {
    from { opacity: 1; transform: none; }
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. VS SPLIT BLOCK — Decision guides
   ═══════════════════════════════════════════════════════════════════════════ */
.vs-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin: 2rem 0 2.25rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-md);
  box-shadow: var(--shadow-sm);
}

.vs-block__side {
  padding: 1.5rem 1.25rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vs-block__side--a {
  border-right: 1px solid var(--border);
  background: var(--accent-soft);
}

.vs-block__side--b {
  background: var(--amber-soft);
}

.vs-block__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.vs-block__side--a .vs-block__label {
  color: var(--accent);
}

.vs-block__side--b .vs-block__label {
  color: var(--amber-accent);
}

.vs-block__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.vs-block__points {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.vs-block__points li {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.vs-block__points li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.45em;
}

.vs-block__side--b .vs-block__points li::before {
  background: var(--amber-accent);
}

/* Center VS divider */
.vs-block__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: var(--bg-3);
  flex-shrink: 0;
  position: relative;
}

.vs-block__divider::before {
  content: 'VS';
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--subtle);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

/* Verdict row below VS block */
.vs-verdict {
  margin: -0.5rem 0 2rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  font-size: 0.875rem;
  color: var(--text-2);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.vs-verdict__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--accent);
  margin-top: 1px;
}

.vs-verdict strong {
  color: var(--text);
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. INK DARK PANEL — key conclusion, decision anchor
   ═══════════════════════════════════════════════════════════════════════════ */
.ink-panel {
  margin: 2.25rem 0;
  padding: 1.75rem 1.5rem;
  background: var(--bg-ink);
  border-radius: var(--r-lg);
  color: #E7E5E4;
  position: relative;
  overflow: hidden;
}

/* Subtle warm noise texture via CSS radial gradient */
.ink-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 90%, rgba(67,56,202,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 90% 10%, rgba(217,119,6,0.1) 0%, transparent 55%);
  pointer-events: none;
}

.ink-panel__kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-bright);
  margin-bottom: 0.6rem;
  position: relative;
}

.ink-panel__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #FAFAF8;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  position: relative;
}

.ink-panel__body {
  font-size: 0.915rem;
  line-height: 1.7;
  color: #A8A29E;
  position: relative;
}

.ink-panel__body strong {
  color: #E7E5E4;
}

.ink-panel__rule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  position: relative;
}

.ink-panel__rule-item {
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--r-md);
}

.ink-panel__rule-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #78716C;
  margin-bottom: 0.35rem;
}

.ink-panel__rule-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #E7E5E4;
  line-height: 1.25;
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. CONTEXTUAL CTA BLOCK
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-cta-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--border-warm);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.guide-cta-block:hover {
  background: rgba(67, 56, 202, 0.13);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.guide-cta-block__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 1px;
}

.guide-cta-block__icon svg {
  width: 18px;
  height: 18px;
}

.guide-cta-block__text {
  flex: 1;
  min-width: 0;
}

.guide-cta-block__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.guide-cta-block__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.guide-cta-block__sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.guide-cta-block__arrow {
  flex-shrink: 0;
  color: var(--accent);
  align-self: center;
  transition: transform 0.15s ease;
}

.guide-cta-block:hover .guide-cta-block__arrow {
  transform: translateX(3px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. INLINE USER INPUT WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */
.inline-widget {
  margin: 2rem 0 2.25rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
}

.inline-widget__header {
  margin-bottom: 1rem;
}

.inline-widget__kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.inline-widget__title {
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.inline-widget__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.inline-widget__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 120px;
}

.inline-widget__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

.inline-widget__input {
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.inline-widget__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.inline-widget__select {
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.inline-widget__select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.inline-widget__btn {
  height: 38px;
  padding: 0 1.1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  align-self: flex-end;
}

.inline-widget__btn:hover {
  background: var(--accent-hover);
}

.inline-widget__btn:active {
  transform: scale(0.97);
}

.inline-widget__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Result area */
.inline-widget__result {
  display: none;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: widget-result-in 0.25s ease forwards;
}

.inline-widget__result.is-visible {
  display: block;
}

@keyframes widget-result-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inline-widget__result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.inline-widget__result-row:last-child {
  border-bottom: none;
}

.inline-widget__result-label {
  color: var(--muted);
}

.inline-widget__result-value {
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
}

.inline-widget__result-value--accent {
  color: var(--accent);
}

.inline-widget__result-value--amber {
  color: var(--amber-accent);
}

.inline-widget__result-note {
  font-size: 0.78rem;
  color: var(--subtle);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* Error state */
.inline-widget__error {
  display: none;
  font-size: 0.82rem;
  color: var(--danger);
  margin-top: 0.4rem;
}

.inline-widget__error.is-visible {
  display: block;
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. MOBILE RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablet: hide sidebar TOC, show mobile accordion */
@media (max-width: 860px) {
  .guide-with-toc {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 var(--page-gutter);
  }

  .guide-toc-sidebar {
    display: none;
  }

  .guide-toc-mobile {
    display: block;
  }
}

/* Phone: VS block stacks vertically */
@media (max-width: 600px) {
  .vs-block {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .vs-block__side--a {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .vs-block__divider {
    width: 100%;
    height: 36px;
    writing-mode: initial;
  }

  .vs-block__divider::before {
    writing-mode: initial;
    transform: none;
  }

  .ink-panel__rule {
    grid-template-columns: 1fr;
  }

  .guide-cta-block {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .inline-widget__fields {
    flex-direction: column;
  }

  .inline-widget__field {
    min-width: unset;
    width: 100%;
  }

  .inline-widget__btn {
    width: 100%;
    height: 42px;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  .vs-verdict {
    flex-direction: column;
    gap: 0.4rem;
  }

  .ink-panel {
    padding: 1.25rem 1rem;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   P2 OCCUPATION COMPONENTS
   ─────────────────────────────────────────────────────────────────────────
   10. Salary Range Bar
   11. Experience Tier Cards
   12. City Comparison Grid
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   10. SALARY RANGE BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.salary-range-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1.5rem 0 1.75rem;
}

.salary-range-item {
  display: grid;
  grid-template-columns: 140px 1fr 72px;
  align-items: center;
  gap: 0.75rem;
}

.salary-range-item__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salary-range-item__track {
  position: relative;
  height: 8px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.salary-range-item__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber-bright) 100%);
  width: 0%;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.salary-range-item.is-visible .salary-range-item__fill {
  width: var(--bar-pct, 60%);
}

.salary-range-item__value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

/* Range bar with min/mid/max labels */
.salary-range-bar {
  margin: 1.5rem 0 1.75rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
}

.salary-range-bar__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.salary-range-bar__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
}

.salary-range-bar__tier {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.salary-range-bar__track {
  position: relative;
  height: 10px;
  background: var(--bg-3);
  border-radius: 99px;
  margin-bottom: 0.5rem;
  overflow: visible;
}

.salary-range-bar__fill {
  position: absolute;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-soft) 0%, var(--accent) 50%, var(--amber-bright) 100%);
  transition: left 0.6s ease, width 0.6s ease;
}

/* marker dot on the bar */
.salary-range-bar__marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 2px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: left 0.6s ease;
  z-index: 2;
}

.salary-range-bar__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--subtle);
}

.salary-range-bar__labels span:nth-child(2) {
  color: var(--accent);
  font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════════════════
   11. EXPERIENCE TIER CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin: 1.5rem 0 1.75rem;
}

.tier-card {
  padding: 1.1rem 1rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.tier-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-warm);
}

.tier-card--highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tier-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  background: var(--bg-2);
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-start;
  margin-bottom: 0.2rem;
}

.tier-card--highlight .tier-card__badge {
  background: rgba(67,56,202,0.12);
  color: var(--accent);
}

.tier-card__level {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.tier-card__salary {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.tier-card--highlight .tier-card__salary {
  color: var(--accent);
}

.tier-card__range {
  font-size: 0.75rem;
  color: var(--muted);
}

.tier-card__note {
  font-size: 0.75rem;
  color: var(--subtle);
  line-height: 1.45;
  margin-top: 0.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   12. CITY COMPARISON GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.7rem;
  margin: 1.5rem 0 1.75rem;
}

.city-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.city-card--top {
  border-color: var(--amber-accent);
  background: var(--amber-soft);
}

.city-card__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-2);
}

.city-card--top .city-card__name {
  color: var(--amber-accent);
}

.city-card__salary {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.city-card__label {
  font-size: 0.7rem;
  color: var(--subtle);
}

.city-card__bar {
  height: 3px;
  border-radius: 99px;
  background: var(--bg-3);
  margin-top: 0.4rem;
  overflow: hidden;
}

.city-card__bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber-bright) 100%);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.city-card.is-visible .city-card__bar-fill {
  width: var(--city-pct, 70%);
}

/* Mobile */
@media (max-width: 600px) {
  .salary-range-item {
    grid-template-columns: 110px 1fr 64px;
    gap: 0.5rem;
  }

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

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

@media (max-width: 400px) {
  .tier-grid,
  .city-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   P3 STATE + ROLE COMPONENTS
   ─────────────────────────────────────────────────────────────────────────
   13. State Rank Bar List
   14. Role Comparison Block
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   13. STATE RANK BAR LIST
   ═══════════════════════════════════════════════════════════════════════════ */
.state-rank-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0 1.75rem;
}

.state-rank-item {
  display: grid;
  grid-template-columns: 24px 160px 1fr 80px;
  align-items: center;
  gap: 0.6rem;
}

.state-rank-item__rank {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--subtle);
  text-align: right;
}

.state-rank-item__name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-rank-item--top .state-rank-item__name {
  color: var(--amber-accent);
  font-weight: 700;
}

.state-rank-item--bottom .state-rank-item__name {
  color: var(--muted);
}

.state-rank-item__track {
  position: relative;
  height: 7px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.state-rank-item__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber-bright) 100%);
  width: 0%;
  transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.state-rank-item.is-visible .state-rank-item__fill {
  width: var(--state-pct, 60%);
}

.state-rank-item--top .state-rank-item__fill {
  background: linear-gradient(90deg, var(--amber-accent) 0%, var(--amber-bright) 100%);
}

.state-rank-item__value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

/* compact 2-col grid variant for longer lists */
.state-rank-list--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem 1.5rem;
}

.state-rank-list--grid .state-rank-item {
  grid-template-columns: 20px 120px 1fr 72px;
  gap: 0.45rem;
}

@media (max-width: 600px) {
  .state-rank-item {
    grid-template-columns: 20px 120px 1fr 68px;
    gap: 0.45rem;
  }
  .state-rank-list--grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   14. ROLE COMPARISON BLOCK
   ═══════════════════════════════════════════════════════════════════════════ */
.role-compare {
  margin: 1.5rem 0 1.75rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.role-compare__header {
  padding: 0.75rem 1.1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 0.5rem;
}

.role-compare__row {
  display: grid;
  grid-template-columns: 1fr 100px 100px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}

.role-compare__row:last-child {
  border-bottom: none;
}

.role-compare__row:hover {
  background: var(--bg-2);
}

.role-compare__row--highlight {
  background: var(--accent-soft);
}

.role-compare__row--highlight:hover {
  background: rgba(67,56,202,0.12);
}

.role-compare__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
}

.role-compare__row--highlight .role-compare__label {
  color: var(--accent);
  font-weight: 700;
}

.role-compare__val {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}

.role-compare__note {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 540px) {
  .role-compare__header,
  .role-compare__row {
    grid-template-columns: 1fr 80px 80px;
    gap: 0.35rem;
    padding: 0.6rem 0.85rem;
  }
  .role-compare__val,
  .role-compare__note {
    font-size: 0.75rem;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   P4 STATE DATA COMPONENTS
   ─────────────────────────────────────────────────────────────────────────
   15. State Comparison Callout (3-col)
   16. Honest Math Panel
   17. Step Connector (P5 reuse)
   18. Timeline (P7 reuse)
   19. Planning Checklist (P8 reuse)
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   15. STATE COMPARISON CALLOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.state-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 1.75rem;
}

.state-compare__card {
  padding: 1rem 0.9rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.state-compare__card--best {
  border-color: var(--forest);
  background: var(--forest-soft);
}

.state-compare__card--worst {
  border-color: var(--border-md);
  background: var(--bg-2);
}

.state-compare__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.state-compare__card--best .state-compare__label {
  color: var(--forest);
}

.state-compare__state {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.state-compare__value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.state-compare__card--best .state-compare__value {
  color: var(--forest);
}

.state-compare__note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 0.2rem;
}

@media (max-width: 540px) {
  .state-compare {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   16. HONEST MATH PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.honest-math {
  margin: 1.5rem 0 1.75rem;
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.honest-math__header {
  padding: 0.75rem 1.1rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.honest-math__row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.honest-math__row:last-child {
  border-bottom: none;
}

.honest-math__row--deduct {
  background: rgba(180, 83, 9, 0.04);
}

.honest-math__row--result {
  background: var(--accent-soft);
  font-weight: 700;
}

.honest-math__label {
  font-size: 0.84rem;
  color: var(--text-2);
}

.honest-math__row--result .honest-math__label {
  color: var(--accent);
  font-weight: 700;
}

.honest-math__value {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.honest-math__row--deduct .honest-math__value {
  color: var(--amber-accent);
}

.honest-math__row--result .honest-math__value {
  color: var(--accent);
  font-size: 1rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   17. STEP CONNECTOR (Explainer guides)
   ═══════════════════════════════════════════════════════════════════════════ */
.step-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0 1.75rem;
  position: relative;
}

.step-flow__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 1.25rem;
}

.step-flow__item:last-child {
  padding-bottom: 0;
}

/* vertical connector line */
.step-flow__item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border-md);
}

.step-flow__item:last-child::before {
  display: none;
}

.step-flow__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.step-flow__item--done .step-flow__num {
  background: var(--forest);
}

.step-flow__content {
  padding-top: 0.45rem;
}

.step-flow__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.step-flow__body {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.6;
}

.step-flow__body strong {
  color: var(--text);
}

@media (max-width: 500px) {
  .step-flow__item {
    grid-template-columns: 30px 1fr;
    gap: 0.6rem;
  }
  .step-flow__num {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }
  .step-flow__item::before {
    left: 14px;
    top: 30px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   18. TIMELINE (Historical guides)
   ═══════════════════════════════════════════════════════════════════════════ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0 1.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border-md);
}

.timeline__item {
  padding: 0 0 1.25rem 1.1rem;
  position: relative;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

/* dot on the timeline */
.timeline__item::before {
  content: '';
  position: absolute;
  left: -1.45rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--accent);
}

.timeline__item--highlight::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline__year {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline__body {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.55;
}


/* ═══════════════════════════════════════════════════════════════════════════
   19. PLANNING CHECKLIST (P8)
   ═══════════════════════════════════════════════════════════════════════════ */
.plan-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0 1.75rem;
}

.plan-checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.plan-checklist__item:hover {
  border-color: var(--border-warm);
  background: var(--accent-soft);
}

.plan-checklist__item--done {
  background: var(--forest-soft);
  border-color: var(--forest);
}

.plan-checklist__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  color: var(--forest);
}

.plan-checklist__item--done .plan-checklist__icon {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.plan-checklist__text {
  flex: 1;
}

.plan-checklist__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.plan-checklist__sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.45;
}


/* ═══════════════════════════════════════════════════════════════════════════
   20. RANK BADGES (replaces medal emojis)
   ═══════════════════════════════════════════════════════════════════════════ */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.45rem;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.rank-badge--gold {
  background: rgba(180, 83, 9, 0.12);
  color: var(--amber-accent);
  border: 1px solid rgba(180, 83, 9, 0.25);
}

.rank-badge--silver {
  background: var(--bg-3);
  color: var(--muted);
  border: 1px solid var(--border-md);
}

.rank-badge--bronze {
  background: var(--bg-2);
  color: var(--subtle);
  border: 1px solid var(--border);
}

/* Inline icon wrapper (replaces contextual emojis) */
.inline-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  vertical-align: middle;
}
