/* ==========================================================================
   AA LONG-FORM — the editorial article layout (inc/aa-longform.php)
   Loaded only on an article whose aa_layout meta is "longform", after
   aa-system.css, so every token (gutter, type scale, surfaces, accent) is the
   site's own. 1rem = 10px here, as everywhere on this theme.

   Each section has its own composition on purpose — a split with a margin
   note, a pull question, a verse band, a rail, a sticky media split, a bento,
   a ledger, a spec sheet, numbered lessons and a closing panel — so a long
   read never turns into one card repeated fifteen times.

   Direction: logical properties throughout, so RTL needs almost no overrides.
   Motion: opacity and transform only; hidden states exist only once the
   script has added .is-js, and reduced motion never hides anything.
   ========================================================================== */

@font-face {
  font-family: 'AA Quran Verse';
  src: url('../fonts/amiri-quran-verse.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0600-06FF, U+08A0-08FF, U+FD3E-FD3F, U+FB50-FDFF, U+FE70-FEFF;
}

.aa-lf {
  --lf-live: #4FC79B;
  --lf-measure: 66ch;
  --lf-sec: clamp(56px, 9vw, 120px);
  --lf-read: clamp(1.7rem, 1.6rem + .3vw, 1.9rem);
  --lf-phone-r: clamp(22px, 3.2vw, 34px);
  --lf-ground: #212428;          /* the page background, for solid discs on a line */
  color: var(--color-body);
}
body.white-version .aa-lf { --lf-live: #0D7052; --lf-ground: #ecf0f3; }
/* The site's secondary text (#878e99) measures 4.07-4.3:1 on the raised
   panels this layout uses (tiles, the rule, the proof band). Inside the
   article only, dark mode gets a lighter secondary tone that clears 4.5:1 on
   every surface here; headings stay brighter still. Light mode already passes. */
body:not(.white-version) .aa-lf { --color-body: #a1a8b3; }

.aa-lf p, .aa-lf li, .aa-lf dd, .aa-lf dt { font-size: inherit; }
.aa-lf-body li { margin: 0; }
/* the parent theme boxes every blockquote (panel, shadow, quote glyph); the
   article draws its own two quotations, so that styling is cleared here */
.aa-lf blockquote {
  background: none; box-shadow: none; border-radius: 0;
  margin-inline: 0; padding: 0; font-style: normal;
}
.aa-lf blockquote::before, .aa-lf blockquote::after { content: none; display: none; }
.aa-lf h2, .aa-lf h3 { color: var(--color-heading); }
.aa-lf a:not(.aa-btn) { color: var(--aa-accent); text-decoration: underline; text-underline-offset: 3px; }
.aa-lf .aa-ico { width: 1.15em; height: 1.15em; flex: none; display: block; }
[dir="rtl"] .aa-lf .aa-lf-ext { transform: scaleX(-1); }

/* ------------------------------------------------------------------ hero -- */
.aa-lf-hero {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(4px, 1vw, 12px) clamp(36px, 6vw, 80px);
}
@media (min-width: 960px) {
  .aa-lf-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
}
.aa-lf-hero__brand {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 1.4rem;
  font-size: 1.3rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--aa-accent);
}
.aa-lf-hero__brand::before {
  content: ""; width: 28px; height: 2px; border-radius: 2px; background: currentColor;
}
[dir="rtl"] .aa-lf-hero__brand { letter-spacing: .04em; font-size: 1.4rem; }
.aa-journal h1.aa-lf-hero__h1 {
  font-size: clamp(3.2rem, 2.3rem + 2.5vw, 4.8rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em;
  margin: 0 0 .45em;
  max-width: 19ch;
}
[dir="rtl"] .aa-journal h1.aa-lf-hero__h1 { letter-spacing: 0; line-height: 1.3 !important; max-width: 20ch; }
.aa-lf-hero__lede {
  font-size: clamp(1.8rem, 1.62rem + .5vw, 2.2rem);
  line-height: 1.6;
  max-width: 44ch;
  margin: 0 0 2.6rem;
}
.aa-lf-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 2.4rem; }
.aa-lf-hero__actions .aa-ico { width: 16px; height: 16px; }
.aa-lf-hero__meta { margin: 0; align-items: center; }

.aa-lf-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: var(--aa-r-pill);
  border: 1px solid color-mix(in srgb, var(--lf-live) 40%, transparent);
  background: color-mix(in srgb, var(--lf-live) 10%, transparent);
  color: var(--color-heading);
  font-weight: 600;
}
.aa-lf-status__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lf-live);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--lf-live) 60%, transparent);
  animation: aa-lf-pulse 2.8s var(--aa-ease) infinite;
}
@keyframes aa-lf-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lf-live) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}
.aa-paused .aa-lf-status__dot { animation-play-state: paused; }

