/*
Theme Name: dds_wonka-film.ru
Theme URI: https://wonka-film.ru/
Author: Мария Ветрова
Description: «Шоколадная лаборатория» — тёмная тема для познавательного портала о шоколаде, кондитерском деле и пищевых технологиях.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fzwonka
*/

:root {
    --bg: #1a0f1c;
    --bg-alt: #241528;
    --bg-head: #120a14;
    --bg-foot: #0d070f;
    --bg-aside: #201224;
    --text: #f5e6d3;
    --gold: #e8a020;
    --gold-light: #f5b945;
    --amethyst: #c44dff;
    --muted: #9a8a9e;
    --line: #3a2a3e;
    --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
    --sans: "Nunito", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    background-image: repeating-linear-gradient(45deg, rgba(232, 160, 32, 0.035) 0 1px, transparent 1px 22px);
}

body::after {
    content: "";
    position: fixed;
    right: -40px;
    bottom: -40px;
    width: 380px;
    height: 380px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.05;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cellipse cx='100' cy='100' rx='48' ry='82' fill='none' stroke='%23e8a020' stroke-width='3' transform='rotate(-28 100 100)'/%3E%3Cpath d='M68 34c24 36 36 82 62 132' fill='none' stroke='%23e8a020' stroke-width='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

.glowline, .site-main, .drip, .colophon { position: relative; z-index: 1; }
.masthead { position: relative; z-index: 10; }

img { max-width: 100%; height: auto; }

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.22;
    margin: 1.6em 0 0.6em;
    color: var(--text);
    letter-spacing: 0.01em;
}
h1 { font-size: 3.2rem; margin-top: 0; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

h1, h2 {
    background: linear-gradient(100deg, #f5e6d3 30%, #e8a020 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

a { color: var(--amethyst); text-decoration: none; transition: color .2s ease; }
a:hover { color: #d98bff; }

.entry-content a, .page-intro a, .crumbs a, .widget a, .cookie-text a, .note-text a, .entry-tags a, .entry-nav a {
    background-image: linear-gradient(var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 1px;
    transition: background-size .3s ease, color .2s ease;
}
.entry-content a:hover, .page-intro a:hover, .crumbs a:hover, .widget a:hover, .cookie-text a:hover, .note-text a:hover, .entry-tags a:hover, .entry-nav a:hover {
    background-size: 100% 1px;
}

table { width: 100%; border-collapse: collapse; margin: 1.4em 0; border: 1px solid var(--line); }
th, td { border: 1px solid var(--line); padding: 0.6em 0.8em; text-align: left; }
th { background: var(--bg-alt); color: var(--gold); font-weight: 700; }

blockquote {
    margin: 1.6em 0;
    padding: 1.2em 1.5em;
    border-left: 3px solid var(--gold);
    background: rgba(232, 160, 32, 0.07);
    border-radius: 0 10px 10px 0;
    font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

pre, code { font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.92em; }
pre { overflow-x: auto; padding: 1em 1.2em; background: #120a14; border: 1px solid var(--line); border-radius: 8px; }

hr { border: 0; border-top: 1px dashed rgba(232, 160, 32, .4); margin: 2em 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---------- Shell ---------- */
.shell { width: min(92%, 1180px); margin-left: auto; margin-right: auto; }
.shell--front { width: min(85%, 1280px); }

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 0.8em 1.6em;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    border: 0;
    background: none;
    cursor: pointer;
    transition: transform .2s ease, filter .25s ease, color .2s ease;
}
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 8px;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    background: var(--gold);
    transition: background .2s ease;
}
.btn-gold { color: #1a0f1c; }
.btn-gold:hover { color: #1a0f1c; background: none; }
.btn-gold:hover::before { background: var(--gold-light); }
.btn-ghost { color: var(--gold); }
.btn-ghost::before {
    padding: 1.5px;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.btn-ghost::after {
    content: "";
    position: absolute;
    top: -0.5px;
    left: calc(100% - 12px);
    width: 17px;
    height: 1.5px;
    background: var(--gold);
    transform: rotate(45deg);
    transform-origin: 0 50%;
}
.btn-ghost:hover { color: var(--gold-light); }
.btn-ghost:hover::before, .btn-ghost:hover::after { background: var(--gold-light); }
.btn:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 10px rgba(196, 77, 255, .55));
}

/* ---------- Header ---------- */
.glowline {
    height: 3px;
    background: linear-gradient(90deg, #e8a020, #c44dff, #e8a020);
    background-size: 200% 100%;
    animation: fzShimmer 8s linear infinite;
}
@keyframes fzShimmer { to { background-position: -200% 0; } }

.masthead { background: var(--bg-head); border-bottom: 1px solid var(--line); }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark { flex: 0 0 auto; display: block; }
.brand-logo { display: block; max-height: 56px; width: auto; }
.brand-svg { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 560px; }
.brand-name {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--gold);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted);
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mainnav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; }
.mainnav-list li { position: relative; }
.mainnav-list a {
    display: block;
    padding: 0.55em 0.95em;
    color: var(--text);
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
}
.mainnav-list a:hover, .mainnav-list .current-menu-item > a {
    color: var(--gold);
    background: rgba(232, 160, 32, 0.08);
}
.mainnav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-head);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: none;
    z-index: 20;
}
.mainnav-list li:hover > .sub-menu, .mainnav-list li:focus-within > .sub-menu { display: block; }

.nav-toggle[hidden] { display: none !important; }
.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 8px;
    font: 700 0.9rem var(--sans);
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 1.4rem 0 0.4rem;
}
.crumbs .sep { color: var(--gold); margin: 0 0.35em; }
.crumbs span:last-child { color: var(--text); }

/* ---------- Layout ---------- */
.page-wrap { padding-bottom: 4rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    align-items: start;
    margin-top: 1.2rem;
}
.layout-single { display: block; margin-top: 1.2rem; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.page-head { margin-bottom: 2rem; }
.page-title, .entry-title { font-size: 3.2rem; margin: 0 0 0.4em; }
.page-intro { color: var(--muted); max-width: 70ch; }

/* ---------- Section title ---------- */
.section-title {
    position: relative;
    padding: 1.2rem 0 0 2.4rem;
    margin: 0 0 2.4rem 3%;
}
.section-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2.4rem;
    width: 140px;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    transform: rotate(-2deg);
    transform-origin: left center;
}
.section-title h2 {
    position: relative;
    margin: 0 0 0.4rem;
    font-size: 2.3rem;
}
.section-title h2::before {
    content: "";
    position: absolute;
    left: -1.9rem;
    top: 0.55em;
    width: 11px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f5c35a, #8a4a10 70%);
    box-shadow: 0 0 10px rgba(232, 160, 32, .75);
    transform: rotate(-24deg);
}
.section-title:hover h2::before { animation: fzPulse 1.2s ease-in-out infinite; }
@keyframes fzPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(232, 160, 32, .6); }
    50% { box-shadow: 0 0 20px rgba(232, 160, 32, 1), 0 0 34px rgba(196, 77, 255, .5); }
}
.section-sub { color: var(--muted); margin: 0; max-width: 62ch; }

/* ---------- Separators ---------- */
.fz-sep {
    position: relative;
    height: 14px;
    width: 60%;
    margin: 0 auto 3.2rem;
}
.fz-sep::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 6px;
    border-top: 1px dashed rgba(232, 160, 32, .45);
}
.fz-sep span {
    position: absolute;
    left: 50%;
    top: 0;
    width: 13px;
    height: 13px;
    margin-left: -6.5px;
    background: var(--bg);
    border: 1px solid var(--gold);
    transform: rotate(45deg);
}
.front-section--alt .fz-sep span { background: var(--bg-alt); }

