:root {
    --bg: #0e1116;
    --surface: #161b22;
    --surface-2: #1f262f;
    --border: #2d333b;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-bg: #1f3a5f;
    --ok: #3fb950;
    --warn: #d29922;
    --err: #f85149;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-text-size-adjust: 100%;
}

/* Header */
header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-mark {
    display: block;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 9px;
}

.tagline {
    color: var(--text-muted);
    font-size: 13px;
}

main {
    flex: 1;
    padding: 16px;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    gap: 10px;
}

.footer-requisites {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-style: normal;
}

.footer-version {
    opacity: 0.7;
    font-size: 12px;
}

/* Hero / index */
.hero h1 {
    font-size: 24px;
    margin: 0 0 12px;
    line-height: 1.25;
}

.lead {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.audit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.audit-form input {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 16px; /* >=16px чтобы iOS не зумил при фокусе */
}

.audit-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.audit-form button {
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.audit-form button:hover { filter: brightness(1.1); }
.audit-form button:active { filter: brightness(0.9); }

.note {
    color: var(--text-muted);
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    word-wrap: break-word;
}

.alert-error {
    background: rgba(248, 81, 73, 0.1);
    border: 0;
    color: var(--err);
}

/* Report */
.report-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.report-header h1 {
    margin: 0;
    font-size: 20px;
    word-break: break-all;
}

.ts {
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    flex-shrink: 0;
}

.status {
    padding: 24px 16px;
    background: var(--surface);
    border-radius: 8px;
    text-align: center;
}

.status p {
    font-size: 14px;
    margin: 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Report blocks */
.block {
    background: var(--surface);
    border: 0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.block-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

/* Сворачиваемый блок: <details class="block block-collapsible"> +
   <summary class="block-title">. Свёрнут по умолчанию, чтобы длинный
   отчёт можно было обозревать по заголовкам. Сам summary — заголовок,
   без двойного отступа снизу, когда блок закрыт. */
details.block-collapsible {
    padding: 0;
}

details.block-collapsible > summary.block-title {
    list-style: none;
    cursor: pointer;
    margin: 0;
    padding: 16px;
    user-select: none;
    position: relative;
    padding-right: 40px;
}

details.block-collapsible > summary.block-title::-webkit-details-marker {
    display: none;
}

/* Шеврон-индикатор справа. Поворачивается на 180° при раскрытии. */
details.block-collapsible > summary.block-title::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.15s ease;
}

details.block-collapsible[open] > summary.block-title::after {
    transform: translateY(-25%) rotate(-135deg);
}

details.block-collapsible > summary.block-title:hover {
    background: var(--surface-2);
    border-radius: 8px 8px 0 0;
}

details.block-collapsible:not([open]) > summary.block-title:hover {
    border-radius: 8px;
}

/* Бедж статуса в заголовке прижимается к правому краю (но левее шеврона
   — место под него зарезервировано через padding-right:40px у summary).
   Текст заголовка остаётся слева, бедж — индикатор статуса справа,
   как принято в коллапс-карточках. */
details.block-collapsible > summary.block-title > .badge:first-of-type {
    margin-left: auto;
}

/* Содержимое после summary получает внутренний отступ, чтобы не
   слипаться с заголовком и краями карточки. */
details.block-collapsible[open] > summary.block-title {
    margin-bottom: 0;
}

details.block-collapsible[open] > *:not(summary) {
    padding-left: 16px;
    padding-right: 16px;
}

details.block-collapsible[open] > *:last-child:not(summary) {
    padding-bottom: 16px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-ok { background: rgba(63, 185, 80, 0.15); color: var(--ok); }
.badge-warn { background: rgba(210, 153, 34, 0.15); color: var(--warn); }
.badge-err { background: rgba(248, 81, 73, 0.15); color: var(--err); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }

/* KV-список: на мобильных вертикально, на десктопе — две колонки */
.kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px 0;
    font-size: 14px;
    margin: 0;
}

.kv dt {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 8px;
}

.kv dt:first-child { margin-top: 0; }

.kv dd {
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.detail-stack {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.detail-note {
    color: var(--text-muted);
    line-height: 1.45;
}

.detail-note strong {
    color: var(--text);
    font-weight: 750;
}

.detail-meta {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 13px;
}

.kv dd code {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

.summary-card {
    background: var(--accent-bg);
    border: 0;
    color: var(--text);
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    word-wrap: break-word;
}

.summary-card ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.summary-card li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.summary-card li:last-child { margin-bottom: 0; }

ul.issues {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: var(--warn);
    font-size: 13px;
}

/* Список значений внутри dd (например, поля формы). Без буллетов,
   компактные строки — выглядит как столбик, а не сплошной текст. */
ul.kv-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.kv-list li {
    padding: 1px 0;
    line-height: 1.4;
}

/* Просканированные страницы — длинные русские URL после decodeURI занимают
   меньше места, но всё равно могут уйти за ширину. Ломаем по любым символам. */
ul.pages-list {
    margin: 0;
    padding-left: 20px;
}

ul.pages-list li {
    margin: 4px 0;
    line-height: 1.4;
}

ul.pages-list a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Layout: отчёт + сайдбар справа. На мобильном — одной колонкой,
   сайдбар уезжает под основной контент. */
.layout-with-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.layout-with-sidebar .report { min-width: 0; }

.sidebar {
    background: var(--surface);
    border: 0;
    border-radius: 8px;
    padding: 16px;
}

.sidebar-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sidebar-state {
    color: var(--text-muted);
    font-size: 13px;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    transition: background-color 0.1s;
}

.sidebar-item a:hover { background: var(--surface-2); }

.sidebar-item-current a {
    background: var(--accent-bg);
    border: 1px solid var(--accent);
}

.sidebar-site {
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
}

.sidebar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.sidebar-when {
    color: var(--text-muted);
}

/* Галерея последних проверок на главной.
   Мобилка: одна колонка, показываем только первые 10 (CSS-обрезка ниже).
   Планшет ≥720px: 2 колонки. Десктоп ≥960px: 3 колонки, лимит снимаем. */
.recent-gallery {
    display: block;
    margin-top: 40px;
}

/* На мобиле грид свернётся в одну колонку через grid-template-columns
   в дефолтных стилях .recent-list, и мы обрезаем хвост — иначе 100
   ссылок забивают экран до бесконечного скролла. */
.recent-list .recent-item:nth-child(n+11) {
    display: none;
}

.recent-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recent-state {
    color: var(--text-muted);
    font-size: 14px;
}

.recent-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-item a {
    display: block;
    padding: 6px 0;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    word-break: break-all;
}

.recent-item a:hover { text-decoration: underline; }

/* Плашка штрафа: показываем в блоке с реальным нарушением.
   Цвет — красный (err), чтобы сразу было видно "сколько это стоит". */
.fine {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(248, 81, 73, 0.08);
    border: 0;
    border-radius: 4px;
}

.fine-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 4px;
}

.fine-label {
    color: var(--err);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fine-range {
    font-weight: 700;
    color: var(--err);
    font-size: 15px;
}

.fine-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.fine-law {
    color: var(--text);
    margin-bottom: 2px;
}

.fine-source a {
    color: var(--accent);
    text-decoration: none;
}

.fine-source a:hover { text-decoration: underline; }

/* Информационный warning — для случаев без денежного штрафа (например,
 * отсутствие реквизитов на информационном сайте — рекомендация по 149-ФЗ
 * ст. 10 ч. 2, см. vault/4e1). Нейтральный синий, отличает от .fine. */
.warning {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(96, 165, 250, 0.08);
    border: 0;
    border-radius: 4px;
}

.warning-head {
    margin-bottom: 4px;
}

.warning-label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.warning-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.warning-law {
    color: var(--text);
    margin-bottom: 2px;
}

.warning-text {
    margin-bottom: 4px;
}

.warning-source a {
    color: var(--accent);
    text-decoration: none;
}

.warning-source a:hover { text-decoration: underline; }

a {
    color: var(--accent);
    word-break: break-all;
}

/* Действия внизу отчёта (Поделиться, Проверить ещё раз) */
.actions {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.actions .rerun-form { margin: 0; }
.actions .rerun-form button { width: 100%; }

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid var(--border);
    width: 100%;
    text-align: center;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--accent);
}

.btn:active { filter: brightness(0.9); }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Сабблок внутри блока (форма, технический чекер) */
.subblock {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.subblock:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.subblock-title {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.evidence {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface-2);
    border-left: 3px solid var(--accent);
    padding: 6px 10px;
    margin: 4px 0 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    word-break: break-word;
}

/* Раскрывающиеся списки cookies по категориям (vault/4a4). Пользователь
   видит и количество, и конкретные имена — без JS, через нативный <details>. */
.cookie-categories {
    margin: 12px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cookie-category {
    background: var(--surface-2);
    border-radius: 6px;
    padding: 8px 12px;
}

.cookie-category summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    user-select: none;
}

.cookie-category summary::-webkit-details-marker { display: none; }

.cookie-category summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    display: inline-block;
    transform: rotate(-45deg);
    transition: transform 0.15s;
}

.cookie-category[open] summary::before { transform: rotate(45deg); }

.cookie-category .cookie-count {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: auto;
}

.cookie-category .cookie-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0 6px;
    line-height: 1.4;
}

.cookie-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.cookie-list li code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

/* Vault-driven cookie-agent: новый формат вывода (violations/reasoning/cited).
   Каждое violation — карточка с цитатой vault-заметки. Юрист видит
   на основании какого правила выписан штраф. См. backend/agent/. */
.violations {
    margin: 12px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.violation {
    border: 0;
    border-radius: 6px;
    padding: 10px 12px;
    background: var(--bg);
}

.violation-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.violation-title {
    font-weight: 600;
    font-size: 14px;
}

.violation-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.violation-fine {
    font-size: 12px;
    color: var(--err);
    font-weight: 500;
}

/* Ссылка на vault-заметку — компактный inline-тэг. Не кликабельный
   (страницы заметки нет), но позволяет юристу/разработчику быстро
   найти первоисточник по Luhmann-id. */
.vault-ref {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-secondary, rgba(255,255,255,0.05));
    border-radius: 3px;
    color: var(--text-muted);
    white-space: nowrap;
}

.cited-notes {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.cited-label {
    margin-right: 4px;
}

.cookie-reasoning {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 6px;
    font-size: 13px;
}

.cookie-reasoning summary {
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.reasoning-body {
    margin-top: 8px;
    line-height: 1.5;
    color: var(--text);
}

/* Пункты «Содержимое политики» — раскрывающиеся карточки по образцу
   cookie-категорий. Сводка по статусу видна сразу, evidence открывается
   кликом. Пункты без evidence (applicable=true и present=false) — статичные,
   чтобы клик по пустому details не сбивал с толку. */
.policy-items {
    margin: 12px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.policy-item {
    background: var(--surface-2);
    border-radius: 6px;
    padding: 8px 12px;
}

.policy-item > summary,
.policy-item-static {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    user-select: none;
}

.policy-item > summary {
    cursor: pointer;
}

.policy-item > summary::-webkit-details-marker { display: none; }

.policy-item > summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    display: inline-block;
    transform: rotate(-45deg);
    transition: transform 0.15s;
}

.policy-item[open] > summary::before { transform: rotate(45deg); }

/* Статичный пункт без раскрытия — оставляем такое же горизонтальное
   выравнивание, но без шеврона и курсора, чтобы визуально совпадал. */
.policy-item-static {
    padding-left: 18px;
}

.policy-item-label {
    flex: 1;
}

.policy-item > .evidence {
    margin-top: 8px;
}

/* Десктоп: KV в две колонки, header горизонтально, padding больше, сайдбар справа */
@media (min-width: 960px) {
    main { max-width: 1200px; }
    .layout-with-sidebar {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }
    .layout-with-sidebar .report {
        flex: 1;
        min-width: 0;
    }
    .layout-with-sidebar .sidebar {
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    /* Галерея на главной: на десктопе 3 колонки, лимит «первые 10» снимаем —
       места достаточно показать все 100. */
    .recent-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
    .recent-list .recent-item:nth-child(n+11) { display: block; }
}

@media (min-width: 720px) {
    header { padding: 16px 32px; gap: 16px; }
    .logo { font-size: 20px; }
    .tagline { font-size: 14px; }
    main { padding: 32px; }
    .hero h1 { font-size: 32px; }
    .lead { font-size: 17px; margin-bottom: 32px; }
    .audit-form { flex-direction: row; gap: 12px; }
    .audit-form input { flex: 1; }
    .audit-form button { flex-shrink: 0; padding: 12px 24px; }
    .report-header h1 { font-size: 24px; }
    .ts { font-size: 13px; }
    .block { padding: 20px; margin-bottom: 16px; }
    .block-title { font-size: 18px; }
    .kv {
        grid-template-columns: 160px 1fr;
        gap: 8px 16px;
    }
    .kv dt {
        font-size: 14px;
        text-transform: none;
        letter-spacing: 0;
        margin-top: 0;
    }
    .summary-card { padding: 16px 20px; font-size: 15px; }
    .status { padding: 32px; }
    .spinner { width: 36px; height: 36px; margin-bottom: 16px; }
    .actions {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }
    .actions .btn,
    .actions .rerun-form button { width: auto; min-width: 200px; }
    .actions .rerun-form { display: inline-block; }
    .sidebar-actions {
        flex-direction: column;
        justify-content: flex-start;
        gap: 10px;
    }
    .sidebar-actions .btn,
    .sidebar-actions .rerun-form button { width: 100%; min-width: 0; }
    .sidebar-actions .rerun-form { display: block; }
}

/* Планшет (720..959): 2 колонки, лимит «10» снимаем. Узкий range — чтобы
   не переопределять десктопные 3 колонки на ≥960px (порядок медиа выше
   ставит 720px ПОСЛЕ 960px). */
@media (min-width: 720px) and (max-width: 959px) {
    .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
    .recent-list .recent-item:nth-child(n+11) { display: block; }
}

/* Experimental compliance-report redesign. Kept as overrides so the branch is
   easy to compare against the old visual layer. */
:root {
    --bg: #f4f1eb;
    --surface: #fffdf8;
    --surface-2: #f7f2e8;
    --border: #ded6c8;
    --text: #1d2430;
    --text-muted: #687083;
    --accent: #3156c8;
    --accent-bg: #e8eefc;
    --ok: #087443;
    --warn: #a15c07;
    --err: #b42318;
    --ink: #111827;
    --paper-shadow: 0 18px 55px rgba(31, 41, 55, 0.10);
    --soft-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

body {
    background:
        radial-gradient(circle at 12% -8%, rgba(49, 86, 200, 0.16), transparent 34rem),
        radial-gradient(circle at 88% 8%, rgba(180, 35, 24, 0.08), transparent 30rem),
        linear-gradient(180deg, #fbf8f1 0%, var(--bg) 42rem);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    align-items: center;
    padding: 18px 28px;
    background: rgba(255, 253, 248, 0.88);
    border-bottom: 1px solid rgba(222, 214, 200, 0.8);
    backdrop-filter: blur(18px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: -0.03em;
}

.logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    filter: drop-shadow(0 10px 18px rgba(49, 86, 200, 0.24));
}

.tagline {
    color: var(--text-muted);
    font-size: 14px;
}

main {
    max-width: 1280px;
    padding: 34px 22px 54px;
}

footer {
    border-top: 0;
    color: #8a725a;
}

.hero {
    max-width: 820px;
    margin: 56px auto 0;
    padding: 42px;
    background: rgba(255, 253, 248, 0.84);
    border: 0;
    border-radius: 30px;
    box-shadow: var(--paper-shadow);
}

.hero h1 {
    color: var(--ink);
    font-size: clamp(32px, 5vw, 58px);
    letter-spacing: -0.055em;
}

.lead {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 680px;
}

.audit-form input,
.audit-form button,
.btn {
    border-radius: 14px;
}

.audit-form input {
    background: #fff;
    border: 1px solid #d9cfbf;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.audit-form button {
    background: var(--ink);
    color: #fffdf8;
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.18);
}

.audit-form input:disabled {
    background: #f4efe6;
    color: #8a8175;
    cursor: not-allowed;
    opacity: 1;
}

.audit-form button:disabled,
.audit-form button:disabled:hover,
.audit-form button:disabled:active {
    background: #d8d0c2;
    color: #8a8175;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active {
    background: #e2d9ca;
    border-color: #d2c8b9;
    color: #8a8175;
    cursor: not-allowed;
    filter: none;
    opacity: 1;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(49, 86, 200, 0.5);
    outline-offset: 3px;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.layout-with-sidebar .report { min-width: 0; }

.report-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 22px;
    padding: 32px;
    color: #f8fafc;
    background:
        radial-gradient(circle at 88% 8%, rgba(120, 166, 255, 0.26), transparent 22rem),
        linear-gradient(135deg, #101828 0%, #172554 52%, #253858 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    box-shadow: var(--paper-shadow);
}

.report-title-wrap { min-width: 0; }

.report-eyebrow {
    margin-bottom: 10px;
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.report-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    word-break: break-word;
}

.report-site-link,
.report-site-link:hover,
.report-site-link:focus-visible {
    color: inherit;
    text-decoration: none;
}

.report-header p {
    max-width: 690px;
    margin: 18px 0 0;
    color: rgba(248, 250, 252, 0.72);
    font-size: 16px;
}

.report-meta-card {
    align-self: end;
    justify-self: start;
    min-width: min(100%, 270px);
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.meta-label {
    display: block;
    margin-bottom: 6px;
    color: rgba(248, 250, 252, 0.62);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.ts {
    color: #fff;
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.audit-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.readiness-card,
.priority-card,
.metric-card,
.summary-card,
.block,
.sidebar {
    background: rgba(255, 253, 248, 0.92);
    border: 0;
    box-shadow: var(--soft-shadow);
}

.readiness-card {
    padding: 22px;
    border-radius: 26px;
}

.readiness-score {
    display: flex;
    align-items: center;
    gap: 18px;
}

.score-ring {
    width: 104px;
    height: 104px;
    flex: 0 0 104px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--risk-color) calc(var(--score) * 1%), #e6dfd2 0);
    position: relative;
}

.score-ring::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px rgba(222, 214, 200, 0.75);
}

.score-ring span {
    position: relative;
    z-index: 1;
    color: var(--ink);
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -0.05em;
}

.score-label,
.metric-card span,
.priority-title {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.risk-title {
    margin-top: 6px;
    color: var(--ink);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.readiness-card p,
.priority-card p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    min-height: 132px;
    padding: 16px;
    border-radius: 22px;
}

.metric-card strong {
    display: block;
    margin-top: 12px;
    color: var(--ink);
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.metric-card small {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.metric-danger { border-color: rgba(180, 35, 24, 0.26); }
.metric-danger strong { color: var(--err); }
.metric-warn { border-color: rgba(161, 92, 7, 0.26); }
.metric-warn strong { color: var(--warn); }
.metric-ok { border-color: rgba(8, 116, 67, 0.24); }
.metric-ok strong { color: var(--ok); }

.priority-card {
    padding: 20px;
    border-radius: 26px;
}

.priority-card ol {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.priority-card li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(222, 214, 200, 0.75);
}

.priority-card li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.priority-card li span {
    min-width: 0;
    color: var(--text);
    font-size: 14px;
}

.priority-card li strong {
    color: var(--err);
    font-size: 13px;
    white-space: nowrap;
}

.summary-card {
    padding: 20px 22px;
    border-radius: 24px;
    border-left: 0;
    color: var(--text);
    font-size: 15px;
}

.summary-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 18px;
    letter-spacing: -0.03em;
}

.summary-card ul { margin-top: 8px; }

:root {
    --report-block-bg: rgba(255, 253, 248, 0.92);
    --report-block-border: rgba(222, 214, 200, 0.9);
    --report-panel-bg: rgba(247, 242, 232, 0.64);
    --report-row-border: rgba(222, 214, 200, 0.58);
}

.block {
    border-radius: 22px;
    margin-bottom: 14px;
    overflow: clip;
    background: var(--report-block-bg);
    border: 0;
    box-shadow: 0 18px 42px rgba(31, 41, 55, 0.06);
}

details.block-collapsible {
    border-left: 0;
}

details.block-collapsible:not([open]) > *:not(summary),
details.policy-item:not([open]) > *:not(summary),
details.cookie-category:not([open]) > *:not(summary),
details.cookie-reasoning:not([open]) > *:not(summary) {
    display: none !important;
}

details.block-collapsible > summary.block-title {
    padding: 20px 68px 20px 22px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 780;
    letter-spacing: -0.03em;
    background: var(--report-block-bg);
    border-bottom: 0;
}

details.block-collapsible > summary.block-title:hover {
    background: rgba(247, 242, 232, 0.9);
}

details.block-collapsible[open] > summary.block-title {
    border-bottom-color: transparent;
}

details.block-collapsible[open] > *:not(summary) {
    padding-left: 22px;
    padding-right: 22px;
    background: var(--report-block-bg);
}

details.block-collapsible[open] > *:last-child:not(summary) {
    padding-bottom: 22px;
}

details.block-collapsible > summary.block-title::after {
    right: 22px;
    border-color: #8a725a;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.badge-ok {
    background: #e5f4eb;
    color: var(--ok);
}

.badge-warn {
    background: #fff3d7;
    color: var(--warn);
}

.badge-err {
    background: #fde7e4;
    color: var(--err);
}

.badge-neutral {
    background: #eee6da;
    color: #6f6359;
}

.kv {
    color: var(--text);
    font-size: 14px;
    gap: 0;
}

.kv dt {
    color: #8a725a;
    font-weight: 750;
    margin-top: 0;
    padding: 10px 0;
    border-top: 1px solid var(--report-row-border);
}

.kv dt:first-child { border-top: 0; }

.kv dd {
    padding: 10px 0;
    border-top: 1px solid var(--report-row-border);
}

.kv dt:first-child + dd { border-top: 0; }

.kv dd code,
.cookie-list li code {
    background: #eee6da;
    color: var(--ink);
}

.policy-item,
.cookie-category,
.subblock,
.cookie-reasoning,
.violation {
    background: var(--report-panel-bg);
    border: 0;
    border-radius: 16px;
    box-shadow: none;
}

.evidence {
    background: rgba(255, 253, 248, 0.9);
    border-left-color: var(--accent);
    color: #5b6475;
}

.fine,
.warning,
.alert-error,
.alert-warn {
    border-radius: 16px;
}

.fine {
    background: var(--report-panel-bg);
    border: 0;
}

.fine-law { color: var(--ink); }
.fine-body { color: var(--text-muted); }
.fine-source a,
.warning-source a,
a { color: var(--accent); }

.warning {
    background: var(--report-panel-bg);
    border: 0;
}

.alert-warn {
    background: #fff8e6;
    border: 0;
    color: var(--warn);
}

.sidebar {
    border-radius: 26px;
    padding: 20px;
}

.sidebar-actions {
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(222, 214, 200, 0.78);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
}

.sidebar-actions .btn,
.sidebar-actions .rerun-form button {
    width: 100%;
    min-width: 0;
}

.sidebar-actions .rerun-form {
    display: block;
    width: 100%;
}

.sidebar-title,
.recent-title {
    color: #8a725a;
    font-weight: 850;
}

.sidebar-item a {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text);
}

.sidebar-item a:hover {
    background: rgba(247, 242, 232, 0.88);
}

.sidebar-item-current a {
    background: #eef4ff;
    border-color: rgba(49, 86, 200, 0.35);
}

.sidebar-site {
    color: var(--ink);
    font-weight: 780;
    white-space: nowrap;
    word-break: normal;
}

.sidebar-meta {
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-when {
    white-space: nowrap;
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: #d9cfbf;
    box-shadow: var(--soft-shadow);
}

.btn-secondary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fffdf8;
}

.status {
    background: rgba(255, 253, 248, 0.92);
    border: 0;
    border-radius: 26px;
    box-shadow: var(--soft-shadow);
}

.spinner {
    border-color: #ded6c8;
    border-top-color: var(--accent);
}

.recent-gallery {
    max-width: 980px;
    margin: 42px auto 0;
}

.recent-item a {
    color: var(--ink);
}

.recent-site {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 0;
}

.recent-date {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.home-shell {
    max-width: 1200px;
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    gap: 22px;
    align-items: stretch;
}

.home-hero {
    max-width: none;
    margin: 0;
    padding: 40px 42px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(42px, 5.2vw, 76px);
    line-height: 0.98;
}

.home-hero .lead {
    max-width: 720px;
    margin-bottom: 26px;
}

.home-aside {
    display: grid;
    grid-template-rows: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 16px;
}

.home-aside-card {
    padding: 26px;
    background: rgba(255, 253, 248, 0.9);
    border: 0;
    border-radius: 28px;
    box-shadow: var(--soft-shadow);
}

.home-score-card {
    background:
        radial-gradient(circle at 88% 12%, rgba(120, 166, 255, 0.28), transparent 16rem),
        linear-gradient(135deg, #101828, #172554 58%, #253858);
    color: #fff;
}

.home-kicker {
    display: block;
    margin-bottom: 12px;
    color: #8a725a;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-score-card .home-kicker {
    color: #bfdbfe;
}

.home-aside-card strong {
    display: block;
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.home-score-card strong {
    color: #fff;
}

.home-aside-card p {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.home-score-card p {
    color: rgba(248, 250, 252, 0.72);
}

.home-checks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.home-checks li {
    display: flex;
    gap: 10px;
    color: var(--text);
    line-height: 1.35;
}

.home-checks li::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(49, 86, 200, 0.12);
}

/* SEO landing pages */
.home-shell,
.seo-landing-shell,
.home-faq {
    --seo-item-gap: 14px;
    --seo-section-top: clamp(24px, 3.2vw, 42px);
    --seo-section-bottom: 8px;
}

.seo-landing-shell {
    max-width: 1180px;
    margin: 32px auto 0;
    display: grid;
    gap: 20px;
}

.home-faq {
    max-width: 1200px;
    margin: 26px auto 0;
    display: grid;
    gap: 18px;
}

.seo-landing-hero {
    max-width: none;
    margin: 0;
    padding: clamp(28px, 4vw, 54px);
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 10%, rgba(120, 166, 255, 0.32), transparent 18rem),
        linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(246, 238, 224, 0.9));
    border: 0;
    border-radius: 32px;
    box-shadow: var(--paper-shadow);
}

.seo-landing-hero h1 {
    max-width: 820px;
    color: var(--ink);
    font-size: clamp(38px, 5.2vw, 70px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.seo-landing-hero .lead {
    max-width: 720px;
    margin-bottom: 26px;
}

.seo-landing-hero .audit-form {
    max-width: 760px;
}

.seo-section {
    padding: var(--seo-section-top) 6px var(--seo-section-bottom);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-seo-links {
    padding: clamp(22px, 3vw, 34px) 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.seo-text-section {
    display: grid;
    gap: 16px 34px;
    padding: var(--seo-section-top) 6px var(--seo-section-bottom);
    background: transparent;
    box-shadow: none;
}

.seo-section h2,
.home-seo-links h2,
.seo-text-section h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.seo-text-section h2 {
    margin: 0;
}

.seo-problem p,
.seo-preview p {
    max-width: 860px;
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

.seo-problem .seo-list-intro {
    margin-top: 20px;
}

.seo-fine-range-list {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding-left: 1.2em;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

.seo-preview .example-button {
    display: flex;
    margin-top: 18px;
    margin-left: auto;
}

.seo-check-grid,
.seo-card-grid,
.seo-link-grid {
    display: grid;
    gap: 18px 34px;
}

.seo-check-grid {
    padding: 0;
    margin: 0;
    list-style: none;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.seo-check-grid li,
.seo-card,
.seo-link-grid a,
.seo-faq-item {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.seo-check-grid li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 0;
    padding: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

.seo-check-grid li::before {
    content: '';
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(49, 86, 200, 0.12);
}

.seo-card {
    padding: 18px 0 0;
}

.seo-card strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}

.seo-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.seo-link-grid a {
    padding: 14px 0 0;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.16s ease;
}

.home-seo-links .seo-link-grid {
    gap: var(--seo-item-gap) 34px;
}

.home-seo-links .seo-link-grid a,
.seo-related-links .seo-link-grid a {
    padding-top: 0;
}

.seo-related-links .seo-link-grid {
    gap: var(--seo-item-gap) 34px;
}

.seo-link-grid a:hover {
    color: var(--accent);
}

.seo-faq-list {
    display: grid;
    gap: 0;
}

.seo-faq-item {
    border: 0;
}

.seo-faq-item summary {
    display: block;
    min-height: 0;
    padding: calc(var(--seo-item-gap) / 2) 44px calc(var(--seo-item-gap) / 2) 0;
    cursor: pointer;
    color: var(--ink);
    font-weight: 700;
    position: relative;
}

.seo-faq-item summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    height: 12px;
    border-right: 2px solid #8a725a;
    border-bottom: 2px solid #8a725a;
    transform: translateY(-75%) rotate(45deg);
}

.seo-faq-item[open] summary::after {
    transform: translateY(-25%) rotate(-135deg);
}

.seo-faq-item p {
    margin: 0;
    padding: 0 0 18px;
    color: var(--text-muted);
    line-height: 1.55;
}

.home-seo-links {
    grid-column: 1 / -1;
}

@media (max-width: 480px) {
    .seo-landing-hero h1 {
        font-size: clamp(34px, 10vw, 42px);
        line-height: 1.05;
    }
}

@media (min-width: 720px) {
    .seo-card-grid,
    .seo-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1040px) {
    .seo-text-section {
        grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
        align-items: start;
    }

    .seo-text-section h2 {
        margin: 0;
    }

    .seo-section:nth-of-type(3),
    .seo-section:nth-of-type(4) {
        display: grid;
        grid-template-columns: minmax(220px, 0.32fr) minmax(0, 0.68fr);
        gap: 24px;
        align-items: start;
    }

    .seo-section:nth-of-type(3) h2,
    .seo-section:nth-of-type(4) h2 {
        margin: 0;
    }
}

.home-shell + .recent-gallery {
    max-width: 1200px;
    margin-top: 26px;
    padding: 10px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.home-shell + .recent-gallery .recent-title {
    margin-bottom: 14px;
}

.home-shell + .recent-gallery .recent-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
}

.home-shell + .recent-gallery .recent-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 9px 12px;
    background: rgba(255, 253, 248, 0.78);
    border: 0;
    border-radius: 18px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.home-shell + .recent-gallery .recent-item a:hover {
    background: #fffdf8;
}

.example-reports {
    max-width: 1200px;
    margin: 26px auto 0;
}

.section-heading {
    margin-bottom: 16px;
}

.section-heading h2 {
    max-width: 820px;
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 3.4vw, 48px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.section-heading p {
    max-width: 640px;
    margin: 10px 0 0;
    color: var(--text-muted);
}

.example-card {
    background: rgba(255, 253, 248, 0.88);
    border: 0;
    border-radius: 30px;
    box-shadow: var(--soft-shadow);
}

.example-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.example-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.example-button {
    width: fit-content;
    margin-top: auto;
    padding: 12px 16px;
    background: var(--ink);
    color: #fffdf8;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.18);
}

.example-button:hover {
    text-decoration: none;
    filter: brightness(1.1);
}

.example-button:active {
    filter: brightness(0.9);
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.example-card {
    min-height: 230px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.example-risk {
    width: fit-content;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.example-risk-high {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.example-risk-medium {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.example-risk-low {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

@media (min-width: 900px) {
    main { max-width: 1380px; padding: 44px 34px 64px; }
    .report-header {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 42px;
    }
    .report-meta-card { justify-self: end; }
    .audit-overview {
        grid-template-columns: minmax(300px, 0.88fr) minmax(360px, 1.12fr);
    }
    .priority-card { grid-column: 1 / -1; }
}

@media (min-width: 1120px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
    .layout-with-sidebar .sidebar {
        width: auto;
        position: sticky;
        top: 92px;
        max-height: calc(100vh - 112px);
        overflow-y: auto;
    }
    .audit-overview {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

@media (max-width: 1040px) {
    .home-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .home-shell + .recent-gallery .recent-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .example-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 719px) {
    header { padding: 14px 18px; }
    main { padding: 20px 14px 42px; }
    .hero { margin-top: 22px; padding: 26px 20px; border-radius: 24px; }
    .home-shell { margin-top: 16px; gap: 14px; }
    .home-hero { margin-top: 0; padding: 26px 20px; }
    .home-hero h1 { font-size: 39px; margin-bottom: 14px; }
    .home-hero .lead { font-size: 16px; margin-bottom: 20px; }
    .home-aside { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .home-aside-card { padding: 20px; border-radius: 22px; }
    .home-aside-card strong { font-size: 25px; }
    .home-shell + .recent-gallery {
        margin-top: 16px;
        padding: 4px 0 0;
    }
    .home-shell + .recent-gallery .recent-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .example-reports {
        margin-top: 18px;
    }
    .section-heading h2 {
        font-size: 30px;
    }
    .example-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .example-card {
        padding: 20px;
        border-radius: 22px;
    }
    .example-card h3 {
        font-size: 26px;
    }
    .layout-with-sidebar { padding-bottom: 84px; }
    .report-header { gap: 14px; margin-bottom: 14px; padding: 20px 18px; border-radius: 22px; }
    .report-eyebrow { margin-bottom: 8px; font-size: 11px; }
    .report-header h1 { font-size: 32px; }
    .report-header p { display: none; }
    .report-meta-card { min-width: 0; padding: 12px 14px; border-radius: 16px; }
    .meta-label { margin-bottom: 4px; font-size: 10px; }
    .ts { font-size: 12px; }
    .audit-overview { gap: 10px; margin-bottom: 12px; }
    .readiness-card { padding: 14px; border-radius: 20px; }
    .readiness-score { align-items: center; gap: 12px; }
    .score-ring { width: 68px; height: 68px; flex-basis: 68px; }
    .score-ring::after { inset: 7px; }
    .score-ring span { font-size: 21px; }
    .risk-title { font-size: 19px; }
    .readiness-card p { font-size: 13px; line-height: 1.35; }
    .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .metric-card { min-height: 78px; padding: 11px; border-radius: 18px; }
    .metric-card strong { margin-top: 7px; font-size: 17px; line-height: 1.08; }
    .metric-card small { display: none; }
    .priority-card { display: none; }
    .priority-card ol { margin-top: 10px; gap: 8px; }
    .priority-card li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-bottom: 8px; }
    .priority-card li:nth-child(n+3) { display: none; }
    .summary-card { padding: 14px 16px; border-radius: 20px; font-size: 14px; }
    .summary-card strong { margin-bottom: 6px; font-size: 16px; }
    .summary-card ul { margin-top: 4px; padding-left: 18px; }
    .summary-card li { margin-bottom: 3px; line-height: 1.35; }
    details.block-collapsible > summary.block-title {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px 10px;
        min-height: 64px;
        padding: 15px 46px 15px 14px;
        font-size: 16px;
        line-height: 1.15;
    }
    details.block-collapsible { border-left-width: 4px; }
    details.block-collapsible > summary.block-title > .badge:first-of-type {
        justify-self: end;
        margin-left: 0;
    }
    details.block-collapsible > summary.block-title::after { right: 18px; width: 8px; height: 8px; }
    details.block-collapsible[open] > *:not(summary) { padding-left: 16px; padding-right: 16px; }
    details.block-collapsible[open] > *:last-child:not(summary) { padding-bottom: 16px; }
    .policy-item,
    .cookie-category { padding: 8px 10px; }
    .sidebar-actions:not([hidden]) {
        position: fixed;
        right: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin: 0;
        padding: 10px;
        border: 0;
        border-radius: 20px;
        background: rgba(255, 253, 248, 0.94);
        box-shadow: 0 18px 55px rgba(31, 41, 55, 0.18);
        backdrop-filter: blur(18px);
    }
    .sidebar-actions .rerun-form { display: contents; }
    .sidebar-actions .btn,
    .sidebar-actions .rerun-form button {
        width: 100%;
        min-width: 0;
        padding: 10px 8px;
        font-size: 12px;
        line-height: 1.15;
        box-shadow: none;
        white-space: normal;
    }
}

/* ── Paywall (отчёт готов, требуется оплата) ─────────────────────────────── */
.paywall-card {
    background: var(--surface);
    border: 0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--soft-shadow);
    max-width: 560px;
}
.paywall-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ok);
    background: rgba(8, 116, 67, 0.10);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.paywall-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.paywall-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 24px;
}
.paywall-form { margin: 0; }
.paywall-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 14px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(49, 86, 200, 0.28);
    transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.paywall-btn:hover {
    background: #284bb0;
    box-shadow: 0 10px 26px rgba(49, 86, 200, 0.36);
}
.paywall-btn:active { transform: translateY(1px); }
.paywall-btn-price {
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
}
