/* ============================================================
   IIMAG · NEWSPRINT — дизайн в стиле The New York Times
   Три темы: light (газета) · medium (вечерний выпуск) · dark (ночной)
   ============================================================ */
:root {
    --zoom: 1;
    --content-pad: 40px;
    --paper: #f9f8f5;
    --paper-2: #f1efe9;
    --ink: #121212;
    --ink-soft: #2e2e2e;
    --muted: #6b6b6b;
    --muted-2: #8a8a8a;
    --rule: #dcdcdc;
    --rule-strong: #121212;
    --accent: #326891;
    --kicker: #b71c1c;
    --emerald: #046a4a;

    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --serif-body: 'Lora', Georgia, 'Times New Roman', serif;
    --sans: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
    --black-letter: 'UnifrakturCook', 'Old English Text MT', serif;
}
html[data-theme="medium"] {
    --paper: #2a1a1f;
    --paper-2: #1e1216;
    --ink: #f2e4e0;
    --ink-soft: #d4c2bd;
    --muted: #9a8078;
    --muted-2: #7a625c;
    --rule: #4a2e34;
    --rule-strong: #e0ccc6;
    --accent: #d48ca0;
    --kicker: #e07070;
    --emerald: #4db08a;
}
html[data-theme="dark"] {
    --paper: #000000;
    --paper-2: #0d0d0d;
    --ink: #f2f2f2;
    --ink-soft: #c9c9c9;
    --muted: #8a8a8a;
    --muted-2: #666666;
    --rule: #262626;
    --rule-strong: #e6e6e6;
    --accent: #7ea8c4;
    --kicker: #e05252;
    --emerald: #4db08a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scrollbar-gutter: stable both-edges; }

body {
    font-family: var(--serif-body);
    font-size: 17px;
    line-height: 1.55;
    background: var(--paper);
    color: var(--ink);
    width: 100%;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
    max-width: calc(1280px / var(--zoom, 1));
    margin: 0 auto;
    padding: 0 calc(var(--content-pad, 40px) / var(--zoom, 1));
    position: relative;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    font-family: var(--sans);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 24px;
    flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--ink); text-decoration: none; }
.btn-subscribe {
    background: var(--ink);
    color: var(--paper) !important;
    padding: 5px 14px;
    border-radius: 3px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.btn-subscribe:hover { background: var(--accent); text-decoration: none; }
.icon-btn {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--rule);
    color: var(--muted); cursor: pointer; font-size: 14px;
    transition: 0.2s;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ============================================================
   MASTHEAD
   ============================================================ */
.masthead { padding: 32px 0 20px; }
.masthead-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}
.masthead-side {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.masthead-side.right { text-align: right; }
.masthead-logo {
    font-family: var(--black-letter);
    font-weight: 700;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 0.9;
    text-align: center;
    color: var(--ink);
    letter-spacing: -0.02em;
    display: block;
}
.masthead-logo:hover { text-decoration: none; }
.masthead-sub {
    text-align: center;
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 8px;
}

/* ============================================================
   SECTION NAV (меню по рубрикам)
   ============================================================ */
.section-nav { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }
.section-nav-inner {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    padding: 12px 0;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.section-nav a { color: var(--ink); }
.section-nav a:hover { color: var(--accent); text-decoration: none; }
.section-nav a.active { color: var(--accent); }

/* ============================================================
   HOME HERO (газетный лид)
   ============================================================ */
.home-hero { padding: 34px 0 26px; text-align: center; border-bottom: 1px solid var(--rule); }
.home-hero .kicker {
    font-family: var(--sans); font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--kicker); margin-bottom: 10px; display: block;
}
.home-hero h1 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 900px;
    margin: 0 auto 14px;
}
.home-hero .lede {
    font-family: var(--serif-body);
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 720px;
    margin: 0 auto 20px;
}
.home-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    border: 1px solid var(--rule-strong);
    background: var(--paper-2);
}
.home-search input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--serif-body);
    font-size: 16px;
    color: var(--ink);
}
.home-search input::placeholder { color: var(--muted-2); font-style: italic; }
.home-search button {
    padding: 0 22px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}
.home-search button:hover { background: var(--accent); }

/* ============================================================
   СЕКЦИИ (рубрики)
   ============================================================ */
section.block { padding: 32px 0; }
.section-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0;
    margin-bottom: 6px;
    color: var(--ink);
    position: relative;
}
.section-title::before,
.section-title::after {
    content: ''; position: absolute; top: 50%; width: 18%; height: 1px;
    background: var(--rule-strong);
}
.section-title::before { left: 0; }
.section-title::after { right: 0; }
.section-sub {
    text-align: center; font-family: var(--sans);
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 28px;
}
@media (max-width: 700px) {
    .section-title::before, .section-title::after { display: none; }
}

/* ============================================================
   ГРУППЫ-РУБРИКИ
   ============================================================ */
.services-group { margin-bottom: 34px; }
.services-group-title {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--kicker);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rule-strong);
    margin-bottom: 18px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0;
    border-top: 1px solid var(--rule);
}
.service-tile {
    display: flex;
    flex-direction: column;
    padding: 22px 20px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    color: inherit;
    transition: background 0.2s;
    min-height: 130px;
    justify-content: space-between;
    position: relative;
}
.service-tile:hover { background: var(--paper-2); text-decoration: none; }
.service-tile .tile-kicker {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.service-tile .tile-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    filter: grayscale(1) sepia(0.15);
    opacity: 0.9;
}
.service-tile .tile-name {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0;
}
.service-tile .tile-desc {
    font-family: var(--serif-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-soft);
    flex: 1;
}
.service-tile:hover .tile-name { color: var(--accent); }

/* ============================================================
   ХЛЕБНЫЕ КРОШКИ (рубрика)
   ============================================================ */
.breadcrumbs {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: var(--sans); font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted); padding: 16px 0;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); text-decoration: none; }
.breadcrumbs .sep { color: var(--muted-2); }
.breadcrumbs .current { color: var(--kicker); }

/* ============================================================
   SERVICE HEADER
   ============================================================ */