.drip { height: 40px; margin-top: -1px; }
.drip svg { display: block; width: 100%; height: 40px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(480px, 74vh, 740px);
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, #2a1530, #0d070f);
}
.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 70% 55%, rgba(232, 160, 32, .12), transparent 55%),
        linear-gradient(90deg, rgba(18, 10, 20, .92) 0%, rgba(26, 15, 28, .7) 50%, rgba(26, 15, 28, .25) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 4rem 0; }
.hero-copy { max-width: 640px; min-width: 0; }
.hero-kicker {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--gold);
    border: 1px solid rgba(232, 160, 32, .5);
    border-radius: 6px;
    padding: 0.25em 0.8em;
    margin-bottom: 1.3rem;
}
.hero-title { font-size: 3.2rem; margin-bottom: 0.5em; }
.hero-lead { font-size: 1.15rem; color: #e6d4c2; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }
.hero-bean {
    position: absolute;
    right: 4%;
    bottom: 6%;
    width: 110px;
    height: 110px;
    z-index: 2;
    filter: drop-shadow(0 0 16px rgba(232, 160, 32, .7));
    animation: fzBean 4s ease-in-out infinite;
}
@keyframes fzBean {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(232, 160, 32, .45)); }
    50% { filter: drop-shadow(0 0 26px rgba(232, 160, 32, .95)); }
}

