/*
Theme Name: Quelli di Pompei
Theme URI: https://quellidipompei.it/
Author: Quelli di Pompei
Description: Rivista italiana di storia e archeologia. Tema editoriale con fondo bianco, copertina illustrata e quattro sezioni dedicate a Pompei.
Version: 1.0.0
Requires at least: 6.4
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: quellidipompei
*/
:root {
    --paper: #fff;
    --ink: #241f1d;
    --red: #a33427;
    --muted: #615b55;
    --hair: #d9d3ce;
    --ochre: #b58045;
    --display: Baskervville, Georgia, "Times New Roman", serif;
    --sans: "DM Sans", Arial, sans-serif;
    --page: 1192px;
    --gutter: clamp(20px, 4.7vw, 76px);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; }
body { margin: 0; color: var(--ink); background: #fff; font: 400 1rem/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .19em; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
figure, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; overflow-wrap: break-word; }
::selection { color: white; background: var(--red); }
.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--page)); margin-inline: auto; }
.reading-wrap { width: min(calc(100% - 2 * var(--gutter)), 720px); margin-inline: auto; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; height: 1px; width: 1px; white-space: nowrap; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: absolute; top: 8px; left: 12px; z-index: 10000; padding: 9px 16px; background: white; color: var(--red); }
.qdp-header { border-top: 4px solid var(--red); position: relative; z-index: 3; }
.mast { min-height: 96px; display: flex; align-items: center; gap: 34px; }
.identity { min-width: 0; }
.identity a { display: block; }
.brand img { width: clamp(270px, 30vw, 410px); height: auto; }
.custom-logo { width: auto; max-width: min(415px, 45vw); max-height: 66px; }
.descriptor { color: var(--muted); font: italic 400 17px/1.35 var(--display); margin-left: auto; }
.mast-actions { display: flex; align-items: center; gap: 12px; }
.mast-search { position: relative; }
.mast-search summary, .menu-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; color: var(--ink); font: 600 14px/1 var(--sans); background: white; }
.mast-search summary { list-style: none; }
.mast-search summary::-webkit-details-marker { display: none; }
.mast-search svg, .menu-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.7; width: 20px; height: 20px; }
.mast-search summary:hover, .mast-search[open] summary { color: var(--red); }
.search-panel { position: absolute; z-index: 6; right: 0; top: calc(100% + 4px); width: min(370px, calc(100vw - 42px)); background: white; border: 1px solid var(--hair); padding: 16px; box-shadow: 0 10px 26px #241f1d12; }
.search-form { display: flex; align-items: stretch; max-width: 440px; }
.search-form label { flex: 1; min-width: 0; }
.search-form input, .comments-area input:not([type=submit]):not([type=checkbox]), .comments-area textarea, .post-password-form input[type=password] { border: 1px solid #8e8882; border-radius: 0; padding: 10px 12px; background: #fff; color: var(--ink); }
.search-form input { width: 100%; min-height: 44px; }
.search-form button, .comments-area .submit, .post-password-form input[type=submit] { min-height: 44px; padding: 9px 18px; border: 1px solid var(--red); background: var(--red); color: white; font: 600 15px var(--sans); border-radius: 0; cursor: pointer; }
.menu-toggle { display: none; padding: 0; border: 0; width: 40px; }
.qdp-nav { border-block: 1px solid var(--hair); }
.qdp-nav .menu { display: flex; flex-wrap: wrap; gap: 0 clamp(22px, 3.4vw, 48px); list-style: none; margin: 0; padding: 0; }
.qdp-nav li { position: relative; }
.qdp-nav a { display: block; padding: 14px 0 13px; text-decoration: none; font: 600 14px/1.35 var(--sans); }
.qdp-nav .current-menu-item > a, .qdp-nav a[aria-current="page"] { color: var(--red); box-shadow: inset 0 -2px var(--red); }
.qdp-nav .sub-menu { position: absolute; display: none; z-index: 4; list-style: none; margin: 0; padding: 6px 14px; min-width: 175px; background: #fff; border: 1px solid var(--hair); }
.qdp-nav .sub-menu a { padding: 9px 0; }
.qdp-nav .sub-menu .sub-menu { top: 0; left: 100%; }
.qdp-nav li:hover > .sub-menu, .qdp-nav li:focus-within > .sub-menu { display: block; }
.eyebrow { color: var(--red); font: 700 11px/1.4 var(--sans); letter-spacing: .145em; text-transform: uppercase; text-decoration: none; }
.kicker { display: flex; gap: 12px; align-items: center; }
.kicker::before { content: ""; display: inline-block; flex: 0 0 27px; height: 2px; background: var(--red); }
.cover { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.35fr); gap: clamp(36px, 5.4vw, 82px); align-items: center; padding-block: clamp(34px, 3.7vw, 54px) 0; }
.cover-copy { padding-bottom: 11px; }
.cover h1 { margin: 21px 0 19px; letter-spacing: -.056em; }
.intro-title { font-size: clamp(64px, 6.5vw, 98px); line-height: .97; }
.intro-title em { display: block; font-weight: 400; }
.feature-title { font-size: clamp(39px, 4.1vw, 65px); line-height: 1.04; }
.feature-title a { text-decoration: none; }
.cover-deck { max-width: 36ch; margin: 0; color: #48413c; font: 400 clamp(17px, 1.35vw, 20px)/1.48 var(--sans); }
.text-link { margin-top: 24px; display: inline-flex; align-items: center; gap: 14px; min-height: 38px; color: var(--red); text-decoration: none; font: 700 15px/1.35 var(--sans); }
.text-link:hover { text-decoration: underline; }
.qdp-arrow { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; flex-shrink: 0; }
.cover-picture { width: 100%; aspect-ratio: 1.68; object-fit: cover; object-position: center 47%; }
.cover-picture.cover-signature { object-position: center 48%; }
.cover-art figcaption, .entry-cover figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin-top: 7px; }
.cover-art figcaption span:first-child { font: italic 400 14px/1.35 var(--display); }
.cover-art figcaption span:last-child { font: 500 10px/1.7 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.cover-monogram { width: 100%; aspect-ratio: 1.68; display: grid; place-items: center; border-block: 3px double var(--hair); }
.section-space { margin-top: clamp(38px, 4.4vw, 64px); }
.section-heading { display: flex; align-items: baseline; gap: clamp(16px, 2vw, 28px); margin-bottom: 24px; }
.section-heading h1, .section-heading h2 { font-size: clamp(32px, 3vw, 46px); letter-spacing: -.048em; line-height: 1.08; }
.heading-rule { flex: 1; height: 1px; background: var(--hair); align-self: center; transform: translateY(2px); }
.section-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(16px, 2vw, 30px); }
.section-card a { text-decoration: none; }
.section-image { width: 100%; aspect-ratio: 1.85; object-fit: cover; }
.section-name { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; padding-top: 12px; }
.section-name h3 { font-size: clamp(20px, 1.95vw, 29px); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.section-name .qdp-arrow { width: 16px; height: 16px; color: var(--red); }
.section-card p, .card-copy p { margin: 6px 0 0; font: 400 15px/1.47 var(--sans); color: var(--muted); }
.qdp-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 33px clamp(20px, 2.3vw, 34px); }
.story-card { min-width: 0; }
.card-image { display: block; margin-bottom: 13px; }
.card-image img { width: 100%; aspect-ratio: 1.86; object-fit: cover; }
.type-only { border-top: 2px solid var(--ink); padding-top: 17px; }
.card-copy :is(h2, h3) { font-size: clamp(24px, 2.2vw, 33px); line-height: 1.13; letter-spacing: -.04em; margin: 6px 0 8px; }
.card-copy :is(h2, h3) a { text-decoration: none; }
.card-copy :is(h2, h3) a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.home-main { margin-bottom: clamp(48px, 6vw, 88px); }
.qdp-footer { border-top: 1px solid var(--ink); padding: 27px 0 28px; background: #fff; }
.foot-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.foot-brand span { font: 500 25px/1.25 var(--display); letter-spacing: -.045em; }
.qdp-footer .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.qdp-footer a:not(.foot-brand), .colophon { font: 400 13px/1.5 var(--sans); }
.colophon { color: var(--muted); margin-top: 19px; }
.listing-head { max-width: 890px; padding-block: 0 26px; }
.listing-head .kicker { margin: 0 0 14px; }
.listing-head h1, .entry-head h1 { font-size: clamp(40px, 5vw, 73px); line-height: 1.055; letter-spacing: -.05em; margin: 0; }
.archive-main { min-height: 50vh; padding-block: clamp(38px, 5vw, 72px) clamp(50px, 6vw, 88px); }
.archive-intro { max-width: 640px; margin-top: 15px; color: var(--muted); font: 400 19px/1.5 var(--sans); }
.archive-intro p { margin: 0; }
.archive-main .qdp-grid { margin-top: 6px; }
.page-nav, .pagination .nav-links, .comment-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.page-nav a, .page-numbers { display: inline-block; padding: 9px 13px; border: 1px solid var(--hair); text-decoration: none; font-size: 14px; }
.page-numbers.current, .page-nav a:hover, a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.reading-main { margin: clamp(34px, 4.5vw, 68px) auto clamp(52px, 6vw, 88px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 23px; font: 600 13px/1.4 var(--sans); color: var(--red); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--muted); }
.entry-head { margin-bottom: 28px; }
.entry-deck { margin-top: 20px; font: 400 clamp(18px, 1.7vw, 22px)/1.5 var(--sans); color: var(--muted); }
.entry-deck p { margin: 0; }
.entry-cover { max-width: 990px; margin: 0 auto 34px; }
.entry-cover img { width: 100%; max-height: 72vh; object-fit: contain; }
.entry-cover figcaption { display: block; font: 400 13px/1.5 var(--sans); }
.entry-content { display: flow-root; font: 400 clamp(19px, 1.48vw, 21px)/1.7 var(--display); overflow-wrap: break-word; }
.entry-content > * { width: min(calc(100% - 2 * var(--gutter)), 720px); margin: 0 auto 1.05em; }
.entry-content > .alignwide { width: min(calc(100% - 2 * var(--gutter)), 990px); }
.entry-content > .alignfull { width: 100%; max-width: 100%; }
.entry-content img { height: auto; }
.entry-content .aligncenter, .aligncenter img { margin-inline: auto; }
.entry-content .alignleft { float: left; margin-right: 1em; }
.entry-content .alignright { float: right; margin-left: 1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.08em; margin-bottom: .42em; line-height: 1.2; letter-spacing: -.03em; }
.entry-content h2, .comments-area h2 { font-size: clamp(29px, 2.8vw, 40px); }
.entry-content h3 { font-size: clamp(24px, 2.2vw, 30px); }
.entry-content a, .tags a, .comments-area a { color: var(--red); }
.entry-content figcaption, .entry-content .wp-caption-text { margin-top: 5px; font: 400 13px/1.5 var(--sans); color: var(--muted); }
.entry-content blockquote { border-left: 3px solid var(--red); padding: 2px 0 2px 20px; font-style: italic; }
.entry-content blockquote p { margin: 0; }
.entry-content table { border-collapse: collapse; font-size: .9em; }
.entry-content td, .entry-content th { padding: 7px 10px; border: 1px solid var(--hair); }
.entry-content .wp-block-table, .entry-content pre { overflow-x: auto; }
.entry-content iframe, .entry-content video, .entry-content .wp-caption { max-width: 100%; }
.static-intro { margin-top: 36px; }
.static-intro > * { max-width: 720px; width: 100%; }
.tags { margin-top: 25px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 14px; }
.tags span { font-weight: 700; margin-right: 6px; }
.comments-area { margin-top: 38px; font: 400 16px/1.6 var(--sans); }
.comments-area input:not([type=checkbox]), .comments-area textarea { max-width: 100%; }
.comments-area label { display: inline-block; margin-right: .45em; }
.comments-area textarea { display: block; width: 100%; }
.comment-list { padding-left: 1.3em; }
.comment-list .children { padding-left: 1em; }
.comment-meta .avatar { display: inline; vertical-align: middle; margin-right: 6px; }
@media (max-width: 980px) {
    .mast { min-height: 82px; gap: 20px; }
    .cover { grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); gap: 30px; }
    .intro-title { font-size: clamp(56px, 7.7vw, 76px); }
    .cover-deck { font-size: 17px; }
    .section-grid { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 27px; }
    .section-name h3 { font-size: 26px; }
}
@media (max-width: 760px) {
    :root { --gutter: clamp(18px, 5vw, 32px); }
    .mast { min-height: 69px; gap: 8px; }
    .brand img { width: clamp(174px, 50vw, 298px); }
    .custom-logo { max-width: 53vw; max-height: 49px; }
    .descriptor { display: none; }
    .mast-actions { margin-left: auto; gap: 2px; }
    .mast-search summary { width: 40px; }
    .mast-search summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .mast { position: relative; }
    .mast-search { position: static; }
    .search-panel { top: 100%; right: 0; width: min(370px, 100%); }
    .qdp-header { border-bottom: 1px solid var(--hair); }
    .qdp-nav { border-bottom: 0; }
    .qdp-nav .menu { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 8px; padding-block: 5px; }
    .qdp-nav a { padding: 12px 3px; }
    .qdp-nav .sub-menu, .qdp-nav .sub-menu .sub-menu { display: block; position: static; padding: 0 0 0 12px; border: 0; min-width: 0; }
    .qdp-js .menu-toggle { display: flex; }
    .qdp-js .qdp-nav:not(.is-open) { display: none; }
    .cover { grid-template-columns: 1fr; gap: 21px; padding-top: 28px; }
    .cover-copy { padding-bottom: 0; }
    .cover h1 { margin: 13px 0 12px; }
    .intro-title { font-size: clamp(49px, 8.1vw, 65px); line-height: 1.02; }
    .intro-title em { display: inline; }
    .feature-title { font-size: clamp(38px, 6vw, 54px); }
    .cover-deck { max-width: 50ch; }
    .text-link { margin-top: 9px; }
    .cover-picture, .cover-monogram { aspect-ratio: 1.68; }
    .section-space { margin-top: 34px; }
    .section-heading { margin-bottom: 17px; }
    .section-grid { gap: 22px 18px; }
    .section-name { padding-top: 9px; }
    .section-name h3 { font-size: clamp(21px, 3.8vw, 26px); }
    .section-card p { font-size: 14px; }
    .qdp-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
    .qdp-grid { grid-template-columns: 1fr; gap: 25px; }
    .card-copy :is(h2, h3) { font-size: 27px; }
    .section-name { align-items: flex-start; }
    .section-name .qdp-arrow { width: 13px; height: 13px; margin-top: 7px; }
    .cover-art figcaption span:last-child { font-size: 9px; }
    .foot-main { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 350px) {
    .section-grid { grid-template-columns: 1fr; }
}
@media print {
    .qdp-header, .qdp-footer, .comments-area, .skip-link, .page-nav, .pagination { display: none; }
    .entry-content, .entry-head, .entry-content > * { max-width: none; width: 100%; }
}
