/* YEEDOOR guides and case studies: article reading layout.
   Keeps the article design system's reading rules (18px body, 1.72 line height,
   70ch measure, its heading scale and sticky table of contents) and maps our tokens
   onto colour, type and surfaces. It is not a marketing page layout.
   Loaded after site.css on article pages only. */

.art {
  --article-body: 18px;
  --article-line: 1.72;
  --article-measure: 70ch;
  --article-lead: 19px;
  --article-h1: clamp(38px, 4.4vw, 52px);
  --article-h1-line: 1.08;
  --article-h2: clamp(27px, 2.6vw, 32px);
  --article-h2-line: 1.22;
  --article-h3: 22px;
  --article-h3-line: 1.32;
  --article-toc: 14px;
  --article-small: 13px;
  --article-p-gap: 1.2em;
  --article-copy: var(--ink-muted);
  --article-heading: var(--ink);
  --art-toc-top: calc(var(--nav-height) + 2 * var(--nav-offset) + 16px);
}

/* Hero */
.art-hero { padding: var(--space-64) 0 var(--space-56); }
.art-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: var(--space-56); align-items: center; }
.art-hero-copy { min-width: 0; }
.art-badge {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--dawn-soft);
  color: var(--dawn-text);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.art-kicker { margin-top: var(--space-16); font-size: var(--type-small-size); font-weight: 600; color: var(--ink-muted); }
.art-hero h1 { margin: var(--space-16) 0; font-size: var(--article-h1); line-height: var(--article-h1-line); letter-spacing: -0.028em; color: var(--article-heading); overflow-wrap: break-word; }
.art-lead { margin: 0; font-size: var(--article-lead); line-height: 1.66; color: var(--article-copy); max-width: 68ch; }
.art-hero .btn-row { margin-top: var(--space-24); }
.art-proof { margin: var(--space-16) 0 0; font-size: var(--article-small); line-height: 1.55; color: var(--ink-muted); }
.art-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: var(--space-16); font-size: var(--article-small); line-height: 1.5; color: var(--ink-muted); }
.art-meta span + span::before { content: "·"; margin-right: 14px; color: var(--line-strong); }
.art-meta a { color: var(--ink); }
.art-hero-panel .ui { margin: 0; }
.art-metric { padding: var(--space-20) 0 var(--space-16); }
.art-metric span { display: block; font-size: var(--type-caption-size); font-weight: 600; color: var(--ink-muted); }
.art-metric strong { display: block; margin: 8px 0 4px; font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 600; }
.art-metric em { display: block; font-style: normal; font-weight: 600; }
.art-metric small { display: block; margin-top: 6px; color: var(--ink-muted); }
.art-states { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.art-state { padding: var(--space-12) 10px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.art-state.is-warning { background: var(--status-pending-soft); }
.art-state strong, .art-state span { display: block; }
.art-state strong { font-size: var(--type-caption-size); }
.art-state span { margin-top: 4px; font-size: 11px; color: var(--ink-muted); }
.art-panel-chips { margin-top: var(--space-16); padding-top: var(--space-16); border-top: 1px solid var(--line); }
.art-panel-chips > span { font-size: var(--type-caption-size); font-weight: 600; color: var(--ink-muted); }
.art-panel-chips div, .art-chips > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--space-8); }
.art-panel-chips div span, .art-chips > div span {
  display: inline-flex; padding: 6px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface-raised); font-size: var(--type-caption-size); font-weight: 600; color: var(--ink);
}

