/*
Theme Name: Cover Story
Text Domain: coverstory
Version: 261029.1217
Description: Uncensored Candy Shorts: magazine index sidebar, serif headlines, 2:3 covers, row cards.
Author: Uncensored Candy Shorts
*/

:root {
	--paper: #fffaf7;
	--white: #ffffff;
	--blush: #fdeef5;
	--blush-2: #f9dbe8;
	--ink: #241b21;
	--ink-2: #4f434a;
	--muted: #887880;
	--rule: #eedfe6;
	--dark: #241b21;
	--serif: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--side-w: 288px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17.5px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { font: inherit; }
.cv-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; }
.cv-skip:focus { left: 8px; }
.cv-ico { flex: none; }

/* ---------- Logo ---------- */
.cv-logo { display: block; text-decoration: none; font-family: var(--serif); line-height: .95; letter-spacing: -.01em; margin: 0; }
.cv-logo-a { display: block; font-style: italic; font-weight: 500; font-size: 22px; color: var(--accent-2); }
.cv-logo-b { display: block; font-weight: 700; font-size: 31px; color: var(--accent); font-variation-settings: "opsz" 144; }
.cv-logo:hover .cv-logo-b { color: var(--accent-deep); }

/* ---------- Sidebar indice ---------- */
.cv-layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.cv-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--white); border-right: 1px solid var(--rule); scrollbar-width: thin; }
.cv-side-in { padding: 30px 26px 28px; }
.cv-side-close { display: none; }
.cv-issue { margin: 12px 0 22px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cv-index { display: flex; flex-direction: column; border-top: 2px solid var(--dark); }
.cv-index a { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.cv-index a i { font-style: normal; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .05em; }
.cv-index a:hover, .cv-index a[aria-current] { color: var(--accent); }
.cv-index a[aria-current] i { color: var(--accent); }
.cv-side-label { margin: 26px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cv-moods { display: flex; flex-direction: column; }
.cv-moods a { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.cv-moods a::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--blush-2); transform: translateY(-4px); }
.cv-moods a b { order: 2; font-weight: 600; font-size: 13px; color: var(--muted); }
.cv-moods a:hover { color: var(--accent); }
.cv-week { display: flex; gap: 14px; align-items: center; margin-top: 26px; padding: 14px; border-radius: 12px; background: var(--blush); text-decoration: none; color: var(--ink); }
.cv-week img { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 16px -10px rgba(110, 0, 60, .6); }
.cv-week span { display: flex; flex-direction: column; line-height: 1.25; }
.cv-week em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cv-week strong { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--accent-deep); margin: 3px 0; }
.cv-week small { font-size: 12.5px; color: var(--muted); }
.cv-side-note { margin: 22px 0 0; font-size: 12.5px; color: var(--muted); }
.cv-bar, .cv-capsule, .cv-scrim { display: none; }

/* ---------- Pagina ---------- */
.cv-page { min-width: 0; padding: 0 52px; }
.cv-main { max-width: 1080px; margin: 0 auto; padding: 38px 0 20px; }
.cv-crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.cv-crumbs a { color: var(--muted); }

/* Testata a copertina */
.cv-spread { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 36px; align-items: center; padding-bottom: 34px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.cv-kicker { margin: 0 0 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.cv-kicker b { background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 4px; }
.cv-date { color: var(--muted); }
.cv-h1 { margin: 0; font-family: var(--serif); font-weight: 650; font-size: clamp(38px, 4.7vw, 64px); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; font-variation-settings: "opsz" 144; }
.cv-h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.cv-series .cv-h1 { color: var(--accent); }
.cv-deck { margin: 18px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.5; font-weight: 400; color: var(--ink-2); font-variation-settings: "opsz" 24; }
.cv-series .cv-deck { font-style: italic; }
.cv-deck-src { margin: -26px 0 30px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cv-spread-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 24px 0 0; }
.cv-spread-cta span { font-size: 14px; color: var(--muted); font-style: italic; font-family: var(--serif); }

.cv-covers { position: relative; height: 470px; }
.cv-cover { position: absolute; top: 10px; right: 0; width: 280px; aspect-ratio: 2 / 3; border: 7px solid #fff; border-radius: 6px; overflow: hidden; background: var(--blush-2); box-shadow: 0 30px 50px -30px rgba(90, 0, 50, .75); transform-origin: bottom center; color: #fff; text-decoration: none; isolation: isolate; transition: transform .35s ease; }
.cv-cover > img, .cv-cover > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cv-cover > video { opacity: 0; transition: opacity .6s; }
.cv-cover > video.is-on { opacity: 1; }
.cv-cover--front { z-index: 3; }
.cv-cover:nth-child(2) { z-index: 2; transform: translateX(-56px) rotate(-6deg) scale(.92); }
.cv-cover:nth-child(3) { z-index: 1; transform: translateX(-100px) rotate(-11deg) scale(.84); }
.cv-cover:nth-child(n+4) { display: none; }
.cv-covers:hover .cv-cover:nth-child(2) { transform: translateX(-70px) rotate(-8deg) scale(.92); }
.cv-cover-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 16px 15px; background: linear-gradient(180deg, transparent, rgba(30, 6, 20, .85)); display: flex; flex-direction: column; gap: 2px; }
.cv-cover:not(.cv-cover--front) .cv-cover-cap { display: none; }
.cv-cover-cap em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffd0e7; }
.cv-cover-cap strong { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; color: #ffb3d8; }
.cv-ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; font-family: var(--serif); font-weight: 600; color: var(--accent-deep); background: linear-gradient(160deg, var(--blush), var(--blush-2)); }

/* ---------- Contenuto ---------- */
.cv-content { max-width: 800px; }
.cv-content::after { content: ""; display: table; clear: both; }
.cv-content > p, .cv-content li { color: var(--ink-2); }
.cv-content h2 { margin: 48px 0 12px; font-family: var(--serif); font-weight: 650; font-size: clamp(27px, 2.7vw, 35px); line-height: 1.1; letter-spacing: -.012em; color: var(--ink); font-variation-settings: "opsz" 72; }
.cv-content h3 { margin: 28px 0 6px; font-family: var(--serif); font-weight: 600; font-size: 23px; color: var(--ink); }
.cv-content h3 a, .cs-name { color: var(--accent); text-decoration: none; font-family: var(--serif); font-weight: 600; }
.cv-content h3 a:hover, .cs-name:hover { text-decoration: underline; }
.cv-content strong { color: var(--ink); }
.cv-lead { font-size: 20px; line-height: 1.6; color: var(--ink) !important; }
.cv-lead::first-letter { float: left; font-family: var(--serif); font-weight: 700; font-size: 74px; line-height: .82; padding: 6px 7px 0 0; color: var(--accent); }
.cv-sub { margin-top: -4px; font-size: 15.5px; color: var(--muted) !important; font-style: italic; font-family: var(--serif); }
.cv-content ul { padding-left: 1.1em; }
.cv-content ul li::marker { color: var(--accent); }
.cv-content blockquote, .cv-pull { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.45; color: var(--accent-deep); }

.cv-btn, .cs-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 16px/1.2 var(--sans); text-decoration: none; border: 0; cursor: pointer; box-shadow: 0 14px 24px -16px var(--accent-deep); }
.cv-btn:hover, .cs-btn:hover { color: #fff; background: var(--accent-deep); }
.cv-btn--line { background: transparent; color: var(--accent-deep); box-shadow: inset 0 0 0 1.5px var(--blush-2); }
.cv-btn--line:hover { background: var(--blush); color: var(--accent-deep); }
.cv-btn--block { display: flex; justify-content: center; }
.cs-textlink { font-weight: 600; }

.cv-steps { list-style: none; padding: 0; counter-reset: s; }
.cv-steps li { position: relative; padding-left: 52px; margin: 16px 0; counter-increment: s; }
.cv-steps li::before { content: counter(s); position: absolute; left: 0; top: -10px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1; color: var(--accent); }

.cv-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15.5px; border-top: 2px solid var(--dark); border-bottom: 2px solid var(--dark); }
.cv-content th, .cv-content td { text-align: left; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cv-content th { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cv-free { color: #0b7a43; font-weight: 700; }

.cv-content details { border-top: 1px solid var(--rule); }
.cv-content details:last-of-type { border-bottom: 1px solid var(--rule); }
.cv-content summary { cursor: pointer; list-style: none; padding: 16px 34px 16px 0; position: relative; font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); }
.cv-content summary::-webkit-details-marker { display: none; }
.cv-content summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--sans); font-size: 24px; font-weight: 400; color: var(--accent); }
.cv-content details[open] summary::after { content: "−"; }
.cv-content details p { margin: 0 0 18px; }

.cv-glance { float: right; width: 300px; margin: 6px 0 24px 34px; padding: 20px; background: var(--white); border: 1px solid var(--rule); border-top: 4px solid var(--accent); border-radius: 0 0 12px 12px; }
.cv-glance h2 { margin: 0 0 10px !important; font-size: 21px !important; }
.cv-glance dl { margin: 0 0 16px; }
.cv-glance dl div { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cv-glance dt { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cv-glance dd { margin: 2px 0 0; font-size: 15px; color: var(--ink); line-height: 1.4; }

/* ---------- Schede a riga ---------- */
.cv-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 34px; margin: 20px 0 10px; border-top: 1px solid var(--rule); clear: both; }
.cv-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.cv-row[hidden] { display: none; }
.cv-row-cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--blush-2); box-shadow: 0 14px 24px -18px rgba(90, 0, 50, .8); isolation: isolate; }
.cv-row-cover > img, .cv-row-cover > video, .cv-tile-cover > img, .cv-tile-cover > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.cv-row-cover > video, .cv-tile-cover > video { opacity: 0; transition: opacity .5s; }
.cv-row-cover > video.is-on, .cv-tile-cover > video.is-on { opacity: 1; }
.cv-row-cover:hover > img, .cv-tile-cover:hover > img { transform: scale(1.05); }
.cv-row-body { min-width: 0; display: flex; flex-direction: column; }
.cv-row-kick { margin: 0 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cv-row-kick b { color: var(--accent); }
.cv-row-title { margin: 0 0 6px; font-family: var(--serif); font-weight: 650; font-size: 22px; line-height: 1.12; letter-spacing: -.01em; }
.cv-row-title a { color: var(--accent); text-decoration: none; }
.cv-row-title a:hover { text-decoration: underline; }
.cv-row-syn { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--ink-2) !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cv-row-meta { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; font-size: 13.5px; color: var(--muted) !important; }
.cv-row-go { font-weight: 700; color: var(--accent) !important; text-decoration: none; border: 1.5px solid var(--blush-2); padding: 4px 11px; border-radius: 999px; }
.cv-row-go:hover { background: var(--accent); border-color: var(--accent); color: #fff !important; }
.cv-flag { position: absolute; top: 7px; left: 7px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; background: #fff; color: var(--accent-deep); font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cv-flag--new { background: var(--accent); color: #fff; }
.cv-flag--lock { background: var(--dark); color: #fff; }

.cv-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px; margin: 20px 0 10px; clear: both; }
.cv-tile { margin: 0; min-width: 0; }
.cv-tile-cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--blush-2); box-shadow: 0 18px 30px -22px rgba(90, 0, 50, .85); isolation: isolate; }
.cv-tile figcaption { margin-top: 10px; display: flex; flex-direction: column; line-height: 1.2; }
.cv-tile .cs-name { font-size: 17.5px; }
.cv-tile figcaption span { margin-top: 4px; font-size: 13px; color: var(--muted); }

.cv-filter { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 4px; padding: 12px 0; border-top: 2px solid var(--dark); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; background: var(--paper); }
.cv-filter button { border: 0; background: none; padding: 2px 0; color: var(--ink-2); font-family: var(--serif); font-size: 17px; cursor: pointer; border-bottom: 2px solid transparent; }
.cv-filter button.is-on { color: var(--accent); border-bottom-color: var(--accent); }

.cv-mood { clear: both; }
.cv-mood h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; }
.cv-mood h2 span { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.cv-foot { max-width: 1080px; margin: 50px auto 0; padding: 30px 0 44px; border-top: 2px solid var(--dark); font-size: 14px; color: var(--muted); }
.cv-foot p { margin: 0 0 10px; max-width: 820px; }
.cv-logo--foot { margin-bottom: 12px; }
.cv-logo--foot .cv-logo-a { font-size: 17px; }
.cv-logo--foot .cv-logo-b { font-size: 23px; }
.cv-foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cv-foot-links a { color: var(--ink-2); }

/* ---------- Avviso 18+ ---------- */
.cv-age { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(255, 246, 250, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cv-age[hidden] { display: none; }
.cv-age-box { max-width: 440px; padding: 34px 30px 28px; background: #fff; border-top: 5px solid var(--accent); border-radius: 0 0 16px 16px; text-align: center; box-shadow: 0 40px 70px -40px rgba(90, 0, 50, .7); }
.cv-age-box .cv-logo { margin-bottom: 14px; }
.cv-age-title { margin: 6px 0 6px; font-family: var(--serif); font-weight: 650; font-size: 30px; line-height: 1.1; color: var(--ink); }
.cv-age-box p { color: var(--ink-2); }
.cv-age-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.cv-age-actions .cv-btn { justify-content: center; }

/* ---------- Tablet ---------- */
@media (max-width: 1240px) {
	:root { --side-w: 250px; }
	.cv-page { padding: 0 34px; }
	.cv-spread { grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; }
	.cv-cover { width: 230px; }
	.cv-cover:nth-child(3) { display: none; }
	.cv-covers { height: 410px; }
	.cv-rows { grid-template-columns: 1fr; }
}

/* ---------- Mobile: aspetto da app ---------- */
@media (max-width: 899px) {
	body { font-size: 16.5px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
	.cv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 40; padding: 9px 16px; background: rgba(255, 250, 247, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
	.cv-logo--bar { display: flex; align-items: baseline; gap: 6px; }
	.cv-logo--bar .cv-logo-a { font-size: 17px; }
	.cv-logo--bar .cv-logo-b { font-size: 22px; }
	.cv-bar-cta { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }
	.cv-layout { display: block; }
	.cv-side { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw); transform: translateX(-104%); transition: transform .3s ease; box-shadow: 20px 0 40px -30px rgba(60, 0, 30, .6); }
	.cv-side.is-open { transform: none; }
	.cv-side-close { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--blush); color: var(--accent-deep); cursor: pointer; }
	.cv-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(36, 27, 33, .35); }
	.cv-scrim[hidden] { display: none; }
	.cv-page { padding: 0 16px; }
	.cv-main { padding-top: 18px; }
	.cv-crumbs { margin-bottom: 12px; }
	.cv-spread { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 26px; }
	.cv-spread-text { display: contents; }
	.cv-kicker { order: 1; }
	.cv-h1 { order: 2; font-size: clamp(32px, 8.6vw, 42px); }
	.cv-covers { order: 3; height: auto; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 18px -16px 0; padding: 4px 16px 12px; scroll-padding-left: 16px; scrollbar-width: none; }
	.cv-covers::-webkit-scrollbar { display: none; }
	.cv-cover, .cv-cover:nth-child(n) { position: relative; top: auto; right: auto; display: block; flex: none; width: 64vw; max-width: 300px; transform: none !important; border-width: 5px; scroll-snap-align: start; }
	.cv-cover:not(.cv-cover--front) .cv-cover-cap { display: flex; }
	.cv-cover-cap strong { font-size: 19px; }
	.cv-deck { order: 4; font-size: 18.5px; margin-top: 14px; }
	.cv-spread-cta { order: 5; margin-top: 18px; }
	.cv-deck-src { margin: -18px 0 22px; }
	.cv-content h2 { margin-top: 40px; }
	.cv-glance { float: none; width: auto; margin: 0 0 10px; }
	.cv-rows { grid-template-columns: 1fr; }
	.cv-row { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
	.cv-row-title { font-size: 19.5px; }
	.cv-row-syn { font-size: 14.5px; -webkit-line-clamp: 2; }
	.cv-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.cv-filter { flex-wrap: nowrap; overflow-x: auto; top: 52px; margin: 18px -16px 4px; padding: 12px 16px; scrollbar-width: none; }
	.cv-filter button { flex: none; }
	.cv-foot { margin-top: 30px; }

	.cv-capsule { display: flex; align-items: center; position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .97); box-shadow: 0 18px 40px -16px rgba(80, 0, 44, .45), 0 0 0 1px var(--rule); }
	.cv-capsule > a, .cv-capsule > button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; cursor: pointer; }
	.cv-capsule > a[aria-current] { color: var(--accent); }
	.cv-capsule .cv-capsule-go { flex: 1.3; flex-direction: row; justify-content: center; gap: 6px; align-self: stretch; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}
