/* ==========================================================================
   aggelakakis.gr — flat layer (0.5.0).

   Sits on top of site.css. The owner asked for flat, minimal and modern
   (2026-11-17), so this layer replaces the 0.3 "depth" look:
   - no gradients, no blurred blobs, no glow, no grid overlays;
   - surfaces are solid colour; edges are one 1px hairline (--agk-line);
   - one frame per idea: a panel inside a panel gives up its frame (see "Frames");
   - one vertical rhythm between sections, everywhere;
   - motion stays quiet: content fades up once, clickable things respond.
   ========================================================================== */

:root {
  --agk-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --agk-gap-section: clamp(64px, 7.5vw, 112px);
}

/* ------------------------------------------------------------- header ---- */

.site-header { transition: box-shadow 250ms var(--ease); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--agk-line); }

/* Reading progress on articles: a 2px brick line under the header. */
.agk-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brick);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ------------------------------------------------------------ rhythm ---- */

/* Every section sits the same distance from the one before it. */
.entry-content--canvas > .agk-sec + .agk-sec { margin-top: var(--agk-gap-section); }
.entry-content--canvas > :last-child { margin-bottom: var(--agk-gap-section); }

/* --------------------------------------------------------------- hero ---- */

.agk-hero__grid { display: none; }

/* Inner pages: the hero text runs the full width of the panel. */
body:not(.home) .agk-hero h1,
body:not(.home) .agk-hero p:not(.agk-kicker) { max-width: none; }
.hero--page .hero__shell { background: var(--brand); box-shadow: none; }
.hero--page .hero__shell :is(.blob, .glow) { display: none; }

/* The hero's own content arrives on load, in reading order. */
@keyframes agkRise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
.agk-hero > *,
.agk-hero > .wp-block-columns > .wp-block-column > * {
  animation: agkRise 600ms var(--agk-ease-out) both;
}
.agk-hero > :nth-child(2), .agk-hero .wp-block-column > :nth-child(2) { animation-delay: 70ms; }
.agk-hero > :nth-child(3), .agk-hero .wp-block-column > :nth-child(3) { animation-delay: 140ms; }
.agk-hero > :nth-child(n+4), .agk-hero .wp-block-column > :nth-child(n+4) { animation-delay: 210ms; }
.agk-hero > .wp-block-columns { animation: none; }

/* ------------------------------------------------------------ frames ---- */

/* 1. A section that holds a single panel IS that panel: the section drops its own
      grey frame and the panel is the one frame (India on the home page). */
