/* ZipScope Territory Finder (v0.3.1): order form, product page, report, print. */
.zs-terr-form, .zs-terr-report, .zs-terr-thanks, .zs-terr-unavailable, .zs-terr-intro, .zs-terr-builder {
	--zs-navy: #06172a;
	--zs-ink: #102238;
	--zs-muted: #52657a;
	--zs-line: #dbe7ef;
	--zs-soft: #f6fafc;
	--zs-blue: #2f6ff2;
	--zs-mint: #7ff0d4;
	--zs-good: #1a7f37;
	--zs-warn: #9a6700;
	--zs-bad: #b42318;
	color: var(--zs-ink);
	font-size: 16px;
	line-height: 1.55;
}

.zs-terr-form *, .zs-terr-report *, .zs-terr-intro *, .zs-terr-builder * { box-sizing: border-box; }
.zs-terr-form [hidden], .zs-terr-report [hidden] { display: none !important; }
.zs-terr-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- product page: pitch next to the image ---------- */
.zs-terr-intro { margin: 8px 0 0; }
.zs-terr-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.zs-terr-points li { position: relative; padding-left: 30px; color: var(--zs-ink); }
.zs-terr-points li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--zs-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%237ff0d4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.zs-terr-intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 12px; }
.zs-terr-jump.button { min-height: 48px; padding: 0 26px; display: inline-flex; align-items: center; font-size: 16px; }
.zs-terr-intro-sample a, .zs-terr-sample a { font-weight: 600; color: var(--zs-blue); }
.zs-terr-intro-note { margin: 0; font-size: 14px; color: var(--zs-muted); }

/* ---------- product page: full-width order form ---------- */
.zs-terr-builder { max-width: 1180px; margin: 48px auto 56px; padding: 32px; border-radius: 20px; background: var(--zs-soft); border: 1px solid var(--zs-line); scroll-margin-top: 90px; }
.zs-terr-builder-head { margin: 0 0 24px; max-width: 720px; }
.zs-terr-builder-head h2 { margin: 0 0 6px; font-size: 30px; line-height: 1.2; color: var(--zs-navy); }
.zs-terr-builder-head p { margin: 0; color: var(--zs-muted); }
body.zs-terr-product .related.products, body.zs-terr-product .up-sells { display: none; }

/* ---------- form ---------- */
.zs-terr-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.zs-terr-step { background: #fff; border: 1px solid var(--zs-line); border-radius: 16px; padding: 22px 24px 8px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(6, 23, 42, .04); }
.zs-terr-step-head { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; }
.zs-terr-step-num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--zs-navy); color: var(--zs-mint); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.zs-terr-step-title { flex: 1 1 auto; min-width: 0; }
.zs-terr-step-title h3 { margin: 3px 0 2px; font-size: 19px; line-height: 1.3; color: var(--zs-navy); }
.zs-terr-step-extra { flex: 0 0 auto; }
.zs-terr-optional { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--zs-soft); border: 1px solid var(--zs-line); font-size: 12px; font-weight: 600; color: var(--zs-muted); vertical-align: middle; }
.zs-terr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.zs-terr-field { margin: 0 0 18px; }
.zs-terr-field > label, .zs-terr-label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 6px; color: var(--zs-ink); }
.zs-terr-form select, .zs-terr-form input[type="text"] { width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #a9b8c6; border-radius: 10px; font-size: 16px; background-color: #fff; color: var(--zs-ink); }
.zs-terr-form select:focus, .zs-terr-form input[type="text"]:focus { outline: none; border-color: var(--zs-blue); box-shadow: 0 0 0 3px rgba(47, 111, 242, .18); }
.zs-terr-form input::placeholder { color: #8a9aab; }
.zs-terr-input { position: relative; display: block; }
.zs-terr-form .zs-terr-unit-money input { padding-left: 26px; }
.zs-terr-unit-money::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--zs-muted); pointer-events: none; }
.zs-terr-form .zs-terr-unit-suffix input { padding-right: 68px; }
.zs-terr-unit-suffix::after { content: attr(data-unit); position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--zs-muted); font-size: 14px; pointer-events: none; }
.zs-terr-range { display: flex; align-items: center; gap: 12px; max-width: 520px; }
.zs-terr-range-part { flex: 1 1 0; min-width: 0; }
.zs-terr-range-sep { color: var(--zs-muted); font-size: 14px; }
.zs-terr-hint { margin: 4px 0 0; font-size: 14px; color: var(--zs-muted); line-height: 1.45; }
.zs-terr-error { margin: 4px 0 0; font-size: 14px; color: var(--zs-bad); font-weight: 600; }
.zs-terr-error:empty { display: none; }
.zs-terr-radius { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; color: var(--zs-muted); white-space: nowrap; }
.zs-terr-form .zs-terr-radius select { width: auto; min-height: 40px; padding: 4px 32px 4px 10px; font-weight: 600; color: var(--zs-navy); }

