/*
Theme Name: dds_71supergame.com
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: sgarc
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/russo-one-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/russo-one-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/jetbrains-mono-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --bg: #1A0B2E;
    --bg-dark: #120A24;
    --bg-strip: #2A1745;
    --bg-navy: #0E1B2E;
    --grid: #3D2A5C;
    --facade: #2F1E52;
    --text: #F5F0E8;
    --muted: #9B8FB8;
    --yellow: #FFD23F;
    --yellow-soft: #FFE97A;
    --yellow-deep: #B8901A;
    --pink: #FF4D9D;
    --mint: #3DFFC4;
    --line: #4B3A73;
    --cream: #F5F0E8;
    --ink: #1A0B2E;
    --thumb-bg: #13253A;
    --font-head: "Russo One", "Arial Narrow", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "DejaVu Sans Mono", "Consolas", monospace;
    --px: 4px;
}

/* ---------- Правила [hidden] — до основных стилей ---------- */
.cookie-banner[hidden] { display: none !important; }
.sg-floor__panel[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(61, 42, 92, .45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 42, 92, .45) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: -1px -1px;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.65;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.15;
    margin: 1.4em 0 .6em;
    color: var(--text);
    overflow-wrap: break-word;
    hyphens: auto;
}
p, li, dd, td, th, blockquote, figcaption, .sg-card__title { overflow-wrap: break-word; hyphens: auto; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--yellow); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.sg-vh {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.sg-skip {
    position: absolute;
    left: 8px; top: -60px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 700;
}
.sg-skip:focus { top: 8px; }

/* единый контейнер ширины */
.shell { width: min(85%, 1200px); margin-inline: auto; }

/* пунктирное подчёркивание квадратами */
.entry-content a, .sg-foot a, .sg-side a, .sg-page__intro a, .sg-comments a, .sg-404__text a {
    background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
    background-size: 6px 2px;
    background-repeat: repeat-x;
    background-position: 0 100%;
    padding-bottom: 2px;
}

/* ---------- Кнопка-клавиша ---------- */
.sg-key {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    padding: .7em 1.4em;
    background: var(--yellow);
    color: var(--ink);
    border: 3px solid var(--ink);
    border-radius: 0;
    box-shadow: 0 0 0 2px var(--yellow), 0 5px 0 2px var(--yellow-deep);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    transition: transform .08s steps(2), box-shadow .08s steps(2), background-color .1s;
}
.sg-key::before, .sg-key::after {
    content: "";
    position: absolute;
    top: 4px;
    width: 4px; height: 4px;
    background: var(--ink);
}
.sg-key::before { left: 4px; }
.sg-key::after { right: 4px; }
.sg-key:hover { background: var(--yellow-soft); color: var(--ink); transform: translateY(3px); box-shadow: 0 0 0 2px var(--yellow), 0 2px 0 2px var(--yellow-deep); }
.sg-key:active { transform: translateY(5px); box-shadow: 0 0 0 2px var(--yellow), 0 0 0 2px var(--yellow-deep); }
.sg-key--small { padding: .5em 1.05em; font-size: .92rem; }

/* ---------- Шапка ---------- */
.sg-top {
    position: relative;
    background-color: var(--bg-dark);
    background-image: url("images/pixel-strip.svg");
    background-repeat: repeat-x;
    background-position: 0 0;
    border-bottom: 2px solid var(--line);
    padding: 2.6rem 0 1.6rem;
}
.sg-top__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    flex-wrap: wrap;
}
.sg-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    min-width: 0;
    flex: 1 1 420px;
    max-width: 620px;
}
.sg-brand:hover { color: var(--text); }
.sg-brand__mark {
    flex: 0 0 64px;
    width: 64px; height: 64px;
    border: 3px solid var(--line);
    box-shadow: 4px 4px 0 var(--facade);
    background: var(--bg-strip);
    display: block;
    overflow: hidden;
}
.sg-brand__mark img, .sg-brand__svg { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; }
.sg-brand__text { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.sg-brand__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.2;
    color: var(--text);
    text-shadow: 2px 2px 0 var(--facade);
}
.sg-brand__desc {
    font-size: .78rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sg-burger {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    background: transparent;
    color: var(--text);
    border: 2px solid var(--line);
    font-family: var(--font-mono);
    font-size: .9rem;
    cursor: pointer;
}
.sg-burger__bars, .sg-burger__bars::before, .sg-burger__bars::after {
    display: block;
    width: 18px; height: 3px;
    background: var(--mint);
    position: relative;
}
.sg-burger__bars::before, .sg-burger__bars::after { content: ""; position: absolute; left: 0; }
.sg-burger__bars::before { top: -6px; }
.sg-burger__bars::after { top: 6px; }
.sg-nav__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.8rem;
}
.sg-nav__list a {
    display: inline-block;
    padding: .35rem 0;
    color: var(--text);
    font-size: .95rem;
    border-bottom: 3px solid transparent;
}
.sg-nav__list a:hover { color: var(--yellow); border-bottom-color: var(--pink); }
.sg-nav__list .current-menu-item > a,
.sg-nav__list .current_page_item > a,
.sg-nav__list .current-menu-ancestor > a { color: var(--mint); border-bottom-color: var(--mint); }

