.gctp {
	--gctp-blue: #2685C7;
	--gctp-blue-dark: #1C6CA4;
	--gctp-ink: #1F2124;
	--gctp-muted: #5B6470;
	--gctp-line: #DDE3EA;
	--gctp-soft: #F3F7FB;
	max-width: 760px;
	margin: 0 auto;
	color: var(--gctp-ink);
	font-family: inherit;
	box-sizing: border-box;
}
.gctp *, .gctp *::before, .gctp *::after { box-sizing: border-box; }
.gctp-head { text-align: center; margin-bottom: 20px; }
.gctp-title { margin: 0 0 6px; font-size: 1.75rem; line-height: 1.25; }
.gctp-sub { margin: 0; color: var(--gctp-muted); }

.gctp-form { background: #fff; border: 1px solid var(--gctp-line); border-radius: 8px; padding: 24px; }
.gctp-step { border: 0; margin: 0 0 20px; padding: 0 0 20px; border-bottom: 1px solid var(--gctp-line); min-width: 0; }
.gctp-step:last-of-type { border-bottom: 0; padding-bottom: 0; }
.gctp-step legend { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; margin-bottom: 12px; padding: 0; }
.gctp-num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--gctp-blue); color: #fff; font-size: .85rem; align-items: center; justify-content: center; }
.gctp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gctp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; position: relative; }
.gctp-field label, .gctp-label { font-weight: 600; font-size: .9rem; margin: 0; }
.gctp-label { margin: 6px 0 8px; }
.gctp-field input, .gctp-field select {
	width: 100%; padding: 10px 12px; font-size: 1rem; border: 1px solid #C5CED8; border-radius: 6px; background: #fff; color: var(--gctp-ink);
}
.gctp-field input:focus, .gctp-field select:focus, .gctp-check input:focus-visible, .gctp-btn:focus-visible {
	outline: 3px solid rgba(38, 133, 199, .35); outline-offset: 1px; border-color: var(--gctp-blue);
}
.gctp-hint { margin: 2px 0 0; font-size: .85rem; color: var(--gctp-muted); min-height: 1em; }

.gctp-suggest {
	position: absolute; top: 72px; left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: 4px 0;
	background: #fff; border: 1px solid var(--gctp-line); border-radius: 6px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); max-height: 280px; overflow: auto;
}
.gctp-suggest[hidden] { display: none; }
.gctp-opt { padding: 9px 12px; cursor: pointer; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.gctp-opt:hover, .gctp-opt.is-active { background: var(--gctp-soft); }
.gctp-opt-meta { margin-left: auto; color: var(--gctp-muted); font-size: .85rem; }
.gctp-opt-none { cursor: default; color: var(--gctp-muted); font-size: .9rem; }

.gctp-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.gctp-check { display: flex; align-items: flex-start; gap: 8px; font-size: .95rem; cursor: pointer; line-height: 1.35; }
.gctp-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gctp-blue); flex: none; }

