/* ==========================================================================
   Article page redesign (2026-10-12)
   Centered editorial header, wide hero image, sticky TOC + reading column,
   flat white page (no card-in-card), quiet article footer.
   Loaded after article-toc.css on post pages only.
   ========================================================================== */

.ff-post {
  --ff-measure: 720px;
  --ff-page: #ffffff;
  --ff-soft: #f6f7fb;
  background: var(--ff-page);
  padding: 0 0 72px;
}

[data-theme="dark"] .ff-post {
  --ff-page: #0b1020;
  --ff-soft: #111827;
}

body:has(.ff-post) { background: var(--ff-page, #fff); }

/* ---------- Header ---------- */
.ff-post-header {
  padding: 28px 0 0;
}

.ff-post-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.ff-post .falcon-breadcrumb {
  justify-content: center;
  margin: 0 0 28px;
  font-size: 13px;
}

.ff-post-header .category-badge {
  display: inline-block;
  background: none !important;
  color: var(--ff-brand) !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.ff-post .ff-post-title {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--ff-ink);
  margin: 0 0 18px;
}

.ff-post-dek {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ff-muted);
  max-width: 680px;
  margin: 0 auto 24px;
}

.ff-post .ff-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--ff-muted);
  border: 0;
  padding: 0;
  margin: 0 0 32px;
}

.ff-post .ff-post-meta i { display: none; }

.ff-post .ff-post-meta .meta-author a {
  color: var(--ff-ink);
  font-weight: 600;
}

.ff-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5541f8 0%, #3b82f6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  margin-right: -10px;
}

.ff-post .falcon-meta-updated {
  background: none;
  padding: 0;
  color: var(--ff-tip);
}

/* ---------- Hero image ---------- */
.ff-post-hero {
  max-width: 1080px;
  margin: 0 auto 48px;
  padding: 0 20px;
}

.ff-post-hero figure,
.ff-post-hero .falcon-featured-image {
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.ff-post-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.ff-post-hero figcaption,
.ff-post-hero .falcon-image-caption {
  text-align: center;
  font-size: 13px;
  font-style: normal;
  color: var(--ff-muted);
  padding: 10px 0 0;
  background: none;
}

/* ---------- Body grid ---------- */
.ff-post .falcon-post-layout,
.ff-post .falcon-post-layout.has-toc {
  display: block;
}

.ff-post .falcon-post-main {
  max-width: var(--ff-measure);
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .ff-post > article > .container.falcon-has-toc {
    max-width: 1120px;
    width: calc(100% - 48px);
  }

  .ff-post .falcon-post-layout.has-toc {
    display: grid;
    grid-template-columns: 240px minmax(0, var(--ff-measure));
    justify-content: center;
    gap: 64px;
  }

  .ff-post .has-toc .falcon-toc-column {
    grid-column: 1;
    grid-row: 1;
  }

  .ff-post .has-toc .falcon-post-main {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .ff-post .falcon-toc {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .ff-post .falcon-toc-list {
    border-left: 2px solid var(--ff-line);
  }
}

@media (max-width: 1199px) {
  .ff-post .falcon-toc-column {
    max-width: var(--ff-measure);
    margin: 0 auto 28px;
  }
}

/* Flat body: no card, border or shadow around the article. */
.ff-post .falcon-article-box.ff-post-body {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  border-radius: 0;
}

/* ---------- Typography ---------- */
.ff-post .entry-content {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ff-body);
}

.ff-post .entry-content p,
.ff-post .entry-content li {
  font-size: 18px;
  line-height: 1.75;
}

.ff-post .entry-content p { margin: 0 0 22px; }

.ff-post .entry-content h2 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--ff-ink);
  margin: 56px 0 16px;
  padding: 0;
  border: 0;
}

.ff-post .entry-content h3 {
  font-size: 22px;
  line-height: 1.35;
  color: var(--ff-ink);
  margin: 36px 0 12px;
}

.ff-post .entry-content ul,
.ff-post .entry-content ol {
  padding-left: 1.4em;
  margin: 0 0 24px;
}

.ff-post .entry-content li { margin: 0 0 10px; padding-left: 4px; }
.ff-post .entry-content li::marker { color: var(--ff-brand); }