.service-header {
    display: block;
    padding: 4px 0 20px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 24px;
}
.service-header .service-kicker {
    font-family: var(--sans); font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--kicker); margin-bottom: 10px;
}
.service-header h1 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 12px;
}
.service-header .service-lede,
.service-header p {
    font-family: var(--serif-body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 720px;
}
.service-header .service-icon { display: none; }

/* ============================================================
   SERVICE TABS (как рубрики)
   ============================================================ */
.service-tabs {
    display: flex; gap: 0; flex-wrap: wrap;
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
    margin-bottom: 24px;
    font-family: var(--sans);
}
.service-tab {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    border-right: 1px solid var(--rule);
    transition: 0.2s;
}
.service-tab:last-child { border-right: none; }
.service-tab:hover { color: var(--ink); background: var(--paper-2); text-decoration: none; }
.service-tab.active { color: var(--paper); background: var(--ink); }
.service-tab.active:hover { color: var(--paper); background: var(--ink); }

/* ============================================================
   TERMINAL BOX (газетная колонка)
   ============================================================ */
.terminal-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    padding: 32px 28px;
    position: relative;
}
.terminal-box::before { content: none; }
.terminal-box h1 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(24px, 3.2vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin-bottom: 8px;
    text-align: left;
}
.terminal-box .subtitle {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 22px;
    text-align: left;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], textarea, select {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    padding: 12px 14px;
    font-family: var(--serif-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    outline: none;
    border-radius: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent);
}
input::placeholder, textarea::placeholder {
    color: var(--muted-2);
    font-style: italic;
}
select option { background: var(--paper); color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-group label {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--serif-body); font-size: 15px;
    color: var(--ink-soft); padding: 10px 12px;
    border: 1px solid var(--rule);
    background: var(--paper);
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
    margin: 0;
}
.checkbox-group label:hover { border-color: var(--ink); }
.checkbox-group input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    margin: 0;
}

/* ============================================================
   BUTTONS (NYT-style)
   ============================================================ */
.btn, .btn-primary, .btn-outline, .btn-full {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 24px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
}
.btn:hover, .btn-outline:hover {
    background: var(--ink); color: var(--paper);
    text-decoration: none;
}
.btn-primary {
    background: var(--ink); color: var(--paper);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn:disabled, .btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-full { width: 100%; }
.btn-all-services {
    align-self: flex-start;
    padding: 8px 18px;
    font-size: 11px;
    letter-spacing: 0.14em;
}

/* ============================================================
   CHAT
   ============================================================ */
.chat-messages {
    max-height: 420px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px;
    padding: 4px; margin-bottom: 18px;
}
.chat-msg {
    padding: 14px 18px;
    font-family: var(--serif-body);
    font-size: 16px;
    line-height: 1.6;
    border: 1px solid var(--rule);
    background: var(--paper);
    max-width: 88%;
    word-wrap: break-word;
}
.chat-msg.user {
    align-self: flex-end;
    border-color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 14px;
    letter-spacing: 0.02em;
}
.chat-msg.ai { align-self: flex-start; }
.chat-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.option-btn {
    background: transparent; border: 1px solid var(--rule-strong);
    color: var(--ink-soft); padding: 6px 14px;
    font-family: var(--sans); font-size: 11px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer; transition: 0.2s; border-radius: 3px;
}
.option-btn:hover { background: var(--ink); color: var(--paper); }
.marketplace-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.marketplace-links a {
    padding: 7px 14px;
    border: 1px solid var(--rule);
    font-family: var(--sans); font-size: 12px;
    color: var(--ink-soft);
    transition: 0.2s;
}
.marketplace-links a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.typing {
    display: inline-block; width: 4px; height: 14px;
    background: var(--ink); animation: blink 0.9s step-end infinite;
    vertical-align: middle; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
.chat-input-row { display: flex; gap: 10px; }
.chat-input-row input { flex: 1; }

/* ============================================================
   METRICS / RECOMMENDATIONS
   ============================================================ */
.metric-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0; margin: 20px 0;
    border-top: 1px solid var(--rule);
}
.metric {
    padding: 18px 16px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    text-align: left;
}
.metric .value {
    font-family: var(--serif);
    font-size: 26px; font-weight: 700;
    color: var(--ink); line-height: 1.1;
    margin-bottom: 6px;
}
.metric .value.positive { color: var(--emerald); }
.metric .value.negative { color: var(--kicker); }
.metric .value.warning { color: #b8860b; }
.metric .label {
    font-family: var(--sans); font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted);
}

.rec-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule);
    padding: 16px 0;
    margin-bottom: 0;
}
.rec-item:last-child { border-bottom: none; }
.rec-item h4 {
    font-family: var(--serif);
    font-size: 18px; font-weight: 700;
    color: var(--ink); margin-bottom: 6px;
}
.rec-item p {
    font-family: var(--serif-body);
    font-size: 15px; line-height: 1.65;
    color: var(--ink-soft);
    white-space: pre-line;
}
.meaning-box {
    font-family: var(--serif-body);
    font-size: 17px; line-height: 1.6;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    padding: 12px 0 12px 18px;
    margin: 18px 0;
    font-style: italic;
}

/* ============================================================
   VERDICT (Оракул)
   ============================================================ */
