/* 
   TypingBoard Blog Article Styles 
   Clean, Unified, and matches standard style.css theme
*/

:root {
  /* Matching standard style.css colors */
  --primary: #2F77AD;
  --primary-dark: #235d87;
  --primary-light: #e6f1f8;
  --accent: #2F77AD;
  --deep: #1a1d2e;
  --ink: #1a1d2e;
  --cream: #ffffff;
  --warm: #f4f7fb;
  --border: #ccdcec;
  --muted: #8a90a8;
  --green: #2b9348;
  --red: #e63946;
  --card-bg: #ffffff;
  --highlight: #eaf3fa;

  /* Font Tokens */
  --font-main: 'IBM Plex Sans Devanagari', sans-serif;
  --font-hindi: 'IBM Plex Sans Devanagari', 'KrutiDev 010', serif;

  /* Font Sizes (Base 16px) */
  --fs-xs: 0.75rem;
  /* 12px */
  --fs-sm: 0.875rem;
  /* 14px */
  --fs-base: 1rem;
  /* 16px */
  --fs-md: 1.0625rem;
  /* 17px */
  --fs-lg: 1.1875rem;
  /* 19px */
  --fs-xl: 1.375rem;
  /* 22px */
  --fs-2xl: 1.625rem;
  /* 26px */
  --fs-hero: clamp(1.75rem, 5vw, 2.625rem);

  /* Layout Tokens */
  --radius: 4px;
  --radius-sm: 2px;
  --line-height: 1.6;
  --line-height-sub: 1.4;
  --padding-art: 2.5rem 0 3.75rem;
  --padding-box: 1.25rem 1.5rem;
  --padding-card: 1.125rem 1.25rem;
  --padding-toc: 1.75rem 2rem;
}

/* Base wrapper to avoid conflicts with global styles */
.article-wrapper {
  font-family: var(--font-main);
  color: var(--ink);
  line-height: var(--line-height);
  font-size: var(--fs-sm);
  background: var(--cream);
  padding: var(--padding-art);
}

.article-wrapper p {
  margin-bottom: 1.125rem;
  color: #1a1d2e;
}

.article-wrapper h1,
.article-wrapper h2,
.article-wrapper h3,
.article-wrapper h4 {
  margin-top: 1.75rem;
  font-family: var(--font-hindi);
  color: var(--deep);
}

.article-wrapper h3 {
  font-size: var(--fs-lg);
  margin: 1.75rem 0 0.75rem;
  font-weight: 700;
}

.article-wrapper h4 {
  font-size: var(--fs-base);
  color: var(--primary);
  margin: 1.25rem 0 0.625rem;
  font-weight: 700;
}

.article-wrapper strong {
  font-weight: 700;
}

.article-wrapper em {
  font-style: normal;
  font-weight: 600;
}

.article-wrapper a {
  color: var(--primary);
  text-decoration: none;
}

.article-wrapper a:hover {
  text-decoration: underline;
}

/* HERO SECTION */
.article-wrapper .hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 3.75rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
  font-family: var(--font-hindi);
}

.article-wrapper .hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1.125rem;
}

.article-wrapper .hero h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.article-wrapper .hero h1 span {
  color: var(--highlight);
  font-weight: 600;
}

.article-wrapper .hero-desc {
  font-size: var(--fs-md);
  max-width: 37.5rem;
  margin: 0 auto 1.75rem;
  font-weight: 300;
  opacity: 0.9;
}

.article-wrapper .hero-meta {
  display: flex;
  justify-content: center;
  gap: 1.375rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--highlight);
}

.article-wrapper .hero-stat-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.article-wrapper .hero-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.875rem 1.375rem;
  text-align: center;
  min-width: 6.875rem;
}

.article-wrapper .hero-stat .num {
  font-size: 1.375rem;
  font-weight: 700;
  color: white;
  display: block;
}