.ff-post .entry-content a {
  color: var(--ff-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ff-post .entry-content a:hover { text-decoration-thickness: 2px; }

.ff-post .entry-content img { border-radius: 14px; }

.ff-post .entry-content blockquote {
  border-left: 3px solid var(--ff-brand);
  background: none;
  padding: 4px 0 4px 20px;
  font-size: 20px;
  color: var(--ff-ink);
}

.ff-post .falcon-table-wrapper {
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid var(--ff-line);
}

.ff-post .entry-content table { font-size: 15px; }
.ff-post .entry-content table th,
.ff-post .entry-content table td { text-align: left; }

/* ---------- Article footer ---------- */
.ff-post-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--ff-line);
}

.ff-post-footer .falcon-social-share {
  background: none;
  border: 0;
  padding: 0;
  margin: 24px 0;
  box-shadow: none;
}

.ff-post-footer .falcon-author-box {
  background: var(--ff-soft);
  border: 0;
  box-shadow: none;
  border-radius: 16px;
  margin: 28px 0 0;
}

.ff-post-footer .falcon-post-pagination,
.ff-post-footer nav[aria-label*="Post"] {
  margin-top: 32px;
}

/* ---------- Related ---------- */
.ff-post-related {
  max-width: 1120px;
  margin-top: 64px;
}

/* ---------- Phones ---------- */
@media (max-width: 576px) {
  .ff-post-header { padding-top: 16px; }
  .ff-post-header-inner { text-align: left; padding: 0 16px; }
  .ff-post .falcon-breadcrumb { justify-content: flex-start; margin-bottom: 20px; }
  .ff-post .ff-post-meta { justify-content: flex-start; font-size: 13px; }
  .ff-post-dek { margin-left: 0; }
  .ff-post-hero { padding: 0; margin-bottom: 32px; }
  .ff-post-hero img { border-radius: 0; }
  .ff-post .entry-content,
  .ff-post .entry-content p,
  .ff-post .entry-content li { font-size: 17px; }
  .ff-post .entry-content h2 { font-size: 25px; margin-top: 44px; }
  .ff-post .entry-content h3 { font-size: 20px; }
}

/* Dark mode contrast for header text */
[data-theme="dark"] .ff-post .falcon-breadcrumb,
[data-theme="dark"] .ff-post .falcon-breadcrumb span,
[data-theme="dark"] .ff-post .falcon-breadcrumb a,
[data-theme="dark"] .ff-post .ff-post-meta,
[data-theme="dark"] .ff-post .ff-post-meta .meta-author {
  color: #94a3b8 !important;
}

[data-theme="dark"] .ff-post .ff-post-meta .meta-author a,
[data-theme="dark"] .ff-post .falcon-breadcrumb [aria-current="page"] {
  color: #e2e8f0 !important;
}

/* Wider layout: use the side space on large screens (2026-10-12). */
.ff-post-header-inner { max-width: 980px; }
.ff-post-dek { max-width: 820px; }
.ff-post-hero { max-width: 1280px; }
.ff-post-related { max-width: 1280px; }

@media (min-width: 992px) and (max-width: 1199px) {
  .ff-post { --ff-measure: 860px; }
}

@media (min-width: 1200px) {
  .ff-post { --ff-measure: 880px; }

  .ff-post > article > .container.falcon-has-toc {
    max-width: 1280px;
  }

  .ff-post .falcon-post-layout.has-toc {
    grid-template-columns: 260px minmax(0, var(--ff-measure));
    gap: 48px;
  }

  .ff-post .entry-content,
  .ff-post .entry-content p,
  .ff-post .entry-content li {
    font-size: 19px;
    line-height: 1.75;
  }
}

@media (min-width: 1440px) {
  .ff-post { --ff-measure: 940px; }

  .ff-post > article > .container.falcon-has-toc,
  .ff-post-hero,
  .ff-post-related {
    max-width: 1360px;
  }
}

/* Banner: same width as the TOC + article grid below it, and never cropped. */
.ff-post-hero {
  max-width: calc(var(--ff-measure) + 40px);
}

.ff-post-hero img {
  aspect-ratio: auto !important;
  height: auto !important;
  object-fit: contain !important;
  max-height: none !important;
}

@media (min-width: 1200px) {
  .ff-post-hero {
    max-width: calc(260px + 48px + var(--ff-measure));
    padding: 0;
  }
}

@media (min-width: 1440px) {
  .ff-post-hero {
    max-width: calc(260px + 48px + var(--ff-measure));
  }
}

.ff-post-hero figcaption,
.ff-post-hero .falcon-image-caption {
  text-align: left;
}

/* ==========================================================================
   Layout v3: banner on the left at the top of the article column, table of
   contents in a right-hand column starting level with the banner.
   ========================================================================== */
