/* The explore results page (step 2.9): the site's own look (Manrope, JetBrains Mono eyebrows,
   DataWorks blue and orange), the answer first and large, charts and measures under it.
   Chart internals come from chat/search-doc.css (.dws .chart, .legend). */
.xs-body { margin: 0; background: #FAFBFC; color: #0F1B2A; font-family: 'Manrope', -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.xs { max-width: 1040px; margin: 0 auto; padding: 28px 20px 64px; }
.xs h1, .xs h2, .xs h3 { text-wrap: balance; }

/* the question */
.xs-form { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #D0D5DD; border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: 0 1px 2px rgba(15,27,42,.04); }
.xs-form:focus-within { border-color: #2D6A99; box-shadow: 0 0 0 4px rgba(45,106,153,.12); }
.xs-form svg { color: #6A7585; flex: none; }
.xs-form input { flex: 1; min-width: 0; border: 0; outline: 0; font: 600 17px/1.4 'Manrope', sans-serif; color: #0F1B2A; background: transparent; padding: 8px 0; }
.xs-form button { border: 0; border-radius: 10px; background: #003A66; color: #fff; font: 700 14px 'Manrope', sans-serif; padding: 10px 18px; cursor: pointer; }
.xs-form button:hover { background: #2D6A99; }
.xs-read { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 4px 0; font-size: 13px; color: #3A4A5C; }
.xs-read__k, .xs-eyebrow, .xs-kicker, .xs-f-k { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.xs-read__k { color: #E8872A; }
.xs-read b { font-weight: 700; color: #6A7585; margin-right: 4px; }

/* empty page */
.xs-empty { padding: 48px 4px 8px; }
.xs-empty h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 800; color: #003A66; line-height: 1.15; margin: 8px 0 22px; max-width: 30ch; }
.xs-eyebrow { color: #E8872A; margin: 0; }
.xs-tries { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-tries a, .xs-chips a { border: 1px solid #D0D5DD; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: #2D6A99; text-decoration: none; }
.xs-tries a:hover, .xs-chips a:hover { border-color: #2D6A99; background: #E8F0F6; }

/* waiting */
.xs-loading { display: flex; gap: 18px; align-items: flex-start; margin-top: 28px; padding: 26px 28px; background: #fff; border: 1px solid #E4E7EC; border-radius: 16px; }
.xs-pulse { width: 14px; height: 14px; border-radius: 50%; background: #E8872A; margin-top: 4px; animation: xs-p 1.1s ease-in-out infinite; flex: none; }
@keyframes xs-p { 50% { transform: scale(.6); opacity: .5; } }
.xs-loading ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 600; color: #9AA4B2; }
.xs-loading li.now { color: #0F1B2A; } .xs-loading li.done { color: #1D8C6B; }
.xs-loading li.done::before { content: '✓ '; }
.xs-fail { margin-top: 28px; padding: 20px 24px; background: #FFF8EC; border: 1px solid #F3D9AE; border-radius: 14px; font-weight: 600; }
.xs-fail button { border: 0; background: #003A66; color: #fff; border-radius: 8px; padding: 6px 12px; font: 700 14px 'Manrope', sans-serif; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .xs-pulse { animation: none; } }

/* the answer */
.xs-answer { margin-top: 24px; background: #fff; border: 1px solid #E4E7EC; border-radius: 18px; padding: 26px 28px 22px; box-shadow: 0 8px 24px -16px rgba(0,58,102,.25); position: relative; overflow: hidden; }
.xs-answer::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#E8872A, #2D6A99); }
.xs-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 6px 0 4px; }
.xs-num { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; color: #003A66; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.xs-what { font-size: 15px; font-weight: 600; color: #3A4A5C; }
.xs-u { font-size: .45em; font-weight: 700; color: #6A7585; }
.xs-line { font-size: 18px; line-height: 1.55; color: #0F1B2A; margin: 10px 0 0; max-width: 68ch; }
.xs-answer--none .xs-line { font-size: 16px; color: #3A4A5C; }
.xs-facts { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #EEF1F4; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.xs-facts > li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: #3A4A5C; min-width: 0; }
.xs-facts b { font-size: 18px; color: #0F1B2A; font-variant-numeric: tabular-nums; }
.xs-f-k { color: #6A7585; font-size: 10.5px; }
.xs-f-note { font-size: 12px; color: #9AA4B2; }
.xs-f-list { flex-basis: 100%; }
.xs-f-list ol { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 0; max-width: 560px; }   /* one place a row: names never wrap */
.xs-f-list ol li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #E4E7EC; }
.xs-r-n { color: #9AA4B2; font-family: 'JetBrains Mono', monospace; font-size: 12px; text-align: right; }
.xs-r-place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0F1B2A; }
.xs-f-list ol li b { font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xs-src { margin: 14px 0 0; font-size: 12.5px; color: #6A7585; }
.xs-src a { color: #2D6A99; font-weight: 600; text-decoration: none; } .xs-src a:hover { color: #E8872A; }

/* charts */
.xs-charts { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }   /* full width: the charts' 900-unit drawings stay readable */
.xs-chart { margin: 0; background: #fff; border: 1px solid #E4E7EC; border-radius: 16px; padding: 18px 20px 16px; min-width: 0; }
.xs-chart figcaption { margin-bottom: 10px; }
.xs-kicker { color: #2D6A99; }
.xs-chart h3 { margin: 4px 0 0; font-size: 16px; font-weight: 700; color: #0F1B2A; line-height: 1.35; }
/* places by groups: scrolls sideways inside its card on a phone, never the page */
.xs-tbl { overflow-x: auto; margin: 4px 0 8px; }
.xs-tbl table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.xs-tbl th, .xs-tbl td { font-family: inherit; text-transform: none; letter-spacing: normal; padding: 7px 10px; border-bottom: 1px solid #E4E7EC; text-align: right; white-space: nowrap; }
.xs-tbl thead th { font-size: 12px; font-weight: 700; color: #3B4656; vertical-align: bottom; white-space: normal; min-width: 72px; }
.xs-tbl th[scope="row"], .xs-tbl thead th:first-child { text-align: left; font-weight: 600; color: #0F1B2A; position: sticky; left: 0; background: #fff; }
.xs-tbl td.xs-tbl__all { font-weight: 700; color: #0F1B2A; }
@media (max-width: 520px) { .xs-answer { padding: 22px 20px 18px; } }

/* more measures */
.xs-more h2, .xs-related h2 { font-size: 15px; font-weight: 800; color: #003A66; margin: 34px 0 12px; }
.xs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.xs-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: #fff; border: 1px solid #E4E7EC; border-radius: 14px; min-width: 0; }
.xs-card__main { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.xs-card__links { font-size: 12.5px; } .xs-card__links a { color: #2D6A99; font-weight: 600; text-decoration: none; } .xs-card__links a:hover { color: #E8872A; }
.xs-card:hover { border-color: #2D6A99; box-shadow: 0 6px 18px -12px rgba(0,58,102,.35); }
.xs-card__name { font-size: 13.5px; font-weight: 600; color: #3A4A5C; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xs-card__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 8px; min-width: 0; }
.xs-card__val { font-size: 22px; font-weight: 800; color: #003A66; font-variant-numeric: tabular-nums; }
.xs-card__date { font-size: 12px; color: #9AA4B2; }
.xs-spark { width: 96px; max-width: 100%; height: 28px; color: #2D6A99; flex: none; }
.xs-badge { align-self: flex-start; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.xs-badge--dataworks { background: #FDEBD8; color: #9A4E0A; }
.xs-badge--google { background: #E8F0F6; color: #1D5A88; }

/* related, meta */
.xs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xs-asks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.xs-asks a { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border: 1px solid #D0D5DD; border-radius: 10px; background: #fff; text-decoration: none; min-width: 0; }
.xs-asks a:hover { border-color: #2D6A99; background: #E8F0F6; }
.xs-asks a::before { content: "\2315"; color: #9AA4B2; flex: none; transform: scaleX(-1); }
.xs-asks__q { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: #2D6A99; overflow-wrap: anywhere; }

.xs-meta { margin-top: 34px; font-size: 12.5px; color: #6A7585; }
.xs-meta summary { cursor: pointer; font-family: 'JetBrains Mono', monospace; }
.xs-meta p { margin: 6px 0 0; font-family: 'JetBrains Mono', monospace; }
.xs-switch { margin-top: 10px; font-size: 13px; } .xs-switch a { color: #2D6A99; font-weight: 600; }

/* the FBI's caution beside any crime ranking (step 2.9) */
.xs-caution { margin: 16px 0 0; padding: 10px 14px; background: #FFF8EC; border: 1px solid #F3D9AE; border-radius: 10px; font-size: 13.5px; line-height: 1.5; color: #5A3A0E; max-width: 80ch; }
.xs-caution__k { display: block; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #B85C00; margin-bottom: 2px; }
.xs-caution a { color: #9A4E0A; font-weight: 700; }

/* downloads and Explorer links under every chart and the measures (step 2.9) */
.xs-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 12px; }
.xs-foot .xs-src { margin: 0; }
.xs-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.xs-more > .xs-tools { margin-top: 12px; }
.xs-tools a, .xs-tools button { color: #2D6A99; font: 600 13px 'Manrope', sans-serif; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.xs-tools a:hover, .xs-tools button:hover { color: #E8872A; text-decoration: underline; }
.xs-note { margin: 4px 0 0; font-size: 12.5px; color: #6A7585; }
.xs-missing { margin: 8px 0 0; padding: 8px 12px; background: #EEF2F6; border-radius: 8px; font-size: 14px; font-weight: 600; color: #3A4A5C; }

/* what a measure counts (step 2.9) */
.xs-about { margin: 12px 0 0; font-size: 13px; color: #3A4A5C; }
.xs-about summary { cursor: pointer; font-weight: 700; color: #2D6A99; }
.xs-about summary span { font-weight: 500; color: #6A7585; }
.xs-about p { margin: 6px 0 0; max-width: 80ch; line-height: 1.5; }
.xs-about__id code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; background: #EEF2F6; border-radius: 4px; padding: 1px 5px; }
.xs-card__unit { font-size: 11.5px; color: #6A7585; }

/* one header card per place when several are compared (step 2.9) */
.xs-pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.xs-pcard { background: #fff; border: 1px solid #E4E7EC; border-radius: 16px; padding: 20px 22px 16px; min-width: 0; box-shadow: 0 8px 24px -18px rgba(0,58,102,.25); border-top: 4px solid #E8872A; }
.xs-num--sm { font-size: clamp(2rem, 4.4vw, 2.6rem); }
.xs-pcard .xs-what { display: block; margin: 2px 0 0; }
.xs-facts--card { gap: 8px 20px; margin-top: 12px; padding-top: 12px; }
.xs-facts--card b { font-size: 16px; }

/* hover readouts and maps (step 2.9) */
.xs-tip { position: fixed; z-index: 50; pointer-events: none; background: #0F1B2A; color: #fff; font: 600 12.5px 'Manrope', sans-serif; padding: 6px 9px; border-radius: 6px; box-shadow: 0 6px 18px -8px rgba(0,0,0,.4); max-width: 320px; }
.xs-chart--map .chart svg path.tr:hover { stroke: #0F1B2A; stroke-width: 1.5; }

/* City+ reading in the answer (step 2.9) */
.xs-cp { margin: 16px 0 0; padding: 12px 14px; background: #EEF5FB; border: 1px solid #C9DCEC; border-radius: 10px; font-size: 14px; color: #0F1B2A; max-width: 80ch; }
.xs-cp__k { display: block; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #2D6A99; margin-bottom: 4px; }
.xs-cp p { margin: 4px 0; line-height: 1.5; }
.xs-cp a { color: #2D6A99; font-weight: 700; text-decoration: none; } .xs-cp a:hover { color: #E8872A; }

/* related measures offered when the answer is unsure (no data here, or a partial match) */
.xs-suggest { margin: 12px 0 4px; }
.xs-suggest__k { margin: 0 0 6px; font-size: 14px; color: var(--xs-ink-2, #3B4656); }
.xs-suggest ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.xs-suggest li { font-size: 14px; }
.xs-suggest a { font-weight: 500; }
.xs-suggest span { color: var(--xs-muted, #6A7585); margin-left: 6px; }