/* brand chips: one row per category */
.zs-terr-chips { display: grid; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--zs-line); }
.zs-terr-chip-group { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--zs-line); }
.zs-terr-chip-cat { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--zs-muted); }
.zs-terr-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.zs-terr-chip { position: relative; display: inline-flex; margin: 0; }
.zs-terr-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.zs-terr-chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #b8c6d3; border-radius: 999px; background: #fff; cursor: pointer; font-size: 15px; color: var(--zs-ink); transition: background .15s, border-color .15s; }
.zs-terr-chip span:hover { border-color: var(--zs-navy); }
.zs-terr-chip input:checked + span { background: var(--zs-navy); border-color: var(--zs-navy); color: #fff; }
.zs-terr-chip input:checked + span::before { content: "✓"; margin-right: 6px; color: var(--zs-mint); font-weight: 700; }
.zs-terr-chip input:focus-visible + span { outline: 3px solid var(--zs-blue); outline-offset: 2px; }

/* live count card */
.zs-terr-count { position: sticky; top: 100px; border-radius: 16px; padding: 22px; background: var(--zs-navy); color: #fff; box-shadow: 0 10px 30px rgba(6, 23, 42, .18); }
.zs-terr-count-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--zs-mint); }
.zs-terr-count-text { font-size: 21px; font-weight: 700; line-height: 1.3; margin: 0 0 16px; color: #fff; }
.zs-terr-count-text.is-zero { color: #ffb4ab; }
.zs-terr-count-text.is-loading { color: #b9c7d6; }
.zs-terr-includes { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, .15); display: grid; gap: 6px; font-size: 14px; color: #d6e1ec; }
.zs-terr-includes li::before { content: "✓"; color: var(--zs-mint); font-weight: 700; margin-right: 8px; }
.zs-terr-ack { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; font-size: 15px; color: #fff; }
.zs-terr-ack input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.zs-terr-form .zs-terr-submit { width: 100%; min-height: 52px; font-size: 16px !important; font-weight: 700; border-radius: 10px; }
.zs-terr-submit[disabled] { opacity: .45; cursor: not-allowed; }
.zs-terr-delivery { font-size: 13px; color: #b9c7d6; margin: 10px 0 0; text-align: center; }
.zs-terr-count .zs-terr-sample { margin: 12px 0 0; text-align: center; font-size: 14px; }
.zs-terr-count .zs-terr-sample a { color: var(--zs-mint); }
.zs-terr-unavailable, .zs-terr-notice { border: 1px solid var(--zs-line); border-radius: 12px; padding: 20px; background: var(--zs-soft); }
.zs-terr-ok { color: var(--zs-good); font-weight: 600; }

@media (max-width: 960px) {
	.zs-terr-form { grid-template-columns: 1fr; }
	.zs-terr-count { position: sticky; top: auto; bottom: 0; z-index: 20; border-radius: 14px 14px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(6, 23, 42, .25); }
	.zs-terr-count-label, .zs-terr-includes, .zs-terr-delivery, .zs-terr-count .zs-terr-sample { display: none; }
	.zs-terr-count-text { font-size: 16px; margin-bottom: 10px; }
	.zs-terr-form .zs-terr-submit { min-height: 48px; }
	/* Leave room for the site's chat bubble (bottom right) so it doesn't cover the checkout button. */
	body.zs-terr-product .zs-terr-count { padding-right: 84px; }
}
@media (max-width: 700px) {
	.zs-terr-builder { padding: 20px 14px; margin: 32px 0 40px; border-radius: 16px; }
	.zs-terr-builder-head h2 { font-size: 24px; }
	.zs-terr-step { padding: 18px 16px 4px; }
	.zs-terr-step-head { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; }
	.zs-terr-step-extra { grid-column: 2; margin-top: 10px; }
	.zs-terr-grid2 { grid-template-columns: 1fr; }
	.zs-terr-chip-group { grid-template-columns: 1fr; gap: 8px; }
	.zs-terr-chip span { min-height: 44px; }
}

/* ---------- thank-you ---------- */
.zs-terr-thanks { border: 1px solid var(--zs-line); border-radius: 12px; padding: 16px 18px; margin: 0 0 16px; background: #fff; }
.zs-terr-steps { display: flex; gap: 10px; list-style: none; padding: 0; margin: 8px 0 12px; flex-wrap: wrap; }
.zs-terr-steps li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--zs-line); font-size: 14px; color: var(--zs-muted); }
.zs-terr-steps li.is-done { color: var(--zs-good); border-color: var(--zs-good); }
.zs-terr-steps li.is-current { color: #fff; background: var(--zs-navy); border-color: var(--zs-navy); }

/* ---------- report ---------- */
.zs-terr-report { max-width: 1100px; margin: 0 auto; }
.zs-terr-sample-banner { position: sticky; top: 0; z-index: 30; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; margin: 0 0 16px; background: var(--zs-mint); color: var(--zs-navy); border-radius: 10px; font-weight: 600; }
.zs-terr-cover { background: var(--zs-navy); color: #fff; border-radius: 14px; padding: 28px 30px; margin: 0 0 24px; }
.zs-terr-cover h1 { color: #fff; margin: 4px 0 8px; font-size: 34px; line-height: 1.15; }
.zs-terr-kicker { margin: 0; color: var(--zs-mint); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.zs-terr-answer { font-size: 22px; font-weight: 700; margin: 0 0 14px; line-height: 1.3; }
.zs-terr-chips-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.zs-terr-chips-row li { padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; font-size: 14px; }
.zs-terr-actions { margin: 8px 0 0; }
.zs-terr-section { margin: 0 0 28px; }
.zs-terr-section h2 { font-size: 24px; margin: 0 0 12px; color: var(--zs-navy); }
.zs-terr-top-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.zs-terr-cards { display: grid; gap: 12px; }
.zs-terr-card { border: 1px solid var(--zs-line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.zs-terr-card h3 { margin: 0 0 6px; font-size: 18px; }
.zs-terr-card-rank { margin: 0; font-size: 13px; font-weight: 700; color: var(--zs-muted); }
.zs-terr-fit { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
.zs-terr-fit-num { font-size: 30px; font-weight: 800; color: var(--zs-navy); }
.zs-terr-band { font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.zs-terr-band-strong { color: var(--zs-good); }
.zs-terr-band-good { color: var(--zs-blue); }
.zs-terr-band-fair { color: var(--zs-warn); }
.zs-terr-band-promising { color: var(--zs-blue); }
.zs-terr-band-mixed { color: var(--zs-warn); }
.zs-terr-band-weak { color: #b42318; }
.zs-terr-subs { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 2px; font-size: 15px; }
.zs-terr-subs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--zs-line); }
.zs-terr-subs-inline { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 24px; }
.zs-terr-facts, .zs-terr-commentary { margin: 6px 0 0; font-size: 15px; color: var(--zs-muted); }
.zs-terr-commentary { color: var(--zs-ink); }
.zs-terr-map-wrap .zs-map { border-radius: 12px; border: 1px solid var(--zs-line); }
.zs-map-unavailable { display: flex; align-items: center; justify-content: center; min-height: 200px; background: var(--zs-soft); color: var(--zs-muted); }
.zs-terr-map-key { display: none; }
.zs-terr-note { font-size: 15px; color: var(--zs-muted); }
.zs-terr-warn { color: var(--zs-warn); font-weight: 600; }
.zs-terr-table-wrap { overflow-x: auto; }
.zs-terr-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.zs-terr-table th { text-align: left; background: var(--zs-soft); border-bottom: 2px solid var(--zs-line); padding: 8px 10px; font-size: 14px; }
.zs-terr-table td { border-bottom: 1px solid var(--zs-line); padding: 8px 10px; vertical-align: top; }
.zs-terr-table tr.is-flash td { background: #fff7d6; transition: background .3s; }
.zs-terr-muted { color: var(--zs-muted); font-size: 14px; }
.zs-terr-more-btn { min-height: 36px; padding: 0 12px; border: 1px solid #a9b8c6; border-radius: 8px; background: #fff; cursor: pointer; }
.zs-terr-more td { background: var(--zs-soft); }
.zs-terr-criteria { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.zs-terr-criteria dt { font-weight: 700; }
.zs-terr-criteria dd { margin: 0; }
.zs-terr-deep { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zs-terr-tracked { margin: 0 0 0 18px; }
.zs-terr-disclaimer { font-size: 14px; color: var(--zs-muted); border-top: 1px solid var(--zs-line); padding-top: 12px; }

@media (max-width: 760px) {
	.zs-terr-cover { padding: 20px; }
	.zs-terr-cover h1 { font-size: 28px; }
	.zs-terr-answer { font-size: 19px; }
	.zs-terr-top-grid { grid-template-columns: 1fr; }
	.zs-terr-table thead { display: none; }
	.zs-terr-table, .zs-terr-table tbody, .zs-terr-table tr, .zs-terr-table td { display: block; width: 100%; }
	.zs-terr-table tr { border: 1px solid var(--zs-line); border-radius: 12px; margin: 0 0 12px; padding: 8px 12px; background: #fff; }
	.zs-terr-table tr.zs-terr-more { margin-top: -10px; border-top: 0; border-radius: 0 0 12px 12px; }
	.zs-terr-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
	.zs-terr-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--zs-muted); }
	.zs-terr-table td[data-label="City / Metro"], .zs-terr-table td[data-label="Median income"], .zs-terr-table td[data-label="Nearest competitor"], .zs-terr-table td[data-label="Pop."] { display: none; }
	.zs-terr-table tr.zs-terr-more td { display: block; }
	.zs-terr-criteria { grid-template-columns: 1fr; }
}

/* ---------- print: the browser's "Save as PDF" is the PDF ---------- */
@media print {
	@page { size: letter; margin: 12mm; }
	body * { visibility: visible; }
	header.site-header, footer.site-footer, #wpadminbar, .no-print, .zs-terr-sample-banner .button { display: none !important; }
	.zs-terr-report { max-width: none; font-size: 11pt; }
	.zs-terr-cover { background: #fff; color: var(--zs-navy); border: 2px solid var(--zs-navy); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.zs-terr-cover h1, .zs-terr-chips-row li { color: var(--zs-navy); border-color: var(--zs-navy); }
	.zs-terr-kicker { color: var(--zs-navy); }
	.zs-terr-top-grid { grid-template-columns: 1fr; }
	.zs-terr-map-wrap { break-before: page; }
	.zs-terr-map-wrap .zs-map { height: 520px !important; }
	.zs-terr-map-key { display: block; columns: 3; font-size: 10pt; }
	.zs-terr-table-section { break-before: page; }
	.zs-terr-table { font-size: 9.5pt; }
	.zs-terr-table thead { display: table-header-group; }
	.zs-terr-table tr { break-inside: avoid; page-break-inside: avoid; }
	.zs-terr-table tr.zs-terr-more { display: none !important; }
	.zs-terr-card { break-inside: avoid; }
	.zs-terr-section { break-inside: auto; }
	a[href]::after { content: none !important; }
}
