/* Geoffrey Tax Set-Aside Calculator
   ------------------------------------------------------------
   Brand hook: change these four variables (or pass accent="#hex"
   in the shortcode) and the whole widget follows. Fonts inherit
   from the active theme so it always sits naturally in the page. */

.gtc {
	--gtc-accent: #16324f;        /* headline panel + focus ring        */
	--gtc-accent-contrast: #ffffff;
	--gtc-ink: #1f2933;           /* primary text                       */
	--gtc-line: #d9dee4;          /* borders                            */
	--gtc-surface: #ffffff;
	--gtc-surface-alt: #f5f7f9;

	box-sizing: border-box;
	max-width: 860px;
	margin: 2rem auto;
	padding: 2rem;
	background: var(--gtc-surface);
	border: 1px solid var(--gtc-line);
	border-radius: 10px;
	color: var(--gtc-ink);
	font-size: 1rem;
	line-height: 1.5;
}
.gtc *, .gtc *::before, .gtc *::after { box-sizing: inherit; }

/* ---- header ---- */
.gtc-eyebrow {
	margin: 0 0 .25rem;
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gtc-accent);
	font-weight: 600;
}
.gtc-title {
	margin: 0 0 1.5rem;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	line-height: 1.25;
}

/* ---- layout ---- */
.gtc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}
@media (max-width: 700px) {
	.gtc { padding: 1.25rem; }
	.gtc-grid { grid-template-columns: 1fr; }
}

/* ---- inputs ---- */
.gtc-field { margin-bottom: 1.25rem; }
.gtc-fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.gtc-label {
	display: block;
	font-weight: 600;
	font-size: .92rem;
	margin-bottom: .4rem;
}
.gtc-income-row {
	display: flex;
	align-items: stretch;
	gap: .5rem;
}
.gtc-currency {
	display: flex;
	align-items: center;
	padding: 0 .25rem;
	font-weight: 600;
	color: var(--gtc-accent);
}
.gtc-input,
.gtc-select {
	font: inherit;
	color: inherit;
	background: var(--gtc-surface);
	border: 1px solid var(--gtc-line);
	border-radius: 6px;
	padding: .55rem .7rem;
	min-width: 0;
}
.gtc-input { flex: 1 1 auto; }
.gtc-select-wide { width: 100%; }
.gtc-input:focus-visible,
.gtc-select:focus-visible,
.gtc-check input:focus-visible,
.gtc-segment-opt input:focus-visible {
	outline: 2px solid var(--gtc-accent);
	outline-offset: 2px;
}
.gtc-note {
	margin: .35rem 0 0;
	font-size: .8rem;
	color: #5b6773;
}

/* segmented employee / sole trader control */
.gtc-segment {
	display: flex;
	border: 1px solid var(--gtc-line);
	border-radius: 6px;
	overflow: hidden;
}
.gtc-segment-opt {
	flex: 1;
	text-align: center;
	padding: .5rem .4rem;
	font-size: .88rem;
	cursor: pointer;
	background: var(--gtc-surface-alt);
	position: relative;
}
.gtc-segment-opt + .gtc-segment-opt { border-left: 1px solid var(--gtc-line); }
.gtc-segment-opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.gtc-segment-opt:has(input:checked) {
	background: var(--gtc-accent);
	color: var(--gtc-accent-contrast);
	font-weight: 600;
}
/* :has() fallback — modern browsers only lose the highlight, not the function */

.gtc-checks { display: grid; gap: .6rem; }
.gtc-check {
	display: flex;
	gap: .55rem;
	align-items: flex-start;
	font-size: .92rem;
	cursor: pointer;
}
.gtc-check input { margin-top: .2rem; }

/* ---- results ---- */
.gtc-results {
	background: var(--gtc-surface-alt);
	border: 1px solid var(--gtc-line);
	border-radius: 8px;
	padding: 1.25rem;
	align-self: start;
}
.gtc-headline {
	background: var(--gtc-accent);
	color: var(--gtc-accent-contrast);
	border-radius: 6px;
	padding: 1rem 1.15rem 1.1rem;
	margin-bottom: 1rem;
}
.gtc-headline-label {
	margin: 0;
	font-size: .8rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .85;
}
.gtc-headline-figure {
	margin: .15rem 0 0;
	font-size: clamp(2rem, 5vw, 2.6rem);
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.gtc-headline-sub {
	margin: .3rem 0 0;
	font-size: .85rem;
	opacity: .85;
}

.gtc-lines { margin: 0; }
.gtc-line {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: .45rem 0;
	border-bottom: 1px solid var(--gtc-line);
	font-size: .95rem;
}
.gtc-line dt { margin: 0; }
.gtc-line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.gtc-line-total { font-weight: 700; }
.gtc-line-total dd { color: var(--gtc-accent); }
.gtc-line-quiet { border-bottom: 0; font-size: .85rem; color: #5b6773; }
.gtc-line-quiet dd { font-weight: 500; }

.gtc-assumptions {
	margin: .85rem 0 0;
	padding-left: 1.1rem;
	font-size: .8rem;
	color: #5b6773;
}
.gtc-assumptions li { margin-bottom: .3rem; }

.gtc-disclaimer {
	margin: 1.5rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--gtc-line);
	font-size: .78rem;
	color: #5b6773;
}

@media (prefers-reduced-motion: no-preference) {
	.gtc-headline-figure { transition: opacity .15s ease; }
}