.verdict-block {
    text-align: center;
    padding: 26px 20px;
    border: 1px solid var(--rule-strong);
    margin-bottom: 22px;
    background: var(--paper);
}
.verdict-block.correct { border-color: var(--emerald); }
.verdict-block.risky { border-color: #b8860b; }
.verdict-block.wrong { border-color: var(--kicker); }
.verdict-block.unclear { border-color: var(--muted); }
.verdict-label {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
    color: var(--ink);
}
.verdict-block.correct .verdict-label { color: var(--emerald); }
.verdict-block.risky .verdict-label { color: #b8860b; }
.verdict-block.wrong .verdict-label { color: var(--kicker); }
.score-bar {
    width: 100%; height: 4px;
    background: var(--rule);
    overflow: hidden; margin: 14px 0;
}
.score-fill { height: 100%; background: var(--ink); transition: width 0.8s ease; }
.score-num {
    font-family: var(--sans); font-size: 11px;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--muted);
}
.reasoning {
    font-family: var(--serif-body);
    font-size: 17px; line-height: 1.65;
    color: var(--ink-soft);
    padding: 16px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin-bottom: 18px;
}
.reasoning strong { color: var(--ink); font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.list-box { padding: 4px 0; }
.list-box h4 {
    font-family: var(--sans); font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--kicker); margin-bottom: 10px;
}
.list-box ul { list-style: none; }
.list-box li {
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--serif-body);
    font-size: 15px; line-height: 1.6;
    color: var(--ink-soft);
}
.list-box li:last-child { border-bottom: none; }
.list-box li::before { content: none; }
.alt-card {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
}
.alt-card:last-child { border-bottom: none; }
.alt-card h4 {
    font-family: var(--serif);
    font-size: 18px; font-weight: 700;
    color: var(--ink); margin-bottom: 6px;
}
.alt-card p { font-family: var(--serif-body); font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.disclaimer-box {
    border: 1px solid var(--kicker);
    background: transparent;
    padding: 16px 18px;
    margin-top: 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.disclaimer-box .icon { font-size: 1.4rem; color: var(--kicker); flex-shrink: 0; }
.disclaimer-box p {
    font-family: var(--sans); font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--kicker); line-height: 1.5; margin: 0;
}

/* ============================================================
   STORY
   ============================================================ */
.story-output {
    max-width: 720px;
    margin: 26px auto;
    padding: 28px 24px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
}
.story-output::before { content: none; }
.story-title {
    font-family: var(--serif);
    font-size: 34px; font-weight: 900;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 10px;
}
.story-meta {
    display: flex; gap: 12px; flex-wrap: wrap;
    font-family: var(--sans); font-size: 11px;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 16px;
}
.story-meta span::after { content: ' ·'; color: var(--muted-2); }
.story-meta span:last-child::after { content: ''; }
.story-summary {
    font-family: var(--serif-body);
    font-size: 18px; font-style: italic; line-height: 1.55;
    color: var(--ink-soft);
    padding: 4px 0 16px;
    border: none;
    background: transparent;
    margin: 0 0 16px;
}
.story-text {
    font-family: var(--serif-body);
    font-size: 17px; line-height: 1.75;
    color: var(--ink);
    white-space: pre-wrap;
    max-height: 520px;
    overflow-y: auto;
    padding: 8px 0;
}
.story-text::first-letter {
    font-family: var(--serif);
    font-size: 3.4em;
    line-height: 0.9;
    float: left;
    padding: 6px 10px 0 0;
    font-weight: 700;
}
.export-buttons {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
}

/* ============================================================
   PROFILE / DASHBOARD
   ============================================================ */
.rec-card {
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
    background: transparent;
}
.rec-card .rec-icon { font-size: 1.4rem; margin-right: 8px; filter: grayscale(0.8); }
.rec-card .rec-title {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.005em;
}
.rec-card .rec-text {
    font-family: var(--serif-body);
    font-size: 16px; line-height: 1.6;
    color: var(--ink-soft);
    margin-top: 10px;
}
.rec-card .rec-text strong { color: var(--ink); }
.rec-card .rec-emphasis {
    font-family: var(--serif-body);
    font-style: italic;
    font-size: 16px;
    color: var(--accent);
    margin-top: 12px;
    padding: 0;
    border: none;
    background: transparent;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state .icon { font-size: 3rem; display: block; margin-bottom: 16px; filter: grayscale(1); opacity: 0.6; }
.empty-state h3 {
    font-family: var(--serif);
    font-size: 24px; font-weight: 700;
    color: var(--ink); margin-bottom: 8px;
}
.empty-state a { color: var(--accent); text-decoration: underline; }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed; inset: 0;
    background: color-mix(in srgb, var(--ink) 70%, transparent);
    display: none; align-items: center; justify-content: center;
    z-index: 2000; padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    padding: 34px 30px 28px;
    max-width: 420px; width: 100%;
    position: relative;
}
.modal-content .close {
    position: absolute; top: 10px; right: 14px;
    background: none; border: none;
    color: var(--muted); font-size: 22px;
    cursor: pointer; font-family: var(--serif);
}
.modal-content .close:hover { color: var(--ink); }
.modal-logo {
    font-family: var(--black-letter);
    font-size: 44px;
    text-align: center;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 6px;
}
.modal-tagline {
    text-align: center;
    font-family: var(--sans); font-size: 10px;
    letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 22px;
}
.modal-content h2 {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    color: var(--ink);
    margin-bottom: 18px;
    text-align: center;
}
.modal-content input { margin-bottom: 10px; }
.modal-alt {
    text-align: center; margin-top: 16px;
    font-family: var(--serif-body); font-size: 14px;
    color: var(--muted);
}
.modal-alt a { color: var(--accent); text-decoration: underline; }

/* ============================================================
   LOADING
   ============================================================ */
.loading {
    display: none; text-align: center; padding: 34px 20px;
    font-family: var(--sans); font-size: 11px;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted);
}
.loading.on { display: block; }
.loading::after { content: '…'; animation: blink 1s step-end infinite; }

/* ============================================================
   SCROLL TOP + FONT SIZER
   ============================================================ */
.scroll-top {
    position: fixed; bottom: 24px; right: 24px;
    width: 44px; height: 44px;
    background: var(--paper-2);
    border: 1px solid var(--ink);
    color: var(--ink);
    font-size: 16px; cursor: pointer;
    opacity: 0; pointer-events: none;
    transition: 0.3s; z-index: 999;
    font-family: var(--serif);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--ink); color: var(--paper); }
