/* ============================================================
   ThinkLab — Article page styles
   Shared header/footer patterns copied from existing site pages;
   article-specific components below.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 400; background: #fff; color: #000; overflow-x: hidden; }
#scale-root { width: 1440px; transform-origin: top left; }

/* ─── HEADER (shared) ─────────────────────────────────────── */
header { position: fixed; top: 0; left: 0; width: 1440px; z-index: 100; display: flex; align-items: center; justify-content: space-between; height: 70px; padding: 0 50px; background: rgba(255,255,255,0.6); backdrop-filter: blur(43px); -webkit-backdrop-filter: blur(43px); }
.header-logo { display: inline-flex; align-items: center; height: 32px; text-decoration: none; }
.header-logo img { height: 100%; width: auto; display: block; object-fit: contain; }
.header-nav { display: flex; align-items: center; gap: 40px; }
.header-nav a { font-size: 14px; color: #000; text-decoration: none; transition: opacity 0.15s; }
.header-nav a:hover { opacity: 0.5; }
.header-nav a.active { opacity: 0.5; }
.btn-pill { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 24px; border-radius: 40px; background: #000; color: #fff; font-size: 14px; font-family: inherit; font-weight: 400; border: none; cursor: pointer; text-decoration: none; white-space: nowrap; transition: opacity 0.15s; }
.btn-pill:hover { opacity: 0.8; }
.btn-pill-lg { height: 50px; padding: 0 30px; }
.btn-pill-white { background: #fff; color: #000; }

main { padding-top: 70px; }

/* ─── STICKY ARTICLE SUB-NAV (TOC) ────────────────────────── */
.toc-bar {
  position: fixed; top: 70px; left: 0; width: 1440px; z-index: 90;
  height: 56px; padding: 0 182px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; gap: 32px;
  transform: translateY(-100%); opacity: 0; transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.toc-bar.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toc-link { font-size: 13px; color: rgba(0,0,0,0.45); text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.toc-link:hover { color: #000; }
.toc-link.active { color: #000; font-weight: 500; }
.toc-progress { margin-left: auto; font-size: 12px; color: rgba(0,0,0,0.35); white-space: nowrap; }

/* ─── SHELL ────────────────────────────────────────────────── */
.article-shell { padding: 0 182px; }
.prose { max-width: 720px; }

/* ─── EYEBROW / MICRO LABEL ────────────────────────────────── */
.eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(0,0,0,0.45); margin-bottom: 20px; }
.eyebrow b { color: #000; font-weight: 500; }

/* ─── BREADCRUMB ───────────────────────────────────────────── */
.breadcrumb { padding: 32px 0 0; font-size: 13px; color: rgba(0,0,0,0.4); }
.breadcrumb a { color: rgba(0,0,0,0.4); text-decoration: none; }
.breadcrumb a:hover { color: #000; }
.breadcrumb span.sep { margin: 0 8px; color: rgba(0,0,0,0.25); }
.breadcrumb span.current { color: rgba(0,0,0,0.65); }

/* ─── HERO ─────────────────────────────────────────────────── */
.article-hero { padding: 24px 0 48px; max-width: 1000px; }
.article-hero h1 { font-size: 44px; line-height: 58px; font-weight: 400; color: #000; text-wrap: pretty; margin-bottom: 24px; }
.article-byline { font-size: 14px; color: rgba(0,0,0,0.45); display: flex; align-items: center; gap: 10px; }
.article-byline .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(0,0,0,0.35); }

/* ─── QUICK ANSWER PANEL ───────────────────────────────────── */
.quick-answer { background: #F0F0F4; border-radius: 30px; padding: 40px 48px; margin-bottom: 48px; }
.quick-answer .eyebrow { margin-bottom: 24px; }
.quick-answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.qa-col { padding-right: 40px; border-right: 1px solid rgba(0,0,0,0.1); }
.qa-col:last-child { border-right: none; padding-right: 0; }
.qa-col .qa-label { font-size: 20px; font-weight: 500; color: #000; margin-bottom: 8px; }
.qa-col .qa-desc { font-size: 15px; line-height: 1.55; color: rgba(0,0,0,0.55); }

.lead-statement { font-size: 26px; line-height: 40px; font-weight: 400; color: #000; max-width: 900px; margin-bottom: 24px; text-wrap: pretty; }
.intro-para { font-size: 17px; line-height: 30px; color: rgba(0,0,0,0.6); max-width: 760px; margin-bottom: 64px; }

/* ─── SECTIONS ─────────────────────────────────────────────── */
.article-section { padding: 56px 0; border-top: 1px solid rgba(0,0,0,0.08); }
.article-section:first-of-type { border-top: none; }
.article-section h2 { font-size: 34px; line-height: 44px; font-weight: 400; color: #000; margin-bottom: 24px; max-width: 820px; text-wrap: pretty; }
.article-section h3 { font-size: 22px; line-height: 32px; font-weight: 500; color: #000; margin: 40px 0 16px; max-width: 760px; }
.article-section p { font-size: 16px; line-height: 28px; color: rgba(0,0,0,0.62); max-width: 720px; margin-bottom: 20px; }
.article-section p:last-child { margin-bottom: 0; }
.article-section ul.pillar-list { max-width: 760px; margin: 0 0 20px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.pillar-list li { font-size: 16px; line-height: 26px; color: rgba(0,0,0,0.62); padding-left: 28px; position: relative; }
.pillar-list li::before { content: ''; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: #000; }
.pillar-list li b { color: #000; font-weight: 500; }

/* ─── INTERNAL LINK ────────────────────────────────────────── */
a.inline-link { color: #007AFF; text-decoration: none; border-bottom: 1px solid rgba(0,122,255,0.3); transition: border-color 0.15s; }
a.inline-link:hover { border-color: #007AFF; }

/* ─── CALLOUT (answer box) ─────────────────────────────────── */
.callout { background: #F7F7F7; border-left: 3px solid #000; border-radius: 4px 16px 16px 4px; padding: 28px 36px; max-width: 820px; margin: 8px 0 32px; }
.callout .callout-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(0,0,0,0.4); margin-bottom: 10px; }
.callout p { font-size: 16px; line-height: 28px; color: #000; max-width: none; margin: 0; }

/* ─── PULL QUOTE ───────────────────────────────────────────── */
.pull-quote { max-width: 780px; padding: 32px 0; margin: 32px 0; border-top: 1px solid rgba(0,0,0,0.12); border-bottom: 1px solid rgba(0,0,0,0.12); }
.pull-quote p { font-size: 26px; line-height: 38px; color: #000; margin: 0 0 16px; max-width: none; }
.pull-quote cite { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(0,0,0,0.4); font-style: normal; }

/* ─── FRAMEWORK CALLOUT (numbered) ─────────────────────────── */
.framework-box { background: #F0F0F4; border-radius: 24px; padding: 40px 44px; max-width: 900px; margin: 8px 0 32px; }
.framework-box .callout-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(0,0,0,0.4); margin-bottom: 24px; }
.framework-list { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.framework-list li { display: flex; gap: 20px; align-items: flex-start; }
.framework-num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: #000; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; font-weight: 500; }
.framework-text b { display: block; font-size: 16px; color: #000; margin-bottom: 4px; }
.framework-text span { font-size: 15px; line-height: 24px; color: rgba(0,0,0,0.58); }

/* ─── SURFACE CARDS (3-up diagram) ─────────────────────────── */
.figure-caption { font-size: 13px; color: rgba(0,0,0,0.4); margin: 16px 0 0; max-width: 820px; }
.surface-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1076px; }
.surface-card { background: #F0F0F4; border-radius: 20px; padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; }
.surface-num { font-size: 12px; color: rgba(0,0,0,0.35); letter-spacing: 0.06em; }
.surface-title { font-size: 20px; font-weight: 500; color: #000; }
.surface-desc { font-size: 14px; line-height: 22px; color: rgba(0,0,0,0.55); }

/* ─── OUTCOMES (AEO 3-outcome diagram) ─────────────────────── */
.outcome-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1076px; }
.outcome-card { border: 1px solid rgba(0,0,0,0.12); border-radius: 16px; padding: 28px; }
.outcome-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 20px; background: #000; color: #fff; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.outcome-title { font-size: 16px; font-weight: 500; color: #000; margin-bottom: 8px; }
.outcome-desc { font-size: 14px; line-height: 22px; color: rgba(0,0,0,0.55); }

/* ─── COMPARISON TABLE ─────────────────────────────────────── */
.table-wrap { max-width: 1076px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(0,0,0,0.1); margin-bottom: 8px; }
table.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th { background: #0D0D0D; color: #fff; font-size: 13px; font-weight: 500; text-align: left; padding: 16px 20px; }
.compare-table td { font-size: 14px; color: #333; padding: 16px 20px; border-top: 1px solid rgba(0,0,0,0.08); }
.compare-table tr:nth-child(even) td { background: #F7F7F7; }
.compare-table td.layer-cell { font-weight: 500; color: #000; }

/* ─── PRIORITY / STORE STAGE ───────────────────────────────── */
.stage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; max-width: 1076px; margin-bottom: 40px; }
.stage-card { background: #F0F0F4; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.stage-name { font-size: 13px; color: rgba(0,0,0,0.4); }
.stage-title { font-size: 18px; font-weight: 500; color: #000; }
.weight-rows { display: flex; flex-direction: column; gap: 10px; }
.weight-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(0,0,0,0.5); }
.weight-dots { display: flex; gap: 5px; }
.weight-dot { width: 8px; height: 8px; border-radius: 50%; background: #D9D9D9; }
.weight-dot.filled { background: #000; }

/* ─── DEPENDENCY STACK ─────────────────────────────────────── */
.stack-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 900px; margin: 16px 0 40px; }
.stack-bar { width: 100%; border-radius: 14px; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; }
.stack-bar.geo { width: 52%; background: #000; color: #fff; }
.stack-bar.aeo { width: 76%; background: #4A4A4A; color: #fff; }
.stack-bar.seo { width: 100%; background: #E8E8ED; color: #000; }
.stack-bar .stack-name { font-size: 16px; font-weight: 500; }
.stack-bar .stack-role { font-size: 13px; opacity: 0.65; }
.stack-arrow { font-size: 12px; color: rgba(0,0,0,0.3); letter-spacing: 0.05em; text-transform: uppercase; }
.dependency-points { display: flex; flex-direction: column; gap: 20px; max-width: 780px; margin-bottom: 8px; }
.dependency-points p { margin: 0; }

/* ─── FAQ ──────────────────────────────────────────────────── */
.faq-list { max-width: 820px; display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.12); }
.faq-item:first-child { border-top: 1px solid rgba(0,0,0,0.12); }
.faq-item summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 17px; font-weight: 500; color: #000; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-toggle { flex: 0 0 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; transition: transform 0.2s; }
.faq-item[open] .faq-toggle { transform: rotate(45deg); }
.faq-answer { font-size: 15px; line-height: 26px; color: rgba(0,0,0,0.6); padding: 0 0 28px; max-width: 720px; }

/* ─── CONCLUSION REFS ──────────────────────────────────────── */
.ref-links { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin-top: 8px; }

/* ─── CODE BLOCK ───────────────────────────────────────────── */
.code-block { max-width: 900px; background: #0D0D0D; border-radius: 16px; padding: 24px 28px; margin: 8px 0 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.code-block pre { margin: 0; }
.code-block code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; line-height: 22px; color: #E4E4E7; white-space: pre; display: block; }
.code-block .c-key { color: #7DD3FC; }
.code-block .c-str { color: #A7F3D0; }
.code-block .c-tag { color: #C4B5FD; }
.code-caption { font-size: 13px; color: rgba(0,0,0,0.4); margin: -18px 0 28px; max-width: 900px; }

/* ─── SOURCES / FURTHER READING ────────────────────────────── */
.sources { max-width: 900px; margin-top: 8px; }
.sources ol { list-style: none; counter-reset: src; display: flex; flex-direction: column; gap: 14px; }
.sources li { counter-increment: src; display: flex; gap: 16px; align-items: flex-start; font-size: 14px; line-height: 21px; color: rgba(0,0,0,0.6); }
.sources li::before { content: counter(src); flex: 0 0 26px; height: 26px; border-radius: 50%; background: #F0F0F4; color: #000; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 500; }
.sources .src-body b { display: block; color: #000; font-weight: 500; margin-bottom: 2px; }
.sources a.src-url { color: #007AFF; text-decoration: none; word-break: break-all; border-bottom: 1px solid rgba(0,122,255,0.25); }
.sources a.src-url:hover { border-color: #007AFF; }
.source-note { font-size: 13px; color: rgba(0,0,0,0.4); max-width: 760px; margin-top: 20px; }

/* ─── CTA BAND ─────────────────────────────────────────────── */
.article-cta { margin: 80px 0 0; padding: 72px 60px; background: #000; border-radius: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.article-cta h2 { font-size: 34px; font-weight: 400; color: #fff; max-width: 620px; }
.article-cta p { font-size: 16px; color: rgba(255,255,255,0.6); max-width: 560px; }

/* ─── FOOTER (shared) ─────────────────────────────────────── */
footer { background: #000; padding: 80px 50px 40px; margin-top: 80px; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-logo { display: inline-flex; align-items: center; height: 32px; text-decoration: none; }
.footer-logo img { height: 100%; width: auto; object-fit: contain; }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: 16px; line-height: 1.5; max-width: 200px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.5; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-social { display: flex; gap: 24px; }
.footer-social a { font-size: 12px; color: rgba(255,255,255,0.4); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; transition: color 0.15s; }
.footer-social a:hover { color: #fff; }

/* ─── MOBILE MENU (hamburger) ──────────────────────────────── */
.menu-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0; margin: -6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: #000; border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; top: 64px; left: 0; width: 100%; z-index: 98; flex-direction: column; padding: 12px 24px 24px; background: rgba(255,255,255,0.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(0,0,0,0.08); transform: translateY(-10px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; max-height: calc(100vh - 64px); overflow-y: auto; }
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a { font-size: 17px; color: #000; text-decoration: none; padding: 15px 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
.mobile-menu a.btn-pill { margin-top: 18px; border-bottom: none; height: 50px; color: #fff; justify-content: center; }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  #scale-root { width: 100% !important; transform: none !important; }
  header, .toc-bar { width: 100% !important; }
  header { padding: 0 32px; }
  main { padding-top: 64px; }
  .article-shell { padding: 0 48px; }
  .article-hero { padding: 20px 0 40px; }
  .article-hero h1 { font-size: 38px; line-height: 48px; }
  .lead-statement { font-size: 23px; line-height: 35px; }
  .quick-answer { padding: 32px 34px; }
  .quick-answer-grid { grid-template-columns: 1fr; gap: 0; }
  .qa-col { padding: 22px 0; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.1); }
  .qa-col:first-child { padding-top: 0; }
  .qa-col:last-child { border-bottom: none; padding-bottom: 0; }
  .article-section h2 { font-size: 30px; line-height: 40px; }
  .surface-grid, .outcome-grid, .stage-grid { grid-template-columns: 1fr; gap: 16px; }
  .stage-grid { margin-bottom: 32px; }
  .framework-box { padding: 32px 28px; }
  .pull-quote p { font-size: 22px; line-height: 32px; }
  .toc-bar { padding: 0 32px; gap: 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .toc-bar::-webkit-scrollbar { display: none; }
  .toc-progress { display: none; }
  .stack-bar.geo, .stack-bar.aeo { width: 100%; }
  .article-cta { padding: 56px 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
}

@media (max-width: 768px) {
  .header-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .mobile-menu { display: flex; }
}

@media (max-width: 600px) {
  header { padding: 0 20px; height: 60px; }
  .mobile-menu { top: 54px; }
  main { padding-top: 54px; }
  .toc-bar { top: 60px; height: 48px; padding: 0 20px; gap: 18px; }
  .article-shell { padding: 0 20px; }
  .breadcrumb { padding-top: 24px; }
  .article-hero { padding: 16px 0 32px; }
  .article-hero h1 { font-size: 29px; line-height: 38px; }
  .article-byline { flex-wrap: wrap; gap: 8px; }
  .quick-answer { padding: 26px 24px; border-radius: 22px; }
  .lead-statement { font-size: 20px; line-height: 31px; }
  .intro-para { font-size: 16px; margin-bottom: 40px; }
  .article-section { padding: 40px 0; }
  .article-section h2 { font-size: 25px; line-height: 33px; }
  .article-section h3 { font-size: 20px; line-height: 29px; margin-top: 32px; }
  .callout { padding: 22px 24px; }
  .framework-box { padding: 26px 22px; border-radius: 20px; }
  .framework-list li { gap: 16px; }
  .pull-quote p { font-size: 20px; line-height: 30px; }
  .surface-card, .outcome-card { padding: 24px 22px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare-table { min-width: 640px; }
  .article-cta { padding: 44px 26px; margin-top: 56px; border-radius: 24px; }
  .article-cta h2 { font-size: 26px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  footer { padding: 56px 24px 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}
