/*
Theme Name: markp
Description: Dreispaltiges Magazin in Marineblau, warmem Weiß und Ocker mit einem großen Aufmacher und zwei Widget-Bereichen.
Version: 1.0.9
Requires at least: 5.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: markp
*/

:root {
    --paper: #f6f3ed;
    --white: #fffcf5;
    --ink: #172539;
    --muted: #516075;
    --accent: #214873;
    --wash: #e9edf3;
    --line: #d4d8de;
    --navy: #162b46;
    --gold: #e6b86d;
    --rust: #85440c;
    --sans: system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: calc(1rem + 2px)/1.6 var(--sans); letter-spacing: .015em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--sans); letter-spacing: normal; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
iframe, video, embed, input, select, textarea { max-width: 100%; }
figure { margin-inline: 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.wrap { width: min(100% - 72px, 1440px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100000; width: auto; height: auto; clip-path: none; padding: 10px 16px; background: var(--white); }

.masthead { background: var(--white); border-top: 6px solid var(--navy); border-bottom: 3px solid var(--gold); }
.masthead-inner { display: grid; grid-template-columns: 1fr minmax(0, 2fr) 1fr; align-items: center; gap: 12px; padding-block: 28px 34px; }
.tagline { grid-area: 1 / 1; margin: 0; color: var(--muted); font-size: calc(.85rem + 2px); }
.wordmark, .custom-logo-link { grid-area: 1 / 2; justify-self: center; text-align: center; }
.wordmark { color: var(--navy); font: 730 clamp(2.4rem, 6vw, 4.5rem)/1 var(--sans); letter-spacing: -.065em; text-decoration: none; }
.custom-logo { display: block; width: auto; max-height: 100px; object-fit: contain; }

.magazine {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3.4fr) minmax(0, 1fr);
    grid-template-areas: "left feed right";
    align-items: start;
    gap: clamp(22px, 2.5vw, 42px);
    padding-block: 34px 68px;
}
.rail-left { grid-area: left; }
.rail-right { grid-area: right; }
.feed { grid-area: feed; min-width: 0; }
.rail { min-width: 0; overflow-wrap: anywhere; }
.rail > * + * { margin-top: 32px; }
.rail-right > .widget:first-of-type :is(.wp-block-group, .wp-block-group__inner-container, h2, h3, h4, h5, h6):where(:first-child, .customize-partial-edit-shortcut + *) {
    margin-block-start: 0;
}
.rail-heading, .widget-title, .widget > h2, .widget > .wp-block-group > h2,
.rail-right > .widget:first-of-type :is(h2, h3, h4, h5, h6):where(:first-child, .customize-partial-edit-shortcut + *) {
    color: var(--accent); font: 750 calc(.8rem + 4px)/1.4 var(--sans); letter-spacing: .105em; text-transform: uppercase;
    border-bottom: 1px solid var(--line); padding: 3px 0 11px 10px; margin: 0 0 14px;
    border-inline-start: 4px solid var(--gold);
}
.category-list, .category-list ul { list-style: none; margin: 0; padding: 0; }
.category-list li + li { margin-top: 2px; }
.category-list ul { margin: 7px 0 0 12px; }
.category-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 11px 8px 11px 0; border-bottom: 1px solid var(--line);
    color: var(--ink); text-decoration: none; font-size: calc(.89rem + 2px); font-weight: 550; line-height: 1.35;
}
.category-list a::after { content: ""; flex: none; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; transform: rotate(45deg); margin-inline-end: 3px; color: var(--accent); }
.category-list a:hover, .category-list .current-cat > a, .category-list .current-menu-item > a { background: var(--wash); border-color: var(--accent); color: var(--accent); }
.widget { font-size: calc(.94rem + 2px); }
.widget :where(img, iframe, video) { border-radius: 5px; }
.widget h3 { line-height: 1.25; }
.widget ul { padding-inline-start: 1.15em; }

.rail .widget :is(.wp-block-latest-posts__list, .wp-block-categories-list, .rail-right ul.wp-block-list),
.rail :is(.widget_recent_entries, .widget_categories) > ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rail .widget :is(.wp-block-latest-posts__list, .wp-block-categories-list, .rail-right ul.wp-block-list) > li,
.rail :is(.widget_recent_entries, .widget_categories) > ul > li {
    margin: 0;
    padding-block: 12px;
    line-height: 1.45;
}
.rail .widget :is(.wp-block-latest-posts__list, .wp-block-categories-list, .rail-right ul.wp-block-list) > li + li,
.rail :is(.widget_recent_entries, .widget_categories) > ul > li + li {
    border-top: 1px solid var(--line);
}
.rail .widget :is(.wp-block-latest-posts__list, .wp-block-categories-list, .rail-right ul.wp-block-list) > li > a,
.rail :is(.widget_recent_entries, .widget_categories) > ul > li > a {
    text-decoration: none;
}
.rail .widget :is(.wp-block-latest-posts__list, .wp-block-categories-list, .rail-right ul.wp-block-list) > li > a:is(:hover, :focus-visible),
.rail :is(.widget_recent_entries, .widget_categories) > ul > li > a:is(:hover, :focus-visible) {
    text-decoration: underline;
}
.rail .widget :is(.wp-block-latest-posts__post-date, .post-date) {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: calc(.78rem + 2px);
}
.rail .widget :is(.wp-block-categories-list, .cat-item) > .children { margin-top: 8px; }

.rail-right .widget :is(h2, h3, h4, h5, h6):has(+ ul.wp-block-list) { margin-block-end: -4px; }
.rail-right > .widget:has(> :is(h2, h3, h4, h5, h6)) + .widget:has(> ul.wp-block-list) { margin-block-start: 14px; }
.rail-right .widget ul.wp-block-list > li:first-child { padding-block-start: 0; }

