/* ---------------------------------------------------------------------------
   Gib-San V2 · revision 6 — content pages
   Blog, city pages and imported guides. Reads the brand tokens and the r5
   glass finish; adds only long-form reading styles, post cards and chips.
   --------------------------------------------------------------------------- */

.prose { max-width: var(--measure); margin-inline: auto; font-size: 1.075rem; line-height: 1.7; color: var(--ink-body); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.prose h3 { margin-top: 1.8em; font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem); }
.prose h4 { margin-top: 1.5em; font-size: 1.1rem; }
.prose ul:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)), .prose ol:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)) { padding-left: 1.3rem; }
.prose li:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)) + li { margin-top: .35em; }
.prose a:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)) { color: var(--ink-page); text-decoration: underline; text-decoration-color: var(--secondary); text-underline-offset: .2em; text-decoration-thickness: 2px; }
.prose a:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)):hover { text-decoration-color: var(--accent); }
.prose img:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)) { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin-block: 1.5rem; box-shadow: var(--hg-shadow-lt, none); }
.prose figure:where(:not(:is(.post__tags, .post__faq, .post__related, .embed), :is(.post__tags, .post__faq, .post__related, .embed) *)) { margin: 1.5rem 0; }
.prose figure.town-project img { margin: 0; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 100%; } /* town page project photo: caption sits under the photo, 3:2 trimmed from the sky (Karen r30) */
.prose figure.town-project--whole img { aspect-ratio: 2400 / 1418; height: auto; } /* r34b (Karen r34 fix 1): Vaughan photo at its own shape (2400x1418), nothing cropped (both fire bowls whole); a set ratio, not auto, because sizes=auto images get size containment */
.prose figcaption { font-size: .9rem; color: var(--ink-muted); margin-top: .5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--hairline); padding: .6rem .75rem; text-align: left; vertical-align: top; }
@media (max-width: 40rem) {
  /* 3-column comparison tables: keep columns readable and let the table scroll sideways */
  .prose table { font-size: .9rem; -webkit-overflow-scrolling: touch; box-shadow: inset -12px 0 10px -10px rgba(0,0,0,.18); }
  .prose td, .prose th { min-width: 9.5rem; }
  .prose td p { margin: 0; }
}
/* imported tables have no <thead>, so their first row is the header; a table with a real <thead> shades only that */
.prose th, .prose table:not(:has(thead)) tr:first-child td { background: var(--paper-recessed); font-weight: 600; }
/* Karen r24 fix 1: on phones, tables of 3 or more columns become one card per row with the
   column name above each value (data-label written at build), so nothing sits off screen. */
@media (max-width: 40rem) {
  .prose table[data-stack] { display: block; overflow: visible; box-shadow: none; font-size: .95rem; }
  .prose table[data-stack] thead { display: none; }
  .prose table[data-stack] tbody, .prose table[data-stack] tr, .prose table[data-stack] td { display: block; width: 100%; min-width: 0; }
  .prose table[data-stack] tr { padding: .9rem 1rem; border: 1px solid var(--hairline); border-top-width: 0; background: transparent; }
  .prose table[data-stack] tr:first-child { border-top-width: 1px; }
  .prose table[data-stack] td { border: 0; padding: .2rem 0; background: transparent; font-weight: 400; }
  .prose table[data-stack] td:first-child { font-weight: 600; font-size: 1.02rem; padding-bottom: .35rem; }
  .prose table[data-stack] td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-top: .35rem;
    font-size: .72rem; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--ink-muted); }
}
/* quotes: the site's own treatment from site.css (gold top rule with a deeper 34% segment, no side stripe);
   only the size is carried onto bare quote text, which the editor writes without a <p> */
.prose blockquote { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.4; color: var(--ink-page); }

/* ch follows font size: 68ch at .95rem is narrower than .prose's 68ch at 1.075rem, which centred the
   meta 42px to the right of the text. Scaling the measure by 1.075/.95 gives the same box, one left edge. */
.post__meta { max-width: calc(var(--measure) * 1.075 / .95); margin: 0 auto 1rem; color: var(--ink-muted); font-size: .95rem; }
.post__meta a { color: inherit; }
.post__hero { max-width: var(--measure); font-size: 1.075rem; margin: 0 auto 2rem; } /* same 68ch box as .prose: one left edge */
.post__hero img { width: 100%; height: auto; border-radius: var(--radius-lg, var(--radius)); display: block; }
/* "In short" card (AI-visibility, Nov 6 2026; Karen fix 1): the same 68ch box as .prose and the photo, one left edge */
.post__answer { max-width: var(--measure); font-size: 1.075rem; margin: 0 auto 2rem; box-sizing: border-box; }

