/* ==========================================================================
   /datenschutz/ — layout only. Every value is a token from theme.css
   („Programmheft“: numbered dossier blocks, glance cards + index, contact ticket,
   definition rows, departure board, right cards)
   ========================================================================== */

/* Sections: a little tighter than the default band, the text is long */
.ds-section,
.ds-glance-section { padding-block: calc(var(--section-y) * 0.7); }

/* 02 · Kurz gesagt + Inhalt ------------------------------------------------ */
.ds-glance { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
.ds-glance__main { min-width: 0; }
.ds-glance .section-head { margin-bottom: var(--sp-6); }
.ds-glance__list .icon-list__item { align-items: center; }
.ds-glance__list .icon-list__text { margin-top: 0; color: var(--c-fg); }
.ds-glance__index { min-width: 0; }
@media (min-width: 64em) {
	.ds-glance { grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--sp-8); }
	.ds-glance__index { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

/* Dossier block: number + heading left (sticky on desktop), content right ----- */
.ds-block {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--sp-5);
	padding-block: var(--sp-7);
	border-top: 1px solid var(--c-line);
	scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
.ds-block:first-child { border-top: 0; padding-top: 0; }
.ds-block:last-child { padding-bottom: 0; }

.ds-block__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); min-width: 0; }
.ds-block__no {
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	flex: none;
	background: var(--violet-500);
	color: var(--white);
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	line-height: 1;
}
.ds-block__title { flex: 1 1 12rem; min-width: 0; font-size: var(--fs-xl); }
.ds-block__media { flex: 0 0 100%; width: 100%; max-width: 18rem; margin-top: var(--sp-2); }

.ds-block__body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); align-content: start; }
.ds-block__body > * { margin: 0; }

@media (min-width: 64em) {
	.ds-block { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: var(--sp-8); }
	.ds-block__head { position: sticky; top: calc(var(--header-h) + var(--sp-5)); align-self: start; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: var(--sp-4); }
	.ds-block__title { flex: none; }
	.ds-block__media { flex: none; }
}

/* Wide dossier (Ihre Rechte): heading row on top, content full width */
@media (min-width: 64em) {
	.ds-block--wide { grid-template-columns: 1fr; gap: var(--sp-6); }
	.ds-block--wide .ds-block__head { position: static; flex-direction: row; align-items: center; }
	.ds-block--wide .ds-block__title { flex: 1 1 auto; }
}

/* Definition rows: Zweck / Rechtsgrundlage / Speicherdauer ... ---------------- */
.ds-defs { display: grid; margin: 0; border-top: 1px solid var(--c-line); }
.ds-defs__row { display: grid; gap: var(--sp-2) var(--sp-5); align-items: start; min-width: 0; padding-block: var(--sp-4); border-bottom: 1px solid var(--c-line); }
.ds-defs dt { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; font-weight: 700; color: var(--c-heading); }
.ds-defs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 40em) {
	.ds-defs__row { grid-template-columns: 13rem minmax(0, 1fr); }
}

/* Contact ticket (Verantwortlicher, Aufsichtsbehörde) ------------------------- */
.ds-ticket { padding: var(--sp-2) var(--sp-5); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-md); }
.ds-ticket .ds-defs { border-top: 0; }
.ds-ticket .ds-defs__row:last-child { border-bottom: 0; }
.ds-ticket .tel-inline { font-size: var(--fs-md); }
@media (min-width: 40em) {
	.ds-ticket .ds-defs__row { grid-template-columns: 15.5rem minmax(0, 1fr); }
	.ds-ticket .ds-defs dt { align-self: stretch; padding-right: var(--sp-5); border-right: 2px dashed var(--c-line-strong); }
	.ds-ticket .ds-defs dd { align-self: center; }
}

/* Mid-page call strip after „Anruf bei uns“ ------------------------------------ */
.ds-call { margin-block: var(--sp-4) var(--sp-2); }
.ds-call + .ds-block { border-top: 0; }

/* Speicherdauer board ----------------------------------------------------------- */
.ds-board .compare__table { min-width: 0; }
.ds-board .compare__table th,
.ds-board .compare__table td { padding: var(--sp-4); }
.ds-board .compare__table caption { padding: var(--sp-4); }

/* Speicherdauer board on phones: one stacked block per row (the 2-column table squeezed the
   Dauer text into 1-2 words per line at 320-390 px). ARIA roles are set in the markup so the
   table semantics survive display:block. */
@media (max-width: 39.99em) {
	.ds-board .compare { overflow-x: visible; }
	.ds-board .compare__table,
	.ds-board .compare__table tbody,
	.ds-board .compare__table tr,
	.ds-board .compare__table tbody th,
	.ds-board .compare__table td,
	.ds-board .compare__table caption { display: block; width: 100%; }
	.ds-board .compare__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.ds-board .compare__table tbody tr { border-top: 1px solid var(--c-line); }
	.ds-board .compare__table tbody tr:first-child { border-top: 0; }
	.ds-board .compare__table tbody th { position: static; padding-bottom: var(--sp-1); border-top: 0; }
	.ds-board .compare__table td { padding-top: var(--sp-1); border-top: 0; }
}

/* Hero: the shared .hero is a grid with an auto column, so the long one-word H1 stretched the
   column past the viewport on 320-360 px phones and clipped title + lead at the right edge. */
.ds-hero { grid-template-columns: minmax(0, 1fr); }
.ds-hero .hero__title { overflow-wrap: break-word; }
@media (max-width: 23em) {
	.ds-hero .hero__title { font-size: var(--fs-xl); }
}

/* Glance cards: a little less padding on the smallest phones so the sentences get more width */
@media (max-width: 25em) {
	.ds-glance__list.icon-list--cards .icon-list__item { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
}

/* Right cards (Ihre Rechte) ----------------------------------------------------- */
.ds-rights { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.ds-right {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--sp-2);
	min-width: 0;
	padding: var(--sp-5);
	background: var(--c-surface);
	border: 1px solid var(--c-line);
	border-top: 4px solid var(--violet-500);
	border-radius: 0 0 var(--r-lg) var(--r-lg);
	box-shadow: var(--sh-sm);
	transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base);
}
.ds-right:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.ds-right > * { margin: 0; }
.ds-right__badge { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; margin-bottom: var(--sp-2); background: var(--c-surface-2); color: var(--c-accent); }
.ds-right__badge .i { width: 1.5rem; height: 1.5rem; }
.ds-right__name { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.2; }
.ds-right__name strong { font-weight: 400; font-synthesis: none; color: var(--c-heading); }
.ds-right__text { color: var(--c-muted); }

/* Widerspruchsrecht notice ------------------------------------------------------ */
.ds-objection .notice__title { font-family: var(--font-display); font-weight: 400; font-synthesis: none; font-size: var(--fs-lg); line-height: 1.2; }
.ds-objection .notice__body p { max-width: none; }