/* ---------- Заголовок секции с пиксельной линией ---------- */
.sg-section-title {
    display: inline-block;
    margin: 0 0 2rem;
    font-size: clamp(1.9rem, 4vw, 3rem);
    padding-bottom: 1rem;
    position: relative;
}
.sg-section-title::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 8px;
    background-image: repeating-linear-gradient(90deg, var(--mint) 0 10px, transparent 10px 20px);
}

/* ---------- Блок 1: автомат ---------- */
.sg-hero {
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 62% 40%, rgba(61, 255, 196, .07), transparent 55%),
        linear-gradient(rgba(61, 42, 92, .7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 42, 92, .7) 1px, transparent 1px);
    background-size: auto, 28px 28px, 28px 28px;
    border-bottom: 2px solid var(--line);
    overflow: hidden;
}
.sg-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .55fr);
    gap: 1rem 2rem;
    align-items: end;
    padding-top: 2.2rem;
}
.sg-hero__lead { align-self: center; padding-bottom: 3rem; min-width: 0; }
.sg-hero__title {
    margin: 0 0 1.4rem;
    font-size: clamp(2rem, 4.3vw, 3.9rem);
    line-height: 1.04;
    overflow-wrap: normal;
    color: var(--text);
    text-shadow: 3px 3px 0 var(--pink), 0 0 22px rgba(255, 77, 157, .35);
    hyphens: manual;
    font-family: var(--font-head);
}
.sg-hero__sub {
    margin: 0;
    display: inline-block;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    letter-spacing: .02em;
    color: var(--text);
    padding: .35rem .6rem;
    background: rgba(18, 10, 36, .7);
    border-left: 4px solid var(--yellow);
}
.sg-machine {
    position: relative;
    margin: 0;
    container-type: inline-size;
    min-width: 0;
    max-width: 520px;
    justify-self: center;
    width: 100%;
}
.sg-machine img { display: block; width: 100%; height: auto; image-rendering: auto; }
.sg-machine__screen {
    position: absolute;
    left: 50.8%; top: 42.1%;
    transform: translate(-50%, -50%);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 26px;
    font-size: 6.6cqi;
    color: var(--text);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(61, 255, 196, .65);
    letter-spacing: .02em;
}
.sg-machine__lever {
    position: absolute;
    top: 75.8%;
    transform: translate(-50%, -50%);
    width: 17%;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    font-size: 2.6cqi;
    line-height: 1.1;
    text-align: center;
    color: var(--text);
}
.sg-machine__lever--a { left: 19.4%; }
.sg-machine__lever--b { left: 37.1%; }
.sg-machine__lever--c { left: 54.2%; }
.sg-hero__stats {
    list-style: none;
    margin: 0; padding: 0 0 3rem;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    min-width: 0;
}
.sg-hero__stats b {
    display: block;
    font-family: var(--font-head);
    font-size: clamp(1.6rem, 2.6vw, 2.6rem);
    line-height: 1;
    white-space: nowrap;
    color: var(--mint);
    text-shadow: 0 0 14px rgba(61, 255, 196, .55);
}
.sg-hero__stats span { display: block; margin-top: .4rem; font-size: .95rem; color: var(--text); }