/* the three-phone stage */
.aa-lf-hero__stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  align-items: center;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
  padding-block: 4%;
  isolation: isolate;
}
.aa-lf-hero__phone { position: relative; will-change: transform; }
/* --lf-p1..3 are set by aa-longform.js while the hero is on screen: a few
   pixels of drift per phone, at different rates, and nothing at all under
   reduced motion. */
.aa-lf-hero__phone--1 { transform: translate3d(22%, calc(6% + var(--lf-p1, 0px)), 0) rotate(-6deg); z-index: 1; }
.aa-lf-hero__phone--2 { transform: translate3d(0, var(--lf-p2, 0px), 0); z-index: 2; }
.aa-lf-hero__phone--3 { transform: translate3d(-22%, calc(6% + var(--lf-p3, 0px)), 0) rotate(6deg); z-index: 1; }
[dir="rtl"] .aa-lf-hero__phone--1 { transform: translate3d(-22%, calc(6% + var(--lf-p1, 0px)), 0) rotate(6deg); }
[dir="rtl"] .aa-lf-hero__phone--3 { transform: translate3d(22%, calc(6% + var(--lf-p3, 0px)), 0) rotate(-6deg); }
.aa-lf-hero__phone--1 .aa-lf-phone__img,
.aa-lf-hero__phone--3 .aa-lf-phone__img { filter: saturate(.85) brightness(.82); }
.aa-lf-hero__glow {
  position: absolute; inset: 12% 8%; z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lf-live) 26%, transparent), transparent);
  filter: blur(24px);
  pointer-events: none;
}
body.white-version .aa-lf-hero__glow { opacity: .55; }

