/* ==========================================================================
   Insight article: /insights/fm-ai-terms-of-arrival (v2 design)
   Page classes use the `ia-` prefix. Colours: --v2-* tokens, or the page
   tokens below (defined for both themes).
   ========================================================================== */
/* Page tokens (both themes). Accent/ink come from --v2-*; the amber "warning"
   series and the green "ok" tick of the original charts have no v2 token, so
   they are defined here per theme (same approach as total-fm.css). */
:root,
[data-theme="light"] {
  --ia-acc: var(--v2-accent);            /* accent shapes: bars, dots, lines */
  --ia-acc-text: var(--v2-accent-ink);   /* accent text inside charts */
  --ia-on-acc: #211E28;                  /* ink on accent fills (both themes) */
  --ia-warn: #D9821A;
  --ia-warn-text: #A3540B;
  --ia-ok: #3E8A40;
  --ia-term: var(--v2-surface);
}
[data-theme="dark"] {
  --ia-warn: #F8B042;
  --ia-warn-text: #F8B042;
  --ia-ok: #8FD98F;
}

/* ---------------------------------------------------------------- Layout */
.ia-wrap { max-width: calc(820px + 2 * var(--v2-gutter)); }

/* ---------------------------------------------------------------- Hero */
.ia-hero { padding-bottom: clamp(2.5rem, 1.75rem + 2.5vw, 4rem); }
.ia-hero__inner { display: grid; gap: 22px; justify-items: start; }
.ia-back {
  font-family: var(--v2-font-display);
  font-size: var(--v2-fs-small);
  font-weight: 600;
  color: var(--v2-text-muted);
  text-decoration: none;
  transition: color var(--v2-dur) ease;
}
.ia-back:hover { color: var(--v2-accent-ink); }
.ia-back:focus-visible { outline: 2px solid var(--v2-focus); outline-offset: 4px; border-radius: 4px; }
.ia-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.ia-pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--v2-r-pill);
  border: 1px solid var(--v2-chip-border);
  font-size: var(--v2-fs-xs);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--v2-text);
}
.ia-pill--primary { background: var(--v2-accent); border-color: var(--v2-accent); color: var(--ia-on-acc); }
.ia-title {
  margin: 0;
  font-size: clamp(2.125rem, 1.6rem + 2.2vw, 3.75rem);   /* 34 → 60 */
  text-wrap: balance;
}
.ia-deck { margin: 0; }
.ia-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  margin-top: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--v2-line-soft);
  border-bottom: 1px solid var(--v2-line-soft);
  font-family: var(--v2-font-display);
  font-size: var(--v2-fs-small);
  color: var(--v2-text-muted);
}
.ia-meta strong { color: var(--v2-text); font-weight: 600; }
.ia-meta__dot { opacity: 0.6; }

/* ---------------------------------------------------------------- Figures (inline SVG charts) */
.ia-figure {
  margin: 0;
  padding: clamp(12px, 0.2rem + 3vw, 36px);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-r-card);
  background: var(--v2-card-bg);
  min-width: 0;
}
.ia-figure--hero { box-shadow: var(--v2-shadow-frame); background: var(--v2-glass-bg); }
.ia-figure--inline { margin: 36px 0; }
.ia-figure svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------------------------------------------------------------- Body copy */
.ia-body {
  padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  font-size: var(--v2-fs-body);
  line-height: 1.8;
  color: var(--v2-text-body);
  min-width: 0;
}
.ia-body > p { margin: 0 0 22px; }
.ia-body h2 {
  margin: clamp(3rem, 2.5rem + 2vw, 4rem) 0 18px;
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);   /* 28 → 40 */
  line-height: var(--v2-lh-heading);
  letter-spacing: -0.02em;
  color: var(--v2-text);
  text-wrap: balance;
}
.ia-body > h2:first-child { margin-top: 0; }
.ia-h3 {
  margin: 40px 0 12px;
  font-family: var(--v2-font-display);
  font-weight: 600;
  font-size: var(--v2-fs-h4);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--v2-text);
}
.ia-body strong { color: var(--v2-text); font-weight: 650; }
.ia-body a:not(.v2-btn) {
  color: var(--v2-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.ia-body a:not(.v2-btn):hover { text-decoration-thickness: 2px; }
.ia-body a:focus-visible { outline: 2px solid var(--v2-focus); outline-offset: 2px; border-radius: 2px; }
.ia-list { margin: 18px 0 26px; padding-left: 1.3em; display: grid; gap: 8px; line-height: 1.7; }
.ia-list li::marker { color: var(--v2-accent); }

/* Sources */
.ia-sources {
  margin: 14px 0 10px;
  padding-left: 1.4em;
  display: grid;
  gap: 10px;
  font-size: var(--v2-fs-small);
  line-height: 1.7;
  color: var(--v2-text-muted);
}
.ia-sources strong { color: var(--v2-text-lead); }
.ia-body > p.ia-disclaimer {
  margin: 10px 0 0;
  font-size: var(--v2-fs-xs);
  font-style: italic;
  line-height: 1.6;
  color: var(--v2-text-muted);
}

/* Pull quote */
.ia-quote {
  display: grid;
  gap: 14px;
  margin: 40px 0;
  padding: clamp(22px, 1rem + 1.5vw, 30px) clamp(22px, 1rem + 2vw, 34px);
  border-left: 3px solid var(--v2-accent);
  border-radius: 0 var(--v2-r-banner) var(--v2-r-banner) 0;
  background: var(--v2-accent-tint);
}
.ia-quote__text {
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);   /* 22 → 30 */
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--v2-text);
}
.ia-quote__attr {
  font-size: var(--v2-fs-eyebrow);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--v2-accent-ink);
}

