/*
 * Jak na iPhone — styly webu (vzhled podle Figmy „JaknaiPhone Final“).
 *
 * Stejné zásady jako web.css První Mac: jeden soubor pro všechny šířky, psaný od mobilu nahoru,
 * zlomy 720 px (tablet) a 1024 px (desktop), systémové písmo. Návrh ve Figmě je jen pro desktop
 * (1440 px), menší šířky jsou odvozené. Tmavý režim zatím není: obrázky mají pozadí
 * v souboru, Martin je při aktualizaci webu vymění za průhledné a pak se k němu vrátíme.
 *
 * Vrstvy: base (proměnné a prvky) → layout (záhlaví, patička) → components (bloky stránek)
 * → content (text z databáze).
 */

@layer base, layout, components, content;

/* ==========================================================================
   Base
   ========================================================================== */

@layer base {
	:root {
		color-scheme: light;

		/* Barvy z proměnných Figmy */
		--bg: #ffffff;
		--bg-soft: #f5f6f7;   /* grey 2 */
		--bg-tint: #fafafa;   /* grey 1 */
		--text: #111111;      /* Black */
		--text-body: #363636; /* Black 2 */
		--text-2: #606060;    /* grey */
		/* grey5 z Figmy (#9b9b9b) má na bílé kontrast 2,8 : 1, pro text je potřeba aspoň 4,5 : 1 */
		--text-3: #767676;
		--line: #d8d8d8;      /* grey3 */
		--tip: #fff5cf;
		--shadow: 0 4px 84px rgb(0 0 0 / 0.05);

		/* Pastelové podklady kategorií průvodce (z dnešního webu) */
		--cat-obecne: #f7f7f8;
		--cat-system: #fef7f0;
		--cat-fotky: #eff4fe;
		--cat-aplikace: #fdf0f1;
		--cat-icloud: #ebf0e7;
		--cat-komunikace: #f6e8f5;

		--font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

		/* Stupnice podle Figmy (desktop): 82 / 42 / 24 / 20 px, na mobilu menší */
		--step--2: 0.75rem;
		--step--1: 0.875rem;
		--step-0: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
		--step-1: clamp(1.1875rem, 1.05rem + 0.5vw, 1.5rem);
		--step-3: clamp(1.875rem, 1.35rem + 1.5vw, 2.625rem);
		--step-4: clamp(2.625rem, 1.4rem + 4.3vw, 5.125rem);

		--measure: 37rem;   /* sloupec textu, ve Figmě 588 px */
		--wide: 51rem;
		--page: 80.625rem;  /* 1290 px */
		--gutter: clamp(1.25rem, 5.2vw, 4.6875rem);
		/* Barevné pásy (úvod návodu, služby, ohlasy): pozadí jde ke krajům okna s bílým okrajem
		   30 px (na mobilu od kraje ke kraji), obsah uvnitř drží šířku stránky jako .wrap.
		   Procenta se počítají ze šířky rodiče, pás proto musí ležet přímo v plné šířce stránky. */
		--box-inset: clamp(0rem, 2vw, 1.875rem);
		--box-pad: calc(max(var(--gutter), (100% - var(--page)) / 2) - var(--box-inset));
		--header-h: 4.75rem;
		--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
		--radius: 1.75rem;  /* boxy 28 px */
		--radius-s: 0.5rem; /* tlačítka 8 px */
	}

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

	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
		scroll-padding-top: calc(var(--header-h) + 1.5rem);
	}

	@media (prefers-reduced-motion: no-preference) {
		html { scroll-behavior: smooth; }
	}
	@media (prefers-reduced-motion: reduce) {
		*, *::before, *::after { transition-duration: 0s !important; }
	}
	@media (min-width: 1024px) {
		:root { --header-h: 6.25rem; }
	}

	body {
		margin: 0;
		background: var(--bg);
		color: var(--text);
		font: 400 var(--step-0) / 1.65 var(--font);
		letter-spacing: 0.01em;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		text-rendering: optimizeLegibility;
	}

	h1, h2, h3, h4 {
		margin: 0;
		font-weight: 800;
		line-height: 1.2;
		letter-spacing: -0.01em;
		text-wrap: balance;
	}

	p, ul, ol, figure { margin: 0; }
	p { text-wrap: pretty; }

	a { color: inherit; text-decoration: none; }

	/* Odkaz v textu: tenká šedá linka, po najetí ztmavne a trochu se oddálí */
	.link,
	.prose a,
	.coffee a,
	.bio a,
	.page-intro a,
	.site-footer__copy a,
	.author-band__more {
		text-decoration: underline 1px var(--line);
		text-underline-offset: 0.22em;
		transition: text-decoration-color 0.2s, text-underline-offset 0.25s var(--ease);
	}
	:is(.link, .prose a, .coffee a, .bio a, .page-intro a, .site-footer__copy a, .author-band__more):hover {
		text-decoration-color: currentColor;
		text-underline-offset: 0.32em;
	}
	/* Tlačítko v textu (poděkování v kavárně) zůstává tlačítkem */
	:is(.prose, .coffee, .bio, .page-intro) :is(a.btn, a.app__get) { text-decoration: none; }

	/* Odkaz bez linky (navigace, seznamy, karty): po najetí se jen objeví stejně decentní šedá
	   linka, jakou mají odkazy v textu */
	.grow-line,
	.site-footer__list a,
	.topic__links a,
	.card__title a,
	.pager__title,
	.guide-hero__kicker a,
	.mega__pages a,
	.lesson a > span:not(.badge) {
		text-decoration: underline 1px transparent;
		text-underline-offset: 0.22em;
		transition: text-decoration-color 0.2s, color 0.2s;
	}
	:is(.grow-line, .site-footer__list a, .topic__links a, .guide-hero__kicker a, .mega__pages a):hover,
	.card:hover .card__title a,
	.pager__link:hover .pager__title,
	.lesson a:hover > span:not(.badge) { text-decoration-color: var(--line); }

	img, svg, iframe, video { display: block; max-width: 100%; }
	img { height: auto; }

	button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
	button { cursor: pointer; }

	:focus-visible {
		outline: 2px solid var(--text);
		outline-offset: 3px;
		border-radius: 4px;
	}

	.i { width: 1.25em; height: 1.25em; flex: none; }

	.visually-hidden,
	.honeypot {
		position: absolute !important;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.skip-link {
		position: absolute;
		left: 1rem;
		top: -4rem;
		z-index: 100;
		padding: 0.5rem 1rem;
		border-radius: var(--radius-s);
		background: var(--text);
		color: var(--bg);
	}
	.skip-link:focus { top: 0.75rem; }
}

/* ==========================================================================
   Layout
   ========================================================================== */