/* the phone frame, shared by the hero and the in-body screenshots */
.aa-lf-phone {
  position: relative;
  padding: clamp(4px, .6vw, 7px);
  border-radius: var(--lf-phone-r);
  background: linear-gradient(160deg, #26303b, #0c1116 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 30px 60px -28px rgba(0, 0, 0, .7), 0 12px 24px -16px rgba(0, 0, 0, .5);
}
body.white-version .aa-lf-phone {
  background: linear-gradient(160deg, #3a4450, #151a20 60%);
  box-shadow: 0 30px 60px -30px rgba(16, 24, 40, .45), 0 10px 20px -14px rgba(16, 24, 40, .3);
}
.aa-lf-phone__img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 390 / 844; object-fit: cover; object-position: top;
  border-radius: calc(var(--lf-phone-r) - 6px);
  background: #0b1210;
}

/* --------------------------------------------------------- body frame --- */
.aa-lf-body { max-width: 100%; }
.aa-lf-sec { padding-block: var(--lf-sec) 0; }
.aa-lf-sec:first-child { padding-block-start: clamp(12px, 3vw, 32px); border-top: 1px solid var(--aa-line); }
.aa-lf-prose { max-width: var(--lf-measure); font-size: var(--lf-read); line-height: 1.8; }
.aa-lf-prose p { margin: 0 0 1.1em; }
.aa-lf-prose--center { margin-inline: auto; text-align: center; }
.aa-lf-h2 {
  font-size: clamp(2.6rem, 1.9rem + 2vw, 4.2rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0 0 .6em;
}
.aa-lf-h3 { font-size: clamp(2.2rem, 1.8rem + 1.1vw, 3rem) !important; line-height: 1.25 !important; margin: 0 0 .6em; }
[dir="rtl"] .aa-lf-h2, [dir="rtl"] .aa-lf-h3 { letter-spacing: 0; line-height: 1.4 !important; }
.aa-lf-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.aa-lf-lede { font-size: clamp(1.7rem, 1.6rem + .35vw, 2rem); line-height: 1.65; margin: 0; }
.aa-lf-note {
  margin: clamp(24px, 3.5vw, 40px) 0 0;
  font-size: clamp(1.7rem, 1.6rem + .3vw, 1.95rem);
  color: var(--color-heading);
  max-width: 60ch;
}

/* ----------------------------------------------- 1. opening + margin note */
.aa-lf-split { display: grid; gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (min-width: 900px) {
  .aa-lf-split { grid-template-columns: minmax(0, 1fr) 300px; }
  .aa-lf-brief { position: sticky; top: 110px; margin-top: 64px; }
}
.aa-lf-first {
  font-size: clamp(2rem, 1.8rem + .6vw, 2.5rem);
  line-height: 1.5;
  color: var(--color-heading);
}
.aa-lf-brief {
  padding: 22px 22px 18px;
  border-radius: var(--aa-r-lg);
  border: 1px dashed color-mix(in srgb, var(--aa-accent) 45%, var(--aa-line));
  background: color-mix(in srgb, var(--aa-accent) 5%, transparent);
}
.aa-lf-brief__title {
  margin: 0 0 12px; font-size: 1.2rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--aa-accent);
}
[dir="rtl"] .aa-lf-brief__title { letter-spacing: 0; font-size: 1.4rem; }
.aa-lf-brief ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aa-lf-brief li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; font-size: 1.55rem; color: var(--color-heading);
  border-top: 1px solid var(--aa-line);
}
.aa-lf-brief li:first-child { border-top: 0; }
.aa-lf-brief .aa-ico { color: var(--aa-accent); }

/* ------------------------------------------------- 2. the pull question -- */
.aa-lf .aa-lf-question {
  margin: clamp(32px, 5vw, 64px) 0 0;
  padding: 0;
  padding-inline-start: clamp(20px, 3vw, 40px);
  border-inline-start: 3px solid var(--aa-accent);
  max-width: 920px;
}
.aa-lf-question p { margin: 0; }
.aa-lf-question__lead { font-size: 1.5rem; color: var(--color-body); margin-bottom: .8em !important; }
.aa-lf-question__text {
  font-family: var(--font-secondary, inherit);
  font-size: clamp(2.2rem, 1.6rem + 1.9vw, 3.6rem);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--color-heading);
  text-wrap: pretty;
}
[dir="rtl"] .aa-lf-question__text { letter-spacing: 0; line-height: 1.7; }

/* ------------------------------------------------------ 3. the verse band */
.aa-lf-reflect { text-align: center; }
.aa-lf-verse {
  position: relative;
  margin: 0 auto clamp(32px, 5vw, 56px);
  padding: clamp(36px, 6vw, 72px) clamp(18px, 4vw, 56px);
  border-radius: clamp(20px, 3vw, 32px);
  border: 1px solid var(--aa-line);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--lf-live) 9%, transparent), transparent 70%),
    var(--aa-surface);
  max-width: 1000px;
  overflow: hidden;
}
.aa-lf-verse::before,
.aa-lf-verse::after {
  content: ""; position: absolute; inset-inline: 18%; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lf-live) 45%, transparent), transparent);
}
.aa-lf-verse::before { top: 18px; }
.aa-lf-verse::after { bottom: 18px; }
.aa-lf-verse__quote { margin: 0; padding: 0; border: 0; }
.aa-lf .aa-lf-verse__text {
  margin: 0;
  font-family: 'AA Quran Verse', 'Amiri Quran', 'Amiri', 'Noto Naskh Arabic', serif;
  font-size: clamp(2.6rem, 1.7rem + 2.8vw, 4.8rem);
  line-height: 2.05;
  color: var(--color-heading);
  font-weight: 400;
  letter-spacing: 0;
  word-spacing: .06em;
  text-wrap: balance;
}
.aa-lf-verse__orn { color: var(--lf-live); padding-inline: .15em; }
.aa-lf .aa-lf-verse__tr {
  margin: 1.4rem auto 0;
  max-width: 52ch;
  font-size: clamp(1.6rem, 1.5rem + .35vw, 1.9rem);
  line-height: 1.6;
  font-style: italic;
  font-weight: 400;
  color: var(--color-body);
}
.aa-lf-verse__ref {
  margin-top: 1.8rem;
  font-size: 1.3rem; font-weight: 600; letter-spacing: .06em;
  color: var(--aa-accent);
}
[dir="rtl"] .aa-lf-verse__ref { letter-spacing: 0; font-size: 1.5rem; }
.aa-lf-verse__src { color: var(--color-body); font-weight: 400; }
.aa-lf-hope {
  color: var(--color-heading);
  font-size: clamp(1.8rem, 1.66rem + .45vw, 2.15rem);
  line-height: 1.75;
}