.entry-content--canvas .agk-sec:has(> .agk-panel:only-child) {
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

/* 2. A light panel that opens a light panel (its intro) gives up its frame and keeps its text. */
.entry-content--canvas :is(.agk-panel--card, .agk-panel--surface) > :is(.agk-panel--card, .agk-panel--surface):first-child {
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

/* 3. A panel that lists programmes (Funding Tools): no outer frame; the intro becomes the
      heading of a two-column grid of equal cards, each with its button at the bottom. */
.entry-content--canvas .agk-panel--card:has(> .agk-panel--surface) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-grid);
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.entry-content--canvas .agk-panel--card:has(> .agk-panel--surface) > * { margin: 0 !important; }
.entry-content--canvas .agk-panel--card:has(> .agk-panel--surface) > :not(.agk-panel--surface) { grid-column: 1 / -1; }
.entry-content--canvas .agk-panel--card:has(> .agk-panel--surface) > :first-child { max-width: 62rem; }
.entry-content--canvas .agk-panel--card > .agk-panel--surface {
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px var(--agk-line), inset 0 3px 0 var(--brick);
}
.entry-content--canvas .agk-panel--card > .agk-panel--surface > .wp-block-buttons { margin-top: auto; padding-top: 1.5em; }
@media (max-width: 781px) {
  .entry-content--canvas .agk-panel--card:has(> .agk-panel--surface) { grid-template-columns: 1fr; }
}
/* Two programme groups in a row (Funding Tools: Development Law, then ESPA) read as two groups. */
.entry-content--canvas :is(.agk-panel, .wp-block-columns, .wp-block-buttons) + .agk-panel--card:has(> .agk-panel--surface) {
  margin-top: clamp(40px, 4vw, 64px);
}
/* A sub-heading after a list, grid or card opens a new group: it gets air above it. */
.entry-content--canvas :is(ul, ol, .agk-panel, .wp-block-columns, .wp-block-table, .agk-table) + :is(h3, h4, h5, h6) { margin-top: 1.75em; }

/* A column that only frames a photo needs no hairline: the photo is the edge. */
.agk-panel:has(> .wp-block-image:only-child) { box-shadow: none; }

/* -------------------------------------------------------------- stats ---- */

.agk-stat { text-align: center; }
.entry-content--canvas .agk-stat .agk-stat__num {
  margin-top: 0.35em;
  color: var(--navy);
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.agk-stat h5 { color: var(--ink-muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.agk-stat::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin: 18px auto 0;
  background: var(--brick);
  transform: scaleX(0);
  transition: transform 600ms var(--agk-ease-out) 300ms;
}
.agk-stat.is-counted::after { transform: scaleX(1); }

/* ------------------------------------------------------------- kicker ---- */

.agk-kicker:not(.has-text-align-center) { display: flex; align-items: center; gap: 12px; }
.agk-kicker:not(.has-text-align-center)::before {
  content: "";
  width: 28px;
  height: 2px;
  flex: none;
  background: currentColor;
}

/* ---------------------------------------------------------------- FAQ ---- */

.wp-block-details {
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--agk-line);
  transition: box-shadow 250ms var(--ease);
}
.wp-block-details[open] { box-shadow: inset 0 0 0 1px var(--agk-line-strong); }

/* --------------------------------------------------------- post cards ---- */

.wp-block-latest-posts.agk-post-cards li {
  position: relative;
  box-shadow: none;
  transition: transform 250ms var(--agk-ease-out);
}
/* The hairline is drawn over the card, not under it: an inset shadow on the card itself is painted
   below its children, so a featured image (often a white logo on white) hid the frame around it. */
.wp-block-latest-posts.agk-post-cards li::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--agk-line);
  pointer-events: none;
  transition: box-shadow 250ms var(--ease);
}
.wp-block-latest-posts.agk-post-cards .wp-block-latest-posts__featured-image { border-bottom: 1px solid var(--agk-line); }
.wp-block-latest-posts.agk-post-cards li:not(:has(.wp-block-latest-posts__featured-image)) { padding-top: 28px; }
.wp-block-latest-posts.agk-post-cards .wp-block-latest-posts__featured-image img { transition: transform 600ms var(--agk-ease-out); }

/* ------------------------------------------------------- person cards ---- */

/* Photo on top, name, role, LinkedIn: the photo bleeds to the card edge and the
   name leads (Avada had the role larger than the name). */
.agk-panel--card:has(> .wp-block-image:first-child):has(> .agk-social) { overflow: hidden; }
.agk-panel--card:has(> .wp-block-image:first-child):has(> .agk-social) > .wp-block-image:first-child {
  margin: calc(-1 * var(--pad-card)) calc(-1 * var(--pad-card)) 22px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.agk-panel--card:has(> .wp-block-image:first-child):has(> .agk-social) > .wp-block-image:first-child img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 0;
}
.entry-content--canvas .agk-panel--card:has(> .agk-social) > h5 { font-size: 19px; line-height: 1.3; }
.agk-panel--card:has(> .agk-social) > .agk-lede { margin-top: 4px; color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.agk-panel--card:has(> .agk-social) > .agk-social { margin-top: 16px; }
.entry-content--canvas ul.agk-social { padding-left: 0; margin-left: 0; }
@media (min-width: 782px) {
  .wp-block-columns:has(> .wp-block-column > .agk-panel--card > .agk-social) { justify-content: flex-start; }
  .wp-block-columns:has(> .wp-block-column > .agk-panel--card > .agk-social) > .wp-block-column {
    flex: 0 0 calc((100% - 3 * var(--gap-grid)) / 4) !important;
  }
}

/* A card that holds one line only: centred in its height, with a brick tick. */
.agk-panel--card:has(> :only-child:is(h3, h4, h5, h6, p)) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 9.5rem;
}
.agk-panel--card:has(> :only-child:is(h3, h4, h5, h6, p))::before {
  content: "";
  width: 24px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--brick);
}

/* ------------------------------------------------------------ process ---- */

