/* css/town.css -- the town pages in the 2026 design (pilot: /chicago): the sections from partials/town.html and the price
   card beside the estimator. Loaded after css/site.css, css/service-v2.css and css/company.css, whose classes these
   sections reuse (svx-office__*, cx-contact__*, cx-mapframe, svx-nope, svx-checks, sx__chips, px__items). tn- classes only.
   Colours are the site tokens; orange is never text on white below --oc-orange-ink. */

/* ---------------------------------------------------------------- town_office(): the places the office covers, the office card, the map.
   Wide: the places across the top; the office card beside the map, which is as tall as the card. An office without a
   map (the build requires one, so this is only a fallback): the places beside the office card, their two lists stacked
   and the note at the bottom, so no column stays empty. Below 992px: places, office card, map, one under another. */
.tn-office { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "cover cover" "card map"; gap: 16px clamp(20px, 2.6vw, 32px); align-items: stretch; }
@media (min-width: 992px) {
  .tn-office--nomap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "cover card"; }
  .tn-office--nomap .tn-cover { display: flex; flex-direction: column; }
  .tn-office--nomap .tn-cover__parts { grid-template-columns: minmax(0, 1fr); }
  .tn-office--nomap .tn-cover__note { margin-top: auto; }
}
.tn-cover { grid-area: cover; background: #fff; border: 1px solid var(--oc-line); border-radius: var(--oc-radius-lg); padding: clamp(20px, 2.4vw, 26px); }
.tn-cover h3 { font-size: 20px; margin: 0 0 14px; }
.tn-cover__parts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px clamp(20px, 2.6vw, 32px); }
.tn-cover__cap, .tn-card__label { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--oc-muted); font-stretch: 112%; }
.tn-cover__chips { margin: 0 0 16px; }
.tn-cover__chips a { display: inline-flex; align-items: center; min-height: 40px; }
/* the page's own place, first among the places: plain text, not a link (aria-current="page"), filled so it reads as "here" */
.tn-cover__here { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid var(--oc-ink); border-radius: 99px; padding: 7px 14px; font-size: 14.5px; font-weight: 700; color: #fff; background: var(--oc-ink); }
@media (max-width: 991.98px) { .tn-cover__here { padding: 11px 16px; } }
/* names served without a page: plain words in a running list, nothing that looks like a link */
.tn-cover__plain { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 15px; line-height: 1.6; color: var(--oc-text); }
.tn-cover__plain li { white-space: nowrap; }
.tn-cover__plain li:not(:last-child)::after { content: ","; margin-right: .4em; }
/* the divider spans the card; the right padding caps the text at about 90ch (the % is of the card's content width) */
.tn-cover__note { margin: 0; padding-top: 14px; padding-right: calc(100% - min(100%, 90ch)); border-top: 1px solid var(--oc-line); font-size: 15px; line-height: 1.55; color: var(--oc-text); }
.tn-cover__note a { color: var(--oc-ink); font-weight: 700; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--oc-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tn-card { grid-area: card; align-self: start; background: #fff; border: 1px solid var(--oc-line); border-top: 4px solid var(--oc-orange); border-radius: var(--oc-radius-lg); padding: clamp(22px, 2.6vw, 30px); box-shadow: var(--oc-shadow); }
.tn-card__label { margin-bottom: 4px; }
.tn-card__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.tn-card__top h3 { font-size: 24px; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
/* the "New office" badge sits in the heading, as on the office cards (site.css makes .ax__new absolute) */
.tn-card .ax__new { position: static; font-size: 10.5px; white-space: nowrap; }
.tn-card .svx-office__rating { min-height: 32px; }
.tn-card__base { margin: 0 0 6px; padding: 10px 12px; font-size: 14.5px; line-height: 1.5; color: var(--oc-text); background: var(--oc-paper); border-radius: var(--oc-radius); }
.tn-card .cx-contact__lines { margin-bottom: 18px; }
.tn-card .cx-contact__lines li:last-child a { border-bottom: 0; }
/* the map fills the height beside the card (its figure is a column: the framed map, then the caption) */
.tn-office__map { grid-area: map; display: flex; flex-direction: column; min-height: 360px; }
.tn-office__map .cx-mapframe { flex: 1; display: flex; flex-direction: column; }
.tn-office__map .cx-mapframe__box { flex: 1; aspect-ratio: auto; max-height: none; }
.tn-office__map .cx-mapframe__cap { text-wrap: pretty; }
.tn-office__map .cx-mapframe__cap a { color: var(--oc-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--oc-orange); text-underline-offset: 3px; }
@media (max-width: 991.98px) {
  .tn-office, .tn-office--nomap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cover" "card" "map"; }
  .tn-office__map { min-height: 0; }
  .tn-office__map .cx-mapframe__box { flex: none; aspect-ratio: 16 / 10; }
}
@media (max-width: 767.98px) {
  .tn-cover__parts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .tn-card__top h3 { font-size: 21px; }
  .tn-office__map .cx-mapframe__box { aspect-ratio: 4 / 3; }
}
@media print { .tn-office__map { display: none; } }

/* ---------------------------------------------------------------- compare(): the public service's column and ours, row by row, every
   public claim footnoted to the official page under the table. Below 992px each row is a card, the topic across the top
   and the two columns side by side; below 576px the two columns stack. */
.tn-cmp { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--oc-line); border-radius: var(--oc-radius-lg); overflow: hidden; font-size: 15.5px; line-height: 1.55; }
.tn-cmp thead th { width: 40%; padding: 16px 20px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-stretch: 112%; color: var(--oc-ink); text-align: left; border-bottom: 2px solid var(--oc-ink); }
.tn-cmp thead th.tn-cmp__us { color: var(--oc-orange-ink); border-bottom-color: var(--oc-orange); }
.tn-cmp__corner { width: 20%; border-bottom: 2px solid var(--oc-ink); }
.tn-cmp tbody th { padding: 18px 20px; vertical-align: top; text-align: left; font-size: 16.5px; font-weight: 800; font-stretch: 106%; line-height: 1.35; color: var(--oc-ink); text-wrap: balance; }
.tn-cmp td { padding: 18px 20px; vertical-align: top; color: var(--oc-text); }
.tn-cmp td.tn-cmp__us { background: var(--oc-orange-50); color: var(--oc-ink); }
/* links in a cell (not the footnote numbers): underlined, so they don't rely on colour alone (WCAG 1.4.1) */
.tn-cmp td > a { color: var(--oc-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--oc-orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.tn-cmp td > a:hover { color: var(--oc-orange-ink); }
/* the orange ring is under 3:1 on the Orange Crew column's tint (--oc-orange-50); ink there, as on the not-taken box below */
.tn-cmp td > a:focus-visible { outline-color: var(--oc-ink); }
.tn-cmp tbody tr + tr > * { border-top: 1px solid var(--oc-line); }
/* the footnote number: Bootstrap's sup already lifts it (position: relative; top: -.5em), so no vertical-align here */
.tn-ref { margin-left: 1px; font-size: 11px; font-weight: 700; line-height: 0; white-space: nowrap; }
.tn-ref a { position: relative; padding: 0 1px; color: var(--oc-orange-ink); font-weight: 800; text-decoration: none; }
/* a taller tap target, no wider: two markers ("1, 2") sit about 14px apart */
.tn-ref a::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 24px; transform: translateY(-50%); }
.tn-ref a:hover { text-decoration: underline; }
.tn-src { margin-top: 20px; }
.tn-src__cap { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--oc-muted); font-stretch: 112%; }
.tn-src ol { margin: 0; padding-left: 22px; font-size: 14.5px; line-height: 1.5; color: var(--oc-muted); columns: 2; column-gap: 32px; }
.tn-src li { break-inside: avoid; padding: 2px 0; }
.tn-src li:target { background: var(--oc-orange-50); }
.tn-src a { color: var(--oc-text); text-decoration: underline; text-decoration-color: var(--oc-line); text-underline-offset: 3px; }
.tn-src a:hover { color: var(--oc-ink); text-decoration-color: var(--oc-orange); }
/* what we can't take, at the end of the section (after the sources): one wide row; the text number never breaks */
.svx-nope.tn-nope { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px clamp(16px, 2.4vw, 32px); align-items: start; margin-top: 24px; }
.svx-nope.tn-nope h3 { margin: 0; }
.svx-nope.tn-nope a { color: var(--oc-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--oc-orange); text-underline-offset: 3px; }
.svx-nope.tn-nope a[href^="sms:"], .svx-nope.tn-nope a[href^="tel:"] { white-space: nowrap; }
@media (max-width: 991.98px) {
  .tn-cmp, .tn-cmp tbody { display: block; width: auto; }
  .tn-cmp { background: none; border: 0; border-radius: 0; overflow: visible; }
  .tn-cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tn-cmp thead tr, .tn-cmp thead th, .tn-cmp thead td { display: block; width: auto; }
  .tn-cmp tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; border: 1px solid var(--oc-line); border-radius: var(--oc-radius-lg); overflow: hidden; }
  .tn-cmp tbody tr + tr { margin-top: 12px; }
  .tn-cmp tbody tr + tr > * { border-top: 0; }
  .tn-cmp tbody th { grid-column: 1 / -1; display: block; padding: 16px 18px 4px; font-size: 18px; }
  .tn-cmp td { display: block; width: auto; padding: 10px 18px 16px; }
  .tn-cmp td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--oc-muted); font-stretch: 112%; }
  .tn-cmp td.tn-cmp__us::before { color: var(--oc-orange-ink); }
}
@media (max-width: 767.98px) {
  .tn-src ol { columns: 1; }
  .svx-nope.tn-nope { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575.98px) {
  .tn-cmp tbody tr { grid-template-columns: minmax(0, 1fr); }
  .tn-cmp tbody th { padding: 16px 16px 4px; }
  .tn-cmp td { padding: 10px 16px 14px; }
}

/* ---------------------------------------------------------------- the card beside the estimator: common single items, the line on what
   we take, then how the price is set, then the full list */
.tn-pricecard .px__items { margin-bottom: 4px; }
.px__card > p.tn-pricecard__take { margin: 14px 0 0; }
.px__card.tn-pricecard h3.tn-pricecard__cap { margin: 22px 0 12px; font-size: 11.5px; line-height: 1.4; color: var(--oc-muted); }
.tn-pricecard .svx-checks { margin-bottom: 20px; }

/* ---------------------------------------------------------------- reviews: the closing link to the office's Google reviews ends on more
   than one word (balance; pretty leaves "Google" alone) */
.oc-reviews .rvq__more { text-wrap: balance; }

/* ---------------------------------------------------------------- town_job(): a real job from the office's area, as one card: the job's
   photo beside its story and receipt (the receipt's title link covers the card, as on the homepage's jobs). One column
   below 768px, the photo first. */
.tn-job { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); background: #fff; border: 1px solid var(--oc-line); border-radius: var(--oc-radius-lg); overflow: hidden; transition: border-color .2s; }
.tn-job:hover { border-color: var(--oc-ink); }
.tn-job:hover .svx-receipt__title a { color: var(--oc-orange-ink); }
.tn-job:has(a:focus-visible) { outline: 3px solid var(--oc-ink); outline-offset: 2px; }
.tn-job__media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.tn-job__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 3.2vw, 44px); }
.tn-job__body .oc-h2 { margin-bottom: 14px; }
.tn-job__text { max-width: 56ch; margin: 0 0 22px; color: var(--oc-text); text-wrap: pretty; }
.tn-job__receipt { padding-top: 16px; border-top: 1px solid var(--oc-line); }
@media (min-width: 768px) {
  .tn-job { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .tn-job__media img { height: 100%; min-height: 320px; aspect-ratio: auto; }
}

/* ---------------------------------------------------------------- who() links on a town page: a label that wraps keeps its arrow after
   the last word (an inline-flex link would push the arrow to the far edge of the column) */
.cx-who__go li { text-wrap: balance; }
.cx-who__go .oc-link-arrow { display: inline; line-height: 1.75; }
.cx-who__go .oc-link-arrow .ico { display: inline-block; vertical-align: -2px; margin-left: 2px; }

/* ---------------------------------------------------------------- a link inside a buildings row's facts reads as a link, not by colour only */
.cx-who__facts dd a { color: var(--oc-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--oc-orange); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- short lines that would end on one word: the "More to read" links,
   the real job's title, the FAQ questions (as the who() links above) */
.svx-guides__tile li { text-wrap: balance; }
.svx-guides__tile .oc-link-arrow { display: inline; line-height: 1.6; }
.svx-guides__tile .oc-link-arrow .ico { display: inline-block; vertical-align: -2px; margin-left: 2px; }
.tn-job__receipt .svx-receipt__title { text-wrap: balance; }
.svx-faq .oc-faq__item summary { text-wrap: balance; }