.article-wrapper .hero-stat .lbl {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* LAYOUT */
.article-wrapper .container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* TOC BOX */
.article-wrapper .toc-box {
  background: var(--warm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: var(--padding-toc);
  margin: 2.5rem 0;
}

.article-wrapper .toc-box h3 {
  font-size: var(--fs-base);
  color: var(--primary);
  margin-bottom: 0.875rem;
  font-weight: 600;
  font-family: var(--font-hindi);
  margin-top: 0;
}

.article-wrapper .toc-box ol {
  padding-left: 1.25rem;
  font-family: var(--font-hindi);
  font-size: 0.9375rem;
  line-height: 2.1;
  color: var(--deep);
}

.article-wrapper .toc-box ol li a {
  color: var(--ink);
  transition: color 0.2s;
}

.article-wrapper .toc-box ol li a:hover {
  color: var(--primary);
}

/* SECTIONS */
.article-wrapper .section {
  padding: 3rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-wrapper .section:last-child {
  border-bottom: none;
}

.article-wrapper .section-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.article-wrapper .section-num {
  background: var(--primary);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-hindi);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.article-wrapper .section h2 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--deep);
  line-height: 1.35;
  margin-top: 0;
}

/* BOXES / ALERTS */
.article-wrapper .box {
  border-radius: var(--radius);
  padding: var(--padding-box);
  margin: 1.5rem 0;
  font-family: var(--font-hindi);
  font-size: 0.968rem;
  line-height: 1.85;
}

.article-wrapper .box-analogy {
  background: var(--warm);
  border-left: 4px solid var(--primary);
  color: var(--deep);
}

.article-wrapper .box-analogy::before {
  content: '💡 Analogy: ';
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  color: var(--primary);
}

.article-wrapper .box-tip {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  color: var(--deep);
}

.article-wrapper .box-tip::before {
  content: '🎯 Tip: ';
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  color: var(--primary);
}

.article-wrapper .box-warn {
  background: #fff8e1;
  border-left: 4px solid #f57f17;
  color: #3e2723;
}

.article-wrapper .box-warn::before {
  content: '⚠️ Warning: ';
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  color: #f57f17;
}

.article-wrapper .box-fact {
  background: #f3e5f5;
  border-left: 4px solid #8e24aa;
  color: #4a148c;
}

.article-wrapper .box-fact::before {
  content: '💎 Fact: ';
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  color: #8e24aa;
}

.article-wrapper .box-success {
  background: #e8f5e9;
  border-left: 4px solid var(--green);
  color: #1b5e20;
}

.article-wrapper .box-success::before {
  content: '✅ Note: ';
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  color: var(--green);
}

/* TABLES */
.article-wrapper .table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.article-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-hindi);
  font-size: 0.9rem;
}

.article-wrapper thead {
  background: var(--warm);
  color: var(--deep);
  border-bottom: 2px solid var(--border);
}

.article-wrapper thead th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
}

.article-wrapper tbody tr {
  background: white;
  border-bottom: 1px solid var(--border);
}

.article-wrapper tbody tr:nth-child(even) {
  background: var(--warm);
}

.article-wrapper tbody td {
  padding: 0.8125rem 1rem;
  vertical-align: top;
  line-height: 1.7;
}

/* CARDS / GRIDS */
.article-wrapper .compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media(max-width: 600px) {
  .article-wrapper .compare-grid {
    grid-template-columns: 1fr;
  }
}

.article-wrapper .compare-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  font-family: var(--font-hindi);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: white;
}

.article-wrapper .compare-good {
  background: #f6fdf7;
  border-color: #c8e6c9;
}

.article-wrapper .compare-bad {
  background: #fffafa;
  border-color: #ffcdd2;
}

.article-wrapper .compare-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.article-wrapper .compare-list {
  list-style: none;
  padding-left: 0;
}

.article-wrapper .compare-list li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
  line-height: 1.7;
}

.article-wrapper .compare-list li::before {
  content: '•';
  position: absolute;
  left: 0.375rem;
  color: var(--muted);
}

.article-wrapper .career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.article-wrapper .career-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
  font-family: var(--font-hindi);
  box-shadow: var(--shadow-sm);
}

.article-wrapper .career-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.article-wrapper .career-name {
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 0.375rem;
}

.article-wrapper .career-detail {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.625rem;
}

.article-wrapper .career-speed {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--warm);
  color: var(--primary);
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-weight: 600;
}

