/* "Left each month after tax & rent": map metric chips, listing cards, the role
   comparison and the "How we estimate" disclosure, in the site's existing tokens. */
.hero-map [hidden], .afford-section [hidden], .afford-card-grid [hidden], .estimate-note [hidden] { display: none !important; }

/* Map metric toggle */
.map-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 2px; }
.map-metrics button, .afford-role-chips button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 20px; background: var(--white); color: var(--ink); font-size: .74rem; font-weight: 650; cursor: pointer; }
.map-metrics button:hover, .afford-role-chips button:hover { border-color: var(--blue); }
.map-metrics button[aria-pressed='true'], .afford-role-chips button[aria-pressed='true'] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.map-metrics button:focus-visible, .afford-role-chips button:focus-visible, .afford-retry:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.map-metrics button:disabled { cursor: not-allowed; opacity: .45; }
.map-region.is-missing .map-land { fill: url(#heroMapNoData); }
.map-region.is-loading .map-land { fill: #e3e2dc; }
.map-hatch-bg { fill: #ebe8e0; }
.map-hatch-line { stroke: #bdb8ab; stroke-width: 2.4; }
.map-missing-key { display: inline-flex; align-items: center; gap: 5px; }
.map-missing-key i { display: inline-block; width: 12px; height: 9px; border: 1px solid #bdb8ab; background: repeating-linear-gradient(45deg, #ebe8e0 0 2px, #bdb8ab 2px 3.5px); }
.map-note { margin: -10px 0 14px; color: #6d5a2a; font-size: .68rem; text-align: right; }
.map-region-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0 0; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.2); }
.map-region-facts div { min-width: 0; }
.map-region-facts dt { color: #c3d6cb; font-size: .64rem; line-height: 1.3; }
.map-region-facts dd { margin: 3px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.map-region-basis { margin: 9px 0 0; color: #c3d6cb; font-size: .64rem; }
.map-region-basis:empty { display: none; }
/* The hero's paragraph rule is broad; these small notes keep their own scale. */
body.home-route .home-hero .map-region-basis, body.home-route .home-hero .map-note, body.home-route .home-hero .estimate-body p { max-width: none; line-height: 1.5; }
body.home-route .home-hero .map-region-basis { margin: 9px 0 0; color: #c3d6cb; font-size: .64rem; }
body.home-route .home-hero .map-note { color: #6d5a2a; font-size: .68rem; }
body.home-route .home-hero .estimate-body p { margin: 6px 0; color: var(--muted); font-size: .72rem; }
body.home-route .home-hero .estimate-body .estimate-sources-title { color: var(--ink); }

/* How we estimate */
.estimate-note { margin-top: 10px; font-size: .72rem; line-height: 1.5; color: var(--muted); }
.estimate-note summary { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.estimate-note summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.estimate-body { max-width: 760px; padding: 4px 0 2px; }
.estimate-body p { margin: 6px 0; }
.estimate-body ul { margin: 4px 0 8px; padding-left: 18px; }
.estimate-body li { margin: 3px 0; }
.estimate-sources-title { font-weight: 700; color: var(--ink); }
.estimate-body a { color: var(--ink); text-underline-offset: 2px; }
.afford-list-note { padding: 0 15px; }

/* Listing cards */
.afford-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(270px, calc((100% - 36px) / 3))), 1fr)); gap: 18px; align-items: stretch; }
.job-list.afford-card-grid { padding: 16px 14px 18px; }
.job-list.afford-card-grid > .empty { grid-column: 1 / -1; }
.job-card.afford-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); box-shadow: 0 1px 0 rgba(38,32,22,.04); cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.job-card.afford-card:hover { padding: 20px; border-color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.job-card.afford-card:focus-within { border-color: var(--blue); }
.afford-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.afford-card .job-main { min-width: 0; }
.afford-card .job-title { margin: 0 0 4px; font-size: 19px; line-height: 1.2; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.afford-card .job-open { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.afford-card .job-open:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }
.afford-card .job-open:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.afford-card .job-company { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.afford-card-meta { margin: 3px 0 0; color: var(--faint); font-size: 12px; }
/* Overnight/night chip: small moon + word beside the job title. */
.job-title .schedule-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border: 1px solid rgba(23,63,54,.28); border-radius: 12px; background: rgba(23,63,54,.06); color: var(--ink); font-size: 11px; font-weight: 650; letter-spacing: .02em; vertical-align: 2px; white-space: nowrap; }
.job-title .schedule-chip svg { width: 11px; height: 11px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.job-title .schedule-chip.is-pool { border-color: rgba(156,103,29,.4); background: rgba(156,103,29,.08); }
.job-title .schedule-chip.is-ai { border-color: rgba(35,110,70,.35); background: rgba(35,110,70,.08); }
.job-title .schedule-chip.is-ai svg { fill: none; stroke: #236e46; }
.job-title .schedule-chip.is-mixed { border-color: rgba(70,70,80,.28); background: rgba(70,70,80,.07); }
.job-title .schedule-chip.is-mixed svg { stroke: #464650; }
.afford-card .job-side { flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; text-align: right; }
.afford-band { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 14px 16px; border-radius: 3px; background: var(--blue); color: var(--white); }
.afford-band-label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #d1e0d7; font-size: 13px; }
.afford-est { padding: 1px 5px; border: 1px solid rgba(255,255,255,.4); border-radius: 2px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.afford-band-value { font-family: Georgia, 'Times New Roman', serif; font-size: 28px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.afford-band-value span { margin-left: 1px; color: #d1e0d7; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.afford-card.is-no_pay .afford-band, .afford-card.is-pending .afford-band { background: var(--paper-deep); color: var(--ink); }
.afford-card.is-no_pay .afford-band-label, .afford-card.is-pending .afford-band-label { color: var(--ink); font-weight: 700; }
.afford-band-value.is-empty { color: var(--muted); font-size: 22px; }
.afford-band-note { margin: -6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.afford-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.afford-facts div { min-width: 0; }
.afford-facts dt { color: var(--muted); font-size: 12px; }
.afford-facts dd { margin: 2px 0 0; color: var(--ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.afford-facts small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.3; }
.afford-benefits { display: grid; gap: 7px; }
.afford-benefits-title { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.afford-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.afford-chips li { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid rgba(200,55,59,.25); border-radius: 20px; background: rgba(200,55,59,.07); color: var(--red-dark); font-size: 12px; font-weight: 600; }
.afford-chips svg { flex: 0 0 11px; width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.afford-none { margin: 0; color: var(--muted); font-size: 12px; }
.afford-card-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.afford-compare-link { color: var(--ink); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.afford-compare-link:hover { color: var(--red-dark); }
.afford-compare-link:focus-visible, .afford-strip-foot a:focus-visible, .afford-sources a:focus-visible, .estimate-body a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.afford-empty { grid-column: 1 / -1; margin: 0; padding: 28px 18px; border: 1px dashed var(--rule); color: var(--muted); font-size: 13px; text-align: center; }
.afford-strip-foot { display: flex; justify-content: flex-end; margin-top: 16px; font-size: 13px; font-weight: 700; }
.afford-strip-foot a { color: var(--ink); text-underline-offset: 4px; }

/* Role comparison */
.afford-compare { display: grid; gap: 16px; padding: 22px 24px; }
.afford-compare-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.afford-role-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.afford-role-chips button { font-size: .8rem; }
.afford-compare-key { color: var(--muted); font-size: 12px; }
.afford-status { margin: 0; color: var(--muted); font-size: 13px; }
.afford-status:empty { display: none; }
.afford-retry { margin-left: 4px; padding: 4px 10px; border: 1px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink); font: inherit; cursor: pointer; }
.afford-bars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.afford-bar-row { display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) minmax(92px, auto); grid-template-areas: 'city track value' '. detail detail'; align-items: center; gap: 3px 14px; }
.afford-bar-city { grid-area: city; display: flex; align-items: baseline; gap: 6px; font-weight: 650; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.afford-bar-city small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.afford-bar-track { grid-area: track; height: 26px; border-radius: 2px; background: var(--paper-deep); overflow: hidden; }
.afford-bar-fill { display: block; height: 100%; width: 0; background: #6f9884; }
.afford-bar-row.is-top .afford-bar-fill { background: var(--blue); }
.afford-bar-value { grid-area: value; font-family: Georgia, 'Times New Roman', serif; font-size: 19px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.afford-bar-row.is-top .afford-bar-value { color: var(--blue); }
.afford-bar-row.is-negative .afford-bar-value { color: var(--red-dark); }
.afford-bar-detail { grid-area: detail; color: var(--muted); font-size: 11.5px; }
/* Switching roles: old bars stay and dim while loading, then each bar eases to its new
   width. Opacity and color fades are not motion; the width change only runs when the
   visitor has not asked for reduced motion. */
.afford-bars { --afford-ease-out: cubic-bezier(0.23, 1, 0.32, 1); transition: opacity 180ms var(--afford-ease-out); }
.afford-bars[aria-busy='true'] { opacity: .5; }
.afford-bar-row { transition: opacity 220ms var(--afford-ease-out); }
.afford-bar-row.is-entering { opacity: 0; }
.afford-bar-fill, .afford-bar-value { transition: background-color 220ms var(--afford-ease-out), color 220ms var(--afford-ease-out); }
.afford-insight { transition: opacity 220ms var(--afford-ease-out); }
@media (prefers-reduced-motion: no-preference) {
  .afford-bar-fill { transition: width 300ms var(--afford-ease-out), background-color 220ms var(--afford-ease-out); }
}
.afford-insight { margin: 0; padding: 12px 14px; border-left: 3px solid var(--red); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
.afford-sources { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.afford-sources:empty { display: none; }
.afford-sources a { color: inherit; text-underline-offset: 2px; }

@media (max-width: 700px) {
  .map-metrics button { flex: 1 1 calc(50% - 6px); min-height: 40px; font-size: .78rem; }
  .map-note { text-align: left; margin-top: -6px; }
  .map-region-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .afford-compare { padding: 16px; }
  .afford-bar-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'city value' 'track track' 'detail detail'; gap: 4px 10px; }
  .afford-bar-track { height: 20px; }
  .afford-card .afford-band-value { font-size: 26px; }
  .afford-list-note { padding: 0 15px; }
  .job-list.afford-card-grid { padding: 14px 10px; }
  .job-card.afford-card, .job-card.afford-card:hover { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .job-card.afford-card { transition: none; }
}
.afford-strip .job-card.afford-card { cursor: default; }
