/*
  posts.css: page key "posts" (the blog, category archives, other post archives and single posts), ported from the site
  concept v3: the Field Guides hub (fg-) and the shared post system, post cards (pc-) and single post views (pv-), from
  parts/pages/field-guides.css; the News & Events hub (ne-) from parts/pages/news-events.css.
  Register: Modern Professional, inherited from the approved homepage: light ground, restrained orange, Clash Display
  heads. Signature: the survey line, once per post, as reading progress under the nav. Reading copy never animates; only
  media and secondary blocks reveal (.rv).

  WordPress additions close the file: the plain archive head (pa-), pagination, and the post body's core blocks. Single
  posts still load the block library CSS (printed in the head, before this file); where it overlaps the concept, the
  rules here win by order or, against core's :not(#individual-image) gallery rules, by matching that id-level weight.
*/

/* ---------- Field Guides hub ---------- */
.fg-head h1 { max-width: none; }
.fg-head .fg-line { display: block; }
.fg-head .fg-muted { color: var(--muted); }
.fg-sec { padding-top: 8px; }

/* More guides: a quiet designed state, not a blank */
.fg-soon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; margin-top: 24px; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--tint); }
.fg-soon .ico { width: 48px; height: 48px; border-radius: var(--radius); display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(11, 31, 58, 0.06); }
.fg-soon h2 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.fg-soon p { margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* Cross-link row */
.fg-cross { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; margin-top: 56px; padding-block: 18px; border-block: 1px solid var(--line); }
.fg-cross-q { font-size: 17px; color: var(--ink); transition: color var(--t-fast) var(--ease); }
.fg-cross:hover .fg-cross-q { color: var(--brand); }

/* ---------- News & Events hub: the H1 and the next stop (an honest state: nothing is announced yet) ---------- */
.ne-head .ph-grid { align-items: end; }
.ne-next { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: center; justify-self: end; width: 100%; max-width: 460px; padding: 22px 24px; border-radius: var(--radius-lg); background: var(--tint); border: 1.5px dashed color-mix(in srgb, var(--muted) 38%, transparent); }
.ne-next .ico { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(11, 31, 58, 0.06); }
.ne-next-k { font: 500 12px/1.2 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.ne-next-line { margin-top: 6px; font: 600 17px/1.3 var(--font-display); letter-spacing: -0.005em; color: var(--ink); }
.ne-next .btn { grid-column: 2; justify-self: start; }

/* The archive and the quiet cross-link to Field Guides */
.ne-sec { padding-top: 8px; padding-bottom: 0; }
.ne-cross { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 56px; padding-block: 18px; border-block: 1px solid var(--line); }
.ne-cross-q { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; color: var(--ink); transition: color var(--t-fast) var(--ease); }
.ne-cross-q svg { flex: none; width: 20px; height: 20px; color: var(--brand); }
.ne-cross .pcta { font-size: 18px; }
.ne-cross:hover .ne-cross-q { color: var(--brand); }

/* Close */
.ne-close { padding-top: clamp(72px, 7.5vw, 104px); }
.ne-cta { padding: clamp(32px, 4vw, 52px) clamp(28px, 4.6vw, 60px); }
.ne-cta h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }

/* ---------- Post cards (template-parts/post-card.php): one whole-card link, the image in a rounded inner frame ---------- */
.pc-archive { display: grid; gap: 24px; }
.pc-empty { padding: 28px 0; color: var(--muted); }
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pc { display: flex; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
.pc:hover, .pc:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: transparent; }
.pc-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: calc(var(--radius-lg) - 6px); background: var(--tint); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.pc:hover .pc-media img, .pc:focus-visible .pc-media img { transform: scale(1.04); }
/* A post without a featured image: a navy tile carrying the Londa logo in the card's 16:10 frame, so the card keeps the
   grid's shape; the logo answers the hand the way a photo does */
.pc-media--logo { display: grid; place-items: center; color: var(--on-brand); background: radial-gradient(120% 110% at 85% 0%, var(--brand-glow) 0%, var(--brand) 48%, var(--brand-deep) 100%); }
.pc-media--logo svg { width: 44%; height: auto; transition: transform 600ms var(--ease); }
.pc:hover .pc-media--logo svg, .pc:focus-visible .pc-media--logo svg { transform: scale(1.04); }
.pc-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; gap: 10px; padding: 18px 12px 6px; }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 500 12px/1.3 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pc-cat { color: var(--accent-ink); }
.pc-date { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.pc-date::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.7; }
.pc-date:first-child::before { content: none; }
.pc-title { font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.pc-ex { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.pc .pcta { margin-top: auto; }
.pc:hover .arr, .pc:focus-visible .arr { transform: translateX(4px); }

/* ---------- Single post (single.php): reading measure, wide hero, the survey line as reading progress ---------- */
.pv-col { max-width: 680px; margin-inline: auto; }
.wrap.pv-wide { max-width: calc(1040px + 2 * var(--gutter)); }
.pv-head { padding-bottom: clamp(36px, 4vw, 52px); }
/* One-line breadcrumb: the post title truncates (screen readers still get it whole) */
.pv-head .crumbs { flex-wrap: nowrap; align-items: center; }
/* A 44px touch target with the kit's visual spacing (13px padding less 9px margin = the kit's 4px) */
.pv-head .crumbs > a { flex: none; padding-block: 13px; margin-block: -9px; }
.pv-head .crumbs > span[aria-current] { flex: 1 1 0; min-width: 0; padding-block: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-head h1 { max-width: none; font-size: clamp(2.25rem, 4vw, 3.35rem); line-height: 1.05; }
.pv-head .pv-stand { max-width: none; margin-top: 20px; font-size: clamp(18px, 1.45vw, 20.5px); }
.pv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font: 500 14px/1.2 var(--font-sub); letter-spacing: 0.02em; color: var(--muted); }
.pv-meta time { font-variant-numeric: tabular-nums; }
.pv-by { color: var(--ink); }
.pv-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.pv-rt { display: inline-flex; align-items: center; gap: 7px; }
.pv-rt svg { width: 16px; height: 16px; }

/* The featured image, wide and rounded; it settles from a slight zoom as it reveals */
.pv-hero { margin: 0; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--tint); }
.pv-hero img { width: 100%; height: 100%; object-fit: cover; }
.motion .pv-hero.rv img { transform: scale(1.04); transition: transform var(--t-slow) var(--ease); }
.motion .pv-hero.rv.in img { transform: none; }

/* The body: prose rules apply to the post's own top-level blocks only, so cards inside a post keep their kit styles */
.pv-body-sec { padding-top: clamp(44px, 5.5vw, 72px); }
/* A post with no featured image: the head's own bottom padding already separates the meta line from the body */
.pv-head + .pv-body-sec { padding-top: 4px; }
.pv-body > p, .pv-body > ul, .pv-body > ol { font-size: clamp(17.5px, 1.3vw, 19px); line-height: 1.75; color: var(--ink); text-wrap: pretty; }
.pv-body > * + * { margin-top: 1.15em; }
.pv-body > h2 { margin: clamp(52px, 5.5vw, 72px) 0 20px; font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -0.015em; }
.pv-body > h3 { margin: 40px 0 12px; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.pv-body > h2 + *, .pv-body > h3 + * { margin-top: 0; }
.pv-body > ul { list-style: disc; padding-left: 1.3em; }
.pv-body > ol { list-style: decimal; padding-left: 1.4em; }
.pv-body > ul > li + li, .pv-body > ol > li + li { margin-top: 0.45em; }
.pv-body > ul > li::marker, .pv-body > ol > li::marker { color: var(--accent-ink); }
.pv-body > p a, .pv-body > ul a, .pv-body > ol a { color: var(--brand); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color var(--t-fast) var(--ease); }
.pv-body > p a:hover, .pv-body > ul a:hover, .pv-body > ol a:hover { color: var(--accent-ink); }
/* Icons inside prose sit in the line (the kit sets svg to block) */
.pv-body > p svg, .pv-body > ul svg, .pv-body > ol svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; }
.pv-body > p .ico, .pv-body > ul .ico, .pv-body > ol .ico { display: inline; }
.pv-body > figure, .pv-body > .pv-gallery, .pv-body > .pv-scroll, .pv-body > .alignwide { margin-top: clamp(32px, 4vw, 44px); }
.pv-body > figure + *, .pv-body > .pv-gallery + *, .pv-body > .alignwide + * { margin-top: clamp(32px, 4vw, 44px); }
.pv-body figure > img, .pv-body figure > a.zoomable { border-radius: var(--radius-lg); }
.pv-body a.zoomable { overflow: hidden; border-radius: var(--radius-lg); }
.pv-body a.zoomable img { width: 100%; }
/* Wide blocks (WordPress .alignwide): break out of the reading measure to the 1040 frame */
.pv-body > .alignwide { --w: min(1040px, 100vw - 2 * var(--gutter)); width: var(--w); max-width: none; margin-left: calc(50% - var(--w) / 2); margin-right: 0; }
/* Galleries: a grid of figures, three across (two on phones) */
.pv-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
.pv-gallery figure { margin: 0; }

/* Spec tables in a post: a thead of names that sticks just below the reading line */
.pv-body > .pv-src { margin-top: 0; margin-bottom: 12px; font: 500 12px/1.3 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pv-body > .pv-src + .pv-scroll { margin-top: 0; }
.pv-body .spec-table { font-size: 15px; }
.pv-body .spec-table thead th { top: calc(74px + var(--wp-bar)); padding-block: 14px; }
.pv-body .spec-table thead th:not(:first-child) { color: var(--brand); }
.pv-compare { table-layout: fixed; }
.pv-compare thead th:first-child, .pv-compare tbody th { width: 24%; }
.pv-scroll:focus-visible { outline-offset: 4px; }

/* A related block inside a post (e.g. "Both are on the counter"): two compact counter cards */
.pv-body > .pv-aside { margin-top: clamp(64px, 7vw, 96px); }
.pv-aside > h2 { margin-bottom: 24px; font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -0.015em; }
.pv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pv-card .atile img { width: 70%; height: 82%; filter: drop-shadow(0 10px 12px rgba(11, 31, 58, 0.14)); }
.pv-card .pcta { margin-top: 8px; }

/* Inside the News posts: the when-and-where line that opens an event post, quiet small caps, not a heading */
.pv-body > .ne-when { font: 500 13px/1.45 var(--font-sub); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pv-body > .ne-when + p { margin-top: 14px; }

/* After the post: the end block, more from the same archive, the way back */
.pv-next { padding-top: clamp(64px, 7vw, 96px); }
.pv-end h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.pv-more { margin-top: clamp(64px, 7vw, 96px); }
.pv-more > h2 { margin-bottom: 24px; font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -0.015em; }
.pv-back { margin-top: 44px; gap: 10px; }
.pv-back:hover .arr { transform: translateX(-4px); }

/* The survey line as reading progress: it replaces the nav's bottom rule; the beacon rides the seam */
.pv-progress { position: fixed; top: calc(72px + var(--wp-bar)); left: 0; right: 0; height: 2px; z-index: 51; pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.pv-progress.is-on { opacity: 1; }
.pv-progress .sline-track { background: var(--line); }
.pv-progress > .beacon { width: 26px; height: 26px; margin: -13px 0 0 -13px; left: calc(13px + var(--p) * (100% - 26px)); }
.pv-progress .beacon svg { width: 16px; height: 16px; }
.nav.menu-open ~ main .pv-progress { visibility: hidden; }

/* ======================================================================
   WordPress additions
   ====================================================================== */

/* Plain archive head (the blog, other categories, tags, search) and its section */
.pa-head h1 { max-width: 22ch; }
.pa-sec { padding-top: 8px; }
.pa-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

/* Pages, when an archive has more than one */
.pc-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pc-pages .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 15px/1 var(--font-sub); color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.pc-pages a.page-numbers:hover { border-color: var(--muted); transform: translateY(-1px); }
.pc-pages .page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.pc-pages .page-numbers.dots { border-color: transparent; background: none; min-width: 24px; padding: 0; }

/* Post body: core image blocks. The image link (the lightbox opens it) fills the measure; captions take the kit style */
.pv-body .wp-block-image > a { display: block; overflow: hidden; border-radius: var(--radius-lg); }
.pv-body .wp-block-image > a img, .pv-body .wp-block-image > img { width: 100%; height: auto; }
.pv-body .wp-block-image > img { border-radius: var(--radius-lg); }
.pv-body .wp-block-image figcaption { margin: 12px 0 0; }

/* Post body: the concept gallery (.pv-gallery on a core gallery block). Core lays nested images out as flex items with
   a computed width and overlays the caption on the photo; here they are grid cells with the caption below. */
.pv-body .wp-block-gallery.pv-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; align-items: start; }
.pv-body .wp-block-gallery.pv-gallery figure.wp-block-image:not(#pv-gallery-item) { display: block; width: auto; margin: 0; }
.pv-body .wp-block-gallery.pv-gallery figure.wp-block-image::before { content: none; }
.pv-body .wp-block-gallery.pv-gallery figure.wp-block-image:not(#pv-gallery-item) > a { display: block; overflow: hidden; border-radius: var(--radius-lg); background: var(--brand); }
.pv-body .wp-block-gallery.pv-gallery figure.wp-block-image:not(#pv-gallery-item) img { display: block; width: 100%; height: auto; flex: none; object-fit: cover; }
/* The ERB photo story: portrait frames, as the concept's .frame.portrait */
.pv-body .wp-block-gallery.pv-gallery figure.erb-shot:not(#pv-gallery-item) > a { aspect-ratio: 9 / 16; }
.pv-body .wp-block-gallery.pv-gallery figure.erb-shot:not(#pv-gallery-item) img { height: 100%; }
.pv-body .wp-block-gallery.pv-gallery figure.wp-block-image figcaption { position: static; flex: none; max-height: none; overflow: visible; margin: 12px 0 0; padding: 0; background: none; color: var(--muted); text-shadow: none; text-align: left; font-size: 14px; line-height: 1.5; will-change: auto; scrollbar-gutter: auto; }
/* Three across: six half-columns with each photo spanning two (same photo size), so a short last row of one or two
   photos sits centred instead of leaving an empty corner. Two across on phones (max-width: 700px below) is unchanged. */
@media (min-width: 701px) {
  .pv-body .wp-block-gallery.pv-gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pv-body .wp-block-gallery.pv-gallery > figure.wp-block-image { grid-column: span 2; }
  .pv-body .wp-block-gallery.pv-gallery > figure.wp-block-image:nth-of-type(3n+1):nth-last-of-type(2) { grid-column: 2 / span 2; }
  .pv-body .wp-block-gallery.pv-gallery > figure.wp-block-image:nth-of-type(3n+1):last-of-type { grid-column: 3 / span 2; }
}

/* Post body: a closing quote box written in the editor carries no ring markup; the rings are drawn here instead */
.pv-body .cta-box:not(:has(> .cta-rings))::before { content: ""; position: absolute; right: -80px; bottom: -120px; width: 380px; height: 380px; pointer-events: none; opacity: 0.5; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 380' fill='none' stroke='rgba(159,176,200,0.22)'%3E%3Ccircle cx='190' cy='190' r='70'/%3E%3Ccircle cx='190' cy='190' r='120'/%3E%3Ccircle cx='190' cy='190' r='170'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Post body: a WhatsApp button written in the editor carries no icon; the house glyph is drawn here instead */
.pv-body .btn-wa:not(:has(svg))::before { content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3a9 9 0 0 0-7.8 13.5L3 21l4.7-1.2A9 9 0 1 0 12 3Z' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='M8.8 8.6c.2-.5.4-.5.6-.5h.5c.2 0 .4 0 .5.4l.7 1.6c.1.2 0 .4-.1.5l-.4.5c-.1.2-.2.3 0 .6a7 7 0 0 0 2.9 2.7c.3.1.4.1.6-.1l.6-.7c.2-.2.3-.2.5-.1l1.6.8c.3.1.3.3.3.5-.1.5-.6 1.3-1.3 1.5-.6.2-1.3.2-2.2-.2a10 10 0 0 1-4.5-3.9c-.7-1-1-2-.8-2.7.1-.5.3-.8.5-.9Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3a9 9 0 0 0-7.8 13.5L3 21l4.7-1.2A9 9 0 1 0 12 3Z' stroke='%23000' stroke-width='1.7'/%3E%3Cpath d='M8.8 8.6c.2-.5.4-.5.6-.5h.5c.2 0 .4 0 .5.4l.7 1.6c.1.2 0 .4-.1.5l-.4.5c-.1.2-.2.3 0 .6a7 7 0 0 0 2.9 2.7c.3.1.4.1.6-.1l.6-.7c.2-.2.3-.2.5-.1l1.6.8c.3.1.3.3.3.5-.1.5-.6 1.3-1.3 1.5-.6.2-1.3.2-2.2-.2a10 10 0 0 1-4.5-3.9c-.7-1-1-2-.8-2.7.1-.5.3-.8.5-.9Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat; }
.pv-body .btn-ghost.btn-wa:not(:has(svg))::before { background: #FFFFFF; }
.pv-body .btn-ghost-dark.btn-wa:not(:has(svg))::before { background: #1E9E57; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .fg-soon { grid-template-columns: auto minmax(0, 1fr); }
  .fg-soon .btn { grid-column: 1 / -1; justify-self: start; }
  .pv-cards { grid-template-columns: minmax(0, 1fr); }
  .ne-next { justify-self: stretch; max-width: none; grid-template-columns: 44px minmax(0, 1fr) auto; }
  .ne-next .btn { grid-column: auto; }
}
@media (max-width: 700px) {
  .pv-gallery, .pv-body .wp-block-gallery.pv-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* A table scrolls inside its own box, edge to edge; the row labels stay put */
  .pv-scroll { overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overscroll-behavior-x: contain; }
  .pv-compare { min-width: 490px; }
  .pv-body .spec-table thead th { top: auto; }
  .pv-scroll .spec-table tbody th, .pv-scroll .spec-table thead th:first-child { position: sticky; left: calc(-1 * var(--gutter)); z-index: 1; background: var(--surface); }
  .pv-scroll .spec-table thead th:first-child { z-index: 3; }
  .pv-scroll .spec-table tbody tr:nth-child(odd) th { background: var(--tint); }
}
@media (max-width: 600px) {
  .pc-grid { grid-template-columns: minmax(0, 1fr); }
  .fg-soon { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pv-meta { font-size: 13.5px; }
  .pv-end .cta-actions .btn { width: 100%; }
  .ne-next { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; }
  .ne-next .btn { grid-column: 1 / -1; justify-self: stretch; }
  .ne-cross { margin-top: 44px; }
  .ne-cross-q { font-size: 16px; }
}
