/* ============================================================
   B2B Profit — Article Template Styles
   Requires: shared.css (variables, reset, nav, footer, buttons,
   highlight-box, highlight-label, form styles, animations)
   ============================================================ */

/* ── Article Wrap ───────────────────────────────── */
.article-wrap {
  padding: 0 3rem;
  overflow: clip;
  position: relative;
}

.article-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(ellipse at 70% 20%, rgba(139,111,255,0.05) 0%, transparent 55%);
  pointer-events: none;
}

.article-wrap .inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5rem;
  align-items: stretch;
  padding-top: 7.5rem;
  padding-bottom: 5rem;
  position: relative;
}

/* ── Left Column ────────────────────────────────── */
.article-left {
  min-width: 0;
}

/* ── Article Meta ───────────────────────────────── */
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.article-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  border: 1px solid rgba(201,169,110,0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.2s;
}

.article-cat:hover {
  border-color: rgba(201,169,110,0.6);
}

.article-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.article-readtime {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.article-readtime::before {
  content: '\00B7';
  margin-right: 1rem;
  color: var(--border-hover);
}

/* ── Article Title ──────────────────────────────── */
.article-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}

.article-title em {
  font-style: italic;
  color: var(--accent);
}

/* ── Article Lead ───────────────────────────────── */
.article-lead {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.article-lead strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Article Author (inline) ────────────────────── */
.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1a2e, #0f1520);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.author-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.author-role {
  font-size: 12px;
  color: var(--muted);
}

/* ── Prose (article content) ────────────────────── */
.article-prose h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin: 3rem 0 1.2rem;
  letter-spacing: -0.01em;
}

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

.article-prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.8rem;
}

.article-prose p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.4rem;
  font-weight: 300;
}

.article-prose p strong {
  color: var(--white);
  font-weight: 500;
}

.article-prose p em {
  color: var(--accent);
  font-style: italic;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.article-prose li {
  font-size: 1rem;
  color: var(--text);
  font-weight: 300;
  line-height: 1.75;
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.6rem;
}

.article-prose ul li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--accent);
}

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

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

.article-prose ol li::before {
  content: counter(list) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  top: 3px;
}

.article-prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(201,169,110,0.04);
  border-radius: 0 4px 4px 0;
}

.article-prose blockquote p {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  margin: 0;
}

.article-prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* ── CTA Callout (inline article) ──────────────── */
.article-prose .cta-callout {
  border: 1px solid rgba(201,169,110,0.25);
  border-left: 3px solid var(--accent);
  background: linear-gradient(135deg, rgba(201,169,110,0.06) 0%, rgba(139,111,255,0.03) 100%);
  border-radius: 4px;
  padding: 1.8rem 2rem;
  margin: 3rem 0;
}

.article-prose .cta-callout p:first-child {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.article-prose .cta-callout p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.article-prose .cta-callout .cta-callout-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.6rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  margin-top: 0.6rem;
  transition: opacity 0.2s;
}

.article-prose .cta-callout .cta-callout-btn:hover {
  opacity: 0.88;
}

/* ── Right Column ──────────────────────────────── */
.article-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.right-panel {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

/* Sticky TOC + CTA + Share — follows scroll */
.right-panel-sticky {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
}

/* Thin scrollbar for long TOC */
.right-panel-sticky::-webkit-scrollbar {
  width: 3px;
}
.right-panel-sticky::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.right-panel-sticky {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.panel-block {
  background: var(--bg2);
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.panel-block:last-child {
  border-bottom: none;
}

.panel-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.panel-val {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
}

.panel-val strong {
  color: var(--accent);
  font-weight: 500;
}

/* ── TOC ────────────────────────────────────────── */
.panel-toc-list {
  list-style: none;
  margin-top: 0.3rem;
}

.panel-toc-list li a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.4;
}

.panel-toc-list li a:hover {
  color: var(--text);
  border-left-color: var(--border-hover);
}

.panel-toc-list li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ── CTA Block ──────────────────────────────────── */
.panel-cta {
  border-top: 2px solid var(--accent) !important;
}

.panel-cta .panel-label {
  color: var(--accent);
}

.panel-cta-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.panel-cta-btn {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.7rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.panel-cta-btn:hover {
  opacity: 0.88;
}

/* ── Share Links ────────────────────────────────── */
.share-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.share-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

.share-link:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* ── Article Footer Section ─────────────────────── */
.article-footer-section {
  border-top: 1px solid var(--border);
  padding: 4rem 3rem;
  background: var(--bg2);
}

.article-footer-section .inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Author Block (footer) ──────────────────────── */
.article-author-block {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.author-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e1a2e, #0f1520);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.author-block-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.author-block-role {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.author-block-bio {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Related Posts ──────────────────────────────── */
.related-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.related-item {
  background: var(--bg);
  padding: 1.1rem 1.4rem;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}

.related-item:hover {
  background: var(--bg3);
}

.related-item-title {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

.related-item-arrow {
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.related-item:hover .related-item-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ── Responsive: Tablet ─────────────────────────── */
@media (max-width: 1024px) {
  .article-wrap {
    padding: 0 1.25rem;
  }

  .article-wrap .inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 5.5rem;
    padding-bottom: 3rem;
  }

  .article-right {
    margin-top: 2.5rem;
  }

  .right-panel-sticky {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .right-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .panel-block {
    border-right: 1px solid var(--border);
  }

  .panel-block:nth-child(even) {
    border-right: none;
  }

  .panel-cta,
  .panel-share {
    grid-column: span 2;
  }

  .article-prose h2 {
    font-size: 1.4rem;
  }

  .article-footer-section {
    padding: 3rem 1.25rem;
  }

  .article-footer-section .inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ── Summary Box (O02 CORE-EEAT) ─────────────────── */
.summary-box {
  background: var(--bg2);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 1.5rem 1.5rem 1.8rem;
  margin: 1.5rem 0 2rem;
}

.summary-box-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.summary-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-box li {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.summary-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Case Card Grid (keisy-audita) ────────────────── */
.b2bprofit-grid {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
}

.b2bprofit-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.b2bprofit-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.b2bprofit-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.b2bprofit-card:hover {
  border-color: var(--accent);
}

.b2bprofit-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.b2bprofit-card h3 a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}

.b2bprofit-card h3 a:hover {
  color: var(--accent);
}

.b2bprofit-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.b2bprofit-card p a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.b2bprofit-card p a:hover {
  opacity: 0.8;
}

.b2bprofit-card p a::after {
  content: ' →';
}

@media (max-width: 1024px) {
  .b2bprofit-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .b2bprofit-grid--2,
  .b2bprofit-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ── Responsive: Mobile ─────────────────────────── */
@media (max-width: 480px) {
  .right-panel {
    grid-template-columns: 1fr;
  }

  .panel-block {
    border-right: none;
  }

  .panel-cta,
  .panel-share {
    grid-column: span 1;
  }

  .article-title {
    font-size: 1.8rem;
  }

  .article-author-block {
    flex-direction: column;
  }
}
