/* ==========================================================================
   LLC Age Gap Calculator
   Brand: #0F172A (brand + text) · #7C3AED (alternate brand)
   Light surface. All tokens scoped to .agc-app.
   ========================================================================== */

.agc-app {
	--agc-font: inherit;
	--agc-display: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;

	--agc-ink: #0f172a;
	--agc-ink-soft: #1e293b;

	--agc-violet: #7c3aed;
	--agc-violet-d: #6d28d9;
	--agc-violet-l: #a78bfa;
	--agc-violet-soft: #f5f3ff;
	--agc-violet-line: #ddd6fe;

	--agc-surface: #ffffff;
	--agc-surface-2: #f8fafc;
	--agc-border: #e2e8f0;
	--agc-muted: #475569;
	--agc-dim: #94a3b8;

	--agc-good: #10b981;
	--agc-good-soft: #ecfdf5;
	--agc-good-line: #a7f3d0;
	--agc-warn: #e11d48;
	--agc-warn-soft: #fff1f2;
	--agc-warn-line: #fecdd3;

	--agc-r: 14px;
}

.agc-app,
.agc-app *,
.agc-app *::before,
.agc-app *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.agc-app {
	max-width: 620px;
	margin: 32px auto;
	font-family: var(--agc-font);
	color: var(--agc-ink);
	background: var(--agc-surface);
	border: 1px solid var(--agc-border);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .07);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* font inherits, colour deliberately NOT set here so button rules can win */
.agc-app button,
.agc-app input {
	font-family: inherit;
}

.agc-app input[type="text"],
.agc-app input[type="date"] { color: var(--agc-ink); }

.agc-app :focus-visible {
	outline: 2px solid var(--agc-violet);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ============ HEADER ============ */

.agc-header {
	padding: 32px 26px 24px;
	text-align: center;
	background: linear-gradient(180deg, var(--agc-violet-soft) 0%, var(--agc-surface) 100%);
	border-bottom: 1px solid var(--agc-border);
}

.agc-title {
	font-family: var(--agc-display);
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.12;
	margin-bottom: 8px;
}

.agc-sub {
	font-size: 15px;
	color: var(--agc-muted);
	max-width: 42ch;
	margin: 0 auto;
}

/* ============ FORM ============ */

.agc-body,
.agc-results { padding: 24px 26px 28px; }

.agc-people {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: end;
	gap: 12px;
}

.agc-person { display: grid; gap: 9px; min-width: 0; }

.agc-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--agc-ink);
}

.agc-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	background: var(--agc-surface-2);
	border: 1.5px solid var(--agc-border);
	border-radius: 10px;
	transition: border-color .18s, background .18s;
}

.agc-input::placeholder { color: var(--agc-dim); }

.agc-input:focus {
	border-color: var(--agc-violet);
	background: var(--agc-surface);
	outline: none;
}

.agc-input.is-bad { border-color: var(--agc-warn); background: var(--agc-warn-soft); }

.agc-date { font-family: var(--agc-display); font-weight: 500; }

.agc-amp {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 44px;
}

.agc-amp span {
	font-family: var(--agc-display);
	font-size: 20px;
	font-weight: 600;
	color: var(--agc-dim);
}

.agc-error {
	margin-top: 14px;
	padding: 11px 14px;
	border-radius: 10px;
	background: var(--agc-warn-soft);
	border: 1px solid var(--agc-warn-line);
	color: #9f1239;
	font-size: 13.5px;
	font-weight: 500;
}

.agc-error[hidden] { display: none; }

.agc-go {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 16px;
	border: none;
	border-radius: 11px;
	background: var(--agc-violet);
	color: #fff;
	font-family: var(--agc-display);
	font-size: 16.5px;
	font-weight: 600;
	letter-spacing: -.01em;
	cursor: pointer;
	transition: background .2s, transform .2s, box-shadow .2s;
	box-shadow: 0 4px 14px rgba(124, 58, 237, .25);
}

.agc-go:hover {
	background: var(--agc-violet-d);
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(124, 58, 237, .32);
}

.agc-note {
	margin-top: 14px;
	text-align: center;
	font-size: 12px;
	line-height: 1.55;
	color: var(--agc-dim);
}

/* ============ RESULTS ============ */

.agc-results[hidden] { display: none; }

.agc-gap-card {
	background: var(--agc-ink);
	border-radius: 18px;
	padding: 28px 24px 26px;
	text-align: center;
	margin-bottom: 12px;
}

.agc-gap-kicker {
	font-size: 13px;
	font-weight: 600;
	color: var(--agc-violet-l);
	margin-bottom: 6px;
}

.agc-gap-num {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 10px;
	font-family: var(--agc-display);
	color: #fff;
}

.agc-gap-num > span:first-child {
	font-size: 66px;
	font-weight: 700;
	letter-spacing: -.04em;
	line-height: 1;
}

