/* CTREB 30-Year Home Dashboard
   Scoped to .ctreb-dash so it plays nicely with the theme.
   No external fonts or libraries. */

.ctreb-dash {
	--ctreb-cream: #f6f0e6;
	--ctreb-paper: #fffaf3;
	--ctreb-panel: #efe6d6;
	--ctreb-ink: #2a2118;
	--ctreb-ink-soft: #5c4e3f;
	--ctreb-line: #d9ccb6;
	--ctreb-copper: #b4532a;
	--ctreb-copper-deep: #8c3d1c;
	--ctreb-forest: #3c5a40;
	--ctreb-forest-deep: #2a4130;
	--ctreb-gold: #c4a35a;
	--ctreb-bar-track: #e4d8c4;
	--ctreb-focus: #b4532a;
	--ctreb-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--ctreb-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--ctreb-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	box-sizing: border-box;
	max-width: 46rem;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 2rem;
	background: var(--ctreb-paper);
	color: var(--ctreb-ink);
	font-family: var(--ctreb-sans);
	font-size: 1rem;
	line-height: 1.55;
	border: 1px solid var(--ctreb-line);
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(42, 33, 24, 0.08);
}

.ctreb-dash *,
.ctreb-dash *::before,
.ctreb-dash *::after {
	box-sizing: border-box;
}

.ctreb-dash__status,
.ctreb-dash__error {
	margin: 0;
	padding: 0.25rem 0;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__error {
	color: var(--ctreb-copper-deep);
}

.ctreb-dash__eyebrow {
	margin: 0 0 0.35rem;
	font-family: var(--ctreb-sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ctreb-copper);
}

.ctreb-dash__address {
	margin: 0 0 0.35rem;
	font-family: var(--ctreb-serif);
	font-size: clamp(1.6rem, 3.5vw, 2.15rem);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ctreb-ink);
}

.ctreb-dash__address a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.ctreb-dash__address a:hover,
.ctreb-dash__address a:focus {
	border-bottom-color: var(--ctreb-copper);
}

.ctreb-dash__price {
	margin: 0 0 0.65rem;
	font-family: var(--ctreb-serif);
	font-size: clamp(1.35rem, 2.5vw, 1.7rem);
	font-weight: 600;
	color: var(--ctreb-copper-deep);
}

.ctreb-dash__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.25rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	color: var(--ctreb-ink-soft);
	font-size: 0.95rem;
}

.ctreb-dash__facts li:not(:last-child)::after {
	content: "·";
	margin: 0 0.45rem;
	color: var(--ctreb-gold);
}

.ctreb-dash__story {
	margin: 0 0 1.5rem;
	padding: 1rem 1.1rem;
	background: var(--ctreb-cream);
	border-left: 4px solid var(--ctreb-copper);
	border-radius: 0 10px 10px 0;
	font-family: var(--ctreb-serif);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--ctreb-ink);
}

.ctreb-dash__story p {
	margin: 0;
}

.ctreb-dash__controls {
	display: grid;
	gap: 1rem;
	margin: 0 0 1.25rem;
}

.ctreb-dash__legend {
	display: block;
	margin: 0 0 0.45rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
	min-inline-size: 0;
}

.ctreb-dash__toggle {
	appearance: none;
	margin: 0;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--ctreb-line);
	border-radius: 999px;
	background: var(--ctreb-cream);
	color: var(--ctreb-ink);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
}

.ctreb-dash__toggle:hover {
	border-color: var(--ctreb-copper);
}

.ctreb-dash__toggle[aria-pressed="true"] {
	background: var(--ctreb-forest);
	border-color: var(--ctreb-forest);
	color: #fffaf3;
}

.ctreb-dash__toggle:focus-visible,
.ctreb-dash__address a:focus-visible,
.ctreb-dash__source-list a:focus-visible {
	outline: 3px solid var(--ctreb-focus);
	outline-offset: 2px;
}

.ctreb-dash__levels .ctreb-dash__toggle {
	flex: 1 1 8rem;
	border-radius: 10px;
	text-align: left;
}

.ctreb-dash__level-kicker {
	display: block;
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.8;
	margin-bottom: 0.15rem;
}