.rail .wp-block-search__inside-wrapper {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
}
.rail .wp-block-search .wp-block-search__input {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    padding: 5px 8px;
    font-size: 1rem;
    line-height: 1.25;
}
.rail .wp-block-search .wp-block-search__button {
    position: relative;
    flex: 0 0 38px;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 0;
    background: var(--navy);
    color: var(--white);
    font-size: 0;
    white-space: nowrap;
}
.rail .wp-block-search__button svg { display: none; }
.rail .wp-block-search__button::before,
.rail .wp-block-search__button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
}
.rail .wp-block-search__button::before {
    width: 9px;
    height: 9px;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-8px, -8px);
}
.rail .wp-block-search__button::after {
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: translate(2px, 1px) rotate(45deg);
    transform-origin: left center;
}
.rail .wp-block-search__button:hover { background: var(--accent); }

.story-photo { display: block; overflow: hidden; }
.story-photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.lead { background: var(--navy); color: var(--white); border-bottom: 3px solid var(--gold); }
.lead .story-body { padding: clamp(20px, 3vw, 38px); }
.lead .story-photo img { aspect-ratio: 16 / 9; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; color: var(--muted); font-size: calc(.78rem + 2px); }
.story-meta a { font-weight: 700; }
.lead .story-meta, .lead .lead-excerpt { color: #e2e8f0; }
.lead .story-meta a, .lead .story-title a:hover { color: var(--gold); }
.lead a:focus-visible { outline-color: var(--gold); }
.lead-label { background: var(--gold); color: var(--navy); padding: 3px 8px; font-weight: 700; }
.story-title { margin: 7px 0 0; font: 700 1.27rem/1.18 var(--sans); letter-spacing: -.018em; hyphens: auto; }
.story-title a { color: inherit; text-decoration: none; }
.story-title a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.lead .story-title, .feed-title { --title-size: clamp(1.95rem, 3.5vw, 3.6rem); font: 500 var(--title-size)/1.12 var(--sans); letter-spacing: -.025em; margin: 10px 0 0; hyphens: auto; }
.lead .story-title { font-size: calc(var(--title-size) - 4px); }
.feed-title { margin-bottom: 24px; }
.category .feed > .feed-title { font-size: calc(var(--title-size) / 2); margin-bottom: 40px; }
.category .archive-description > :first-child { margin-block-start: 0; }
.lead-excerpt { color: var(--muted); margin: 13px 0 0; }
.lead-excerpt:empty { display: none; }
.section-heading { margin: 36px 0 20px; color: var(--accent); font: 700 .8rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .1em; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); gap: 30px 24px; }
.card { display: flex; flex-direction: column; border-bottom: 1px solid var(--accent); }
.card .story-photo img { aspect-ratio: 16 / 9; }
.card .story-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 16px 2px 20px; }
.card .story-meta { line-height: 1.35; }
.card .story-meta a { font-weight: 550; text-decoration-thickness: 1px; }
.card .story-title { font-size: 1.2rem; font-weight: 550; line-height: 1.33; letter-spacing: -.01em; margin: 0 0 14px; hyphens: manual; }
.card .story-meta + .story-title { margin-top: 10px; }
.card .story-date { margin-top: auto; color: var(--muted); font-size: calc(.78rem + 2px); line-height: 1.35; }
.card .story-title a:focus-visible { outline-offset: 2px; }
.archive-description, .search-form { margin-bottom: 20px; }
.navigation { margin-top: 24px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; }
.page-numbers.current { background: var(--accent); color: var(--white); }

.reading-photo { margin-block: 0 24px; padding-block: 10px; }
.reading-photo img { display: block; width: 100%; }
.entry-content { font-size: calc(1.08rem + 2px); overflow-wrap: anywhere; }
.reading:not(.type-post) .entry-content > :where(p, ul, ol, blockquote) { max-width: 66ch; }
.entry-content table { border-collapse: collapse; }
.entry-content :is(td, th) { border: 1px solid var(--line); padding: 6px 9px; }
pre, .wp-block-table { overflow: auto; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }
.comments { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 12px; }
.comment-list { padding-inline-start: 24px; }
.comment-list .children { padding-inline-start: 18px; }
input:not([type="checkbox"], [type="radio"]), textarea, select, button { font: inherit; letter-spacing: inherit; padding: 6px 10px; border: 1px solid var(--muted); border-radius: 4px; }
button, input[type="submit"] { background: var(--accent); color: var(--white); cursor: pointer; }
.site-footer { border-top: 3px solid var(--gold); background: var(--navy); color: var(--white); }
.site-footer a { color: var(--white); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--gold); }
.site-footer a:focus-visible { outline-color: var(--gold); }
.footer-inner { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding-block: 24px; text-align: center; }
.footer-credit { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 1050px) {
    .wrap { width: min(100% - 48px, 940px); }
    .magazine { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "feed feed" "left right"; }
}
@media (max-width: 620px) {
    .wrap { width: calc(100% - 32px); }
    .masthead-inner { grid-template-columns: minmax(0, 1fr); padding-block: 18px; }
    .wordmark, .custom-logo-link { grid-area: 1 / 1; }
    .custom-logo { max-height: 75px; }
    .tagline { grid-area: 2 / 1; text-align: center; }
    .magazine { grid-template-columns: minmax(0, 1fr); grid-template-areas: "feed" "left" "right"; gap: 24px; padding-block: 20px 36px; }
    .rail-right:empty, .rail-left:empty { display: none; }
    .story-grid { gap: 22px; }
}