.agc-gap-unit { font-size: 22px; font-weight: 500; color: #cbd5e1; }

.agc-gap-exact {
	margin-top: 10px;
	font-size: 14px;
	color: #cbd5e1;
}

/* two age boxes */
.agc-ages {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 12px;
}

.agc-age-box {
	background: var(--agc-surface-2);
	border: 1px solid var(--agc-border);
	border-radius: var(--agc-r);
	padding: 16px 18px;
	text-align: center;
}

.agc-age-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--agc-muted);
	margin-bottom: 4px;
	overflow-wrap: break-word;
}

.agc-age-num {
	font-family: var(--agc-display);
	font-size: 34px;
	font-weight: 700;
	letter-spacing: -.03em;
	line-height: 1.1;
	color: var(--agc-ink);
}

.agc-age-meta {
	font-size: 12.5px;
	color: var(--agc-dim);
	margin-top: 2px;
}

/* verdict */
.agc-verdict-card[hidden] { display: none; }

.agc-verdict-card {
	background: var(--agc-violet-soft);
	border: 1px solid var(--agc-violet-line);
	border-radius: var(--agc-r);
	padding: 20px 22px;
	margin-bottom: 12px;
	text-align: center;
}

.agc-verdict-title {
	font-family: var(--agc-display);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--agc-violet-d);
	margin-bottom: 7px;
	line-height: 1.25;
}

.agc-verdict-text {
	font-size: 14.5px;
	line-height: 1.62;
	color: var(--agc-ink-soft);
	max-width: 46ch;
	margin: 0 auto;
}

/* guard notice for under-18 input */
.agc-guard {
	background: var(--agc-warn-soft);
	border: 1px solid var(--agc-warn-line);
	border-radius: var(--agc-r);
	padding: 18px 20px;
	margin-bottom: 12px;
}

.agc-guard[hidden] { display: none; }

.agc-guard p {
	font-size: 14px;
	line-height: 1.62;
	color: #9f1239;
}

/* generic content block */
.agc-block {
	background: var(--agc-surface);
	border: 1px solid var(--agc-border);
	border-radius: var(--agc-r);
	padding: 20px 22px;
	margin-bottom: 12px;
}

.agc-block[hidden] { display: none; }

.agc-block h4 {
	font-family: var(--agc-display);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -.01em;
	margin-bottom: 6px;
}

.agc-block-intro {
	font-size: 13.5px;
	color: var(--agc-muted);
	line-height: 1.6;
	margin-bottom: 16px;
}

/* rule rows */
.agc-rule-row {
	padding: 14px 0;
	border-top: 1px solid var(--agc-border);
}

.agc-rule-row:first-of-type { border-top: none; padding-top: 0; }
.agc-rule-row:last-child { padding-bottom: 0; }

.agc-rule-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}

.agc-rule-head > span:first-child {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--agc-ink);
	min-width: 0;
	overflow-wrap: break-word;
}

.agc-pill {
	flex-shrink: 0;
	padding: 4px 11px;
	border-radius: 50px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.agc-pill.is-pass {
	background: var(--agc-good-soft);
	border: 1px solid var(--agc-good-line);
	color: #047857;
}

.agc-pill.is-fail {
	background: var(--agc-warn-soft);
	border: 1px solid var(--agc-warn-line);
	color: #9f1239;
}

.agc-rule-detail {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--agc-muted);
}

/* life stages */
.agc-stages { list-style: none; margin-top: 10px; }

.agc-stages li {
	position: relative;
	padding: 11px 0 11px 26px;
	border-top: 1px solid var(--agc-border);
	font-size: 14px;
	line-height: 1.55;
	color: var(--agc-ink-soft);
}

.agc-stages li:first-child { border-top: none; }

.agc-stages li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 19px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--agc-violet);
}

.agc-stages strong { font-weight: 700; color: var(--agc-ink); }

/* actions */
.agc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.agc-btn {
	flex: 1 1 160px;
	padding: 14px;
	border-radius: 11px;
	font-family: var(--agc-display);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s;
}

.agc-btn-share {
	border: none;
	background: var(--agc-ink);
	color: #fff;
}

.agc-btn-share:hover { background: var(--agc-ink-soft); transform: translateY(-1px); }

.agc-btn-ghost {
	background: var(--agc-surface);
	border: 1.5px solid var(--agc-border);
	color: var(--agc-muted);
}

.agc-btn-ghost:hover { border-color: var(--agc-violet); color: var(--agc-violet-d); }

/* ============ RESPONSIVE ============ */

@media (max-width: 560px) {
	.agc-app { margin: 20px auto; border-radius: 16px; }
	.agc-header { padding: 26px 18px 20px; }
	.agc-title { font-size: 26px; }
	.agc-body, .agc-results { padding: 20px 16px 24px; }

	.agc-people { grid-template-columns: 1fr; gap: 16px; }
	.agc-amp { width: 100%; height: auto; }
	.agc-amp span { font-size: 16px; }

	.agc-gap-num > span:first-child { font-size: 54px; }
	.agc-ages { grid-template-columns: 1fr; }
	.agc-verdict-title { font-size: 20px; }
}

/* ============ MOTION PREFERENCES ============ */

@media (prefers-reduced-motion: reduce) {
	.agc-app *,
	.agc-app *::before,
	.agc-app *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}