/* Quick facts page (AI-visibility, Nov 6 2026; Karen fixes 4 and 5): thumb-sized links, towns in columns */
.facts .facts__locations li { margin-bottom: 1.25rem; }
.facts .facts__locations a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.facts .facts__towns { columns: 2; column-gap: 2rem; }
.facts .facts__towns li { break-inside: avoid; }
.facts .facts__towns a, .facts .facts__services a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 64rem) { .facts .facts__towns { columns: 3; } }
.post > p:last-child { max-width: var(--measure); margin: 2rem auto 0; }

.post-nav { max-width: var(--measure); margin: 3rem auto 0; display: grid; gap: 1rem; }
@media (min-width: 40rem) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--hairline); border-radius: var(--radius); color: var(--ink-page); text-decoration: none; background: var(--paper); }
.post-nav a:hover { border-color: var(--ink-700); }
.post-nav small { display: block; text-transform: uppercase; letter-spacing: var(--track-eyebrow); font-size: .72rem; color: var(--ink-muted); margin-bottom: .25rem; }

/* Blog extras added by the /admin blog (backend/cms/blog.php): topics, questions, keep reading, video.
   They sit inside .prose, so the generic .prose element rules above (lists, links, images, figures) carry
   :where(:not(<component>, <component> *)) and skip them: each component styles itself, with no fight
   (Karen r2 gate note, C-S31). :where keeps the generic rules at their old specificity. */
.post__tags { list-style: none; padding: 0; margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.post__tags li { margin: 0; padding: .3rem .8rem; border: 1px solid var(--hairline); border-radius: var(--radius-pill, 999px); font-size: .85rem; color: var(--ink-muted); background: var(--paper); }
.post__faq { margin-top: 3rem; }
.post__faq .bx-faq__list { margin-top: 1rem; }
.post__faq .faq__a p { margin: 0 0 1rem; }
.post__related { margin-top: 3rem; } /* no top rule: the heading separates it, and after the questions a rule doubled their last line */
.post__related ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .75rem; }
.post__related li { margin: 0; }
.post__related a { display: block; padding: .9rem 1.1rem; min-height: 44px; border: 1px solid var(--hairline); border-radius: var(--radius); text-decoration: none; background: var(--paper); }
.post__related a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; transition: border-color .2s ease, background-color .2s ease; }
.post__related a::after { content: "\2192"; flex: none; color: var(--ink-muted); transition: transform .2s ease; }
.post__related a:hover { border-color: var(--ink-700); }
.post__related a:hover::after { transform: translateX(3px); }
.prose .post__related h2 { margin: 0; }
/* site.css caps every li at the reading measure; the component's own lists are full width */
.post__tags li, .post__related ul, .post__related li { max-width: none; }
@media (prefers-reduced-motion: reduce) { .post__related a, .post__related a::after { transition: none; } }
.prose .embed { margin: 2rem 0; }
.prose .embed__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--paper-recessed); }
.prose .embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); margin-top: 1.75rem; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); }
.post-card__link { color: inherit; text-decoration: none; display: block; }
.post-card__link:focus-visible { outline: 3px solid var(--secondary); outline-offset: 4px; }
.post-card img { width: calc(100% + 2 * clamp(1.35rem, 1rem + 1.2vw, 1.85rem)); max-width: none; height: 12rem; object-fit: cover;
  margin: calc(-1 * clamp(1.35rem, 1rem + 1.2vw, 1.85rem)) calc(-1 * clamp(1.35rem, 1rem + 1.2vw, 1.85rem)) 1rem; display: block; }
.post-card__meta { font-size: .82rem; color: var(--ink-muted); margin-bottom: .35rem; }
.post-card h3 { font-size: 1.15rem; line-height: 1.3; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; padding: .45rem .95rem; border: 1px solid var(--hairline); border-radius: var(--radius-pill, 999px);
  color: var(--ink-page); text-decoration: none; font-size: .92rem; background: var(--paper); min-height: 44px; line-height: 1.9; }
.chip:hover { border-color: var(--ink-700); }
.chip.is-on { background: var(--ink-page); color: var(--paper); border-color: var(--ink-page); }

.prose-cta { text-align: center; }
.prose-cta .btn-row { justify-content: center; }

.form-sent { border-left: 3px solid var(--secondary); padding-left: 1rem; }

/* Honeypot. Kept out of the viewport rather than display:none, because some
   bots skip fields that are display:none. aria-hidden + tabindex="-1" in the
   markup keep it away from screen readers and keyboard users. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Utility classes replacing the build's last inline style= attributes.
 * `style-src 'self'` blocks inline styles exactly as `script-src` blocks
 * inline scripts, and the browser check caught nine of them that the static
 * scan did not. Keeping them as classes means the CSP needs no
 * 'unsafe-inline' and no per-attribute hashes. Applied by enforce_csp(). */
