/*
  The Meta ads page's pictures (docs/pages/service_pages/pictures/meta_ads.py), for /services/meta-ads, linked after service-page.css as the
  page's picture_css. They follow service-page.css's rules for every picture: sizes in em, the font size from the box's width (100cqw
  divided by --w, set here and never inline), so each scales whole from 2560 px to 320, and a box under 480 px draws the wide ones
  22 em wide. They reuse its parts (.ui, .ui-kpis, .ui-kpi, .ui-label, .ui-value) and add their own: the top row with the Example
  tag, a pill, a round mark for the made-up business, a funnel of four steps, a timeline, a budget bar, an audience disk and three
  phone screens. Flat fills only: no stripes, no grid, no street lines (Rahul's rule against busy line backgrounds).
*/

/* Each picture's width in em: the header's 30, the steps' 24, the parts of the work 34 */
.ui-oct { --w: 30; }
.ui-sets, .ui-test, .ui-budget { --w: 24; }
.ui-aud, .ui-story, .ui-form, .ui-text { --w: 34; }

/* ── Shared parts ── */
/* The top row: the screen's title, a quieter line beside it, and the Example tag in the corner of a screen beside a client's line */
.ui-top { display: flex; align-items: flex-start; gap: 0.6em; margin-bottom: 0.85em; }
.ui p.ui-top__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1em 0.55em; min-width: 0; }
.ui-top__title b { font-size: 1.05em; font-weight: 650; letter-spacing: -0.015em; }
.ui-top__title span { color: var(--slate); font-size: max(0.76em, min(11px, 0.95em)); font-weight: 500; white-space: nowrap; }
.ui-example {
  flex: none; margin-left: auto; padding: 0.25em 0.6em; border: 0.0625em solid var(--ui-line); border-radius: 9999px;
  background-color: var(--ui-fill); color: var(--slate); font-size: max(0.64em, min(11px, 0.8em)); font-weight: 600; line-height: 1.2; white-space: nowrap;
}

/* A status pill */
.ui-pill { display: inline-flex; align-items: center; flex: none; padding: 0.2em 0.65em; border-radius: 9999px; font-size: max(0.64em, min(11px, 0.8em)); font-weight: 650; line-height: 1.3; white-space: nowrap; }
.ui-pill.is-gray { background-color: var(--ui-fill); color: var(--slate); }
.ui-pill.is-blue { background-color: var(--tint); color: var(--anchor-deep); }

