/*
 * IDH Broadband Toolkit
 *
 * Palette: the APWA utility locate-marking code, the paint sprayed on a verge
 * before anyone digs. Orange is the colour for telecommunications lines. It is
 * used here for exactly one thing - the coverage stripe - plus the focus ring.
 * It never touches a price, a button or a link, because on a site about deals
 * an orange price reads as a sales tactic and this tool is not selling.
 */

.idh-tool {
	--idh-ink: #17212B;
	--idh-slate: #5A6874;
	--idh-line: #E3E7EA;
	--idh-orange: #E8590C;
	--idh-green: #14705A;
	--idh-amber: #A15C07;
	--idh-bg: #FBFCFC;

	--idh-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
	--idh-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
	--idh-data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	font-family: var(--idh-body);
	color: var(--idh-ink);
	background: var(--idh-bg);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.idh-tool *,
.idh-tool *::before,
.idh-tool *::after {
	box-sizing: border-box;
}

.idh-tool :focus-visible {
	outline: 3px solid var(--idh-orange);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------------------------------------------------------------- form */

.idh-form {
	border: 1px solid var(--idh-line);
	border-top: 3px solid var(--idh-ink);
	background: #fff;
	padding: 28px 26px 22px;
}

.idh-headline {
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: clamp(26px, 4.2vw, 40px);
	line-height: 1.12;
	letter-spacing: -0.005em;
	margin: 0 0 10px;
	color: var(--idh-ink);
}

.idh-lede {
	margin: 0 0 22px;
	color: var(--idh-slate);
	max-width: 56ch;
	font-size: 16px;
}

.idh-label {
	display: block;
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: 15px;
	letter-spacing: 0.01em;
	margin-bottom: 8px;
}

.idh-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.idh-input {
	font-family: var(--idh-data);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: 26px;
	letter-spacing: 0.12em;
	width: 6.5ch;
	padding: 10px 12px;
	color: var(--idh-ink);
	background: #fff;
	border: 2px solid var(--idh-ink);
	border-radius: 0;
}

.idh-input::placeholder {
	color: #B8C0C7;
}

.idh-submit {
	font-family: var(--idh-body);
	font-weight: 600;
	font-size: 17px;
	padding: 10px 22px;
	color: #fff;
	background: var(--idh-ink);
	border: 2px solid var(--idh-ink);
	border-radius: 0;
	cursor: pointer;
}

.idh-submit:hover {
	background: #24313D;
	border-color: #24313D;
}

.idh-form.is-busy .idh-submit {
	opacity: 0.55;
	cursor: progress;
}

.idh-status {
	margin: 14px 0 0;
	min-height: 1.4em;
	color: var(--idh-slate);
	font-size: 15px;
}

.idh-status:empty {
	margin: 0;
	min-height: 0;
}

/* ------------------------------------------------------------- results */

.idh-results {
	margin-top: 26px;
}

.idh-results:focus {
	outline: none;
}

.idh-results-head {
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: 21px;
	margin: 0 0 4px;
}

.idh-place {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--idh-line);
}

.idh-place-zip {
	font-family: var(--idh-data);
	font-weight: 600;
	font-size: 18px;
	letter-spacing: 0.1em;
}

.idh-place-name {
	color: var(--idh-slate);
	font-size: 15px;
}

.idh-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@media (min-width: 760px) {
	.idh-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------- card */

.idh-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--idh-line);
	padding: 20px 20px 16px;
}

.idh-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.idh-card-who {
	min-width: 0;
}

.idh-provider {
	font-family: var(--idh-body);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.25;
	margin: 0;
	color: var(--idh-ink);
}

.idh-provider-meta {
	margin: 3px 0 0;
	font-size: 13px;
	color: var(--idh-slate);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.idh-price {
	margin: 0;
	text-align: right;
	flex: 0 0 auto;
}

.idh-price-figure {
	display: block;
	font-family: var(--idh-data);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: 28px;
	line-height: 1.05;
	color: var(--idh-ink);
}

.idh-price-open .idh-price-figure {
	font-size: 19px;
	color: var(--idh-amber);
}

.idh-price-term {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--idh-slate);
	max-width: 22ch;
}

.idh-price-open .idh-price-term {
	color: var(--idh-amber);
}

.idh-plan-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 14px 0 0;
}

.idh-plan-name {
	font-size: 16px;
}

.idh-speed {
	font-family: var(--idh-data);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	font-size: 15px;
	color: var(--idh-ink);
	white-space: nowrap;
}