/* "Step 1: …" cards (motion.js marks them): a numbered rail down the left. */
.agk-step {
  position: relative;
  padding-left: calc(var(--pad-card) + 76px);
}
.agk-step::before {
  content: attr(data-step);
  position: absolute;
  left: var(--pad-card);
  top: var(--pad-card);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-base);
  background: var(--brand);
  color: var(--on-dark);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.agk-step + .agk-step::after {
  content: "";
  position: absolute;
  left: calc(var(--pad-card) + 25px);
  bottom: calc(100% - var(--pad-card));
  width: 2px;
  height: calc(var(--pad-card) + 1.1em + 8px);
  background: var(--agk-line-strong);
}
.agk-step__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--brick-ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .agk-step { padding-left: var(--pad-card); padding-top: calc(var(--pad-card) + 68px); }
  .agk-step + .agk-step::after { display: none; }
}

/* ---------------------------------------------------------- final CTA ---- */

/* The 360 closing panel (template-parts/final-cta.php), flat. */
.agk-final { padding-top: 0; padding-bottom: var(--agk-gap-section); }
.agk-final .final-cta { background: var(--brand); box-shadow: none; }
.agk-final .blob { display: none; }
.agk-final__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--brick-light);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.agk-final__kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.agk-final .final-cta h2 { margin-bottom: 18px; }
.agk-final__lede { max-width: 40rem; margin: 0 0 32px; color: var(--on-dark-muted); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; }
.agk-final__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.agk-final .agk-final__actions .btn--ghost-on-dark { margin-top: 0; }
/* Same primary as the hero: brick on petrol. */
.agk-final .btn--on-dark { background: var(--brick); box-shadow: none; }
.agk-final .btn--on-dark:hover { background: #9e2e20; }
.agk-final__hubs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  margin: 44px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  list-style: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}
.agk-final__hubs li { display: flex; align-items: center; }
.agk-final__hubs li + li::before { content: ""; width: 4px; height: 4px; margin: 0 14px; border-radius: 50%; background: var(--brick-light); }
.agk-final__hubs strong { color: var(--on-dark); font-weight: 500; margin-right: 6px; }
.agk-final__hubs span { margin-left: 6px; color: rgba(255, 255, 255, 0.7); } /* 0.29.0: 0.55 read 4.37:1 on petrol (WCAG AA needs 4.5). */
@media (max-width: 781px) {
  .agk-final__hubs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .agk-final__hubs li + li::before { display: none; }
}

/* ------------------------------------------------- footer credentials ---- */

.site-footer { box-shadow: inset 0 1px 0 var(--agk-line); }
.agk-creds { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.agk-creds__iso {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--agk-line);
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow 250ms var(--ease);
}
.agk-creds__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-base);
  background: var(--brand);
  color: var(--on-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.agk-creds__social {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-base);
  box-shadow: inset 0 0 0 1px var(--agk-line);
  color: var(--navy);
  transition: background-color 250ms var(--ease), color 250ms var(--ease);
}

/* ------------------------------------------------- home: credentials ---- */

/* inc/home.php: four proof points on a white card that overlaps the hero's lower edge. */
.agk-creds-strip {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(100% - 2 * var(--gutter) - 2 * clamp(16px, 4vw, 64px), calc(var(--shell) - 2 * clamp(16px, 4vw, 64px)));
  margin: calc(-1 * clamp(36px, 4vw, 56px)) auto 0;
  border-radius: var(--r-card);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--agk-line);
}
.entry-content--canvas .agk-creds-strip__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.entry-content--canvas .agk-creds-strip__list > li { margin: 0; }
.agk-creds-strip__list > li + li { box-shadow: inset 1px 0 0 var(--agk-line); }
.agk-creds-strip__list a,
.agk-creds-strip__list div {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  padding: clamp(20px, 2.2vw, 30px) clamp(18px, 2vw, 28px);
  color: inherit;
  text-decoration: none;
  transition: background-color 250ms var(--ease);
}
.agk-creds-strip__icon { flex: none; color: var(--brick); margin-top: 2px; }
.agk-creds-strip__text { display: flex; flex-direction: column; gap: 4px; }
.agk-creds-strip__text strong { color: var(--navy); font-size: 17px; font-weight: 500; line-height: 1.3; }
.agk-creds-strip__text span { color: var(--ink-muted); font-size: 14px; line-height: 1.45; }
/* The strip already separates the hero from what follows. */
.entry-content--canvas > .agk-creds-strip + .agk-sec { margin-top: var(--agk-gap-section); }
@media (max-width: 1100px) {
  .entry-content--canvas .agk-creds-strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agk-creds-strip__list > li:nth-child(3) { box-shadow: inset 0 1px 0 var(--agk-line); }
  .agk-creds-strip__list > li:nth-child(4) { box-shadow: inset 1px 0 0 var(--agk-line), inset 0 1px 0 var(--agk-line); }
}
@media (max-width: 560px) {
  .agk-creds-strip { width: calc(100% - 2 * var(--gutter)); margin-top: 16px; }
  .entry-content--canvas .agk-creds-strip__list { grid-template-columns: 1fr; }
  .agk-creds-strip__list > li + li,
  .agk-creds-strip__list > li:nth-child(4) { box-shadow: inset 0 1px 0 var(--agk-line); }
}