/* Body */
.art-content { padding-bottom: var(--section-pad); }
.art-answer { max-width: 1080px; margin: 0 auto var(--space-20); padding: 28px 30px; border-radius: var(--radius-xl); background: var(--ink-surface); color: var(--ink-text); }
.art-answer span { display: block; font-size: var(--type-small-size); font-weight: 600; color: var(--ink-dawn-text); }
.art-answer p { margin: 8px 0 0; font-size: var(--article-body); line-height: 1.68; }
.art-cover { max-width: 1080px; margin: var(--space-32) auto var(--space-48); }
.art-cover img, .art-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.art-cover figcaption, .art-figure figcaption { margin: 10px 2px 0; font-size: var(--article-small); line-height: 1.55; color: var(--ink-muted); }
.art-shell { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 58px; align-items: start; }
.art-toc { position: sticky; top: var(--art-toc-top); }
.art-toc-inner { padding: var(--space-16) var(--space-20); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-raised); }
.art-toc-inner > strong { display: block; margin-bottom: 6px; font-size: var(--article-small); font-weight: 600; color: var(--ink-muted); }
.art-toc-inner > a { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: var(--article-toc); line-height: 1.4; text-decoration: none; }
.art-toc-inner > a:hover { color: var(--ink); }
.art-toc-inner > a.is-active { color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 var(--dawn-strong); padding-left: 10px; }
.art-toc-cta { margin-top: var(--space-12); padding: var(--space-12) 14px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.art-toc-cta span { display: block; font-size: var(--type-caption-size); line-height: 1.45; color: var(--ink-muted); }
.art-toc-cta a { display: block; margin-top: 6px; font-size: var(--article-small); font-weight: 600; color: var(--dawn-text); text-decoration: none; }
.art-toc-cta a:hover { text-decoration: underline; }

.art-main { min-width: 0; font-size: var(--article-body); line-height: var(--article-line); color: var(--article-copy); }
.art-main p { margin: 0 0 var(--article-p-gap); }
.art-main strong { color: var(--ink); font-weight: 600; }
.art-main code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 5px; border-radius: 6px; background: var(--surface-sunken); color: var(--ink); }
.art-main a:not(.btn) { color: var(--dawn-text); }
.art-main ul, .art-main ol { padding-left: 22px; margin: 0 0 var(--article-p-gap); }
.art-main li { margin: 8px 0; }
.art-main h2 { margin: 0 0 18px; font-size: var(--article-h2); line-height: var(--article-h2-line); letter-spacing: -0.018em; color: var(--article-heading); overflow-wrap: break-word; }
.art-main h3 { margin: 0 0 12px; font-size: var(--article-h3); line-height: var(--article-h3-line); color: var(--article-heading); }
.art-section { padding: 18px 0 48px; scroll-margin-top: var(--art-toc-top); }
.art-section > p, .art-section > ul, .art-section > ol { max-width: var(--article-measure); }
.art-subsection { margin: var(--space-32) 0 0; padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-raised); scroll-margin-top: var(--art-toc-top); }
.art-label { display: block; font-size: var(--type-caption-size); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.art-framework { margin: 0 0 var(--space-48); padding: 28px; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface-raised); box-shadow: var(--shadow-card); }
.art-framework .art-badge { margin-bottom: var(--space-12); }
.art-framework ol li { line-height: 1.6; }
.art-callout { margin: 4px 0 var(--space-48); padding: 26px 28px; border-radius: var(--radius-xl); background: var(--surface-sunken); border-left: 4px solid var(--dawn-strong); }
.art-callout p { margin: 0; line-height: 1.7; white-space: pre-wrap; }
.art-links, .art-chips { margin: -18px 0 var(--space-40); }
.art-links > div { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-8); }
.art-links a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px;
  border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface-raised);
  font-size: var(--article-small); font-weight: 600; line-height: 1.35; text-decoration: none; color: var(--ink) !important;
}
.art-links a:hover { border-color: var(--line-strong); }
.art-links a b { color: var(--ink-muted); font-size: var(--type-caption-size); }
.art-flow { margin: 4px 0 var(--space-48); padding: var(--space-32); border-radius: var(--radius-xl); background: var(--ink-surface); color: var(--ink-text); scroll-margin-top: var(--art-toc-top); }
.art-flow h2 { color: var(--ink-text); }
.art-flow > p { color: var(--ink-muted-text); max-width: 720px; }
.flow-grid { list-style: none; padding: 0 !important; margin: var(--space-24) 0 0 !important; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-16); }
.flow-step { margin: 0 !important; padding: var(--space-20); border-radius: var(--radius-lg); border: 1px solid var(--ink-line); background: var(--ink-raised); display: flex; flex-direction: column; gap: var(--space-12); }
.flow-head { display: flex; align-items: center; gap: var(--space-12); }
.flow-num { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--ink-dawn); color: var(--on-dawn); font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.flow-head strong { color: var(--ink-text) !important; font-size: 16px; line-height: 1.25; }
.flow-step p { margin: 0 !important; color: var(--ink-text); font-size: 17px; line-height: 1.5; }
.flow-step small { color: var(--ink-muted-text); font-size: 14px; line-height: 1.5; }
.art-table { margin: var(--space-24) 0 var(--space-32); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-raised); overflow: hidden; }
.art-table-caption { padding: var(--space-12) var(--space-16); background: var(--surface-sunken); border-bottom: 1px solid var(--line); font-size: var(--type-caption-size); color: var(--ink-muted); }
.art-table-scroll { overflow-x: auto; }
.art-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.art-table th, .art-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.art-table th { font-size: var(--type-caption-size); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); border-bottom-color: var(--line-strong); }
.art-table tr:last-child td { border-bottom: 0; }
.art-table-cards { display: none; }
.art-midcta { margin: 4px 0 var(--space-48); padding: 30px; border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--dawn-soft), var(--surface-raised) 70%); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.art-midcta p { margin: 0; max-width: 640px; }
.art-utility { margin: var(--space-40) 0; padding: 30px; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface-raised); }
.art-utility h2 { margin-top: 6px; }
.art-fields { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--space-16); }
.art-fields span { padding: 6px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: var(--type-caption-size); color: var(--ink); }
.art-sources { margin: var(--space-48) 0; padding: var(--space-32) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.art-sources li { margin: 14px 0; }
.art-sources a { font-weight: 600; text-decoration: none; }
.art-sources li span { display: block; margin-top: 2px; font-size: var(--article-small); color: var(--ink-muted); }
.art-faq-list { display: grid; gap: var(--space-12); }
.art-faq-list details { padding: 0 var(--space-20); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-raised); }
.art-faq-list summary { padding: 18px 0; cursor: pointer; font-weight: 600; color: var(--ink); line-height: 1.45; }
.art-faq-list details p { margin: 0 0 18px !important; }
.art-author { margin: var(--space-40) 0 var(--space-24); padding: 26px; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface-raised); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--space-24); align-items: center; }
.art-author:not(:has(.art-author-avatar)) { grid-template-columns: 1fr; }
.art-author-avatar img { width: 96px; height: 96px; object-fit: cover; object-position: center 24%; border-radius: var(--radius-lg); }
.art-author h2 { margin: 4px 0 2px !important; font-size: 24px !important; }
.art-author h2 a { color: var(--ink) !important; text-decoration: none; }
.art-author-role { font-size: var(--article-small); font-weight: 600; color: var(--ink-muted); margin-bottom: 10px; }
.art-author p { font-size: 15px; line-height: 1.65; margin-bottom: 14px !important; }
.art-author-links { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.art-author-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong); color: var(--ink) !important; font-size: var(--article-small); font-weight: 600; text-decoration: none; }
.art-author-links a.is-primary { background: var(--dawn); border-color: var(--dawn); color: var(--on-dawn) !important; }
.art-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin: 0 0 var(--space-40); }
.art-share .art-label { margin-right: var(--space-8); }
.art-share a, .art-share button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 7px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink) !important; font: 600 var(--article-small) var(--font-text); text-decoration: none; cursor: pointer;
}
.art-share a:hover, .art-share button:hover { border-color: var(--line-strong); }
.art-related { padding-top: var(--space-40); border-top: 1px solid var(--line); }
.art-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.art-related-grid a { display: flex; flex-direction: column; gap: var(--space-8); min-height: 200px; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-raised); text-decoration: none; transition: transform var(--motion-fast) var(--ease-standard); }
.art-related-grid a:hover { transform: translateY(-2px); }
.art-related-grid span { font-size: var(--type-caption-size); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dawn-text); }
.art-related-grid strong { color: var(--ink); font-size: 18px; line-height: 1.38; }
.art-related-grid p { margin: 0 !important; font-size: 14px; line-height: 1.6; }
.art-related-grid em { margin-top: auto; font-style: normal; font-weight: 600; font-size: var(--article-small); color: var(--ink); }
.art-final { margin-top: var(--space-48); padding: 38px; border-radius: var(--radius-xl); display: flex; justify-content: space-between; align-items: center; gap: var(--space-32); }
.art-final h2 { color: var(--ink-text) !important; }
.art-final p { margin: 0 !important; color: var(--ink-muted-text); }

