/* ==========================================================================
   Agency and city pages (owner's build specs, Nov 30, 2026): /aeo-agency,
   /geo-agency and the 8 /aeo-agency-{city} pages. Loaded after home.css,
   compare.css and kw-page.css, and built from their parts: the framed term
   hero, two-tone H2s, story rows, frames, the comparison table (.vs-tbl),
   the two-column ledger (.vs-ledger), the numbered steps (.kw-steps), the
   plan cards (.pl-card), the founder cards (about.css), the FAQ and the
   closing box. This file only adds what those pages need on top:

   .kw-hero--full  the city pages' term hero: a lede, 2 buttons and a proof strip
   .bluf           the answer sentence under each H2 (.story-lede type)
   .ag-tx          body text whose links read like the text (W-5)
   .ag-rows        a frame of rows, an H3 and one line each (services)
   .ag-cells       2×2 cells, an H3, a figure and one line (measures)
   .ag-list        an H3 and one line per item, in columns (industries, cities)
   .ag-asks        questions to ask, as a quiet list
   .ag-stats       stat row with source lines (city pages, §5a)
   .ag-prompts     prompts grouped by sector, in a frame (city pages)
   .ag-flow        3 boxes joined by arrows (GEO: how AI writes an answer)
   .under          the line directly under a section's cards
   Motion: rows and cells come in one by one when their frame enters view
   ([data-draw] → .is-in, library pattern 3); reduced motion shows all.
   ========================================================================== */

/* ------------------------------------------------------------- Hero */
.kw-hero--full { flex-direction: column; align-items: flex-start; justify-content: center; }
.kw-hero--full > :not(canvas) { position: relative; }
.home .kw-hero--full .kw-term { max-width: 18ch; }
.kw-lede { max-width: 50ch; margin: clamp(22px, 2.6vw, 30px) 0 0; color: rgba(232, 239, 243, .84);
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.6; }
.kw-hero--full .h-acts { margin-top: clamp(24px, 3vw, 32px); }
.kw-proof { display: flex; flex-wrap: wrap; gap: 10px; margin: clamp(28px, 3.4vw, 40px) 0 0; padding: 0; list-style: none; }
.kw-proof li { min-width: 132px; padding: 10px 14px 11px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: rgba(7, 9, 11, .72); }
.kw-proof b { display: block; color: var(--ink); font: 600 1.25rem/1.15 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kw-proof span { display: block; margin-top: 3px; color: var(--muted); font-size: .8125rem; line-height: 1.35; }
/* The city's own landmark sits low on the right; on phones it sits under
   the copy, so the hero leaves it room there. */
@media (max-width: 740px) {
  .kw-hero:has([data-kw-field="landmark"]) { padding-bottom: 62vw; }
  .kw-proof li { min-width: 0; flex: 1 1 40%; }
}

/* ------------------------------------------------------ Section text */
.bluf { max-width: 62ch; }
.ag-body { margin-top: clamp(32px, 4vw, 48px); }
.ag-tx { max-width: 68ch; margin-top: 18px; color: var(--muted); font-size: var(--t-m); line-height: 1.6; }
.ag-tx b { color: var(--ink); font-weight: 500; }
/* Links inside body text look like the text; only the open-link icon marks
   them (W-5, the FAQ's style). */
.ag-tx a, .ag-tx a:hover, .under a, .under a:hover, .ag-rows p a, .ag-rows p a:hover, .ag-cells p a, .ag-cells p a:hover,
.ag-list p a, .ag-list p a:hover, .ag-list small a, .ag-list small a:hover, .ag-asks a, .ag-asks a:hover, .kw-lede a, .kw-lede a:hover, .ab-bio a, .ab-bio a:hover,
.vs-ledger li a, .vs-ledger li a:hover, .kw-steps p a, .kw-steps p a:hover, .ag-flow p a, .ag-flow p a:hover, .ag-stats a, .ag-stats a:hover,
.story-side--quiet .statement a, .story-side--quiet .statement a:hover, .ag-tabs .lx-over a, .ag-tabs .lx-over a:hover, .bluf a, .bluf a:hover {
  color: inherit; font-weight: inherit; text-decoration: none; }
.ag-tx a::after, .under a::after, .ag-rows p a::after, .ag-cells p a::after, .ag-list p a::after, .ag-list small a::after, .ag-asks a::after,
.kw-lede a::after, .ab-bio a::after, .vs-ledger li a::after, .kw-steps p a::after, .ag-flow p a::after, .ag-stats a::after,
.story-side--quiet .statement a::after, .ag-tabs .lx-over a::after, .bluf a::after {
  content: ""; display: inline; padding-left: 21px; background-color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 3.5H5.5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3'/%3E%3Cpath d='M11.5 3.5h5v5M16.5 3.5L9.5 10.5'/%3E%3C/svg%3E") right center / 16px 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 3.5H5.5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3'/%3E%3Cpath d='M11.5 3.5h5v5M16.5 3.5L9.5 10.5'/%3E%3C/svg%3E") right center / 16px 16px no-repeat;
  transition: background-color var(--d-2) var(--ease);
}
:is(.ag-tx, .under, .ag-rows p, .ag-cells p, .ag-list p, .ag-list small, .ag-asks, .kw-lede, .ab-bio, .vs-ledger li, .kw-steps p, .ag-flow p, .ag-stats, .story-side--quiet .statement, .ag-tabs .lx-over, .bluf) a:is(:hover, :focus-visible)::after {
  background-color: var(--signal); }
.under { max-width: 68ch; margin-top: 20px; color: var(--muted); font-size: .9688rem; line-height: 1.6; }

/* ------------------------------------------------------ Rows (services) */
.ag-rows { list-style: none; margin: 0; padding: 6px 0; }
.ag-rows li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px 32px; align-items: baseline;
  padding: 20px clamp(20px, 3.5vw, 40px); }
