/* ═══════════════════════════════════════
   PELADANG — ARTICLE PAGE STYLES (v3)
   Article-specific extensions only.
   Loaded AFTER css/style.css which provides
   tokens, base, nav, footer, buttons.
   ═══════════════════════════════════════ */

/* ── Reading Progress Bar ─────────────── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--f500), var(--f300));
  z-index: 1000;
  transition: width .1s linear;
}

/* ── Article Header ───────────────────── */
.article-header {
  background: linear-gradient(155deg, var(--f950) 0%, var(--f800) 50%, var(--f700) 100%);
  padding: 72px 24px 64px;
  position: relative; overflow: hidden;
}
.article-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.article-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.article-tag-header {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 14px; border-radius: var(--r-full); margin-bottom: 18px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.2);
}

.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,.6); margin-bottom: 18px;
}
.article-meta .divider {
  width: 3px; height: 3px;
  background: rgba(255,255,255,.35); border-radius: 50%; flex-shrink: 0;
}

.article-header h1 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900; color: #fff;
  line-height: 1.15; letter-spacing: -.025em;
  margin-bottom: 16px;
  max-width: 820px;
}

.article-header .subtitle {
  font-size: 18px; color: rgba(255,255,255,.72); line-height: 1.65; max-width: 700px;
}

/* ── Article Layout ───────────────────── */
.article-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid; grid-template-columns: 1fr 260px; gap: 60px;
  align-items: start;
}
/* Sidebar-less articles (Model 3 migrated): single, comfortably-measured column. */
.article-layout.no-sidebar { grid-template-columns: 1fr; max-width: 860px; }
.article-crumb { font-size: 13px; color: var(--t400); margin-bottom: 28px; }
.article-crumb a { color: var(--f600); text-decoration: none; }
.article-crumb a:hover { text-decoration: underline; }

/* ── Article Body ─────────────────────── */
.article-body { min-width: 0; }

.article-body h2 {
  font-size: 23px; font-weight: 800; color: var(--f800);
  margin: 2.5rem 0 1rem; line-height: 1.3; letter-spacing: -.015em;
}
.article-body h3 {
  font-size: 18px; font-weight: 700; color: var(--f700);
  margin: 2rem 0 .75rem; line-height: 1.4;
}
.article-body p { margin-bottom: 1.4rem; }
.article-body a { color: var(--f600); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.article-body a:hover { color: var(--f500); }
.article-body ul, .article-body ol { margin: 0 0 1.4rem 1.5rem; }
.article-body li { margin-bottom: .6rem; }
.article-body strong { font-weight: 700; color: var(--t900); }

.article-body blockquote {
  border-left: 3px solid var(--f500);
  background: var(--f50);
  margin: 2rem 0; padding: 1.25rem 1.5rem;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.article-body blockquote p { margin-bottom: 0; font-style: italic; color: var(--f800); font-size: 16px; }
.article-body blockquote cite { display: block; margin-top: .75rem; font-size: 13px; font-style: normal; color: var(--t400); }

.article-body figure {
  margin: 2rem 0;
}

.feature-hero-img,
.article-shot {
  background: #fff;
  border: 1px solid var(--gray200);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-md);
  margin: 2rem 0;
}

.feature-hero-img picture,
.article-shot picture {
  display: block;
}

.feature-hero-img img,
.article-shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(75vh, 720px);
  margin: 0 auto;
}

.feature-bullets {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 14px;
}

.feature-bullets li {
  padding: 16px 20px;
  background: var(--f50);
  border-left: 3px solid var(--f500);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}

.feature-bullets li strong {
  display: block;
  color: var(--f800);
  font-size: 16px;
  margin-bottom: 4px;
}

.feature-bullets li span {
  color: var(--t500);
  font-size: 14.5px;
  line-height: 1.6;
}

.article-shot figcaption {
  padding: 14px 18px 16px;
  font-size: 13px;
  color: var(--t400);
  background: var(--gray50);
  border-top: 1px solid var(--gray200);
}