/* ---------------------------------------------- hover (real pointers) ---- */

/* Only things that can be clicked respond to the pointer. */
@media (hover: hover) and (pointer: fine) {
  .wp-block-latest-posts.agk-post-cards li:hover { transform: translateY(-3px); }
  .wp-block-latest-posts.agk-post-cards li:hover::after { box-shadow: inset 0 0 0 1px var(--agk-line-strong); }
  .wp-block-latest-posts.agk-post-cards li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.03); }
  .wp-block-details:not([open]):hover { box-shadow: inset 0 0 0 1px var(--agk-line-strong); }
  .agk-creds__iso:hover { box-shadow: inset 0 0 0 1px var(--agk-line-strong); }
  .agk-creds__social:hover { background: var(--brand); color: var(--on-dark); }
  .agk-creds-strip__list a:hover { background: var(--surface); }
  .agk-creds-strip__list a:hover strong { color: var(--brick-ink); }
}

/* ------------------------------------------------------------ reveal ---- */

/* Set only by motion.js, only on content that starts below the fold. */
.agk-motion .agk-rv { opacity: 0; transform: translate3d(0, 18px, 0); }
.agk-motion .agk-rv.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--agk-ease-out), transform 600ms var(--agk-ease-out);
}
.agk-motion .agk-rv--panel { transform: translate3d(0, 12px, 0); }

/* ---------------------------------------------------- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .agk-hero > *,
  .agk-hero .wp-block-column > * { animation: none !important; }
  .agk-motion .agk-rv { opacity: 1 !important; transform: none !important; }
  .agk-stat::after { transform: none; transition: none; }
  .agk-progress { display: none; }
}

@media print {
  .agk-motion .agk-rv { opacity: 1 !important; transform: none !important; }
  .agk-progress, .agk-final { display: none; }
}

/* A heading inside a column panel scales to the column, so long words never break mid-word. */
.entry-content--canvas .wp-block-column .agk-panel h2 { font-size: clamp(24px, 2.3vw, 34px); overflow-wrap: normal; }

/* ------------------------------------------------------ reading measure ---- */

/* The sheet is 1680px wide (0.8.0); text must not be. A band that is only text (legal pages, long
   explanations) becomes a centred reading column. In mixed bands, loose paragraphs stop at the same
   measure and centred ones stay centred as a block. Inner heroes keep full-width text (owner, 0.5.0). */
:root { --agk-measure: 46rem; }
/* A text block is a band, or the single panel (or panel in a panel) a band was flattened from, whose
   children are all text: one table, image, grid or wrapper div keeps the whole block at full width. */