/* ------------------------------------------------------- 4. the rail ----- */
.aa-lf-rail {
  --rail-gap: clamp(16px, 2.2vw, 28px);
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--rail-gap);
  position: relative;
}
.aa-lf-rail li { position: relative; min-width: 0; }
.aa-lf-rail h3 { font-size: 2rem !important; line-height: 1.3 !important; margin: 0 0 .35em; }
.aa-lf-rail p { margin: 0; font-size: 1.5rem; line-height: 1.6; }
.aa-lf-rail__q { color: var(--color-heading); font-weight: 500; margin-bottom: .4em !important; }
.aa-lf-rail__ico {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--aa-accent) 40%, var(--aa-line));
  background: var(--lf-ground);
  color: var(--aa-accent);
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.aa-lf-rail__ico .aa-ico { width: 20px; height: 20px; }
/* phone: a vertical line at the inline start */
@media (max-width: 759.98px) {
  .aa-lf-rail { padding-inline-start: 60px; }
  .aa-lf-rail::before {
    content: ""; position: absolute; inset-block: 22px; inset-inline-start: 21px; width: 1px;
    background: linear-gradient(var(--aa-accent), var(--aa-line));
  }
  .aa-lf-rail__ico { position: absolute; inset-inline-start: -60px; top: -4px; }
}
/* tablet and up: three columns, a line under the icons of each row */
@media (min-width: 760px) {
  .aa-lf-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: clamp(32px, 4vw, 48px); }
  .aa-lf-rail li::before {
    content: ""; position: absolute; top: 22px; height: 1px;
    inset-inline: 44px calc(var(--rail-gap) * -1);
    background: linear-gradient(90deg, color-mix(in srgb, var(--aa-accent) 55%, transparent), var(--aa-line));
  }
  [dir="rtl"] .aa-lf-rail li::before { background: linear-gradient(270deg, color-mix(in srgb, var(--aa-accent) 55%, transparent), var(--aa-line)); }
  .aa-lf-rail li:nth-child(3n)::before { inset-inline-end: 0; }
}

/* ---------------------------------------------- 5. read-along split ----- */
.aa-lf-read__grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (min-width: 960px) {
  .aa-lf-read__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .aa-lf-read__media { position: sticky; top: 100px; }
}
.aa-lf-read__media {
  display: grid; grid-template-columns: repeat(12, 1fr);
  max-width: 520px; margin-inline: auto; width: 100%;
}
.aa-lf-shot { margin: 0; min-width: 0; }
.aa-lf-shot figcaption {
  margin-top: 12px; font-size: 1.3rem; line-height: 1.5; color: var(--color-body);
}
.aa-lf-read__media .aa-lf-shot--back { grid-column: 1 / span 7; grid-row: 1; }
.aa-lf-read__media .aa-lf-shot--front { grid-column: 6 / span 7; grid-row: 1; margin-top: 22%; }
.aa-lf-read__media .aa-lf-shot--back .aa-lf-phone__img { filter: brightness(.8) saturate(.9); }
.aa-lf-read__media .aa-lf-shot--front .aa-lf-phone {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lf-live) 30%, transparent), 0 40px 70px -30px rgba(0, 0, 0, .8);
}
.aa-lf-read__media .aa-lf-shot--back figcaption { padding-inline-end: 34%; }

.aa-lf-rule {
  margin: 1.6em 0;
  padding: 20px 22px;
  border-radius: var(--aa-r);
  background: color-mix(in srgb, var(--lf-live) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--lf-live) 30%, var(--aa-line));
  font-size: 1.65rem; line-height: 1.7;
}
.aa-lf-rule p { margin: 0; }
.aa-lf-rule .aa-lf-rule__label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; font-weight: 700; color: var(--color-heading);
}
.aa-lf-rule__label .aa-ico { color: var(--lf-live); }

