/* Anleitung „So arbeitest du mit Handschrift“ im Look der Startseite (Light Studio).
   Baut auf /v/common.css, /v/a/a.css und /v/seite.css auf (Farben, Schrift, Pillen, Kopf- und Fußzeile, Zusatz-Tokens).
   Alle Regeln stehen unter .sp, damit sie die allgemeinen Inhaltsregeln aus seite.css sicher überstimmen. */

.sp.an { width: min(760px, 100% - 40px); padding-top: 28px; }
.sp.an [id] { scroll-margin-top: 156px; }
.sp.an h1 { margin-bottom: 14px; }
.an-lead { font-size: 19px; line-height: 1.5; color: var(--mut); max-width: 44ch; margin: 0 0 18px; }
.sp .an-hilfe, .sp .an-ruhig { font-size: 14px; line-height: 1.55; color: var(--mut); }
.sp .an-ruhig { text-align: center; margin: 40px 0 0; }
.an kbd, .an .k { font-family: inherit; font-weight: 600; }

/* Seitennavigation: Pillen-Leiste unter der Kopfzeile, bleibt beim Scrollen stehen, am Handy seitlich wischbar */
.an-nav { position: sticky; top: 78px; z-index: 40; width: min(760px, 100% - 24px); margin: 86px auto 0; }
.an-nav-in { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 6px; border-radius: 999px; background: var(--nav); border: 1px solid var(--line); box-shadow: var(--nav-shadow); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.an-nav-in::-webkit-scrollbar { display: none; }
.an-nav a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font: 600 14px/1 var(--font); color: var(--mut); text-decoration: none; white-space: nowrap; transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.an-nav a:hover { color: var(--fg); background: var(--card2); }
.an-nav a[aria-current="page"] { background: var(--btn); color: var(--btn-ink); box-shadow: var(--pillshadow); }
@media (max-width: 560px) {
	.an-nav { top: 76px; margin-top: 82px; }
	.an-nav-in { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 22px; }
	.an-nav a { min-height: 44px; }
}

/* „Auf dieser Seite“: Inhaltsverzeichnis, große Tippflächen */
.sp .an-inhalt { margin: 24px 0 36px; padding: 22px 26px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--tile-shadow); }
.an-inhalt b { display: block; margin-bottom: 6px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.sp .an-inhalt ol { list-style: none; padding: 0; margin: 0; }
.sp .an-inhalt li { margin: 0; padding: 0; }
.sp .an-inhalt a { display: flex; align-items: center; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--fg); font-weight: 600; text-decoration: none; transition: color var(--dur-2) var(--ease), padding var(--dur-2) var(--ease); }
.sp .an-inhalt li:last-child a { border-bottom: 0; }
.sp .an-inhalt a:hover { color: var(--acc); padding-left: 6px; }
.an-inhalt a small { font-weight: 400; color: var(--mut); margin-left: 6px; }

/* Abschnitte als Karten */
.sp .an-teil { margin: 0 0 20px; padding: 32px 30px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--tile-shadow); }
.an-teil > :last-child { margin-bottom: 0; }
.sp .an-teil h2 { margin: 0 0 8px; font-size: clamp(24px, 3.4vw, 30px); }
.sp .an-teil h3 { display: flex; align-items: center; gap: 12px; margin: 32px 0 8px; font-size: 20px; }
.an-nr { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font: 700 14px/1 var(--font); }
.an-kurz { margin: 0 0 20px; font-size: 17px; color: var(--mut); }
.sp .an-zwischen { margin: 48px 0 16px; font-size: 22px; }
.sp .an-teil .an-zwischen { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }

/* Bilder */
.an-bild { margin: 16px 0 24px; }
.an-bild img { display: block; max-width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--row-shadow); }
.an-bild.hoch img { max-width: min(100%, 440px); }
.an-bild figcaption { margin-top: 10px; font-size: 14px; color: var(--mut); }

