/* ============================================
   Planir Blog — Shared Article Styles
   Common chrome + editorial components.
   Layout-specific rules live in each variation file.
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: #fff; color: var(--color-text); }

.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 100%; padding: 0 24px; }

/* ===== READING PROGRESS BAR ===== */
.progress-track {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; z-index: 60;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--color-cyan), #0fb5b5);
  transition: width 0.08s linear;
}

/* ===== NAV (scoped to the injected top navbar only — must NOT match
   the breadcrumb <nav> or the TOC <nav data-toc> inside the article) ===== */
body > nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 49;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid #f0f0f0; height: 72px;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.nav-logo { width: 80px; display: flex; align-items: center; }
.nav-logo a { width: 100%; display: flex; align-items: center; text-decoration: none; }
.nav-logo img { width: 100%; }
.nav-links { display: flex; gap: 36px; flex: 1; margin-left: 60px; }
.nav-link-wrapper { position: relative; display: flex; align-items: center; }
.nav-link { font-size: 14px; color: var(--color-text); text-decoration: none; transition: color 0.2s; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-link:hover { color: var(--color-cyan); }
.nav-dropdown-arrow { font-size: 10px; color: #999; transition: transform 0.2s; }
.nav-link-wrapper:hover .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; background: white;
  border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none; z-index: 1000; min-width: 320px;
}
.nav-link-wrapper:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-dropdown-content { padding: 16px; font-family: 'Inter', system-ui, sans-serif; }
.nav-dropdown-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 6px; text-decoration: none; color: var(--color-text); transition: background 0.2s; cursor: pointer; font-family: 'Inter', system-ui, sans-serif; }
.nav-dropdown-item:hover { background: #f9fafb; }
.nav-dropdown-icon { width: 48px; height: 48px; background: #f3f4f6; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-dropdown-icon svg { width: 32px; height: 32px; }
.nav-dropdown-text { flex: 1; font-family: 'Inter', system-ui, sans-serif; }
.nav-dropdown-title { font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 2px; font-family: 'Inter', system-ui, sans-serif; }
.nav-dropdown-desc { font-size: 12px; color: var(--color-text-muted); line-height: 1.4; font-family: 'Inter', system-ui, sans-serif; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-signin { font-size: 14px; color: var(--color-text); text-decoration: none; }
.nav-signin:hover { color: var(--color-cyan); }

/* ===== BUTTONS ===== */
.button { display: inline-flex; align-items: center; padding: 12px 24px; border: none; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 0; text-decoration: none; }
.button-primary { background: var(--color-black); color: white; }
.button-primary:hover { background: #2a2a2a; }
.button-secondary { background: white; color: var(--color-black); border: 1px solid var(--color-black); }
.button-secondary:hover { background: var(--color-black); color: white; }

/* ===== PILLAR ACCENT TOKENS ===== */
.pillar-plan      { --pillar: #118282; --pillar-bg: rgba(29, 217, 217, 0.14); }
.pillar-report    { --pillar: #d97706; --pillar-bg: rgba(245, 158, 11, 0.1); }
.pillar-analyse   { --pillar: #059669; --pillar-bg: rgba(16, 185, 129, 0.1); }
.pillar-practice  { --pillar: #7c3aed; --pillar-bg: rgba(139, 92, 246, 0.1); }

.pillar-tag {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  padding: 6px 12px; background: var(--pillar-bg); color: var(--pillar);
}
.pillar-tag::before { content: '■'; font-size: 9px; }
.pillar-tag.has-icon::before { content: none; }
.pillar-tag .pillar-tag-icon { width: 15px; height: 15px; flex-shrink: 0; display: block; }

/* ===== ARTICLE HERO ===== */
.article-hero { padding-top: 128px; }
.article-hero .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-muted); margin-bottom: 28px; }
.article-hero .breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.article-hero .breadcrumb a:hover { color: var(--color-text); }
.article-hero .breadcrumb .sep { color: #c4c4c4; }
.article-title { font-size: 50px; font-weight: 500; line-height: 1.08; letter-spacing: -1.2px; margin: 20px 0 24px; max-width: 16ch; }
.article-standfirst { font-size: 21px; line-height: 1.55; color: var(--color-text-muted); max-width: 64ch; margin-bottom: 36px; }

/* Byline */
.byline { display: flex; align-items: center; gap: 16px; padding: 22px 0; border-top: 1px solid var(--color-grey); border-bottom: 1px solid var(--color-grey); }
.byline-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #d1d5db, #9ca3af); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 16px; }
.byline-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.byline-meta { display: flex; flex-direction: column; gap: 2px; }
.byline-name { font-size: 14px; font-weight: 600; color: var(--color-text); }
.byline-sub { font-size: 13px; color: var(--color-text-muted); display: flex; align-items: center; gap: 10px; }
.byline-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: #c4c4c4; }
.byline-share { margin-left: auto; display: flex; gap: 8px; }
.byline-share a { width: 38px; height: 38px; border: 1px solid var(--color-grey); display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); transition: all 0.2s; }
.byline-share a:hover { border-color: var(--color-text); color: var(--color-text); }
.byline-share svg { width: 17px; height: 17px; }
.byline-share a.byline-linkedin { width: auto; height: auto; border: none; transition: opacity 0.2s; }
.byline-share a.byline-linkedin:hover { border: none; opacity: 0.82; }
.byline-share a.byline-linkedin img { height: 20px; width: auto; display: block; }

/* Feature image / figure placeholder (striped) */
.ph {
  position: relative; width: 100%; background: #f1f3f5; border: 1px solid var(--color-grey);
  background-image: repeating-linear-gradient(135deg, transparent, transparent 11px, rgba(0,0,0,0.035) 11px, rgba(0,0,0,0.035) 22px);
  display: flex; align-items: center; justify-content: center;
}
.ph .ph-label {
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  font-size: 12px; letter-spacing: 0.3px; color: #8a909a;
  background: #fff; border: 1px solid var(--color-grey); padding: 6px 12px;
}
.feature-image { aspect-ratio: 16 / 8; margin-bottom: 8px; }
.feature-caption { font-size: 13px; color: var(--color-text-muted); margin-top: 12px; }

/* The hero image the blog build emits.
   The original design put a placeholder <div class="ph feature-image"> here,
   sized by .ph (width:100%) and .feature-image (aspect-ratio). The generated
   pages replace that with a real <picture>, and nothing ever replaced those
   two rules -- so the hero <img> laid out at its own intrinsic size (the
   width/height attributes are 1920x1080) with nothing constraining it.

   Width is matched to what WordPress serves today. There, .featured-img is
   width:50% of a 1340px container = 670px, with border-radius and a soft
   shadow. (Its three responsive overrides are all dead: each tries to change
   `height`, and the base rule sets `height: 536px !important`, so the live
   hero is the same fixed band at every viewport, mobile included.)

   The one thing NOT copied is that fixed height, because it comes with
   `object-fit: cover` and the heroes carry the article title as artwork.
   Cropping 1920x1080 into 670x536 takes 141px off each side -- enough to cut
   the Planir logo down to "anir" and clip the ends of a long title. Height
   follows the source aspect instead, so the box is the same width and nothing
   is cut. */
/* Safety net first: no image anywhere in an article may overflow its column.
   This is what would have contained the bug above even with the rule below
   missing. It must precede the hero rule -- both are specificity (0,1,1), so
   whichever comes last wins, and a 100% cap here would silently undo the
   1072px cap there. */
.article-hero img, .b-main img, .b-feature picture { max-width: 100%; }

.b-feature img {
  display: block; width: 100%; height: auto;
  max-width: 670px; margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
@media (max-width: 900px) {
  /* WordPress keeps the hero at 50% on phones, which is a stamp-sized image
     with the title unreadable. Full width below the breakpoint instead. */
  .b-feature img { max-width: 100%; border-radius: 12px; }
}

/* ===== PROSE ===== */
.prose { font-size: 18px; line-height: 1.75; color: #2a2d34; }
.prose > * + * { margin-top: 24px; }
.prose h2 { font-size: 30px; font-weight: 500; line-height: 1.22; letter-spacing: -0.4px; color: var(--color-text); margin-top: 56px; scroll-margin-top: 96px; }
.prose h3 { font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--color-text); margin-top: 40px; }
.prose p { text-wrap: pretty; }
.prose a { color: var(--pillar); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 600; color: var(--color-text); }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.prose li { padding-left: 6px; }
.prose li::marker { color: var(--pillar, var(--color-cyan)); }
.prose figure { margin: 40px 0; }
.prose figure .ph { aspect-ratio: 16 / 9; }

/* Pull quote */
.pullquote {
  margin: 48px 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--pillar, var(--color-cyan));
  font-size: 27px; font-weight: 500; line-height: 1.35; letter-spacing: -0.3px; color: var(--color-text);
  font-family: var(--font-heading);
}
.pullquote cite { display: block; margin-top: 16px; font-size: 14px; font-style: normal; font-weight: 400; color: var(--color-text-muted); }

/* Callout / key takeaway box */
.callout {
  margin: 40px 0; padding: 28px 32px; background: var(--pillar-bg, #f5fbfb);
  border: 1px solid color-mix(in oklab, var(--pillar, var(--color-cyan)) 30%, transparent);
}
.callout-label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--pillar, #0a8f8f); margin-bottom: 12px; }
.callout-label::before { content: '★'; font-size: 11px; }
.callout p { font-size: 16px; line-height: 1.7; color: var(--color-text); }
.callout p + p { margin-top: 12px; }

/* ===== PROSE: components the migrated WordPress corpus needs ===== */
/* The original single-article template never exercised tables, real images,
   horizontal rules or FAQ sections. The imported posts do. */

.prose figure img, .prose img { display: block; width: 100%; height: auto; }
.prose figure figcaption { font-size: 13px; line-height: 1.6; color: var(--color-text-muted); margin-top: 12px; }

/* Tables scroll inside their own container so the page body never does. */
.prose .table-scroll { margin: 40px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-grey); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; background: #fff; }
.prose table th, .prose table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-grey); }
.prose table th { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--color-text-muted); background: #f9fafb; white-space: nowrap; }
.prose table tr:last-child td { border-bottom: none; }
.prose table td strong { color: var(--color-text); }
.prose table td > p:first-child { margin-top: 0; }

.prose hr { margin: 56px 0; border: 0; border-top: 1px solid var(--color-grey); }

.prose code { font-family: 'SFMono-Regular', ui-monospace, 'Menlo', monospace; font-size: 0.88em; background: #f3f4f6; border: 1px solid var(--color-grey); padding: 2px 6px; }
.prose pre { margin: 32px 0; padding: 20px 22px; background: #f9fafb; border: 1px solid var(--color-grey); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* ===== FAQ (from Yoast faq-block; mirrored by FAQPage JSON-LD) ===== */
.faq { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--color-grey); }
.faq > h2 { font-size: 30px; font-weight: 500; line-height: 1.22; letter-spacing: -0.4px; color: var(--color-text); margin-bottom: 8px; scroll-margin-top: 96px; }
.faq-item { border-bottom: 1px solid var(--color-grey); }
.faq-item > summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--color-text); }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; line-height: 1; color: var(--pillar, var(--color-cyan)); }
.faq-item[open] > summary::after { content: '\2212'; }
.faq-item > summary:hover { color: var(--pillar, var(--color-text)); }
.faq-answer { padding: 0 40px 24px 0; font-size: 16px; line-height: 1.75; color: #2a2d34; }
.faq-answer p + p { margin-top: 12px; }

/* Real imagery in the related-article cards (the originals used .ph stubs). */
.rel-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid #e5e7eb; background: #f1f3f5; }
.rel-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.rel-card:hover .rel-card-media img { transform: scale(1.04); }
.rel-card-pillar { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--pillar, var(--color-cyan)); }

@media (max-width: 640px) {
  .prose table th, .prose table td { padding: 12px 14px; }
  .faq > h2 { font-size: 26px; }
}

/* ===== TABLE OF CONTENTS (shared visual) ===== */
.toc-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); margin-bottom: 16px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-list a { display: block; font-size: 13.5px; line-height: 1.45; color: var(--color-text-muted); text-decoration: none; padding: 7px 0 7px 14px; border-left: 2px solid var(--color-grey); transition: all 0.2s; }
.toc-list a:hover { color: var(--color-text); border-left-color: #b8bcc4; }
.toc-list a.active { color: var(--pillar, var(--color-text)); border-left-color: var(--pillar, var(--color-cyan)); font-weight: 500; }

/* ===== RELATED ARTICLES ===== */
.related { padding: 80px 0; border-top: 1px solid var(--color-grey); }
.related-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; }
.related-head h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.4px; }
.related-head a { font-size: 14px; color: var(--color-text-muted); text-decoration: none; }
.related-head a:hover { color: var(--color-text); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.rel-card { border: 1px solid #e5e7eb; background: #f9fafb; display: flex; flex-direction: column; text-decoration: none; transition: all 0.3s; }
.rel-card:hover { border-color: var(--color-cyan); box-shadow: 0 8px 24px rgba(29,217,217,0.12); }
.rel-card .ph { height: 150px; border: none; border-bottom: 1px solid #e5e7eb; }
.rel-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.rel-card-title { font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--color-text); }
.rel-card-meta { margin-top: auto; font-size: 12px; color: var(--color-text-muted); display: flex; gap: 12px; }

/* ===== FINAL CTA (exact match to index.html) ===== */
.final-cta { padding: 100px 0; background: #000000; color: white; text-align: center; position: relative; overflow: hidden; }
.final-cta::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(29,217,217,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(29,217,217,0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(29,217,217,0.2) 0%, transparent 50%);
  animation: gradientShift 8s ease-in-out infinite; pointer-events: none;
}
.final-cta::after {
  content: ''; position: absolute; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(29,217,217,0.25) 0%, transparent 70%);
  border-radius: 50%; animation: floatBlob1 12s ease-in-out infinite;
  pointer-events: none; top: -200px; right: -100px;
}
.final-cta-bg-grid { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.grid-line { position: absolute; background: linear-gradient(90deg, transparent, rgba(29,217,217,0.15), transparent); }
.grid-line.horizontal { width: 100%; height: 1px; animation: slideHorizontal 6s linear infinite; }
.grid-line.vertical { width: 1px; height: 100%; animation: slideVertical 8s linear infinite; }
.float-shape { position: absolute; border: 2px solid rgba(29,217,217,0.4); border-radius: 8px; pointer-events: none; }
.float-shape.rect-1 { width: 120px; height: 80px; animation: float 6s ease-in-out infinite, drift-right 10s ease-in-out infinite; top: 10%; left: 8%; }
.float-shape.rect-2 { width: 90px; height: 120px; animation: float 7s ease-in-out infinite 1s, drift-left 12s ease-in-out infinite; bottom: 15%; right: 10%; }
.float-shape.rect-3 { width: 100px; height: 100px; animation: float 5s ease-in-out infinite 2s, drift-right 14s ease-in-out infinite; top: 40%; right: 5%; }
.float-circle { position: absolute; border: 2px solid rgba(29,217,217,0.35); border-radius: 50%; pointer-events: none; }
.float-circle.circle-1 { width: 140px; height: 140px; animation: float 8s ease-in-out infinite, drift-left 16s ease-in-out infinite; top: 20%; right: 20%; }
.float-circle.circle-2 { width: 200px; height: 200px; animation: float 10s ease-in-out infinite 1.5s, drift-right 18s ease-in-out infinite; bottom: 5%; left: 5%; }
@keyframes float { 0%, 100% { opacity: 0.4; transform: translateY(0px); } 50% { opacity: 0.8; transform: translateY(-20px); } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; opacity: 0.6; } 50% { background-position: 100% 50%; opacity: 0.9; } }
@keyframes floatBlob1 { 0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.05; } 33% { transform: translate(50px, -100px) scale(1.1); opacity: 0.08; } 66% { transform: translate(-50px, 50px) scale(0.95); opacity: 0.06; } }
@keyframes slideHorizontal { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes slideVertical { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }
@keyframes drift-right { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(40px); } }
@keyframes drift-left { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-40px); } }
.final-cta > * { position: relative; z-index: 1; }
.final-cta h2 { color: white; font-size: 52px; font-weight: 500; line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 16px; }
.final-cta p { font-size: 18px; color: white; margin-bottom: 40px; }
.final-cta .button-secondary { background: var(--color-black); color: white; border: 1px solid white; }
.final-cta .button-secondary:hover { background: #1a1a1a; border-color: white; }

/* ===== FOOTER ===== */
footer { padding: 60px 0 40px; background: white; border-top: 1px solid var(--color-grey); }
.footer-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; margin-bottom: 16px; letter-spacing: 0.5px; }
.footer-col a { display: block; font-size: 13px; color: var(--color-text-muted); text-decoration: none; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--color-text); }
.footer-logo { height: 32px; margin-bottom: 12px; }
.xero-partner-badge, .soc-certification-badge, .g2-badge { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--color-grey); margin-bottom: 12px; background-color: #f3f4f6; }
.g2-badge { margin-bottom: 0; }
.g2-badge > div:last-child { display: flex; flex-direction: column; }
.g2-badge-stars { display: flex; gap: 4px; margin-top: 4px; align-items: center; }
.g2-badge-stars span { font-size: 16px; color: #fbbf24; }
/* The rating chip sits inside .g2-badge-stars, so it inherits the 16px gold
   star styling unless it is reset. Matches the inline value the footer markup
   already carries, and the rule the other 23 pages keep in their inline
   <style> but article pages never loaded. */
.g2-badge-rating { font-size: 13px; color: #737373; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--color-grey); padding-top: 24px; font-size: 13px; color: var(--color-text-muted); }
.footer-bottom-right { display: flex; gap: 24px; }
.footer-bottom-right a { color: var(--color-text-muted); text-decoration: none; font-size: 13px; }
.footer-bottom-right a:hover { color: var(--color-text); }

@media (max-width: 900px) {
  .article-title { font-size: 38px; }
  .final-cta h2 { font-size: 44px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