.font-sizer {
    position: fixed; bottom: 24px; left: 24px;
    display: flex;
    border: 1px solid var(--ink);
    background: var(--paper-2);
    z-index: 999;
    font-family: var(--sans);
}
.font-sizer button {
    background: transparent; border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    cursor: pointer;
    border-right: 1px solid var(--rule);
    text-transform: uppercase;
}
.font-sizer button:last-child { border-right: none; }
.font-sizer button:hover { color: var(--ink); background: var(--paper); }
.font-sizer button.active { background: var(--ink); color: var(--paper); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    border-top: 2px solid var(--rule-strong);
    margin-top: 60px;
    padding: 36px 0 44px;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--muted);
    background: var(--paper);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.footer-col h5 {
    font-family: var(--sans);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    padding: 4px 0;
    font-family: var(--serif-body);
    font-size: 14px;
    color: var(--ink-soft);
}
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom {
    border-top: 1px solid var(--rule);
    margin-top: 32px;
    padding-top: 22px;
    padding-bottom: 4px;
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 18px;
    font-size: 11px;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted);
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */
@media (max-width: 960px) {
    .container { padding: 0 20px; }
    .lead-grid, .row { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --content-pad: 20px; }
    body { font-size: 16px; }
    .topbar-inner { padding: 8px 0; }
    .masthead { padding: 20px 0 12px; }
    .masthead-inner { grid-template-columns: 1fr; text-align: center; }
    .masthead-side.right { text-align: center; }
    .masthead-side.left { text-align: center; margin-bottom: 6px; }
    .masthead-side.right { margin-top: 6px; }
    .masthead-logo { font-size: 56px; }
    .section-nav-inner { gap: 14px; font-size: 11px; padding: 8px 0; }
    .home-hero { padding: 24px 0 20px; }
    .home-hero h1 { font-size: 30px; }
    .home-hero .lede { font-size: 17px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .checkbox-group { grid-template-columns: 1fr; }
    input, textarea, select { font-size: 16px; min-height: 44px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric .value { font-size: 22px; }
    .terminal-box { padding: 22px 18px; }
    .story-title { font-size: 26px; }
    .service-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .service-tab { padding: 10px 14px; font-size: 10px; white-space: nowrap; }
    .modal { padding: 12px; align-items: flex-end; }
    .modal-content { padding: 26px 20px; max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
    .scroll-top { bottom: 80px; right: 16px; width: 40px; height: 40px; }
    .font-sizer { bottom: 16px; left: 16px; }

    /* мобильное меню-панель */
    .nav-toggle {
        display: inline-flex; flex-direction: column;
        justify-content: center; align-items: center; gap: 4px;
        width: 40px; height: 40px;
        background: transparent; border: 1px solid var(--ink);
        color: var(--ink); cursor: pointer; padding: 0;
    }
    .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); transition: 0.3s; }
    .nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    .nav-menu {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(84vw, 340px);
        background: var(--paper);
        border-left: 1px solid var(--ink);
        padding: 70px 22px 22px;
        display: flex; flex-direction: column;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(.4,0,.2,1);
        overflow-y: auto; z-index: 1100;
    }
    .nav-menu.open { transform: translateX(0); }
    .nav-menu a {
        display: flex; align-items: center;
        min-height: 48px;
        padding: 12px 4px;
        border-bottom: 1px solid var(--rule);
        font-family: var(--sans); font-size: 13px;
        font-weight: 600; letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--ink);
    }
    .nav-backdrop {
        position: fixed; inset: 0;
        background: color-mix(in srgb, var(--ink) 60%, transparent);
        opacity: 0; pointer-events: none;
        transition: opacity 0.3s; z-index: 1090;
    }
    .nav-backdrop.open { opacity: 1; pointer-events: auto; }
}
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .topbar-left span { display: none; }
    .masthead-logo { font-size: 44px; }
    .section-nav-inner { gap: 10px; font-size: 10px; }
    .services-grid { grid-template-columns: 1fr; }
    .home-hero h1 { font-size: 26px; }
    .footer-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) {
    .nav-toggle { display: none !important; }
    .nav-backdrop { display: none !important; }
    .nav-menu {
        display: flex; gap: 22px; align-items: center;
        position: static; transform: none; padding: 0;
        background: transparent; border: none; width: auto;
        flex-direction: row;
    }
    .nav-menu a {
        font-family: var(--sans); font-size: 11px;
        font-weight: 600; letter-spacing: 0.1em;
        text-transform: uppercase; color: var(--muted);
        min-height: auto; padding: 0;
        border: none;
    }
    .nav-menu a:hover { color: var(--ink); }
    .nav-menu a.active { color: var(--ink); }
}

/* Скрытие хедера больше не используется */

/* Скролл */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::selection { background: var(--ink); color: var(--paper); }

strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   Однотонное сердечко в "Сделано с ♥ для людей"
   ============================================================ */
.masthead-side.right,
.footer-bottom span:last-child {
    font-family: var(--sans);
}
/* Само ♥ будет цвета текущего текста (var(--muted) в шапке,
   var(--muted) в футере). Если нужно явно задать: */
.footer-bottom span:last-child {
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* ============================================================
   НОВОСТНАЯ ЛЕНТА (газетный блок на главной)
   ============================================================ */
.news-section {
    padding: 36px 0 34px;
    border-bottom: 1px solid var(--rule);
}
.news-section-head {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--rule);
}
.news-section-kicker {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kicker);
    margin-bottom: 8px;
}
.news-section-title {
    font-family: var(--serif);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--ink);
    letter-spacing: -0.005em;
}

.kicker {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--kicker);
    margin-bottom: 10px;
}
.byline {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 12px;
}

/* Лид-грид: большая история + 2 боковые */
.lead-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--rule);
}
.lead h2 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(30px, 3.8vw, 46px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 14px;
}
.lead .lede {
    font-family: var(--serif-body);
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: 4px;
}
.side-story {
    padding-left: 26px;
    border-left: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
}
.side-story h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.005em;
    color: var(--ink);
    margin-bottom: 10px;
}
.side-story p {
    font-family: var(--serif-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    flex: 1;
}

/* Ряд из трёх новостей */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 30px 0;
    border-bottom: 1px solid var(--rule);
}
.row > article {
    padding: 0 24px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
}
.row > article:first-child { padding-left: 0; }
.row > article:last-child { padding-right: 0; border-right: none; }
.row h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 10px;
}
.row p {
    font-family: var(--serif-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    flex: 1;
}
.thumb {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
    font-style: italic;
}

/* Обзоры */
.opinion { padding: 30px 0 0; }
.opinion-head {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule-strong);
}
.opinion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.op-card {
    display: flex;
    flex-direction: column;
    padding-right: 20px;
    border-right: 1px solid var(--rule);
}
.op-card:last-child { border-right: none; padding-right: 0; }
.op-author {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.op-card h4 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    flex: 1;
}

/* Кнопка «Попробовать» внутри новости */
.news-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    margin-top: 16px;
    padding: 9px 16px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: 0.2s;
    cursor: pointer;
}
.news-btn:hover {
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
}