/* ------------------------------------------------------------ 6. bento --- */
.aa-lf-bento { display: grid; gap: clamp(12px, 1.6vw, 18px); }
@media (min-width: 760px) and (max-width: 1079.98px) {
  .aa-lf-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aa-lf-tile--salah, .aa-lf-tile--tasbeeh, .aa-lf-tile--qibla, .aa-lf-tile--quran { grid-column: 1 / -1; }
}
@media (min-width: 1080px) {
  .aa-lf-bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-areas:
      "salah   salah   salah   salah   quran quran"
      "tasbeeh tasbeeh tasbeeh tasbeeh quran quran"
      "dhikr   dhikr   qibla   qibla   qibla qibla"
      "friday  friday  friday  app     app   app";
  }
  .aa-lf-tile--salah   { grid-area: salah; }
  .aa-lf-tile--quran   { grid-area: quran; }
  .aa-lf-tile--tasbeeh { grid-area: tasbeeh; }
  .aa-lf-tile--dhikr   { grid-area: dhikr; }
  .aa-lf-tile--qibla   { grid-area: qibla; }
  .aa-lf-tile--friday  { grid-area: friday; }
  .aa-lf-tile--app     { grid-area: app; }
}
.aa-lf-tile {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: var(--aa-r-lg);
  border: 1px solid var(--aa-line);
  background: var(--aa-surface);
  overflow: hidden;
  transition: border-color var(--aa-dur) var(--aa-ease), transform var(--aa-dur) var(--aa-ease);
}
.aa-lf-tile:hover { border-color: color-mix(in srgb, var(--aa-accent) 45%, var(--aa-line)); }
.aa-lf-tile h3 { font-size: clamp(1.9rem, 1.7rem + .5vw, 2.4rem) !important; line-height: 1.28 !important; margin: 0 0 .6em; }
.aa-lf-tile p { margin: 0; font-size: 1.55rem; line-height: 1.65; }
.aa-lf-tile ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aa-lf-tile li {
  position: relative; font-size: 1.5rem; line-height: 1.5;
  padding-inline-start: 18px;
}
.aa-lf-tile li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--aa-accent) 80%, transparent);
}
.aa-lf .aa-lf-tile__label {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--aa-accent);
}
[dir="rtl"] .aa-lf .aa-lf-tile__label { letter-spacing: 0; font-size: 1.45rem; }
.aa-lf-tile__label .aa-ico { width: 18px; height: 18px; }

/* the Quran tile carries the most, so it gets the accent wash */
.aa-lf-tile--quran {
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--lf-live) 12%, transparent), transparent 60%),
    var(--aa-surface-2);
  border-color: color-mix(in srgb, var(--lf-live) 28%, var(--aa-line));
}
[dir="rtl"] .aa-lf-tile--quran {
  background:
    radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--lf-live) 12%, transparent), transparent 60%),
    var(--aa-surface-2);
}
@media (min-width: 560px) and (max-width: 1079.98px) {
  .aa-lf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}

/* tiles with a screenshot: text beside a phone that rises from the bottom */
.aa-lf-tile--salah, .aa-lf-tile--tasbeeh, .aa-lf-tile--qibla {
  display: grid; gap: 20px; align-items: start;
}
@media (min-width: 560px) {
  .aa-lf-tile--salah, .aa-lf-tile--tasbeeh, .aa-lf-tile--qibla {
    grid-template-columns: minmax(0, 1fr) clamp(150px, 26%, 210px);
    padding-block-end: 0;
  }
  .aa-lf-tile--tasbeeh { grid-template-columns: clamp(150px, 26%, 210px) minmax(0, 1fr); }
  .aa-lf-tile--salah .aa-lf-tile__body,
  .aa-lf-tile--tasbeeh .aa-lf-tile__body,
  .aa-lf-tile--qibla .aa-lf-tile__body { padding-block-end: clamp(20px, 2.6vw, 30px); }
}
.aa-lf-tile__shot {
  align-self: end;
  max-height: 330px;
  overflow: hidden;
  margin-block-end: -1px;
}
@media (max-width: 559.98px) {
  .aa-lf-tile__shot { max-width: 220px; margin-inline: auto; max-height: 260px; order: 2; margin-block-end: calc(clamp(20px, 2.6vw, 30px) * -1); }
}
.aa-lf-tile__shot .aa-lf-phone { border-end-start-radius: 0; border-end-end-radius: 0; padding-block-end: 0; }
.aa-lf-tile__shot .aa-lf-phone__img { border-end-start-radius: 0; border-end-end-radius: 0; }

