/* =========================================================================
   "I can't sign in" static page.

   The page is built from DB UX components (header, brand, navigation, drawer,
   card, link, button, footer). Their CSS, the DB theme tokens and the icon fonts
   are in assets/db-ux/db-ux.css, which every page loads BEFORE this file
   (generated by pipeline/helpers/Update-DbUxAssets.ps1).

   This file only adds what the components do not provide: the DB Neo Screen
   fonts of the site, the page frame and the contact rows. It defines no colors,
   spacings or type sizes of its own: headings, body text, header, cards and
   footer use the DB UX defaults. The page follows the OS color scheme
   (light or dark), like the DB UX tokens do.

   Rules of the site: no inline styles, no external resources, no script
   (CSP: style-src 'self'; font-src 'self'; img-src 'self').
   ========================================================================= */

/* ----------------------------- Brand fonts ----------------------------- */
/* The family names are the ones the DB UX tokens refer to (--db-font-family-*). */
@font-face {
	font-family: "DB Neo Screen Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/dbneoscreensans-regular.woff2") format("woff2");
}
@font-face {
	font-family: "DB Neo Screen Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/dbneoscreensans-medium.woff2") format("woff2");
}
@font-face {
	font-family: "DB Neo Screen Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/dbneoscreensans-bold.woff2") format("woff2");
}
@font-face {
	font-family: "DB Neo Screen Head";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/dbneoscreenhead-regular.woff2") format("woff2");
}
@font-face {
	font-family: "DB Neo Screen Head";
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url("assets/fonts/dbneoscreenhead-black.woff2") format("woff2");
}

/* ------------------------------ Page frame ------------------------------ */
/* Header and footer stay at the edges, the content grows (sticky footer). */
body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--db-adaptive-bg-basic-level-2-default);
}

.db-main {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: var(--db-spacing-fixed-2xl) var(--db-spacing-fixed-lg);
}

.db-content {
	width: 100%;
	max-width: 56rem;
}

.db-page-title {
	margin-bottom: var(--db-spacing-fixed-xs);
}

.site-page-intro {
	font: var(--db-type-body-lg);
	color: var(--db-adaptive-on-bg-basic-emphasis-80-default);
	margin-bottom: var(--db-spacing-fixed-xl);
}

/* ------------------------------ Card layout ------------------------------ */
.site-groups {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--db-spacing-fixed-lg);
}

/* .db-card is a flex column already; this adds the gap and lets a grid item shrink
   below its content, so nothing scrolls sideways at 320px. */
.site-stack {
	min-width: 0;
	gap: var(--db-spacing-fixed-sm);
}

/* --------------------- Contact rows (icon + link) --------------------- */
/* The icon is the DB UX icon font: <p class="site-contact" data-icon="globe">. */
.site-contact {
	display: flex;
	align-items: center;
	gap: var(--db-spacing-fixed-xs);
	overflow-wrap: anywhere;
	--db-icon-color: var(--db-brand-origin-default);
}

/* ------------------------- Dark / bright switch ------------------------- */
/* CSS only: the pages stay script free. The DB UX tokens switch with --db-color-scheme.
   A checkbox cannot read the OS setting, so the header holds two copies of the same switch:
   the copy for a light OS starts unchecked, the copy for a dark OS starts checked. Only the
   copy that matches the OS is shown, so the switch always says whether the page is dark.
   Without script the choice is not remembered: it applies to the current page only. */
.site-scheme {
	display: none;
}

@media (prefers-color-scheme: dark) {
	.site-scheme--os-dark {
		display: inline-flex;
	}
}

@media not all and (prefers-color-scheme: dark) {
	.site-scheme--os-light {
		display: inline-flex;
	}
}

:root:has(#scheme-os-light:checked) {
	--db-color-scheme: dark;
}

:root:has(#scheme-os-dark:not(:checked)) {
	--db-color-scheme: light;
}
/* ---- Manual ---- */
.db-manual {
	overflow-wrap: anywhere;
}

.db-manual .db-page-title {
	margin-bottom: var(--db-spacing-fixed-lg);
}

.db-manual h2 {
	margin-top: var(--db-spacing-fixed-xl);
	margin-bottom: var(--db-spacing-fixed-sm);
}

.db-manual h3 {
	margin-top: var(--db-spacing-fixed-lg);
	margin-bottom: var(--db-spacing-fixed-xs);
}

.db-manual p {
	margin-bottom: var(--db-spacing-fixed-md);
}

.db-manual ol,
.db-manual ul {
	margin-bottom: var(--db-spacing-fixed-md);
	padding-left: var(--db-spacing-fixed-lg);
}

.db-manual li {
	margin-bottom: var(--db-spacing-fixed-xs);
}

.db-manual li > ol,
.db-manual li > ul {
	margin-top: var(--db-spacing-fixed-xs);
	margin-bottom: 0;
}

.db-manual blockquote {
	margin-bottom: var(--db-spacing-fixed-md);
}

.db-manual blockquote > :last-child {
	margin-bottom: 0;
}

.db-manual a {
	color: var(--db-brand-on-bg-basic-emphasis-80-default);
	text-decoration: underline;
	text-underline-offset: 0.125rem;
}

.db-manual a:hover {
	color: var(--db-brand-on-bg-basic-emphasis-80-hovered);
}

.db-manual img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: var(--db-spacing-fixed-sm) 0;
	border: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
}
/* ---- /Manual ---- */

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 48rem) {
	.site-groups {
		grid-template-columns: 1fr;
	}

	.db-main {
		padding: var(--db-spacing-fixed-xl) var(--db-spacing-fixed-md);
	}
}