.article-callout {
  background: linear-gradient(135deg, rgba(22,163,74,.08), rgba(74,222,128,.04));
  border: 1px solid rgba(22,163,74,.16);
  border-left: 4px solid var(--f500);
  border-radius: var(--r-xl);
  padding: 22px 24px;
  margin: 2rem 0;
}

.article-callout h3 {
  margin-top: 0;
  margin-bottom: .55rem;
}

.article-callout p:last-child,
.article-shot:last-child,
.article-callout ul:last-child,
.article-callout ol:last-child {
  margin-bottom: 0;
}

.article-checklist {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
}

.article-checklist li {
  position: relative;
  padding-left: 1.6rem;
}

.article-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .58rem;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--f500);
}

.article-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 2rem 0;
}

/* Tables */
.risk-table, .article-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.75rem 0; font-size: 15px;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--gray200); box-shadow: var(--sh-sm);
}
.risk-table thead th, .article-body table thead th {
  background: var(--f800); color: #fff;
  padding: 12px 16px; text-align: left;
  font-weight: 700; font-size: 12.5px; letter-spacing: .04em;
}
.risk-table tbody td, .article-body table tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--gray100); color: var(--t500);
}
.risk-table tbody tr:last-child td, .article-body table tbody tr:last-child td { border-bottom: none; }
.risk-table tbody tr:hover td { background: var(--gray50); }

.risk-low { background: var(--f50); }
.risk-low td:first-child { color: var(--f700); font-weight: 700; }
.risk-moderate { background: #fffbeb; }
.risk-moderate td:first-child { color: #92400e; font-weight: 700; }
.risk-high { background: #fef2f2; }
.risk-high td:first-child { color: #991b1b; font-weight: 700; }

/* Scoring box */
.scoring-box {
  background: var(--gray50); border: 1px solid var(--gray200);
  border-radius: var(--r-xl); padding: 24px; margin: 1.75rem 0; font-size: 15px;
}
.scoring-box .scoring-title { font-weight: 700; color: var(--f800); margin-bottom: 12px; font-size: 15px; }
.scoring-box ul { margin: 0 0 1rem 1.25rem; }
.scoring-box li { margin-bottom: .4rem; color: var(--t500); }
.scoring-box .risk-result { font-weight: 700; font-size: 15px; padding: 12px 16px; border-radius: var(--r-md); margin-top: 12px; text-align: center; }
.scoring-box .risk-result.high { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.scoring-box .risk-result.moderate { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.scoring-box .risk-result.low { background: var(--f50); color: var(--f700); border: 1px solid var(--f200); }
.scoring-box .action-note { margin-top: 12px; padding: 12px 16px; background: var(--f50); border-radius: var(--r-md); border-left: 3px solid var(--f500); font-size: 14px; color: var(--f800); }

/* CTA box */
.cta-box {
  background: linear-gradient(140deg, var(--f800), var(--f700));
  border-radius: var(--r-xl); padding: 36px; margin: 2.5rem 0; text-align: center;
}
.cta-box h3 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; margin-top: 0; letter-spacing: -.015em; }
.cta-box p { font-size: 15px; margin-bottom: 20px; color: rgba(255,255,255,.72); }
.cta-box a.cta-button, .cta-box a.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--a500); color: #1a1000;
  padding: 13px 28px; border-radius: var(--r-full);
  font-weight: 800; font-size: 15px;
  transition: all .2s;
}
.cta-box a.cta-button:hover, .cta-box a.cta-btn:hover {
  background: var(--a400); transform: translateY(-1px);
  text-decoration: none;
}

/* ── Sidebar ──────────────────────────── */
.article-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }

.sidebar-card {
  background: var(--gray50); border: 1px solid var(--gray200);
  border-radius: var(--r-xl); padding: 22px; margin-bottom: 16px;
}
.sidebar-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--t400); margin-bottom: 14px;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  font-size: 13px; color: var(--t400); display: block;
  padding: 7px 10px; border-radius: var(--r-md);
  border-left: 2px solid transparent; transition: all .2s; line-height: 1.4;
}
.toc-list a:hover { color: var(--f600); background: var(--f50); border-left-color: var(--f300); }
.toc-list a.active { color: var(--f600); background: var(--f50); border-left-color: var(--f500); font-weight: 600; }