/* Адаптив */
@media (max-width: 960px) {
    .lead-grid { grid-template-columns: 1fr; gap: 24px; }
    .side-story {
        padding-left: 0;
        border-left: none;
        padding-top: 20px;
        border-top: 1px solid var(--rule);
    }
    .row { grid-template-columns: 1fr; padding: 24px 0; }
    .row > article {
        padding: 20px 0;
        border-right: none;
        border-bottom: 1px solid var(--rule);
    }
    .row > article:last-child { border-bottom: none; }
    .opinion-grid { grid-template-columns: 1fr 1fr; }
    .op-card {
        padding-right: 0;
        border-right: none;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--rule);
    }
    .op-card:last-child { border-bottom: none; padding-bottom: 0; }
}
@media (max-width: 560px) {
    .opinion-grid { grid-template-columns: 1fr; }
    .lead h2 { font-size: 26px; }
    .side-story h3, .row h3 { font-size: 19px; }
}

/* ============================================================
   SVG-иллюстрации в новостях
   ============================================================ */
.thumb-svg {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    color: var(--ink);
    background: var(--paper-2);
    border: 1px solid var(--rule);
    padding: 12px;
    margin-bottom: 16px;
    display: block;
    transition: background 0.3s, color 0.3s;
}
.row > article:hover .thumb-svg {
    background: var(--paper);
}
html[data-theme="dark"] .thumb-svg,
html[data-theme="medium"] .thumb-svg {
    background: var(--paper-2);
    color: var(--ink);
    opacity: 0.92;
}
/* Мобильная адаптация */
@media (max-width: 960px) {
    .thumb-svg { padding: 16px; }
}

/* ============================================================
   Кнопка «Создать продукт» в топбаре
   ============================================================ */



/* ============================================================
   Блок «Пользовательские продукты» на главной
   ============================================================ */
.user-products-section {
    padding: 34px 0;
    border-bottom: 1px solid var(--rule);
}
.user-products-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rule-strong);
    flex-wrap: wrap;
}
.user-products-head h2 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.005em;
}
.user-products-head .hint {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}
.user-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0;
    border-top: 1px solid var(--rule);
}
.user-product-card {
    display: flex;
    flex-direction: column;
    padding: 22px 20px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    min-height: 150px;
    justify-content: space-between;
}
.user-product-card:hover {
    background: var(--paper-2);
    text-decoration: none;
}
.user-product-card .upk-kicker {
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.user-product-card .upk-name {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 8px;
}
.user-product-card:hover .upk-name { color: var(--accent); }
.user-product-card .upk-desc {
    font-family: var(--serif-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-soft);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.user-product-card .upk-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    gap: 8px;
    flex-wrap: wrap;
}
.upk-price {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.upk-price.free { color: var(--emerald); }
.upk-price.paid { color: var(--kicker); }
.upk-author {
    font-family: var(--serif-body);
    font-size: 12px;
    font-style: italic;
    color: var(--muted);
}

/* ============================================================
   Новостная лента «от пользователей» (над стандартной)
   ============================================================ */
.custom-news-strip {
    padding: 0 0 30px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 30px;
}
.custom-news-strip .strip-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rule);
    flex-wrap: wrap;
}
.custom-news-strip .strip-head h3 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}
.strip-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.strip-card {
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--kicker);
    padding-left: 16px;
}
.strip-card .byline { margin-top: 8px; }
.strip-card h3 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: var(--ink);
    margin: 8px 0 10px;
}
.strip-card p {
    font-family: var(--serif-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: 12px;
    flex: 1;
}

/* ============================================================
   Бейдж цены на странице продукта
   ============================================================ */
.product-price-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.product-price-badge.free { color: var(--emerald); }
.product-price-badge.paid { color: var(--kicker); }

/* Платные продукты в news-btn */
.news-btn.paid-btn {
    opacity: 0.55;
    cursor: not-allowed;
    background: transparent !important;
    color: var(--kicker) !important;
    border-color: var(--kicker) !important;
}

@media (max-width: 768px) {
    
    .user-products-head { flex-direction: column; align-items: flex-start; }
    .user-products-head h2 { font-size: 22px; }
}

/* ============================================================
   РЕЖИМ РАЗРАБОТЧИКА — Matrix-модалка
   ============================================================ */
.modal.dev-mode {
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.modal.dev-mode.open {
    display: flex;
    opacity: 1;
    animation: devFadeIn 0.4s ease forwards;
}
@keyframes devFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to   { opacity: 1; backdrop-filter: blur(6px); }
}

.modal.dev-mode .modal-content {
    background: #050505;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Space Mono', 'Courier New', monospace;
    border-radius: 0;
    padding: 34px 30px 28px;
    max-width: 540px;
    box-shadow:
        0 0 40px rgba(0, 255, 65, 0.35),
        0 0 100px rgba(0, 255, 65, 0.15),
        inset 0 0 60px rgba(0, 255, 65, 0.04);
    position: relative;
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    animation: devModalIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.05) 0.1s forwards;
}
@keyframes devModalIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Scanline сверху */
.modal.dev-mode .modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, #00ff41, transparent);
    animation: devScan 3s linear infinite;
}
@keyframes devScan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Сетка фона */
.modal.dev-mode .modal-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,255,65,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,65,0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}
.modal.dev-mode .modal-content > * { position: relative; z-index: 1; }

.modal.dev-mode .modal-logo {
    font-family: 'Space Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #00ff41;
    text-shadow: 0 0 15px #00ff41, 0 0 30px rgba(0,255,65,0.4);
    text-align: left;
    margin-bottom: 6px;
    animation: devGlitch 5s infinite;
}
@keyframes devGlitch {
    0%, 100% { transform: skew(0,0); }
    5% { transform: skew(-1deg, 0.5deg); text-shadow: 2px 0 #ff0066, -2px 0 #0066ff; }
    10% { transform: skew(0,0); }
}
.modal.dev-mode .modal-tagline {
    text-align: left;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(0, 255, 65, 0.55);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(0, 255, 65, 0.3);
}
.modal.dev-mode .modal-content h2 {
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00ff41;
    text-align: left;
    margin-bottom: 22px;
}
.modal.dev-mode .modal-content h2::before {
    content: '> ';
    color: #00ff41;
    opacity: 0.7;
}

.modal.dev-mode .form-group { margin-bottom: 18px; }
.modal.dev-mode .form-group label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(0, 255, 65, 0.7);
    margin-bottom: 8px;
    display: block;
}
.modal.dev-mode .form-group label::before {
    content: ':: ';
    opacity: 0.6;
}
.modal.dev-mode input[type="text"],
.modal.dev-mode input[type="number"],
.modal.dev-mode textarea {
    width: 100%;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid rgba(0, 255, 65, 0.35);
    color: #00ff41;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    padding: 11px 14px;
    border-radius: 0;
    outline: none;
    transition: all 0.2s;
    caret-color: #00ff41;
}
.modal.dev-mode input::placeholder,
.modal.dev-mode textarea::placeholder {
    color: rgba(0, 255, 65, 0.28);
    font-style: normal;
}
.modal.dev-mode input:focus,
.modal.dev-mode textarea:focus {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3), inset 0 0 20px rgba(0, 255, 65, 0.05);
    background: rgba(0, 255, 65, 0.06);
}
.modal.dev-mode textarea { resize: vertical; min-height: 110px; }