/* ---------- Блок 2: карта дома ---------- */
.sg-floors {
    background-color: var(--bg-dark);
    background-image: url("images/facade-pixel.svg");
    background-repeat: no-repeat;
    background-position: right -60px bottom 0;
    background-size: auto 92%;
    border-bottom: 2px solid var(--line);
    padding-top: 3rem;
}
.sg-floors__title {
    margin: 0 0 1.6rem;
    font-size: clamp(2rem, 4.4vw, 3.6rem);
    color: var(--text);
    text-shadow: 3px 3px 0 var(--facade);
}
.sg-floors__grid {
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.sg-floors__pic { margin: 0; align-self: end; min-width: 0; }
.sg-floors__pic img { display: block; width: 100%; height: auto; }
.sg-floors__list { min-width: 0; margin-bottom: 2.5rem; padding: .6rem; background: rgba(18, 10, 36, .86); }
.sg-floor { border-bottom: 2px dashed var(--line); }
.sg-floor__head { margin: 0; font-size: inherit; }
.sg-floor__btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1rem;
    background: transparent;
    border: 0;
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.12rem;
    text-align: start;
    cursor: pointer;
}
.sg-floor__btn:hover { color: var(--yellow); }
.sg-floor__icon { flex: 0 0 24px; color: var(--muted); }
.sg-floor__panel { padding: 0 1rem 1.1rem; }
.sg-floor__panel p { margin: 0; font-size: .9rem; color: var(--muted); }
.sg-floor.is-open {
    border: 3px solid var(--mint);
    box-shadow: 0 0 14px rgba(61, 255, 196, .35), inset 0 0 0 1px rgba(61, 255, 196, .2);
    background: rgba(18, 10, 36, .85);
    margin-bottom: .6rem;
}
.sg-floor.is-open .sg-floor__btn { color: var(--mint); font-family: var(--font-head); }
.sg-floor.is-open .sg-floor__icon { color: var(--mint); }

/* ---------- Блок записей ---------- */
.sg-latest {
    background: var(--bg-strip);
    padding: 3.2rem 0 3.6rem;
    border-bottom: 2px solid var(--line);
}
.sg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}
.sg-cards--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-with-sidebar .sg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { display: flex; flex-direction: column; }
.card-body { flex: 1; }
.card-excerpt p { margin: 0 0 .5em; background: none; }