:is(.entry-content--canvas > .agk-sec:not(.agk-hero), .entry-content--canvas > .agk-sec > .agk-panel:only-child, .entry-content--canvas > .agk-sec > .agk-panel:only-child > .agk-panel:only-child):not(:has(> :not(p, ul:not(.wp-block-latest-posts, .agk-logos), ol, h2, h3, h4, h5, h6, blockquote, .wp-block-buttons, .wp-block-details, .wp-block-separator, script, style)))
  > :is(p:not(.agk-kicker), ul:not(.wp-block-latest-posts, .agk-logos), ol, blockquote, .wp-block-buttons, .wp-block-details, .wp-block-separator, .wp-block-group, :is(h2, h3, h4, h5, h6):not(.has-text-align-center)) {
  max-width: var(--agk-measure);
  margin-inline: auto;
}
.entry-content--canvas > .agk-sec:not(.agk-hero) > :is(p:not(.agk-kicker), ul:not(.wp-block-latest-posts, .agk-logos), ol) { max-width: var(--agk-measure); }
.entry-content--canvas > .agk-sec:not(.agk-hero) > p.has-text-align-center { margin-inline: auto; }
/* Text in any panel (wide cards, single-panel bands, step cards) the speakable summary, the Rank Math TOC and plain text wrappers: same measure. */
.entry-content--canvas .agk-panel > :is(p:not(.agk-kicker), ul:not(.wp-block-latest-posts, .agk-logos), ol),
.entry-content--canvas .speakable-summary,
.entry-content--canvas .rank-math-toc,
.entry-content--canvas > .agk-sec > div:not([class]):not(:has(table, img, iframe, form, .wp-block-columns)) { max-width: var(--agk-measure); }
.entry-content--canvas .agk-panel > p.has-text-align-center { margin-inline: auto; }
/* Text beside an image in a wide column (e.g. the guide promos) stops at the same measure. */
.entry-content--canvas .wp-block-column > :is(p:not(.agk-kicker), ul:not(.wp-block-latest-posts, .agk-logos), ol) { max-width: var(--agk-measure); }

/* ---------------------------------------------------------- phone grid ---- */

/* Figures on a phone: two per row instead of four tall cards one under the other. */
@media (max-width: 781px) {
  .entry-content--canvas .wp-block-columns:has(> .wp-block-column > .agk-stat) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .entry-content--canvas .wp-block-columns:has(> .wp-block-column > .agk-stat) > .wp-block-column { margin: 0; }
  .entry-content--canvas .wp-block-column > .agk-stat { height: 100%; padding: 20px 12px; }
  .entry-content--canvas .agk-stat .agk-stat__num { font-size: clamp(26px, 7.5vw, 34px); }
  .entry-content--canvas .agk-stat h5 { font-size: 12px; letter-spacing: 0.04em; overflow-wrap: normal; word-break: normal; }
}

/* ------------------------------------------------- quieter boxes (0.8.2) ---- */

/* Owner, 2026-11-18: no red lines inside boxes, and no frame around a box that only holds text.
   1. Red accents in boxes go: the stat underline, the one-line card tick, the brick top edge of
      programme cards and the kicker dash inside a panel. Buttons, the FAQ chevron and the
      credentials icons stay brick. */
.agk-stat::after,
.agk-panel--card:has(> :only-child:is(h3, h4, h5, h6, p))::before,
.entry-content--canvas .agk-panel .agk-kicker::before { display: none; }
.entry-content--canvas .agk-panel--card > .agk-panel--surface { box-shadow: inset 0 0 0 1px var(--agk-line); }
.entry-content--canvas .agk-panel .agk-kicker { gap: 0; }

/* 2. A light box that holds only text (also a box of text-only boxes) is not a box: frame, fill
      and inner padding go and the text sits on the band like any other text. Figures and process
      steps keep their frame (they are a set), and so do the cards of a programme grid that has buttons (Funding Tools) and any box with a button, image, icon,
      form, table, FAQ toggle, map or dark panel anywhere inside it. */
.entry-content--canvas :is(.agk-panel--card, .agk-panel--surface):not(.agk-stat, .agk-step, .agk-panel--card:has(> .agk-panel--surface .wp-block-buttons) > .agk-panel--surface):not(:has(img, picture, svg, iframe, video, form, table, details, .wp-block-buttons, .wp-block-button, .wp-block-columns, .wp-block-latest-posts, .agk-logos, .agk-social, .agk-stat, .agk-step, .agk-panel--brand, .agk-panel--brick, [data-agk-src])) {
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
/* A one-line card loses its box too, so it no longer needs the box's height and centring. */
.entry-content--canvas .agk-panel--card:not(.agk-stat, .agk-step):has(> :only-child:is(h3, h4, h5, h6, p)) { min-height: 0; }

/* ---------------------------------------------------- tablet (0.8.3) ---- */

/* Rows of five or more columns (Why Choose Us) on a tablet: three, then two centred, instead of five
   slivers where words break mid-way. Below 782px WordPress stacks them anyway. */
@media (min-width: 782px) and (max-width: 1200px) {
  .entry-content--canvas .wp-block-columns:has(> .wp-block-column:nth-child(5)) {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--gap-grid);
  }
  .entry-content--canvas .wp-block-columns:has(> .wp-block-column:nth-child(5)) > .wp-block-column {
    grid-column: span 2;
    margin: 0 !important;
  }
  .entry-content--canvas .wp-block-columns:has(> .wp-block-column:nth-child(5):last-child) > .wp-block-column:nth-child(4) { grid-column: 2 / span 2; }
}

