/* Seite /for-you/ (custom-for-you.hbs) — ein heller, ruhiger Brief.
   Wird nur von dieser Vorlage geladen; screen.css lädt dort nicht. Alles steht unter
   .for-you-root / .for-you, damit nichts auf andere Seiten übergreift, falls die Datei je
   woanders eingebunden würde.

   Farben (Kontrast auf Papier #F5EFE4 / Einschub #EDE3D1):
   Text #1F1D1A 14,7:1 / 13,2:1 · gedämpft #5C554A 6,4:1 / 5,8:1 · dunkles Sand #6E5829 5,9:1 / 5,3:1
   (Links, Plus-Zeichen, Fokus) · Linie #8C7447 3,9:1 (Einschub-Linie, Stern-Trenner)
   Sand #C8AF82 → nur Linie vor „Your no“ und Stern am Schluss, nie für Text. */

html.for-you-root {
    color-scheme: only light;
    background: #F5EFE4;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Portal ist per ghost_head ausgeschlossen; das hier fängt ab, falls Ghost es künftig anders einbindet. */
.for-you-root #ghost-portal-root,
.for-you-root .gh-portal-triggerbtn-wrapper,
.for-you-root .gh-announcement-bar {
    display: none !important;
}

.for-you {
    --fy-bg: #F5EFE4;
    --fy-inset: #EDE3D1;
    --fy-line: #8C7447;
    --fy-text: #1F1D1A;
    --fy-muted: #5C554A;
    --fy-accent: #6E5829;
    --fy-sand: #C8AF82;
    --fy-rule: #DCD0B8;
    --fy-mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    --fy-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --fy-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    margin: 0;
    background: var(--fy-bg);
    color: var(--fy-text);
    font-family: var(--fy-sans);
    font-size: 1.125rem;          /* 18 px */
    font-weight: 400;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

.for-you *,
.for-you *::before,
.for-you *::after {
    box-sizing: border-box;
}

.for-you ::selection {
    background: #E8DCC4;
    color: var(--fy-text);
}

.for-you .for-you__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.for-you .for-you__letter {
    max-width: calc(40rem + 2 * 22px);
    margin: 0 auto;
    padding: 40px max(22px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

/* ---------- Text aus dem Editor ---------- */

.for-you .for-you__content > * {
    margin-top: 0;
    margin-bottom: 1.1em;
}

.for-you .for-you__content > :last-child {
    margin-bottom: 0;
}

.for-you .for-you__content p,
.for-you .for-you__content li {
    color: var(--fy-text);
    font-family: var(--fy-sans);
    font-size: 1em;
    line-height: 1.6;
}

/* 1. Opening: alle Absätze vor der ersten Zwischenüberschrift, groß gesetzt */
.for-you .for-you__content > p:not(h2 ~ p, hr ~ p) {
    font-size: 1.375rem;          /* 22 px */
    line-height: 1.5;
    margin-bottom: 0.9em;
    text-wrap: pretty;
}

.for-you .for-you__content h2,
.for-you .for-you__content h3 {
    margin: 3.25rem 0 1rem;
    color: var(--fy-text);
    font-family: var(--fy-mono);
    font-weight: 500;
    font-size: 1.25rem;           /* 20 px */
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-transform: none;
    text-wrap: balance;
}

.for-you .for-you__content h3 {
    margin-top: 2.25rem;
    font-size: 1.125rem;
}

.for-you .for-you__content > h2:first-child {
    margin-top: 0;
}

.for-you .for-you__content a {
    color: var(--fy-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.for-you .for-you__content a:hover {
    text-decoration-thickness: 2px;
}

.for-you a:focus-visible,
.for-you summary:focus-visible {
    outline: 2px solid var(--fy-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.for-you .for-you__content strong,
.for-you .for-you__content b {
    font-weight: 400;             /* DM Sans liegt nur in 400 vor; keine Kunst-Fettung */
    color: var(--fy-text);
    box-shadow: inset 0 -0.35em 0 #EDE3D1;
}

.for-you .for-you__content em,
.for-you .for-you__content i {
    font-style: italic;
}

.for-you .for-you__content ul,
.for-you .for-you__content ol {
    padding-left: 1.4em;
}

.for-you .for-you__content li {
    margin-bottom: 0.6em;
    padding-left: 0.2em;
}

.for-you .for-you__content li::marker {
    color: var(--fy-accent);
}

.for-you .for-you__content blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 0 0 0 1.1em;
    border-left: 2px solid var(--fy-sand);
    color: var(--fy-text);
    font-size: 1em;
    font-style: normal;
    text-align: left;
}

.for-you .for-you__content img {
    max-width: 100%;
    height: auto;
}

/* 5. „Your no is a complete answer“: im Editor eine Trennlinie (Divider) davor setzen.
      Linie, mehr Raum, und der Abschnitt bis zur nächsten Überschrift etwas größer. */
.for-you .for-you__content hr {
    height: 1px;
    margin: 4.5rem 0 0;
    border: 0;
    background: var(--fy-sand);
}

.for-you .for-you__content hr + h2 {
    margin-top: 2.5rem;
    font-size: 1.5rem;            /* 24 px */
}

.for-you .for-you__content hr + h2 ~ p:not(hr + h2 ~ h2 ~ p) {
    font-size: 1.25rem;           /* 20 px */
    line-height: 1.55;
}

/* Wer das geschrieben hat: im Editor als Zitat (Quote) direkt nach dem Opening, vor der ersten
   Überschrift. Normale Textgröße neben dem großen Opening, Sand-Linie davor, voller Kontrast —
   die Offenlegung soll gelesen werden, nicht wie Kleingedrucktes wirken. */
.for-you .for-you__content > blockquote:not(.kg-blockquote-alt, h2 ~ blockquote, hr ~ blockquote) {
    margin: 2rem 0 0;
    padding: 0.15em 0 0.15em 1.1em;
    border-left: 2px solid var(--fy-sand);
    color: var(--fy-text);
    font-family: var(--fy-sans);
    font-size: 1.125rem;          /* 18 px, auch auf großen Bildschirmen */
    font-style: normal;
    line-height: 1.6;
    text-align: left;
}

.for-you .for-you__content > blockquote:not(.kg-blockquote-alt, h2 ~ blockquote, hr ~ blockquote) p {
    margin: 0 0 0.6em;
    font-size: inherit;
}

.for-you .for-you__content > blockquote:not(.kg-blockquote-alt, h2 ~ blockquote, hr ~ blockquote) p:last-child {
    margin-bottom: 0;
}

/* ---------- Lesezeit (über dem Brief) ---------- */

.for-you .for-you__time {
    margin: 0 0 1.75rem;
    color: var(--fy-muted);
    font-family: var(--fy-sans);
    font-size: 1rem;
    line-height: 1.5;
}

/* ---------- Bilder (Ghost-Image-Cards) ----------
   Handy: Textbreite plus ein kleiner Überstand. Desktop: „Wide“ bis 820 px, breiter als die Spalte.
   width/height setzt Ghost am <img>; height:auto + Seitenverhältnis → nichts springt beim Laden.
   Sehr hohe Bilder (Hochformat) werden auf Bildschirmhöhe begrenzt und oben/unten beschnitten. */

.for-you .for-you__content figure {
    margin: 2.75rem 0;
    padding: 0;
}

.for-you .for-you__content > figure:first-child {
    margin-top: 0;
}

.for-you .for-you__content .kg-image-card {
    margin-left: -12px;
    margin-right: -12px;
}

.for-you .for-you__content .kg-image-card img,
.for-you .for-you__content figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(85vh, 780px);
    object-fit: cover;
    object-position: 50% 35%;
    border-radius: 6px;
    background: var(--fy-inset);
}

.for-you .for-you__content figcaption {
    margin-top: 0.6rem;
    padding: 0 12px;
    color: var(--fy-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* ---------- Stern zwischen den Hauptabschnitten ----------
   Automatisch über jeder Zwischenüberschrift, außer über „Your no is a complete answer“
   (dort bleibt die Sand-Linie) und außer direkt nach einem Bild. */

.for-you .for-you__content > h2:not(hr + h2, figure + h2)::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto 2.75rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%238C7447' d='M50 2 L62.73 37.27 L98 50 L62.73 62.73 L50 98 L37.27 62.73 L2 50 L37.27 37.27 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.for-you .for-you__content > h2:not(hr + h2, :first-child) {
    margin-top: 3.5rem;
}

/* ---------- Schlusssatz: der letzte Absatz des Briefs ----------
   Abgesetzt mit Stern, mittig — sonst wirkt er direkt nach einem Bild wie eine Bildunterschrift.
   Endet der Inhalt mit einer Liste o. Ä. (wie die Erstfassung), greift die Regel nicht. */

.for-you .for-you__content > p:last-child:not(:first-child) {
    margin-top: 3.5rem;
    color: var(--fy-text);
    font-size: 1.25rem;           /* 20 px */
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
}

.for-you .for-you__content > p:last-child:not(:first-child)::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    margin: 0 auto 2.25rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%238C7447' d='M50 2 L62.73 37.27 L98 50 L62.73 62.73 L50 98 L37.27 62.73 L2 50 L37.27 37.27 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Persönlicher Einschub (Ghost-Callout-Card) ----------
   Wie ein handschriftlicher Zusatz im Brief: warmer Grund, dünne Linie, Serife kursiv, kein Icon. */

.for-you .for-you__content .kg-callout-card {
    display: block;
    margin: 2.75rem 0;
    padding: 1.4rem 1.4rem 1.5rem 1.35rem;
    background: var(--fy-inset);
    border: 0;
    border-left: 2px solid var(--fy-line);
    border-radius: 0 6px 6px 0;
}

.for-you .for-you__content .kg-callout-emoji {
    display: none;
}

.for-you .for-you__content .kg-callout-text,
.for-you .for-you__content .kg-callout-text p {
    margin: 0;
    color: var(--fy-text);
    font-family: var(--fy-serif);
    font-size: 1.1875rem;         /* 19 px */
    font-style: italic;
    font-weight: 400;
    line-height: 1.65;
}

.for-you .for-you__content .kg-callout-text p + p {
    margin-top: 0.8em;
}

.for-you .for-you__content .kg-callout-text a {
    color: var(--fy-accent);
}

/* ---------- Hervorgehobener Satz (Ghosts zweiter Zitatstil) ---------- */

.for-you .for-you__content blockquote.kg-blockquote-alt {
    margin: 2.75rem auto;
    max-width: 32rem;
    padding: 0 0.5rem;
    border: 0;
    color: var(--fy-text);
    font-family: var(--fy-sans);
    font-size: 1.5rem;            /* 24 px */
    font-style: normal;
    line-height: 1.45;
    text-align: center;
    text-wrap: balance;
}

.for-you .for-you__content blockquote.kg-blockquote-alt::before,
.for-you .for-you__content blockquote.kg-blockquote-alt::after {
    content: none;
}

.for-you .for-you__content blockquote.kg-blockquote-alt p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
}

/* ---------- Antwortsätze zum Kopieren (HTML-Karte <div class="replies">) ----------
   Ruhige Kärtchen, heller als das Papier; der Knopf kommt per Skript aus der Vorlage.
   Ohne JavaScript: dieselben Kärtchen, nur ohne Knopf. */

.for-you .for-you__content .replies {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1.1em;
}

.for-you .for-you__content .replies > p,
.for-you .for-you__content .replies .reply {
    margin: 0;
    padding: 0.85rem 1rem;
    background: #FBF8F2;
    border: 1px solid var(--fy-rule);
    border-radius: 8px;
}

.for-you .for-you__content .replies .reply {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.for-you .for-you__content .replies .reply p {
    flex: 1 1 9rem;
    margin: 0;
    color: var(--fy-text);
    font-size: 1.125rem;
    line-height: 1.5;
}

.for-you .reply__copy {
    flex: 0 0 auto;
    min-width: 4.75rem;
    min-height: 44px;
    margin-left: auto;
    padding: 0 0.9rem;
    background: transparent;
    border: 1px solid var(--fy-accent);
    border-radius: 999px;
    color: var(--fy-accent);
    font-family: var(--fy-sans);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.for-you .reply__copy:hover {
    background: #F1E8D8;
}

.for-you .reply__copy:focus-visible {
    outline: 2px solid var(--fy-accent);
    outline-offset: 3px;
}

.for-you .reply__copy.is-done {
    background: var(--fy-accent);
    color: #FBF8F2;
}

/* ---------- 4. Fragen: <details>/<summary>, ohne JavaScript ---------- */

.for-you .for-you__content details {
    margin: 0;
    border-top: 1px solid var(--fy-rule);
}

.for-you .for-you__content details:last-of-type {
    border-bottom: 1px solid var(--fy-rule);
    margin-bottom: 1.1em;
}

.for-you .for-you__content summary {
    position: relative;
    display: block;
    min-height: 48px;
    padding: 0.8rem 2.5rem 0.8rem 0;
    color: var(--fy-text);
    font-family: var(--fy-sans);
    font-size: 1.125rem;
    line-height: 1.45;
    cursor: pointer;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
}

.for-you .for-you__content summary::-webkit-details-marker {
    display: none;
}

.for-you .for-you__content summary::after {
    content: "+";
    position: absolute;
    top: 0.72rem;
    right: 0.25rem;
    color: var(--fy-accent);
    font-family: var(--fy-mono);
    font-size: 1.375rem;
    line-height: 1;
}

.for-you .for-you__content details[open] > summary::after {
    content: "\2212";
}

.for-you .for-you__content details > :not(summary) {
    margin: 0 0 1.1rem;
    color: var(--fy-text);
}

.for-you .for-you__content details > :not(summary):last-child {
    margin-bottom: 1.4rem;
}

/* Folgt direkt die Sand-Linie von Abschnitt 5, keine zweite Linie darüber */
.for-you .for-you__content > div:has(+ hr) > details:last-of-type {
    border-bottom: 0;
}

/* Wrapper aus einer HTML-Karte (z. B. <div class="faq">) neutral lassen */
.for-you .for-you__content > div {
    margin-bottom: 1.1em;
}

/* ---------- Schluss: Stern + Domain ---------- */

.for-you .for-you__sign {
    margin-top: 5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--fy-rule);
    text-align: center;
}

.for-you .for-you__star {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0 auto 0.9rem;
    fill: var(--fy-sand);
}

.for-you .for-you__sign p {
    margin: 0;
    color: var(--fy-muted);
    font-family: var(--fy-mono);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 700px) {
    .for-you {
        font-size: 1.1875rem;     /* 19 px */
    }

    .for-you .for-you__letter {
        padding-top: 112px;
        padding-bottom: 80px;
    }

    .for-you .for-you__content > p:not(h2 ~ p, hr ~ p) {
        font-size: 1.625rem;      /* 26 px */
    }

    .for-you .for-you__content h2 {
        font-size: 1.375rem;
    }

    .for-you .for-you__content hr + h2 {
        font-size: 1.75rem;
    }

    .for-you .for-you__content hr + h2 ~ p:not(hr + h2 ~ h2 ~ p) {
        font-size: 1.375rem;
    }

    .for-you .for-you__letter {
        padding-top: 72px;
    }

    .for-you .for-you__content figure {
        margin-top: 3.5rem;
        margin-bottom: 3.5rem;
    }

    .for-you .for-you__content .kg-image-card {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    /* „Wide“ und „Full“ im Editor: bis 820 px, mittig über die Textspalte hinaus */
    .for-you .for-you__content .kg-width-wide,
    .for-you .for-you__content .kg-width-full {
        width: min(820px, 100vw - 44px);
        margin-left: 50%;
        margin-right: 0;
        transform: translateX(-50%);
    }

    .for-you .for-you__content blockquote.kg-blockquote-alt {
        font-size: 1.75rem;
    }

    .for-you .for-you__content > p:last-child:not(:first-child) {
        font-size: 1.375rem;
    }
}

/* ---------- Druck ---------- */

@media print {
    html.for-you-root,
    .for-you {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }

    .for-you .for-you__letter {
        max-width: none;
        padding: 0;
    }

    .for-you .for-you__content p,
    .for-you .for-you__content li,
    .for-you .for-you__content h2,
    .for-you .for-you__content summary,
    .for-you .for-you__sign p {
        color: #000 !important;
    }

    .for-you .for-you__content a {
        color: #000;
    }

    .for-you .for-you__content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        word-break: break-all;
    }

    .for-you .for-you__content strong,
    .for-you .for-you__content b {
        box-shadow: none;
    }

    .for-you .reply__copy {
        display: none;
    }

    .for-you .for-you__content .replies .reply,
    .for-you .for-you__content .replies > p {
        background: none;
        border-color: #999;
    }

    .for-you .for-you__content summary::after,
    .for-you .for-you__content details[open] > summary::after {
        content: none;
    }

    .for-you .for-you__content summary {
        font-weight: 400;
        font-style: italic;
    }

    .for-you .for-you__content details,
    .for-you .for-you__content h2,
    .for-you .for-you__content p {
        break-inside: avoid;
    }

    .for-you .for-you__content h2 {
        break-after: avoid;
    }

    /* Chrome ab 131: Antworten auch ohne das Skript im Druck zeigen */
    .for-you .for-you__content details::details-content {
        content-visibility: visible;
        display: block;
    }

    .for-you .for-you__sign {
        margin-top: 2rem;
        border-top-color: #999;
    }

    .for-you .for-you__time,
    .for-you .for-you__content .kg-callout-text,
    .for-you .for-you__content .kg-callout-text p,
    .for-you .for-you__content blockquote {
        color: #000 !important;
    }

    .for-you .for-you__content .kg-callout-card {
        background: none;
        border-left-color: #999;
    }

    .for-you .for-you__content figure {
        break-inside: avoid;
        margin: 1.5rem 0;
        transform: none;
        width: auto;
    }

    .for-you .for-you__content figure img {
        max-height: 9cm;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
    }
}