.modal.dev-mode .btn,
.modal.dev-mode .btn-primary {
    background: transparent;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.modal.dev-mode .btn:hover,
.modal.dev-mode .btn-primary:hover {
    background: #00ff41;
    color: #050505;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.6), 0 0 60px rgba(0, 255, 65, 0.3);
    text-shadow: none;
}
.modal.dev-mode .btn:disabled,
.modal.dev-mode .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
    color: #00ff41;
}

.modal.dev-mode .close {
    color: #00ff41;
    font-family: 'Space Mono', monospace;
    font-size: 22px;
    opacity: 0.6;
    transition: all 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.modal.dev-mode .close:hover {
    opacity: 1;
    text-shadow: 0 0 15px #00ff41;
    transform: scale(1.1);
}

.modal.dev-mode .hint {
    color: rgba(0, 255, 65, 0.5) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: 'Space Mono', monospace !important;
    font-size: 11px !important;
}

/* ============================================================
   ТОСТ «Режим разработчика активирован/деактивирован»
   ============================================================ */
.dev-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: #050505;
    border: 2px solid #00ff41;
    color: #00ff41;
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 14px 28px;
    z-index: 9999;
    opacity: 0;
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.4), 0 0 80px rgba(0, 255, 65, 0.15);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.05);
    white-space: nowrap;
}
.dev-toast::before {
    content: '▮ ';
    opacity: 0.8;
    animation: devBlink 1s step-end infinite;
}
@keyframes devBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.dev-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
    .dev-toast { font-size: 10px; letter-spacing: 2px; padding: 12px 18px; max-width: 90vw; white-space: normal; text-align: center; }
}

/* ============================================================
   Платные продукты — доступны, но с пометкой «Скоро»
   ============================================================ */
.upk-price.paid::after {
    content: ' · скоро';
    opacity: 0.7;
    font-weight: 400;
}
.news-btn.paid-btn {
    opacity: 1 !important;
    cursor: pointer !important;
    color: var(--ink) !important;
    border-color: var(--ink) !important;
    background: transparent !important;
}
.news-btn.paid-btn:hover {
    background: var(--ink) !important;
    color: var(--paper) !important;
}
.news-btn.paid-btn::after {
    content: ' · скоро станет платным';
    opacity: 0.55;
    font-size: 9px;
    letter-spacing: 0.05em;
    margin-left: 6px;
    text-transform: lowercase;
    font-weight: 400;
}
.product-price-badge.paid::after {
    content: ' · скоро';
    opacity: 0.6;
    font-weight: 400;
}

/* ============================================================
   DEV MODE v2 — адаптив, dim для шапки, кнопка выхода
   ============================================================ */