/* Stat row */
.ia-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 36px 0;
}
@media (min-width: 700px) { .ia-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ia-stat {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 26px 22px;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-r-card);
  background: var(--v2-card-bg);
  text-align: center;
}
.ia-stat__num {
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 2.2rem + 2vw, 4rem);   /* 44 → 64 */
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--v2-accent-ink);
}
.ia-stat__lbl { font-size: var(--v2-fs-small); line-height: 1.5; color: var(--v2-text-muted); }

/* Comparison table (div grid; cells get data-label from the page script for phones) */
.ia-table {
  margin: 36px 0;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-r-card);
  background: var(--v2-card-bg);
  overflow: hidden;
}
.ia-table__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--v2-line-soft);
}
.ia-table__row:first-child { border-top: 0; }
.ia-table__row > div {
  padding: 16px 20px;
  font-size: var(--v2-fs-ui);
  line-height: 1.55;
  color: var(--v2-text-body);
}
.ia-table__row > div + div { border-left: 1px solid var(--v2-line-soft); }
.ia-table__head { background: var(--v2-banner-bg); }
.ia-table__head > div {
  padding-block: 14px;
  font-size: var(--v2-fs-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}
.ia-table__row > .ia-table__key { font-family: var(--v2-font-display); font-weight: 600; color: var(--v2-text); }
.ia-table__row > .ia-table__best { color: var(--v2-accent-ink); font-weight: 600; background: var(--v2-accent-tint); }
@media (max-width: 699px) {
  .ia-table__row { grid-template-columns: 1fr; }
  .ia-table__row > div + div { border-left: 0; border-top: 1px dashed var(--v2-line-soft); }
  .ia-table__head { display: none; }
  .ia-table__row:nth-child(2) { border-top: 0; }
  .ia-table__row > div[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-family: var(--v2-font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v2-text-muted);
  }
  .ia-table__row > .ia-table__key {
    padding-block: 10px;
    background: var(--v2-banner-bg);
    font-size: var(--v2-fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
}

/* Closing CTA */
.ia-divider { margin: 56px 0; }
.ia-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 56px 0 0;
  padding: clamp(28px, 1rem + 3vw, 52px) clamp(22px, 1rem + 3vw, 48px);
  border: 1px solid var(--v2-accent-tint-border);
  border-radius: var(--v2-r-panel);
  background: var(--v2-grad-hero);
  text-align: center;
}
.ia-divider + .ia-cta { margin-top: 0; }
.ia-cta h3 {
  margin: 0;
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);   /* 24 → 36 */
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--v2-text);
  text-wrap: balance;
}
.ia-cta p { margin: 0 0 8px; max-width: 580px; font-size: var(--v2-fs-ui); line-height: 1.6; color: var(--v2-text-body); }

