/*
 * OMIT Welcome Journey – Frontend
 * Alle Regeln sind unter .owj gekapselt, damit das Theme unberührt bleibt.
 * Farben lassen sich über die Custom Properties überschreiben.
 */

.owj {
	--owj-accent: #75bd9a;
	--owj-accent-soft: #e8f4ee;
	--owj-dark: #17283b;
	--owj-alt: #e85565;
	--owj-alt-soft: #fdeaec;
	--owj-bg: #f7f5f0;
	--owj-text: #2a3542;
	--owj-muted: #6b7682;
	--owj-line: #e4e9ee;
	--owj-radius: 18px;
	--owj-shadow: 0 4px 20px rgba(23, 40, 59, 0.08);

	color: var(--owj-text);
	line-height: 1.6;
}

/*
 * Farbschema «OMIT»: an das reduzierte Schwarz-Weiss der omit.ch-Seite
 * angelehnt (Flächen #F0F0EF, Buttons schwarz, kantigere Ecken).
 */
.owj.owj-scheme-omit {
	--owj-accent: #4b7f63;
	--owj-accent-soft: #eef2ef;
	--owj-dark: #000000;
	--owj-alt: #000000;
	--owj-alt-hover: #333333;
	--owj-alt-soft: #f0f0ef;
	--owj-bg: #f0f0ef;
	--owj-text: #1a1a1a;
	--owj-muted: #666663;
	--owj-line: #e0e0de;
	--owj-radius: 6px;
	--owj-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

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

/* Themes setzen gelegentlich display-Werte, die [hidden] aushebeln. */
.owj [hidden] {
	display: none !important;
}

/*
 * Theme-unabhängige Grundtypografie.
 * Das OMIT-Theme basiert auf Tailwind und setzt per Preflight alle Abstände,
 * Schriftgrössen, Schriftschnitte und Listenpunkte auf null zurück. Ohne diese
 * Ebene erscheinen Titel wie normaler Text und Listen ohne Punkte.
 * :where() hält die Spezifität bei null, damit jede Klassenregel weiter greift.
 */
.owj :where(p) {
	margin: 0 0 1em;
}

.owj :where(h1, h2, h3, h4, h5, h6) {
	margin: 0 0 0.5em;
	font-weight: 700;
}

.owj :where(h1) {
	font-size: 2rem;
}

.owj :where(h2) {
	font-size: 1.5rem;
}

.owj :where(h3) {
	font-size: 1.25rem;
}

.owj :where(h4) {
	font-size: 1.05rem;
}

.owj :where(strong, b) {
	font-weight: 700;
}

.owj :where(em, i) {
	font-style: italic;
}

.owj :where(ul, ol) {
	margin: 0 0 1.1em;
	padding-left: 1.4em;
}

.owj :where(ul) {
	list-style: disc outside;
}

.owj :where(ol) {
	list-style: decimal outside;
}

.owj :where(li) {
	display: list-item;
	margin: 0 0 0.4em;
}

.owj :where(figure) {
	margin: 0 0 1.1em;
}

.owj :where(img) {
	max-width: 100%;
	height: auto;
}

.owj :where(hr) {
	border: 0;
	border-top: 1px solid var(--owj-line);
	margin: 24px 0;
}

.owj a {
	color: var(--owj-dark);
}

.owj h1,
.owj h2,
.owj h3,
.owj h4 {
	color: var(--owj-dark);
	line-height: 1.25;
}

/* ---------------------------------------------------------------- Gate */

.owj-gate {
	display: flex;
	justify-content: center;
	padding: 24px 0 48px;
}

.owj-gate-card {
	background: #fff;
	border: 1px solid var(--owj-line);
	border-radius: 24px;
	box-shadow: var(--owj-shadow);
	padding: 40px 32px;
	max-width: 460px;
	width: 100%;
	text-align: center;
}

.owj-gate-card h2 {
	margin: 0 0 10px;
	font-size: 1.6rem;
}

.owj-gate-text {
	color: var(--owj-muted);
	font-size: 0.97rem;
	margin-bottom: 22px;
}

.owj-gate-text p:last-child {
	margin-bottom: 0;
}

.owj-code-input {
	width: 100%;
	padding: 14px 18px;
	border: 2px solid var(--owj-line);
	border-radius: 12px;
	font-size: 1.15rem;
	text-align: center;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	background: #fff;
	color: var(--owj-text);
}

.owj-code-input:focus {
	outline: none;
	border-color: var(--owj-accent);
	box-shadow: none;
}

.owj-btn {
	display: inline-block;
	background: var(--owj-alt);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 13px 28px;
	font-size: 1.02rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.15s ease;
}

.owj-btn:hover,
.owj-btn:focus {
	background: var(--owj-alt-hover, #d4485a);
	color: #fff;
	transform: translateY(-1px);
}

.owj-btn-block {
	display: block;
	width: 100%;
	margin-top: 12px;
}

.owj-gate-error {
	color: var(--owj-alt);
	font-weight: 600;
	font-size: 0.92rem;
	margin: 14px 0 0;
}

/* ---------------------------------------------------------------- Hero */

.owj-hero {
	background: var(--owj-dark);
	color: #fff;
	border-radius: var(--owj-radius);
	padding: 44px 32px;
	text-align: center;
	margin-bottom: 28px;
}

.owj-hero h1,
.owj-hero .owj-hero-title {
	color: #fff;
	font-size: clamp(1.7rem, 4vw, 2.6rem);
	margin: 0 0 12px;
}

.owj-hero-title em {
	font-style: normal;
	color: var(--owj-accent);
}

.owj-hero-text {
	max-width: 620px;
	margin: 0 auto;
	opacity: 0.92;
}

.owj-hero-text p:last-child {
	margin-bottom: 0;
}

.owj-badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--owj-accent);
	color: var(--owj-accent);
	border-radius: 999px;
	padding: 5px 16px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.owj-hello {
	color: var(--owj-accent);
	font-weight: 600;
	margin: 0 0 12px;
}

.owj-countdown {
	margin: 22px 0 0;
	font-size: 0.98rem;
	opacity: 0.9;
}

.owj-countdown strong {
	font-size: 1.5rem;
	color: var(--owj-accent);
	margin-right: 4px;
}

/* -------------------------------------------------------------- Suche */

.owj-search {
	position: relative;
	margin: 0 0 20px;
}

.owj-search-input {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid var(--owj-line);
	border-radius: 12px;
	font-size: 1rem;
	background: #fff;
}

.owj-search-input:focus {
	outline: none;
	border-color: var(--owj-accent);
}

.owj-search-results {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	background: #fff;
	border: 1px solid var(--owj-line);
	border-radius: 12px;
	box-shadow: var(--owj-shadow);
	overflow: hidden;
}

.owj-search-results li {
	margin: 0;
	border-bottom: 1px solid var(--owj-line);
}

.owj-search-results li:last-child {
	border-bottom: 0;
}

.owj-search-results a {
	display: block;
	padding: 12px 16px;
	text-decoration: none;
}

.owj-search-results a:hover {
	background: var(--owj-accent-soft);
}

.owj-search-results strong {
	display: block;
	color: var(--owj-dark);
}

.owj-search-results span {
	font-size: 0.88rem;
	color: var(--owj-muted);
}

.owj-search-none {
	padding: 12px 16px;
	color: var(--owj-muted);
	font-size: 0.9rem;
}

/* ----------------------------------------------------------- Fortschritt */

.owj-progress {
	margin: 0 0 22px;
}

.owj-progress-bar {
	height: 8px;
	background: var(--owj-line);
	border-radius: 99px;
	overflow: hidden;
}

.owj-progress-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--owj-accent);
	transition: width 0.4s ease;
}