/* 1. При активном dev-режиме — весь верх сайта гаснет */
body.dev-mode-active .topbar,
body.dev-mode-active .masthead-wrap,
body.dev-mode-active header,
body.dev-mode-active .section-nav {
    filter: brightness(0.25) saturate(0.3);
    pointer-events: none;
    transition: filter 0.4s ease;
}
body.dev-mode-active .topbar { background: #000 !important; }
body.dev-mode-active .masthead-wrap { background: #000 !important; }

/* 2. Модалка — резиновая, влезает на любом экране и zoom */
.modal.dev-mode {
    padding: clamp(8px, 2vw, 24px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.modal.dev-mode .modal-content {
    width: clamp(280px, 92vw, 560px) !important;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(20px, 4vw, 34px) clamp(16px, 3.5vw, 30px) clamp(18px, 3vw, 28px);
    scrollbar-width: thin;
    scrollbar-color: #00ff41 rgba(0,255,65,0.1);
}
.modal.dev-mode .modal-content::-webkit-scrollbar { width: 6px; }
.modal.dev-mode .modal-content::-webkit-scrollbar-track { background: rgba(0,255,65,0.05); }
.modal.dev-mode .modal-content::-webkit-scrollbar-thumb { background: #00ff41; }

/* На очень маленьких экранах — прижать к низу, как bottom-sheet */
@media (max-width: 520px) {
    .modal.dev-mode { align-items: flex-end; padding: 0; }
    .modal.dev-mode .modal-content {
        width: 100% !important;
        max-height: 92vh;
        max-height: 92dvh;
        border-left: none;
        border-right: none;
        border-bottom: none;
        animation: devSheetIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.05) 0.1s forwards;
    }
    @keyframes devSheetIn {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }
}

/* 3. Кнопка «Выход» внизу модалки */
.dev-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed rgba(0, 255, 65, 0.3);
    flex-wrap: wrap;
}
.dev-actions .btn { flex: 1 1 120px; }
.dev-exit-btn {
    background: transparent !important;
    border: 2px solid rgba(0, 255, 65, 0.5) !important;
    color: rgba(0, 255, 65, 0.85) !important;
}
.dev-exit-btn:hover {
    background: rgba(255, 0, 0, 0.08) !important;
    border-color: #ff2a2a !important;
    color: #ff2a2a !important;
    box-shadow: 0 0 25px rgba(255, 42, 42, 0.3) !important;
}
@media (max-width: 480px) {
    .dev-actions { flex-direction: column; }
    .dev-actions .btn { width: 100%; flex: 1 1 auto; }
}

/* 4. Кнопка «Создать продукт» в шапке — над логотипом */

.btn-create-product:hover {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}
.masthead-cta {
    text-align: center;
    margin-bottom: 14px;
}
@media (max-width: 768px) {
    .masthead-cta { margin-bottom: 10px; }
    
}
@media (max-width: 480px) {
    .btn-create-product { font-size: 9px; padding: 5px 10px; }
}

/* 5. Убираем старую кнопку из topbar-right (если где-то осталась) */

/* 6. Компактный topbar на очень маленьких — не разъезжается */
@media (max-width: 520px) {
    .topbar-inner { gap: 8px; }
    .topbar-left { font-size: 10px; }
    .topbar-right { gap: 6px; }
    .topbar-right .icon-btn { width: 34px; height: 34px; }
    .topbar-right .btn-subscribe { padding: 6px 12px; font-size: 10px; letter-spacing: 0.06em; }
}

/* ============================================================
   DEV MODE v3 — фиксы zoom, topbar, кнопок, эффект печати
   ============================================================ */

/* 1. Topbar перестаёт быть sticky при dev-режиме — не закрывает окно */
body.dev-mode-active .topbar {
    position: static !important;
    box-shadow: none !important;
}

/* 2. Модалка: компенсация zoom для ширины и высоты */
.modal.dev-mode {
    z-index: 20000 !important;
    padding: 8px;
}
.modal.dev-mode .modal-content {
    width: calc(min(560px, 92vw) / var(--zoom, 1)) !important;
    max-width: none !important;
    max-height: calc(96vh / var(--zoom, 1)) !important;
    max-height: calc(96dvh / var(--zoom, 1)) !important;
    padding: calc(24px / var(--zoom, 1)) calc(22px / var(--zoom, 1)) 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 3. Форма внутри — flex, с прокруткой посередине и sticky кнопками */
.modal.dev-mode form#createProductForm {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.modal.dev-mode .form-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #00ff41 rgba(0,255,65,0.1);
}
.modal.dev-mode .form-scroll::-webkit-scrollbar { width: 6px; }
.modal.dev-mode .form-scroll::-webkit-scrollbar-thumb { background: #00ff41; }

/* Sticky-низ модалки с кнопками */
.modal.dev-mode .dev-actions {
    position: relative;
    flex-shrink: 0;
    background: #050505;
    padding: calc(14px / var(--zoom, 1)) 0 calc(18px / var(--zoom, 1));
    margin-top: 0;
    border-top: 1px dashed rgba(0, 255, 65, 0.3);
    box-shadow: 0 -12px 20px #050505;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.modal.dev-mode .dev-actions .btn {
    flex: 1 1 120px;
    padding: calc(12px / var(--zoom, 1)) 16px !important;
    font-size: calc(12px / var(--zoom, 1)) !important;
}

/* 4. Компактнее поля и заголовки при zoom */
.modal.dev-mode .modal-content h2 { font-size: calc(14px / var(--zoom, 1)) !important; margin-bottom: calc(16px / var(--zoom, 1)) !important; }
.modal.dev-mode .modal-logo { font-size: calc(26px / var(--zoom, 1)) !important; }
.modal.dev-mode .modal-tagline { font-size: calc(9px / var(--zoom, 1)) !important; margin-bottom: calc(16px / var(--zoom, 1)) !important; padding-bottom: calc(10px / var(--zoom, 1)) !important; }
.modal.dev-mode .form-group { margin-bottom: calc(14px / var(--zoom, 1)) !important; }
.modal.dev-mode .form-group label { font-size: calc(10px / var(--zoom, 1)) !important; margin-bottom: calc(6px / var(--zoom, 1)) !important; }
.modal.dev-mode input,
.modal.dev-mode textarea { font-size: calc(13px / var(--zoom, 1)) !important; padding: calc(10px / var(--zoom, 1)) calc(12px / var(--zoom, 1)) !important; }
.modal.dev-mode textarea { min-height: calc(90px / var(--zoom, 1)) !important; }
.modal.dev-mode .close { font-size: calc(20px / var(--zoom, 1)) !important; }

/* 5. Мобильные — bottom-sheet, но с компенсацией */
@media (max-width: 520px) {
    .modal.dev-mode .modal-content {
        width: 100% !important;
        max-height: calc(94vh / var(--zoom, 1)) !important;
        max-height: calc(94dvh / var(--zoom, 1)) !important;
    }
}

/* ============================================================
   ОВЕРЛЕЙ ЭФФЕКТА ПЕЧАТИ
   ============================================================ */
.dev-typing-overlay {
    position: fixed;
    inset: 0;
    z-index: 19999;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.dev-typing-overlay.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.dev-typing-inner {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: clamp(14px, 2.4vw, 22px);
    color: #00ff41;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    padding: 0 24px;
    text-shadow: 0 0 20px #00ff41, 0 0 40px rgba(0, 255, 65, 0.4);
    max-width: 900px;
    white-space: pre-wrap;
    word-break: break-word;
}
.dev-typing-text::after {
    content: '▮';
    margin-left: 4px;
    animation: devBlink 0.7s step-end infinite;
    opacity: 1;
}
.dev-typing-overlay.done .dev-typing-text::after {
    animation: none;
    opacity: 0;
}
@keyframes devBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* На мобильных эффект попроще */
@media (max-width: 520px) {
    .dev-typing-inner { font-size: 13px; letter-spacing: 2px; }
}

/* 6. Прячем кнопку из masthead-cta (если где-то осталась) */
.masthead-cta { display: none; }

/* ============================================================
   Подсветка только что созданного продукта
   ============================================================ */
@keyframes newProductPulse {
    0%   { box-shadow: 0 0 0 0 rgba(4, 106, 74, 0.7); border-color: var(--emerald); }
    50%  { box-shadow: 0 0 0 12px rgba(4, 106, 74, 0); border-color: var(--emerald); }
    100% { box-shadow: 0 0 0 0 rgba(4, 106, 74, 0); border-color: var(--emerald); }
}
@keyframes newProductBg {
    0%   { background: rgba(4, 106, 74, 0.15); }
    100% { background: var(--paper); }
}
.user-product-card.is-new {
    border-color: var(--emerald) !important;
    animation: newProductPulse 1.2s ease-out 3, newProductBg 3.5s ease-out;
    position: relative;
    z-index: 2;
}
.user-product-card.is-new::before {
    content: '★ НОВОЕ';
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--paper);
    background: var(--emerald);
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 3;
    animation: newProductBg 3.5s ease-out;
}

/* То же для strip-card в новостях */
.strip-card.is-new {
    animation: newProductPulse 1.2s ease-out 3;
    border-left-color: var(--emerald) !important;
}

/* Мобильные — не такое навязчивое */
@media (max-width: 520px) {
    .user-product-card.is-new { animation: newProductPulse 1.2s ease-out 2; }
}

/* ============================================================
   СЧЁТЧИК ИИ-ПРОДУКТОВ (под логотипом)
   ============================================================ */
.iimag-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    flex-wrap: wrap;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.counter-item {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
}
.counter-item.highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.counter-value {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1;
    min-width: 1.3ch;
    text-align: center;
    display: inline-block;
    transition: color 0.3s;
}
.counter-value.bump {
    animation: counterBump 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.05);
}
@keyframes counterBump {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.3); color: var(--emerald); }
    100% { transform: scale(1); }
}
.counter-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1;
}
.counter-sep {
    color: var(--rule-strong);
    opacity: 0.35;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.counter-item.highlight .counter-value,
.counter-item.highlight .counter-label {
    color: var(--emerald);
}
.live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--emerald), 0 0 16px rgba(4, 106, 74, 0.4);
    animation: livePulse 1.7s ease-in-out infinite;
    flex-shrink: 0;
    align-self: center;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--emerald), 0 0 16px rgba(4, 106, 74, 0.4); }
    50%      { opacity: 0.45; box-shadow: 0 0 3px var(--emerald), 0 0 6px rgba(4, 106, 74, 0.2); }
}
@media (max-width: 640px) {
    .iimag-counter {
        gap: 10px;
        margin-top: 12px;
        padding-top: 10px;
        max-width: 100%;
    }
    .counter-value { font-size: 18px; }
    .counter-label { font-size: 9px; letter-spacing: 0.12em; }
    .counter-sep { font-size: 15px; }
}
@media (max-width: 420px) {
    .iimag-counter { gap: 6px; }
    .counter-value { font-size: 16px; }
    .counter-label { display: none; }
    .counter-item.highlight .counter-label { display: inline; font-size: 8px; }
    .live-dot { width: 6px; height: 6px; }
}

