/* ==========================================================================
   V10 blog pilot styles — loaded ONLY by /post/... and /read-articles/.
   Kept separate from global.css so approved V9 pages are untouched.
   Uses the V9 design tokens defined in :root (global.css).
   ========================================================================== */

/* ---- Article page ---- */

.article-page {
  padding-block: clamp(48px, 7vw, 96px) var(--section);
}

.article-container {
  max-width: 860px;
}

.article-meta {
  /* V10.1: V9 small-label scale (12px / 600 / 0.08em / uppercase). */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-author {
  color: var(--white);
}

.article-meta-sep {
  color: var(--faint);
}

h1.article-title {
  /* V10.1: inherits the V9 global H1 typography (family, size, weight,
     letter-spacing, line-height). Approved exception: title case. */
  max-width: none;
  text-transform: none;
}

/* ---- V10.2 visible credit (podcast + editorial) ---- */

.article-credit {
  margin: 0 0 14px;
}

.article-credit-primary {
  /* V9 small-label scale. */
  margin: 0;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-credit-secondary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- V10.2 podcast lead video: in-page facade player ---- */

.article-lead-video {
  margin: clamp(28px, 4vw, 44px) 0 0;
}

/* Persistent 16:9 container: the facade and, after activation, the YouTube
   iframe both live inside it, so the article never jumps or reflows. */
.article-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink-deep);
}

.article-video-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--surface);
  cursor: pointer;
}

.article-video-facade img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 7, 0.18);
  transition: background 0.2s ease;
}