.owj-progress-text {
	margin: 8px 0 0;
	font-size: 0.88rem;
	color: var(--owj-muted);
}

/* ------------------------------------------------------------- Kacheln */

.owj-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 28px;
}

.owj-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
	border: 2px solid transparent;
	border-radius: var(--owj-radius);
	box-shadow: var(--owj-shadow);
	padding: 24px 22px;
	text-decoration: none;
	color: var(--owj-text);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.owj-tile:hover,
.owj-tile:focus {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(23, 40, 59, 0.14);
	border-color: var(--owj-accent);
}

.owj-tile-icon {
	width: 50px;
	height: 50px;
	border-radius: 15px;
	background: var(--owj-accent-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.owj-tile:nth-child(even) .owj-tile-icon {
	background: var(--owj-alt-soft);
}

.owj-tile-nr {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--owj-accent);
}

.owj-tile:nth-child(even) .owj-tile-nr {
	color: var(--owj-alt);
}

.owj-tile-title {
	font-size: 1.12rem;
	font-weight: 700;
	color: var(--owj-dark);
}

.owj-tile-teaser {
	font-size: 0.92rem;
	color: var(--owj-muted);
}

.owj-tile-todo {
	margin-top: 4px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--owj-muted);
}

.owj-tile-todo.is-done {
	color: #1d7a45;
}

