.agp-depot {
	--agp-accent: var(--accent, #1e73be);
	--agp-pos: #10a37f;
	--agp-neg: #e5534b;
	--agp-muted: #6b7280;
	--agp-border: rgba(127, 127, 127, 0.25);
	margin: 1.5em 0;
	font-variant-numeric: tabular-nums;
}

/* Überschriften übernehmen die Gestaltung des Themes (h2/h3), nur Abstände werden gesetzt. */
.agp-depot .agp-title {
	margin: 0 0 0.6em;
}

.agp-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.75em;
	margin-bottom: 1em;
}

.agp-kpi {
	border: 1px solid var(--agp-border);
	border-radius: 6px;
	padding: 0.6em 0.8em;
}

.agp-kpi-label {
	display: block;
	font-size: 0.8em;
	color: var(--agp-muted);
}

.agp-kpi-value {
	display: block;
	font-size: clamp(1.05em, 2.4vw, 1.35em);
	font-weight: 700;
	white-space: nowrap;
}

.agp-pos { color: var(--agp-pos); }
.agp-neg { color: var(--agp-neg); }

.agp-chart {
	margin-bottom: 1em;
}

.agp-chart-head {
	display: flex;
	justify-content: space-between;
	font-size: 0.85em;
	margin-bottom: 0.4em;
}

.agp-chart-value {
	font-weight: 700;
}

.agp-chart-body {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 0.5em;
}

.agp-chart-plot {
	position: relative;
	grid-column: 1;
	grid-row: 1;
	touch-action: pan-y;
	cursor: crosshair;
}

.agp-chart svg {
	display: block;
	width: 100%;
	height: 200px;
}

.agp-area {
	fill: currentColor;
	opacity: 0.7;
}

.agp-grid {
	stroke: var(--agp-border);
	stroke-width: 1;
	opacity: 0.6;
}

.agp-zero {
	stroke: var(--agp-muted);
	stroke-width: 1;
	opacity: 0.6;
}

.agp-chart-scale {
	position: relative;
	grid-column: 2;
	grid-row: 1;
	width: 3.6em;
	height: 200px;
	font-size: 0.72em;
	color: var(--agp-muted);
}

.agp-chart-scale span {
	position: absolute;
	right: 0;
	transform: translateY(-50%);
	white-space: nowrap;
}

.agp-chart-axis {
	position: relative;
	grid-column: 1;
	grid-row: 2;
	height: 1.6em;
	font-size: 0.72em;
	color: var(--agp-muted);
}

.agp-chart-axis span {
	position: absolute;
	top: 0.4em;
	transform: translateX(-50%);
	white-space: nowrap;
}

.agp-hover {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.agp-hover[hidden] {
	display: none;
}

.agp-hover-line {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	background: var(--agp-muted);
	opacity: 0.6;
}

.agp-hover-dot {
	position: absolute;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.agp-hover-tip {
	position: absolute;
	top: 4px;
	margin-left: 8px;
	padding: 0.25em 0.55em;
	border-radius: 4px;
	background: rgba(17, 24, 39, 0.88);
	color: #fff;
	font-size: 0.75em;
	font-weight: 600;
	white-space: nowrap;
}

.agp-hover-tip-left {
	transform: translateX(-100%);
	margin-left: -8px;
}

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

.agp-depot .agp-table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	margin: 0;
	font-size: 0.95em;
}

.agp-depot .agp-table th,
.agp-depot .agp-table td {
	padding: 0.45em 0.5em;
	border: 0;
	border-bottom: 1px solid var(--agp-border);
	text-align: left;
	vertical-align: middle;
	background: none;
}

.agp-depot .agp-table th {
	font-size: 0.8em;
	color: var(--agp-muted);
	font-weight: 600;
}

.agp-depot .agp-table .agp-num {
	text-align: right;
	white-space: nowrap;
}

.agp-name div {
	display: flex;
	align-items: center;
	gap: 0.5em;
	min-height: 20px;
}

.agp-name img {
	border-radius: 4px;
	flex: none;
}

.agp-bar {
	display: inline-block;
	width: 60px;
	height: 6px;
	margin-right: 0.6em;
	vertical-align: middle;
	border-radius: 3px;
	background: rgba(127, 127, 127, 0.15);
	overflow: hidden;
}

.agp-bar span {
	display: block;
	height: 100%;
	border-radius: 3px;
	background: var(--agp-accent);
}

.agp-weight-num {
	display: inline-block;
	min-width: 4.6em;
}

@media (max-width: 520px) {
	.agp-bar {
		display: none;
	}
}

.agp-rest td {
	color: var(--agp-muted);
	font-style: italic;
}

.agp-meta {
	font-size: 0.75em;
	color: var(--agp-muted);
	margin: 0.75em 0 0;
}

.agp-meta a {
	color: inherit;
	text-decoration: underline;
}

/* Aktivitäten */
.agp-month {
	margin-bottom: 1.5em;
}

.agp-month-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25em 0.75em;
	font-size: 1em;
	margin: 0 0 0.5em;
}

