/* ========================================
   ARTICLE STYLES
   Extends base.css + shared-shell.css
   ======================================== */

/* ----------------------------------------
   Article header (dark hero)
   ---------------------------------------- */
.article-header {
  background: var(--deep-teal);
  padding: clamp(100px, 13vw, 140px) 0 clamp(48px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}

.article-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.article-header .container {
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}

.breadcrumb a {
  color: rgba(240, 239, 235, 0.5);
  transition: color 0.15s;
}

.breadcrumb a:hover { color: var(--teal-on-dark); }

.breadcrumb-sep {
  color: rgba(240, 239, 235, 0.25);
  font-size: 11px;
}

.breadcrumb-current {
  color: rgba(240, 239, 235, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* Category badge */
.article-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-on-dark);
  background: rgba(92, 196, 181, 0.1);
  border: 1px solid rgba(92, 196, 181, 0.2);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.article-cat-badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.article-header h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  color: #f0efeb;
  line-height: 1.14;
  letter-spacing: -0.02em;
  max-width: 720px;
  margin-bottom: 20px;
}

/* Article meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(240, 239, 235, 0.5);
}

.article-meta-item svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ----------------------------------------
   Article layout (two-column)
   ---------------------------------------- */
.article-layout {
  background: var(--warm-white);
  padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 96px);
}

.article-layout .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout .container {
    grid-template-columns: 1fr;
  }
  .article-sidebar { display: none; }
}

/* ----------------------------------------
   Article content
   ---------------------------------------- */
.article-content {
  min-width: 0;
}

/* Key takeaways box */
.takeaways {
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 40px;
}

.takeaways-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.takeaways-label svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.takeaways ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.takeaways li {
  font-size: 14.5px;
  color: var(--body-text);
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.takeaways li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* Definition callout */
.definition-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 36px;
}

.definition-box .def-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: block;
}

.definition-box p {
  font-size: 17px;
  color: var(--near-black);
  line-height: 1.65;
  font-style: italic;
  margin: 0;
}

/* ----------------------------------------
   Article prose
   ---------------------------------------- */
.article-prose p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body-text);
  margin-bottom: 20px;
}

.article-prose h2 {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--near-black);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 44px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.article-prose h2:first-child { margin-top: 0; }

.article-prose ul, .article-prose ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-prose ul li, .article-prose ol li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-text);
  padding-left: 22px;
  position: relative;
}

.article-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.article-prose ol {
  counter-reset: ol-counter;
}

.article-prose ol li {
  counter-increment: ol-counter;
}

.article-prose ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  width: 18px;
  text-align: right;
}

.article-prose strong { font-weight: 600; color: var(--near-black); }

.article-prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  font-size: 14.5px;
  overflow: hidden;
  border-radius: 8px;
}

.article-prose th {
  background: var(--deep-teal);
  color: #f0efeb;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
}

.article-prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--body-text);
  line-height: 1.5;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.85);
}

.article-prose tr:last-child td { border-bottom: none; }

.article-prose tr:nth-child(even) td { background: #fff; }

.article-prose .pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
}

.article-prose .pill-warn { background: rgba(212, 147, 13, 0.12); color: #915e00; }
.article-prose .pill-ok { background: rgba(26, 122, 109, 0.1); color: var(--teal); }
.article-prose .pill-bad { background: rgba(200, 50, 50, 0.09); color: #8b1a1a; }

.article-prose blockquote {
  margin: 28px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--teal);
  background: var(--teal-light);
  color: var(--body-text);
  border-radius: 0 6px 6px 0;
}

.article-prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(15, 61, 54, 0.06);
  border-radius: 4px;
  padding: 0.12em 0.38em;
}

.article-prose pre {
  overflow-x: auto;
  margin: 20px 0 28px;
  padding: 16px 18px;
  background: #0f2f2a;
  color: #eef6f4;
  border-radius: 8px;
}

.article-prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Highlight box */
.highlight-box {
  background: rgba(212, 147, 13, 0.06);
  border: 1px solid rgba(212, 147, 13, 0.2);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--body-text);
}

.highlight-box strong { color: var(--near-black); }

/* ----------------------------------------
   Article FAQ
   ---------------------------------------- */
.article-faq {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.article-faq h2 {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 28px;
}

.article-faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.article-faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.article-faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  line-height: 1.4;
  transition: background 0.15s;
}

.article-faq-question:hover { background: rgba(26, 122, 109, 0.03); }

.article-faq-chevron {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-faq-item.open .article-faq-chevron { transform: rotate(180deg); }

.article-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-faq-answer-inner {
  padding: 0 20px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

/* ----------------------------------------
   Sidebar
   ---------------------------------------- */
.article-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.sidebar-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: block;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  padding: 5px 8px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  text-decoration: none;
}

.toc-list a:hover {
  background: var(--teal-light);
  color: var(--teal);
}

.sidebar-cta {
  background: var(--deep-teal);
  border: none;
  border-radius: 8px;
  padding: 22px 20px;
  color: #f0efeb;
}

.sidebar-cta p {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(240, 239, 235, 0.7);
  margin: 8px 0 16px;
}

.sidebar-cta-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #f0efeb;
}

.sidebar-cta-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: background 0.2s;
  text-decoration: none;
}

.sidebar-cta-btn:hover { background: var(--teal-hover); color: #fff; }

/* ----------------------------------------
   Related articles
   ---------------------------------------- */
.related-section {
  background: #fff;
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  color: var(--near-black);
  margin-bottom: 28px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.related-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 16px rgba(15, 61, 54, 0.07);
  transform: translateY(-2px);
}

.related-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 3px 9px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 10px;
}

.related-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--near-black);
  line-height: 1.35;
  margin-bottom: 8px;
}

.related-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 12px;
}

.related-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.related-link svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}

.related-card:hover .related-link svg { transform: translateX(2px); }