.article-video-play::after {
  content: "";
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9 6.5v11l9-5.5z"/></svg>')
      center / 32px no-repeat,
    var(--orange);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.article-video-facade:hover .article-video-play::after,
.article-video-facade:focus-visible .article-video-play::after {
  transform: scale(1.06);
}

/* Secondary outbound route below the player — not the primary play control. */
.article-video-outbound {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-video-outbound a {
  color: var(--orange);
  text-decoration: none;
}

.article-video-outbound a:hover,
.article-video-outbound a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* V10.2.1: file:// standalone-preview note. Small, neutral, below the poster —
   never an error-looking block and never a site-wide banner. */
.article-video-filemode-note {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.article-video-filemode-note--emphasised {
  color: var(--muted);
}

/* ---- V10.2 editorial hero ---- */

.article-hero {
  margin: clamp(28px, 4vw, 44px) 0 0;
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.article-hero-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* ---- Article body ---- */

/* ---- V11.3 reusable local-video block ----
   Aspect ratio is reserved from the structured width/height data, so the
   page never reflows when the metadata loads. Native controls stay
   keyboard-operable; :focus-visible gives a clear focus ring. */
.article-local-video {
  margin: clamp(28px, 4vw, 44px) 0;
}

.article-local-video video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--ink-deep);
}

.article-local-video video:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.article-local-video-caption {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.article-local-video-caption strong {
  color: var(--ink);
}

.article-body {
  /* V10.1: body copy inherits the V9 base body typography (Inter 16px / 1.65). */
  margin-top: clamp(30px, 4vw, 48px);
}

.article-body > * + * {
  margin-top: 1.15em;
}

.article-body h2 {
  /* V10.1: inherits the V9 global H2 typography. Layout-only overrides. */
  max-width: none;
  margin-top: 1.9em;
}

.article-body h3 {
  /* V10.1: inherits the V9 global H3 typography. Layout-only override. */
  margin-top: 1.7em;
}

.article-body p {
  margin-bottom: 0;
}

.article-body a:not(.button) {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:not(.button):hover,
.article-body a:not(.button):focus-visible {
  color: var(--orange-dark);
}

.article-body strong {
  color: var(--white);
}

.article-body ul,
.article-body ol {
  padding-left: 1.3em;
}

.article-body li + li {
  margin-top: 0.5em;
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--orange);
  color: var(--white);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
}

/* Accessible comparison tables. The wrapper scrolls on narrow screens while
   the semantic table, caption and row/column headers remain intact. */
.article-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 6px;
  scrollbar-gutter: stable;
}

.article-table-wrap:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.article-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--ink-deep);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.article-table caption {
  padding: 0 0 14px;
  color: var(--orange);
  font-family: "Syne", Arial, sans-serif;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  caption-side: top;
}


.article-table-caption-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.article-table th,
.article-table td {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  vertical-align: top;
  text-align: left;
}

.article-table thead th {
  background: var(--surface);
  color: var(--orange);
  font-family: "Syne", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.article-table tbody th {
  width: 20%;
  color: var(--white);
  font-weight: 700;
}

.article-table td {
  width: 40%;
}

@media (max-width: 640px) {
  .article-table {
    min-width: 700px;
    font-size: 14px;
  }

  .article-table th,
  .article-table td {
    padding: 12px 13px;
  }
}

.article-cta {
  margin: 1.6em 0;
}

/* ---- /read-articles listing ---- */

.article-listing {
  padding-block: clamp(48px, 7vw, 96px) var(--section);
}

/* V10.2: deliberate two-line listing heading — "READ OUR" / "ARTICLES."
   Inherits the full V9 global H1 typography; each line is an unbreakable block
   so no accidental character-level wrapping ("ARTICLE / S.") can occur. */
.listing-title {
  max-width: none;
}

.listing-title-line {
  display: block;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* V10.2.1: single-column listing hero. The intro sentence sits below the
   complete two-line H1, aligned with the listing grid — never in a second
   column. Scoped via the .article-listing-head page modifier (this stylesheet
   only loads on blog pages), so the shared Home/Services .section-head grid
   keeps its two-column behaviour unchanged. */
.section-head.article-listing-head {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.article-listing-heading-block {
  max-width: 900px;
}

.article-listing-intro {
  margin-top: clamp(24px, 3vw, 36px);
}


.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
  margin-top: clamp(34px, 4vw, 56px);
}

.article-card {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  border-color: var(--line);
  transform: translateY(-3px);
}

.article-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-card-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card-body {
  padding: 22px 24px 26px;
}

.article-card-type {
  /* V10.2: content-type label (PODCAST / ARTICLE) — V9 small-label scale. */
  margin: 0 0 10px;
  color: var(--orange);
  font-family: "Syne", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.article-card-title {
  /* V10.1: card titles are h3 elements inheriting the V9 global H3 typography. */
  max-width: none;
}

.article-card-link:hover .article-card-title {
  color: var(--orange);
}

.article-card-excerpt {
  /* V10.1: inherits the V9 base body size and line-height (Inter 16px / 1.65). */
  margin: 12px 0 0;
  color: var(--muted);
}

.article-card-meta {
  /* V10.1: V9 small-label scale (12px / 600 / 0.08em / uppercase). */
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .article-video-play::after {
    width: 58px;
    height: 58px;
    background-size: 26px;
  }

  .article-card-body {
    padding: 18px 18px 22px;
  }
}

/* ---- Baseline 04 structured migration visuals ---- */
.article-inline-figure {
  margin: clamp(28px, 4vw, 44px) 0;
}

.article-inline-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
}

.article-inline-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.article-decision-framework {
  margin: clamp(30px, 5vw, 52px) 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--ink-deep);
}

.article-decision-layout {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px 16px;
}

.article-decision-y {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.article-decision-y > span {
  display: inline-block;
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-90deg);
}

.article-decision-grid {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.article-decision-cell {
  min-height: 190px;
  padding: clamp(18px, 3vw, 28px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-decision-cell h4 {
  margin: 0 0 10px;
  color: var(--orange);
  font-family: "Syne", Arial, sans-serif;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.25;
}

.article-decision-cell p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.article-decision-x {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .article-decision-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .article-decision-y,
  .article-decision-grid,
  .article-decision-x {
    grid-column: 1;
  }

  .article-decision-y {
    grid-row: auto;
    justify-content: flex-start;
  }

  .article-decision-y > span {
    transform: none;
    white-space: normal;
  }

  .article-decision-y > span::after {
    content: " ↑";
  }

  .article-decision-y .article-decision-arrow {
    display: none;
  }

  .article-decision-grid {
    grid-row: auto;
    grid-template-columns: 1fr;
  }

  .article-decision-cell {
    min-height: 0;
  }

  .article-decision-x {
    grid-row: auto;
    text-align: left;
  }
}