/* ---------- Front sections ---------- */
.front-section { padding: 4.5rem 0 5rem; }
.front-section--alt { background-color: var(--bg-alt); }
.front-section--main { background-color: transparent; }
.section-more { text-align: center; margin: 2.6rem 0 0; }

/* Timeline */
.tl {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tl::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(180deg, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
}
.tl-item {
    position: relative;
    width: calc(50% - 44px);
    margin-bottom: 1.8rem;
    padding: 1.4rem 1.6rem;
    background: rgba(26, 15, 28, .75);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(8, 3, 10, .45);
    transition: border-color .25s ease;
}
.tl-item:hover { border-color: var(--gold); }
.tl-item:nth-child(even) { margin-left: auto; }
.tl-item::after {
    content: "";
    position: absolute;
    top: 1.9rem;
    right: -51px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px var(--bg-alt), 0 0 14px rgba(232, 160, 32, .9);
}
.tl-item:nth-child(even)::after { right: auto; left: -51px; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.tl-label {
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--gold);
    padding: 0.2em 0.75em;
    border: 1px solid var(--gold);
    outline: 1px solid rgba(232, 160, 32, .35);
    outline-offset: 2px;
    border-radius: 3px;
    letter-spacing: 0.08em;
}
.tl-icon { width: 30px; height: 30px; color: var(--amethyst); flex: 0 0 auto; }
.tl-item h3 { margin: 0 0 0.4rem; font-size: 1.35rem; color: var(--text); }
.tl-item p { margin: 0; color: #dcc9b8; font-size: 0.98rem; }

/* Facts */
.facts {
    display: flex;
    padding: 2.6rem 2.2rem;
    border-radius: 14px;
    border: 1px solid rgba(232, 160, 32, .25);
    background:
        radial-gradient(ellipse at 50% 50%, rgba(232, 160, 32, .12), transparent 65%),
        linear-gradient(160deg, #2c1832, #0f0811);
    box-shadow: 0 0 60px rgba(196, 77, 255, .12) inset, 0 20px 40px rgba(8, 3, 10, .5);
}
.fact {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.4rem 1.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.fact + .fact { border-left: 1px dashed rgba(232, 160, 32, .35); }
.fact-num {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #f5d38a, #e8a020 60%, #b5700c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.fact-cap { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

/* Topics */
.topics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.topic {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    padding: 1.8rem 1.6rem;
    color: var(--text);
    background: rgba(36, 21, 40, .55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 160, 32, .45);
    border-radius: 12px;
    transition: box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}
.topic:hover {
    color: var(--text);
    transform: translateY(-4px);
    border-color: var(--amethyst);
    box-shadow: 0 0 0 1px rgba(196, 77, 255, .4), 0 0 32px rgba(196, 77, 255, .35);
}
.topic-icon { width: 46px; height: 46px; color: var(--gold); margin-bottom: 0.6rem; }
.topic-tag {
    align-self: flex-start;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    border-top: 1px solid rgba(232, 160, 32, .5);
    border-bottom: 1px solid rgba(232, 160, 32, .5);
    padding: 0.05em 0.4em;
}
.topic-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.topic-text { color: var(--muted); font-size: 0.95rem; }

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    gap: 1.6rem;
}
.card-grid--front { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(10, 3, 14, .55);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.front-section--alt .card { background: var(--bg); }
.card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 24px 44px rgba(10, 3, 14, .65), 0 0 26px rgba(232, 160, 32, .22);
}
.card-thumb { overflow: hidden; border-radius: 12px 12px 0 0; }
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .5s ease;
}
.card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: repeating-linear-gradient(45deg, rgba(232, 160, 32, .06) 0 1px, transparent 1px 14px), linear-gradient(160deg, #2c1832, #120a14);
}
.card-thumb-empty svg { display: block; }
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.3rem 1.4rem 1.5rem;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.card-cat { color: var(--gold); }
.card-pin { color: #1a0f1c; background: var(--gold); padding: 0 0.5em; border-radius: 4px; font-weight: 700; }
.card-title { font-size: 1.3rem; margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--gold); }
.card-excerpt { color: #d8c5b3; font-size: 0.96rem; flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-start; margin-top: 0.8rem; font-weight: 700; font-size: 0.92rem; }
.card-more::after { content: " →"; }

/* ---------- Entry ---------- */
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; color: var(--muted); font-size: 0.92rem; }
.entry-cover { margin: 1.6rem 0; }
.entry-cover img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img { border-radius: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content ul li::marker { color: var(--gold); }
.entry-content h2 { font-size: 2rem; }
.entry-content figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; }
.alignleft { float: left; margin: 0 1.4em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.page-links { margin-top: 1.4rem; }
.entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 2rem 0 0; font-size: 0.92rem; }
.entry-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 2.4rem 0 0;
    padding: 1.2rem 1.4rem;
    border: 1px dashed rgba(232, 160, 32, .35);
    border-radius: 10px;
}
.entry-nav > div { min-width: 0; }
.entry-nav-next { text-align: right; }

/* ---------- Sidebar & widgets ---------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--bg-aside);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
}
.widget-title {
    font-size: 1.15rem;
    margin: 0 0 0.9rem;
    color: var(--gold);
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(232, 160, 32, .35);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.45rem 0; border-bottom: 1px solid rgba(58, 42, 62, .7); }
.widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: #e2b8ff; }
.sidebar .widget a:hover { color: var(--gold); }
.sidebar .widget .post-date { display: block; font-size: 0.8rem; color: #b3a3b7; }
.sidebar .widget p { color: var(--text); }

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.8rem 0 0;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 0.8rem;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-alt);
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.pager a.page-numbers:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(196, 77, 255, .35); }
.pager .page-numbers.current { background: var(--gold); border-color: var(--gold); color: #1a0f1c; }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; }

/* ---------- Search form ---------- */
.seek { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: stretch; }
.seek-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.seek-field {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.75em 1em;
    font: inherit;
    color: var(--text);
    background: #120a14;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.seek-field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 160, 32, .2); }

/* ---------- Comments ---------- */
.discussion { margin-top: 3rem; padding-top: 2rem; border-top: 1px dashed rgba(232, 160, 32, .35); }
.discussion-title { font-size: 1.8rem; margin-top: 0; }
.note-list, .note-list .children { list-style: none; margin: 0; padding: 0; }
.note-list .children { padding-left: 1.6rem; }
.note-body {
    padding: 1.1rem 1.3rem;
    margin-bottom: 1rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.note-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
.note-avatar { border-radius: 50%; display: block; }
.note-who { display: flex; flex-direction: column; line-height: 1.3; }
.note-who time { font-size: 0.8rem; color: var(--muted); }
.note-wait { color: var(--gold); font-size: 0.9rem; }
.note-reply { font-size: 0.9rem; font-weight: 700; }
.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-size: 1.5rem; }
.comment-form label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    font: inherit;
    color: var(--text);
    background: #120a14;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-notes, .logged-in-as { font-size: 0.9rem; color: var(--muted); }

/* ---------- 404 & empty ---------- */
.lost {
    margin: 2rem auto 0;
    width: min(100%, 720px);
    text-align: center;
    padding: 3rem 2.4rem;
    background: radial-gradient(ellipse at 50% 30%, rgba(232, 160, 32, .1), transparent 60%), var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.lost-code {
    font-family: var(--serif);
    font-size: 6rem;
    line-height: 1;
    margin: 0;
    background: linear-gradient(180deg, #f5d38a, #e8a020);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lost-title { font-size: 2.2rem; margin: 0.6rem 0 0.8rem; }
.lost-text { color: var(--muted); }
.lost .seek { margin: 1.6rem 0; }
.empty-note { color: var(--muted); }
.empty-box {
    padding: 1.6rem 1.8rem;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* ---------- Footer ---------- */
.colophon {
    background: var(--bg-foot);
    color: var(--text);
    border-top: 1px solid var(--line);
}
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3.4rem 0 2.4rem;
}
.colophon-col { min-width: 0; }
.colophon .widget { color: #dccbb9; margin-bottom: 1.4rem; }
.colophon .widget p { color: #dccbb9; }
.colophon .widget-title { color: var(--gold); }
.colophon .widget a { color: #dba6ff; }
.colophon .widget a:hover { color: var(--gold); }
.colophon .widget li { border-bottom-color: rgba(58, 42, 62, .6); }
.colophon .widget .post-date { color: #a898ac; }
.colophon-base {
    border-top: 1px dashed rgba(232, 160, 32, .25);
    padding: 1.2rem 0 1.6rem;
    font-size: 0.88rem;
    color: #a898ac;
}
.colophon-base p { margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 100;
    width: min(92%, 860px);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.4rem;
    background: rgba(18, 10, 20, .96);
    border: 1px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(196, 77, 255, .25);
}
.cookie-text { margin: 0; font-size: 0.92rem; min-width: 0; flex: 1; }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    h1, .page-title, .entry-title, .hero-title { font-size: 2.5rem; }
    .brand-desc { display: none; }
    .nav-toggle { display: inline-flex; }
    .masthead-row { flex-wrap: wrap; }
    .mainnav { flex-basis: 100%; display: none; }
    .mainnav.is-open { display: block; }
    .mainnav-list { flex-direction: column; padding: 0.5rem 0 0.8rem; }
    .mainnav-list .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 1rem; background: none; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.4rem; }
    .layout-single .content-area { width: auto; }
    .card-grid--front { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts { flex-wrap: wrap; padding: 2rem 1.6rem; }
    .fact { flex: 1 1 50%; padding: 1rem; }
    .fact + .fact { border-left: 0; }
    .fact:nth-child(even) { border-left: 1px dashed rgba(232, 160, 32, .35); }
    .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tl::before { left: 16px; }
    .tl-item, .tl-item:nth-child(even) { width: auto; margin-left: 48px; }
    .tl-item::after, .tl-item:nth-child(even)::after { right: auto; left: -39px; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    h1, .page-title, .entry-title, .hero-title { font-size: 2rem; }
    h2, .section-title h2 { font-size: 1.65rem; }
    .shell--front { width: 92%; }
    .front-section { padding: 3rem 0 3.4rem; }
    .section-title { margin-left: 0; padding-left: 1.8rem; }
    .section-title::before { left: 1.8rem; }
    .section-title h2::before { left: -1.5rem; }
    .brand-svg { width: 42px; height: 42px; }
    .brand-name { font-size: 0.88rem; }
    .hero { min-height: 520px; }
    .hero-inner { padding: 3rem 0 5rem; }
    .hero-bean { width: 70px; height: 70px; }
    .card-grid--front, .topics, .colophon-grid { grid-template-columns: minmax(0, 1fr); }
    .facts { padding: 1.6rem 1.2rem; }
    .fact { flex-basis: 100%; }
    .fact:nth-child(even) { border-left: 0; }
    .fact + .fact { border-top: 1px dashed rgba(232, 160, 32, .35); }
    .fact-num { font-size: 2.5rem; }
    .topic { padding: 1.5rem 1.3rem; }
    .tl-item { padding: 1.2rem 1.2rem; }
    .lost { padding: 2.2rem 1.4rem; }
    .lost-code { font-size: 4.5rem; }
    .empty-box { padding: 1.3rem 1.2rem; }
    .entry-nav { flex-direction: column; padding: 1rem 1.1rem; }
    .entry-nav-next { text-align: left; }
    .sidebar .widget { padding: 1.2rem 1.2rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; }
    .alignleft, .alignright { float: none; margin: 0 0 1em; }
}
