/* ============================================================
   PROVIDER PUBLIC PROFILE  (pp- prefix)
   ============================================================ */
body { background: linear-gradient(180deg, #edf3ef, #f6f8f7); }

/* Back crumb — used by the all-reviews page's up-link to the profile. */
.pp-crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); font-size: 0.88rem; font-weight: 700; text-decoration: none; margin-bottom: 14px; }
.pp-crumb:hover { color: var(--green-700); }

/* ── Hero ── */
.pp-hero {
  border-radius: 24px;
  padding: var(--space-7) 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(232,167,45,0.16), transparent 50%),
    linear-gradient(180deg, #ffffff, #fafaf8);
  border: 1px solid var(--color-border-brand, rgba(13,155,110,0.25));
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
}
.pp-logo {
  width: 104px; height: 104px;
  border-radius: 28px;
  background: var(--grad-primary);
  color: white;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.pp-ident { min-width: 0; display: grid; gap: 8px; }
.pp-badge-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pp-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
/* One meta line under the name — the MAIN location only (numbers live in the stat strip). */
.pp-hero-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; color: var(--fg-2); font-weight: 600; }
.pp-hero-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.pp-hero-meta i { color: var(--green-700); }
.pp-hero-sep { color: var(--ink-300); }

.pp-cta-col { display: grid; gap: 8px; justify-items: stretch; }
.pp-save-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  background: var(--grad-primary);
  color: white; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.92rem;
  white-space: nowrap; text-decoration: none;
}
.pp-save-btn:hover { opacity: .92; color: white; }
.pp-save-btn.pp-saved {
  background: white;
  color: var(--green-700, #065f46);
  border: 1.5px solid var(--green-500, #0D9B6E);
}
.pp-save-btn.pp-saved:hover { background: #f0fdf8; }
.pp-share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 12px;
  background: white; color: var(--fg-1); border: 1px solid var(--color-border);
  cursor: pointer; font: inherit; font-weight: 700; font-size: 0.9rem;
  white-space: nowrap; text-decoration: none;
}
.pp-share-btn:hover { border-color: rgba(13,155,110,.30); }
.pp-save-form { display: contents; }

/* Section sub-label (e.g. Work samples: "self-uploaded work") */
.pp-section-sub { margin: -6px 0 14px; color: var(--fg-2); font-size: 0.85rem; line-height: 1.5; }

/* A heading and its way-out on one line. The selected-work section has its own
   (.pp-sc-head) because its link pairs with the SUBTITLE; this one pairs with
   the heading, which is what the reviews section has.

   The reviews see-all used to hang under the carousel -- the exit placed below
   the thing you are still reading, and the only section whose link was
   somewhere different from every other section's. */
.pp-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.pp-sec-head > h2 { margin-bottom: 14px; }

/* ── Stat strip ── */
.pp-stats {
  display: grid;
  /* auto-FIT, because this strip holds TWO unconditional tiles and two that
     only appear when there is something to show -- a founding year and a
     response time -- so it is 2, 3 or 4 wide and `repeat(3, 1fr)` was only ever
     right at 3. At two it kept a third empty track and left a 415px hole beside
     them; at four it wrapped one tile onto a row of its own with two more empty
     tracks beside it. Measured on pf_bare, which has the two. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.pp-stat {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-5) 20px;
  display: grid;
  gap: 4px;
}
.pp-stat .v {
  font-size: 1.7rem; font-weight: 800; color: var(--fg-1);
  letter-spacing: -0.03em; line-height: 1;
}
.pp-stat .v i { color: var(--gold-500,#E8A72D); font-size: 1.3rem; margin-inline-end: 4px; }
.pp-stat .v.green { color: var(--green-700); }
.pp-stat .k { font-size: 0.82rem; color: var(--fg-2); font-weight: 600; }

/* ── Two-column body ── */
.pp-grid {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(0,1fr);
  gap: 18px;
  align-items: start;
}
.pp-col { display: grid; gap: 18px; min-width: 0; }
.pp-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 24px 26px;
  /* Grid item in .pp-col — without this it refuses to shrink below its content,
     so the horizontal projects scroll / portfolio grid blow the card (and the
     whole page) past the viewport on mobile instead of scrolling inside it. */
  min-width: 0;
}
.pp-card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
}
.pp-card h2 .ic {
  width: 30px; height: 30px; border-radius: 10px;
  background: rgba(13,155,110,.10); color: var(--green-700);
  display: grid; place-items: center; font-size: 1rem; flex-shrink: 0;
}
.pp-card h2 .ic.gold { background: rgba(232,167,45,.16); color: var(--gold-700,#b07a10); }
.pp-about { margin: 0; color: var(--fg-1); font-size: 0.96rem; line-height: 1.7; }

/* Reviews */
.pp-reviews { display: grid; gap: 12px; }
.pp-review {
  background: var(--ink-50,#f8f9fb);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 16px var(--space-5);
  display: grid; gap: 8px;
}
/* Profile 5-review preview: a horizontal snap-scroll row (the all-reviews page
   keeps the vertical .pp-reviews list). Same in-card containment as .pp-sc-scroll
   — min-width:0 inside a min-width:0 .pp-card so it never overflows the page. */
.pp-reviews-carousel {
  display: flex; gap: 12px; margin-top: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
.pp-reviews-carousel .pp-review {
  /* WIDER AND SHORTER. A review is a sentence or two and a name; at 300px it
     wrapped into a tall narrow column, so the strip read as a stack of blocks
     rather than a row you scan. 380 fits the sentence on fewer lines and lets
     a second card sit beside the first.

     `1 0` -- grow, never shrink -- for the reason it always was: a provider's
     FIRST review used to sit 300px wide in a 546px strip with the rest of it
     blank beside it. */
  flex: 1 0 380px; max-width: 82%;
  scroll-snap-align: start; align-content: start;
}
/* 82% leaves a slice of the next card showing, which is how somebody knows the
   strip scrolls. With one review there is no next card, so the slice promises
   something that is not there. */
.pp-reviews-carousel .pp-review:only-child { max-width: 100%; }
/* Two lines, not three, and the HEIGHT enforces it -- `-webkit-line-clamp` does
   nothing on this engine (the measurement is on .pp-portfolio-caption), so
   leaning on it here would slice a third line through the middle of the letters
   exactly as it did there. The whole review is one click away. */
.pp-reviews-carousel .pp-review .comment {
  line-height: 1.6;
  height: calc(2 * 1.6em);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) { .pp-reviews-carousel { scroll-behavior: auto; } }
.pp-review .head {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 10px; align-items: center;
}
.pp-avatar {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, #64748B, #334155);
  color: white; display: grid; place-items: center;
  font-weight: 800; font-size: 0.84rem; flex-shrink: 0;
}
.pp-review .who { font-weight: 800; font-size: 0.9rem; color: var(--fg-1); }
.pp-review .when { font-size: 0.78rem; color: var(--fg-2); }
.pp-review .stars { color: var(--gold-500,#E8A72D); font-size: 0.86rem; white-space: nowrap; }
.pp-review .stars .num { color: var(--fg-1); font-weight: 800; margin-inline-start: 4px; }
.pp-review .project { font-size: 0.78rem; color: var(--ink-600); font-weight: 600; }
.pp-review .comment { font-size: 0.92rem; color: var(--fg-1); line-height: 1.6; margin: 0; }
/* "See all N reviews" — a real link to the full reviews page. */
.pp-reviews-more-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--green-700); font-weight: 700; font-size: 0.9rem; text-decoration: none;
}
.pp-reviews-more-link:hover { text-decoration: underline; }
.pp-reviews-more-link i { font-size: 0.82rem; }

/* Per-review "Recommends" chip (profile cards + all-reviews cards). */
.ppr-recommends {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px;
  justify-self: start; width: fit-content;
  padding: 4px 10px; border-radius: 999px; background: rgba(13,155,110,.08);
  color: var(--green-700); font-size: 0.78rem; font-weight: 700;
}

/* Rating-summary extras: "% recommend" + the four sub-rating averages. */
.ppr-summary-extra { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); display: grid; gap: 13px; }
.ppr-recommend {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  padding: 7px 13px; border-radius: 999px; background: rgba(13,155,110,.10);
  border: 1px solid rgba(13,155,110,.22); color: var(--green-700);
  font-size: 0.86rem; font-weight: 700;
}
.ppr-recommend b { font-weight: 800; }
.ppr-recommend i { color: var(--green-500); }
.ppr-subratings { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 18px; }
.ppr-subrating { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.86rem; }
.ppr-subrating .k { color: var(--fg-2); min-width: 0; }
.ppr-subrating .v { font-weight: 800; color: var(--fg-1); white-space: nowrap; }
.ppr-subrating .v i { color: var(--gold-500,#E8A72D); font-size: 0.8rem; }

/* Per-review sub-ratings row (all-reviews page detail). */
.ppr-review-subs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.ppr-review-subs > span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--ink-100); font-size: 0.78rem; white-space: nowrap; }
.ppr-review-subs .k { color: var(--fg-2); }
.ppr-review-subs .v { font-weight: 800; color: var(--fg-1); white-space: nowrap; }
.ppr-review-subs .v i { color: var(--gold-500,#E8A72D); font-size: 0.74rem; }

/* Review title (headline above the comment) + "what stood out" highlight chips. */
.pp-review-title { font-weight: 800; font-size: 0.94rem; color: var(--fg-1); }
.pp-hl-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.pp-hl { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(13,155,110,.07); border: 1px solid rgba(13,155,110,.16); color: var(--green-700); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.pp-hl i { font-size: 0.72rem; }

/* ── All-reviews page ── */
.ppr-wrap { max-width: 780px; margin-inline: auto; display: grid; gap: 16px; }
.ppr-head { display: flex; align-items: center; gap: 14px; }
.ppr-logo { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 15px; background: rgba(232,167,45,.14); color: #b07a10; display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; overflow: hidden; }
.ppr-logo img { width: 100%; height: 100%; object-fit: cover; }
.ppr-head-tx h1 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ppr-sub { margin: 3px 0 0; color: var(--fg-2); font-size: 0.9rem; }

/* ── The full projects page: the work IS the page ──────────────────────────
   The reviews page keeps the 780px reading column, because a review is a
   paragraph and 780px is where a paragraph reads. Projects are photographs,
   so this page widens to 1120 and drops the white .pp-card the profile wraps
   the same cards in: a box around the only thing on the screen is a border
   drawn around everything. Measured at 1280: the card goes from 238px wide to
   349px, which is the whole point of the change.

   And a GRID at every width, never .pp-sc-scroll. That class turns into a
   sideways strip below 561px, which is right for a preview the visitor flicks
   past on the way down a profile, and wrong here: a project somebody opened
   this page to look at would be parked off the edge of the screen. */
.ppr-wrap.is-projects { max-width: 1120px; }
.ppr-projects {
  display: grid;
  /* auto-FIT, like the stat strip and the work samples: a last row holding one
     card shares the width instead of sitting narrow beside empty tracks.

     300px, not 260. At 260 the 1120px page fits FOUR columns of 267, which is
     29px more than the 238 these cards already had inside the old white box --
     a wider page spent on more columns instead of on bigger photographs. At 300
     it is three columns of 361, which is the point of the change. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: var(--space-3);
}
/* `.pp-sc-card` carries `max-width: 78%` for the flex strip it was written for.
   In a grid that percentage resolves against the TRACK, so without this every
   card sits at 78% of its column with a gap beside it. */
.ppr-projects > .pp-sc-card { max-width: 100%; }

/* Pager: shared widget — .pgr in app.css (components/pager.html). */

/* Portfolio grid (public profile — read-only) */
.pp-portfolio-grid {
  display: grid;
  /* auto-FIT, not auto-fill. They differ only when the row is not full, and
     that difference is the whole bug: auto-fill keeps the empty tracks it made,
     so one work sample stayed 140px with the rest of the row blank beside it.
     auto-fit drops the empty ones and the samples share the width. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: var(--space-3);
}
.pp-portfolio-item {
  border-radius: 12px; overflow: hidden;
  background: white; border: 1px solid var(--color-border);
  /* The caption's bottom padding lives here instead, where it is not part of
     the caption's clipped area. */
  padding-block-end: 8px;
}
/* Click-to-enlarge thumbnail button (keeps the 4/3 crop; caption sits below). */
.pp-portfolio-btn {
  display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0;
  background: var(--ink-50); cursor: pointer; overflow: hidden;
}
.pp-portfolio-btn:focus-visible { outline: 2px solid var(--green-500); outline-offset: -2px; }
.pp-portfolio-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 180ms; }
.pp-portfolio-btn:hover .pp-portfolio-img { transform: scale(1.04); }
.pp-portfolio-caption {
  padding: 8px 10px; font-size: 0.78rem; color: var(--fg-2);
  border-top: 1px solid var(--color-border); background: white;
  /* Two lines, and the HEIGHT is what enforces it -- not the line-clamp.
     A caption may be 200 characters. `-webkit-line-clamp` was doing this job
     and silently does nothing here: forcing `display: -webkit-box` on the
     element still computes `flow-root`, so the clamp never establishes its
     formatting context. The text kept rendering, `overflow: hidden` cut it
     wherever the box ended, and every card showed a third line sliced through
     the middle of the letters. Sabreen photographed it; the suite was green.

     `line-height` is fixed here rather than inherited so the arithmetic below
     is arithmetic and not a guess, and the box is EXACTLY two lines plus its
     padding, so there is no room for a third to peek. The clamp declarations
     stay: where they DO work they add the ellipsis, and where they do not the
     height already did the work. */
  line-height: 1.5;
  /* NO BOTTOM PADDING, and that is the last piece of it.
     `overflow: hidden` clips at the PADDING box, not the content box, so a
     bottom padding is inside the clipped area: the third line started right
     where line two ended and bled 8px into that padding before the clip caught
     it. Two clean lines and a sliver of a third, which is what Sabreen kept
     photographing after the height was already correct.
     The breathing room moved to the item, outside the clip. */
  padding-block-end: 0;
  height: calc(2 * 1.5em + 8px);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .pp-portfolio-img { transition: none; }
  .pp-portfolio-btn:hover .pp-portfolio-img { transform: none; }
}

/* Verified completed-project showcase (public — provider-authored fields only).
   Horizontal, snap-scrolling row of click-to-open cards. */
.pp-sc-scroll {
  display: flex; gap: 14px; margin-top: var(--space-3);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
}
/* GROWS INTO THE ROOM IT HAS. It used to be a fixed 220px whatever the row was,
   which is right for a strip that scrolls and wrong for one that does not: a
   provider with a single completed project got a 220px card in a 546px strip
   and 326px of nothing beside it. `1 0` grows into free space and never
   shrinks, so three or more still stop at 220 and scroll the way they did. */
/* Above a phone this stops being a strip and becomes a grid. A sideways
   scroller earns its place where vertical space is scarce and a swipe is
   natural; with a mouse nobody discovers it, and at 1280 the profile's content
   column is 546px, so three projects showed as two with 142px hidden behind a
   thin scrollbar. The MORE trustworthy list -- work the platform witnessed --
   was the one being hidden, while the provider's own unverified photos sat
   fully visible in a grid one section down. */
@media (min-width: 561px) {
  .pp-sc-scroll {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    overflow-x: visible; scroll-snap-type: none; padding-bottom: 0;
  }
  /* 78% is a PEEK: it leaves a slice of the next card showing so a thumb knows
     the strip scrolls. In a grid it resolves against the TRACK instead of the
     row, so every card sat at 78% of its own cell -- 207px inside a 266px
     track, 59px of nothing repeated down the page. */
  .pp-sc-scroll > .pp-sc-card { max-width: 100%; }
}

/* The link to the rest. Same 44px tap-target floor as everything else here;
   at 9px of padding it measured 41 on a phone. */
/* Subtitle and show-all on one line, the link at the far end. It wraps rather
   than squeezing the sentence when the two do not fit. */
.pp-sc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
/* Text only: no border, no arrow. It opens a page of the SAME cards, so a
   bordered button beside the heading read as a second and weightier action
   than the cards themselves. The 44px stays: it is still a tap target. */
.pp-sc-more-link {
  min-height: 44px; flex: none;
  display: inline-flex; align-items: center;
  font-size: .88rem; font-weight: 700; color: var(--green-700, #0c6b4f);
  border: 0; padding: 0; background: none; text-decoration: none;
  white-space: nowrap;
}
.pp-sc-more-link:hover { text-decoration: underline; }
.pp-sc-more-link:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }

.pp-sc-card {
  scroll-snap-align: start; flex: 1 0 220px; max-width: 78%;
  display: grid; gap: 0; padding: 0; text-align: start; cursor: pointer;
  /* One column, and it may not grow past the card. Without this the column is
     sized to its content, and the content measures itself the WRONG WAY ROUND:
     a card with no rating and no summary is stretched to the height of a taller
     sibling in its row, the extra height lands on the image, and
     `aspect-ratio: 4/3` then derives the WIDTH from that height.

     Measured on pf_long at 957px: a 240px card whose image row had grown to
     216px tall computed a 288px image box, 48px wider than the card holding it.
     The card is `overflow: hidden`, so in Arabic that overflow ran left and
     took the photo-count badge with it -- 40px of the badge outside the card,
     leaving the camera icon alone at the edge. Sabreen circled it in red.

     `minmax(0, 1fr)` is the fix rather than a width on the image: a width
     resolves against this same column, so it read 288 back and changed nothing
     (tried, measured, no effect). The `:only-child` rule below overrides this
     deliberately -- that card really is two columns. */
  grid-template-columns: minmax(0, 1fr);
  /* And the rows, for the other half of the same problem. Sibling cards in a
     row are stretched to the tallest, and with two `auto` rows the slack landed
     in the IMAGE row -- which cannot use it, because `aspect-ratio` pins the
     photo. Measured at 1280: a card with only a title had a 306.8px image row
     holding a 270px photo, so 37px of nothing sat between the photo and the
     title while the card beside it had none. `auto 1fr` gives the slack to the
     body instead, where `align-content: start` in it keeps the text against the
     photo and leaves the space at the bottom of the card. */
  grid-template-rows: auto 1fr;
  background: white; border: 1px solid var(--color-border); border-radius: 16px;
  overflow: hidden; font: inherit; color: inherit;
  transition: border-color 160ms, transform 160ms, box-shadow 160ms;
}
/* One project on its own turns SIDEWAYS. Growing a lone card to the full width
   would only make a taller tower -- a 546px card carries a 410px photo -- and
   the complaint was that the card ran down the page while the room was across
   it. Photo beside the words instead: the same card, laid out the way the space
   actually is. */
.pp-sc-card:only-child {
  max-width: 100%;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  align-items: start;
}
.pp-sc-card:hover { border-color: rgba(13,155,110,.35); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(13,155,110,.10); }
.pp-sc-card:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.pp-sc-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--ink-50); display: block; }
.pp-sc-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Says there is more behind the cover. Same corner and the same dark chip as
   .pp-sc-expand on the lightbox stage, so the two read as one family. The
   phrase is built by qty_plural, which is why there is no dir="ltr" here the
   way .pp-sc-count needs one: this is a counted NOUN, a sentence fragment that
   belongs to the page's own direction, not a bare "3 / 5" pair. */
.pp-sc-card-count {
  position: absolute; inset-block-end: 8px; inset-inline-end: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(17, 24, 21, .62); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  backdrop-filter: blur(3px);
}
/* Branded CSS default cover for photo-less projects (card slot + dialog hero).
   Deterministic tone via .pp-sc-cover-0..3 (rotated by project.pk) — never an
   inline gradient. No text: gradient bg + soft rounded "block" shapes + a round
   circle accent (aspect-ratio:1 so it stays round in any container). Each
   variant overrides the shared .b1/.b2/.dot spans and hides the ones it omits. */
.pp-sc-cover { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.pp-sc-cover-art { position: absolute; inset: 0; }
.pp-sc-cover-art .b1, .pp-sc-cover-art .b2, .pp-sc-cover-art .dot { position: absolute; }
.pp-sc-cover-art .dot { aspect-ratio: 1; border-radius: 50%; }

/* cover-0 — beige, two blocks + gold sun */
.pp-sc-cover-0 { background: linear-gradient(135deg, #f4e7cb, #ecd6ac); }
.pp-sc-cover-0 .b1 { width: 28%; height: 34%; inset-block-end: 16%; inset-inline-start: 12%; border-radius: 12px; background: #fdfaf1; }
.pp-sc-cover-0 .b2 { width: 40%; height: 50%; inset-block-end: 16%; inset-inline-start: 44%; border-radius: 14px; background: #fdfaf1; }
.pp-sc-cover-0 .dot { width: 18%; inset-block-start: 12%; inset-inline-end: 14%; background: #e8a72d; }

/* cover-1 — gold, framed with a green inset (no circle) */
.pp-sc-cover-1 { background: linear-gradient(135deg, #eaa93a, #dd9a1f); }
.pp-sc-cover-1 .b1 { width: 68%; height: 46%; inset-block-start: 27%; inset-inline-start: 16%; border-radius: 16px; background: #f4e6c8; }
.pp-sc-cover-1 .b2 { width: 20%; height: 26%; inset-block-start: 37%; inset-inline-start: 22%; border-radius: 10px; background: #a9c3a0; }
.pp-sc-cover-1 .dot { display: none; }

/* cover-2 — beige, card + green circle (no extra block) */
.pp-sc-cover-2 { background: linear-gradient(135deg, #f4e7cb, #ead7b0); }
.pp-sc-cover-2 .b1 { width: 60%; height: 46%; inset-block-start: 27%; inset-inline-start: 20%; border-radius: 16px; background: #fdfaf1; }
.pp-sc-cover-2 .b2 { display: none; }
.pp-sc-cover-2 .dot { width: 18%; inset-block-start: 39%; inset-inline-start: 41%; background: #9ec3a7; }

/* cover-3 — green, two blocks + gold sun */
.pp-sc-cover-3 { background: linear-gradient(135deg, #a3d3ba, #cdeadb); }
.pp-sc-cover-3 .b1 { width: 28%; height: 34%; inset-block-end: 16%; inset-inline-start: 12%; border-radius: 12px; background: rgba(255,255,255,.9); }
.pp-sc-cover-3 .b2 { width: 40%; height: 50%; inset-block-end: 16%; inset-inline-start: 44%; border-radius: 14px; background: rgba(255,255,255,.9); }
.pp-sc-cover-3 .dot { width: 18%; inset-block-start: 12%; inset-inline-end: 14%; background: #e8a72d; }

/* `align-content: start` is not tidiness. Sibling cards in a grid row are
   stretched to the tallest of them, and the body is a grid: the slack landed
   ABOVE the text as well as below it, so a card carrying only a title sat with
   its title 48px under the photo while the card beside it, with a rating and a
   summary, had 12px. The titles in one row did not line up. `start` puts every
   title 12px under its photo and leaves the slack at the bottom, where it is
   just the card being taller than its contents. */
.pp-sc-card-body { display: grid; align-content: start; gap: 8px; padding: 12px 14px 14px; }
.pp-sc-card-title {
  font-weight: 800; font-size: 0.92rem; color: var(--fg-1);
  letter-spacing: -0.01em; line-height: 1.35;
  /* Two lines, like the summary under it, which has always been contained. A
     title may be 200 characters, and unclamped one of them set EIGHT lines in a
     220px card and made it 404px tall -- a column of text where a card should
     be. The whole title is in the dialog, one click away. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-sc-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-sc-card-sub { font-size: 0.82rem; color: var(--fg-2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lightbox dialog */
/* Wide enough for the photograph to be the point of the dialog.
   It was 520px, which on a laptop gave a finished job about a third of the
   screen and made a six-photo project look like six stamps.

   This 900 is also the READABLE MEASURE for everything inside, which is why no
   block in here sets a width of its own -- see the note further down. */
.pp-sc-dialog {
  border: 0; border-radius: 20px; padding: 0;
  max-width: 900px; width: min(94vw, 900px);
  background: white; color: var(--fg-1); box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.pp-sc-dialog::backdrop { background: rgba(15,23,42,.55); }
.pp-sc-dialog-inner { padding: 16px 20px 20px; display: grid; gap: 14px; }
/* A dialog is capped at the window height by the browser and scrolls inside
   itself. With a long title, a long summary and a client review under the
   photo there IS more than fits, and the close button -- the first thing in
   the box -- was the first thing to scroll out of reach. Sticking it to the
   top keeps the way out on screen no matter how far down the reader goes. */
.pp-sc-dialog-bar {
  position: sticky; inset-block-start: -16px; z-index: 3;
  margin-block-start: -16px; padding-block: 16px 4px;
  background: white;
}
/* ONE column. Everything in this dialog -- photo, strip, heading, summary,
   review -- starts and ends on the same two edges.

   These three used to carry `max-width: 66ch` each, to keep a line of prose
   readable while the photo went wide. It could never line up, because `ch` is
   measured in the element's OWN font: the heading is set in the condensed face
   at a larger size, the summary in the body face at 0.94rem, so the same 66ch
   came out 583px and 548px against the photo's 845. Three blocks, three
   different left edges, and a 280px column of nothing running down beside them.

   The readable measure is kept by the DIALOG's own max-width (900px) rather
   than per element, which is the only place it can be set once. The prose in
   here is short by construction anyway: the summary is capped at 280 characters
   where it is written, and the review comment is a sentence or two. */
/* Top bar: verified pill (start) + close (end), above the media. */
.pp-sc-dialog-bar { display: flex; align-items: center; gap: 12px; }
/* An empty caption line still takes its line-height and the grid gap above it,
   which reads as a caption that failed to load rather than a photo with none.
   The script sets `hidden`; this makes the browser honour it inside a grid. */
.pp-sc-dialog-summary[hidden] { display: none; }
.pp-sc-dialog-close {
  margin-inline-start: auto; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--color-border);
  background: white; color: var(--fg-1); cursor: pointer; display: grid; place-items: center; font-size: 0.95rem;
}
.pp-sc-dialog-close:hover { border-color: rgba(13,155,110,.35); color: var(--green-700); }
.pp-sc-dialog-head { display: grid; gap: 8px; }
.pp-sc-dialog-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
/* Compact banner, not an expandable hero. */
/* width: 100% first: with only aspect-ratio + max-height, the height cap shrank the WIDTH to keep the ratio (473 of 860px). */
.pp-sc-dialog-cover { width: 100%; aspect-ratio: 21 / 8; max-height: 180px; border-radius: 14px; overflow: hidden; border: 1px solid var(--color-border); }
.pp-sc-dialog-summary { margin: 0; font-size: 0.94rem; color: var(--fg-1); line-height: 1.6; }
/* ── Project photo viewer ────────────────────────────────────────────────
   One large photo at a time. This replaced a grid of 140px thumbnails, which
   showed that pictures existed rather than showing the work in them.

   The arrows sit ON the photo and are sized to be hit on a phone (44px, the
   tap-target floor used everywhere else here). `inset-inline` swaps which SIDE
   each one is on when the page turns round -- but only the side. The chevron
   inside is a fixed picture and has to be mirrored separately, which is what
   the [dir="rtl"] rule further down does. An earlier version of this comment
   claimed inset-inline handled the whole thing, and both arrows spent a while
   pointing inwards at each other on the English page. */
.pp-sc-viewer { display: grid; gap: 10px; }

.pp-sc-stage {
  position: relative; width: 100%; border-radius: 14px; overflow: hidden;
  background: var(--ink-50, #f2f4f7); border: 1px solid var(--color-border);
  /* HEIGHT, not aspect-ratio. With `aspect-ratio: 3/2; max-height: 62vh` the
     browser works the WIDTH back out of the capped height, so on a short wide
     window the stage shrank to 623px inside a 900px dialog and left a column of
     empty space beside it. Setting the height directly keeps the stage the full
     width of the dialog at every size; the photo letterboxes inside it against
     the stage's own background, which is what a photo viewer is supposed to do
     with a picture that is not the shape of the frame. */
  height: min(62vh, 540px);
}
.pp-sc-shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--ink-50, #f2f4f7);
  opacity: 0; visibility: hidden; transition: opacity .18s ease;
  cursor: zoom-in;
}
.pp-sc-shot.is-current { opacity: 1; visibility: visible; }

.pp-sc-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1.15rem;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(17, 24, 21, .55); color: #fff;
  backdrop-filter: blur(3px);
  transition: background .15s ease, transform .15s ease;
}
.pp-sc-nav:hover, .pp-sc-nav:focus-visible { background: rgba(17, 24, 21, .78); }
.pp-sc-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pp-sc-nav[disabled] { opacity: .35; cursor: default; }
.pp-sc-prev { inset-inline-start: 10px; }
.pp-sc-next { inset-inline-end: 10px; }

.pp-sc-count {
  position: absolute; inset-block-end: 10px; inset-inline-start: 50%;
  transform: translateX(-50%);
  /* "3 / 5" is a numeric expression, not a sentence. Left to the page's own
     direction it was REORDERED on an Arabic page and displayed as "5 / 3",
     which reads as the total first and the position second. isolate keeps the
     pair to itself; the dir="ltr" on the element fixes the order. */
  unicode-bidi: isolate;
  background: rgba(17, 24, 21, .62); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
[dir="rtl"] .pp-sc-count { transform: translateX(50%); }

.pp-sc-expand {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px;
  width: 34px; height: 34px; border-radius: 10px; pointer-events: none;
  display: grid; place-items: center; font-size: .9rem;
  background: rgba(17, 24, 21, .5); color: #fff;
}

/* The strip: what arrows cannot say, which is how many and which one. */
.pp-sc-thumbs {
  display: flex; gap: 8px; overflow-x: auto; padding-block-end: 4px;
  scrollbar-width: thin;
}
.pp-sc-thumb {
  flex: 0 0 auto; width: 78px; height: 56px; padding: 0; cursor: pointer;
  border-radius: 10px; overflow: hidden; background: none;
  border: 2px solid transparent; opacity: .62;
  transition: opacity .15s ease, border-color .15s ease;
}
.pp-sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-sc-thumb:hover { opacity: .85; }
.pp-sc-thumb.is-current { opacity: 1; border-color: var(--brand-600, #0D9B6E); }
.pp-sc-thumb:focus-visible { outline: 2px solid var(--brand-600, #0D9B6E); outline-offset: 2px; }

/* Filling the screen: the photo goes fullscreen through the browser's own API,
   so Esc and the system chrome behave the way people already expect. */
/* The buttons swap sides on their own -- they are placed with logical
   properties -- but a chevron glyph does not turn round with the page, so it
   has to be mirrored. Same one-liner .pgr-btn and .sl-rail-collapse use. Left
   out, both arrows pointed inwards at each other on the English page and each
   one pointed away from where it took you. */
[dir="rtl"] .pp-sc-nav i { transform: scaleX(-1); }

.pp-sc-shot:fullscreen { object-fit: contain; background: #0b0f0d; cursor: zoom-out; }

@media (max-width: 560px) {
  /* No room to put anything beside anything: the lone card stacks again. */
  .pp-sc-card:only-child { grid-template-columns: minmax(0, 1fr); }
  /* A phone has height to spare and little width, so here the shape is the
     useful constraint: 62vh on a tall screen would be a very deep letterbox. */
  .pp-sc-stage { height: auto; aspect-ratio: 4 / 3; }
  .pp-sc-thumb { width: 64px; height: 46px; }

  /* The full projects page: one project per row, at the width of the screen.
     Kept in THIS block rather than a second one at the same breakpoint --
     three existing tests find "the phone rules" by searching for the media
     query, and a second block at 560px meant they read the wrong one and
     failed on rules that had not moved. */
  .ppr-projects { grid-template-columns: 1fr; gap: 16px; }
  /* 16/11, not the 4/3 the preview card uses. At the full width of a 375px
     screen a 4:3 photo is 251px tall and pushes the title of the FIRST project
     to the bottom edge; 16/11 leaves the title and its rating on screen with
     the photo. Only on this page: the profile's strip is 220px wide, where 4/3
     is 165px and nothing is pushed anywhere. */
  .ppr-projects .pp-sc-card-img { aspect-ratio: 16 / 11; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-sc-shot, .pp-sc-nav, .pp-sc-thumb { transition: none; }
}
.pp-sc-dialog-review { background: var(--ink-50,#f8f9fb); border: 1px solid var(--color-border); border-radius: 14px; padding: 14px var(--space-5); display: grid; gap: 8px; }
.pp-sc-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-sc-review-label { font-size: 0.78rem; font-weight: 800; color: var(--fg-2); }
.pp-sc-review-head .stars { color: var(--gold-500,#E8A72D); font-size: 0.86rem; white-space: nowrap; }
.pp-sc-review-head .stars .num { color: var(--fg-1); font-weight: 800; margin-inline-start: 4px; }
.pp-sc-review-comment { margin: 0; font-size: 0.92rem; color: var(--fg-1); line-height: 1.6; }
.pp-sc-review-date { font-size: 0.78rem; color: var(--fg-2); }
@media (prefers-reduced-motion: reduce) {
  .pp-sc-scroll { scroll-behavior: auto; }
  .pp-sc-card { transition: none; }
  .pp-sc-card:hover { transform: none; }
}

.pp-sc-verified {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  background: rgba(13,155,110,.10); border: 1px solid rgba(13,155,110,.22);
  color: var(--green-700); font-size: 0.76rem; font-weight: 800; white-space: nowrap;
}
.pp-sc-verified i { font-size: 0.82rem; }
/* Single "Completed via Ghudoon" note under the section title (every project
   here is platform-verified, so it's stated once, not per card). */
.pp-sc-verified-note { margin: -6px 0 14px; }
.pp-sc-rating {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--fg-1); font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.pp-sc-rating i { color: var(--gold-500,#E8A72D); font-size: 0.82rem; }

/* Rating breakdown */
.pp-rating-summary { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 18px; align-items: center; }
.pp-rating-big { text-align: center; display: grid; gap: 2px; }
.pp-rating-big .n { font-size: 2.6rem; font-weight: 800; color: var(--fg-1); letter-spacing: -0.03em; line-height: 1; }
.pp-rating-big .stars { color: var(--gold-500,#E8A72D); font-size: 0.9rem; }
.pp-rating-big .count { font-size: 0.78rem; color: var(--fg-2); }
.pp-bars { display: grid; gap: 5px; }
.pp-bar-row { display: grid; grid-template-columns: 16px minmax(0,1fr) 24px; gap: 8px; align-items: center; font-size: 0.78rem; color: var(--fg-2); }
.pp-bar-row .track { height: 6px; background: var(--ink-100); border-radius: 999px; overflow: hidden; }
.pp-bar-row .track > span { display: block; height: 100%; width: var(--pct, 0); background: linear-gradient(90deg, var(--gold-500,#E8A72D), var(--gold-700,#b07a10)); border-radius: 999px; }

/* A bar that filters. Only the rows with something behind them become links,
   so `.is-filter` is the whole difference between a control and a readout. */
/* Every row is 32px, targets and readouts alike, so the five bars stay evenly
   spaced. WCAG 2.5.8 asks 24 by 24 CSS pixels of a target; 44px on the
   clickable rows only was more than that and left the bars uneven. */
.pp-bar-row.is-filter {
  text-decoration: none; color: inherit; cursor: pointer;
  border-radius: 8px; padding-inline: 6px; margin-inline: -6px;
  transition: background 140ms;
}
.pp-bar-row.is-filter:hover { background: var(--ink-50, #f2f4f7); }
.pp-bar-row.is-filter:focus-visible { outline: 2px solid var(--green-500); outline-offset: 1px; }
/* The one in force. Gold rather than green: this is a property of the reviews
   being read, not a success or an action of the reader's. */
.pp-bar-row.is-on { background: rgba(232,167,45,.14); font-weight: 800; color: var(--fg-1); }
.pp-bar-row.is-on .track { box-shadow: 0 0 0 1px rgba(232,167,45,.35); }

/* The way out sits with the heading that says the filter is on. */
/* Only where the bars filter (the reviews page); the profile's readout keeps its tight rows. */
.pp-bars:has(.is-filter) .pp-bar-row { min-height: 32px; }
#reviews { scroll-margin-top: 72px; }
.ppr-filter-star { color: var(--gold-500, #E8A72D); font-size: .8em; }
.ppr-clear-filter {
  font-size: .8rem; font-weight: 700; color: var(--green-700);
  text-decoration: none; margin-inline-start: 10px;
}
.ppr-clear-filter:hover { text-decoration: underline; }
.ppr-none-at-this-rating { margin: 4px 0 0; color: var(--fg-2); font-size: .92rem; }

/* Detail rows */
.pp-detail-row { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; padding: 12px 0; align-items: start; }
.pp-detail-row + .pp-detail-row { border-top: 1px solid var(--color-border); }
.pp-detail-row .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--ink-50,#f8f9fb); border: 1px solid var(--color-border); color: var(--green-700); display: grid; place-items: center; font-size: 0.95rem; flex-shrink: 0; }
.pp-detail-row .k { font-size: 0.78rem; color: var(--fg-2); font-weight: 700; }
.pp-detail-row .v { font-size: 0.92rem; color: var(--fg-1); font-weight: 700; margin-top: 1px; }
.pp-detail-row .v.link { color: var(--green-700); }
.pp-detail-row .v.link a { color: inherit; text-decoration: none; word-break: break-word; }
.pp-detail-row .v.link a:hover { text-decoration: underline; }

/* Reach: main city + additional service cities as a vertical list, then travel line */
.pp-city-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; }
.pp-city-list li { font-size: 0.92rem; color: var(--fg-1); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pp-city-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-500); flex-shrink: 0; }
.pp-city-list li.is-main { font-weight: 800; }
.pp-city-tag {
  font-size: 0.68rem; font-weight: 800; color: var(--green-700);
  background: rgba(13,155,110,.10); border: 1px solid rgba(13,155,110,.22);
  border-radius: 999px; padding: 1px 8px; letter-spacing: .01em;
}
.pp-reach-travel { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--fg-2); font-weight: 600; }
.pp-reach-travel i { color: var(--green-700); }

/* Responsive */
@media (max-width: 920px) {
  .pp-grid { grid-template-columns: 1fr; }

  /* ONE COLUMN MEANS ONE ORDER, AND IT WAS THE WRONG ONE.
     Collapsing two columns to one concatenates them: the whole left column,
     then the whole right. So a phone read About, then the projects, then the
     work samples, then every review, and only after all of that reached
     "Service types" and the rating summary -- the two things a visitor wants
     first. What does this company do, and are they any good, arrived last.

     `display: contents` drops the two column wrappers out of the box tree so
     every card becomes a direct child of the grid and `order` can reach it.
     The cards are the only children that render: the lightbox <dialog>s in
     there are display:none until opened and fixed-position after, so they do
     not take part.

     The order is: who they are, what they do, how good they are, whether they
     are verified -- and THEN the evidence. */
  .pp-grid > .pp-col { display: contents; }
  .pp-s-about   { order: 1; }
  .pp-s-services{ order: 2; }
  .pp-s-rating  { order: 3; }
  .pp-s-trust   { order: 4; }
  .pp-s-work    { order: 5; }
  .pp-s-samples { order: 6; }
  .pp-s-reviews { order: 7; }
  /* No stats override here any more: a fixed two-track grid brings back the
     same empty track the moment the strip holds three tiles, and auto-fit
     already narrows to two and then one on its own. */
  .pp-hero { grid-template-columns: auto minmax(0,1fr); }
  .pp-cta-col { grid-column: 1 / -1; grid-auto-flow: column; }
}
@media (max-width: 560px) {
  .pp-cta-col { grid-auto-flow: row; }
  .pp-hero { padding: 20px var(--space-5); }
}