/*
 * Aamin AI inner pages (HAFR workspace): pages/css/insights.css, the Insights page and the six articles.
 * Owner: pages-insights (2026-11-28). Linked by pages/templates/insights-index.mjs and article.mjs
 * (the first thing in <main>), after the head's pages.css, so it only adds to the shared .pg-* pieces.
 *
 *   1. The typographic cover (.ins-cover): an icon tile, the topic, a dotted figure of its own and, on
 *      a card, the title. Sizes: card (the Insights page), mini (More insights), band (an article's head).
 *   2. Equal cards (.ins-cards / .ins-card).
 *   3. The article: its head, the reading column (P30: 18 px text, about 70 characters a line), the
 *      paper "Short answer", lists, tables, notes, the sample screen, the sticky contents list
 *      (>= 1,280 px) and the end of the column (share link, all insights).
 *   4. Arabic (Alexandria, RTL tables), phones, reduced motion.
 *
 * Rules kept: no glass, no photographs, solid grounds, one amber accent per view (the hero eyebrow's
 * seal or a chapter's; nothing here wears amber), only transform and opacity move, 44 px targets.
 */

/* NEW TOKENS */
:root {
  --ins-col: 588px;                         /* the reading column: 18 px Geist averages 8.2 px a character, so 70 a line */
  --ins-toc: 200px;                         /* the contents list, from 1,280 px */
  --ins-gap: 64px;                          /* between the contents list and the column */
  --ins-out: 140px;                         /* how far a table or the sample screen reaches past the column */
  --ins-ink: #252B32;                       /* reading ink: between text-1 and text-2 (13.9:1 on paper) */
  --ins-cover-ground: #EDF0EC;              /* the cover's ground (nacre) */
  --ins-dot: rgb(36 47 58 / 0.62);          /* a cover's figure */
  --ins-dot-faint: rgb(36 47 58 / 0.13);    /* the cover's field of dots */
  --ins-dot-step: 11px;
  --ins-radius: 22px;
  --ins-rule: rgb(11 13 16 / 0.1);
  --ins-sea: var(--hf-color-sea-600, #006776);
}

/* ================================================================ 1. the typographic cover */
/* Grid: the tile at the top, the topic and the title at the foot; the dotted figure fills the upper
   inline-end part (a grid item over every row, pulled into the padding, so the title's link can still
   cover the whole card). Figures are drawn in px: a card's cover is 330 to 370 px wide at every width. */
.ins-cover {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  padding: 20px 22px 22px;
  border-radius: 16px; overflow: hidden;
  background:
    linear-gradient(to top, var(--ins-cover-ground) 24%, rgb(237 240 236 / 0) 62%),
    radial-gradient(circle, var(--ins-dot-faint) 1.1px, transparent 1.6px) 0 0 / var(--ins-dot-step) var(--ins-dot-step),
    var(--ins-cover-ground);
  aspect-ratio: 1 / 1;
}
.ins-cover > * { grid-column: 1; z-index: 1; }
.ins-cover__tile { grid-row: 1; display: flex; }
.ins-cover__foot { grid-row: 3; display: grid; justify-items: start; gap: 12px; min-inline-size: 0; }
.ins-cover__topic {
  display: inline-flex; align-items: center; min-block-size: 28px; padding: 3px 12px; border-radius: 999px;
  background: var(--hf-surface-chip, #FDFDFC); box-shadow: var(--hf-ring-soft);
  font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--hf-color-text-2);
  max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ins-cover__title {
  margin: 0; max-inline-size: 24ch;
  font-size: 23px; font-weight: 650; line-height: 1.2; letter-spacing: -0.02em; color: var(--hf-color-text-1);
  text-wrap: balance;
}
.ins-cover__dots {
  grid-area: 1 / 1 / -1 / -1; z-index: 0; margin: -20px -22px -22px; pointer-events: none;
  background-image: radial-gradient(circle, var(--ins-dot) 1.25px, transparent 1.75px);
  background-size: var(--ins-dot-step) var(--ins-dot-step);
  background-position: 0 0;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  transform-origin: 75% 25%;
  transition: transform 900ms var(--hf-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
[dir="rtl"] .ins-cover__dots { scale: -1 1; transform-origin: 50% 25%; } /* mirrored in place */

/* scan: rings around a probe point (security testing) */
.ins-cover--scan .ins-cover__dots {
  -webkit-mask-image: radial-gradient(circle at calc(100% - 104px) 108px, #000 0 12px, transparent 13px 30px, rgb(0 0 0 / 0.42) 31px 50px, transparent 51px 70px, rgb(0 0 0 / 0.42) 71px 92px, transparent 93px), conic-gradient(from 8deg at calc(100% - 104px) 108px, #000 0 58deg, transparent 0), radial-gradient(circle at calc(100% - 104px) 108px, #000 0 92px, transparent 93px);
          mask-image: radial-gradient(circle at calc(100% - 104px) 108px, #000 0 12px, transparent 13px 30px, rgb(0 0 0 / 0.42) 31px 50px, transparent 51px 70px, rgb(0 0 0 / 0.42) 71px 92px, transparent 93px), conic-gradient(from 8deg at calc(100% - 104px) 108px, #000 0 58deg, transparent 0), radial-gradient(circle at calc(100% - 104px) 108px, #000 0 92px, transparent 93px);
  -webkit-mask-composite: source-over, source-in, source-over; mask-composite: add, intersect, add;
}
/* rise: a slope of dots climbing to the inline end (pilot to production) */
.ins-cover--rise .ins-cover__dots {
  -webkit-mask-image: linear-gradient(to bottom right, transparent 49.5%, #000 50.5%);
          mask-image: linear-gradient(to bottom right, transparent 49.5%, #000 50.5%);
  -webkit-mask-size: 232px 176px; mask-size: 232px 176px;
  -webkit-mask-position: right 22px top 22px; mask-position: right 22px top 22px;
}
/* columns: a dotted portico, a pediment over the columns (the central bank) */
.ins-cover--columns .ins-cover__dots {
  -webkit-mask-image: conic-gradient(from 112deg at 50% 0, #000 136deg, transparent 0), repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 40px), linear-gradient(#000 0 0);
          mask-image: conic-gradient(from 112deg at 50% 0, #000 136deg, transparent 0), repeating-linear-gradient(90deg, #000 0 22px, transparent 22px 40px), linear-gradient(#000 0 0);
  -webkit-mask-size: 224px 46px, 202px 96px, 224px 11px;
          mask-size: 224px 46px, 202px 96px, 224px 11px;
  -webkit-mask-position: right 22px top 22px, right 33px top 76px, right 22px top 180px;
          mask-position: right 22px top 22px, right 33px top 76px, right 22px top 180px;
}
/* boundary: a filled disc inside its ring (data kept inside the country) */
.ins-cover--boundary .ins-cover__dots {
  -webkit-mask-image: radial-gradient(circle at calc(100% - 108px) 108px, #000 0 52px, transparent 53px 69px, #000 70px 90px, transparent 91px);
          mask-image: radial-gradient(circle at calc(100% - 108px) 108px, #000 0 52px, transparent 53px 69px, #000 70px 90px, transparent 91px);
}
/* shade: a figure and its fainter shadow (shadow AI) */
.ins-cover--shade .ins-cover__dots {
  -webkit-mask-image: radial-gradient(circle at calc(100% - 128px) 88px, #000 0 56px, transparent 58px), radial-gradient(circle at calc(100% - 92px) 124px, rgb(0 0 0 / 0.3) 0 70px, transparent 72px);
          mask-image: radial-gradient(circle at calc(100% - 128px) 88px, #000 0 56px, transparent 58px), radial-gradient(circle at calc(100% - 92px) 124px, rgb(0 0 0 / 0.3) 0 70px, transparent 72px);
}
/* redact: lines of text, some of them struck out (personal data) */
.ins-cover--redact .ins-cover__dots {
  --l: rgb(0 0 0 / 0.5);
  -webkit-mask-image: linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0), linear-gradient(var(--l) 0 0), linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0), linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0);
          mask-image: linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0), linear-gradient(var(--l) 0 0), linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0), linear-gradient(var(--l) 0 0), linear-gradient(#000 0 0);
  -webkit-mask-size: 132px 11px, 66px 11px, 210px 11px, 88px 11px, 110px 11px, 176px 11px, 66px 11px;
          mask-size: 132px 11px, 66px 11px, 210px 11px, 88px 11px, 110px 11px, 176px 11px, 66px 11px;
  -webkit-mask-position: right 110px top 33px, right 22px top 33px, right 22px top 66px, right 154px top 99px, right 22px top 99px, right 22px top 132px, right 166px top 165px;
          mask-position: right 110px top 33px, right 22px top 33px, right 22px top 66px, right 154px top 99px, right 22px top 99px, right 22px top 132px, right 166px top 165px;
}

/* the band: an article's head (wide and short): the tile and the topic at the start, the figure at the end */
.ins-cover--band {
  aspect-ratio: auto; block-size: clamp(184px, 18vw, 248px); margin-block-start: clamp(36px, 4vw, 56px);
  padding: 24px 28px; border-radius: 22px; grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr); row-gap: 14px;
  background:
    linear-gradient(to right, var(--ins-cover-ground) 18%, rgb(237 240 236 / 0) 58%),
    radial-gradient(circle, var(--ins-dot-faint) 1.15px, transparent 1.7px) 0 0 / 12px 12px,
    var(--ins-cover-ground);
}
[dir="rtl"] .ins-cover--band {
  background:
    linear-gradient(to left, var(--ins-cover-ground) 18%, rgb(237 240 236 / 0) 58%),
    radial-gradient(circle, var(--ins-dot-faint) 1.15px, transparent 1.7px) 0 0 / 12px 12px,
    var(--ins-cover-ground);
}
.ins-cover--band .ins-cover__tile { grid-row: 2; }
.ins-cover--band .ins-cover__foot { grid-row: 3; }
.ins-cover--band .ins-cover__topic { min-block-size: 32px; padding-inline: 14px; font-size: 14px; }
.ins-cover--band .ins-cover__dots { margin: -24px -28px; --ins-dot-step: 12px; }
.ins-cover--band.ins-cover--scan .ins-cover__dots {
  -webkit-mask-image: radial-gradient(circle at calc(100% - 190px) 50%, #000 0 13px, transparent 14px 32px, rgb(0 0 0 / 0.42) 33px 54px, transparent 55px 76px, rgb(0 0 0 / 0.42) 77px 100px, transparent 101px), conic-gradient(from 8deg at calc(100% - 190px) 50%, #000 0 58deg, transparent 0), radial-gradient(circle at calc(100% - 190px) 50%, #000 0 100px, transparent 101px);
          mask-image: radial-gradient(circle at calc(100% - 190px) 50%, #000 0 13px, transparent 14px 32px, rgb(0 0 0 / 0.42) 33px 54px, transparent 55px 76px, rgb(0 0 0 / 0.42) 77px 100px, transparent 101px), conic-gradient(from 8deg at calc(100% - 190px) 50%, #000 0 58deg, transparent 0), radial-gradient(circle at calc(100% - 190px) 50%, #000 0 100px, transparent 101px);
  -webkit-mask-composite: source-over, source-in, source-over; mask-composite: add, intersect, add;
}
.ins-cover--band.ins-cover--rise .ins-cover__dots { -webkit-mask-size: 440px 100%; mask-size: 440px 100%; -webkit-mask-position: right 0 top 0; mask-position: right 0 top 0; }
.ins-cover--band.ins-cover--boundary .ins-cover__dots { -webkit-mask-image: radial-gradient(circle at calc(100% - 180px) 50%, #000 0 56px, transparent 57px 75px, #000 76px 98px, transparent 99px); mask-image: radial-gradient(circle at calc(100% - 180px) 50%, #000 0 56px, transparent 57px 75px, #000 76px 98px, transparent 99px); }
.ins-cover--band.ins-cover--shade .ins-cover__dots { -webkit-mask-image: radial-gradient(circle at calc(100% - 210px) 44%, #000 0 64px, transparent 66px), radial-gradient(circle at calc(100% - 168px) 58%, rgb(0 0 0 / 0.3) 0 80px, transparent 82px); mask-image: radial-gradient(circle at calc(100% - 210px) 44%, #000 0 64px, transparent 66px), radial-gradient(circle at calc(100% - 168px) 58%, rgb(0 0 0 / 0.3) 0 80px, transparent 82px); }
.ins-cover--band.ins-cover--columns .ins-cover__dots {
  -webkit-mask-position: right 64px top 24px, right 75px top 78px, right 64px top 182px; mask-position: right 64px top 24px, right 75px top 78px, right 64px top 182px;
}
.ins-cover--band.ins-cover--redact .ins-cover__dots {
  -webkit-mask-position: right 152px top 40px, right 64px top 40px, right 64px top 73px, right 196px top 106px, right 64px top 106px, right 64px top 139px, right 208px top 172px;
          mask-position: right 152px top 40px, right 64px top 40px, right 64px top 73px, right 196px top 106px, right 64px top 106px, right 64px top 139px, right 208px top 172px;
}

/* the mini cover (More insights): the same figure, a smaller title */
.ins-cover--mini .ins-cover__title { font-size: 20px; }

/* ================================================================ 2. equal cards */
.ins-shelf { padding-block: 8px var(--hf-row-pad-y); }
.ins-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 24px;
  max-inline-size: calc(var(--hf-story-max) + 2 * var(--hf-story-pad-x)); margin: 0 auto; padding: 0 var(--hf-story-pad-x);
  list-style: none;
}
.ins-cards--more { margin-block-start: 48px; }
.ins-card {
  position: relative; display: flex; flex-direction: column; min-inline-size: 0;
  padding: 8px; border-radius: var(--ins-radius); background: var(--hf-surface-card); box-shadow: var(--hf-shadow-card);
  transition: transform var(--hf-dur-3, 400ms) var(--hf-ease-out, ease-out);
}
.ins-card__link { color: inherit; text-decoration: none; }
.ins-card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.ins-card__link:focus-visible { outline: none; }
.ins-card:has(.ins-card__link:focus-visible) { outline: var(--hf-focus-width, 2px) solid var(--hf-color-focus); outline-offset: 3px; }
.ins-card__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 18px 16px 14px; }
.ins-card__meta { margin: 0; font: 500 13px/1.3 var(--hf-font-mono, "HF Geist Mono", monospace); letter-spacing: 0; color: var(--hf-color-text-3); }
.ins-card__desc { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--hf-color-text-2); text-wrap: pretty; }
.ins-card__tags { margin-block-start: 2px; }
.ins-card__go {
  margin-block-start: auto; padding-block-start: 6px; display: inline-flex; align-items: center; gap: 8px; min-block-size: 32px;
  font-size: 15px; font-weight: 600; color: var(--hf-color-text-1);
}
.ins-card__go .hf-icon { inline-size: 18px; block-size: 18px; transition: translate var(--hf-dur-2, 200ms) var(--hf-ease-out, ease-out); }
.ins-card:hover { transform: translateY(-3px); }
.ins-card:hover .ins-cover__dots { transform: translateY(-4px) scale(1.035); }
.ins-card:hover .ins-card__go .hf-icon { translate: var(--hf-move-arrow, 3px) 0; }
[dir="rtl"] .ins-card:hover .ins-card__go .hf-icon { translate: calc(-1 * var(--hf-move-arrow, 3px)) 0; }
.ins-card--mini .ins-card__body { padding-block: 16px 12px; gap: 8px; }

/* ================================================================ 3. the article */
/* the head: the date line in mono, the title over two or three lines, the summary, the cover band */
.pg--article .pg-hero__text { max-inline-size: none; }
.pg--article .pg-hero__text > :not(.ins-cover) { max-inline-size: 900px; }
.pg--article .pg-hero__eyebrow { font-family: var(--hf-font-mono, "HF Geist Mono", monospace); font-weight: 500; font-size: 13.5px; letter-spacing: 0; color: var(--hf-color-text-2); }
.pg--article .pg-hero__title { font-size: clamp(34px, 4.1vw, 56px); line-height: 1.06; letter-spacing: -0.03em; }
.pg--article .pg-hero__lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.52; max-inline-size: 60ch; }
.pg--article .pg-hero { padding-block-end: clamp(40px, 4vw, 64px); }

/* the frame: one centred column; from 1,280 px the contents list sits in the left margin */
.ar { padding-block: clamp(48px, 5vw, 80px) var(--hf-row-pad-y); container-type: inline-size; }
.ar__grid {
  display: grid; grid-template-columns: minmax(0, var(--ins-col)); justify-content: center;
  max-inline-size: calc(var(--hf-story-max) + 2 * var(--hf-story-pad-x)); margin-inline: auto; padding-inline: var(--hf-story-pad-x);
}
.ar__col { min-inline-size: 0; }
.ar-toc { display: none; }
/* The article's own sections are [data-section] (lib/app.js gives them content-visibility: auto, whose
   paint containment would clip a table or the sample screen reaching past the column). The whole
   article (.ar) keeps the skip; its parts paint normally. */
.ar .ar-sec { content-visibility: visible; contain: none; }

/* the reading type: 18 px, generous leading, about 70 characters a line */
.ar-p, .ar-li { font-size: 18px; line-height: 1.72; color: var(--ins-ink); text-wrap: pretty; }
.ar-p { margin: 0 0 1.15em; }
.ar-p a, .ar-li a, .ar-answer__text a, .ar-note a, .ar-table a {
  color: var(--hf-color-text-1); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: rgb(11 13 16 / 0.4); transition: text-decoration-color var(--hf-dur-2, 200ms) ease;
}
.ar-p a:hover, .ar-li a:hover, .ar-answer__text a:hover, .ar-note a:hover, .ar-table a:hover { text-decoration-color: currentColor; }
.ar-p strong, .ar-li strong { color: var(--hf-color-text-1); font-weight: 600; }
.ar-intro { margin-block-start: 8px; }
.ar-intro .ar-p:first-child { font-size: 19.5px; line-height: 1.66; color: var(--hf-color-text-1); }

/* the paper "Short answer": opaque, a sea-glass rule at the inline start */
.ar-answer {
  position: relative; margin: 0 0 44px; padding: 24px 28px 26px 32px; border-radius: 14px;
  background: var(--hf-surface-card); box-shadow: var(--hf-ring-soft), 0 12px 32px -22px rgb(30 42 54 / 0.28);
}
.ar-answer::before {
  content: ""; position: absolute; inset-block: 20px; inset-inline-start: 0; inline-size: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #7FC4C4, var(--ins-sea));
}
[dir="rtl"] .ar-answer::before { border-radius: 3px 0 0 3px; }
[dir="rtl"] .ar-answer { padding: 24px 32px 26px 28px; }
.ar-answer__k { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--ins-sea); }
.ar-answer__text { margin: 0; font-size: 19.5px; line-height: 1.6; color: var(--hf-color-text-1); text-wrap: pretty; }

/* sections and their headings */
.ar-sec { padding-block-start: 52px; }
.ar-sec__k { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--hf-color-text-3); }
.ar-sec__title {
  margin: 0 0 20px; font-size: clamp(26px, 2.3vw, 32px); font-weight: 650; line-height: 1.18; letter-spacing: -0.022em;
  color: var(--hf-color-text-1); text-wrap: balance;
}
.ar-sec__title span { color: var(--hf-tone); }
.ar-sub { margin-block: 30px 8px; }
.ar-sub:first-of-type { margin-block-start: 8px; }
.ar-sub__k { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--hf-color-text-3); }
.ar-sub__title { margin: 0 0 12px; font-size: 21px; font-weight: 650; line-height: 1.3; letter-spacing: -0.012em; color: var(--hf-color-text-1); text-wrap: balance; }

/* lists: a quiet dot; numbered steps; the checklist with check marks */
.ar-ul, .ar-ol { display: grid; gap: 12px; margin: 4px 0 1.5em; padding: 0; list-style: none; }
.ar-ul > li, .ar-ol > li { font-size: 18px; line-height: 1.72; }
:lang(ar) :is(.ar-ul, .ar-ol) > li { line-height: 1.95; }
.ar-ul > li { position: relative; padding-inline-start: 26px; }
.ar-ul > li::before {
  content: ""; position: absolute; inset-inline-start: 4px; inset-block-start: calc(0.86em - 3px); inset-block-start: calc(0.5lh - 3px);
  inline-size: 6px; block-size: 6px; border-radius: 2px; background: var(--hf-color-text-3);
}
.ar-ol { counter-reset: ar-step; }
.ar-ol > li { position: relative; counter-increment: ar-step; padding-inline-start: 46px; }
.ar-ol > li::before {
  content: counter(ar-step); position: absolute; inset-inline-start: 0; inset-block-start: calc(0.5lh - 15px);
  display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%;
  background: var(--hf-surface-card); box-shadow: var(--hf-ring-soft);
  font: 500 13px/1 var(--hf-font-mono, "HF Geist Mono", monospace); color: var(--hf-color-text-1);
}
.ar-ol--check > li::before { content: none; }
.ar-ol__mark {
  position: absolute; inset-inline-start: 0; inset-block-start: calc(0.5lh - 15px); display: grid; place-items: center;
  inline-size: 30px; block-size: 30px; border-radius: 9px; background: var(--hf-tint-sea, #E4F0EE); box-shadow: inset 0 0 0 1px var(--hf-tint-sea-line, rgb(0 103 118 / 0.14));
  color: var(--ins-sea);
}
.ar-ol__mark .hf-icon { inline-size: 18px; block-size: 18px; }

/* tables: their own scrolling box, the first column as row heads; wider than the column on laptops */
.ar-table {
  margin: 10px 0 34px; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 16px;
  background:
    linear-gradient(90deg, var(--hf-surface-card) 30%, rgb(255 255 255 / 0)) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--hf-surface-card) 30%, rgb(255 255 255 / 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(30 42 54 / 0.16), rgb(30 42 54 / 0)) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(30 42 54 / 0.16), rgb(30 42 54 / 0)) right / 14px 100% no-repeat scroll,
    var(--hf-surface-card);
  box-shadow: var(--hf-ring-soft);
}
.ar-table:focus-visible { outline: var(--hf-focus-width, 2px) solid var(--hf-color-focus); outline-offset: 3px; }
.ar-table table { inline-size: 100%; min-inline-size: calc(var(--cols, 3) * 150px); border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.ar-table :is(th, td) { padding: 14px 18px; text-align: start; vertical-align: top; border-block-end: 1px solid var(--ins-rule); }
.ar-table thead th { padding-block: 13px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--hf-color-text-3); border-block-end-color: rgb(11 13 16 / 0.14); }
.ar-table tbody th { font-weight: 600; color: var(--hf-color-text-1); min-inline-size: 9em; }
.ar-table td { color: var(--hf-color-text-2); }
.ar-table tbody tr:last-child :is(th, td) { border-block-end: 0; }

/* notes, in-text buttons, the sample screen */
.ar-note { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--hf-color-text-3); }
.ar-note > .hf-icon { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 3px; }
.ar-cta { margin: 0 0 1.2em; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ar-cta__a { display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; font-weight: 600; color: var(--hf-color-text-1); text-decoration: none; border-block-end: 1px solid currentColor; }
.ar-figure { display: flex; justify-content: center; margin: 28px 0 36px; }
@media (min-width: 48rem) { .ar-figure { margin-inline: -32px; } }
.ar-figure .hf-dev { margin-inline: auto; }

/* the column's end: the share link and all insights */
.ar-end {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-block-start: 48px; padding-block-start: 20px; border-block-start: 1px solid var(--ins-rule);
}
.ar-end__a {
  display: inline-flex; align-items: center; gap: 10px; min-block-size: 44px;
  font-size: 15.5px; font-weight: 600; color: var(--hf-color-text-1); text-decoration: none;
}
.ar-end__a > span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgb(11 13 16 / 0.35); }
.ar-end__a:hover > span { text-decoration-color: currentColor; }
.ar-end__a > .hf-icon { inline-size: 18px; block-size: 18px; }
.ar-end__all { gap: 8px; }

/* the contents list (from 1,280 px): sticky in the left margin, the section in view marked */
.ar-toc__k { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--hf-color-text-3); }
.ar-toc__list { margin: 0; padding: 0; list-style: none; border-inline-start: 1px solid var(--ins-rule); }
.ar-toc__a {
  position: relative; display: flex; align-items: center; min-block-size: 44px; padding: 7px 0; padding-inline-start: 16px;
  font-size: 14px; line-height: 1.35; color: var(--hf-color-text-2); text-decoration: none; text-wrap: pretty;
}
.ar-toc__a:hover { color: var(--hf-color-text-1); }
.ar-toc__a::before {
  content: ""; position: absolute; inset-inline-start: -1px; inset-block: 9px; inline-size: 2px; border-radius: 2px;
  background: var(--hf-color-text-1); opacity: 0;
}
@supports (animation-timeline: view()) {
  .ar-sec { view-timeline-inset: 34% 65%; }
  .ar-toc__a[style]::before {
    animation: ins-toc-on linear none; animation-timeline: var(--ar-tl); animation-range: cover 0% cover 100%;
  }
}
@keyframes ins-toc-on { from, to { opacity: 1; } }

/* wider screens: tables and the sample screen reach past the column */
@media (min-width: 64rem) {
  .ar-wide { margin-inline: calc(-1 * min(var(--ins-out), (min(100cqi - 2 * var(--hf-story-pad-x), var(--hf-story-max)) - var(--ins-col)) / 2)); }
}
@media (min-width: 80rem) {
  /* the column stays centred; the contents list sits in the start margin, aligned with the head's text */
  .ar__grid { grid-template-columns: minmax(0, 1fr) minmax(0, var(--ins-col)) minmax(0, 1fr); justify-content: stretch; }
  .ar-toc { display: block; grid-column: 1; grid-row: 1; align-self: start; justify-self: start; inline-size: min(var(--ins-toc), 100%); position: sticky; inset-block-start: calc(var(--hf-nav-h) + 40px); }
  .ar__col { grid-column: 2; grid-row: 1; }
  /* tables reach into the end margin (the start margin holds the contents list) */
  .ar-wide { margin-inline: 0 calc(-1 * ((min(100cqi - 2 * var(--hf-story-pad-x), var(--hf-story-max)) - var(--ins-col)) / 2 - 24px)); }
}

/* the dots of the article's band settle in once, on load */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduced]) .ins-cover--band .ins-cover__dots { animation: ins-dots-in 1.6s var(--hf-ease-out, cubic-bezier(0.16, 1, 0.3, 1)) 0.15s both; }
}
@keyframes ins-dots-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

/* ================================================================ 4. Arabic, phones, reduced motion */
:lang(ar) .ins-cover__title, :lang(ar) .ar-sec__title, :lang(ar) .ar-sub__title { letter-spacing: 0; line-height: 1.45; font-weight: 700; }
:lang(ar) .ins-cover__title { font-size: 21px; max-inline-size: 26ch; }
:lang(ar) .ins-cover--mini .ins-cover__title { font-size: 19px; }
:lang(ar) .ins-cover__topic, :lang(ar) .ar-toc__k, :lang(ar) .ar-answer__k, :lang(ar) .ar-table thead th { letter-spacing: 0; }
:lang(ar) .ar-p, :lang(ar) .ar-li { line-height: 1.95; }
:lang(ar) .ar-answer__text { font-size: 19px; line-height: 1.85; }
:lang(ar) .ar-intro .ar-p:first-child { font-size: 19px; line-height: 1.9; }
:lang(ar) .ar-table table { line-height: 1.75; }
:lang(ar) .ar-toc__a { font-size: 14.5px; line-height: 1.55; }
:lang(ar) .ins-card__desc { line-height: 1.85; }
:lang(ar) .pg--article .pg-hero__title { letter-spacing: 0; line-height: 1.32; }
:lang(ar) .pg--article .pg-hero__eyebrow { font-family: "HF Alexandria", var(--hf-font-sans); font-size: 14px; }
:lang(ar) .ins-card__meta { font-family: "HF Alexandria", var(--hf-font-sans); font-size: 13.5px; }
[dir="rtl"] .ar-table {
  background:
    linear-gradient(270deg, var(--hf-surface-card) 30%, rgb(255 255 255 / 0)) right / 40px 100% no-repeat local,
    linear-gradient(90deg, var(--hf-surface-card) 30%, rgb(255 255 255 / 0)) left / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 100% 50%, rgb(30 42 54 / 0.16), rgb(30 42 54 / 0)) right / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 0 50%, rgb(30 42 54 / 0.16), rgb(30 42 54 / 0)) left / 14px 100% no-repeat scroll,
    var(--hf-surface-card);
}