/* Case studies */
.case-logo { height: 40px; width: auto; }
.case-client { display: inline-block; font-size: var(--type-small-size); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dawn-text); }
.case-facts { display: flex; flex-wrap: wrap; gap: var(--space-24); margin-top: var(--space-24); }
.case-facts span { display: block; font-size: var(--type-caption-size); color: var(--ink-muted); }
.case-facts strong { font-size: var(--type-body-sm-size); }
.case-specialists { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-20); }
.case-results { padding-bottom: var(--space-48); }
.case-body { max-width: 820px; margin: 0 auto; }
.case-quote { margin: var(--space-40) 0; padding: var(--space-32); border-radius: var(--radius-xl); background: var(--surface-sunken); }
.case-quote blockquote { margin: 0; font-family: var(--font-display); font-size: var(--type-heading-3-size); line-height: 1.4; color: var(--ink); }
.case-quote blockquote p { margin: 0; }
.case-quote figcaption { margin-top: var(--space-16); font-size: var(--type-small-size); color: var(--ink-muted); }

@media (max-width: 980px) {
  .art-hero-grid { grid-template-columns: 1fr; }
  .art-shell { grid-template-columns: 1fr; gap: var(--space-24); }
  .art-toc { position: relative; top: auto; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .art-related-grid { grid-template-columns: 1fr; }
  .art-midcta, .art-final { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .art-hero { padding-top: var(--space-40); }
  .art-hero h1 { font-size: clamp(30px, 8.1vw, 42px); line-height: 1.13; }
  .art-states, .flow-grid { grid-template-columns: 1fr; }
  .art-subsection { padding: var(--space-20); }
  .art-table-scroll { display: none; }
  .art-table-cards { display: grid; gap: var(--space-12); padding: 14px; }
  .art-table-card { padding: 14px; border-radius: var(--radius-md); border: 1px solid var(--line); }
  .art-table-card div { display: grid; grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .art-table-card div:last-child { border-bottom: 0; }
  .art-table-card span { color: var(--ink-muted); }
  .art-meta { display: grid; gap: 4px; }
  .art-meta span + span::before { display: none; }
  .art-author { grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-16); padding: var(--space-20); }
  .art-author-avatar img { width: 72px; height: 72px; }
  .art-author-links { grid-column: 1 / -1; }
  .art-links > div { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  .art-related-grid a:hover { transform: none; }
}