.gctp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.gctp-error { background: #FDECEC; color: #8A1C1C; border: 1px solid #F3C2C2; border-radius: 6px; padding: 10px 12px; margin: 0 0 14px; }
.gctp-error[hidden], .gctp-field[hidden] { display: none; }

.gctp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.gctp-btn {
	display: inline-block; background: var(--gctp-blue); color: #fff !important; border: 0; border-radius: 6px; padding: 12px 22px;
	font-size: 1rem; font-weight: 700; text-decoration: none !important; cursor: pointer; line-height: 1.2;
}
.gctp-btn:hover { background: var(--gctp-blue-dark); }
.gctp-btn[disabled] { opacity: .65; cursor: progress; }
.gctp-btn-ghost { background: transparent; color: var(--gctp-blue) !important; border: 1px solid var(--gctp-blue); }
.gctp-btn-ghost:hover { background: var(--gctp-soft); }

.gctp-result { outline: none; }
.gctp-result-title { margin: 0 0 14px; font-size: 1.35rem; }
.gctp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.gctp-tile { border: 1px solid var(--gctp-line); border-radius: 6px; padding: 12px 14px; background: #fff; }
.gctp-tile span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gctp-muted); font-weight: 700; }
.gctp-tile strong { display: block; font-size: 1.4rem; margin-top: 2px; }
.gctp-tile.is-total { background: var(--gctp-blue); border-color: var(--gctp-blue); color: #fff; }
.gctp-tile.is-total span { color: #DCEBF7; }
.gctp-next { background: var(--gctp-soft); border-left: 4px solid var(--gctp-blue); padding: 12px 14px; margin: 0 0 14px; }
.gctp-frame { width: 100%; min-height: 900px; border: 1px solid var(--gctp-line); border-radius: 8px; margin-top: 16px; background: #EEF2F6; }

@media (max-width: 640px) {
	.gctp-form { padding: 16px; }
	.gctp-grid, .gctp-checks, .gctp-tiles { grid-template-columns: 1fr; }
	.gctp-btn { width: 100%; text-align: center; }
}

.gctp-researching { text-align: center; padding: 40px 24px !important; }
.gctp-researching .gctp-research-status { color: var(--gctp-muted); max-width: 520px; margin: 0 auto; }
.gctp-spinner { width: 40px; height: 40px; margin: 0 auto 16px; border: 4px solid var(--gctp-soft); border-top-color: var(--gctp-blue); border-radius: 50%; animation: gctp-spin .9s linear infinite; }
@keyframes gctp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gctp-spinner { animation-duration: 3s; } }

/* ---- Town confirmation card (population is shown, never typed) ---- */
.gctp-towncard { margin-top: 10px; border: 1px solid #CFE2F3; background: var(--gctp-soft); border-radius: 8px; padding: 12px 14px; }
.gctp-towncard[hidden] { display: none; }
.gctp-towncard-name { font-size: 1.05rem; margin-bottom: 8px; }
.gctp-towncard-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gctp-chip { display: inline-block; background: var(--gctp-blue); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 600; }
.gctp-chip-soft { background: #fff; color: var(--gctp-ink); border: 1px solid var(--gctp-line); font-weight: 500; }
.gctp-towncard-src { margin-top: 8px; font-size: .8rem; color: var(--gctp-muted); }
.gctp-towncard-src:empty { display: none; }

.gctp-hint:empty { display: none; }

/* ---- Thank-you after submitting ---- */
.gctp-thanks { background: #fff; border: 1px solid var(--gctp-line); border-radius: 8px; padding: 48px 28px !important; text-align: center; outline: none; }
.gctp-thanks-icon { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--gctp-blue); position: relative; }
.gctp-thanks-icon::after { content: ""; position: absolute; left: 19px; top: 15px; width: 16px; height: 24px; border-right: 4px solid #fff; border-bottom: 4px solid #fff; transform: rotate(45deg); }
.gctp-thanks .gctp-result-title { font-size: 1.5rem; margin: 0 0 8px; }
.gctp-thanks-text { color: var(--gctp-muted); margin: 0 auto; max-width: 520px; }
.gctp-thanks-text:empty { display: none; }

/* Proposal mode (v2.3): the proposal shown on the page after Submit. */
.gctp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.gctp-actions .gctp-btn { text-decoration: none; display: inline-block; }
.gctp-btn-ghost:hover { background: var(--gctp-soft); }
.gctp-result .gctp-frame { min-height: 600px; display: block; }
@media (max-width: 640px) { .gctp-actions .gctp-btn { flex: 1 1 100%; text-align: center; } }

/* Shown until the form script runs (v2.4.1). The help line appears only if it never does. */
.gctp-loading { text-align: center; padding: 32px 16px; color: var(--gctp-muted, #5B6470); border: 1px solid var(--gctp-line, #DDE3EA); border-radius: 8px; background: #fff; }
.gctp-loading-help { display: block; max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; animation: gctp-help-in .4s ease 12s forwards; }
.gctp-loading-help small { display: block; margin-top: 10px; text-align: left; }
@keyframes gctp-help-in { to { max-height: 400px; opacity: 1; margin-top: 10px; } }

/* On-page estimate heading (v2.5). */
.gctp-result > .gctp-result-title { font-size: 1.6rem; margin: 0 0 4px; }
.gctp-result-place { margin: 0 0 14px; color: var(--gctp-muted, #5B6470); }