@media (max-width: 63.99rem) {
  .ins-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ins-cards--more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ins-cards--more .ins-card__desc { display: none; }
}
@media (max-width: 52rem) {
  .ins-cards--more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 39.99rem) {
  .ins-cards, .ins-cards--more { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 18px; }
  .ins-cover { padding: 18px 18px 20px; }
  .ins-cover__dots { margin: -18px -18px -20px; }
  .ins-cover__title { font-size: 22px; }
  .ins-cover--band { aspect-ratio: auto; block-size: 168px; padding: 18px 18px; margin-block-start: 32px; }
  .ins-cover--band .ins-cover__dots { margin: -18px; }
  .ar-p, .ar-li { font-size: 18px; line-height: 1.7; }
  .ar-answer { padding: 20px 20px 22px 24px; }
  [dir="rtl"] .ar-answer { padding: 20px 24px 22px 20px; }
  .ar-answer__text, :lang(ar) .ar-answer__text { font-size: 18px; }
  .ar-intro .ar-p:first-child { font-size: 18.5px; }
  .ar-sec { padding-block-start: 40px; }
  .ar-table { margin-inline: 0; }
  .ar-table table { min-inline-size: calc(var(--cols, 3) * 176px); font-size: 15px; }
  .ar-table :is(th, td) { padding: 12px 14px; }
  .ar-ol > li { padding-inline-start: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .ins-card, .ins-cover__dots, .ins-card__go .hf-icon { transition: none; }
  .ins-card:hover, .ins-card:hover .ins-cover__dots { transform: none; }
  .ins-card:hover .ins-card__go .hf-icon { translate: none; }
}
html[data-reduced] .ins-card, html[data-reduced] .ins-cover__dots { transition: none; }


/* v7 book (2026-11-28): the action row after a priced section (templates/_book.mjs, lib/book.css) */
.ar-act { margin-block: 6px 0; }
