/* ============================================================
   SimplyCrypto.info — Main Stylesheet
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   1. CSS Custom Properties
   ============================================================ */
:root {
  /* Colors */
  --color-blue:       #1B4F8A;
  --color-gold:       #E5A825;
  --color-gold-light: #F0C04A;
  --color-dark:       #0D1117;
  --color-dark-card:  #161B22;
  --color-warm-white: #F8F6F1;
  --color-card:       #FFFFFF;
  --color-text:       #1A1A2E;
  --color-text-muted: #4A4A68;
  --color-success:    #2A9D8F;
  --color-warning:    #E76F51;
  --color-border:     #E0DED8;
  --color-border-dark: #30363D;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-code:    'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-gold: 0 4px 20px rgba(229,168,37,0.25);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
  --nav-height: 64px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-warm-white);
  min-height: 100vh;
}

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }

code {
  font-family: var(--font-code);
  font-size: 0.875em;
  background: rgba(27,79,138,0.08);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

strong { font-weight: 600; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-gold);
  color: var(--color-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 10000;
}
.skip-link:focus { top: var(--space-md); }

/* ============================================================
   3. Layout Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 800px;
}

.section {
  padding: var(--space-4xl) 0;
}

.section--dark {
  background: var(--color-dark);
  color: #fff;
}

.section--alt {
  background: #EFEDE7;
}

/* ============================================================
   4. Reading Progress Bar
   ============================================================ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--color-gold);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   5. Navigation
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-dark);
  height: var(--nav-height);
  border-bottom: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  gap: var(--space-lg);
}

/* Logo */
.navbar__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar__logo img {
  height: 36px;
  width: auto;
}

/* Nav links */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar__nav a {
  color: #A0A0B8;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.navbar__nav a:hover,
.navbar__nav a.active {
  color: #fff;
  text-decoration: none;
  border-bottom-color: var(--color-gold);
}

/* Right side */
.navbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Jargon toggle */
.jargon-toggle {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.jargon-toggle__btn {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.jargon-toggle__btn:hover { color: #fff; text-decoration: none; }

.jargon-toggle__btn--active {
  background: var(--color-gold);
  color: var(--color-dark) !important;
}

/* Search icon */
.navbar__search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #A0A0B8;
  display: flex;
  align-items: center;
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
}
.navbar__search-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Hamburger */
.navbar__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: #A0A0B8;
  flex-direction: column;
  gap: 5px;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav */
.navbar__mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-dark);
  border-bottom: 1px solid var(--color-border-dark);
  padding: var(--space-lg);
  z-index: 999;
  flex-direction: column;
  gap: var(--space-md);
}

.navbar__mobile-nav.open { display: flex; }

.navbar__mobile-nav a {
  color: #A0A0B8;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border-dark);
}
.navbar__mobile-nav a:hover { color: #fff; text-decoration: none; }

/* ============================================================
   6. Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1;
}

.btn--gold {
  background: var(--color-gold);
  color: var(--color-dark);
  border-color: var(--color-gold);
}
.btn--gold:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}
.btn--outline:hover {
  background: rgba(229,168,37,0.1);
  transform: translateY(-1px);
}

.btn--dark {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}
.btn--dark:hover {
  background: #1a2030;
  transform: translateY(-1px);
}

.btn--sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn--lg { padding: 0.9rem 2.2rem; font-size: 1.05rem; }

/* ============================================================
   7. Cards
   ============================================================ */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* Gold bottom-border glow on hover */
.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-gold);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.card:hover::after { opacity: 1; }

.card__body { padding: var(--space-xl); }

.card--dark {
  background: var(--color-dark-card);
  border-color: var(--color-border-dark);
  color: #fff;
}

/* ============================================================
   8. Hero Section
   ============================================================ */
.hero {
  position: relative;
  background: var(--color-dark);
  color: #fff;
  padding: var(--space-4xl) 0;
  overflow: hidden;
  text-align: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23E5A825' stroke-width='1.5'%3E%3Ccircle cx='20' cy='30' r='8'/%3E%3Ccircle cx='40' cy='30' r='8'/%3E%3Cline x1='28' y1='30' x2='32' y2='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  animation: hero-drift 30s linear infinite;
}

@keyframes hero-drift {
  from { background-position: 0 0; }
  to   { background-position: 120px 60px; }
}

.hero__content { position: relative; z-index: 1; }

.hero__headline {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero__headline span { color: var(--color-gold); }

.hero__subheadline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #A0A0B8;
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   9. Section Headers
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header__tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.section-header__title {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.section-header--light .section-header__title { color: #fff; }
.section-header--light .section-header__desc { color: #A0A0B8; }

.section-header__desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   10. Article Cards (Learn page + homepage)
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.article-card {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
}

.article-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-xl);
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.article-card__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-blue);
  color: #fff;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.article-card__phase {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: rgba(229,168,37,0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.article-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  line-height: 1.3;
}

.article-card:hover .article-card__title { color: var(--color-blue); }

.article-card__excerpt {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
}

.reading-time-badge {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gold);
  background: rgba(229,168,37,0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Phase Group Headers */
.phase-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-border);
}

.phase-header__num {
  width: 36px;
  height: 36px;
  background: var(--color-blue);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.phase-header__label {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.phase-header__sub {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ============================================================
   11. Learning Path Timeline (Homepage)
   ============================================================ */
.learning-path {
  position: relative;
  padding: var(--space-3xl) 0;
}

.learning-path__phases {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.learning-path__phase-group { }

.learning-path__phase-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-lg);
}

.learning-path__nodes {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.learning-path__node {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none !important;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.learning-path__node:hover {
  border-color: var(--color-gold);
  color: var(--color-blue);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.learning-path__node.completed {
  border-color: var(--color-success);
  background: rgba(42,157,143,0.06);
}

.learning-path__node-dot {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.6rem;
  color: transparent;
}

.learning-path__node.completed .learning-path__node-dot {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

/* ============================================================
   12. Tools Grid (Homepage teaser + Tools page)
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.tool-card {
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.tool-card__inner {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  background: rgba(27,79,138,0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
}

.tool-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.tool-card__desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.tool-card__link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-top: auto;
}

/* ============================================================
   13. Glossary
   ============================================================ */
.alpha-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.alpha-bar__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.alpha-bar__letter:hover,
.alpha-bar__letter.active {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  text-decoration: none;
}

.alpha-bar__letter.empty {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.glossary-group {
  margin-bottom: var(--space-3xl);
  scroll-margin-top: calc(var(--nav-height) + var(--space-lg));
}

.glossary-group__letter {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-blue);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.glossary-card {
  padding: var(--space-lg);
}

.glossary-card__term {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: var(--space-sm);
}

.glossary-card__def {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.glossary-card__link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold);
}

/* ============================================================
   14. Glossary Tooltip
   ============================================================ */
.glossary-term {
  border-bottom: 1px dashed var(--color-gold);
  cursor: help;
  position: relative;
}

.glossary-tooltip {
  position: absolute;
  z-index: 5000;
  width: 300px;
  background: #fff;
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-gold);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md) var(--space-lg);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}

.glossary-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.glossary-tooltip__term {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.glossary-tooltip__def {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0;
}

/* ============================================================
   15. FAQ
   ============================================================ */
.faq-category {
  margin-bottom: var(--space-3xl);
}

.faq-category__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-blue);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.faq-category__title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--color-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.faq-category__items {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item__question {
  width: 100%;
  background: transparent;
  border: none;
  padding: var(--space-lg) var(--space-xl);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--transition), color var(--transition);
}

.faq-item__question:hover {
  background: var(--color-warm-white);
  color: var(--color-blue);
}

.faq-item__question[aria-expanded="true"] {
  background: rgba(27,79,138,0.04);
  color: var(--color-blue);
  font-weight: 600;
}

.faq-item__chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-gold);
  transition: transform var(--transition-slow);
}

.faq-item__question[aria-expanded="true"] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.faq-item__answer-inner {
  padding: 0 var(--space-xl) var(--space-xl);
  padding-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   16. Search Bar
   ============================================================ */
.search-bar {
  position: relative;
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.search-bar input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(27,79,138,0.12);
}

.search-bar__icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* ============================================================
   17. Article Page — Notebook Aesthetic
   ============================================================ */
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-areas: "toc content";
  gap: var(--space-2xl);
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  align-items: start;
}

/* TOC Sidebar */
.article-toc {
  grid-area: toc;
  position: sticky;
  top: calc(var(--nav-height) + var(--space-xl));
}

/* Article container always in its named area */
.article-container {
  grid-area: content;
}

.article-toc__title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.article-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--color-border);
}

.article-toc__item {
  margin-bottom: 0;
}

.article-toc__link {
  display: block;
  padding: 4px var(--space-md);
  font-size: 0.825rem;
  color: var(--color-text-muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color var(--transition), border-color var(--transition);
  line-height: 1.4;
}

.article-toc__link:hover,
.article-toc__link.active {
  color: var(--color-blue);
  border-left-color: var(--color-blue);
  text-decoration: none;
}

/* Article container with notebook styling */
.article-container {
  min-width: 0; /* prevent grid blowout */
  position: relative;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: var(--space-3xl) var(--space-3xl);
  /* Notebook ruled lines */
  background-image:
    linear-gradient(#fff 0, #fff 27px, rgba(27,79,138,0.06) 28px, rgba(27,79,138,0.06) 28px, #fff 29px);
  background-size: 100% 29px;
  background-attachment: local;
}

.article-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.article-header__phase {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.article-header__title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.2;
  color: var(--color-text);
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.article-meta-item {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Article body */
.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-body h2 {
  font-size: 1.4rem;
  margin: var(--space-2xl) 0 var(--space-md);
  color: var(--color-blue);
  padding-top: var(--space-md);
}

.article-body h3 {
  font-size: 1.15rem;
  margin: var(--space-xl) 0 var(--space-sm);
  color: var(--color-text);
}

.article-body p { margin-bottom: var(--space-lg); }
.article-body strong { color: var(--color-blue); }

.article-body ul, .article-body ol {
  margin-bottom: var(--space-lg);
}

.article-body li { margin-bottom: var(--space-sm); }

/* Dividers with chain motif */
.article-body hr,
.chain-divider {
  border: none;
  height: 24px;
  margin: var(--space-2xl) 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cg fill='none' stroke='%231B4F8A' stroke-width='1.5' opacity='0.2'%3E%3Cellipse cx='30' cy='12' rx='12' ry='6'/%3E%3Cellipse cx='60' cy='12' rx='12' ry='6'/%3E%3Cellipse cx='90' cy='12' rx='12' ry='6'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

/* Infographic placeholder */
.infographic {
  margin: var(--space-2xl) 0;
  text-align: center;
}

.infographic__img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
}

/* Article footer nav */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.article-nav__item {
  flex: 1;
  min-width: 200px;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: all var(--transition);
  display: block;
}

.article-nav__item:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.article-nav__item--next { text-align: right; }

.article-nav__dir {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 2px;
}

.article-nav__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

/* Mark as understood button */
.understood-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  background: #fff;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: var(--space-xl);
}

.understood-btn:hover {
  border-color: var(--color-success);
  color: var(--color-success);
}

.understood-btn.done {
  border-color: var(--color-success);
  color: var(--color-success);
  background: rgba(42,157,143,0.06);
}

/* Related glossary */
.related-glossary {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  background: var(--color-warm-white);
  border-radius: var(--radius-lg);
}

.related-glossary__title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.related-glossary__terms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.related-glossary__tag {
  display: inline-block;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--color-blue);
  text-decoration: none;
  transition: all var(--transition);
}

.related-glossary__tag:hover {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  text-decoration: none;
}

/* ============================================================
   18. Affiliate Callout Box
   ============================================================ */
.affiliate-box {
  background: #FFFBF0;
  border: 1px solid rgba(229,168,37,0.3);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-2xl) 0;
}

.affiliate-box__label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.affiliate-box__name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.affiliate-box__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.affiliate-box__cta { }

.affiliate-box__disclaimer {
  margin-top: var(--space-sm);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ============================================================
   19. Tools
   ============================================================ */
.tool-page {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
}

.tool-card-lg {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: var(--space-3xl);
  box-shadow: var(--shadow-md);
}

/* Converter */
.converter__pair {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.converter__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.converter__label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.converter__input {
  font-family: var(--font-code);
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 100%;
  color: var(--color-text);
  background: var(--color-warm-white);
  transition: border-color var(--transition);
  outline: none;
}

.converter__input:focus { border-color: var(--color-blue); }

.converter__select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.converter__select:focus { border-color: var(--color-blue); }

.converter__swap {
  display: flex;
  justify-content: center;
}

.converter__swap-btn {
  background: var(--color-warm-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-blue);
  transition: all var(--transition);
  font-size: 1.1rem;
}
.converter__swap-btn:hover {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
  transform: rotate(180deg);
}

.converter__formula {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  background: var(--color-warm-white);
  border-radius: var(--radius-md);
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Quiz */
.quiz__progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2xl);
  overflow: hidden;
}

.quiz__progress-fill {
  height: 100%;
  background: var(--color-gold);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.quiz__question {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-xl);
  line-height: 1.4;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quiz__option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: #fff;
  font-size: 0.95rem;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  color: var(--color-text);
}

.quiz__option:hover {
  border-color: var(--color-blue);
  background: rgba(27,79,138,0.04);
}

.quiz__option.selected {
  border-color: var(--color-gold);
  background: rgba(229,168,37,0.06);
}

/* Portfolio simulator */
.portfolio__donut-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.portfolio__presets {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.portfolio__sliders-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.portfolio__warning {
  color: #ef4444;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.portfolio__sliders {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Each row: [label+note block] [slider] [value] */
.portfolio__slider-row {
  display: grid;
  grid-template-columns: 180px 1fr 44px;
  align-items: center;
  gap: 1rem;
}

.portfolio__slider-meta {
  min-width: 0;
}

.portfolio__slider-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio__slider-note {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.portfolio__slider-range {
  width: 100%;
  -webkit-appearance: none;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  outline: none;
  cursor: pointer;
  min-width: 0;
}

.portfolio__slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.portfolio__slider-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  cursor: pointer;
  border: 2px solid #fff;
}

.portfolio__slider-val {
  text-align: right;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-gold);
}

.portfolio__total-row {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
}

.portfolio__total-val {
  color: var(--color-gold);
}

.portfolio__right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.portfolio__legend {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  text-align: left;
  font-size: 0.8rem;
}

.portfolio__legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.portfolio__legend li span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.portfolio__risk-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Decoder */
.decoder__step-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
  display: block;
}

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

.decoder__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.decoder__textarea {
  width: 100%;
  min-height: 200px;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  color: var(--color-text);
  line-height: 1.7;
  outline: none;
  transition: border-color var(--transition);
}
.decoder__textarea:focus { border-color: var(--color-blue); }

.decoder__output {
  min-height: 200px;
  padding: var(--space-md);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-warm-white);
  word-wrap: break-word;
}

.decoder__highlight {
  border-bottom: 2px solid var(--color-gold);
  color: var(--color-blue);
  cursor: pointer;
  font-weight: 600;
}

.decoder__summary {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ============================================================
   20. Chain Divider (Section separator)
   ============================================================ */
.section-divider {
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='24' viewBox='0 0 120 24'%3E%3Cg fill='none' stroke='%231B4F8A' stroke-width='1' opacity='0.15'%3E%3Cellipse cx='20' cy='12' rx='10' ry='5'/%3E%3Cellipse cx='40' cy='12' rx='10' ry='5'/%3E%3Cellipse cx='60' cy='12' rx='10' ry='5'/%3E%3Cellipse cx='80' cy='12' rx='10' ry='5'/%3E%3Cellipse cx='100' cy='12' rx='10' ry='5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  margin: var(--space-2xl) 0;
  opacity: 0.7;
}

/* ============================================================
   21. Footer
   ============================================================ */
.footer {
  background: var(--color-dark);
  color: #A0A0B8;
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--color-border-dark);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer__logo img { height: 32px; }

.footer__tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666F7A;
  max-width: 280px;
}

.footer__col-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  color: #666F7A;
  font-size: 0.875rem;
  transition: color var(--transition);
}

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

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer__copyright {
  font-size: 0.8rem;
  color: #4A5568;
}

.footer__disclaimer {
  font-size: 0.8rem;
  color: #4A5568;
  max-width: 500px;
  text-align: right;
}

/* ============================================================
   22. Page Hero (inner pages)
   ============================================================ */
.page-hero {
  background: var(--color-dark);
  color: #fff;
  padding: var(--space-3xl) 0;
}

.page-hero__tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.page-hero__title {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.page-hero__desc {
  color: #A0A0B8;
  font-size: 1.05rem;
  max-width: 560px;
}

/* ============================================================
   23. Progress Profile Card (Quiz result)
   ============================================================ */
.profile-card {
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a2a4a 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
}

.profile-card__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.profile-card__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.profile-card__desc {
  color: #A0A0B8;
  margin-bottom: var(--space-xl);
}

/* ============================================================
   24. Miscellaneous / Utility
   ============================================================ */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-blue { color: var(--color-blue); }
.text-muted { color: var(--color-text-muted); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.mt-xl { margin-top: var(--space-xl); }

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ============================================================
   25. Responsive — Tablet (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "content";
  }

  .article-toc {
    display: none;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

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

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

/* ============================================================
   26. Responsive — Mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --space-4xl: 3rem;
    --space-3xl: 2.5rem;
  }

  .navbar__nav { display: none; }
  .jargon-toggle { display: none; }
  .navbar__search-btn { display: none; }
  .navbar__hamburger { display: flex; }

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

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

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

  .article-container {
    padding: var(--space-xl) var(--space-lg);
    background-image: none; /* Remove ruled lines on mobile */
  }

  .article-nav {
    flex-direction: column;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer__disclaimer { text-align: center; }

  .hero__ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero__ctas .btn { width: 100%; max-width: 280px; }

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

  .alpha-bar__letter { width: 30px; height: 30px; font-size: 0.8rem; }
}

/* ============================================================
   27. Article card — completed indicator
   ============================================================ */
.article-card__completed {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-success);
}

.article-card--completed .article-card__completed {
  display: inline-flex;
}

/* ============================================================
   28. Portfolio Simulator layout
   ============================================================ */
.portfolio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
  align-items: start;
}

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

  .portfolio__slider-row {
    grid-template-columns: 1fr 44px;
    grid-template-rows: auto auto;
  }

  .portfolio__slider-meta {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   29. Advertisement Units
   ============================================================ */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-md) 0;
  overflow: hidden;
}

/* Responsive visibility helpers */
.ad-desk-only  { display: flex; } /* desktop + tablet */
.ad-mob-only   { display: none; } /* mobile only      */
.ad-no-mobile  { display: flex; } /* desktop + tablet */

@media (max-width: 768px) {
  .ad-desk-only { display: none; }
  .ad-mob-only  { display: flex; }
}

@media (max-width: 640px) {
  .ad-no-mobile { display: none; }
}