.ag-rows li + li { border-top: 1px solid var(--rule); }
.ag-rows h3 { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.ag-rows h3 a { color: var(--ink); text-decoration: none; }
.ag-rows h3 a:hover { color: var(--signal); }
.ag-rows p { color: var(--muted); font-size: .9688rem; line-height: 1.55; }
.ag-rows .ag-n { display: block; margin-bottom: 4px; color: var(--signal); font-size: .8125rem; font-weight: 400; font-variant-numeric: tabular-nums; }
@media (max-width: 740px) { .ag-rows li { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------- Cells (measures) */
.ag-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ag-cells li { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 3vw, 32px) clamp(20px, 3.5vw, 36px); }
.ag-cells li:nth-child(even) { border-left: 1px solid var(--rule); }
.ag-cells li:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.ag-cells h3 { font-size: 1.1875rem; font-weight: 500; letter-spacing: -.015em; }
.ag-cells p { color: var(--muted); font-size: .9688rem; line-height: 1.55; }
/* A small figure per cell: what the measure counts, drawn in dots. */
.ag-fig { display: flex; gap: 5px; align-items: flex-end; height: 22px; }
.ag-fig i { width: 8px; height: 8px; border-radius: 50%; background: rgba(232, 239, 243, .18); }
.ag-fig i.on { background: var(--signal); }
.ag-fig--bar i { width: auto; flex: 0 0 auto; height: 6px; border-radius: 999px; }
.ag-fig b { color: var(--signal); font: 600 1.375rem/1 var(--display); letter-spacing: -.03em; }
.ag-fig small { margin-left: 4px; color: var(--muted); font-size: .8125rem; }
@media (max-width: 740px) {
  .ag-cells { grid-template-columns: minmax(0, 1fr); }
  .ag-cells li:nth-child(even) { border-left: 0; }
  .ag-cells li + li { border-top: 1px solid var(--rule); }
}

/* ------------------------------------- List (industries, cities, sources) */
.ag-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.ag-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ag-list--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ag-list li { padding: 18px 0 22px; border-top: 1px solid var(--rule); }
.ag-list h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.35; }
.ag-list h3 a { color: var(--ink); text-decoration: none; }
.ag-list h3 a:hover { color: var(--signal); }
.ag-list p { margin-top: 6px; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
.ag-list small { display: block; margin-top: 10px; color: var(--muted); font-size: .8125rem; }
.ag-list.ag-body { margin-top: clamp(28px, 3.4vw, 40px); }
@media (max-width: 1000px) { .ag-list, .ag-list--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ag-list, .ag-list--2, .ag-list--4 { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- Questions to ask */
.ag-asks-h { margin-top: clamp(28px, 3.4vw, 40px); font-size: 1.0625rem; font-weight: 500; }
.ag-asks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; margin: 14px 0 0; padding: 0; list-style: none;
  color: var(--muted); font-size: .9688rem; line-height: 1.5; }
.ag-asks li { position: relative; padding-left: 20px; }
.ag-asks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
@media (max-width: 740px) { .ag-asks { grid-template-columns: minmax(0, 1fr); } }

/* Two plan cards at full size (the Pricing page's cards). */
.pl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; }
@media (max-width: 740px) { .pl-grid--2 { grid-template-columns: minmax(0, 1fr); } }
.pl-feats a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.pl-feats a:hover { color: var(--signal); border-color: var(--signal); }

/* Founder cards as on About (owner, Nov 30, 2026: be consistent): photo,
   name with the LinkedIn mark beside it (home.css .bl-author-li, never a
   text link), role, bio; Manas first. Same rules as the About branch's
   about.css, which this branch's about.css predates. */
.ab-head h3 { display: inline; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
.ab-head .bl-author-name { display: block; white-space: nowrap; }
.ab-head .bl-author-li { margin-left: 8px; vertical-align: -2px; }

/* Comparison table: the table needs a visible caption on these pages. */
.vs-tbl caption { padding: 12px 18px; caption-side: top; text-align: left; color: var(--muted); font-size: .8125rem; border-bottom: 1px solid var(--rule); }
/* Wide tables scroll sideways only where they don't fit. overflow-y stays
   hidden: the rows' rise-in (translateY) briefly overflowed the box and
   flashed a scrollbar (owner, Nov 30, 2026). */
.vs-tbl-scroll { overflow-x: auto; overflow-y: hidden; }
@media (min-width: 741px) { .vs-tbl--wide table { min-width: 860px; } }
.vs-ledger h3 a { color: inherit; text-decoration: none; }
.vs-ledger--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vs-ledger--4 > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
.vs-ledger--4 > div:nth-child(odd) { border-left: 0; }
.vs-ledger--4 > div:nth-child(even) { border-left: 1px solid var(--rule); }
@media (max-width: 740px) {
  .vs-ledger--4 { grid-template-columns: minmax(0, 1fr); }
  .vs-ledger--4 > div:nth-child(even) { border-left: 0; }
  .vs-ledger--4 > div + div { border-top: 1px solid var(--rule); }
}

/* Steps with an H3 per step (the kw-steps frame, H3 in place of <b>). */
.kw-steps h3 { font-size: 1.0625rem; font-weight: 500; line-height: 1.35; color: var(--ink); }

/* ------------------------------------------------ Stat row (city pages) */
.ag-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ag-stats li { display: flex; flex-direction: column; gap: 8px; padding: clamp(22px, 3vw, 32px) clamp(20px, 3vw, 32px); }
.ag-stats li + li { border-left: 1px solid var(--rule); }
.ag-stats b { color: var(--ink); font: 600 clamp(2rem, 3.6vw, 3rem)/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ag-stats p { color: rgba(232, 239, 243, .82); font-size: .9688rem; line-height: 1.5; }
.ag-stats small { margin-top: auto; padding-top: 6px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
@media (max-width: 860px) {
  .ag-stats { grid-template-columns: minmax(0, 1fr); }
  .ag-stats li + li { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ------------------------------------- Prompts by sector (city pages) */
.ag-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ag-prompts > div { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 3vw, 28px) clamp(18px, 2.6vw, 28px); }
.ag-prompts > div + div { border-left: 1px solid var(--rule); }
.ag-prompts h3 { margin-bottom: 4px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.ag-prompts p { width: fit-content; max-width: 100%; margin: 0; padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  background: rgba(255, 255, 255, .06); color: var(--ink); font-size: .9375rem; line-height: 1.45; }
.ag-prompts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .ag-prompts, .ag-prompts--2 { grid-template-columns: minmax(0, 1fr); }
  .ag-prompts > div + div { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ------------------------------- Flow (GEO: how AI writes an answer) */
.ag-flow { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); align-items: stretch;
  gap: 0; padding: clamp(18px, 2.6vw, 28px); list-style: none; margin: 0; }
.ag-flow li { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); }
.ag-flow li.is-out { border-color: rgba(34, 211, 238, .45); }
.ag-flow li[aria-hidden] { display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); }
.ag-flow .ag-n { color: var(--signal); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.ag-flow h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -.015em; }
.ag-flow p { color: var(--muted); font-size: .9375rem; line-height: 1.55; }
@media (max-width: 860px) {
  .ag-flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ag-flow li[aria-hidden] { height: 28px; transform: rotate(90deg); }
}

/* Research callout (GEO): the big statement with a visible citation. */
.vs-quote figcaption { margin-top: clamp(18px, 2.4vw, 26px); color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.vs-quote figcaption cite { font-style: normal; color: var(--ink); }
.vs-quote figcaption a { color: inherit; text-decoration: none; }
.vs-quote figcaption a:hover, .vs-quote figcaption a:focus-visible { color: var(--signal); }
.vs-quote figcaption a:hover cite { color: var(--signal); }
.vs-quote-go { display: inline-block; margin-left: 6px; vertical-align: -1px; transition: transform var(--d-2) var(--ease); }
.vs-quote figcaption a:hover .vs-quote-go { transform: translate(2px, -2px); }

/* ------------------------------------------------------------ Motion */
@media (prefers-reduced-motion: no-preference) {
  .js [data-draw]:is(.ag-rows, .ag-cells, .ag-stats, .ag-flow) > li:not([aria-hidden]),
  .js [data-draw].ag-prompts > div { opacity: 0; transform: translateY(6px); }
  [data-draw].is-in:is(.ag-rows, .ag-cells, .ag-stats, .ag-flow) > li:not([aria-hidden]),
  [data-draw].is-in.ag-prompts > div {
    opacity: 1; transform: none; transition: opacity 420ms var(--ease), transform 420ms var(--ease);
    transition-delay: calc(120ms + var(--i, 0) * 110ms); }
}

/* A link in a table header reads like the header. */
.vs-tbl thead a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.vs-tbl thead a:hover { color: var(--signal); border-color: var(--signal); }

/* ----------------------------------------------- City pages (v2, owner
   review, Nov 30, 2026): who we work with as the frame-bar tab (Get Cited's
   .ctabs, views t1-t4 so every city can use it), and the facts AI checks as
   an audit card (the Why Us score card's state pills). */
.ag-tabs .lx-panel[data-l] { display: none; }
.ag-tabs[data-view="t1"] .lx-panel[data-l="t1"],
.ag-tabs[data-view="t2"] .lx-panel[data-l="t2"],
.ag-tabs[data-view="t3"] .lx-panel[data-l="t3"],
.ag-tabs[data-view="t4"] .lx-panel[data-l="t4"] { display: block; animation: ctab-in 300ms var(--ease) both; }
/* City tabs hold short panels, so they share one cell (the Monitoring
   report's way): the frame is as tall as its longest tab, with no empty
   space, no jump between tabs and no scrolling inside. */
.ag-tabs .lx-panels, .ag-tabs .lx-panels { height: auto; overflow: visible; -webkit-mask-image: none; mask-image: none; display: grid; }
.ag-tabs .lx-panels > .lx-panel[data-l] { display: block; grid-area: 1 / 1; visibility: hidden; opacity: 0; animation: none; }
.ag-tabs[data-view="t1"] .lx-panel[data-l="t1"], .ag-tabs[data-view="t2"] .lx-panel[data-l="t2"],
.ag-tabs[data-view="t3"] .lx-panel[data-l="t3"], .ag-tabs[data-view="t4"] .lx-panel[data-l="t4"] { visibility: visible; opacity: 1; }
@media (max-width: 740px) { .ag-tabs .lx-panels { height: auto; } }
.ag-tabs .lx-count { line-height: 1.5; }
.ag-tabs .lx-count a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(34, 211, 238, .35); }
.ag-tabs .lx-count a:hover { border-color: currentColor; }
.ag-tabs .lx-q { color: var(--ink); }

.ag-checks { list-style: none; margin: 0; padding: 4px 24px 8px; }
.ag-checks li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.ag-checks li:last-child { border-bottom: 0; }
.ag-checks .state { justify-self: start; margin-top: 1px; }
.ag-checks b { display: block; font-weight: 500; color: var(--ink); }
.ag-checks small { display: block; margin-top: 3px; color: var(--muted); font-size: .875rem; line-height: 1.45; }
[data-draw].ag-checks li { opacity: 0; transform: translateY(6px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
[data-draw].ag-checks.is-in li { opacity: 1; transform: none; }
@media (max-width: 740px) { .ag-checks { padding: 4px 16px 8px; } .ag-checks li { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; } }
@media (prefers-reduced-motion: reduce) { [data-draw].ag-checks li { opacity: 1; transform: none; transition: none; } }
/* City tabs: the prompts we track for each group, as chat bubbles (the
   .ag-prompts bubble). Audit card: the fact's own detail in italics-free
   grey under its name. */
.ag-tabs .ag-ask-h { margin-top: 18px; color: var(--muted); font-size: .8125rem; }
.ag-tabs .ag-ask { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 14px 0 0; }
.ag-tabs .ag-ask li { display: block; width: fit-content; max-width: 100%; padding: 9px 13px; border: 0; border-radius: 14px 14px 4px 14px;
  background: rgba(255, 255, 255, .06); color: var(--ink); font-size: .9375rem; line-height: 1.45; }
.ag-checks i { display: block; margin-top: 2px; font-style: normal; color: rgba(232, 239, 243, .78); font-size: .875rem; }
.under--right { margin-left: auto; text-align: right; }
@media (max-width: 740px) { .under--right { text-align: left; } }
/* Where the fact goes missing takes its pill's colour, so it reads apart
   from the fact's own detail above it. */
.ag-checks li:has(.state-fail) small { color: rgba(249, 138, 132, .9); }
.ag-checks li:has(.state-partial) small { color: var(--partial-text); }
