/*
Theme Name: K.u.H. Lesefassung
Version: 0.3.14
Description: Handheld-first reading view. Freigegebene Gestaltungsgrundlage mit redaktioneller Auswahl und nativen Inhaltsblöcken.
*/

/* One base for narrow screens; wide-screen composition extends it below. */
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    background: var(--kb-color-ink);
    color: var(--kb-color-ink);
    font-family: var(--kb-font-text);
    font-size: 1.25rem;
    line-height: 1.55;
    font-synthesis: none;
    overflow-wrap: break-word;
    hyphens: auto;
}
:where(h1, h2, h3, p, figure) { margin: 0; }
h1 {
    font-family: var(--kb-font-title);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    text-wrap: balance;
}
h2 {
    font-family: var(--kb-font-text);
    font-size: clamp(1.625rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
}
h3 { font-size: 1.35rem; font-weight: 400; font-style: italic; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
:where(a, summary):focus-visible {
    outline: 2px solid var(--kb-color-gold-on-paper);
    outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }
strong { font-weight: 700; }

/* Existing widths and gutter remain the common dimensional reference. */
.page-width {
    width: min(100%, var(--kb-content-wide));
    margin-inline: auto;
    padding-inline: var(--kb-gutter);
}
.text-width {
    width: min(100%, calc(var(--kb-content-narrow) + 2 * var(--kb-gutter)));
    margin-inline: auto;
    padding-inline: var(--kb-gutter);
}
.page-section { padding-block: calc(var(--kb-section-space) / 2); }
.preview-note {
    padding: .35rem var(--kb-gutter);
    background: var(--kb-color-paper-muted);
    text-align: center;
    font-size: .9375rem;
    line-height: 1.35;
}
.site-header { color: var(--kb-color-paper); }
.header-inner { padding-block: 1rem .4rem; }
.brand {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    width: fit-content;
    min-height: 44px;
    color: var(--kb-color-gold);
    font-family: var(--kb-font-title);
    font-size: 1.85rem;
    text-decoration: none;
}
.brand span {
    color: var(--kb-color-paper-muted);
    font-family: var(--kb-font-text);
    font-size: 1rem;
}
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.3rem;
    margin-top: .25rem;
    font-size: 1.1rem;
    font-weight: 600;
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}
.site-nav a[aria-current] { text-decoration: underline; color: var(--kb-color-gold); }
.site-header a:focus-visible { outline-color: var(--kb-color-gold); }

/* Invitation, picture, story. No card surfaces or competing call-to-action buttons. */
.reading-surface { min-height: 55vh; background: var(--kb-color-paper); }
.reading-intro { max-width: var(--kb-content-narrow); margin-bottom: var(--kb-gutter); }
.page-title {
    border-inline-start: 1px solid var(--kb-color-gold-on-paper);
    padding-inline-start: 1rem;
}
.kicker {
    margin-bottom: calc(var(--kb-gutter) / 2);
    color: var(--kb-color-gold-on-paper);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}
.intro { margin-top: calc(var(--kb-gutter) / 2); font-size: 1.25rem; line-height: 1.5; }
.reading-sequence { display: grid; gap: var(--kb-section-space); }
.reading-story { min-width: 0; }
.story-image { margin-bottom: var(--kb-gutter); }
.image-space {
    padding: var(--kb-gutter);
    background: var(--kb-color-ink);
}
.image-space img { width: 100%; }
.story-copy h2 a { display: inline-block; min-height: 44px; text-decoration: none; }
.story-copy > p:last-child { margin-top: calc(var(--kb-gutter) / 2); }
.reading-arrow { color: var(--kb-color-gold-on-paper); white-space: nowrap; }
.standalone-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: .35rem;
    color: var(--kb-color-gold-on-paper);
}

/* Long reading remains in one warm, narrow column at every screen size. */
/* Grid keeps the title, figure/caption and text gaps from collapsing together. */
.article-page {
    display: grid;
    gap: var(--kb-gutter);
    padding-block: var(--kb-gutter) calc(var(--kb-section-space) / 2);
}
.back-link { margin-bottom: var(--kb-gutter); font-size: 1.05rem; }
.article-figure { margin-block: 0; }
.kuh-content-image { width: 100%; max-width: 100%; margin-inline: 0; }
.kuh-content-image img { width: 100%; height: auto; }
figcaption { margin-top: calc(var(--kb-gutter) / 2); font-size: .95rem; line-height: 1.4; }
:where(.article-text, .prose, .details-content) > :where(p, h2, h3, ul, ol) { margin-block: 0; }
:where(.article-text, .prose, .details-content) > * + * { margin-block-start: calc(var(--kb-gutter) / 2); }
:where(.article-text, .prose, .details-content) > * + h2 { margin-block-start: calc(var(--kb-section-space) / 2); }
:where(.article-text, .prose, .details-content) :where(ul, ol) { padding-left: 1.35rem; }
:where(.article-text, .prose, .details-content) a { overflow-wrap: anywhere; }
.article-text .reading-details { border-top: 1px solid var(--kb-color-gold-on-paper); margin-top: var(--kb-gutter); }
.reading-details summary {
    min-height: 52px;
    padding-block: .8rem;
    color: var(--kb-color-gold-on-paper);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}