.aa-lf-chips {
  list-style: none; margin: clamp(18px, 2.5vw, 28px) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.aa-lf-chips li {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  border-radius: var(--aa-r-pill);
  border: 1px solid var(--aa-line);
  font-size: 1.4rem; font-weight: 500; color: var(--color-heading);
}
.aa-lf-chips .aa-ico { color: var(--lf-live); width: 16px; height: 16px; }

/* ------------------------------------------------------------ 7. ledger -- */
.aa-lf-ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--aa-line); }
.aa-lf-ledger li {
  display: grid; gap: 6px 40px;
  padding-block: clamp(20px, 2.8vw, 30px);
  border-bottom: 1px solid var(--aa-line);
}
@media (min-width: 820px) {
  .aa-lf-ledger li { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: baseline; }
}
.aa-lf-ledger h3 {
  display: flex; align-items: baseline; gap: 16px;
  font-size: clamp(1.9rem, 1.7rem + .55vw, 2.4rem) !important; line-height: 1.3 !important; margin: 0;
}
.aa-lf-ledger__n {
  font-size: 1.3rem; font-weight: 700; letter-spacing: .08em;
  color: var(--aa-accent); font-variant-numeric: tabular-nums;
  min-width: 2.2ch; flex: none; white-space: nowrap;
}
.aa-lf-ledger p { margin: 0; font-size: 1.65rem; line-height: 1.75; max-width: 64ch; }

/* ------------------------------------------------------ 8. engineering --- */
.aa-lf-eng__intro { max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.aa-lf-eng__intro p:not(.aa-kicker) { font-size: var(--lf-read); line-height: 1.75; margin: 0; }
.aa-lf-specs {
  margin: 0;
  display: grid; gap: 0 clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
.aa-lf-specs > div { padding-block: 18px 22px; border-top: 1px solid var(--aa-line); min-width: 0; }
.aa-lf-specs dt {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 8px; font-size: 1.6rem; font-weight: 700; color: var(--color-heading);
}
.aa-lf-specs dt .aa-ico { color: var(--aa-accent); }
.aa-lf-specs dd { margin: 0; font-size: 1.5rem; line-height: 1.65; }

.aa-lf-proof {
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--aa-r-lg);
  border: 1px solid var(--aa-line);
  background:
    linear-gradient(var(--aa-surface), var(--aa-surface)),
    repeating-linear-gradient(90deg, transparent 0 39px, color-mix(in srgb, var(--color-heading) 4%, transparent) 39px 40px);
}
.aa-lf .aa-lf-proof__title {
  margin: 0 0 clamp(16px, 2.4vw, 24px);
  font-size: 1.3rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-body);
}
[dir="rtl"] .aa-lf .aa-lf-proof__title { letter-spacing: 0; font-size: 1.45rem; }
.aa-lf-stats {
  margin: 0; display: grid; gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 860px) { .aa-lf-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.aa-lf-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; min-width: 0; }
@media (min-width: 860px) {
  .aa-lf-stats > div + div { border-inline-start: 1px solid var(--aa-line); padding-inline-start: 22px; }
}
.aa-lf-stats dd {
  margin: 0;
  font-family: var(--font-secondary, inherit);
  font-size: clamp(3.4rem, 2.4rem + 3vw, 5.6rem);
  font-weight: 700; line-height: 1; letter-spacing: -.03em;
  color: var(--color-heading);
  font-variant-numeric: tabular-nums;
  direction: ltr; text-align: start;
}
[dir="rtl"] .aa-lf-stats dd { text-align: right; }
.aa-lf-stats dd small { font-size: .45em; font-weight: 600; color: var(--color-body); letter-spacing: 0; margin-inline-start: 2px; }
.aa-lf-stats dt { font-size: 1.4rem; line-height: 1.45; color: var(--color-body); }