.idh-speed-open {
	color: var(--idh-amber);
	font-family: var(--idh-body);
	font-size: 14px;
}

.idh-plan-line-open .idh-plan-name {
	color: var(--idh-slate);
}

.idh-plan-note,
.idh-card-note {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--idh-slate);
}

/* ------------------------------------------------------- coverage stripe */

/*
 * The signature. A utility locate marking: the painted dashes run as far as
 * the share of homes the provider told the FCC it reaches. The length is the
 * datum, not an ornament, so it is deliberately not animated.
 */

.idh-stripe-wrap {
	margin-top: auto;
	padding-top: 16px;
}

.idh-stripe {
	position: relative;
	height: 12px;
	margin-bottom: 7px;
}

.idh-stripe::before {
	content: "";
	position: absolute;
	inset: 5px 0 auto 0;
	height: 2px;
	background: var(--idh-line);
}

.idh-stripe-paint {
	position: absolute;
	top: 0;
	left: 0;
	height: 12px;
	max-width: 100%;
	background-image: repeating-linear-gradient(90deg, var(--idh-orange) 0 9px, rgba(232, 89, 12, 0) 9px 15px);
}

.idh-stripe-caption {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--idh-slate);
}

.idh-stripe-caption-open {
	color: var(--idh-amber);
}

/* ----------------------------------------------------------- extra plans */

.idh-more {
	list-style: none;
	margin: 12px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--idh-line);
}

.idh-more li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 3px 0;
	font-size: 15px;
}

.idh-more-name {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--idh-slate);
}

.idh-more-price {
	font-family: var(--idh-data);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	font-size: 15px;
}

.idh-more-price-open {
	font-family: var(--idh-body);
	font-size: 13px;
	color: var(--idh-amber);
}

/* ---------------------------------------------------------- card footer */

.idh-card-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--idh-line);
}

.idh-phone {
	font-family: var(--idh-data);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: 18px;
	color: var(--idh-ink);
	text-decoration: none;
	border-bottom: 2px solid var(--idh-ink);
	padding-bottom: 1px;
}

.idh-phone:hover {
	color: var(--idh-green);
	border-bottom-color: var(--idh-green);
}

.idh-phone-open {
	font-family: var(--idh-body);
	font-size: 14px;
	font-weight: 400;
	color: var(--idh-amber);
	border-bottom: 0;
}

.idh-textlink {
	font-size: 14px;
	color: var(--idh-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.idh-textlink:hover {
	color: var(--idh-green);
}

.idh-stamp {
	flex: 1 0 100%;
	font-size: 12px;
	color: var(--idh-slate);
	letter-spacing: 0.02em;
}

/* ------------------------------------------------- notices and fallbacks */

.idh-notice {
	border: 1px solid var(--idh-line);
	border-left: 4px solid var(--idh-amber);
	background: #fff;
	padding: 16px 18px;
	margin: 0 0 18px;
}

.idh-notice-head {
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--idh-amber);
}

.idh-notice-body {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--idh-slate);
}

.idh-notice-body:last-child {
	margin-bottom: 0;
}

.idh-empty {
	margin: 0 0 18px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--idh-line);
	color: var(--idh-slate);
	font-size: 15px;
}

.idh-open {
	color: var(--idh-amber);
	font-size: 14px;
}

/* ------------------------------------------------------- also filed list */

.idh-extra {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--idh-line);
}

.idh-extra-head {
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: 16px;
	margin: 0 0 6px;
}

.idh-extra-intro {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--idh-slate);
	max-width: 62ch;
}

.idh-extra-list {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: 28px;
}

.idh-extra-list li {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0;
	border-bottom: 1px solid var(--idh-line);
	break-inside: avoid;
	font-size: 15px;
}

.idh-extra-pct {
	font-family: var(--idh-data);
	font-variant-numeric: tabular-nums;
	font-size: 14px;
	color: var(--idh-slate);
}

@media (max-width: 620px) {
	.idh-extra-list {
		columns: 1;
	}
}

/* ---------------------------------------------------------- disclaimers */

.idh-disclaimer {
	margin-top: 24px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--idh-line);
	font-size: 14px;
	line-height: 1.55;
	color: var(--idh-slate);
}

.idh-disclaimer p {
	margin: 0 0 8px;
}

.idh-disclaimer p:last-child {
	margin-bottom: 0;
}

.idh-affiliate {
	color: var(--idh-ink);
}

.idh-compact-note {
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--idh-slate);
}

.idh-caveats {
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--idh-line);
}