/* The business's round mark (a paw on a flat color) and a person not in your contacts (an icon on gray) */
.ui-logo, .ui-av { display: grid; place-items: center; flex: none; width: 2.2em; height: 2.2em; border-radius: 9999px; color: #fff; }
.ui-logo { background-color: #0f766e; }
.ui-av { background-color: #5b6270; }
.ui-logo svg { width: 1.2em; height: 1.2em; }
.ui-av svg { width: 1.15em; height: 1.15em; }
.ui-logo.is-sm { width: 1.9em; height: 1.9em; }

/* A phone's screen: a white sheet with rounded corners, the card's own shadow */
.ui-story__phone, .ui-form__phone, .ui-text__phone, .ui-alert { box-shadow: 0 0.06em 0.15em rgb(12 14 18 / 0.06), 0 0.9em 2.2em rgb(12 14 18 / 0.12); }

/* ── The header: October, from the ad to a booking ── */
.ui-oct .ui-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.ui ol.ui-fun { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7em; margin: 1.1em 0 0; padding: 0; list-style: none; }
.ui-fun__step { display: grid; grid-template-rows: 5.6em auto auto; justify-items: start; min-width: 0; }
.ui-fun__bar { align-self: end; display: block; width: 100%; border-radius: 0.55em 0.55em 0.25em 0.25em; background-color: var(--tint-deep); }
.ui-fun__step:nth-child(1) .ui-fun__bar { height: 100%; }
.ui-fun__step:nth-child(2) .ui-fun__bar { height: 72%; background-color: #bcd1f9; }
.ui-fun__step:nth-child(3) .ui-fun__bar { height: 48%; background-color: #8fb1f4; }
.ui-fun__step:nth-child(4) .ui-fun__bar { height: 30%; background-color: #86efac; }
.ui-fun__step b { margin-top: 0.5em; font-size: 1.3em; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ui-fun__step.is-booked b { color: var(--good); }
.ui-fun__step span { margin-top: 0.15em; color: var(--slate); font-size: max(0.66em, min(11px, 0.825em)); font-weight: 500; line-height: 1.25; }

/* ── The steps. The three cards share one height and the step card's bottom edge cuts the white under the last row ── */
.svc-shot--step:has(> :is(.ui-sets, .ui-test, .ui-budget)) { height: auto; }
.svc-shot--step > :is(.ui-sets, .ui-test, .ui-budget) { min-height: 15.5em; margin-bottom: -1em; }

/* Step 1: the ad sets */
.ui ul.ui-sets__list { display: grid; gap: 0.55em; padding: 0; list-style: none; }
.ui-sets__row { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; padding: 0.75em 0.85em; border: 0.0625em solid var(--ui-line); border-radius: 0.75em; }
.ui p.ui-sets__name { display: flex; flex-direction: column; gap: 0.1em; min-width: 0; }
.ui-sets__name b { font-size: 0.88em; font-weight: 650; }
.ui-sets__name small { color: var(--slate); font-size: max(0.7em, min(11px, 0.875em)); }

/* Step 2: the test lead in the CRM, then what the step checks */
.ui p.ui-test__who { display: flex; align-items: center; gap: 0.5em; flex-wrap: wrap; }
.ui-test__who b { margin-right: 0.15em; font-size: 0.98em; font-weight: 650; }
.ui ol.ui-tl { position: relative; display: grid; gap: 0.75em; margin-top: 1em; padding: 0 0 0 1.4em; list-style: none; }
.ui-tl::before { content: ""; position: absolute; top: 0.45em; bottom: 0.45em; left: 0.3em; width: 0.1em; border-radius: 9999px; background-color: var(--ui-line); }
.ui-tl li { position: relative; }
.ui-tl__dot { position: absolute; top: 0.3em; left: -1.4em; width: 0.62em; height: 0.62em; border-radius: 9999px; background-color: var(--chart); box-shadow: 0 0 0 0.2em #fff; }
.ui-tl li > p:first-of-type { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6em; }
.ui-tl li b { font-size: 0.8em; font-weight: 650; }
.ui-tl li small { color: var(--slate); font-size: max(0.68em, min(11px, 0.85em)); white-space: nowrap; }
.ui p.ui-tl__text { max-width: 94%; margin-top: 0.4em; padding: 0.55em 0.75em; border-radius: 1em 1em 1em 0.28em; background-color: #e9ecf1; font-size: max(0.72em, min(11px, 0.9em)); line-height: 1.4; }

/* Step 3: the budget and its limit */
.ui dl.ui-budget__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6em; }
.ui-budget__rows > div { min-width: 0; padding: 0.75em 0.85em; border: 0.0625em solid var(--ui-line); border-radius: 0.7em; }
.ui-budget__rows dt { color: var(--slate); font-size: max(0.72em, min(11px, 0.9em)); font-weight: 500; white-space: nowrap; }
.ui-budget__rows dd { margin-top: 0.15em; font-size: 1.5em; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ui p.ui-budget__bar { height: 0.8em; margin-top: 1.2em; overflow: hidden; border-radius: 9999px; background-color: var(--ui-fill); }
.ui-budget__bar i { display: block; width: 45.2%; height: 100%; border-radius: 9999px; background-color: var(--chart); }
.ui p.ui-budget__note { margin-top: 0.6em; color: var(--slate); font-size: max(0.78em, min(11px, 0.975em)); }
.ui-budget__note b { color: var(--night); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ── Row 1: who sees the ads ── */
.ui-aud__body { display: grid; grid-template-columns: 12em minmax(0, 1fr); align-items: center; gap: 1.2em; }
.ui-aud__disk { position: relative; }
.ui-aud__disk > svg:first-child { display: block; width: 100%; height: auto; overflow: visible; }
.ui-aud__ring { fill: var(--tint); stroke: var(--chart); stroke-width: 1.1; }
.ui-aud__radius { fill: none; stroke: var(--chart); stroke-width: 1; stroke-dasharray: 2.5 2.5; }
.ui-aud__in { fill: var(--chart); }
.ui-aud__out { fill: #c5cad3; }
.ui-aud__pin { position: absolute; top: 50%; left: 50%; width: 2.3em; height: 2.3em; color: var(--night); transform: translate(-50%, -92%); }
.ui-aud__miles {
  position: absolute; top: 50%; left: 71%; padding: 0.12em 0.55em; border-radius: 9999px; background-color: #fff; box-shadow: inset 0 0 0 0.0625em var(--chart);
  color: var(--anchor-deep); font-size: max(0.66em, min(11px, 0.825em)); font-weight: 650; line-height: 1.3; white-space: nowrap; transform: translate(-50%, -135%);
}
.ui ul.ui-aud__chips { display: grid; gap: 0.5em; padding: 0; list-style: none; }
.ui-aud__chip { padding: 0.55em 0.85em; border-radius: 0.7em; background-color: var(--tint); color: var(--anchor-deep); font-size: max(0.78em, min(11px, 0.975em)); font-weight: 600; line-height: 1.3; }
.ui-aud__chip.is-out { background-color: var(--ui-fill); color: var(--slate); }

/* ── Row 2: the story ad, 9:16 on a flat warm color ── */
.ui-story { padding: 0; background: none; box-shadow: none; }
.ui-story__phone {
  display: flex; flex-direction: column; width: 15.5em; aspect-ratio: 9 / 16; margin-inline: auto; padding: 1em; overflow: hidden;
  border-radius: 1.7em; background-color: #fde4b8; color: #2b1d0b;
}
.ui p.ui-story__head { display: flex; align-items: center; gap: 0.5em; }
.ui-story__head > span:not(.ui-example) { min-width: 0; }
.ui-story__head b { display: block; font-size: max(0.74em, min(11px, 0.925em)); font-weight: 650; line-height: 1.2; }
.ui-story__head small { display: block; font-size: max(0.68em, min(11px, 0.85em)); line-height: 1.2; }
.ui-story .ui-example { border-color: rgb(43 29 11 / 0.2); background-color: rgb(255 255 255 / 0.55); color: #2b1d0b; }
.ui-story__card { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 0.9em; }
.ui p.ui-story__big { font-size: 1.85em; font-weight: 750; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.ui p.ui-story__offer { font-size: 0.86em; font-weight: 600; line-height: 1.35; }
.ui p.ui-story__foot { text-align: center; }
.ui-story__btn { display: inline-flex; padding: 0.6em 1.5em; border-radius: 9999px; background-color: #2b1d0b; color: #fff; font-size: 0.8em; font-weight: 650; }

/* ── Row 3: the form, two phone screens, the second set lower ── */
.ui-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; align-items: start; padding: 0; background: none; box-shadow: none; }
.ui-form__phone { min-width: 0; padding: 1em; border-radius: 1.5em; background-color: #fff; }
.ui-form__phone.is-two { margin-top: 2.6em; }
.ui p.ui-form__title { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; margin-bottom: 0.9em; }
.ui-form__title b { font-size: 0.88em; font-weight: 650; }
.ui p.ui-form__q { margin-bottom: 0.7em; font-size: 0.8em; font-weight: 650; line-height: 1.3; }
.ui p.ui-form__q.is-big { margin-bottom: 1em; font-size: 0.95em; line-height: 1.25; text-wrap: balance; }
.ui ul.ui-form__opts, .ui ul.ui-form__times { display: grid; gap: 0.5em; padding: 0; list-style: none; }
.ui-form__opt { display: flex; align-items: center; gap: 0.55em; padding: 0.6em 0.7em; border: 0.0625em solid var(--ui-line); border-radius: 0.7em; font-size: max(0.74em, min(11px, 0.925em)); font-weight: 550; line-height: 1.25; }
.ui-form__opt.is-on { border-color: var(--anchor); background-color: var(--tint); color: var(--anchor-deep); font-weight: 650; }
.ui-radio { flex: none; width: 1em; height: 1em; border-radius: 9999px; box-shadow: inset 0 0 0 0.13em #aab2c0; }
.ui-form__opt.is-on .ui-radio { background: radial-gradient(circle, var(--anchor) 0 34%, #fff 36%); box-shadow: inset 0 0 0 0.13em var(--anchor); }
.ui p.ui-form__go { display: flex; justify-content: flex-end; margin-top: 0.9em; }
.ui-form__go span { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 9999px; background-color: var(--anchor); color: #fff; }
.ui-form__go svg { width: 1.1em; height: 1.1em; stroke-width: 2.6; }
.ui-form__time { padding: 0.8em 0.6em; border: 0.0625em solid var(--anchor); border-radius: 0.85em; color: var(--anchor-deep); font-size: 0.82em; font-weight: 650; text-align: center; }

/* ── Row 4: the text a new lead gets, and the alert to whoever calls her back ── */
.ui-text { display: grid; grid-template-columns: minmax(0, 1fr) 12.5em; gap: 1.1em; align-items: start; padding: 0; background: none; box-shadow: none; }
.ui-text__phone { min-width: 0; padding: 1em 1.1em 1.2em; border-radius: 1.6em; background-color: #fff; }
.ui p.ui-text__head { display: flex; align-items: center; gap: 0.55em; padding-bottom: 0.8em; border-bottom: 0.0625em solid var(--ui-line); }
.ui-text__head b { font-size: 0.82em; font-weight: 650; }
.ui p.ui-text__bubble { max-width: 92%; margin-top: 1em; padding: 0.7em 0.9em; border-radius: 1.1em 1.1em 1.1em 0.3em; background-color: #e9ecf1; font-size: 0.82em; line-height: 1.4; }
.ui-text__link { display: flex; width: fit-content; margin-top: 0.6em; padding: 0.3em 0.85em; border-radius: 9999px; background-color: var(--anchor); color: #fff; font-size: 0.9em; font-weight: 650; }
.ui p.ui-text__when { display: flex; align-items: center; gap: 0.35em; margin-top: 0.6em; color: var(--slate); font-size: max(0.66em, min(11px, 0.825em)); font-weight: 500; }
.ui-text__when svg { width: 1.15em; height: 1.15em; }
.ui-alert { margin-top: 3.2em; padding: 0.9em 1em; border-radius: 1em; background-color: #fff; }
.ui p.ui-alert__app { display: flex; align-items: center; gap: 0.5em; color: var(--slate); font-size: max(0.7em, min(11px, 0.875em)); }
.ui-alert__app svg { flex: none; width: 1.7em; height: 1.7em; padding: 0.3em; border-radius: 0.45em; background-color: #fef3c7; color: #a15c07; }
.ui-alert__app b { color: var(--night); font-weight: 650; }
.ui p.ui-alert__text { margin-top: 0.5em; font-size: 0.8em; font-weight: 600; line-height: 1.35; }

/* ── Narrow boxes ── */
/* The steps in a card under 340 px (phones, and the three side by side from 1024 to 1365 px): drawn 22 em wide so the words stay readable */
@container (max-width: 339px) {
  .ui-sets, .ui-test, .ui-budget { --w: 22; }
  .ui-pill { font-size: max(0.7em, min(11px, 0.875em)); }
}

/* The header's card under 440 px: 22 em wide, the four counts a size down so 12,600 holds its column */
@container (max-width: 439px) {
  .ui-oct { --w: 22; }
  .ui-example { font-size: max(0.7em, min(11px, 0.875em)); }
  .ui-fun__step b { font-size: 1.12em; }
  .ui-fun__step { grid-template-rows: 4.6em auto auto; }
}

/* A box under 480 px (a phone, and the rows from 1024 to 1249 px): the wide pictures 22 em wide, the form's two screens 24, the
   audience's chips under its disk and the alert under the text */
@container (max-width: 479px) {
  .ui-aud, .ui-story, .ui-text { --w: 22; }
  .ui-form { --w: 24; }
  .ui-example { font-size: max(0.7em, min(11px, 0.875em)); }
  .ui-aud__body { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0.9em; }
  .ui-aud__disk { width: 11em; }
  .ui ul.ui-aud__chips { justify-self: stretch; }
  .ui-text { grid-template-columns: minmax(0, 1fr); gap: 0.8em; }
  .ui-alert { margin-top: 0; }
  .ui-story__phone { width: 14em; }
}

/* The calm pass (2026-11-17): the step pictures draw larger, and every picture on a phone */
.svc-calm :is(.ui-sets, .ui-test, .ui-budget) { --w: 19; }
@media (max-width: 767px) {
  .svc-calm :is(.ui-sets, .ui-test, .ui-budget) { --w: 17; }
  .svc-calm :is(.ui-aud, .ui-story, .ui-text) { --w: 17.5; }
  .svc-calm .ui-form { --w: 19; }
}