.sg-card {
    position: relative;
    background: var(--cream);
    color: var(--ink);
    border: 6px double var(--line);
    border-radius: 18px;
    overflow: hidden;
    min-width: 0;
    box-shadow: 6px 6px 0 rgba(18, 10, 36, .6);
    transition: transform .12s steps(3), box-shadow .12s steps(3);
}
.sg-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--pink); }
.sg-card__cart {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    padding: 8px 14px;
    height: 30px;
    background: var(--yellow);
    border-bottom: 3px solid var(--ink);
}
.sg-card__cart i { display: block; width: 12px; height: 9px; background: var(--ink); }
.sg-card__thumb {
    display: block;
    margin: .9rem .9rem 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--thumb-bg);
}
.sg-card__thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    transition: transform .25s steps(4);
}
.sg-card:hover .sg-card__thumb img { transform: scale(1.04); }
.sg-card__body {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.2rem 1.3rem;
    min-width: 0;
}
.sg-card__pin {
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .15rem .5rem;
    background: var(--pink);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 700;
}
.sg-card__title {
    margin: 0 0 .5rem;
    font-family: var(--font-mono);
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--ink);
}
.sg-card__title a { color: var(--ink); }
.sg-card__title a:hover { color: #7A1F55; }
.sg-card__excerpt { font-size: .86rem; line-height: 1.55; color: #3B2D55; flex: 1; }
.sg-card__excerpt a { color: #0E7A63; text-decoration: underline; }
.sg-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: .9rem;
}
.sg-card__date { font-size: .82rem; color: #5D5178; }
.sg-empty { color: var(--muted); }

/* ---------- Нижняя полоса: архив + шкала ---------- */
.sg-band {
    background-color: var(--bg-navy);
    background-image:
        url("images/neon-skyline.svg"),
        repeating-linear-gradient(0deg, rgba(61, 255, 196, .05) 0 1px, transparent 1px 36px);
    background-repeat: no-repeat, repeat;
    background-position: right -40px bottom -10px, 0 0;
    background-size: 860px auto, auto;
    padding: 3rem 0 3.4rem;
    border-bottom: 2px solid var(--line);
}
.sg-band__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2.5rem 3rem;
    align-items: start;
}
.sg-archive { min-width: 0; }
.sg-archive__title, .sg-scale__title {
    margin: 0 0 1.2rem;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.sg-shelf {
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0 4% 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    position: relative;
}
.sg-shelf::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 12px;
    background: #6B6283;
    border-top: 3px solid #8E86A6;
    box-shadow: 0 6px 0 #2B2442;
}
.sg-cart {
    position: relative;
    padding: 18px 8px 10px;
    background: #8E86A6;
    border: 3px solid #3D3456;
    border-bottom-width: 6px;
    text-align: center;
    transition: transform .1s steps(2);
}
.sg-cart::before {
    content: "";
    position: absolute;
    top: 6px; right: 8px;
    width: 24px; height: 5px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 9px);
}
.sg-cart span {
    display: block;
    padding: .4rem .2rem;
    background: var(--yellow);
    border: 2px solid var(--ink);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(.78rem, 1.2vw, 1rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.sg-cart:hover { transform: translateY(-6px); }
.sg-cart:hover span { background: var(--yellow-soft); }
.sg-archive__caption {
    margin: 1.2rem 0 0;
    font-family: var(--font-head);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--text);
}

.sg-scale {
    min-width: 0;
    padding: 2rem 2rem 1.6rem;
    background: rgba(18, 10, 36, .78);
    border: 3px solid var(--pink);
    border-radius: 6px;
    box-shadow: 0 0 18px rgba(255, 77, 157, .45), inset 0 0 12px rgba(255, 77, 157, .15);
}
.sg-scale__title { margin-bottom: .8rem; }
.sg-scale__sub {
    margin: 0 0 1.6rem;
    font-family: var(--font-head);
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
    color: var(--text);
}
.sg-scale__body {
    display: flex;
    align-items: flex-end;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.sg-ruler { flex: 1 1 260px; min-width: 0; }
.sg-ruler__nums {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    text-align: center;
    font-weight: 700;
    font-size: .9rem;
}
.sg-ruler__ticks {
    height: 18px;
    margin: 4px 0 6px;
    border-bottom: 3px solid var(--text);
    background-image:
        linear-gradient(90deg, transparent calc(50% - 1px), var(--text) calc(50% - 1px), var(--text) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(90deg, var(--muted) 0, var(--muted) 2px, transparent 2px);
    background-size: 10% 100%, 10% 50%;
    background-position: 0 0, 0 100%;
    background-repeat: repeat-x;
}
.sg-ruler__zones {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: 3fr 3fr 4fr;
    gap: 6px;
}
.sg-ruler__zones li {
    min-width: 0;
    border: 2px solid var(--mint);
    border-top: 0;
    padding: .4rem .4rem .3rem;
    text-align: center;
}
.sg-ruler__zones b { display: block; color: var(--mint); font-size: .9rem; }
.sg-ruler__zones span { display: block; font-size: .72rem; line-height: 1.35; color: var(--muted); }
.sg-tiles {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: .8rem;
}
.sg-tiles li { text-align: center; }
.sg-tiles b {
    display: grid;
    place-items: center;
    width: 62px; height: 62px;
    background: #A79BD0;
    border: 3px solid #D3CBEC;
    box-shadow: inset -4px -4px 0 #6E62A0;
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 2.2rem;
}
.sg-tiles .is-mint b { background: var(--mint); border-color: #B9FFE9; box-shadow: inset -4px -4px 0 #17A982, 0 0 12px rgba(61, 255, 196, .5); }
.sg-tiles span { display: block; margin-top: .4rem; font-size: .9rem; color: var(--text); }
.sg-tiles .is-mint span { color: var(--mint); }
.sg-scale__note { margin: 1.3rem 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- Внутренние страницы ---------- */
.sg-page { padding: 2rem 0 4rem; }
.sg-crumbs {
    margin: 0 0 1.8rem;
    padding: .55rem .9rem;
    display: inline-block;
    font-size: .85rem;
    color: var(--muted);
    background: rgba(18, 10, 36, .85);
    border: 2px solid var(--line);
}
.sg-crumbs a { color: var(--mint); }
.sg-crumbs__sep { color: var(--pink); margin: 0 .2rem; }
.sg-crumbs span:last-child { color: var(--text); }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.content-area { min-width: 0; }
.sg-page__head { margin-bottom: .5rem; }
.sg-page__intro { color: var(--muted); margin-bottom: 1.5rem; }

.sg-entry {
    padding: 2rem 2.2rem 2.2rem;
    background: rgba(18, 10, 36, .88);
    border: 3px solid var(--line);
    box-shadow: 8px 8px 0 var(--facade);
}
.sg-entry__head { margin-bottom: 1.4rem; }
.sg-entry__title {
    margin: 0 0 .7rem;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    text-shadow: 3px 3px 0 var(--pink);
}
.sg-entry__meta { margin: 0; font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sg-entry__sep { color: var(--pink); font-size: .6rem; }
.sg-entry__thumb { margin: 0 0 1.6rem; border: 3px solid var(--line); }
.sg-entry__thumb img { display: block; width: 100%; height: auto; }

.entry-content { font-size: 1rem; line-height: 1.75; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.75rem; color: var(--yellow); }
.entry-content h3 { font-size: 1.4rem; color: var(--mint); }
.entry-content h4 { font-size: 1.15rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-inline-start: 1.6em; }
.entry-content li { margin-bottom: .4em; }
.entry-content ul { list-style: none; padding-inline-start: 1.4em; }
.entry-content ul > li { position: relative; }
.entry-content ul > li::before {
    content: "";
    position: absolute;
    left: -1.2em; top: .62em;
    width: 8px; height: 8px;
    background: var(--pink);
}
.entry-content ol > li::marker { color: var(--mint); font-weight: 700; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--bg-strip);
    border-left: 6px solid var(--pink);
    font-size: 1.05rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; max-width: 100%; }
.entry-content figcaption { font-size: .82rem; color: var(--muted); margin-top: .5rem; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .9rem; border: 2px solid var(--line); }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: start; vertical-align: top; }
.entry-content th { background: var(--bg-strip); color: var(--yellow); font-family: var(--font-head); }
.entry-content tr:nth-child(even) td { background: rgba(42, 23, 69, .45); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content code { font-family: var(--font-mono); background: var(--bg-strip); padding: .1em .35em; color: var(--yellow-soft); }
.entry-content pre { overflow-x: auto; padding: 1rem 1.2rem; background: #0B0618; border: 2px solid var(--line); }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; height: 6px; margin: 2em 0; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-inline: auto; }

.sg-tags { list-style: none; margin: 1.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.sg-tags a { display: inline-block; padding: .25rem .6rem; border: 2px solid var(--line); color: var(--mint); font-size: .82rem; }
.sg-tags a:hover { border-color: var(--mint); }

.sg-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.sg-postnav__link {
    display: block;
    padding: 1rem 1.2rem;
    background: var(--bg-strip);
    border: 2px solid var(--line);
    color: var(--text);
    min-width: 0;
}
.sg-postnav__link span { display: block; color: var(--mint); font-size: .8rem; margin-bottom: .3rem; }
.sg-postnav__link:hover { border-color: var(--yellow); color: var(--yellow); }
.sg-postnav__link--next { text-align: end; grid-column: 2; }

/* ---------- Сайдбар ---------- */
.sg-side { min-width: 0; display: flex; flex-direction: column; gap: 1.6rem; }
.sg-side .sg-widget {
    padding: 1.4rem 1.4rem 1.2rem;
    background: var(--bg-dark);
    border: 3px solid var(--line);
    box-shadow: 6px 6px 0 var(--facade);
    color: var(--text);
}
.sg-side .sg-widget__title {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    color: var(--yellow);
    padding-bottom: .6rem;
    border-bottom: 4px dotted var(--mint);
}
.sg-side ul { list-style: none; margin: 0; padding: 0; }
.sg-side li { padding: .55rem 0; border-bottom: 1px dashed var(--line); color: var(--text); }
.sg-side li:last-child { border-bottom: 0; }
.sg-side a { color: var(--mint); }
.sg-side a:hover { color: var(--yellow); }
.sg-side .post-date { display: block; color: var(--muted); font-size: .78rem; }
.sg-side p { color: var(--text); }

/* ---------- Пагинация ---------- */
.sg-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin: 2.6rem 0 0;
}
.sg-pager .page-numbers,
.sg-pager > span,
.sg-pager > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 .8rem;
    background: var(--bg-dark);
    border: 3px solid var(--line);
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 700;
}
.sg-pager a.page-numbers:hover, .sg-pager > a:hover { border-color: var(--yellow); color: var(--yellow); }
.sg-pager .page-numbers.current, .sg-pager > span.current {
    background: var(--mint);
    border-color: var(--mint);
    color: var(--ink);
    box-shadow: 0 0 12px rgba(61, 255, 196, .5);
}
.sg-pager .page-numbers.dots { background: transparent; border-color: transparent; color: var(--muted); min-width: auto; }

/* ---------- Поиск ---------- */
.sg-search { display: flex; gap: .8rem; flex-wrap: wrap; max-width: 560px; }
.sg-search__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .75rem .9rem;
    background: var(--bg-dark);
    border: 3px solid var(--line);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .95rem;
    border-radius: 0;
}
.sg-search__field::placeholder { color: var(--muted); }
.sg-search__field:focus { border-color: var(--mint); outline: none; }
.sg-side .sg-search__btn { padding: .6em 1em; }

/* ---------- 404 ---------- */
.sg-404 {
    padding: 2.6rem 2.2rem;
    background: rgba(18, 10, 36, .9);
    border: 3px solid var(--pink);
    box-shadow: 0 0 18px rgba(255, 77, 157, .35);
    max-width: 820px;
}
.sg-404__code {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(5rem, 16vw, 9rem);
    line-height: 1;
    color: var(--mint);
    text-shadow: 6px 6px 0 var(--pink);
}
.sg-404__title { margin: .6rem 0 1rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.sg-404__text { color: var(--muted); max-width: 620px; }
.sg-404 .sg-search { margin: 1.6rem 0 2rem; }

/* ---------- Комментарии ---------- */
.sg-comments {
    margin-top: 2.4rem;
    padding: 2rem 2.2rem;
    background: rgba(18, 10, 36, .88);
    border: 3px solid var(--line);
}
.sg-comments__title { margin: 0 0 1.4rem; font-size: 1.6rem; }
.sg-comments__list, .sg-comments__list .children { list-style: none; margin: 0; padding: 0; }
.sg-comments__list .children { padding-inline-start: 1.6rem; border-inline-start: 3px dotted var(--line); }
.sg-comment__body {
    margin-bottom: 1.2rem;
    padding: 1.1rem 1.2rem;
    background: var(--bg-strip);
    border: 2px solid var(--line);
}
.sg-comment__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .6rem; }
.sg-comment__avatar { display: block; border: 2px solid var(--line); }
.sg-comment__author { font-weight: 700; color: var(--yellow); }
.sg-comment__date { font-size: .78rem; color: var(--muted); }
.sg-comment__wait { color: var(--pink); font-size: .85rem; }
.sg-comment__text p:last-child { margin-bottom: 0; }
.sg-comment__reply { margin-top: .6rem; font-size: .85rem; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.4rem; margin: 0 0 1rem; }
.comment-reply-title small { font-family: var(--font-mono); font-size: .8rem; margin-inline-start: .8rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form label { display: block; margin-bottom: .35rem; font-size: .85rem; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    background: var(--bg-dark);
    border: 3px solid var(--line);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: .95rem;
    border-radius: 0;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--mint); outline: none; }
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.sg-form-note { font-size: .85rem; color: var(--muted); }
.comments-pagination, .comment-navigation { margin: 1rem 0; }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- Подвал ---------- */
.sg-foot {
    background-color: var(--bg-dark);
    background-image: url("images/pixel-floor.svg");
    background-repeat: repeat-x;
    background-position: 0 100%;
    padding: 3rem 0 4.6rem;
    color: var(--text);
}
.sg-foot__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 3rem;
}
.sg-foot__col { min-width: 0; }
.sg-foot .sg-widget { margin-bottom: 1.4rem; color: var(--text); font-size: .9rem; }
.sg-foot .sg-widget__title { margin: 0 0 .8rem; font-size: 1.5rem; color: var(--text); }
.sg-foot .sg-widget p, .sg-foot .textwidget { color: var(--text); }
.sg-foot ul { list-style: none; margin: 0; padding: 0; }
.sg-foot li { margin-bottom: .45rem; }
.sg-foot a { color: var(--mint); font-size: .92rem; }
.sg-foot a:hover { color: var(--yellow); }
.sg-foot__copy {
    margin: 2rem 0 0;
    padding-top: 1.2rem;
    border-top: 2px dashed var(--line);
    font-size: .85rem;
    color: var(--muted);
}

/* ---------- Cookie ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    flex-wrap: wrap;
    max-width: 980px;
    margin-inline: auto;
    padding: 1.1rem 1.4rem;
    background: var(--bg-dark);
    color: var(--text);
    border: 3px solid var(--pink);
    box-shadow: 0 0 18px rgba(255, 77, 157, .4), 6px 6px 0 #000;
}
.cookie-banner__text { margin: 0; flex: 1 1 320px; font-size: .85rem; line-height: 1.5; color: var(--text); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .sg-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .sg-hero__lead { grid-column: 1 / -1; padding-bottom: 0; }
    .sg-hero__stats { padding-bottom: 2.5rem; }
    .sg-floors { background-image: none; }
    .sg-floors__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .sg-floors__list { order: -1; padding-bottom: 0; }
    .sg-floors__pic { padding-top: 1rem; }
    .sg-cards--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sg-band__grid { grid-template-columns: minmax(0, 1fr); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .sg-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sg-burger { display: inline-flex; }
    .sg-nav { flex-basis: 100%; display: none; }
    .sg-nav.is-open { display: block; }
    .sg-nav__list { flex-direction: column; gap: 0; border-top: 2px dashed var(--line); padding-top: .6rem; }
    .sg-nav__list a { padding: .6rem 0; }
}
@media (max-width: 600px) {
    .shell { width: 92%; }
    body { font-size: 14px; }
    .sg-top { padding: 2rem 0 1.2rem; }
    .sg-brand { flex-basis: 100%; }
    .sg-brand__mark { flex-basis: 52px; width: 52px; height: 52px; }
    .sg-brand__name { font-size: 1rem; }
    .sg-hero__grid { grid-template-columns: minmax(0, 1fr); padding-top: 1.6rem; }
    .sg-hero__lead { padding-bottom: .5rem; }
    .sg-hero__stats { flex-direction: row; justify-content: space-between; gap: 1rem; padding: 0 0 2rem; order: 3; }
    .sg-hero__stats b { font-size: 1.6rem; }
    .sg-hero__stats span { font-size: .78rem; }
    .sg-machine { max-width: 400px; }
    .sg-cards, .sg-cards--three, .layout-with-sidebar .sg-cards { grid-template-columns: minmax(0, 1fr); }
    .sg-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 2%; }
    .sg-scale { padding: 1.5rem 1.2rem 1.3rem; }
    .sg-tiles b { width: 52px; height: 52px; font-size: 1.8rem; }
    .sg-entry, .sg-comments, .sg-404 { padding: 1.4rem 1.2rem; }
    .sg-side .sg-widget { padding: 1.2rem 1.1rem; }
    .sg-foot__cols { grid-template-columns: minmax(0, 1fr); }
    .sg-postnav { grid-template-columns: minmax(0, 1fr); }
    .sg-postnav__link--next { grid-column: auto; }
    .cookie-banner { padding: 1rem 1.1rem; left: .5rem; right: .5rem; bottom: .5rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