.sidebar-cta {
  background: linear-gradient(140deg, var(--f900), var(--f700));
  border-radius: var(--r-xl); padding: 22px; text-align: center;
}
.sidebar-cta-icon { font-size: 28px; margin-bottom: 10px; }
.sidebar-cta h4 { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.35; letter-spacing: -.01em; }
.sidebar-cta p { font-size: 12.5px; color: rgba(255,255,255,.6); margin-bottom: 14px; line-height: 1.55; }
.sidebar-cta a {
  display: block; background: var(--a500); color: #1a1000;
  font-size: 13px; font-weight: 800; padding: 10px 16px;
  border-radius: var(--r-full); transition: all .2s;
}
.sidebar-cta a:hover { background: var(--a400); transform: translateY(-1px); }

/* ── Related Articles ─────────────────── */
.related-section {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px 80px;
  border-top: 1px solid var(--gray200); padding-top: 56px;
}
.related-title {
  font-size: 22px; font-weight: 800; color: var(--t900);
  margin-bottom: 28px; letter-spacing: -.02em;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--gray200);
  border-radius: var(--r-xl); padding: 22px; transition: all .25s; position: relative; overflow: hidden;
}
.related-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--f500); opacity: 0; transition: opacity .25s; }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--f200); }
.related-card:hover::before { opacity: 1; }

.related-tag {
  display: inline-flex; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 10px; border-radius: var(--r-full); margin-bottom: 10px; width: fit-content;
}
.related-tag.tag-practical { background: var(--f100); color: var(--f700); }
.related-tag.tag-mission   { background: #ede9fe; color: #5b21b6; }
.related-tag.tag-tech      { background: #dbeafe; color: #1d4ed8; }
.related-tag.tag-crop      { background: #ffedd5; color: #9a3412; }

.related-card h4 { font-size: 14.5px; font-weight: 700; color: var(--t900); line-height: 1.4; margin-bottom: auto; padding-bottom: 14px; transition: color .2s; }
.related-card:hover h4 { color: var(--f600); }
.related-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t400); padding-top: 14px; border-top: 1px solid var(--gray100); margin-top: auto; }
.related-meta .dot { width: 3px; height: 3px; background: var(--gray200); border-radius: 50%; }

/* ── Footer (shared with main site) ────── */
.footer { background: var(--f950); padding: 64px 0 32px; }
.footer .footer-inner-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer-brand-name { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.footer-brand-name span { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.footer-brand-name span em { font-style: normal; color: var(--f300); }
.footer-brand p { color: rgba(255,255,255,.42); font-size: 13.5px; line-height: 1.7; max-width: 240px; }
.footer-col h4 { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 14px; }
.footer-col a { display: block; color: rgba(255,255,255,.42); font-size: 13.5px; margin-bottom: 9px; transition: color .2s; text-decoration: none; }
.footer-col a:hover { color: rgba(255,255,255,.8); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 22px 24px 0; border-top: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-copy { color: rgba(255,255,255,.3); font-size: 12.5px; }
.footer-langs { color: rgba(255,255,255,.3); font-size: 12px; }

/* ── Body offset for fixed navbar ─────── */
.article-header { margin-top: var(--nav-h); }

/* ── Responsive nav ────────────────────── */
@media (max-width: 1024px) {
  .navbar { background: rgba(12,43,25,.96); backdrop-filter: blur(14px); }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-actions .nav-sign-in,
  .nav-actions .btn-amber { display: none; }
  .nav-actions { flex-shrink: 0; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .article-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Responsive ───────────────────────── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px 64px; }
  .article-sidebar { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .article-header { padding: 52px 20px 44px; }
  .article-header h1 { font-size: 26px; }
  .article-header .subtitle { font-size: 16px; }
  .article-layout { padding: 32px 20px 56px; font-size: 16px; }
  .article-body h2 { font-size: 20px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .risk-table, .article-body table { font-size: 13px; }
  .risk-table thead th, .article-body table thead th,
  .risk-table tbody td, .article-body table tbody td { padding: 9px 12px; }
}