.aa-lf-story {
  margin-top: clamp(28px, 4vw, 44px);
  padding-inline-start: clamp(18px, 2.5vw, 28px);
  border-inline-start: 2px solid var(--aa-line);
}
.aa-lf-story p:last-child { color: var(--color-heading); margin-bottom: 0; }

/* ---------------------------------------------------------- 9. lessons --- */
.aa-lf-lessons {
  list-style: none; margin: 0; padding: 0;
  counter-reset: lf-lesson;
  display: grid; gap: clamp(24px, 3.4vw, 44px);
}
@media (min-width: 860px) { .aa-lf-lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aa-lf-lessons li { counter-increment: lf-lesson; min-width: 0; }
.aa-lf-lessons li::before {
  content: counter(lf-lesson, decimal-leading-zero);
  display: block;
  font-family: var(--font-secondary, inherit);
  font-size: clamp(4.4rem, 3rem + 4vw, 7.2rem);
  font-weight: 700; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--aa-accent) 70%, transparent);
  margin-bottom: 14px;
}
.aa-lf-lessons h3 { font-size: clamp(1.9rem, 1.7rem + .5vw, 2.3rem) !important; line-height: 1.3 !important; margin: 0 0 .5em; }
.aa-lf-lessons p { margin: 0; font-size: 1.6rem; line-height: 1.7; }

/* ----------------------------------------------------------- 10. close --- */
.aa-lf-close {
  position: relative;
  margin-top: var(--lf-sec);
  padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: clamp(22px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--lf-live) 26%, var(--aa-line));
  background:
    radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--lf-live) 12%, transparent), transparent 70%),
    var(--aa-surface);
  text-align: center;
  overflow: hidden;
}
.aa-lf-close .aa-lf-h2 { margin-top: 18px; }
.aa-lf-status--lg { font-size: 1.4rem; margin: 0; }
.aa-lf-close__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 1.4em 0 0; }

.aa-lf-foot { max-width: var(--aa-measure-narrow); margin-top: clamp(32px, 5vw, 56px); }
.aa-lf-foot .aa-author { gap: 10px; }

/* ---------------------------------------------------------------- motion -- */
.aa-lf.is-js [data-lf-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .7s var(--aa-ease), transform .8s var(--aa-ease);
}
.aa-lf.is-js [data-lf-reveal].is-in { opacity: 1; transform: none; }

.aa-lf.is-js [data-lf-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .6s var(--aa-ease), transform .7s var(--aa-ease);
  transition-delay: calc(var(--lf-i, 0) * 70ms);
}
.aa-lf.is-js [data-lf-stagger].is-in > * { opacity: 1; transform: none; }

/* the hero phones arrive once, in order, before any scrolling */
.aa-lf.is-js .aa-lf-hero__stage .aa-lf-phone { opacity: 0; transition: opacity .9s var(--aa-ease), translate .9s var(--aa-ease); translate: 0 26px; }
.aa-lf.is-js .aa-lf-hero__stage.is-in .aa-lf-phone { opacity: 1; translate: 0 0; }
.aa-lf.is-js .aa-lf-hero__stage .aa-lf-hero__phone--2 { transition-delay: .08s; }
.aa-lf.is-js .aa-lf-hero__stage .aa-lf-hero__phone--3 { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  .aa-lf.is-js [data-lf-reveal],
  .aa-lf.is-js [data-lf-stagger] > *,
  .aa-lf.is-js .aa-lf-hero__stage .aa-lf-phone { opacity: 1 !important; translate: none !important; transition: none !important; }
  .aa-lf-status__dot { animation: none; }
  .aa-lf-tile { transition: none; }
}

/* ----------------------------------------------------------------- phone -- */
@media (max-width: 959.98px) {
  .aa-lf-hero__stage { max-width: 440px; order: 2; }
}
@media (max-width: 420px) {
  .aa-lf-hero__actions .aa-btn { flex: 1 1 auto; }
  .aa-lf-verse { padding-inline: 14px; }
  .aa-lf .aa-lf-verse__text { line-height: 2.2; }
}

@media print {
  .aa-lf.is-js [data-lf-reveal], .aa-lf.is-js [data-lf-stagger] > * { opacity: 1 !important; transform: none !important; }
  .aa-lf-hero__stage, .aa-lf-read__media, .aa-lf-tile__shot { display: none; }
}