/* Hinweisfelder: „Das siehst du dann“ (grün), „Achtung“ (warm), Beispiele (neutral) */
.sp .an-erwartet { margin: 16px 0; padding: 14px 18px; border-radius: 16px; border: 1px solid rgb(31 157 99 / .28); background: var(--okbg); font-size: 15px; }
.sp .an-achtung { margin: 16px 0; padding: 14px 18px; border-radius: 16px; border: 1px solid rgb(168 106 31 / .3); background: var(--warnbg); font-size: 15px; }
.sp .an-beispiel, .sp .an-ruhig-box { margin: 16px 0; padding: 14px 18px; border-radius: 16px; border: 1px dashed var(--line2); background: var(--card2); font-size: 15px; }
.an-erwartet > b, .an-achtung > b, .an-beispiel > b, .an-ruhig-box > b { display: block; margin-bottom: 2px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.an-erwartet > b { color: var(--ok); }
.an-achtung > b { color: var(--warn); }
.an-erwartet > :last-child, .an-achtung > :last-child, .an-beispiel > :last-child { margin-bottom: 0; }
.sp .an-beispiel ul { margin: 8px 0; }

/* Liste „Was ist wo?“ und Baum */
.sp ul.an-liste { list-style: none; padding: 0; display: grid; gap: 8px; margin: 16px 0; }
.sp .an-liste li { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--card2); font-size: 15px; }
.an-liste li b { font-size: 16px; }
.sp ul.an-baum, .sp .an-baum ul { list-style: none; padding-left: 0; margin: 8px 0; }
.sp .an-baum ul { padding-left: 18px; border-left: 2px solid var(--line2); margin: 4px 0 4px 6px; }
.sp .an-baum li { margin: 2px 0; font-weight: 600; }
.sp .an-baum li li li { font-weight: 400; }

/* Aufklappfelder (FAQ) */
.an details { border-top: 1px solid var(--line); }
.an details:last-of-type { border-bottom: 1px solid var(--line); }
.an summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; cursor: pointer; font-weight: 600; list-style: none; }
.an summary::-webkit-details-marker { display: none; }
.an summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: rotate(45deg); transition: transform var(--dur-2) var(--ease); }
.an details[open] > summary::after { transform: rotate(-135deg); }
.an details > div { padding: 0 0 16px; }
.an details > div > :last-child { margin-bottom: 0; }

/* Wege und Kacheln auf der Übersicht */
.an-wege { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sp .an-weg { display: flex; flex-direction: column; gap: 8px; padding: 26px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--tile-shadow); color: var(--fg); text-decoration: none; transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.an-weg b { font: 700 20px/1.2 var(--disp); letter-spacing: -0.02em; }
.an-weg span { color: var(--mut); font-size: 15px; }
.an-weg em { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 600; font-size: 15px; color: var(--fg); }
.an-kacheln { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 40px; }
.sp .an-kachel { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 16px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--row-shadow); color: var(--fg); text-decoration: none; transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.an-kachel b { font-size: 16px; }
.an-kachel span { font-size: 14px; color: var(--mut); }
.sp .an-weg:hover, .sp .an-kachel:hover { box-shadow: var(--tile-shadow-h); transform: translateY(-2px); }
.an-weg:focus-visible, .an-kachel:focus-visible, .an-nav a:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* Fuß der Seite */
.an-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-top: 28px; font-size: 14px; }
.sp .an-weiter { flex-basis: 100%; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 16px; text-align: center; text-decoration: none; color: var(--fg); transition: background var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.sp .an-weiter:hover { background: var(--card2); transform: translateY(-2px); }

@media (max-width: 560px) {
	.sp.an { width: min(760px, 100% - 28px); }
	.sp .an-teil { padding: 24px 20px; border-radius: 22px; }
	.sp .an-inhalt { padding: 16px 20px; }
	.sp .an-weg { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .sp .an-weg:hover, .sp .an-kachel:hover, .sp .an-weiter:hover { transform: none; } }