.details-content { padding-block: calc(var(--kb-gutter) / 2); }
.source-content { font-size: 1.125rem; }
.reading-next { display: grid; justify-items: start; gap: calc(var(--kb-gutter) / 2); margin-top: var(--kb-gutter); }
.reading-next .kicker { margin: 0; }
.prose > .page-title { margin-bottom: var(--kb-gutter); }

/* The workshop-origin line keeps its existing, separate role. */
.site-footer { color: var(--kb-color-paper-muted); font-size: 1rem; }
.footer-inner { display: grid; gap: 2rem; padding-block: 2rem; }
.origin { padding-top: .25rem; }
.origin-label { display: block; font-size: .9375rem; line-height: 1.5; }
.origin-name { display: inline-block; margin-top: 1.6rem; color: var(--kb-color-gold); font-family: var(--kb-font-title); font-size: 1.15rem; }
.ifaz-origin { display: flex; align-items: center; gap: .75rem; width: fit-content; min-height: 44px; margin-top: 1.25rem; color: var(--kb-color-paper-muted); font-size: 1rem; line-height: 1.5; }
.ifaz-origin img { width: 40px; height: auto; flex-shrink: 0; }
.ifaz-origin:focus-visible { outline-color: var(--kb-color-gold); }
.origin-anchor { position: relative; }
.origin-anchor::before {
    position: absolute;
    bottom: calc(100% + .35rem);
    left: 50%;
    width: 1px;
    height: 1.25rem;
    background: var(--kb-color-gold);
    content: '';
}
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 10; padding: .5rem 1rem; background: var(--kb-color-paper); }
.skip-link:focus { top: .5rem; }

/* Extra horizontal room opens the composition; the narrow reading order remains intact. */
@media (min-width: 56rem) {
    .header-inner { padding-block: 1.1rem .6rem; }
    .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
}


/* Shared event rhythm: home, overview and detail use the same native records. */
.kuh-upcoming { margin-block: 2rem 3rem; padding-block: 1.5rem; border-block: 1px solid var(--kb-color-paper-muted); }
.kuh-upcoming > h2 { margin-bottom: 1.5rem; }
.kuh-upcoming ol { display: grid; gap: 1.75rem; padding: 0; margin: 0; list-style: none; }
.kuh-upcoming li { min-width: 0; }
.kuh-upcoming h3 { font-size: 1.35rem; font-style: normal; font-weight: 600; margin-block: .3rem; }
.kuh-upcoming a { display: inline-block; padding-block: .2rem; }
.kuh-upcoming .standalone-link { margin-top: 1.25rem; }
.kuh-event-month { margin-top: 2.5rem; }
.kuh-event-month > h2 { padding-bottom: 1rem; border-bottom: 1px solid var(--kb-color-gold-on-paper); }
.kuh-event-list .kuh-event-row { padding-block: 1.75rem; border-bottom: 1px solid var(--kb-color-paper-muted); }
.kuh-event-row h3 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-style: normal; font-weight: 600; line-height: 1.3; margin-block: .35rem .65rem; }
.kuh-event-date { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kuh-event-time { font-variant-numeric: tabular-nums; }
.kuh-event-facts { display: grid; gap: .35rem; margin-block: 0 1.75rem; }
.kuh-event-row .kuh-event-facts { margin-bottom: 0; }
.kuh-event-source { margin-top: .65rem; font-size: .95rem; line-height: 1.5; }
.kuh-event-source a { text-decoration-thickness: 1px; }
.kuh-event-back { margin-block: 1.5rem; }
.kuh-event-hero { margin-block: 1.75rem 2.5rem; }
.kuh-event-hero img { width: 100%; height: auto; }
@media (min-width: 56rem) {
    .kuh-upcoming ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}

/* Shared hero for stories, pages and events. Whole motif takes priority over 3:2.
   Portraits alone use a narrower common limit to avoid an excessively tall lead. */
.kuh-hero { width: 100%; max-width: 880px; margin: 0 auto var(--kb-gutter); }
.kuh-hero .image-space { padding: 0; background: transparent; border: 0; box-shadow: none; }
.kuh-hero .image-space img { width: 100%; height: auto; object-fit: contain; }
.kuh-hero.kuh-photo--portrait { max-width: 440px; }
.kuh-hero figcaption { margin-top: .5rem; font-size: .95rem; line-height: 1.4; }
.article-page > .page-width:empty, .native-article > .page-width:empty { display: none; }
.article-page .kuh-hero { margin-bottom: 0; }
.kuh-thumbnail { margin: 0 0 .75rem; width: min(100%, 240px); }
.kuh-thumbnail .image-space { height: 110px; padding: 8px; }
.kuh-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.kuh-event-row:has(.kuh-thumbnail) { display: flow-root; }
@media (min-width: 40rem) {
    .kuh-event-row .kuh-thumbnail { float: right; margin: 0 0 1rem 1.5rem; width: 160px; }
}
@media (max-width: 55.99rem) {
    .kuh-thumbnail { width: min(100%, 160px); }
    .kuh-thumbnail .image-space { height: 90px; }
}