/* ROADMAP */
.article-wrapper .roadmap {
  margin: 1.75rem 0;
}

.article-wrapper .roadmap-item {
  display: flex;
  gap: 1.125rem;
  margin-bottom: 0;
  position: relative;
}

.article-wrapper .roadmap-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.18rem;
  top: 2.75rem;
  width: 2px;
  height: calc(100% - 0.625rem);
  background: var(--border);
}

.article-wrapper .roadmap-dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  font-family: var(--font-hindi);
  flex-shrink: 0;
  z-index: 1;
}

.article-wrapper .roadmap-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  flex: 1;
  font-family: var(--font-hindi);
  box-shadow: var(--shadow-sm);
}

.article-wrapper .roadmap-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.968rem;
  margin-bottom: 0.3rem;
}

.article-wrapper .roadmap-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.article-wrapper .roadmap-time {
  font-size: 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.625rem;
  border-radius: 12px;
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* WPM PROGRESS BARS */
.article-wrapper .wpm-scale {
  margin: 1.5rem 0;
}

.article-wrapper .wpm-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-hindi);
}

.article-wrapper .wpm-label {
  min-width: 5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.article-wrapper .wpm-bar-wrap {
  flex: 1;
  background: var(--warm);
  border-radius: 20px;
  height: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-wrapper .wpm-bar {
  height: 100%;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.article-wrapper .wpm-bar.b1 {
  background: #90caf9;
  width: 18%;
}

.article-wrapper .wpm-bar.b2 {
  background: #64b5f6;
  width: 32%;
}

.article-wrapper .wpm-bar.b3 {
  background: #42a5f5;
  width: 52%;
}

.article-wrapper .wpm-bar.b4 {
  background: var(--primary);
  width: 72%;
}

.article-wrapper .wpm-bar.b5 {
  background: var(--primary-dark);
  width: 90%;
}

/* FAQ LIST */
.article-wrapper .faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  margin-bottom: 0.875rem;
  font-family: var(--font-hindi);
  box-shadow: var(--shadow-sm);
}

.article-wrapper .faq-q {
  font-weight: 700;
  color: var(--deep);
  font-size: 0.968rem;
  margin-bottom: 0.5rem;
}

.article-wrapper .faq-a {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* CHECKLIST */
.article-wrapper .checklist {
  background: #f6fdf7;
  border: 1px solid #c8e6c9;
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.article-wrapper .checklist h4 {
  color: #1b5e20;
  margin-top: 0;
  font-size: 1.0625rem;
}

.article-wrapper .checklist ul {
  list-style: none;
  padding: 0;
  font-family: var(--font-hindi);
  font-size: 0.9375rem;
}

.article-wrapper .checklist li {
  padding: 0.375rem 0 0.375rem 1.75rem;
  position: relative;
  line-height: 1.6;
}

.article-wrapper .checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* CONCLUSION */
.article-wrapper .conclusion {
  background: var(--warm);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-top: 3rem;
  text-align: center;
  border: 1px solid var(--border);
}

.article-wrapper .conclusion h2 {
  font-size: 1.375rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.article-wrapper .conclusion p {
  margin-bottom: 0.75rem;
}

/* UTILITIES */
.scroll-top {
  position: fixed;
  bottom: 1.875rem;
  right: 1.875rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.2s, background 0.2s;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-0.1875rem);
}

/* MOBILE RESPONSIVENESS */
@media screen and (max-width: 768px) {
  :root {
    --padding-art: 1.5rem 0 2.5rem;
    --padding-box: 1rem 1.125rem;
    --padding-card: 1rem;
    --padding-toc: 1.25rem 1.5rem;
    --fs-md: rem;
    --fs-lg: 1rem;
    --fs-2xl: 1.1rem;
  }

  .article-wrapper .hero {
    padding: 2.5rem 1rem;
  }

  .article-wrapper .hero-desc {
    font-size: 0.75rem;
  }

  .article-wrapper .section {
    padding: 2rem 0 1rem;
  }

  .article-wrapper .section-header {
    gap: 0.75rem;
  }

  .article-wrapper .section-num {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

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