@layer layout {
	.wrap {
		max-width: calc(var(--page) + 2 * var(--gutter));
		margin-inline: auto;
		padding-inline: var(--gutter);
	}

	/* --- Záhlaví --- */

	.site-header {
		position: sticky;
		top: 0;
		z-index: 50;
		background: rgb(255 255 255 / 0.85);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		backdrop-filter: saturate(180%) blur(20px);
	}

	.site-header__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1.5rem;
		height: var(--header-h);
	}

	/* Logo: „Jak na“ světle šedě, „iPhone“ černě, pod ním podpis */
	.logo {
		display: grid;
		align-content: start;
		justify-self: start;
		color: var(--text);
		line-height: 1.05;
		white-space: nowrap;
	}
	.logo__name { font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem); font-weight: 800; letter-spacing: -0.015em; }
	.logo__name span { color: var(--line); transition: color 0.3s; }
	.logo:hover .logo__name span { color: var(--text-3); }
	.logo__by { margin-top: 0.125rem; font-size: clamp(0.75rem, 0.7rem + 0.15vw, 0.875rem); font-weight: 600; letter-spacing: 0.01em; color: var(--text-2); }

	.nav-toggle {
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-right: -0.625rem;
		padding: 0;
		border: 0;
		background: none;
	}
	.nav-toggle .i { width: 1.5rem; height: 1.5rem; }
	.nav-toggle__close,
	.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

	/* Mobil: navigace je panel přes celou výšku pod záhlavím */
	.site-nav {
		display: none;
		position: fixed;
		inset: var(--header-h) 0 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 0.5rem var(--gutter) 3rem;
		background: var(--bg);
	}
	.nav-open .site-nav { display: block; }
	.nav-open { overflow: hidden; }
	/* backdrop-filter dělá ze záhlaví rámec pro position: fixed, panel by se počítal od jeho výšky */
	.nav-open .site-header {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: var(--bg);
	}

	.site-nav__list {
		list-style: none;
		display: flex;
		flex-direction: column;
		padding: 0;
	}
	.site-nav__list > li { border-bottom: 1px solid var(--bg-soft); }
	.site-nav__link {
		display: block;
		padding: 0.875rem 0;
		font-size: var(--step-1);
		font-weight: 700;
	}
	/* Ostatní položky na mobilu šedé, aktivní černá (jako na Prvním Macu barvou, bez odsazení) */
	.site-nav__link { color: var(--text-2); }
	.site-nav__link:hover,
	.site-nav__link[aria-current="page"] { color: var(--text); }
	.site-nav__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 0.75rem;
		margin-top: 1.5rem;
	}

	/* Medailonek a rychlý kontakt dole v mobilním menu */
	.site-nav__author {
		display: grid;
		grid-template-columns: auto 1fr;
		align-items: center;
		gap: 1rem 0.875rem;
		margin-top: 2rem;
		padding-top: 1.5rem;
		border-top: 1px solid var(--bg-soft);
		color: var(--text-2);
		font-size: 0.9375rem;
		line-height: 1.4;
	}
	.site-nav__author img { width: 3.5rem; height: 3.5rem; border-radius: 50%; }
	.site-nav__author p a { color: var(--text); font-weight: 700; }
	.site-nav__contact { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
	.site-nav__contact a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		padding: 0.75rem 1rem;
		border-radius: var(--radius-s);
		background: var(--bg-soft);
		color: var(--text);
		font-weight: 600;
		text-decoration: none;
	}
	.site-nav__contact a:hover { background: var(--line); }
	.site-nav__contact .i { width: 1.25rem; height: 1.25rem; }

	@media (min-width: 1024px) {
		.nav-toggle { display: none; }

		.site-nav,
		.nav-open .site-nav {
			display: flex;
			align-items: center;
			gap: 1.5rem;
			position: static;
			overflow: visible;
			padding: 0;
			background: none;
		}
		.site-nav__list { flex-direction: row; gap: 0.25rem; }
		.site-nav__list > li { border: 0; }
		/* Po najetí se pod položkou rozsvítí šedá „pilulka“, aktivní ji má trvale */
		.site-nav__link {
			position: relative;
			padding: 0.5rem 0.9375rem;
			border-radius: 999px;
			color: var(--text-body);
			font-size: 1rem;
			font-weight: 600;
			transition: background-color 0.2s, color 0.2s;
		}
		.site-nav__link:hover { background: var(--bg-soft); color: var(--text); }
		.site-nav__link[aria-current="page"] { background: var(--bg-soft); color: var(--text); }
		.site-nav__author { display: none; }
		.site-nav__actions { margin: 0; gap: 0.75rem; }
	}

	/* --- Megamenu průvodce (app/Jni/views/_header.php, jni.js) ---
	   Kategorie s obrázkem v kruhu jako na úvodní stránce a pod nimi návody. Na desktopu bílý panel
	   pod záhlavím přes celou šířku, na mobilu se rozbalí v menu pod položkou Průvodce. */

	.mega-toggle { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; }
	.mega-toggle__arrow { width: 1rem; height: 1rem; transition: transform 0.25s var(--ease); }
	.mega-toggle[aria-expanded="true"] .mega-toggle__arrow { transform: rotate(180deg); }

	.mega { display: none; }
	.mega-open .mega { display: block; }

	.mega__grid {
		list-style: none;
		display: grid;
		gap: 1.75rem;
		padding: 0.5rem 0 1.5rem;
	}
	.mega__heading {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		color: var(--text);
		font-weight: 800;
		font-size: 1.0625rem;
		line-height: 1.25;
	}
	.mega__img { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--cat); transition: transform 0.35s var(--ease); }
	.mega__heading:hover .mega__img { transform: scale(1.06); }
	.mega__heading:hover span { text-decoration: underline 1px var(--line); text-underline-offset: 0.22em; }
	.mega__pages {
		list-style: none;
		display: grid;
		gap: 0.375rem;
		margin-top: 0.625rem;
		padding: 0 0 0 3.5rem;
		font-size: 0.9375rem;
		line-height: 1.45;
	}
	.mega__pages a { color: var(--text-2); }
	.mega__pages a:hover { color: var(--text); }
	.mega__pages a[aria-current="page"] { color: var(--text); font-weight: 700; }

	@media (min-width: 1024px) {
		/* Panel se počítá od záhlaví (position: sticky), ne od položky menu */
		.mega {
			position: absolute;
			top: 100%;
			left: 0;
			right: 0;
			border-top: 1px solid var(--bg-soft);
			background: var(--bg);
			box-shadow: 0 40px 60px -40px rgb(0 0 0 / 0.16);
		}
		.mega__inner {
			max-width: calc(var(--page) + 2 * var(--gutter));
			max-height: calc(100dvh - var(--header-h));
			margin-inline: auto;
			padding: 2.5rem var(--gutter) 3rem;
			overflow-y: auto;
		}
		.mega__grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 3rem; padding: 0; }
		.mega__img { width: 3.5rem; height: 3.5rem; }
		.mega__heading { font-size: var(--step-1); gap: 1rem; }
		.mega__pages { padding-left: 4.5rem; }
		.mega-toggle { justify-content: flex-start; }
		.mega-toggle[aria-expanded="true"] { background: var(--bg-soft); color: var(--text); }
	}
	@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
		.mega-open .mega { animation: jni-drop 0.22s var(--ease); }
	}

	/* --- Hledání (app/Jni/views/_header.php, /js/spotlight.js) ---
	   Podle Figmy: bílý panel pod záhlavím, velké pole jako nadpis stránky, vpravo křížek;
	   výsledky pod polem. Stránka pod panelem jen zesvětlí. */

	.search-open {
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: var(--text);
		transition: background-color 0.2s;
	}
	.search-open .i { width: 1.375rem; height: 1.375rem; }
	.search-open:hover { background: var(--bg-soft); }
	.search-open[hidden] { display: none; }
	.search-open--bar { margin: 0 -1.25rem 0 auto; }
	.search-open--nav { display: none; }
	@media (min-width: 1024px) {
		.search-open--bar { display: none; }
		.search-open--nav:not([hidden]) { display: grid; margin-right: -0.625rem; }
	}

	.search-active { overflow: hidden; }

	/* Okno přes celou plochu, aby klik vedle panelu zavřel hledání; nad panelem zůstává vidět
	   záhlaví (výška --spotlight-top z jni.js), pod panelem stránka zesvětlí */
	.spotlight {
		position: fixed;
		inset: 0;
		width: 100%;
		max-width: none;
		height: 100%;
		max-height: none;
		margin: 0;
		padding: 0;
		border: 0;
		background: linear-gradient(transparent var(--spotlight-top, 0px), rgb(255 255 255 / 0.88) 0);
		color: var(--text);
		overflow: hidden;
		overscroll-behavior: contain;
	}
	.spotlight::backdrop { background: transparent; }

	.spotlight__box {
		display: flex;
		max-height: calc(100% - var(--spotlight-top, 0px));
		margin-top: var(--spotlight-top, 0px);
		border-top: 1px solid var(--bg-soft);
		background: var(--bg);
		box-shadow: 0 40px 60px -40px rgb(0 0 0 / 0.16);
	}
	.spotlight__inner {
		display: flex;
		flex-direction: column;
		width: 100%;
		min-height: 0;
		padding-block: clamp(1.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem);
	}

	.spotlight__field { display: flex; align-items: center; gap: 1rem; }
	.spotlight__input {
		flex: 1;
		min-width: 0;
		padding: 0.125em 0;
		border: 0;
		border-radius: 0;
		background: none;
		color: var(--text);
		font-size: var(--step-4);
		font-weight: 900;
		line-height: 1.1;
		letter-spacing: -0.015em;
		caret-color: var(--text);
		-webkit-appearance: none;
		appearance: none;
	}
	.spotlight__input:focus { outline: none; }
	.spotlight__input::placeholder { color: var(--line); opacity: 1; }
	.spotlight__input::-webkit-search-cancel-button { display: none; }

	.spotlight__close {
		display: grid;
		place-items: center;
		flex: none;
		width: 3.5rem;
		height: 3.5rem;
		margin-right: -0.75rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: var(--text);
		transition: background-color 0.2s;
	}
	.spotlight__close:hover { background: var(--bg-soft); }
	.spotlight__close .i { width: 2rem; height: 2rem; }

	.spotlight__results {
		flex: 1 1 auto;
		min-height: 0;
		margin: clamp(1rem, 2.5vw, 2rem) -0.75rem 0;
		padding-bottom: 0.5rem;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
	.spotlight__results[hidden] { display: none; }

	.spotlight__group + .spotlight__group { margin-top: 1.25rem; }
	.spotlight__heading {
		padding: 0 0.75rem 0.375rem;
		color: var(--text-3);
		font-size: var(--step--1);
		font-weight: 700;
	}
	.spotlight__item {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: baseline;
		gap: 1.5rem;
		padding: 0.625rem 0.75rem;
		border-radius: var(--radius-s);
		color: var(--text);
	}
	.spotlight__text { display: grid; gap: 0.125rem; min-width: 0; }
	.spotlight__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
	.spotlight__title mark { border-radius: 2px; background: var(--tip); color: inherit; }
	.spotlight__desc {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		color: var(--text-2);
		font-size: 0.9375rem;
		line-height: 1.45;
	}
	.spotlight__meta { display: none; color: var(--text-3); font-size: var(--step--1); white-space: nowrap; }
	.spotlight__meta .i { display: inline; width: 0.875rem; height: 0.875rem; vertical-align: -0.1em; }
	.spotlight__group--top .spotlight__title { font-size: var(--step-1); font-weight: 800; }

	.spotlight__more {
		display: block;
		padding: 0.5rem 0.75rem;
		border: 0;
		border-radius: var(--radius-s);
		background: none;
		color: var(--text);
		font-size: 0.9375rem;
		font-weight: 600;
		text-decoration: underline 1px var(--line);
		text-underline-offset: 0.22em;
	}

	/* Vybraný řádek (šipkami i myší): šedá plocha jako po najetí na položku menu */
	.spotlight__item[aria-selected="true"],
	.spotlight__more[aria-selected="true"] { background: var(--bg-soft); }

	.spotlight__status { color: var(--text-2); font-size: 0.9375rem; }
	.spotlight__status:not(:empty) { padding-top: 1.25rem; }
	.spotlight__status a { color: var(--text); text-decoration: underline 1px var(--line); text-underline-offset: 0.22em; }
	/* Počet výsledků je pro čtečky; vidět je jen hláška bez výsledků nebo o načítání */
	.spotlight__results:not([hidden]) + .spotlight__status {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* Na mobilu přes celou výšku pod záhlavím: krátký panel nad čitelnou stránkou mátl */
	@media (max-width: 719px) {
		.spotlight__box { height: calc(100% - var(--spotlight-top, 0px)); box-shadow: none; }
	}
	@media (min-width: 720px) {
		.spotlight__meta { display: block; }
	}

	@media (prefers-reduced-motion: no-preference) {
		.spotlight[open] .spotlight__box { animation: jni-drop 0.22s var(--ease); }
		@keyframes jni-drop { from { opacity: 0; transform: translateY(-0.75rem); } }
	}

	/* --- Patička --- */

	.site-footer {
		padding-block: clamp(3rem, 6vw, 5rem) 2.5rem;
		font-size: var(--step--1);
	}
	.site-footer__grid {
		display: grid;
		gap: 2.5rem;
	}
	.site-footer__list {
		list-style: none;
		display: grid;
		gap: 1rem;
		padding: 0;
		font-weight: 700;
	}
	.site-footer__list a { display: inline-flex; align-items: center; gap: 0.75rem; padding-bottom: 0.125rem; }
	.site-footer__list .i { width: 1.25rem; height: 1.25rem; }
	.site-footer__copy { color: var(--text-2); }
	/* Poslední sloupec: text s copyrightem a vedle něj skok nahoru (zarovnaný k poslednímu řádku) */
	.site-footer__end { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
	.site-footer__top {
		flex: none;
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		border-radius: 50%;
		background: var(--bg-soft);
		color: var(--text-2);
		transition: background-color 0.2s, color 0.2s;
	}
	.site-footer__top:hover { background: var(--line); color: var(--text); }
	.site-footer__top .i { width: 1.25rem; height: 1.25rem; }

	@media (min-width: 720px) {
		.site-footer__grid { grid-template-columns: repeat(2, 1fr); }
	}
	@media (min-width: 1024px) {
		.site-footer__grid { grid-template-columns: 1.1fr 1fr 1fr 1.4fr; }
		.site-footer__copy { text-align: right; }
		/* Text nahoře jako dřív, šipka dole v řadě s posledním odkazem */
		.site-footer__end { flex-direction: column; justify-content: space-between; align-items: flex-end; }
	}
}

/* ==========================================================================
   Components
   ========================================================================== */

@layer components {
	/* --- Tlačítka: plné černé a obrysové, rádius 8 px --- */

	.btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.625rem;
		min-height: 2.75rem;
		padding: 0.5rem 1.125rem;
		border: 2px solid var(--text);
		border-radius: var(--radius-s);
		background: var(--text);
		color: var(--bg);
		font-size: 1rem;
		font-weight: 600;
		line-height: 1.2;
		white-space: nowrap;
		transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s var(--ease);
	}
	.btn:hover { background: #333; border-color: #333; box-shadow: 0 6px 20px rgb(0 0 0 / 0.14); }
	.btn--outline { background: var(--bg); color: var(--text); }
	.btn--outline:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
	.btn .i { width: 1.125rem; height: 1.125rem; transition: transform 0.25s var(--ease); }
	/* Šipka popojede ve směru odkazu (ven = šikmo nahoru) */
	.btn:hover .i { transform: translateX(0.1875rem); }
	.btn:hover .i:has(use[href$="#ven"]) { transform: translate(0.125rem, -0.125rem); }

	/* --- Úvod stránky průvodce: pastelová plocha v barvě kategorie, vlevo nadpis, vpravo iPhone (svisle na střed) --- */

	.guide-hero {
		--hero-bg: var(--bg-soft);
		display: grid;
		align-items: center;
		gap: 1.5rem;
		margin-inline: var(--box-inset);
		padding: 2.5rem var(--box-pad);
		background: var(--hero-bg);
		overflow: hidden;
	}
	.guide-hero__kicker {
		margin-bottom: 0.5rem;
		font-size: var(--step-1);
	}
	.guide-hero h1 {
		font-size: var(--step-4);
		font-weight: 900;
		line-height: 0.98;
		letter-spacing: -0.015em;
		hyphens: manual;
	}
	.guide-hero__media img {
		width: min(100%, 22rem);
		margin-inline: auto;
	}

	@media (min-width: 1024px) {
		.guide-hero {
			grid-template-columns: 1.15fr 1fr;
			gap: 2rem;
			min-height: clamp(28rem, 52vw, 49.3rem);
			padding: 3rem var(--box-pad);
		}
		.guide-hero__media img { width: min(100%, 30rem); margin: 0; }
	}

	/* --- Úvodní stránka: nadpis vlevo, podtitul vpravo --- */

	.page-intro {
		display: grid;
		gap: 1.25rem;
		padding-block: clamp(3.5rem, 10vw, 9rem) clamp(3.5rem, 8vw, 7.5rem);
	}
	.page-intro h1 {
		font-size: var(--step-4);
		font-weight: 900;
		line-height: 0.98;
		letter-spacing: -0.015em;
	}
	.page-intro p {
		max-width: 26rem;
		font-size: var(--step-1);
		line-height: 1.42;
	}
	@media (min-width: 1024px) {
		.page-intro { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 4rem; }
		.page-intro p { margin-top: 1.25rem; }
	}

	/* --- Kategorie průvodce: kruh s iPhonem, pod ním odkazy na návody --- */

	.topics {
		list-style: none;
		display: grid;
		gap: 3rem 1.875rem;
		padding: 0;
	}
	@media (min-width: 720px) { .topics { grid-template-columns: repeat(2, 1fr); } }
	@media (min-width: 1024px) { .topics { grid-template-columns: repeat(3, 1fr); row-gap: 4.5rem; } }

	.topic {
		position: relative;
		display: grid;
		gap: 1.25rem;
		padding-inline: clamp(0rem, 1.3vw, 1.25rem);
	}
	.topic__title { font-size: var(--step-1); }
	/* Kruh s iPhonem skoro přes celou šířku sloupce */
	.topic__img {
		width: 90%;
		aspect-ratio: 1;
		margin-inline: auto;
		border-radius: 50%;
		object-fit: cover;
		transition: transform 0.5s var(--ease);
	}
	.topic:has(a:hover) .topic__img { transform: scale(1.025); }
	.topic__links {
		color: var(--text-3);
		font-size: var(--step--1);
		line-height: 1.7;
	}
	.topic__links a:hover { color: var(--text); }

	/* --- Blok s fotkou a textem (konzultace na úvodu) --- */

	.feature {
		display: grid;
		align-items: center;
		gap: 2rem;
		padding-block: clamp(4rem, 9vw, 8rem);
	}
	.feature__img { width: 100%; border-radius: 4px; }
	.feature__kicker { font-size: var(--step-1); }
	.feature h2 {
		margin-block: 0.25rem 1.25rem;
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.14;
	}
	.feature p { max-width: 28rem; color: var(--text-body); }
	.feature .btn { margin-top: 2rem; }
	@media (min-width: 1024px) {
		.feature { grid-template-columns: 1.1fr 1fr; gap: clamp(3rem, 6vw, 5.5rem); }
	}

	/* --- O autorovi: šedý box s kulatou fotkou --- */

	.author-band {
		display: grid;
		justify-items: center;
		gap: 2rem;
		margin-inline: var(--box-inset);
		padding: clamp(3.5rem, 7vw, 5.5rem) var(--box-pad);
		background: var(--bg-soft);
	}
	.author-band__img {
		width: clamp(12rem, 24vw, 18.75rem);
		aspect-ratio: 1;
		border-radius: 50%;
		object-fit: cover;
	}
	.author-band h2 { margin-bottom: 1rem; font-size: var(--step-1); }
	.author-band p { max-width: 29rem; color: var(--text-body); }
	.author-band__more { display: inline-block; margin-top: 1.5rem; font-weight: 600; }
	@media (min-width: 720px) {
		.author-band { grid-template-columns: 1fr 1.3fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); }
		.author-band__img { justify-self: end; }
	}

	/* --- Mřížka článků (výpis, související, úvod) --- */

	.cards {
		list-style: none;
		display: grid;
		gap: 2.5rem 1.875rem;
		padding: 0;
	}
	@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
	@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

	.card { position: relative; }
	/* Obrázky článků jsou 2560 × 1067, v kartě 16 : 10 s ořezem zleva a zprava */
	.card__media {
		display: block;
		overflow: hidden;
		border-radius: 4px;
		background: var(--bg-soft);
	}
	.card__img {
		aspect-ratio: 16 / 10;
		width: 100%;
		object-fit: cover;
		transition: transform 0.6s var(--ease);
	}
	.card:hover .card__img { transform: scale(1.04); }
	.card__body { padding: 1.25rem 2rem 0; }
	.card__date {
		display: block;
		margin-bottom: 0.5rem;
		color: var(--text-3);
		font-size: var(--step--1);
		line-height: 1.12;
	}
	.card__title {
		font-size: var(--step-1);
		font-weight: 400;
		line-height: 1.42;
		letter-spacing: 0.01em;
	}
	/* Celá karta je odkaz přes nadpis */
	.card__title a::after { content: ""; position: absolute; inset: 0; }

	/* Nejnovější článek nahoře výpisu: šedý box, text vlevo, obrázek vpravo */
	.card--featured {
		display: grid;
		overflow: hidden;
		margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
		border-radius: var(--radius);
		background: var(--bg-tint);
	}
	.card--featured .card__body { padding: clamp(1.5rem, 4vw, 2.75rem); }
	.card--featured .card__media { border-radius: 0; }
	.card--featured .card__title {
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.14;
	}
	.card--featured .card__excerpt { margin-top: 1.25rem; color: var(--text-body); }
	@media (min-width: 1024px) {
		.card--featured { grid-template-columns: 1fr 1.25fr; align-items: center; }
		.card--featured .card__media { order: 2; }
	}

	/* --- Stránkování výpisu --- */

	.pagination {
		display: flex;
		justify-content: center;
		margin-top: clamp(3rem, 6vw, 5rem);
	}
	.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0; }
	.pagination a,
	.pagination [aria-current] {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.25rem;
		min-width: 2.75rem;
		height: 2.75rem;
		padding-inline: 0.75rem;
		border-radius: var(--radius-s);
		font-size: var(--step--1);
	}
	.pagination a { transition: background-color 0.2s; }
	.pagination a:hover { background: var(--bg-soft); }
	.pagination [aria-current] { background: var(--bg-soft); font-weight: 700; }
	.pagination .i { width: 1rem; height: 1rem; }

	/* --- Záhlaví článku: datum, nadpis na střed, široký obrázek --- */

	.article-head {
		max-width: var(--wide);
		margin-inline: auto;
		padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
		text-align: center;
	}
	.article-head__meta { color: var(--text-3); font-size: var(--step--1); }
	.article-head h1 {
		margin-top: 1rem;
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.14;
	}
	.article-image {
		width: 100%;
		margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
		border-radius: 4px;
	}

	.section-title {
		margin-bottom: 1.75rem;
		font-size: 1.375rem;
		font-weight: 700;
	}

	/* --- Přehled aplikací: skupiny s ikonou, popisem a odkazem do App Store --- */

	.app-group { max-width: var(--wide); margin-inline: auto; }
	.app-group + .app-group { margin-top: clamp(3rem, 6vw, 4.5rem); }
	.app-group > h2 { font-size: var(--step-1); }
	.app-group > p { margin-top: 0.75rem; color: var(--text-body); }

	.apps { list-style: none; margin-top: 1.5rem; padding: 0; }
	.app {
		display: grid;
		grid-template-columns: auto 1fr;
		gap: 0.75rem 1.25rem;
		padding-block: 1.5rem;
		border-bottom: 1px solid var(--bg-soft);
	}
	.app__icon {
		width: clamp(4rem, 8vw, 5.5rem);
		aspect-ratio: 1;
		border-radius: 22.5%;
	}
	.app h3 { font-size: var(--step-0); }
	.app p { margin-top: 0.25rem; color: var(--text-body); }
	/* Odkaz do App Store: bílá „pilulka“ se stínem jako ve Figmě */
	.app__get {
		grid-column: 2;
		justify-self: start;
		display: inline-flex;
		align-items: center;
		gap: 0.375rem;
		min-height: 2.75rem;
		padding: 0.5rem 1.25rem;
		border-radius: 999px;
		background: var(--bg);
		box-shadow: 0 4px 12px rgb(0 0 0 / 0.06), 0 0 0 1px var(--bg-soft);
		font-size: var(--step--1);
		font-weight: 600;
		white-space: nowrap;
	}
	.app__get { color: var(--text); transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
	/* Po najetí se pilulka jen trochu zvedne (výraznější stín), text zůstává čitelný */
	.app__get:hover { box-shadow: 0 8px 22px rgb(0 0 0 / 0.11), 0 0 0 1px var(--line); transform: translateY(-1px); }
	.app__get .i { width: 0.875rem; height: 0.875rem; }
	@media (min-width: 720px) {
		.app { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 2rem; }
		.app__get { grid-column: 3; }
	}

	/* --- Předchozí / Další v průvodci --- */

	.pager {
		display: grid;
		gap: 1.5rem;
		padding-block: 1rem;
	}
	.pager__link {
		display: flex;
		align-items: center;
		gap: 1.25rem;
		line-height: 1.4;
	}
	.pager__arrow {
		display: grid;
		place-items: center;
		flex: none;
		width: 3.75rem;
		height: 3.75rem;
		border-radius: 50%;
		background: var(--bg);
		box-shadow: 0 4px 24px rgb(0 0 0 / 0.08);
		transition: background-color 0.2s, color 0.2s, transform 0.3s var(--ease);
	}
	.pager__link:hover .pager__arrow { background: var(--text); color: var(--bg); }
	.pager__link[rel="prev"]:hover .pager__arrow { transform: translateX(-0.25rem); }
	.pager__link[rel="next"]:hover .pager__arrow { transform: translateX(0.25rem); }
	.pager__arrow .i { width: 1.25rem; height: 1.25rem; }
	.pager__label { display: block; font-weight: 800; }
	.pager__title { color: var(--text-3); }
	.pager__link--next { justify-content: flex-end; text-align: right; }

	@media (min-width: 720px) {
		.pager { grid-template-columns: 1fr 1fr; }
	}

	/* --- Poděkování kávou pod návodem --- */

	.coffee {
		display: grid;
		justify-items: center;
		gap: 1.25rem;
		max-width: var(--wide);
		margin: clamp(3rem, 6vw, 4.5rem) auto 0;
		padding: clamp(2rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
		background: var(--bg-soft);
		text-align: center;
	}
	.coffee__art { width: 4rem; height: 4rem; color: var(--text); }
	.coffee__title { font-size: var(--step-1); }
	.coffee__text p { margin-top: 0.375rem; color: var(--text-body); }
	@media (min-width: 720px) {
		.coffee { grid-template-columns: auto 1fr auto; align-items: center; column-gap: 2rem; text-align: left; justify-items: start; }
	}

	/* --- Pruh se službami (kurz a konzultace) na šedém podkladu --- */

	.promo {
		display: grid;
		margin-inline: var(--box-inset);
		padding-inline: var(--box-pad);
		background: var(--bg-soft);
	}
	.promo__item {
		display: grid;
		justify-items: center;
		align-content: center;
		gap: 1rem;
		padding-block: clamp(3rem, 7vw, 5.5rem);
		text-align: center;
	}
	/* Bílá dělicí linka mezi službami */
	.promo__item + .promo__item { border-top: 2px solid var(--bg); }
	.promo__item h2 { font-size: var(--step-1); }
	.promo__item p { max-width: 24rem; font-size: var(--step-1); line-height: 1.42; }
	.promo__item .btn { margin-top: 0.75rem; }

	@media (min-width: 720px) {
		.promo { grid-template-columns: 1fr 1fr; }
		.promo__item { padding-inline: clamp(1rem, 3vw, 3rem); }
		.promo__item + .promo__item { border-top: 0; border-left: 2px solid var(--bg); }
	}
	/* --- Úvod s fotkou přes celý box (konzultace, firmy): bílý nadpis na ztmavené fotce --- */

	.photo-hero {
		position: relative;
		display: grid;
		place-items: center;
		min-height: clamp(26rem, 62vw, 49.3rem);
		margin-inline: var(--box-inset);
		padding: 4rem var(--box-pad);
		overflow: hidden;
		background: #2b2b2b;
		color: #fff;
		text-align: center;
	}
	.photo-hero__img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
	.photo-hero::after {
		content: "";
		position: absolute;
		inset: 0;
		/* Lehký tmavě šedý závoj přes celou fotku (fotky jsou světlé, bílý text by splýval) */
		background: linear-gradient(rgb(28 28 30 / 0.42), rgb(28 28 30 / 0.55));
	}
	.photo-hero__text { position: relative; z-index: 1; max-width: 40rem; text-shadow: 0 1px 16px rgb(0 0 0 / 0.3); }
	.photo-hero h1 {
		font-size: var(--step-4);
		font-weight: 900;
		line-height: 0.98;
		letter-spacing: -0.015em;
	}
	.photo-hero p { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.42; }

	/* Nadpis stránky na střed bez fotky (O mně, Kavárna) */
	.page-intro--center {
		display: block;
		max-width: var(--wide);
		margin-inline: auto;
		text-align: center;
	}
	.page-intro--center p { max-width: 40rem; margin: 1.5rem auto 0; }
	/* O mně: delší úvodní odstavec, ať není tak úzký */
	.page-intro--wide p { max-width: 48rem; }

	/* --- Ceník: velká cena vlevo, vysvětlení vpravo (ve Figmě „1 000 Kč“) --- */

	.prices {
		display: grid;
		gap: 2rem;
		max-width: var(--wide);
		margin: 0 auto;
		padding: 0;
		list-style: none;
	}
	.price { display: grid; gap: 0.5rem 2rem; }
	.price__label { font-size: var(--step-0); }
	.price__value {
		display: block;
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.1;
		white-space: nowrap;
	}
	.price:first-child .price__value { font-size: var(--step-4); }
	.price__note { color: var(--text-body); font-size: var(--step--1); line-height: 1.6; }
	@media (min-width: 720px) {
		.price { grid-template-columns: 1fr 1fr; align-items: end; }
		.price__head { text-align: right; }
		.price__note { padding-bottom: 0.4em; }
	}
	/* Varianta ve sloupcích (firmy): tři ceny vedle sebe. Štítek, cena a poznámka každého sloupce
	   leží ve společných řádcích, takže ceny jsou na jedné lince i při různě dlouhých štítcích. */
	.prices--columns { max-width: var(--page); gap: 3rem 2rem; }
	.prices--columns .price { grid-template-columns: none; gap: 0.75rem; text-align: center; }
	.prices--columns .price__head { display: grid; gap: 0.25rem; text-align: center; }
	.prices--columns .price__value { font-size: var(--step-4) !important; letter-spacing: -0.02em; }
	.prices--columns .price__note { max-width: 20rem; margin-inline: auto; padding: 0; }
	@media (min-width: 720px) {
		.prices--columns { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto; }
		.prices--columns .price { grid-row: span 2; grid-template-rows: subgrid; align-items: start; }
		.prices--columns .price__head { align-self: end; }
		.prices--columns .price__value { font-size: clamp(2rem, 0.8rem + 3vw, 4rem) !important; }
	}

	.lead-center {
		max-width: var(--measure);
		margin: 0 auto;
		font-size: var(--step-1);
		line-height: 1.42;
		text-align: center;
	}

	/* --- Formulář: jen spodní linka jako ve Figmě, štítky nad poli --- */

	.form-block { max-width: 30rem; margin-inline: auto; }
	.form-block h2 { margin-bottom: 1.5rem; font-size: var(--step-3); font-weight: 900; }
	.form { display: grid; gap: 1.5rem; }
	.field { display: grid; gap: 0.25rem; }
	.field label { color: var(--text-2); font-size: var(--step--1); }
	.field input,
	.field textarea {
		width: 100%;
		padding: 0.5rem 0;
		border: 0;
		border-bottom: 1px solid var(--line);
		border-radius: 0;
		background: transparent;
		font-size: var(--step-1);
	}
	.field textarea { min-height: 7rem; resize: vertical; }
	.field input:focus,
	.field textarea:focus { outline: none; border-bottom: 2px solid var(--text); margin-bottom: -1px; }
	.form .btn { justify-self: start; margin-top: 0.5rem; }
	.form__note { color: var(--text-2); font-size: var(--step--1); }

	/* --- Další nabídky (konzultace, firmy) jako ve Figmě: první blok v levé polovině,
	   druhý pod ním v pravé polovině, bez překryvu --- */

	.offers { display: grid; gap: 3rem; }
	.offer h2 { font-size: var(--step-3); font-weight: 900; line-height: 1.14; }
	.offer p { max-width: 26rem; margin-block: 1rem 1.5rem; color: var(--text-body); }
	@media (min-width: 1024px) {
		/* Každý blok má polovinu šířky; sudý se odsadí doprava, takže leží pod lichým, ne vedle něj */
		.offers { row-gap: 4rem; }
		.offer { width: calc(50% - 3rem); }
		.offer:nth-child(even) { justify-self: end; width: 50%; }
	}

	/* --- Ohlasy: šedý pás, tři citace --- */

	.quotes {
		margin-inline: var(--box-inset);
		padding: clamp(3.5rem, 7vw, 5.5rem) var(--box-pad);
		background: var(--bg-soft);
	}
	.quotes h2 { margin-bottom: 2.5rem; font-size: var(--step-3); font-weight: 900; }
	.quotes ul { list-style: none; display: grid; gap: 2.5rem; padding: 0; }
	@media (min-width: 1024px) { .quotes ul { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }
	.quote blockquote { margin: 0; color: var(--text-body); }
	.quote blockquote p::before { content: "„"; }
	.quote blockquote p::after { content: "“"; }
	.quote figcaption { margin-top: 1rem; font-size: var(--step--1); font-weight: 700; }

	/* --- Kontakty: tři položky s emoji --- */

	.contacts {
		list-style: none;
		display: grid;
		gap: 2rem;
		padding: 0;
		text-align: center;
		font-size: var(--step-1);
	}
	.contacts__icon { display: block; margin-bottom: 0.75rem; font-size: 2rem; line-height: 1; }
	@media (min-width: 720px) { .contacts { grid-template-columns: repeat(3, 1fr); } }

	.billing {
		max-width: var(--wide);
		margin: clamp(3rem, 6vw, 4.5rem) auto 0;
		color: var(--text-2);
		font-size: var(--step--2);
		line-height: 1.7;
		text-align: center;
	}
	.billing strong { color: var(--text); font-size: var(--step--1); }

	/* --- Bio vedle kulaté fotky (O mně) --- */

	.bio { display: grid; gap: 2rem; max-width: var(--wide); margin-inline: auto; }
	.bio h2 { margin-bottom: 1.25rem; font-size: var(--step-3); font-weight: 900; }
	.bio p + p { margin-top: 1em; }
	.bio__img { width: clamp(10rem, 20vw, 12.5rem); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
	@media (min-width: 720px) {
		.bio { grid-template-columns: 1fr auto; align-items: center; gap: 4rem; }
	}

	/* --- Loga klientů: šedý pás přes celou šířku boxu, nadpis i loga uvnitř --- */

	.logos {
		margin-inline: var(--box-inset);
		padding: clamp(3.5rem, 7vw, 5.5rem) var(--box-pad);
		background: var(--bg-soft);
	}
	.logos h2 { margin-bottom: clamp(2rem, 4vw, 3.5rem); font-size: var(--step-3); font-weight: 900; }
	.logos ul {
		list-style: none;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		align-items: center;
		justify-items: center;
		gap: 2.5rem 2rem;
		padding: 0;
	}
	@media (min-width: 720px) { .logos ul { grid-template-columns: repeat(3, 1fr); } }
	@media (min-width: 1024px) { .logos ul { grid-template-columns: repeat(5, 1fr); gap: 3.5rem 2.5rem; } }
	/* Některá SVG mají jen viewBox bez rozměrů: výška se proto zadává pevně, šířka se dopočítá z poměru.
	   multiply schová bílé pozadí rastrových log na šedé ploše. */
	.logos li { display: flex; justify-content: center; width: 100%; min-width: 0; }
	.logos a { display: block; max-width: 100%; }
	.logos img { width: auto; height: 2.75rem; max-width: min(100%, 10.5rem); object-fit: contain; filter: grayscale(1); mix-blend-mode: multiply; opacity: 0.85; transition: opacity 0.2s; }
	.logos a:hover img { opacity: 1; }

	/* --- Online kurz: tlačítka nákupu a seznam lekcí --- */

	.course-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
	/* Tlačítka nákupu patří k úvodu kurzu, proto menší mezera pod nadpisem */
	.page-intro:has(+ .course-actions) { padding-bottom: clamp(2rem, 4vw, 3rem); }
	.course-actions--end { justify-content: center; margin-block: 2.5rem clamp(4rem, 8vw, 7rem); }

	.lessons { max-width: var(--wide); margin: clamp(4rem, 8vw, 6.5rem) auto 0; }
	.lessons h2 {
		margin-bottom: 1.5rem;
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.14;
		text-align: center;
	}
	.lessons ol { list-style: none; padding: 0; }
	.lesson {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		border-bottom: 1px solid var(--line);
		font-size: var(--step-0);
	}
	.lesson a {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 0.5rem 1rem;
		min-height: 4rem;
		padding-block: 1rem;
	}
	.lesson .i { width: 1.625rem; height: 1.625rem; color: var(--text-3); transition: color 0.2s, transform 0.3s var(--ease); }
	.lesson a:hover .i { color: var(--text); transform: scale(1.1); }
	.lesson time { color: var(--text-2); font-variant-numeric: tabular-nums; }
	.badge {
		padding: 0.25rem 0.625rem;
		border-radius: 999px;
		background: var(--text);
		color: var(--bg);
		font-size: var(--step--1);
		font-weight: 600;
	}
	.lessons__total {
		display: flex;
		justify-content: space-between;
		max-width: var(--wide);
		margin: 1.5rem auto 0;
		font-size: var(--step-0);
	}

	/* --- Kavárna: stejný formulář a skript (/web/objednavka.js) jako na První Mac, jen v barvách
	   Jak na iPhone. Třídy a data-* atributy musí zůstat stejné, skript se o ně opírá. --- */

	.coffee-order { display: grid; gap: 2.5rem; max-width: 40rem; margin: 0 auto; }

	/* Vlastní formulář pozvání na kávu (pozvani-na-kavu.php, chování v objednavka.js).
	   Nabídka káv je širší než text, aby se na počítači vešlo pět dlaždic vedle sebe; údaje a platba
	   mají čitelnou šířku formuláře. */
	.coffee-order--shop { max-width: var(--wide); }
	.coffee-form { display: grid; gap: 2rem; max-width: var(--wide); margin-inline: auto; }
	.coffee-form fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
	.coffee-form legend { padding: 0; }
	.coffee-form__title { width: 100%; margin-bottom: 1.5rem; font-size: var(--step-3); font-weight: 900; line-height: 1.14; text-align: center; }
	.coffee-form__subtitle { margin-bottom: 1rem; font-size: var(--step-1); font-weight: 800; }

	/* Nabídka: jeden seznam, na telefonu řádky (kresba, název a cena, počítadlo), od 720 px dlaždice vedle sebe.
	   Názvy se zalamují, aby se vešly i delší položky (kurz s datem). */
	.coffee-pick__list { display: grid; gap: 0.625rem; margin: 0; padding: 0; list-style: none; }
	.coffee-item {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: center;
		gap: 0.875rem;
		padding: 0.75rem 0.875rem;
		background: var(--bg-soft);
		box-shadow: inset 0 0 0 0 var(--text);
		transition: box-shadow 0.2s, background-color 0.2s;
	}
	.coffee-item:hover { background: #eef0f2; }
	.coffee-item.is-on { background: var(--bg); box-shadow: inset 0 0 0 2px var(--text); }
	.coffee-item__art { width: 3rem; height: 3rem; color: var(--text); }
	.coffee-item__text { display: grid; gap: 0.125rem; min-width: 0; }
	.coffee-item__name { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
	.coffee-item__price { color: var(--text-2); font-size: 0.9375rem; }
	@media (min-width: 720px) {
		.coffee-pick__list { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
		.coffee-item {
			grid-template-columns: minmax(0, 1fr);
			grid-template-rows: auto 1fr auto;
			justify-items: center;
			gap: 0.625rem;
			padding: 1.125rem 0.5rem 1rem;
			text-align: center;
		}
		.coffee-item__art { width: 3.5rem; height: 3.5rem; }
		.coffee-item__text { align-content: start; }
	}

	/* Počítadlo −/+ (tlačítka ukáže skript, bez něj zůstane číselné pole) */
	.stepper { display: inline-flex; align-items: center; gap: 0.5rem; }
	.stepper__button {
		display: grid;
		place-items: center;
		width: 2.25rem;
		height: 2.25rem;
		padding: 0 0 0.125rem;
		border: 1px solid var(--line);
		border-radius: var(--radius-s);
		background: var(--bg);
		color: var(--text);
		font: inherit;
		font-size: 1.25rem;
		transition: background-color 0.2s, border-color 0.2s, color 0.2s;
		line-height: 1;
		cursor: pointer;
	}
	.stepper__button[hidden] { display: none; }
	.stepper__button:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
	.stepper__button[aria-disabled="true"] { color: var(--line); border-color: var(--bg-soft); cursor: default; }
	.stepper__count { min-width: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
	.stepper__count[hidden], .stepper__input[hidden] { display: none; }
	.stepper__input {
		width: 4rem;
		padding: 0.375rem 0.5rem;
		border: 1px solid var(--line);
		border-radius: var(--radius-s);
		background: var(--bg);
		color: var(--text);
		font: inherit;
		text-align: center;
	}

	/* Součet pod nabídkou */
	.coffee-pick__sum {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 1rem;
		margin-top: 1rem;
		padding: 0.875rem 0.25rem 0;
		border-top: 1px solid var(--line);
	}
	.coffee-pick__sum[hidden] { display: none; }
	.coffee-pick__sum strong { font-size: var(--step-1); font-weight: 600; font-variant-numeric: tabular-nums; }

	/* Údaje a platba v panelu */
	.coffee-form__panel {
		display: grid;
		gap: 1.75rem;
		width: 100%;
		max-width: 40rem;
		margin-inline: auto;
		padding: clamp(1.5rem, 4vw, 2.75rem);
		border: 1px solid var(--line);
		background: var(--bg);
	}
	.coffee-summary {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 1rem;
		padding: 0.75rem 1rem;
		background: var(--bg-soft);
	}
	.coffee-summary[hidden] { display: none; }
	.coffee-summary strong { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
	.coffee-check { display: flex; align-items: center; gap: 0.625rem; margin: 0.25rem 0 0; }
	.coffee-check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--text); }
	/* IČO jen se zaškrtnutými fakturačními údaji (funguje i bez skriptu) */
	.coffee-ico { display: none; gap: 0.75rem; }
	.coffee-form:has(#coffee-invoice:checked) .coffee-ico { display: grid; }
	.coffee-ico .field { max-width: 14rem; }
	.coffee-ares {
		display: grid;
		gap: 0.125rem;
		padding: 0.875rem 1rem;
		background: var(--bg-soft);
		font-size: 0.9375rem;
		line-height: 1.5;
	}
	.coffee-ares[hidden] { display: none; }
	.coffee-ares strong { font-weight: 600; }
	.coffee-ares small { margin-top: 0.25rem; color: var(--text-2); font-size: 0.8125rem; }
	.coffee-ares__name::before { content: "✓\00a0"; color: #248a3d; }

	/* Volby platby: přepínače jako karty, každá s jednou ikonou */
	.coffee-pay__options { display: grid; gap: 0.75rem; }
	@media (min-width: 560px) {
		.coffee-pay__options { grid-template-columns: 1fr 1fr; }
	}
	.pay-option {
		position: relative;
		display: grid;
		align-content: start;
		gap: 0.375rem;
		padding: 1.125rem 1.25rem;
		background: var(--bg);
		box-shadow: inset 0 0 0 1px var(--line);
		cursor: pointer;
		transition: box-shadow 0.2s;
	}
	.pay-option:hover { box-shadow: inset 0 0 0 1px var(--text); }
	.pay-option:has(:checked) { box-shadow: inset 0 0 0 2px var(--text); }
	.pay-option:has(:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
	.pay-option__icon { width: 1.75rem; height: 1.75rem; margin-bottom: 0.25rem; color: var(--text-2); }
	.pay-option:has(:checked) .pay-option__icon { color: var(--text); }
	.pay-option__title { font-weight: 600; }
	.pay-option__note { color: var(--text-2); font-size: 0.875rem; line-height: 1.45; }

	.coffee-form__submit { width: 100%; white-space: normal; }
	.coffee-form__submit:disabled { opacity: 0.6; cursor: default; }

	/* Chyby u skupin (u polí je .field .error-bubble) */
	.coffee-form__error { margin: 0.75rem 0 0; color: #d70015; font-size: 0.875rem; }
	.coffee-form__error[hidden] { display: none; }
	.coffee-form__error--form { margin: 0; font-size: 0.9375rem; }
	.coffee-pick .coffee-form__error { text-align: center; }

	/* Údaje v kavárně: jméno a e-mail vedle sebe, ostatní přes celou šířku */
	@media (min-width: 560px) {
		.coffee-form .form { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
		.coffee-form .form > :not(.field--half) { grid-column: 1 / -1; }
	}

	/* Svislý rytmus sekcí na stránkách služeb */
	.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
	.section + .section { padding-top: 0; }
}

/* ==========================================================================
   Content — text návodu z databáze
   ========================================================================== */

@layer content {
	.prose {
		max-width: var(--measure);
		margin-inline: auto;
		color: var(--text-body);
	}
	:is(.prose, .prose > .text-wrap) > * + * { margin-top: 1.25em; }
	/* Text z editoru (App\Content\Markdown) je rozdělený do bloků .text-wrap, mezi nimi obrázky
	   (.text-img) a boxy (.content-box); pro sazbu se chovají, jako by byly přímo v .prose. */
	.prose > .text-wrap > :first-child { margin-top: 0; }
	.prose > .text-img img { width: min(100%, 34rem); margin-inline: auto; }
	.prose > .text-img { margin-block: 2.5rem; }
	.prose > .text-img + .text-wrap { margin-top: 2.5rem; }
	/* Několik obrázků za sebou v jednom odstavci (z WordPressu: řádek 1/3+1/3+1/3) = mřížka vedle sebe */
	.prose p:has(> img + img) {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
		gap: clamp(0.75rem, 2vw, 1.5rem);
		margin-block: 2.5rem;
	}
	.prose p:has(> img + img) > img { width: 100%; height: auto; }
	:is(.prose, .prose > .text-wrap) > :is(h2, h3, h4) { color: var(--text); }
	:is(.prose, .prose > .text-wrap) > h2 {
		margin-top: 2.5em;
		font-size: var(--step-3);
		font-weight: 900;
		line-height: 1.14;
	}
	:is(.prose, .prose > .text-wrap) > h3 {
		margin-top: 2.25em;
		font-size: var(--step-0);
	}
	:is(.prose, .prose > .text-wrap) > :is(h2, h3) + * { margin-top: 0.75em; }
	.prose a { color: var(--text); }
	.prose strong { color: var(--text); font-weight: 700; }

	/* Úvodní odstavec je větší (ve Figmě 24 px) */
	:is(.prose, .prose > .text-wrap) > .lead {
		font-size: var(--step-1);
		line-height: 1.42;
		color: var(--text);
	}

	/* Obrázky iPhonu: širší než text, ale jen do šířky obsahu */
	:is(.prose, .prose > .text-wrap) > figure {
		margin-block: 2.5rem;
	}
	:is(.prose, .prose > .text-wrap) > figure img { width: min(100%, 34rem); margin-inline: auto; }
	.prose figcaption {
		margin-top: 0.75rem;
		color: var(--text-3);
		font-size: var(--step--1);
		text-align: center;
	}

	/* Číslovaný postup: kroužek s číslem, tučný nadpis kroku */
	:is(.prose, .prose > .text-wrap) > ol {
		list-style: none;
		counter-reset: step;
		padding: 0;
	}
	:is(.prose, .prose > .text-wrap) > ol > li {
		counter-increment: step;
		position: relative;
		padding-left: 3.25rem;
	}
	:is(.prose, .prose > .text-wrap) > ol > li + li { margin-top: 1.75rem; }
	:is(.prose, .prose > .text-wrap) > ol > li::before {
		content: counter(step);
		position: absolute;
		left: 0;
		top: -0.1em;
		display: grid;
		place-items: center;
		width: 2rem;
		height: 2rem;
		border: 1.5px solid var(--text);
		border-radius: 50%;
		color: var(--text);
		font-weight: 800;
		font-size: 1.0625rem;
		line-height: 1;
	}
	:is(.prose, .prose > .text-wrap) > ul { padding-left: 1.25em; }
	.prose li + li { margin-top: 0.5em; }

	/* Užitečný tip: šedý box s dlaždicí s emoji */
	:is(.prose, .prose > .text-wrap) > .tip:not(.content-box) {
		display: grid;
		grid-template-columns: auto 1fr;
		align-items: start;
		gap: 1rem 1.5rem;
		margin-block: 2.5rem;
		padding: clamp(1.25rem, 3vw, 2rem);
		border-radius: var(--radius);
		background: var(--bg-tint);
	}
	.tip__icon {
		display: grid;
		place-items: center;
		width: clamp(3.5rem, 7vw, 5.75rem);
		aspect-ratio: 1;
		border-radius: 0.9rem;
		background: var(--tip);
		font-size: clamp(1.75rem, 3.5vw, 3rem);
		line-height: 1;
	}
	.tip__title { color: var(--text); font-weight: 800; }

	/* Tip z editoru: > [!TIP] → div.content-box.tip; dlaždice s 👍 místo ikony Prvního Macu */
	.prose > .content-box {
		--tile: clamp(3.5rem, 7vw, 5.75rem);
		position: relative;
		min-height: calc(var(--tile) + 2 * clamp(1.25rem, 3vw, 2rem));
		margin-block: 2.5rem;
		padding: clamp(1.25rem, 3vw, 2rem);
		padding-left: calc(var(--tile) + clamp(2.25rem, 5vw, 3.5rem));
		border-radius: var(--radius);
		background: var(--bg-tint);
	}
	.prose > .content-box::before {
		content: "👍";
		position: absolute;
		top: clamp(1.25rem, 3vw, 2rem);
		left: clamp(1.25rem, 3vw, 2rem);
		display: grid;
		place-items: center;
		width: var(--tile);
		aspect-ratio: 1;
		border-radius: 0.9rem;
		background: var(--tip);
		font-size: clamp(1.75rem, 3.5vw, 3rem);
		line-height: 1;
	}
	.prose > .content-box.warning::before { content: "⚠️"; }
	.prose > .content-box > p + p { margin-top: 0.5em; }
	.prose > .content-box b { color: var(--text); font-weight: 800; }
	/* Popisek ikony Prvního Macu („Tip“) je tu navíc */
	.prose > .content-box > .icon { display: none; }
	@media (min-width: 1024px) {
		.prose > .content-box { margin-inline: calc((var(--measure) - min(68.75rem, 90vw)) / 2); }
	}

	/* Obrázky a mřížky obrázků jsou v článcích i průvodci širší než text, jako na Prvním Macu
	   (--wide, 816 px, obrázky z knihovny mají 800 px). Obrázek se zadanou šířkou ({width=…},
	   snímky displeje iPhonu) ji drží; několik takových po sobě stojí v řadě (ImageRows). */
	.prose > .text-img img:not([style]) { width: 100%; }
	@media (min-width: 1024px) {
		.prose > .text-img,
		.prose > .text-wrap > p:has(> img + img) {
			margin-inline: calc((var(--measure) - min(var(--wide), 100vw - 2 * var(--gutter))) / 2);
		}
	}
	.prose > .img-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem 1rem;
		margin-block: 2.5rem;
	}
	.prose > .img-row > .text-img { margin: 0; }
	/* Šířku z editoru (300 px) v řadě nahradí šířka sloupce; je v atributu style, proto !important */
	.prose > .img-row img { width: 100% !important; margin: 0; }
	@media (min-width: 720px) {
		.prose > .img-row { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); column-gap: 1.5rem; }
	}
	@media (min-width: 1024px) {
		.prose > .img-row {
			width: min(68.75rem, 100vw - 2 * var(--gutter));
			margin-inline: calc((var(--measure) - min(68.75rem, 100vw - 2 * var(--gutter))) / 2);
		}
	}

	/* Tabulky a přehledy aplikací jsou širší než text v článcích i průvodci (nejsou to snímky displeje) */
	.prose > table,
	.prose > .apps,
	.prose > .app-group { width: 100%; }
	@media (min-width: 1024px) {
		.prose > table,
		.prose > .apps,
		.prose > .app-group {
			width: min(var(--wide), 100vw - 2 * var(--gutter));
			max-width: none;
			margin-inline: calc((var(--measure) - min(var(--wide), 100vw - 2 * var(--gutter))) / 2);
		}
	}
	.prose > table { margin-block: 2.5rem; border-collapse: separate; border-spacing: 0; line-height: 1.5; font-size: var(--step--1); }
	.prose caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.prose :is(th, td) { padding: 0.875rem 1rem; border-bottom: 1px solid var(--bg-soft); text-align: left; vertical-align: top; }
	.prose tr:first-child th { background: var(--bg-soft); color: var(--text-2); font-weight: 600; }
	.prose tr:first-child th:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
	.prose tr:first-child th:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
	.prose tbody th { color: var(--text); font-weight: 700; }
	@media (max-width: 1023px) {
		.prose > table { display: block; overflow-x: auto; }
	}

	/* Zvětšení obrázku po kliknutí (jni.js) */
	.prose img.is-zoomable { cursor: zoom-in; }
	.prose img.is-zoomable:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
	.lightbox {
		width: 100vw;
		max-width: none;
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: clamp(1rem, 4vw, 3rem);
		border: 0;
		background: rgb(255 255 255 / 0.96);
		cursor: zoom-out;
	}
	.lightbox[open] { display: grid; place-items: center; animation: jni-fade 0.2s ease-out; }
	.lightbox::backdrop { background: transparent; }
	.lightbox__img { max-width: 100%; max-height: calc(100dvh - 2 * clamp(1rem, 4vw, 3rem)); width: auto; height: auto; object-fit: contain; }
	.lightbox__close {
		position: fixed;
		top: 1rem;
		right: 1rem;
		display: grid;
		place-items: center;
		width: 3rem;
		height: 3rem;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--bg-soft);
	}
	.lightbox__close .i { width: 1.25rem; height: 1.25rem; }
	@keyframes jni-fade { from { opacity: 0; } }

	/* Zásady cookies a zpracování osobních údajů: dlouhý text, menší nadpisy a mezery */
	.prose.prose--legal > h2 { margin-top: 2.5rem; font-size: var(--step-1); }
	.prose.prose--legal > h3 { margin-top: 1.75rem; font-size: var(--step-0); }

	/* Chybové hlášky formulářů (public/js/forms.js) */
	.error-bubble { display: block; margin-top: 0.375rem; color: #d70015; font-size: var(--step--1); }
	.form-failed { color: #d70015; }

	/* Kavárna: poděkování a nedokončená platba (kavarna-dekujeme.php, kavarna-nezaplaceno.php) */
	.coffee-done .btn { margin-top: 0.5rem; }
	.coffee-done__alt { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
	.coffee-done__alt .btn { margin-top: 1rem; }
	.tip p + p { margin-top: 0.5em; }

	@media (min-width: 1024px) {
		/* Box s tipem je širší než text, jako ve Figmě (1100 px) */
		:is(.prose, .prose > .text-wrap) > .tip:not(.content-box) { margin-inline: calc((var(--measure) - min(68.75rem, 90vw)) / 2); }
	}
}