/* Post grid in two columns with an odd count: the last card takes the full row, image beside text,
   instead of standing alone under an empty half. */
@media (min-width: 641px) and (max-width: 1000px) {
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 0;
    align-content: start;
    padding-bottom: 0;
  }
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd) .wp-block-latest-posts__featured-image {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin: 0;
    height: 100%;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--agk-line);
  }
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd) > :not(.wp-block-latest-posts__featured-image) { grid-column: 2; }
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd) time { padding-top: 28px; }
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd) > :last-child { padding-bottom: 28px; }
  .wp-block-latest-posts.agk-post-cards.is-grid li:last-child:nth-child(odd):not(:has(.wp-block-latest-posts__featured-image)) > * { grid-column: 1 / -1; }
}

/* A form card is a form, not a band: it keeps a comfortable width (Careers). */
.entry-content--canvas > .agk-sec > .agk-panel:has(.agk-form) { max-width: 52rem; margin-inline: auto; }

/* Touch targets: the header logo link reaches 44px. */
.site-header .brand { min-height: 44px; justify-content: center; }

/* ------------------------------------------------ consistency (0.8.5) ---- */

/* Archive and search cards (template-parts/content.php, the 360 .card.post-card) follow the flat post
   cards of the canvas pages: white, hairline drawn over the card, no drop shadow. */
.card.post-card {
  position: relative;
  background: var(--white);
  box-shadow: none;
  transition: transform 250ms var(--agk-ease-out);
}
.card.post-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--agk-line);
  pointer-events: none;
  transition: box-shadow 250ms var(--ease);
}
.card.post-card .post-card__media { border-bottom: 1px solid var(--agk-line); }
.card.post-card .entry-meta a { color: var(--ink-faint); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .card.post-card:hover { transform: translateY(-3px); box-shadow: none; }
  .card.post-card:hover::after { box-shadow: inset 0 0 0 1px var(--agk-line-strong); }
  .card.post-card .entry-meta a:hover { color: var(--brick-ink); }
}