/* ---------------------------------------------------------------- "Cut out and keep" five questions */
.ia-cutout {
  margin: 40px 0;
  padding: clamp(20px, 0.8rem + 2vw, 30px);
  border: 1.5px dashed var(--v2-accent-tint-border);
  border-radius: var(--v2-r-card);
  background: var(--v2-accent-tint);
}
.ia-cutout__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}
.ia-cutout__title {
  font-family: var(--v2-font-display);
  font-size: var(--v2-fs-eyebrow);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--v2-accent-ink);
}
.ia-cutout__note {
  font-family: var(--v2-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}
.ia-cutout__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px;
}
.ia-cutout__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-r-tag);
  background: var(--v2-glass-bg);
}
.ia-cutout__item--wide { grid-column: 1 / -1; }
.ia-cutout__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--v2-accent);
  color: var(--ia-on-acc);
  font-family: var(--v2-font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.ia-cutout__q {
  margin-bottom: 4px;
  font-family: var(--v2-font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--v2-text);
}
.ia-cutout__text { font-size: 14.5px; line-height: 1.55; color: var(--v2-text-body); }

/* ---------------------------------------------------------------- SVG chart colours (generated from the original palette) */
.ia-svg .f-acc { fill: var(--ia-acc); }
.ia-svg .f-acc-12 { fill: var(--ia-acc); fill-opacity: 0.12; }
.ia-svg .f-acc-22 { fill: var(--ia-acc); fill-opacity: 0.22; }
.ia-svg .f-acc-35 { fill: var(--ia-acc); fill-opacity: 0.35; }
.ia-svg .f-acc-45 { fill: var(--ia-acc); fill-opacity: 0.45; }
.ia-svg .f-acc-60 { fill: var(--ia-acc); fill-opacity: 0.6; }
.ia-svg .f-acct { fill: var(--ia-acc-text); }
.ia-svg .f-acct-75 { fill: var(--ia-acc-text); fill-opacity: 0.75; }
.ia-svg .f-ink { fill: var(--v2-text); }
.ia-svg .f-ink-6 { fill: var(--v2-text); fill-opacity: 0.06; }
.ia-svg .f-ink-10 { fill: var(--v2-text); fill-opacity: 0.1; }
.ia-svg .f-ink-16 { fill: var(--v2-text); fill-opacity: 0.16; }
.ia-svg .f-ink-50 { fill: var(--v2-text); fill-opacity: 0.5; }
.ia-svg .f-lead { fill: var(--v2-text-lead); }
.ia-svg .f-mute { fill: var(--v2-text-muted); }
.ia-svg .f-onacc { fill: var(--ia-on-acc); }
.ia-svg .f-warn { fill: var(--ia-warn); }
.ia-svg .f-warn-5 { fill: var(--ia-warn); fill-opacity: 0.05; }
.ia-svg .f-warn-8 { fill: var(--ia-warn); fill-opacity: 0.08; }
.ia-svg .f-warn-10 { fill: var(--ia-warn); fill-opacity: 0.1; }
.ia-svg .f-warn-18 { fill: var(--ia-warn); fill-opacity: 0.18; }
.ia-svg .f-warn-30 { fill: var(--ia-warn); fill-opacity: 0.3; }
.ia-svg .f-warnt { fill: var(--ia-warn-text); }
.ia-svg .f-warnt-70 { fill: var(--ia-warn-text); fill-opacity: 0.7; }
.ia-svg .f-warnt-80 { fill: var(--ia-warn-text); fill-opacity: 0.8; }
.ia-svg .f-warnt-85 { fill: var(--ia-warn-text); fill-opacity: 0.85; }
.ia-svg .s-acc-40 { stroke: var(--ia-acc); stroke-opacity: 0.4; }
.ia-svg .s-ink-10 { stroke: var(--v2-text); stroke-opacity: 0.1; }
.ia-svg .s-ink-12 { stroke: var(--v2-text); stroke-opacity: 0.12; }
.ia-svg .s-ink-14 { stroke: var(--v2-text); stroke-opacity: 0.14; }
.ia-svg .s-ink-16 { stroke: var(--v2-text); stroke-opacity: 0.16; }
.ia-svg .s-ink-25 { stroke: var(--v2-text); stroke-opacity: 0.25; }
.ia-svg .s-ink-35 { stroke: var(--v2-text); stroke-opacity: 0.35; }
.ia-svg .s-warn { stroke: var(--ia-warn); }
.ia-svg .s-warn-25 { stroke: var(--ia-warn); stroke-opacity: 0.25; }
.ia-svg .s-warn-30 { stroke: var(--ia-warn); stroke-opacity: 0.3; }
.ia-svg .s-warn-35 { stroke: var(--ia-warn); stroke-opacity: 0.35; }
.ia-svg .s-warn-40 { stroke: var(--ia-warn); stroke-opacity: 0.4; }
.ia-svg .s-warn-50 { stroke: var(--ia-warn); stroke-opacity: 0.5; }
.ia-svg .s-warn-55 { stroke: var(--ia-warn); stroke-opacity: 0.55; }
.ia-svg .s-warn-60 { stroke: var(--ia-warn); stroke-opacity: 0.6; }