.u-m0 { margin: 0; }
.u-mt-lg { margin-top: 2rem; }
.u-mt-md { margin: 1.5rem 0 0; }
.u-cols-1 { grid-template-columns: 1fr; }

/* Approved privacy line under the submit button. Normal body size by
   instruction (Sylvia, 28 Sep 2026): this tells a visitor their details are
   sent and that a code derived from their address is kept, so it is not
   fine print and must not be set smaller than the text around it.
   1.0625rem matches the body rule in site.css. */
.form-privacy {
  margin: 0.85rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-body);
  max-width: 46ch;
}
/* Failed send. The neutral .form-sent rule reads as ordinary progress, which
 * is wrong for a message whose whole job is "this did NOT reach us, phone
 * instead". Warm red border and a tinted panel so it is not mistaken for the
 * success state at a glance. Colour is not the only signal: the text itself
 * leads with "was not sent". */
.form-sent--failed {
  border-left-color: #b23c17;
  background: #fff5f0;
  padding: 0.85rem 1rem;
}
.form-sent--failed a {
  font-weight: 700;
  white-space: nowrap;
}
.form-sent--failed:focus { outline: 2px solid #b23c17; outline-offset: 2px; }

/* ===================================================== photo hero treatment
 * Jacky, 28 Sep 2026, on need-a-pool: "this card is way too blocky and we want
 * the picture to not be faded."
 *
 * Applied to every .hero--photo page so the site stays consistent, not just
 * the one page he was looking at. The five pages with a photo hero are
 * need-a-pool, pools, have-a-pool, store and index. The other six heroes are
 * .hero--tint: they have NO photograph at all (just a caustic pattern on a
 * dark field), so there is no fade to remove and nothing here touches them.
 *
 * content.css is the last stylesheet loaded, so these override site.css and
 * glass.css without editing either of the generated v6 files.
 *
 * What changed, and why each part is needed:
 *   1. The photo carried `filter: brightness(.52)` — it was rendered at just
 *      over half brightness. That is the fade. Removed, along with the 1.04
 *      scale-up that softened it further.
 *   2. A .hero__scrim span painted a full-bleed dark gradient over the whole
 *      image. That is the page-wide wash. Removed on photo heroes.
 *   3. The dark pane covered ~50% of the hero on desktop and 76% on a phone.
 *      It is now a compact panel tucked bottom-left, with a soft local
 *      gradient behind it only, so the backyard is the thing you see.
 * ------------------------------------------------------------------------ */

/* 1 + 2. Full-strength photograph. No filter, no opacity, no wash. */
.hero--photo .hero__field img {
  filter: none;
  transform: none;
}
.hero--photo .hero__scrim {
  display: none;
}

/* A soft gradient ONLY along the bottom-left, behind where the panel sits.
 * This is not a wash over the photo: it fades to fully transparent well
 * before the middle of the frame, so the image reads at full strength
 * everywhere else. It stops the panel's edge from cutting a hard rectangle
 * out of the picture, which is the "blocky" part of Jacky's note.
 */
.hero--photo .hero__field::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top right,
    rgba(23, 20, 21, 0.55) 0%,
    rgba(23, 20, 21, 0.28) 26%,
    rgba(23, 20, 21, 0) 52%);
}

/* 3. Compact panel, tucked to the bottom-left. */
.hero--photo .hero__inner {
  display: flex;
  justify-content: flex-start;
}
.hero--photo .pane--photo.pane--hero,
.home-v2 .hero--photo .pane--photo.pane--hero {
  max-width: 34rem;
  padding: clamp(1rem, 0.8rem + 0.9vw, 1.5rem) clamp(1.1rem, 0.85rem + 1vw, 1.65rem);
  /* Tint lives behind the TEXT only, never across the photo. Measured against
   * a fully white pixel underneath: white text clears 6:1 at this tint, so it
   * holds AA even where the photograph blows out to highlight. */
  background: rgba(23, 20, 21, 0.66);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -24px rgba(23, 20, 21, 0.6);
}
/* The home page plate carried a heavier shadow, a lit rim and its own
 * brightness filter. Bring it in line with the rest rather than leaving one
 * hero styled differently from the other four. */
.home-v2 .hero--photo .hero__field img {
  filter: none;
}
.home-v2 .hero--photo .hero__scrim {
  display: none;
}
.home-v2 .hero--photo .pane--photo.pane--hero::before {
  display: none;
}