.idh-caveats-head {
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: 17px;
	margin: 0 0 14px;
}

.idh-caveats dl {
	margin: 0;
	display: grid;
	gap: 16px;
}

@media (min-width: 860px) {
	.idh-caveats dl {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.idh-caveats dt {
	font-weight: 600;
	font-size: 15px;
	margin-bottom: 4px;
}

.idh-caveats dd {
	margin: 0;
	font-size: 14px;
	color: var(--idh-slate);
}

/* --------------------------------------------------------------- tables */

.idh-table-wrap {
	overflow-x: auto;
}

.idh-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 15px;
}

.idh-table th {
	text-align: left;
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--idh-slate);
	border-bottom: 2px solid var(--idh-ink);
	padding: 10px 12px;
}

.idh-table td {
	padding: 12px;
	border-bottom: 1px solid var(--idh-line);
	vertical-align: top;
}

.idh-cell-strong {
	display: block;
	font-weight: 600;
}

.idh-cell-sub {
	display: block;
	font-size: 13px;
	color: var(--idh-slate);
}

.idh-cell-figure {
	font-family: var(--idh-data);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
	.idh-table thead {
		display: none;
	}

	.idh-table tr {
		display: block;
		border-bottom: 2px solid var(--idh-ink);
		padding: 8px 0;
	}

	.idh-table td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		border: 0;
		padding: 5px 12px;
	}

	.idh-table td::before {
		content: attr(data-label);
		font-size: 12px;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		color: var(--idh-slate);
		flex: 0 0 auto;
	}
}

/* --------------------------------------------------------------- motion */

/*
 * One reveal, once, when results land. Nothing else on the page moves.
 */

@media (prefers-reduced-motion: no-preference) {
	.idh-reveal .idh-card {
		animation: idh-rise 260ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
		animation-delay: var(--idh-delay, 0ms);
	}
}

@keyframes idh-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* -------------------------------------------------------------- compact */

.idh-tool-compact .idh-form {
	padding: 22px 22px 18px;
}

.idh-tool-compact .idh-headline {
	font-size: clamp(23px, 3.4vw, 31px);
}

.idh-tool-compact .idh-lede {
	margin-bottom: 18px;
	font-size: 15px;
}

/* ------------------------------------------------------------ theme reset */

/*
 * Astra styles inputs, buttons, headings, lists and tables site-wide. These
 * repeat at a higher specificity so the tool keeps its own typography without
 * resorting to !important, which would make the next person's life harder.
 */

.idh-tool .idh-input,
.idh-tool input[type="text"].idh-input {
	width: 6.5ch;
	max-width: 100%;
	height: auto;
	font-family: var(--idh-data);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.12em;
	padding: 10px 12px;
	color: var(--idh-ink);
	background: #fff;
	border: 2px solid var(--idh-ink);
	border-radius: 0;
	box-shadow: none;
}

.idh-tool .idh-input:focus {
	border-color: var(--idh-ink);
	box-shadow: none;
}

.idh-tool .idh-submit,
.idh-tool button.idh-submit {
	width: auto;
	height: auto;
	font-family: var(--idh-body);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	padding: 12px 22px;
	color: #fff;
	background: var(--idh-ink);
	border: 2px solid var(--idh-ink);
	border-radius: 0;
	box-shadow: none;
}

.idh-tool button.idh-submit:hover,
.idh-tool button.idh-submit:focus {
	color: #fff;
	background: #24313D;
	border-color: #24313D;
}

.idh-tool h2.idh-headline,
.idh-tool h2.idh-results-head,
.idh-tool h2.idh-caveats-head,
.idh-tool h3.idh-extra-head {
	font-family: var(--idh-display);
	font-weight: 600;
	font-stretch: 125%;
	color: var(--idh-ink);
}

.idh-tool h3.idh-provider {
	margin: 0;
	font-family: var(--idh-body);
	font-weight: 600;
	font-size: 19px;
	line-height: 1.25;
	color: var(--idh-ink);
}

.idh-tool ul.idh-more,
.idh-tool ul.idh-extra-list {
	list-style: none;
	padding-left: 0;
}

.idh-tool ul.idh-more li,
.idh-tool ul.idh-extra-list li {
	list-style: none;
	margin: 0;
}

.idh-tool table.idh-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.idh-tool a.idh-phone,
.idh-tool a.idh-textlink {
	box-shadow: none;
}

.idh-tool .idh-caveats dl,
.idh-tool .idh-caveats dd,
.idh-tool .idh-caveats dt {
	margin-left: 0;
}