/* ============================================================
   TOPBAR v4 — три колонки: дата | кнопка | настройки+войти
   ============================================================ */
.topbar-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 0;
    gap: 16px;
}
.topbar-left { justify-self: start; display: flex; gap: 18px; align-items: center; }
.topbar-center { justify-self: center; }
.topbar-right { justify-self: end; display: flex; gap: 12px; align-items: center; }

/* ============================================================
   КНОПКА «Создать и разместить» — с переливом
   ============================================================ */
.btn-create-product {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 3px;

    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;

    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;

    /* мягкое дыхание */
    animation: btnBreathe 4s ease-in-out infinite;
}
@keyframes btnBreathe {
    0%, 100% { box-shadow: 0 0 0 0 rgba(50, 104, 145, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(50, 104, 145, 0.18); }
}

/* Переливающийся блик */
.btn-create-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: -130%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.18) 40%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0.18) 60%,
        transparent 80%
    );
    animation: btnShimmer 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    transform: skewX(-15deg);
}
@keyframes btnShimmer {
    0%   { left: -130%; }
    55%  { left: 130%; }
    100% { left: 130%; }
}

/* Контент поверх блика */
.btn-create-product > * {
    position: relative;
    z-index: 2;
}

.btn-create-product:hover {
    transform: translateY(-1px);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow:
        0 4px 16px rgba(50, 104, 145, 0.35),
        0 0 0 4px rgba(50, 104, 145, 0.12);
    animation-play-state: paused;
}
.btn-create-product:active {
    transform: translateY(0) scale(0.98);
}

/* Два варианта текста */
.btn-create-product .bp-full  { display: inline; }
.btn-create-product .bp-short { display: none; }

/* ============================================================
   АДАПТИВ — мобильные
   ============================================================ */
@media (max-width: 900px) {
    .topbar-inner {
        grid-template-columns: auto 1fr auto;
    }
    .topbar-left #topbarDate { font-size: 10px; }
    .topbar-left a { display: none; }
    .btn-create-product {
        font-size: 10px;
        padding: 8px 16px;
        letter-spacing: 0.1em;
    }
}
@media (max-width: 640px) {
    .topbar-inner {
        grid-template-columns: auto auto;
        grid-template-areas:
            "left right"
            "center center";
        row-gap: 10px;
    }
    .topbar-left { grid-area: left; }
    .topbar-right { grid-area: right; }
    .topbar-center { grid-area: center; justify-self: stretch; width: 100%; }
    .btn-create-product { width: 100%; padding: 10px 16px; }
    .btn-create-product .bp-full  { display: none; }
    .btn-create-product .bp-short { display: inline; }
}
@media (max-width: 480px) {
    .btn-create-product {
        font-size: 10px;
        letter-spacing: 0.08em;
        padding: 9px 12px;
    }
    .topbar-right .btn-subscribe { padding: 6px 10px; font-size: 10px; }
    .topbar-right .icon-btn { width: 32px; height: 32px; }
}

/* Reduced motion — уважение к пользовательским настройкам */
@media (prefers-reduced-motion: reduce) {
    .btn-create-product,
    .btn-create-product::before {
        animation: none !important;
    }
}


/* ============================================================
   Кнопка «Создать продукт» — перелив ТОЛЬКО первые 5 сек
   Правила ниже перебивают постоянную анимацию.
   ============================================================ */
.btn-create-product {
    animation: none;
}
.btn-create-product::before {
    animation: none;
}
.btn-create-product.is-intro {
    animation: btnBreathe 4s ease-in-out infinite;
}
.btn-create-product.is-intro::before {
    animation: btnShimmer 4s ease-in-out infinite;
}
/* Уважение к настройкам пользователя */
@media (prefers-reduced-motion: reduce) {
    .btn-create-product.is-intro,
    .btn-create-product.is-intro::before {
        animation: none !important;
    }
}


/* ============================================================
   Пользовательские продукты — заглушка когда пусто
   ============================================================ */
.user-products-empty {
    text-align: center;
    padding: 40px 24px;
    border: 1px dashed var(--rule-strong);
    background: var(--paper-2);
    font-family: var(--sans);
}
.user-products-empty .icon {
    font-size: 42px;
    margin-bottom: 14px;
    filter: grayscale(1) opacity(0.45);
    line-height: 1;
}
.user-products-empty h3 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}
.user-products-empty p {
    font-family: var(--serif-body);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    margin-bottom: 20px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}
.user-products-empty .btn {
    display: inline-flex;
}
