/*
Theme Name: Starfold Magazine
Version: 1.0.0
Description: An editorial WordPress theme with automatic front-page stories, category sections and uncropped featured images.
Requires at least: 6.1
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: starfold
*/
:root {
    --ink: #241e29;
    --plum: #43233f;
    --accent: #a72e45;
    --line: #dfd8dc;
    --paper: #fffdfa;
    --quiet: #645c65;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 system-ui, sans-serif; }
.wrap { width: min(1220px, calc(100% - 64px)); margin-inline: auto; }
a { color: inherit; text-underline-offset: .16em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #dc783f; outline-offset: 3px; }
.skip { position: absolute; top: -100px; background: white; color: #18151b; padding: 8px 20px; }
.skip:focus { top: 4px; z-index: 2; }
.mast { border-top: 5px solid var(--accent); background: #fff; }
.mast-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 21px; }
.identity { min-width: 0; font: bold clamp(1.7rem, 3.5vw, 3rem)/1.04 Georgia, serif; letter-spacing: -.04em; overflow-wrap: anywhere; }
.identity a, .nav a, .story h2 a { text-decoration: none; }
.custom-logo { display: block; max-width: min(350px, 100%); max-height: 82px; width: auto; height: auto; }
.search { display: flex; align-items: stretch; max-width: 100%; }
.search input { min-width: 0; width: 170px; padding: 9px 12px; border: 1px solid #ada4ab; border-radius: 4px 0 0 4px; background: #fff; font: inherit; color: var(--ink); }
.search button { padding: 9px 15px; border: 0; border-radius: 0 4px 4px 0; background: var(--plum); color: #fff; font: 650 .9rem/1 system-ui,sans-serif; cursor: pointer; }
.nav, .foot { background: var(--plum); color: white; }
.nav ul, .foot ul { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 0 22px; }
.nav a { display: block; padding-block: 10px; font-size: .92rem; font-weight: 650; }
.nav a:hover, .foot a:hover { color: #ffd3c8; }
.main { padding-block: 32px 60px; min-height: 55vh; }
h1, h2, h3 { text-wrap: pretty; overflow-wrap: anywhere; }
.main h1, .section-head h2 { margin: 0 0 17px; font: bold clamp(1.75rem, 3.6vw, 3rem)/1.09 Georgia, serif; letter-spacing: -.035em; }
.features { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 28px; }
.features.solo { grid-template-columns: 1fr; }
.side { display: grid; gap: 20px; border-left: 1px solid var(--line); padding-left: 26px; }
.story { min-width: 0; }
.art { display: block; background: #f0ecee; border-radius: 4px; overflow: hidden; }
.art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.copy { padding: 11px 0 3px; }
.topic, .topic a { color: var(--accent); font: 750 .84rem/1.45 system-ui, sans-serif; text-decoration: none; }
.story h2 { font: bold clamp(1.22rem, 2.15vw, 1.85rem)/1.18 Georgia, serif; letter-spacing: -.025em; margin: 5px 0 7px; }
.story h2 a:hover, .topic:hover { text-decoration: underline; }
.lead { border-bottom: 3px solid var(--accent); padding-bottom: 15px; }
.lead h2 { font-size: clamp(1.65rem, 3.3vw, 2.85rem); }
.side .story h2 { font-size: clamp(1.15rem, 1.9vw, 1.55rem); }
.side .art { max-width: 310px; }
.summary { margin: 7px 0; color: #48404a; }
time, .byline { color: var(--quiet); font-size: .87rem; }
.section { margin-top: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 2px solid var(--plum); padding-top: 13px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.15rem); }
.section-head a { flex: none; color: var(--accent); font-weight: 650; font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 24px; }
.pages, .navigation { margin-top: 28px; }
.page-numbers { display: inline-block; padding: 4px 10px; }
.page-numbers.current { background: var(--plum); color: white; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; align-items: center; padding-block: 24px; }
.foot p { margin: 0; }
.foot a { font-size: .9rem; }
.reading { max-width: 880px; margin-inline: auto; }
.reading h1 { margin-top: 8px; font-size: clamp(2rem, 5vw, 3.6rem); }
.full-photo, .text img, .text video { max-width: 100%; height: auto; }
.full-photo { display: block; margin: 22px auto; }
.text { color: #29242b; max-width: 740px; margin-inline: auto; font-size: 1.08rem; overflow-wrap: anywhere; }
.text figure, .text .wp-caption, .text iframe { max-width: 100%; }
.text figure { margin-inline: 0; }
.text a, .tags a { color: var(--accent); }
.text pre, .text .wp-block-table { overflow: auto; }
.text table { border-collapse: collapse; width: 100%; }
.text :is(td, th) { padding: 7px; border: 1px solid var(--line); }
.text h2, .text h3 { font-family: Georgia, serif; line-height: 1.2; }
.aligncenter { display: block; margin-inline: auto; }
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.text::after { content: ''; clear: both; display: table; }
.comments { margin-top: 32px; }
.comments :is(textarea,input) { max-width: 100%; }
.comments textarea { width: 100%; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
@media (max-width: 820px) {
    .features { grid-template-columns: minmax(0, 1fr); }
    .side { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; border: 0; }
    .side .art { max-width: none; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .wrap { width: calc(100% - 32px); }
    .mast-row { align-items: start; flex-direction: column; gap: 12px; padding-block: 16px; }
    .search { width: 100%; }
    .search input { width: 100%; }
    .nav ul { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding-inline: 3px; }
    .main { padding-top: 22px; }
    .side, .grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .alignleft, .alignright { float: none; margin-inline: 0; }
}
