/* ==========================================
   BLOG STYLES  -  helloTIPI
   ========================================== */

/* --- Article Page --- */
.article-page {
  padding-top: 0;
}

.article-hero {
  padding: 80px 24px 60px;
  text-align: center;
  color: #fff;
}

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

.article-hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 16px;
  color: #fff;
}

.article-hero__subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  color: rgba(255,255,255,0.9);
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* --- Disclaimer / Recap --- */
.article-disclaimer,
.article-recap {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.article-recap {
  margin-top: 40px;
  margin-bottom: 40px;
}

.article-disclaimer p,
.article-recap p {
  margin: 0;
}

/* --- Intro paragraph --- */
.article-intro {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 40px;
}

/* --- Sections --- */
.article-section {
  margin-bottom: 48px;
}

.article-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0 0 16px;
}

.article-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.article-section p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0 0 16px;
}

.article-section ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.article-section li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.article-section li strong {
  font-weight: 700;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
  margin: 32px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item__marker {
  position: absolute;
  left: -40px;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--color-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 1;
}

.timeline-item__content {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  padding: 20px 24px;
  border-radius: 8px;
}

.timeline-item__step {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: 8px;
  text-transform: none;
}

.timeline-item__content h3 {
  margin-bottom: 10px;
}

.timeline-item__content p {
  font-size: 15px;
  margin-bottom: 10px;
}

.timeline-item__content p:last-child {
  margin-bottom: 0;
}

/* --- Data Table --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
}

.data-table th {
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border: none;
}

.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.data-table tbody tr:hover {
  background: rgba(5,150,105,0.05);
}

.data-table td strong {
  font-weight: 700;
}

/* --- Tabs (CSS only) --- */
.tab-group {
  margin: 24px 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-label {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
}

.tab-label:hover {
  color: var(--color-brand);
}

.tab-radio:checked + .tab-label {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

.tab-panel {
  display: none;
  padding: 24px;
  border-top: 1px solid var(--border-light);
}

.tab-radio:checked + .tab-label + .tab-label + .tab-label + .tab-label + .tab-panel,
.tab-radio:checked + .tab-label ~ .tab-panel:first-of-type {
  display: block;
}

/* Tab panel reveal: rely on DOM order. Each radio:checked reveals
   the .tab-panel that immediately follows its corresponding label group.
   Since the radios are visually hidden and labels sit inline, we use
   a general sibling approach. The panels must appear after ALL labels
   in the HTML, or we structure them label-panel pairs. */

/* Re-approach: we restructure HTML to be label+panel pairs */
/* But our HTML has all labels first then all panels. So we use this: */

/* Reset: hide all panels, show the one whose radio is checked */
.tab-panel {
  display: none;
}

/* The panels follow the labels. We need JS-free reveal.
   Since CSS can't easily do "nth panel after nth radio" when radios
   are siblings of labels which are siblings of panels, we restructure
   the tab-group HTML below. But since the HTML is already written,
   let's use a pragmatic approach with the general sibling combinator. */

/* Actually, let's fix the HTML structure for CSS-only tabs.
   The correct pattern is: radio, label, panel, radio, label, panel... */

/* Override: panels will be shown by adjacent sibling */
.tab-radio:checked + .tab-label + .tab-panel {
  display: block;
}

/* For tabs 2, 3, 4  -  the panel comes right after the label */
#tab2:checked + label[for="tab2"] + .tab-panel,
#tab3:checked + label[for="tab3"] + .tab-panel,
#tab4:checked + label[for="tab4"] + .tab-panel {
  display: block;
}

/* Tab label bar container */
.tab-group {
  display: flex;
  flex-wrap: wrap;
}

.tab-group .tab-label {
  flex-shrink: 0;
}

.tab-group .tab-panel {
  flex-basis: 100%;
  order: 10;
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.stat-item {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  padding: 24px 20px;
  text-align: center;
  border-radius: 8px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-brand);
  line-height: 1;
}

.stat-unit {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-brand);
  margin: 4px 0 8px;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Author Card --- */
.author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  padding: 24px;
  border-radius: 8px;
  margin-top: 40px;
}

.author-card__avatar {
  flex-shrink: 0;
}

.author-card__avatar svg {
  border-radius: 50%;
  display: block;
}

.author-card__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.author-card__role {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.author-card__bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark);
  margin: 0;
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
  .article-hero {
    padding: 60px 20px 48px;
  }

  .article-hero__title {
    font-size: 2rem;
  }

  .article-container {
    padding: 32px 20px 48px;
  }

  .article-section {
    margin-bottom: 40px;
  }

  .timeline {
    padding-left: 36px;
  }

  .timeline-item__marker {
    left: -36px;
    width: 24px;
    height: 24px;
  }

  .timeline-item__content {
    padding: 16px 20px;
  }

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

  .stat-number {
    font-size: 2rem;
  }

  .tab-group {
    display: block;
  }

  .tab-label {
    padding: 8px 14px;
    font-size: 13px;
  }

  .tab-panel {
    padding: 20px;
  }

  .data-table {
    font-size: 14px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }

  .author-card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .article-hero {
    padding: 48px 16px 36px;
  }

  .article-hero__title {
    font-size: 1.65rem;
    line-height: 1.5;
  }

  .article-hero__subtitle {
    font-size: 1rem;
  }

  .article-hero__inner {
    max-width: 100%;
  }

  .article-container {
    max-width: 100%;
    padding: 24px 16px 40px;
  }

  .article-intro {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .article-section {
    margin-bottom: 36px;
  }

  .article-section h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .article-section h3 {
    font-size: 1.05rem;
  }

  .article-section p,
  .article-section li {
    font-size: 15px;
  }

  .article-disclaimer,
  .article-recap {
    padding: 12px 16px;
    margin-bottom: 24px;
  }

  .article-recap {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .timeline {
    padding-left: 28px;
    margin: 24px 0;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-item {
    margin-bottom: 28px;
  }

  .timeline-item__marker {
    left: -28px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .timeline-item__content {
    padding: 16px;
    border-radius: 6px;
  }

  .timeline-item__step {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .timeline-item__content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .timeline-item__content p {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .table-wrapper {
    margin: 16px 0;
  }

  .data-table {
    font-size: 13px;
  }

  .data-table th {
    padding: 10px 12px;
  }

  .data-table td {
    padding: 8px 12px;
  }

  .tab-group {
    display: flex;
    flex-wrap: wrap;
  }

  .tab-label {
    padding: 8px 12px;
    font-size: 12px;
  }

  .tab-panel {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
  }

  .stat-item {
    padding: 20px 16px;
    border-radius: 6px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-unit {
    font-size: 0.9rem;
    margin: 2px 0 6px;
  }

  .stat-label {
    font-size: 12px;
  }

  .author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
    margin-top: 32px;
  }

  .author-card__name {
    font-size: 15px;
  }

  .author-card__role {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .author-card__bio {
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .article-hero {
    padding: 36px 12px 28px;
  }

  .article-hero__title {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .article-hero__subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .article-container {
    padding: 20px 12px 32px;
  }

  .article-intro {
    font-size: 0.9375rem;
    margin-bottom: 28px;
  }

  .article-section {
    margin-bottom: 28px;
  }

  .article-section h2 {
    font-size: 1.15rem;
    margin-bottom: 10px;
  }

  .article-section h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .article-section p,
  .article-section li {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .article-section ul {
    padding-left: 18px;
  }

  .article-disclaimer,
  .article-recap {
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 20px;
  }

  .article-recap {
    margin-top: 24px;
    margin-bottom: 24px;
  }

  .timeline {
    padding-left: 24px;
    margin: 16px 0;
  }

  .timeline::before {
    left: 8px;
    width: 1px;
  }

  .timeline-item {
    margin-bottom: 20px;
  }

  .timeline-item__marker {
    left: -24px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .timeline-item__content {
    padding: 12px;
    border-radius: 4px;
  }

  .timeline-item__step {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .timeline-item__content h3 {
    font-size: 0.9375rem;
    margin-bottom: 6px;
  }

  .timeline-item__content p {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .table-wrapper {
    margin: 12px 0;
    margin-left: -4px;
    margin-right: -4px;
  }

  .data-table {
    font-size: 12px;
    line-height: 1.5;
  }

  .data-table th {
    padding: 8px 10px;
    font-size: 11px;
  }

  .data-table td {
    padding: 6px 10px;
  }

  .tab-group {
    display: flex;
    flex-wrap: wrap;
  }

  .tab-label {
    padding: 6px 10px;
    font-size: 11px;
  }

  .tab-panel {
    padding: 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 12px 0;
  }

  .stat-item {
    padding: 16px 12px;
    border-radius: 4px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-unit {
    font-size: 0.8rem;
    margin: 2px 0 4px;
  }

  .stat-label {
    font-size: 11px;
  }

  .author-card {
    padding: 16px 12px;
    gap: 12px;
    margin-top: 24px;
    border-radius: 6px;
  }

  .author-card__name {
    font-size: 14px;
  }

  .author-card__role {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .author-card__bio {
    font-size: 12px;
    line-height: 1.5;
  }
}