.agp-month-head small {
	font-weight: 400;
	font-size: 0.8em;
	color: var(--agp-muted);
}

.agp-act-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--agp-border);
	border-radius: 8px;
}

.agp-act {
	display: grid;
	grid-template-columns: 7.5em 1fr auto;
	align-items: center;
	gap: 0.75em;
	margin: 0;
	padding: 0.7em 0.9em;
	border-bottom: 1px solid var(--agp-border);
}

.agp-act:last-child {
	border-bottom: 0;
}

.agp-act-when {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2em;
	font-size: 0.85em;
	color: var(--agp-muted);
}

.agp-badge {
	display: inline-block;
	padding: 0.05em 0.5em;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 600;
	background: rgba(127, 127, 127, 0.12);
	color: inherit;
}

.agp-badge-dividend,
.agp-badge-interest { background: #dcf5ea; color: #0b7a5a; }
.agp-badge-buy,
.agp-badge-transfer_in { background: #e0eefc; color: #1d5fa8; }
.agp-badge-sell,
.agp-badge-transfer_out { background: #fdecd9; color: #a4560c; }

.agp-act-asset {
	display: flex;
	align-items: center;
	gap: 0.75em;
	min-width: 0;
}

.agp-act-asset img {
	border-radius: 50%;
	flex: none;
}

.agp-act-meta {
	display: block;
	font-size: 0.75em;
	color: var(--agp-muted);
}

.agp-act-name {
	display: block;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.agp-act-result {
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 520px) {
	.agp-act {
		grid-template-columns: 1fr auto;
	}

	.agp-act-when {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		gap: 0.5em;
	}
}

/* Zeitraum-Umschalter (ohne JavaScript) */
.agp-tabs {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
}

.agp-tab-input {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	pointer-events: none;
}

.agp-tab {
	padding: 0.25em 0.8em;
	border: 1px solid var(--agp-border);
	border-radius: 999px;
	font-size: 0.85em;
	cursor: pointer;
	user-select: none;
}

.agp-tab-input:checked + .agp-tab {
	background: var(--agp-accent);
	border-color: var(--agp-accent);
	color: #fff;
}

.agp-tab-input:focus-visible + .agp-tab {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
}

.agp-panels {
	flex-basis: 100%;
	margin-top: 0.75em;
}

.agp-panel {
	display: none;
}
.agp-tabs > .agp-tab-input:nth-of-type(1):checked ~ .agp-panels > .agp-panel:nth-child(1),
.agp-tabs > .agp-tab-input:nth-of-type(2):checked ~ .agp-panels > .agp-panel:nth-child(2),
.agp-tabs > .agp-tab-input:nth-of-type(3):checked ~ .agp-panels > .agp-panel:nth-child(3),
.agp-tabs > .agp-tab-input:nth-of-type(4):checked ~ .agp-panels > .agp-panel:nth-child(4),
.agp-tabs > .agp-tab-input:nth-of-type(5):checked ~ .agp-panels > .agp-panel:nth-child(5),
.agp-tabs > .agp-tab-input:nth-of-type(6):checked ~ .agp-panels > .agp-panel:nth-child(6),
.agp-tabs > .agp-tab-input:nth-of-type(7):checked ~ .agp-panels > .agp-panel:nth-child(7),
.agp-tabs > .agp-tab-input:nth-of-type(8):checked ~ .agp-panels > .agp-panel:nth-child(8),
.agp-tabs > .agp-tab-input:nth-of-type(9):checked ~ .agp-panels > .agp-panel:nth-child(9),
.agp-tabs > .agp-tab-input:nth-of-type(10):checked ~ .agp-panels > .agp-panel:nth-child(10),
.agp-tabs > .agp-tab-input:nth-of-type(11):checked ~ .agp-panels > .agp-panel:nth-child(11),
.agp-tabs > .agp-tab-input:nth-of-type(12):checked ~ .agp-panels > .agp-panel:nth-child(12)
{
	display: block;
}

/* Übersicht mit Donut */
.agp-overview.agp-has-donut {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 1.25em;
	align-items: center;
	margin-bottom: 1em;
}

.agp-overview.agp-has-donut .agp-kpis {
	margin-bottom: 0;
}

.agp-donut svg {
	display: block;
	width: 100%;
	max-width: 180px;
	height: auto;
}

.agp-donut-num {
	font-size: 26px;
	font-weight: 700;
	fill: currentColor;
}

.agp-donut-label {
	font-size: 12px;
	fill: var(--agp-muted);
}

.agp-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: none;
}

@media (max-width: 560px) {
	.agp-overview.agp-has-donut {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.agp-overview.agp-has-donut .agp-kpis {
		width: 100%;
	}
}

/* Dividenden-Auswertung */
.agp-section {
	margin-bottom: 1.75em;
}

.agp-section-head {
	font-size: 1.05em;
	margin: 0 0 0.6em;
}

.agp-bars {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	height: 200px;
	padding-top: 1.4em;
	overflow-x: auto;
}

.agp-bar-col {
	flex: 1 0 32px;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: 3px;
}

.agp-bar-v {
	display: block;
	width: 100%;
	max-width: 44px;
	border-radius: 4px 4px 0 0;
	background: var(--agp-pos);
	opacity: 0.8;
}

.agp-bar-partial {
	opacity: 0.4;
}

.agp-bar-growth {
	font-size: 0.68em;
	font-weight: 600;
	white-space: nowrap;
}

.agp-bar-year {
	font-size: 0.72em;
	color: var(--agp-muted);
}

.agp-depot .agp-heat th,
.agp-depot .agp-heat td {
	text-align: center;
	padding: 0.35em 0.2em;
	font-size: 0.85em;
}

.agp-depot .agp-heat td {
	background: rgba(16, 163, 127, calc(var(--agp-heat) * 0.85));
	color: inherit;
	border: 2px solid transparent;
	background-clip: padding-box;
	min-width: 2em;
}

.agp-act-result small {
	display: block;
	font-size: 0.75em;
	font-weight: 400;
	color: var(--agp-muted);
	text-align: right;
}

/* Sortierbare Spalten */
.agp-depot .agp-sort {
	all: unset;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	font: inherit;
	color: inherit;
	white-space: nowrap;
}

.agp-depot .agp-sort:hover {
	color: var(--agp-accent);
}

.agp-depot .agp-sort:focus-visible {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.agp-depot .agp-sort::after {
	content: "↕";
	font-size: 0.9em;
	opacity: 0.35;
}

.agp-depot th[aria-sort="descending"] .agp-sort::after {
	content: "↓";
	opacity: 1;
}

.agp-depot th[aria-sort="ascending"] .agp-sort::after {
	content: "↑";
	opacity: 1;
}

.agp-depot th[aria-sort="descending"],
.agp-depot th[aria-sort="ascending"] {
	color: inherit;
}

/* Info-Box an Kennzahlen */
.agp-kpi {
	position: relative;
}

.agp-info {
	display: inline-block;
	vertical-align: 1px;
	margin-left: 0.2em;
}

.agp-depot .agp-info-btn {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 0.8em;
	font-weight: 700;
	font-style: italic;
	font-family: Georgia, serif;
	line-height: 1;
	color: var(--agp-muted);
	cursor: help;
	opacity: 0.8;
}

.agp-depot .agp-info-btn:hover,
.agp-depot .agp-info-btn:focus-visible {
	color: var(--agp-accent);
	opacity: 1;
}

.agp-depot .agp-info-btn:focus-visible {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
}

.agp-info-box {
	position: absolute;
	z-index: 20;
	top: calc(100% - 0.4em);
	left: -1px;
	right: -1px;
	min-width: 200px;
	padding: 0.6em 0.75em;
	border-radius: 6px;
	background: rgba(17, 24, 39, 0.94);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 400;
	font-style: normal;
	line-height: 1.45;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.12s, transform 0.12s, visibility 0.12s;
	pointer-events: none;
}

.agp-info:hover .agp-info-box,
.agp-info:focus-within .agp-info-box {
	opacity: 1;
	visibility: visible;
	transform: none;
}

@media (max-width: 600px) {
	.agp-info-box {
		min-width: 0;
	}
}

.agp-depot .agp-heat-plain td {
	height: 1.9em;
}

/* Dividendenkalender nach Monaten */
.agp-months {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.6em;
}

.agp-month-card {
	border: 1px solid var(--agp-border);
	border-radius: 8px;
	padding: 0.6em 0.7em 0.7em;
	min-height: 5.5em;
}

.agp-month-now {
	border-color: var(--agp-accent);
	box-shadow: inset 0 0 0 1px var(--agp-accent);
}

.agp-month-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-weight: 700;
	font-size: 0.9em;
	margin-bottom: 0.5em;
}

.agp-month-card-head small {
	font-weight: 400;
	color: var(--agp-muted);
}

.agp-depot .agp-month-logos,
.agp-depot .agp-month-names {
	list-style: none;
	margin: 0;
	padding: 0;
}

.agp-depot .agp-month-logos {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.agp-depot .agp-month-logos li {
	margin: 0;
	line-height: 0;
}

.agp-month-logos img,
.agp-month-initial {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 1px var(--agp-border);
	object-fit: contain;
}

.agp-month-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--agp-muted);
	background: rgba(127, 127, 127, 0.1);
}

.agp-depot .agp-month-names li {
	margin: 0;
	font-size: 0.8em;
	line-height: 1.5;
}

.agp-month-empty {
	margin: 0;
	color: var(--agp-muted);
}

/* Alle anzeigen */
.agp-more-wrap {
	margin: 0.6em 0 0;
	text-align: center;
}

.agp-depot .agp-more {
	padding: 0.45em 1.1em;
	border: 1px solid var(--agp-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.85em;
	cursor: pointer;
}

.agp-depot .agp-more:hover,
.agp-depot .agp-more:focus-visible {
	border-color: var(--agp-accent);
	color: var(--agp-accent);
}

.agp-depot .agp-more[disabled] {
	opacity: 0.6;
	cursor: progress;
}

/* Sofort sichtbarer Tooltip (Logo-Kalender) */
.agp-tip {
	position: relative;
	cursor: default;
}

.agp-tip::after {
	content: attr(data-tip);
	position: absolute;
	z-index: 20;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	padding: 0.3em 0.55em;
	border-radius: 4px;
	background: rgba(17, 24, 39, 0.92);
	color: #fff;
	font-size: 0.75rem;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.1s;
}

.agp-tip:hover::after,
.agp-tip:focus::after,
.agp-tip:focus-within::after {
	opacity: 1;
	visibility: visible;
}

.agp-tip:focus-visible {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
	border-radius: 50%;
}

.agp-page-note {
	margin-top: 1.5em;
}

/* Links zu Parqet-Asset-Seiten */
.agp-depot a.agp-asset-link {
	color: inherit;
	text-decoration: none;
}

.agp-depot a.agp-asset-link:hover,
.agp-depot a.agp-asset-link:focus-visible {
	color: var(--agp-accent);
	text-decoration: underline;
}

.agp-month-logos a {
	display: block;
	line-height: 0;
	border-radius: 50%;
}

.agp-month-logos a:focus-visible {
	outline: 2px solid var(--agp-accent);
	outline-offset: 2px;
}

/* Info-Symbol oben rechts neben dem Label (nicht umbrechend), Werte unten bündig */
.agp-kpi {
	display: flex;
	flex-direction: column;
}

.agp-kpi .agp-kpi-label {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.4em;
}

.agp-kpi .agp-info {
	flex: none;
	margin: 0.1em 0 0;
}

.agp-kpi .agp-kpi-value {
	margin-top: auto;
}

/* Dividendenkalender: Jahr umschalten */
.agp-months-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em 1em;
	margin-bottom: 0.6em;
}

.agp-months-head .agp-section-head {
	margin: 0;
}

.agp-year-nav {
	display: flex;
	gap: 0.35em;
}

.agp-depot .agp-year-btn {
	padding: 0.25em 0.8em;
	border: 1px solid var(--agp-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.85em;
	cursor: pointer;
}

.agp-depot .agp-year-btn:hover:not([disabled]),
.agp-depot .agp-year-btn:focus-visible {
	border-color: var(--agp-accent);
	color: var(--agp-accent);
}

.agp-depot .agp-year-btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.agp-month-future {
	opacity: 0.5;
	border-style: dashed;
}

.agp-months-section.agp-loading {
	opacity: 0.5;
	transition: opacity 0.15s;
}

/* Wo mein Depot liegt */
.agp-depot .agp-broker-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--agp-border);
	border-radius: 10px;
	background: var(--background-light, transparent);
}

.agp-depot .agp-broker {
	display: grid;
	grid-template-columns: 44px 1fr auto;
	align-items: center;
	gap: 1em;
	margin: 0;
	padding: 0.85em 1em;
	border-bottom: 1px solid var(--agp-border);
}

.agp-depot .agp-broker:last-child {
	border-bottom: 0;
}

.agp-broker-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75em;
}

.agp-broker-name {
	font-weight: 700;
	color: var(--dark, inherit);
}

.agp-broker-share {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.agp-depot .agp-broker-bar {
	display: block;
	width: 100%;
	margin: 0.4em 0 0.3em;
}

.agp-broker-count {
	font-size: 0.8em;
	color: var(--agp-muted);
}

.agp-depot .agp-broker-text {
	margin: 0.35em 0 0;
	font-size: 0.85em;
}

.agp-depot .agp-broker-cta,
.agp-depot .agp-broker-cta:visited {
	display: inline-block;
	padding: 0.5em 1em;
	border-radius: 6px;
	background: var(--accent, #C55632);
	color: #fff;
	font-size: 0.85em;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.agp-depot .agp-broker-cta:hover,
.agp-depot .agp-broker-cta:focus {
	color: #fff;
	filter: brightness(0.92);
}

.agp-broker-rest .agp-broker-name,
.agp-broker-rest .agp-broker-share {
	font-weight: 400;
	color: var(--agp-muted);
}

.agp-depot a.agp-broker-link {
	color: inherit;
	text-decoration: underline;
}

.agp-affiliate-note {
	margin-top: 0.3em;
}

@media (max-width: 520px) {
	.agp-depot .agp-broker {
		grid-template-columns: 36px 1fr;
	}

	.agp-depot .agp-broker-cta {
		grid-column: 2;
		justify-self: start;
	}

	.agp-broker-logo img,
	.agp-broker-initial {
		width: 36px;
		height: 36px;
	}
}

.agp-depot .agp-broker-logos {
	margin-top: 0.55em;
}


.agp-depot .agp-broker {
	align-items: start;
}

.agp-depot .agp-broker-cta {
	margin-top: 0.1em;
}

/* Tooltip per JavaScript (bleibt im sichtbaren Bereich); CSS-Variante nur ohne JavaScript */
.agp-js .agp-tip::after {
	display: none;
}

.agp-tooltip {
	position: fixed;
	z-index: 99999;
	display: none;
	max-width: min(280px, calc(100vw - 16px));
	padding: 0.35em 0.6em;
	border-radius: 5px;
	background: rgba(17, 24, 39, 0.94);
	color: #fff;
	font-size: 13px;
	line-height: 1.35;
	white-space: normal;
	pointer-events: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.agp-broker-logo img,
.agp-broker-initial {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: contain;
}

.agp-broker-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(127, 127, 127, 0.12);
	color: var(--agp-muted);
	font-weight: 700;
	font-size: 1.1em;
}

.agp-broker-logo img {
	background: #fff;
	box-shadow: 0 0 0 1px var(--agp-border);
}

/* Zahltag im Dividendenkalender */
.agp-depot .agp-month-logos li.agp-has-day {
	position: relative;
}

.agp-day {
	position: absolute;
	right: -4px;
	bottom: -4px;
	min-width: 15px;
	height: 15px;
	padding: 0 3px;
	border-radius: 8px;
	background: var(--dark, #222);
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
	box-shadow: 0 0 0 1.5px var(--background-light, #fff);
	pointer-events: none;
}

.agp-depot .agp-month-logos:has(.agp-has-day) {
	gap: 7px;
}

.agp-day-text {
	display: inline-block;
	min-width: 2.2em;
	color: var(--agp-muted);
	font-variant-numeric: tabular-nums;
}

/* Donut-Hover */
.agp-donut .agp-seg {
	cursor: pointer;
	transition: stroke-width 0.12s, opacity 0.12s;
}

.agp-donut svg:hover .agp-seg {
	opacity: 0.55;
}

.agp-donut svg:hover .agp-seg:hover {
	opacity: 1;
	stroke-width: 34;
}

/* Aufteilung */
.agp-stack {
	display: flex;
	height: 22px;
	border-radius: 6px;
	overflow: hidden;
	gap: 2px;
}

.agp-stack span {
	display: block;
	height: 100%;
	cursor: default;
}

.agp-depot .agp-legend {
	list-style: none;
	margin: 0.75em 0 0;
	padding: 0;
}

.agp-depot .agp-legend li {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.35em 0;
	border-bottom: 1px solid var(--agp-border);
}

.agp-legend-meta {
	font-size: 0.8em;
	color: var(--agp-muted);
}

.agp-depot .agp-bars-h {
	list-style: none;
	margin: 0;
	padding: 0;
}

.agp-depot .agp-bars-h li {
	display: grid;
	grid-template-columns: minmax(7em, 11em) 1fr auto;
	align-items: center;
	gap: 0.75em;
	margin: 0;
	padding: 0.3em 0;
}

.agp-depot .agp-bars-h .agp-bar {
	width: 100%;
	margin: 0;
}

.agp-bars-h-val {
	font-variant-numeric: tabular-nums;
	min-width: 4.5em;
	text-align: right;
}

.agp-depot .agp-bars-h .agp-rest {
	color: var(--agp-muted);
}

/* Haltedauer */
.agp-depot .agp-oldest {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: agp-oldest;
}

.agp-depot .agp-oldest li {
	display: grid;
	grid-template-columns: 1.6em 28px 1fr auto auto;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.45em 0;
	border-bottom: 1px solid var(--agp-border);
	counter-increment: agp-oldest;
}

.agp-depot .agp-oldest li::before {
	content: counter(agp-oldest) ".";
	color: var(--agp-muted);
	font-size: 0.85em;
	text-align: right;
}

.agp-oldest-logo img {
	display: block;
	border-radius: 50%;
}

.agp-oldest-since {
	font-size: 0.8em;
	color: var(--agp-muted);
	white-space: nowrap;
}

.agp-oldest-years {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	min-width: 5.5em;
	text-align: right;
}

.agp-bars-h-name small {
	color: var(--agp-muted);
}

@media (max-width: 520px) {
	.agp-depot .agp-oldest li {
		grid-template-columns: 1.6em 28px 1fr auto;
	}

	.agp-oldest-since {
		display: none;
	}
}

/* Link zum Monatsreport im Dividendenkalender */
.agp-month-card {
	display: flex;
	flex-direction: column;
}

.agp-depot a.agp-month-report {
	margin-top: auto;
	padding-top: 0.6em;
	font-size: 0.8em;
	font-weight: 600;
	color: var(--accent, var(--agp-accent));
	text-decoration: none;
}

.agp-depot a.agp-month-report:hover,
.agp-depot a.agp-month-report:focus-visible {
	text-decoration: underline;
}