/* -------------------------------------------------------------- Kapitel */

.owj-back {
	display: inline-block;
	color: var(--owj-alt);
	font-weight: 700;
	text-decoration: none;
	margin-bottom: 18px;
}

.owj-back:hover {
	text-decoration: underline;
}

.owj-kicker {
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--owj-accent);
	margin: 0 0 4px;
}

.owj-chapter-title {
	font-size: clamp(1.6rem, 3.5vw, 2.2rem);
	margin: 0 0 12px;
}

.owj-lead {
	font-size: 1.1rem;
	color: var(--owj-muted);
	margin-bottom: 26px;
}

.owj-content > *:first-child {
	margin-top: 0;
}

/* Links im Inhalt müssen als Links erkennbar sein – das Theme entfernt
   Unterstreichungen global. */
.owj-content a,
.owj-lead a,
.owj-footer a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.owj-content a:hover,
.owj-lead a:hover {
	color: var(--owj-alt);
}

.owj-content h3,
.owj-content h4 {
	margin: 30px 0 10px;
}

.owj-content ul,
.owj-content ol {
	padding-left: 22px;
}

.owj-content li {
	margin-bottom: 6px;
}

.owj-content table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--owj-shadow);
}

.owj-content th {
	background: var(--owj-dark);
	color: #fff;
	text-align: left;
	padding: 11px 15px;
	font-size: 0.9rem;
}

.owj-content td {
	padding: 11px 15px;
	border-bottom: 1px solid var(--owj-line);
	font-size: 0.95rem;
	vertical-align: top;
}

.owj-content tr:last-child td {
	border-bottom: 0;
}

.owj-content figure.wp-block-table {
	margin: 0 0 20px;
}

/* Karten */

.owj-card {
	background: #fff;
	border-radius: var(--owj-radius);
	box-shadow: var(--owj-shadow);
	padding: 22px 26px;
	margin: 0 0 18px;
}

.owj-card > *:first-child {
	margin-top: 0;
}

.owj-card > *:last-child {
	margin-bottom: 0;
}

.owj-card h4 {
	font-size: 1.05rem;
	margin: 0 0 8px;
}

.owj-card.owj-tip {
	border-left: 5px solid var(--owj-accent);
}

.owj-card.owj-warn {
	border-left: 5px solid var(--owj-alt);
}

/* Häkchenliste */

.owj-content .owj-check {
	list-style: none;
	padding-left: 0;
}

.owj-content .owj-check li {
	position: relative;
	padding-left: 30px;
	margin-bottom: 8px;
}

.owj-content .owj-check li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 2px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--owj-accent);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Platzhalter */

.owj-ph {
	background: #fff3cd;
	border: 1px dashed #d4a72c;
	border-radius: 6px;
	padding: 0 7px;
	font-weight: 600;
	color: #7a5d00;
	font-size: 0.93em;
}