/* Tighter measures so the panel stays compact rather than running the full
 * width of its max-width at every viewport. 20ch keeps a headline like
 * "From An Empty Lawn To A Finished Backyard" to three lines; at 16ch it
 * broke to four and made the panel taller than the copy needed. */
.hero--photo .pane--hero h1 {
  max-width: 20ch;
  margin-bottom: 0.3em;
}
.hero--photo .pane--hero .lede {
  max-width: 40ch;
  margin-bottom: 0.9em;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero--photo .pane--photo.pane--hero,
  .home-v2 .hero--photo .pane--photo.pane--hero {
    background: rgba(23, 20, 21, 0.58);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
  }
}

/* 4. Phone: the card must not cover the photo at all.
 *
 * Below 40em the hero stops being a stack and becomes two blocks: the
 * photograph, then the text underneath it on paper. Nothing overlaps, so the
 * whole image is visible, and the copy is dark ink on the page background
 * where contrast is not in question. 40em ≈ 640px, comfortably above the
 * 390px Sylvia asked me to check.
 */
@media (max-width: 40em) {
  .hero--photo {
    display: block;
    padding-block: 0;
    overflow: visible;
  }
  .hero--photo .hero__field {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    height: auto;
    /* 3:2, not 4:3. The page carries a fixed "Pool care help" button and a
     * fixed Call / Get A Quote bar along the bottom of the viewport on a
     * phone. A taller photo pushes the lede down underneath that bar at
     * first paint, so the first thing a visitor reads is half-covered. */
    aspect-ratio: 3 / 2;
  }
  /* No gradient needed once nothing sits on top of the photo. */
  .hero--photo .hero__field::after {
    display: none;
  }
  .hero--photo .hero__inner {
    display: block;
    padding-block: 1.3rem 1.5rem;
  }
  .hero--photo .pane--photo.pane--hero,
  .home-v2 .hero--photo .pane--photo.pane--hero {
    max-width: none;
    padding-inline: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    box-shadow: none;
    color: var(--ink-body);
  }
  .hero--photo .pane--photo.pane--hero h1,
  .hero--photo .pane--photo.pane--hero h2 {
    color: var(--ink-page);
  }
  .hero--photo .pane--photo.pane--hero .lede,
  .hero--photo .pane--photo.pane--hero .form__note,
  .hero--photo .pane--photo.pane--hero .hint {
    color: var(--ink-body);
  }
  .hero--photo .pane--photo.pane--hero .eyebrow {
    color: var(--ink-muted);
  }
  .hero--photo .pane--photo.pane--hero a:not(.btn) {
    color: var(--ink-page);
  }
  /* The outline button reads white over a photo; on paper it needs ink. */
  .hero--photo .pane--photo.pane--hero .btn--outline {
    color: var(--ink-page);
    border-color: var(--ink-page);
  }
  .hero--photo .pane--hero h1 { max-width: none; }
  .hero--photo .pane--hero .lede { max-width: none; }
}

/* Investment guide: title on one line on wide screens, tighter rhythm, step numbers beside their titles */
.hero:has(+ .section .guide-flow) .pane--hero h1 { max-width: none; }
.prose .guide-flow h2 { margin: 1.6em 0 .5em; }
.prose .guide-flow h3 { margin: 1.4em 0 .4em; }
.prose .guide-flow > :first-child { margin-top: 0; }
.prose .guide-flow > img { width: 100%; max-height: 34rem; object-fit: cover; margin-block: .75rem; }
.prose .guide-flow > a:has(> img) { display: block; margin-block: .75rem; }
.prose .guide-flow > img + h3, .prose .guide-flow > a:has(> img) + h3 { margin-top: .6em; }
.prose .guide-flow > p + a, .prose .guide-flow > h3 + a { display: inline-block; margin-top: .25rem; }
.prose .guide-flow h3.guide-step { display: flex; align-items: baseline; gap: .7em; margin-top: 1.2em; }
.guide-step__num { flex: none; display: inline-grid; place-items: center; width: 2em; height: 2em; border: 1px solid var(--lx-gold, #c79a5b); border-radius: 50%; font-size: .8em; line-height: 1; transform: translateY(-.1em); }

/* SEO audit finding 6 (Oct 30 2026): the link to the FAQ page under a page's questions.
   Clear of the cards above it, and a thumb-sized tap target (44px). */
.faq-more { margin-top: 1.25rem; }
.faq-more a { display: inline-block; padding: 10px 0; }

/* video: the player covers the fallback link once it has loaded */
.prose .embed__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-muted); font-size: .95rem; text-decoration: underline; text-underline-offset: .2em; }
.prose .embed__frame iframe { z-index: 1; }