.ctreb-dash__hero {
	margin: 0 0 1.25rem;
	padding: 1.15rem 1.2rem 1.2rem;
	background: linear-gradient(180deg, var(--ctreb-cream) 0%, #efe4cf 100%);
	border-radius: 12px;
	border: 1px solid var(--ctreb-line);
}

.ctreb-dash__hero-label {
	margin: 0 0 0.2rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__hero-amount {
	margin: 0;
	font-family: var(--ctreb-serif);
	font-size: clamp(2.1rem, 6vw, 2.8rem);
	font-weight: 600;
	line-height: 1.1;
	color: var(--ctreb-ink);
}

.ctreb-dash__hero-sub {
	margin: 0.35rem 0 0;
	color: var(--ctreb-ink-soft);
	font-size: 0.95rem;
}

.ctreb-dash__breakdown {
	width: 100%;
	margin: 0.9rem 0 0;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.ctreb-dash__breakdown th,
.ctreb-dash__breakdown td {
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--ctreb-line);
	text-align: left;
	font-weight: 400;
}

.ctreb-dash__breakdown td:last-child,
.ctreb-dash__compare td:last-child,
.ctreb-dash__compare th:not(:first-child) {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.ctreb-dash__breakdown tr:last-child th,
.ctreb-dash__breakdown tr:last-child td {
	border-bottom: 0;
	padding-top: 0.55rem;
	font-weight: 700;
}

.ctreb-dash__section-title {
	margin: 0 0 0.55rem;
	font-family: var(--ctreb-serif);
	font-size: 1.35rem;
	font-weight: 600;
}

.ctreb-dash__equity {
	margin: 0 0 1.5rem;
}

.ctreb-dash__bar {
	position: relative;
	height: 1.15rem;
	margin: 0.85rem 0 1.6rem;
	background: var(--ctreb-bar-track);
	border-radius: 999px;
	overflow: visible;
}

.ctreb-dash__bar-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ctreb-forest) 0%, #5c8a58 100%);
	transition: width 0.45s ease;
}

.ctreb-dash__ticks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.ctreb-dash__tick {
	position: absolute;
	top: 100%;
	transform: translateX(-50%);
	margin-top: 0.35rem;
	font-size: 0.72rem;
	color: var(--ctreb-ink-soft);
	white-space: nowrap;
}

.ctreb-dash__tick::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 100%;
	width: 2px;
	height: 0.55rem;
	margin-bottom: 0.35rem;
	background: var(--ctreb-ink);
	opacity: 0.35;
	transform: translateX(-50%);
}

.ctreb-dash__equity-caption {
	margin: 0;
	color: var(--ctreb-ink-soft);
	font-size: 0.95rem;
}

.ctreb-dash__equity-amount {
	display: block;
	margin-bottom: 0.15rem;
	font-family: var(--ctreb-serif);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ctreb-forest-deep);
}

.ctreb-dash__milestones {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.ctreb-dash__milestone {
	margin: 0;
	padding: 0.75rem 0.85rem;
	background: var(--ctreb-cream);
	border: 1px solid var(--ctreb-line);
	border-radius: 10px;
	text-align: left;
	font-family: inherit;
	color: inherit;
	cursor: pointer;
	width: 100%;
}

.ctreb-dash__milestone:hover {
	border-color: var(--ctreb-forest);
}

.ctreb-dash__milestone[aria-pressed="true"] {
	background: #e7efe4;
	border-color: var(--ctreb-forest);
	box-shadow: inset 0 0 0 1px var(--ctreb-forest);
}

.ctreb-dash__ms-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ctreb-ink-soft);
	margin-bottom: 0.2rem;
}

.ctreb-dash__ms-value {
	display: block;
	font-family: var(--ctreb-serif);
	font-size: 1.15rem;
	font-weight: 600;
}

.ctreb-dash__compare-wrap {
	margin: 0 0 1.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ctreb-dash__compare {
	width: 100%;
	min-width: 28rem;
	border-collapse: collapse;
	font-size: 0.92rem;
}

.ctreb-dash__compare caption {
	caption-side: top;
	text-align: left;
	margin: 0 0 0.55rem;
	font-family: var(--ctreb-serif);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--ctreb-ink);
}

.ctreb-dash__compare th,
.ctreb-dash__compare td {
	padding: 0.45rem 0.55rem;
	border-bottom: 1px solid var(--ctreb-line);
	vertical-align: bottom;
}

.ctreb-dash__compare thead th {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ctreb-ink-soft);
	font-weight: 700;
}

.ctreb-dash__compare tbody th {
	text-align: left;
	font-weight: 500;
	color: var(--ctreb-ink-soft);
	padding-left: 0;
}

.ctreb-dash__compare .is-total td,
.ctreb-dash__compare .is-total th {
	font-weight: 700;
	color: var(--ctreb-ink);
	border-bottom-width: 2px;
}

.ctreb-dash__sources {
	margin: 0 0 0.85rem;
	padding: 0.9rem 0 0;
	border-top: 1px solid var(--ctreb-line);
	font-size: 0.85rem;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__sources h3 {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__source-list {
	margin: 0;
	padding-left: 1.1rem;
}

.ctreb-dash__source-list a {
	color: var(--ctreb-copper-deep);
}

.ctreb-dash__disclaimer {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ctreb-ink-soft);
}

.ctreb-dash__broker {
	margin: 0.65rem 0 0;
	font-size: 0.8rem;
	color: var(--ctreb-ink-soft);
}

@media (max-width: 560px) {
	.ctreb-dash {
		padding: 1.15rem 0.9rem 1.5rem;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	.ctreb-dash__milestones {
		grid-template-columns: 1fr;
	}

	.ctreb-dash__levels .ctreb-dash__toggle {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ctreb-dash__bar-fill {
		transition: none;
	}
}