.ff-post-header-inner { padding-bottom: 8px; }

.ff-post .falcon-post-layout .ff-post-hero {
  max-width: var(--ff-measure);
  margin: 0 auto 40px;
  padding: 0;
}

@media (min-width: 1200px) {
  .ff-post .falcon-post-layout.has-toc {
    grid-template-columns: minmax(0, var(--ff-measure)) 260px;
    gap: 0 48px;
  }

  .ff-post .falcon-post-layout.has-toc .ff-post-hero {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    margin: 0 0 40px;
  }

  .ff-post .has-toc .falcon-toc-column {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .ff-post .has-toc .falcon-post-main {
    grid-column: 1;
    grid-row: 2;
  }

  .ff-post .falcon-toc-list {
    border-left: 2px solid var(--ff-line);
  }
}

@media (max-width: 576px) {
  .ff-post .falcon-post-layout .ff-post-hero { margin: 0 -12px 28px; }
}

@media (max-width: 576px) {
  .ff-post .ff-post-hero figcaption,
  .ff-post .ff-post-hero .falcon-image-caption { padding: 8px 16px 0; }
}

/* ==========================================================================
   Share rail: attached to the banner's left edge, sticky only while the
   banner + article are on screen (it stops at the end of the article; the
   page itself is never sticky).
   ========================================================================== */
.ff-share-rail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ff-share-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ff-muted);
}

.ff-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ff-line);
  background: var(--ff-surface);
  color: var(--ff-body);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
  text-decoration: none !important;
}

.ff-share-btn:hover,
.ff-share-btn:focus-visible {
  background: var(--ff-brand);
  border-color: var(--ff-brand);
  color: #fff;
  transform: translateY(-1px);
}

.ff-copy-link .fa-check { display: none; }
.ff-copy-link.is-copied { background: var(--ff-tip); border-color: var(--ff-tip); color: #fff; }
.ff-copy-link.is-copied .fa-link { display: none; }
.ff-copy-link.is-copied .fa-check { display: inline; }

/* Below 1200px: a plain row under the banner (not sticky). */
.ff-share-track { order: 2; }
.ff-post .falcon-post-layout { display: flex; flex-direction: column; }
.ff-post .falcon-post-layout .ff-post-hero { order: 1; margin-bottom: 16px; }
.ff-post .falcon-post-layout .ff-share-track { margin: 0 auto 28px; width: 100%; max-width: var(--ff-measure); }
.ff-post .falcon-post-layout .falcon-toc-column { order: 3; }
.ff-post .falcon-post-layout .falcon-post-main { order: 4; width: 100%; }

@media (max-width: 1199px) {
  .ff-share-rail { flex-wrap: wrap; }
}

@media (max-width: 576px) {
  .ff-post .falcon-post-layout .ff-share-track { padding: 0 4px; }
}

/* 1200px+: vertical rail in the gutter left of the banner. */
@media (min-width: 1200px) {
  .ff-post .falcon-post-layout.has-toc { display: grid; }

  .ff-post .falcon-post-layout.has-toc .ff-share-track {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: start;
    align-self: stretch;
    width: 44px;
    max-width: none;
    margin: 0 0 0 -68px;
    position: relative;
    z-index: 2;
  }

  .ff-post .falcon-post-layout.has-toc .ff-post-hero { margin-bottom: 40px; }

  .ff-share-rail {
    position: sticky;
    top: 110px;
    flex-direction: column;
    gap: 10px;
  }

  .ff-share-label { margin-bottom: 2px; }
}

/* Rail gets its own grid column so it can never slide off-screen. */
@media (min-width: 1200px) {
  .ff-post > article > .container.falcon-has-toc { max-width: 1360px; }

  .ff-post .falcon-post-layout.has-toc {
    grid-template-columns: 44px minmax(0, var(--ff-measure)) 260px;
    gap: 0 28px;
  }

  .ff-post .falcon-post-layout.has-toc .ff-share-track {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .ff-post .falcon-post-layout.has-toc .ff-post-hero { grid-column: 2; grid-row: 1; }
  .ff-post .has-toc .falcon-post-main { grid-column: 2; grid-row: 2; }
  .ff-post .has-toc .falcon-toc-column { grid-column: 3; grid-row: 1 / span 2; margin-left: 20px; }
}

@media (max-width: 1199px) {
  .ff-post .falcon-post-layout,
  .ff-post .falcon-post-layout.has-toc {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 1199px) {
  .ff-post .falcon-post-layout .falcon-toc-column { width: 100%; }
}