/* "Read more" in post cards reads as part of the card, in the brick ink of the card titles' hover. */
.wp-block-latest-posts.agk-post-cards .wp-block-latest-posts__read-more {
  color: var(--brick-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.wp-block-latest-posts.agk-post-cards .wp-block-latest-posts__read-more::after { content: " \2192"; }
.wp-block-latest-posts.agk-post-cards .wp-block-latest-posts__read-more:hover { text-decoration: underline; }

/* A question or sub-heading right after an answer paragraph (Everest FAQ) gets air above it. */
.entry-content--canvas :is(.agk-sec, .agk-panel) > p + :is(h3, h4, h5, h6) { margin-top: 1.5em; }

/* Buttons are one height everywhere (52px, as the content buttons): the closing CTA's pair was 56 and 48px
   side by side, and the form's submit button 57px. */
.agk-final .btn,
.agk-form .btn--lg {
  box-sizing: border-box;
  min-height: 52px;
  padding: 13px 29px;
  line-height: 1.5;
}

/* ---------------------------------------------------- anchors (0.8.6) ---- */

/* A table-of-contents jump lands the heading below the sticky header, not under it. */
.entry-content [id] { scroll-margin-top: 104px; }
@media (max-width: 900px) { .entry-content [id] { scroll-margin-top: 96px; } }

/* A heading straight after a map, image or embed inside a card (Contact offices) gets air above it. */
.entry-content--canvas .agk-panel > :is(.agk-embed, figure, .wp-block-image, .wp-block-embed, iframe) + :is(h2, h3, h4, h5, h6) { margin-top: 1.25em; }

/* ------------------------------------------------------------ square corners (0.12.1) ---- */
/* Owner, 2026-11-18: no rounded corners anywhere. The 360 layer routes every radius through these tokens,
   so zero here squares panels, buttons, fields, images, badges and the footer pills in one place.
   Real circles stay circles: the radio dots (their own 50%), the small dots below, social icons (9999px). */
:root {
  --r-base: 0;
  --r-shell: 0;
  --r-panel: 0;
  --r-card-lg: 0;
  --r-card: 0;
  --r-inner: 0;
  --r-pill: 0;
  --r-btn: 0;
  --r-circle: 0;
}
.badge__dot,
.agk-final__hubs li + li::before { border-radius: 50%; }
/* Raw HTML inside articles carries its own inline radius (boxes of 4–16px, a Rank Math table of contents). */
.entry-content [style*="border-radius"]:not([style*="50%"]):not([style*="999"]) { border-radius: 0 !important; }
/* Pasted tables that turn rows into cards on phones (their own <style>, 8px). */
.entry-content table :is(tr, th, td) { border-radius: 0 !important; }
.entry-content .rank-math-toc,
.entry-content :is(.wp-block-details, blockquote, img, figure, pre, table) { border-radius: 0; }

/* ------------------------------------------------- leftovers inside raw HTML (0.12.1) ---- */
/* An Avada button pasted as HTML (its colours are Avada variables that no longer exist): the theme button. */
.entry-content a.fusion-button {
  display: inline-block;
  padding: 13px 20px;
  background: var(--brick);
  color: var(--on-dark);
  font-weight: 500;
  text-decoration: none;
  border: 0;
  border-radius: 0;
}
.entry-content a.fusion-button:hover { background: #9e2e20; color: var(--on-dark); }
.entry-content a.fusion-button .fusion-button-text { color: inherit; }
/* Header rows pasted with their own dark colours (#1a1a2e, #1b2a4a…) clashed with the theme's navy header text:
   every table header reads the same, the theme's (navy on the light surface). */
.entry-content thead tr[style] { background: var(--surface) !important; color: var(--navy) !important; }
.entry-content thead tr[style] > th { color: var(--navy); }

/* --------------------------------------------------------- previous / next (0.12.1) ---- */
/* The article links shared the header menu's .nav-links rules (no wrapping, pill padding): long titles ran
   into each other on one line. Two cards, side by side, titles wrapping. */
.post-navigation .nav-links { gap: 20px; align-items: stretch; }
.post-navigation .nav-links > div { display: flex; min-width: 0; }
.post-navigation .nav-next:only-child { grid-column: 2; }
.post-navigation .nav-links a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 20px 24px;
  white-space: normal;
  font-size: inherit;
  letter-spacing: 0;
  color: inherit;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--agk-line);
  text-decoration: none;
  transition: box-shadow 0.2s var(--ease);
}
.post-navigation .nav-links a:hover { background: var(--white); box-shadow: inset 0 0 0 1px var(--navy); }
.post-navigation .nav-links a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.post-navigation .nav-label { margin: 0; font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brick-ink); }
.post-navigation .nav-previous .nav-label::before { content: "← "; }
.post-navigation .nav-next .nav-label::after { content: " →"; }
.post-navigation .nav-title { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .post-navigation .nav-next:only-child { grid-column: auto; }
  .post-navigation .nav-next { text-align: left; }
}

/* ----------------------------------------------------- table headers (0.15.0) ---- */
/* Every table header reads the same: navy on the light surface. Pasted tables set their own (petrol, green, red). */
.entry-content table th[style*="background"] { background: var(--surface) !important; color: var(--navy) !important; }

/* ------------------------------------------------------------ "Ask about …" (0.18.0) ---- */
.entry-content .agk-ask-wrap { margin: 18px 0 0; }
.entry-content a.agk-ask {
  display: inline-block;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-dark);
  background: var(--brick);
  text-decoration: none;
}
.entry-content a.agk-ask:hover { color: var(--on-dark); background: #9e2e20; }
.entry-content a.agk-ask-link { align-self: center; font-size: 15px; font-weight: 500; color: var(--brick-ink); }
.entry-content .wp-block-buttons > a.agk-ask-link { margin-left: 6px; }
.entry-content :is(a.agk-ask, a.agk-ask-link):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.agk-form__topic {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink-soft);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--brick);
}
.agk-form__topic b { font-weight: 500; color: var(--navy); }
.agk-form__topic a { margin-left: auto; font-size: 13.5px; }