/* ----------------------------------------------------------- Checkliste */

.owj-checklist {
	background: #fff;
	border: 1px solid var(--owj-line);
	border-left: 5px solid var(--owj-accent);
	border-radius: var(--owj-radius);
	padding: 22px 26px;
	margin: 30px 0 0;
}

.owj-checklist h3 {
	margin: 0 0 4px;
	font-size: 1.05rem;
}

.owj-checklist-hint {
	color: var(--owj-muted);
	font-size: 0.85rem;
	margin: 0 0 14px;
}

.owj-checklist ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.owj-checklist li {
	margin-bottom: 8px;
}

.owj-checklist label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
}

/*
 * Eigene Checkbox. Nötig, weil das Theme Formularelemente auf
 * appearance:none stellt – Standard-Häkchen wären unsichtbar.
 */
.owj-checklist input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	padding: 0;
	border: 2px solid #c9d2da;
	border-radius: 5px;
	background: #fff;
	background-image: none;
	box-shadow: none;
	cursor: pointer;
}

.owj-checklist input[type="checkbox"]:checked {
	background: var(--owj-accent);
	background-image: none;
	border-color: var(--owj-accent);
}

.owj-checklist input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.owj-checklist input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--owj-dark);
	outline-offset: 2px;
}

.owj-checklist input:checked + span {
	text-decoration: line-through;
	color: var(--owj-muted);
}

/* --------------------------------------------------------------- Pager */

.owj-pager {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 34px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--owj-line);
	font-weight: 600;
}

.owj-pager a {
	text-decoration: none;
	color: var(--owj-dark);
}

.owj-pager a:hover {
	color: var(--owj-alt);
}

.owj-pager-next {
	margin-left: auto;
	text-align: right;
}

/* --------------------------------------------------------------- Tools */

.owj-tools {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	align-items: center;
	padding: 16px 0;
	border-top: 1px solid var(--owj-line);
	font-size: 0.92rem;
}

.owj-link {
	color: var(--owj-dark);
	font-weight: 600;
}

.owj-link-muted {
	color: var(--owj-muted);
	font-weight: 400;
}

.owj-preview-note {
	color: var(--owj-muted);
	font-size: 0.85rem;
}

/* -------------------------------------------------------------- Footer */

.owj-footer {
	background: var(--owj-dark);
	color: #fff;
	border-radius: var(--owj-radius);
	padding: 32px 28px;
	text-align: center;
	margin-top: 30px;
}

.owj-footer h3 {
	color: #fff;
	margin: 0 0 8px;
}

.owj-footer-text {
	opacity: 0.85;
}

.owj-footer-text p:last-child {
	margin-bottom: 0;
}

.owj-footer a {
	color: var(--owj-accent);
}

.owj-legal {
	margin: 18px 0 0;
	font-size: 0.8rem;
	opacity: 0.55;
}

.owj-empty {
	background: #fff;
	border: 1px dashed var(--owj-line);
	border-radius: var(--owj-radius);
	padding: 26px;
	text-align: center;
	color: var(--owj-muted);
}

/* --------------------------------------------------------------- Print */

.owj-print-chapter {
	margin-bottom: 34px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--owj-line);
}

.owj-print-check {
	list-style: none;
	padding-left: 0;
}

@media print {
	.owj-noprint,
	.owj-search,
	.owj-progress,
	.owj-tools {
		display: none !important;
	}

	.owj-print-chapter {
		page-break-after: always;
		border-bottom: 0;
	}

	.owj-card,
	.owj-content table {
		box-shadow: none;
		border: 1px solid #ccc;
	}

	.owj-hero,
	.owj-footer {
		background: none;
		color: #000;
	}
}

@media (max-width: 600px) {
	.owj-hero {
		padding: 32px 20px;
	}

	.owj-gate-card {
		padding: 30px 22px;
	}

	.owj-card,
	.owj-checklist {
		padding: 18px 18px;
	}
}
