/* WhatsApp Flows guide (the "What are WhatsApp Flows?" page). Chapters on the ground with one field each where a
   field earns it: Mint for the building blocks, Sky for Meta's uses, Periwinkle behind the live-data screen, Sky
   behind WhatsApp Web, the Green and Coral pair for the two meanings of "flow". Logical properties, so Arabic pages
   mirror. */
.fg-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: clamp(32px, 4vw, 52px); }
.fg-prose { display: grid; gap: 14px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 62ch; }
.fg-prose p { text-wrap: pretty; }
.fg-prose a, .fg-note a {
  font-weight: 700; color: var(--accent-ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em;
}
@media not all and (pointer: coarse) {
  :is(.fg-prose, .fg-note) a:hover { text-decoration-thickness: 3px; }
}
.fg-ic {
  flex: none; display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs);
}
.fg-ic .i { width: 19px; height: 19px; }

/* What a Flow is: the definition beside its building blocks */
.fg-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.fg-intro-copy { display: grid; gap: 22px; }
.fg-parts { --field: var(--field-mint); gap: 6px; padding: clamp(22px, 2.6vw, 32px); }
.fg-parts-title { font: 800 15px/1.2 var(--text); color: var(--ink); }
.fg-parts-list { display: grid; }
.fg-part { display: grid; gap: 4px; padding-block: 16px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.fg-part:first-child { border-top: 0; padding-top: 10px; }
.fg-part dt { display: flex; align-items: center; gap: 12px; font: 800 1.12rem/1.3 var(--text); }
.fg-part dd { margin: 0; padding-inline-start: 48px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* How it works: four steps in a row, each numbered (the order is the point) */
.fg-step-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.fg-step {
  position: relative; display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start; gap: 12px;
  padding: 24px 22px 26px; border-radius: calc(24px * var(--sq-scale, 1));
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  corner-shape: var(--sq-shape, round);
}
@supports not (grid-template-rows: subgrid) {
  .fg-step { grid-row: auto; }
}
.fg-num {
  justify-self: start; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: calc(14px * var(--sq-scale, 1));
  background: var(--mint); color: var(--on-bright);
  font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums;
  rotate: -4deg;
  corner-shape: var(--sq-shape, round);
}
.fg-step:nth-child(2) .fg-num { background: var(--sky); rotate: 3deg; }
.fg-step:nth-child(3) .fg-num { background: var(--green); rotate: -3deg; }
.fg-step:nth-child(4) .fg-num { background: var(--coral); rotate: 4deg; }
.fg-step h3 { font: 800 1.15rem/1.3 var(--text); text-wrap: balance; }
.fg-step p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

/* Why Meta built Flows: the uses Meta names, as tags on a Sky Field card */
.fg-uses { --field: var(--field-sky); gap: 14px; padding: clamp(22px, 2.6vw, 32px); }
.fg-use-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fg-use-list .tag { white-space: normal; }
.fg-source { font-size: 14px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }

/* The In Flowella tag: three states that differ in fill, icon and words, never colour alone */
.fg-status { white-space: normal; min-height: 28px; padding: 4px 12px 4px 9px; text-align: start; }
.fg-status .i { flex: none; width: 15px; height: 15px; }
.fg-status.is-yes { background: var(--field-green); color: var(--ink); }
.fg-status.is-partly { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.fg-status.is-no { background: var(--surface); color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.fg-status-note { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }

/* Every component: one real screen each, four across; the rows share heights so the tags line up (subgrid) */
.fg-shot {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: calc(26px * var(--sq-scale, 1));
  background: var(--surface); box-shadow: var(--shadow-sm);
  corner-shape: var(--sq-shape, round);
}
.fg-gal-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 60px) clamp(20px, 2.4vw, 32px); }
.fg-gal-item { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; gap: 8px; }
@supports not (grid-template-rows: subgrid) {
  .fg-gal-item { grid-row: auto; }
}
.fg-gal-title { margin-top: 12px; font: 800 1.12rem/1.3 var(--text); text-wrap: balance; }
.fg-gal-text { font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.fg-gal-foot { display: grid; justify-items: start; align-content: start; gap: 6px; padding-top: 4px; }
.fg-since { font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.fg-gal-note { margin-top: clamp(32px, 4vw, 48px); }

/* Static and dynamic Flows: the reading on one side, the live-data screen on a Periwinkle stage on the other */
.fg-dyn-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.fg-dyn-copy { display: grid; gap: clamp(26px, 3vw, 38px); }
.fg-dyn-copy .fg-head { margin-bottom: 0; }
.fg-dyn-stage {
  position: sticky; top: 104px; margin: 0;
  display: grid; justify-items: center; gap: 16px;
  padding: clamp(20px, 2.6vw, 34px); border-radius: calc(30px * var(--sq-scale, 1));
  background: var(--field-blue);
  corner-shape: var(--sq-shape, round);
}
.fg-dyn-stage .fg-shot { max-width: 320px; }
.fg-dyn-stage figcaption { max-width: 34ch; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); text-align: center; text-wrap: pretty; }
.fg-block-title { margin-bottom: 4px; font: 800 1.15rem/1.3 var(--text); }
.fg-rows { display: grid; }
.fg-rowline {
  display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); align-items: start; gap: 6px 24px;
  padding-block: 16px; border-top: 1px solid var(--line);
}
.fg-rowline:first-child { border-top: 0; }
.fg-rowline dt { font: 700 16px/1.4 var(--text); color: var(--ink); }
.fg-rowline dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.fg-rowline .fg-rowline-tag { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.fg-rowline.has-icon { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); }
.fg-rowline.has-icon dt { display: flex; align-items: center; gap: 12px; }
.fg-rowline.has-icon dd { padding-top: 6px; }
.fg-needs { gap: 10px; padding: clamp(22px, 2.6vw, 30px); }
.fg-needs-list ul { display: grid; gap: 10px; margin: 0; padding-inline-start: 1.15em; list-style: disc; }
.fg-needs-list li { padding-inline-start: 4px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.fg-needs-list li::marker { color: var(--ink); }

/* Where Flows open: WhatsApp Web on a Sky Field stage, then the two lists side by side */
.fg-web-stage {
  display: grid; gap: 16px; margin: 0 0 clamp(36px, 4.4vw, 56px);
  padding: clamp(14px, 3vw, 44px); border-radius: calc(36px * var(--sq-scale, 1));
  background: var(--field-sky);
  corner-shape: var(--sq-shape, round);
}
.fg-web {
  display: block; width: 100%; height: auto;
  border-radius: calc(14px * var(--sq-scale, 1)); box-shadow: var(--shadow);
  corner-shape: var(--sq-shape, round);
}
.fg-web-stage figcaption { font-size: 15px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
.fg-plat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.fg-plat-grid .fg-source { margin-top: 10px; }

/* How Flows have grown: a sticky head beside the milestones on a rail */
.fg-hist-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.fg-hist-head { position: sticky; top: 104px; margin-bottom: 0; }
.fg-time { position: relative; display: grid; padding-inline-start: 36px; }
.fg-time::before {
  content: ""; position: absolute; inset-block: 12px 28px; inset-inline-start: 7px;
  width: 2px; border-radius: 2px; background: var(--line);
}
.fg-time-item { position: relative; display: grid; gap: 4px; padding-bottom: 30px; }
.fg-time-item:last-child { padding-bottom: 0; }
.fg-time-item::before {
  content: ""; position: absolute; inset-inline-start: -36px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box;
  background: var(--ground); border: 3px solid var(--mint);
}
.fg-when { font: 700 14px/1.3 var(--text); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.fg-time-item h3 { font: 800 1.12rem/1.3 var(--text); text-wrap: balance; }
.fg-time-item p:not(.fg-when) { font-size: 16px; line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; max-width: 58ch; }

/* Two meanings of "flow": the pair, with the same questions on shared rows */
.fg-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto repeat(var(--rows, 4), auto); gap: 0 20px; }
.fg-side {
  display: grid; grid-row: span calc(var(--rows, 4) + 2); grid-template-rows: subgrid; align-content: start;
  padding: clamp(22px, 2.6vw, 32px); border-radius: calc(30px * var(--sq-scale, 1));
  corner-shape: var(--sq-shape, round);
}
@supports not (grid-template-rows: subgrid) {
  .fg-side { grid-row: auto; }
}
.fg-side.is-native { background: var(--field-green); }
.fg-side.is-bot { background: var(--field-coral); }
.fg-tag { justify-self: start; background: var(--surface); }
.is-native .fg-tag { background: var(--green); color: var(--on-bright); }
.fg-side-title { margin-block: 14px 8px; font: 800 clamp(1.35rem, 1.1rem + 0.7vw, 1.7rem)/1.2 var(--text); letter-spacing: -0.01em; }
/* the list's rows join the side's own grid, so each question lines up with its partner across the pair */
.fg-side-list { display: contents; }
.fg-row { display: grid; align-content: start; gap: 4px; padding-block: 14px; border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.fg-row dt { font: 700 13px/1.2 var(--text); color: var(--ink); }
.fg-row dd { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.fg-verdict { margin-top: clamp(28px, 3vw, 40px); max-width: 760px; }

/* Where to go next: three whole-card links */
.fg-next-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(28px, 3.4vw, 44px); }
.fg-next-card { gap: 10px; padding-bottom: 60px; }
.fg-next-card .card-title { font: 800 1.2rem/1.3 var(--text); text-wrap: balance; }
.fg-next-card p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.fg-go {
  position: absolute; inset-inline-start: clamp(20px, 2.4vw, 28px); bottom: 20px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--field-sky); color: var(--accent-ink);
}
.fg-go .i { width: 18px; height: 18px; }

@media (max-width: 1179px) {
  .fg-gal-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .fg-intro-grid, .fg-dyn-grid, .fg-hist-grid { grid-template-columns: minmax(0, 1fr); }
  .fg-dyn-stage, .fg-hist-head { position: static; }
  .fg-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg-next-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .fg-gal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fg-plat-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .fg-prose { font-size: 17px; }
  .fg-step-list { grid-template-columns: minmax(0, 1fr); }
  .fg-rowline, .fg-rowline.has-icon { grid-template-columns: minmax(0, 1fr); }
  .fg-rowline .fg-rowline-tag { grid-column: 1; }
  .fg-rowline.has-icon dd { padding-top: 0; padding-inline-start: 48px; }
  /* the pair stacks, so each side keeps its own rows */
  .fg-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 16px; }
  .fg-side { grid-row: auto; grid-template-rows: none; }
  .fg-side-list { display: grid; }
}
/* On a phone the screens become a row to swipe, one and a bit in view, so the next one shows there is more */
@media (max-width: 559px) {
  .fg-gal-list {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; grid-template-rows: repeat(4, auto);
    column-gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .fg-gal-item { scroll-snap-align: start; }
}
