/* Hecate public theme, migrated from the PHP style.css. All assets stay local. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-variable.bff0f6e3b9e2.ttf") format('truetype');
}

:root {
    --primary: #506D84;
    --primary-dark: #3d5669;
    --accent: #7FA3C0;
    --yellow: #F9A825;
    --background-start: #F4F7FA;
    --background-mid: #D4DEE8;
    --background-end: #9BB8CE;
    --success: #10B981;
    --success-dark: #059669;
    --danger: #EF4444;
    --danger-dark: #DC2626;
    --warning: #F59E0B;
    --text: #1f2937;
    --text-muted: #6b7280;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-border: rgba(255, 255, 255, 0.45);
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --shadow-sm: 0 2px 10px rgba(80, 109, 132, 0.08);
    --shadow-md: 0 8px 28px rgba(80, 109, 132, 0.12);
    --shadow-lg: 0 16px 48px rgba(80, 109, 132, 0.16);
    --transition: 0.25s ease;
    --header-h: 4.25rem;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
    max-width: 100%;
}

body {
    margin: 0;
    background: linear-gradient(145deg, var(--background-start) 0%, var(--background-mid) 48%, var(--background-end) 100%);
    background-attachment: fixed;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    line-height: 1.55;
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; max-width: 100%; }

/* iOS fixed background can jank — disable on small screens */
@media (max-width: 768px) {
    body { background-attachment: scroll; }
}

/* ——— Tailwind-like color helpers (без конфига CDN) ——— */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ——— Surfaces ——— */
.glass {
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xl);
    max-width: 100%;
    min-width: 0;
}

.glass-dark {
    background: rgba(80, 109, 132, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg);
}

/* ——— Site header ——— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(80, 109, 132, 0.12);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--header-h);
    width: 100%;
    box-sizing: border-box;
}

.site-logo {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.site-logo:hover { color: var(--primary-dark); }

.site-nav-ads {
    display: none;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 1024px) {
    .site-nav-ads { display: flex; }
}

.site-nav-ads a {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition);
}

.site-nav-ads a:hover { color: var(--primary); }

.site-nav-desktop {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

@media (min-width: 900px) {
    .site-nav-desktop { display: flex; }
}

.site-nav-desktop a {
    color: var(--primary);
    text-decoration: none;
    padding: 0.35rem 0.15rem;
    border-radius: 0.35rem;
    transition: color var(--transition);
}

.site-nav-desktop a:hover { color: var(--accent); }
.site-nav-desktop a.is-active { font-weight: 700; color: var(--primary-dark); }
.site-nav-desktop a.nav-admin { color: #d97706; font-weight: 700; }
.site-nav-desktop a.nav-admin:hover { color: #b45309; }
.site-nav-desktop a.nav-logout { color: #dc2626; font-weight: 600; }
.site-nav-desktop a.nav-logout:hover { color: #b91c1c; }

.nav-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(80, 109, 132, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary);
    cursor: pointer;
    font-size: 1.15rem;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav-burger:hover {
    background: #fff;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 900px) {
    .nav-burger { display: none; }
}

/* Mobile drawer */
.site-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.site-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.site-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.site-drawer.is-open .site-drawer__backdrop { opacity: 1; }

.site-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(20rem, 88vw);
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem calc(1.5rem + var(--safe-bottom));
    overflow-y: auto;
}

.site-drawer.is-open .site-drawer__panel { transform: translateX(0); }

.site-drawer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.site-drawer__close {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: var(--radius-md);
    background: #f3f4f6;
    color: var(--text);
    cursor: pointer;
    font-size: 1.1rem;
}

.site-drawer__links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.site-drawer__links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.05rem;
    transition: background var(--transition);
}

.site-drawer__links a:hover,
.site-drawer__links a:active {
    background: rgba(80, 109, 132, 0.08);
}

.site-drawer__links a.nav-admin { color: #d97706; }
.site-drawer__links a.nav-logout { color: #dc2626; }

.site-drawer__ads {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-drawer__ads a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
}

/* ——— Buttons ——— */
.btn-primary,
.btn-accent,
.btn-success,
.btn-danger,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    border-radius: var(--radius-lg);
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--yellow) 0%, #FBC02D 100%);
    color: #fff;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(249, 168, 37, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(80, 109, 132, 0.18);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

/* ——— Forms ——— */
.input-glass {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(201, 214, 223, 0.55);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    border-radius: var(--radius-lg);
    font-family: inherit;
    color: var(--text);
}

.input-glass:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(80, 109, 132, 0.15);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-md);
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-md);
}

/* ——— Feature / misc ——— */
.feature-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.floating {
    animation: floating 3.2s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.spinner {
    border: 3px solid rgba(80, 109, 132, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 0.85s linear infinite;
}

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

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 16px rgba(80, 109, 132, 0.25); }
    to { box-shadow: 0 0 28px rgba(80, 109, 132, 0.5); }
}

/* ——— Layout helpers ——— */
.site-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem 0.85rem 1.75rem;
    min-width: 0;
    overflow-x: clip;
}

@media (min-width: 640px) {
    .site-main { padding: 1.75rem 1.5rem 2.5rem; }
}

@media (min-width: 1024px) {
    .site-main { padding: 2.25rem 1.5rem 3rem; }
}

.site-footer {
    margin-top: auto;
    text-align: center;
    padding: 1.25rem 1rem calc(1.25rem + var(--safe-bottom));
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(80, 109, 132, 0.12);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-footer__inner {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .site-footer__inner {
        flex-direction: row;
        gap: 0.75rem;
    }
}

.site-footer a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; color: var(--primary-dark); }

/* ——— Cards / content polish ——— */
.page-hero {
    text-align: center;
    margin-bottom: 1.75rem;
}

.page-hero__icon {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
}

@media (min-width: 640px) {
    .page-hero__icon {
        width: 5.5rem;
        height: 5.5rem;
        margin-bottom: 1.25rem;
    }
}

.page-hero h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.page-hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
    margin: 0 auto;
    max-width: 40rem;
}

.card-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

.card-feature {
    text-align: center;
    padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
    .card-feature { padding: 2rem 1.5rem; }
}

.card-feature h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.75rem;
}

.card-feature p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* CTA buttons stack on mobile */
.cta-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .cta-row {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

.cta-row .btn-primary,
.cta-row .btn-success {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

@media (min-width: 640px) {
    .cta-row .btn-primary,
    .cta-row .btn-success {
        width: auto;
        min-width: 14rem;
        padding: 1.1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Map / checker
 * Явная высота #map; без backdrop-filter на контейнере (blur = дёрганый зум ymaps).
 * Не вызываем fitToViewport/setBounds во время пользовательского зума.
 */
#map-container {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    position: relative;
    /* solid, без blur — иначе тайлы/зум лагают */
    background: #fff;
    border: 1px solid rgba(80, 109, 132, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    /* не наследуем glass blur */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    contain: layout style;
}

#map-container.is-visible {
    display: flex !important;
}

#map-container.glass {
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#map-container .map-toolbar {
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
    background: #f8fafc;
    border-bottom: 1px solid rgba(80, 109, 132, 0.12);
}

#map-container .map-ext-link {
    flex: 0 0 auto;
    background: #f8fafc;
}

#map {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important;
    min-height: 320px !important;
    position: relative;
    /* не clip тайлы при зуме */
    overflow: visible;
    background: #e8eef3;
    /* отдельный композитный слой — плавнее wheel-zoom */
    transform: translateZ(0);
    will-change: auto;
    touch-action: pan-x pan-y;
}

@media (min-width: 480px) {
    #map {
        height: 380px !important;
        min-height: 380px !important;
    }
}

@media (min-width: 768px) {
    #map {
        height: 460px !important;
        min-height: 460px !important;
    }
}

@media (min-width: 1024px) {
    #map {
        height: 520px !important;
        min-height: 520px !important;
    }
}

/* Отключаем transition на потомках карты (Tailwind/глобальные стили) */
#map,
#map * {
    transition: none !important;
    animation: none !important;
}

#coords-input {
    min-height: 10rem;
    font-size: 16px !important; /* iOS: без зума при фокусе */
    max-width: 100%;
    word-break: break-all;
}

@media (min-width: 640px) {
    #coords-input {
        min-height: 16rem;
        font-size: 1.05rem !important;
    }
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 0;
}

@media (min-width: 640px) {
    .modal-overlay {
        align-items: center;
        padding: 1rem;
    }
}

.modal-overlay.hidden { display: none; }

.modal-panel {
    width: 100%;
    max-width: 28rem;
    max-height: min(92vh, 40rem);
    overflow-y: auto;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    padding: 1.5rem 1.25rem calc(1.5rem + var(--safe-bottom));
    position: relative;
}

@media (min-width: 640px) {
    .modal-panel {
        border-radius: var(--radius-2xl);
        padding: 2rem 2rem 1.75rem;
    }
}

/* Tables scroll on mobile */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

/* FAQ */
.faq-item {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.faq-item:hover { box-shadow: var(--shadow-md); }

.faq-toggle {
    width: 100%;
    padding: 1.15rem 1.25rem;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font: inherit;
    color: inherit;
}

@media (min-width: 640px) {
    .faq-toggle { padding: 1.35rem 1.75rem; }
}

.faq-toggle:hover { background: rgba(255, 255, 255, 0.2); }
.faq-toggle.active { background: rgba(80, 109, 132, 0.1); }

.faq-toggle .chevron { transition: transform 0.35s ease; flex-shrink: 0; }
.faq-toggle.active .chevron { transform: rotate(180deg); }

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, padding 0.35s ease;
    padding: 0 1.25rem;
}

@media (min-width: 640px) {
    .faq-content { padding: 0 1.75rem; }
}

.faq-content.open {
    max-height: 1400px;
    padding-bottom: 1.5rem;
}

.forbidden-grid i {
    filter: drop-shadow(0 2px 6px rgba(80, 109, 132, 0.35));
}

/* Banner ads */
.banner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    justify-items: center;
}

@media (min-width: 768px) {
    .banner-grid { grid-template-columns: repeat(3, 1fr); }
}

.banner-grid a {
    width: 100%;
    max-width: 300px;
    transition: transform 0.2s ease;
}

.banner-grid a:hover { transform: scale(1.03); }

/* Reduce motion — только декоративные, не все * (иначе спиннер/карта дёргаются) */
@media (prefers-reduced-motion: reduce) {
    .floating, .pulse-glow { animation: none !important; }
}

/* ========== Mobile overflow & polish ========== */
code, kbd, samp, pre,
.font-mono,
.break-all,
.break-url {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

pre, .pre-wrap {
    white-space: pre-wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Длинные URL / webhook / base_url */
a {
    overflow-wrap: anywhere;
}

/* Flex/grid: дети не раздувают контейнер */
.site-main .flex,
.site-main .grid,
.glass .flex,
.glass .grid {
    min-width: 0;
}

.site-header__inner,
.site-header__inner > div {
    min-width: 0;
}

/* Кнопки: не вылезают, переносят текст */
.btn-primary,
.btn-accent,
.btn-success,
.btn-danger,
.btn-secondary {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
}

/* Бейджи результатов чекера */
.violation-badge,
.success-badge,
.warning-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
    text-align: center;
    word-break: break-word;
}

.violation-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.success-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.warning-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

/* Ряды кнопок на карте / профиле */
.btn-row,
.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
}

.btn-row > a,
.btn-row > button,
.actions-row > a,
.actions-row > button {
    flex: 1 1 auto;
    min-width: min(100%, 8.5rem);
}

/* Карточки точек: координаты */
.point-card,
.coord-line {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* details/summary */
details > summary {
    list-style: none;
    cursor: pointer;
    min-width: 0;
}
details > summary::-webkit-details-marker { display: none; }

/* FAQ title wrap */
.faq-toggle span,
.faq-toggle {
    min-width: 0;
}
.faq-toggle .faq-q {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
}

/* Nested glass: только крупные блоки контента, не иконки/карточки auth */
@media (max-width: 639px) {
    .page-hero {
        margin-bottom: 1.25rem;
    }
    .page-hero h1 {
        font-size: clamp(1.45rem, 7vw, 1.85rem);
    }
    .site-logo {
        font-size: 1.4rem;
    }
    .site-header__inner {
        padding: 0.65rem 0.75rem;
        min-height: 3.5rem;
    }
    .nav-burger {
        width: 2.5rem;
        height: 2.5rem;
    }
    /* CTA / wide buttons */
    .cta-row .btn-primary,
    .cta-row .btn-success {
        padding: 0.9rem 1.1rem;
        font-size: 0.98rem;
    }
    /* Results from checker.js (legacy large paddings) */
    #results-container .glass {
        padding: 1rem !important;
    }
    #results-container h2,
    #results-container h3 {
        font-size: 1.15rem !important;
        line-height: 1.3;
    }
    #results-container .text-3xl,
    #results-container .text-2xl {
        font-size: 1.15rem !important;
    }
    #results-container .text-xl {
        font-size: 1.05rem !important;
    }
    #results-container .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    #results-container .py-4 {
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
    }
    #map-fallback .btn-primary {
        width: 100%;
        padding: 0.9rem 1rem !important;
        font-size: 1rem !important;
    }
    /* Modal full width */
    .modal-panel {
        max-width: 100%;
        border-radius: 1.25rem 1.25rem 0 0;
    }
}

/* ——— Profile layout ——— */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 960px) {
    .profile-layout {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
        gap: 1.25rem;
    }
}

.profile-col--side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.profile-card {
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-md);
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 640px) {
    .profile-card {
        padding: 1.25rem 1.35rem;
    }
}

.profile-card--security {
    padding: 0.9rem 1rem;
}

@media (min-width: 640px) {
    .profile-card--security {
        padding: 1rem 1.15rem;
    }
}

.profile-card__row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.profile-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    min-width: 0;
}

.profile-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--primary);
    font-size: 1.1rem;
}

.profile-card__icon--sm {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.95rem;
    border-radius: 0.7rem;
}

@media (min-width: 640px) {
    .profile-card__icon {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.2rem;
    }
}

.profile-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

@media (min-width: 640px) {
    .profile-card__title {
        font-size: 1.15rem;
    }
}

.profile-card__hint {
    margin: 0.2rem 0 0.65rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.profile-card--security .profile-card__hint {
    margin-bottom: 0.55rem;
}

.profile-card__btn {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 700;
}

@media (min-width: 640px) {
    .profile-card__btn {
        width: auto;
        min-width: 11rem;
        padding: 0.7rem 1.15rem;
    }
}

/* Updates list under security */
.profile-updates {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-updates__empty {
    margin: 0;
    padding: 0.75rem 0 0.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-updates__item {
    border-left: 3px solid var(--accent);
    padding: 0.15rem 0 0.15rem 0.85rem;
    min-width: 0;
}

.profile-updates__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-updates__ver {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 700;
    color: var(--primary);
}

.profile-updates__title {
    margin: 0.25rem 0 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.3;
}

.profile-updates__text {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #4b5563;
    white-space: pre-line;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.profile-card--telegram .profile-card__head {
    margin-bottom: 1rem;
}

@media (min-width: 960px) {
    .profile-card--telegram {
        min-height: 100%;
    }
}

/* ——— Auth (login / register) ——— */
.auth-main {
    flex: 1 1 auto;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    box-sizing: border-box;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem 1.35rem;
    box-sizing: border-box;
    min-width: 0;
}

@media (min-width: 640px) {
    .auth-card {
        padding: 2.25rem 2.5rem;
    }
}

.auth-card__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
    padding: 0 !important; /* не трогать mobile nested-glass */
}

@media (min-width: 640px) {
    .auth-card__icon {
        width: 5rem;
        height: 5rem;
        margin-bottom: 1.25rem;
    }
}

.auth-field {
    position: relative;
    width: 100%;
}

.auth-field .input-glass {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem 0.9rem 2.85rem;
    font-size: 16px; /* iOS no zoom */
    border-radius: var(--radius-xl);
}

.auth-field .input-glass.has-toggle {
    padding-right: 3rem;
}

.auth-field__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(80, 109, 132, 0.55);
    pointer-events: none;
    z-index: 1;
    font-size: 0.95rem;
    line-height: 1;
}

.auth-field__toggle {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 0.35rem;
    z-index: 2;
    line-height: 1;
    max-width: none;
}

.auth-field__toggle:hover {
    color: var(--primary);
}

/* Prevent horizontal scroll from 100vw + scrollbar */
.w-screen { width: 100% !important; max-width: 100% !important; }

/* Tailwind-like helpers used in markup */
.min-w-0 { min-width: 0 !important; }
.break-words { overflow-wrap: anywhere; word-break: break-word; }

/* Input font-size 16px on mobile inputs (Tailwind text-sm often 14px) */
@media (max-width: 639px) {
    input.input-glass,
    textarea.input-glass,
    select.input-glass,
    .input-glass {
        font-size: 16px !important;
    }
}

/* Django templates: local semantic equivalents for the former CDN utilities. */
:root { color-scheme: light; --ink: var(--text); --muted: var(--text-muted); --line: rgba(80,109,132,.16); --paper: var(--background-start); }
[hidden] { display: none !important; }
body { display: flex; flex-direction: column; }
:where(button, input, textarea, select) { font: inherit; }
:where(button) { padding: .85rem 1.25rem; border: 0; border-radius: var(--radius-lg); background: linear-gradient(135deg,var(--primary),var(--accent)); color: white; font-weight: 600; cursor: pointer; }
:where(button):disabled { opacity: .65; cursor: wait; }
a { color: var(--primary); text-underline-offset: .2em; }
a:hover { color: var(--primary-dark); }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid rgba(80,109,132,.65); outline-offset: 4px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }
h1 { margin: 0 0 1.25rem; color: var(--primary); font-size: clamp(1.75rem,4vw,3rem); font-weight: 800; }
h2 { margin: 0 0 .75rem; color: var(--primary); font-size: 1.35rem; font-weight: 700; }
h3 { margin: 0 0 .65rem; color: var(--primary); font-size: 1.1rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.35rem; }
li + li { margin-top: .35rem; }
code, .coordinates, .font-mono { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
code { padding: .15rem .35rem; border-radius: .35rem; background: rgba(80,109,132,.07); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { display: inline-block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.page-hero__icon .icon { width: 2rem; height: 2rem; color: var(--primary); }
.auth-card__icon .icon { width: 1.8rem; height: 1.8rem; color: var(--primary); }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 300; padding: .75rem 1rem; background: white; border-radius: .75rem; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.header-brand-row, .header-menu-row { display: flex; align-items: center; min-width: 0; }
.header-brand-row { gap: 1rem; }
.header-menu-row { gap: .75rem; }
.site-header__inner { gap: .75rem; }
.site-nav-desktop { display: none; gap: .35rem 1.1rem; font-size: .95rem; }
.site-nav-ads { display: none; }
.nav-burger { display: none; padding: 0; }
.has-nav-js .nav-burger { display: inline-flex; }
.nav-logout-form { margin: 0; }
.nav-logout-form .nav-logout { padding: .35rem .15rem; margin: 0; background: transparent; border: 0; color: #dc2626; font-size: inherit; font-weight: 600; border-radius: .35rem; }
.site-drawer__links .nav-logout { display: block; width: 100%; padding: .9rem 1rem; text-align: left; border-radius: var(--radius-md); }
.site-drawer__links .nav-logout:hover { background: rgba(80,109,132,.08); }
.site-drawer__links a.is-active { background: rgba(80,109,132,.08); color: var(--primary-dark); }
.site-drawer__close { display: flex; align-items: center; justify-content: center; padding: 0; }
.site-drawer__ads { margin-top: 1.5rem; }
.site-menu-fallback { position: relative; }
.site-menu-fallback > summary { display: flex; gap: .4rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--primary); font-weight: 600; }
.site-menu-fallback nav { position: absolute; top: calc(100% + .75rem); right: 0; width: min(19rem,85vw); max-height: calc(100vh - var(--header-h) - 1.5rem); max-height: calc(100dvh - var(--header-h) - 1.5rem); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .2rem; background: #fff; padding: .75rem; border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); }
.site-menu-fallback nav a, .site-menu-fallback .nav-logout { display: block; padding: .65rem .75rem; text-decoration: none; }
.has-nav-js .site-menu-fallback { display: none; }
.footer-dot { display: none; opacity: .6; }
.site-footer__inner { flex-wrap: wrap; }
.site-main > .messages { margin-bottom: 1.5rem; }
.messages { width: 100%; }
.message { padding: .9rem 1.1rem; font-size: .95rem; }
.page-panel, .card { background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--surface-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 1.25rem; min-width: 0; max-width: 100%; }
.page-panel { padding: 1.25rem; }
.content-narrow { max-width: 60rem; margin: 0 auto; }
.form-panel { max-width: 48rem; margin: 0 auto; }
.narrow { max-width: 32rem; margin: 0 auto; }
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .75rem; margin: 0 0 .65rem; }
.lead { max-width: 46rem; margin: 0 auto 1.75rem; color: var(--text-muted); font-size: 1.05rem; }
.muted { color: var(--text-muted); font-size: .9rem; }
.grid, .result-grid { display: grid; gap: 1rem; }
.grid { grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-items: start; }
.result-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,16.25rem),1fr)); margin: 1.25rem 0; }
.card-grid > *, .result-grid > *, .grid > * { min-width: 0; }
.result-grid .card { margin: 0; }
.feature-icon { display: flex; justify-content: center; align-items: center; width: 3.75rem; height: 3.75rem; border-radius: 50%; margin: 0 auto 1.25rem; }
.feature-icon .icon { width: 1.6rem; height: 1.6rem; }
.card-feature h2 { font-size: 1.2rem; }
.card-feature .feature-link { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 600; }
.card-feature { display: flex; flex-direction: column; align-items: center; }
.card-feature p { flex: 1; }
.section-spaced { margin-top: 2rem; }
.auth-main { flex-direction: column; gap: 1rem; }
.auth-main > .messages { max-width: 28rem; }
.auth-heading { text-align: center; margin-bottom: 1.5rem; }
.auth-heading h1 { font-size: 1.5rem; font-weight: 900; margin-bottom: .5rem; }
.auth-heading p { font-size: .875rem; }
.auth-heading p { color: var(--text-muted); }
.auth-divider { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: .9rem; }
.auth-divider a { font-weight: 600; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-field label { display: block; margin: 0 0 .45rem; font-size: .9rem; font-weight: 600; color: #374151; }
.form-field input:not([type='checkbox']), .form-field textarea, .form-field select, .input-glass { display: block; width: 100%; border: 1px solid rgba(201,214,223,.65); background: rgba(255,255,255,.55); border-radius: var(--radius-lg); padding: .9rem 1rem; font-size: 1rem; color: var(--text); transition: border-color var(--transition),box-shadow var(--transition),background var(--transition); }
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { outline: 0; border-color: var(--primary); background: rgba(255,255,255,.9); box-shadow: 0 0 0 3px rgba(80,109,132,.15); }
.form-field .auth-field input { padding-left: 2.85rem; padding-right: 3rem; border-radius: var(--radius-xl); }
.form-field input[aria-invalid='true'], .form-field textarea[aria-invalid='true'], .form-field select[aria-invalid='true'] { border-color: rgba(239,68,68,.65); }
.auth-field__toggle { display: flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; }
.auth-field__toggle[aria-pressed='true'] { color: var(--primary); background: rgba(80,109,132,.08); border-radius: .5rem; }
.helptext, .form-field .muted { margin: .4rem 0 0; font-size: .775rem; line-height: 1.5; color: var(--text-muted); }
.errorlist { margin: .5rem 0 0; padding-left: 1.1rem; color: #b91c1c; font-size: .875rem; }
.errorlist.nonfield { padding: .8rem 1rem .8rem 2rem; border: 1px solid rgba(239,68,68,.25); border-left: 4px solid var(--danger); background: rgba(239,68,68,.08); border-radius: var(--radius-md); }
.checkbox-label { display: flex; align-items: center; gap: .6rem; color: #374151; font-size: .875rem; cursor: pointer; }
.checkbox-label input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
.form-submit { width: 100%; min-height: 3.25rem; padding: 1rem 1.25rem; font-size: 1rem; }
.action-link { font-size: .9rem; font-weight: 600; text-decoration: none; }
.profile-data { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0; }
.profile-data dt { color: var(--text-muted); font-size: .8rem; margin-bottom: .25rem; }
.profile-data dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.profile-card .profile-data { padding-top: .5rem; }
.profile-card .btn-primary:not(.profile-card__btn), .profile-card .btn-secondary:not(.profile-card__btn) { padding: .75rem 1rem; }
.profile-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; }
.metric { color: var(--primary); font-size: 2.75rem; line-height: 1.15; font-weight: 800; letter-spacing: -.04em; }
.metric small { font-size: 1.25rem; font-weight: 500; }
.checker-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem 1.25rem; margin-top: 1.25rem; color: var(--text-muted); font-size: .8rem; }
.checker-stats strong { color: var(--primary); }
#coords { min-height: 12rem; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
#results { margin: 1.5rem 0; }
.summary { margin-bottom: 1.25rem; }
.good { border-top: 4px solid var(--success); }
.bad { border-top: 4px solid var(--danger); }
.point p { overflow-wrap: anywhere; }
.coordinates { font-size: .9rem; color: var(--primary); }
.warning { color: #9a4c0e; }
.card.warning { background: rgba(255,251,235,.85); border-color: #fcd68b; }
.map-section { margin: 1.25rem 0; }
.map-section > a { display: inline-block; margin-top: .75rem; font-size: .9rem; font-weight: 600; }
.point-map-toolbar button { padding: .65rem .9rem; border-radius: .8rem; }
.status-chip { display: inline-flex; padding: .3rem .65rem; border-radius: .65rem; color: var(--primary); background: rgba(80,109,132,.09); font-size: .75rem; font-weight: 600; }
.status-new { color: #92400e; background: rgba(249,168,37,.15); }
.status-resolved { color: #047857; background: rgba(16,185,129,.12); }
.complaint-meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.complaint-meta time { color: var(--text-muted); font-size: .8rem; }
.empty-state { padding: 2.5rem 1.5rem; text-align: center; color: var(--text-muted); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; font-size: .9rem; }
.prose h2:not(:first-child) { margin-top: 1.75rem; }
.prose p { color: #4b5563; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; color: var(--primary); font-weight: 700; }
.faq-item > summary .icon { transition: transform .2s ease; }
.faq-item > summary:focus-visible { outline-offset: -4px; border-radius: var(--radius-xl); }
.faq-item[open] > summary .icon { transform: rotate(180deg); }
.faq-answer { padding: 0 1.25rem 1.25rem; font-size: .95rem; color: #4b5563; }
.release-list { display: flex; flex-direction: column; gap: 1rem; }
.release-card { border-left: 4px solid var(--accent); }
.release-meta { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; color: var(--text-muted); font-size: .8rem; margin-bottom: .8rem; }
.release-version { font-weight: 700; color: var(--primary); background: rgba(80,109,132,.08); padding: .25rem .5rem; border-radius: .5rem; }
.domain-link { display: block; overflow-wrap: anywhere; background: rgba(255,255,255,.45); border: 1px solid var(--line); border-radius: .75rem; padding: .75rem; font-size: .875rem; }
.domain-kind { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.content-page .page-hero p { line-height: 1.7; }
.content-page .home-panel .card-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.content-page .card-feature p { line-height: 1.7; }
.content-page .card-feature .feature-link { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .35rem .1rem; }
.content-page .prose { max-width: 52rem; line-height: 1.85; }
.content-page .prose > p { max-width: 74ch; }
.content-page .prose h2 { line-height: 1.4; }
.content-page .faq-item > summary { line-height: 1.55; }
.content-page .faq-answer { line-height: 1.8; }
.content-page .release-card h2, .content-page .release-card p, .content-page .release-version { overflow-wrap: anywhere; }
.content-page .release-card > p:last-child { line-height: 1.8; }
.domain-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,20rem),1fr)); align-items: start; margin:1.25rem auto; }
.domain-card { display: flex; flex-direction: column; gap: 1rem; }
.domain-card__heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.domain-card__heading .domain-kind { margin: .2rem 0 0; }
.domain-card h2 { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.domain-card .domain-link { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 48px; margin-top: auto; text-decoration: none; line-height: 1.65; }
.domain-link > span { min-width: 0; overflow-wrap: anywhere; }
.domain-link:hover { border-color: var(--primary); background: rgba(255,255,255,.8); }
.domain-status { display: inline-flex; align-items: center; min-height: 1.8rem; max-width: 100%; padding: .3rem .65rem; border-radius: .65rem; font-size: .75rem; font-weight: 600; line-height: 1.4; }
.domain-status--available { color: #22613c; background: #edf9f1; }
.domain-status--checking { color: #785613; background: #fffbeb; }
.domain-status--unavailable { color: #963b32; background: #fff1f0; }
.domain-card__updated { margin: 0; color: var(--text-muted); font-size: .75rem; }
.maintenance-panel { max-width: 44rem; line-height: 1.8; text-align: center; }
.maintenance-panel .btn-secondary { min-height: 44px; margin-top: .5rem; padding: .75rem 1rem; }
.banner-grid { margin-top: 2rem; }
.banner-card { width: 100%; max-width: 300px; margin: 0; }
.banner-card img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.banner-card a { display: block; }
/* Standalone reports keep the semantic classes even before their own restyle. */
body > header:not(.site-header) { width: 100%; max-width: 80rem; margin: 0 auto; padding: 1.25rem 1.5rem; }
body > header .brand { color: var(--primary); font-size: 1.65rem; font-weight: 800; text-decoration: none; }
body > header .brand span { display: block; font-size: .7rem; font-weight: 500; }
body > main:not(.site-main):not(.auth-main) { width: 100%; max-width: 80rem; margin: 0 auto; padding: 1.5rem; flex: 1; }
body > footer:not(.site-footer) { padding: 1.25rem; text-align: center; color: var(--text-muted); font-size: .85rem; }
@media (min-width:640px) {
  .site-header__inner { padding: .85rem 1rem; }
  .card { padding: 1.75rem; }
  .page-panel { padding: 2rem; }
  .footer-dot { display: inline; }
  .page-hero__icon .icon { width: 2.5rem; height: 2.5rem; }
  .auth-card__icon .icon { width: 2.15rem; height: 2.15rem; }
  .profile-data { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
  #coords { min-height: 16rem; }
  .faq-item > summary { padding: 1.35rem 1.75rem; }
  .faq-answer { padding: 0 1.75rem 1.5rem; }
}
@media (min-width:900px) {
  .site-nav-desktop { display: flex; }
  .nav-burger, .has-nav-js .nav-burger, .site-menu-fallback { display: none; }
}
@media (min-width:1024px) { .site-nav-ads { display: flex; } }
@media (max-width:767px) {
  .grid { grid-template-columns: minmax(0,1fr); }
  .card { padding: 1.15rem; }
  .checker-stats { gap: .5rem .9rem; }
  .site-footer__inner { gap: .5rem; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .site-drawer__panel, .site-drawer__backdrop, .btn-primary, .btn-success, .btn-secondary { transition: none; }
}

/* Match the original PHP page structure and spacing, including result cards. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.home-panel { margin-bottom: 1.5rem; }
.home-hero { margin-bottom: 2.5rem; }
.home-banners { max-width: 64rem; margin: 3rem auto 0; }
.home-banners:empty { margin: 0; }
.feature-icon { width: 3.5rem; height: 3.5rem; }
.card-feature p { font-size: .95rem; line-height: 1.55; }
.card-feature .feature-link { font-size: .85rem; }
.profile-hero { margin-bottom: 1.5rem; }
.profile-updates-link { margin-top: .85rem; text-align: center; font-size: .8rem; }
.profile-account-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 1.25rem; padding: 1rem 1.1rem; }
.profile-account-strip .profile-data { flex: 1 1 auto; gap: .75rem 1.5rem; }
.profile-account-strip .profile-data dt { font-size: .75rem; }
.profile-account-strip .profile-data dd { font-size: .85rem; }
.profile-account-strip > a { white-space: nowrap; }
.profile-bot-status { margin: 0 0 .75rem; font-size: .875rem; }
.profile-bot-status.success-message { padding: .75rem; border-radius: .75rem; }
.profile-bot-status span { display: block; margin-top: .25rem; font-size: .75rem; }
.profile-bot-form, .profile-bot-actions { display: flex; flex-direction: column; gap: .625rem; }
.profile-bot-form .input-glass { padding: .75rem 1rem; border-radius: .75rem; }
.profile-bot-form .btn-primary, .profile-bot-actions .btn-success { width: 100%; padding: .75rem 1rem; border-radius: .75rem; font-weight: 700; }
.profile-setup { margin-top: .75rem; font-size: .8rem; color: #4b5563; }
.profile-setup > summary { display: flex; gap: .5rem; align-items: center; color: var(--primary); font-weight: 500; }
.profile-setup > summary .icon { width: 1rem; height: 1rem; }
.profile-setup[open] > summary .icon { transform: rotate(180deg); }
.profile-setup ol { margin: .5rem 0 0; padding-left: 1.25rem; }
.checker-panel { padding: 1rem; margin-bottom: 1.5rem; }
.checker-hero { margin-bottom: 1.5rem; }
.checker-form { padding: 1rem; border-radius: 1rem; margin-bottom: 1.5rem; }
.checker-coordinates { margin-bottom: 1rem; }
.checker-coordinates label { display: flex; align-items: center; gap: .5rem; font-size: .875rem; margin-bottom: .5rem; }
.checker-coordinates #coords { min-height: 10rem; padding: .75rem; border-radius: .75rem; font-size: 16px; }
.checker-submit { width: 100%; padding: .875rem 1.25rem; border-radius: .75rem; font-size: 1rem; font-weight: 700; }
.checker-stats { margin-top: 1rem; }
.checker-panel #results { margin: 0 0 1.5rem; }
.checker-summary { padding: 1rem; border-radius: 1rem; margin-bottom: 1rem; }
.checker-summary__head { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: .75rem; }
.checker-summary__head h2 { color: var(--primary); font-size: 1.125rem; font-weight: 900; margin: 0 0 .25rem; }
.checker-summary__head p { margin: 0; color: #4b5563; font-size: .875rem; }
.checker-result-badge { padding: .625rem 1rem; border-radius: .75rem; font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.checker-close-pairs { margin-top: 1rem; padding: .75rem; font-size: .875rem; }
.checker-close-pairs > summary { font-weight: 600; color: var(--primary); }
.checker-close-pairs p { margin: .5rem 0 0; }
.checker-point-report { border-radius: 1rem; overflow: hidden; margin-bottom: 1rem; }
.checker-point-report > summary { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem; background: rgba(255,255,255,.2); color: var(--primary); font-weight: 700; }
.checker-point-report > summary::after { content: '⌄'; font-size: 1.25rem; }
.checker-point-report[open] > summary::after { transform: rotate(180deg); }
.checker-point-report > .result-grid { grid-template-columns: minmax(0,1fr); margin: 0; padding: 0 .75rem .75rem; gap: .75rem; }
.checker-point-card { border-radius: .75rem; padding: .75rem; }
.checker-point-card.is-bad { box-shadow: 0 0 0 2px rgba(248,113,113,.6),var(--shadow-md); }
.checker-point-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; margin-bottom: .75rem; }
.checker-point-card__head h3 { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; color: #16a34a; font-size: .875rem; font-weight: 700; margin: 0; }
.checker-point-card.is-bad .checker-point-card__head h3 { color: #dc2626; }
.checker-point-card__head .success-badge, .checker-point-card__head .violation-badge { padding: .25rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.checker-point-card__data { padding: .625rem; border-radius: .75rem; background: rgba(255,255,255,.3); margin-top: .5rem; }
.checker-point-card__data small { display: block; color: #4b5563; font-size: .75rem; margin-bottom: .125rem; }
.checker-point-card__data .coordinates { color: var(--text); font-size: .875rem; margin: 0; }
.checker-point-card__violations { padding: .625rem; border-radius: .75rem; background: rgba(254,242,242,.5); border: 1px solid #fecaca; margin-top: .5rem; color: #b91c1c; font-size: .875rem; }
.checker-point-card__violations p { margin: 0; }
.checker-point-card__violations p + p { margin-top: .25rem; }
.checker-map-host { margin-bottom: .5rem; }
.checker-map-panel { background: #fff; border: 1px solid rgba(80,109,132,.15); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.checker-map-panel .map-toolbar { background: #f8fafc; border-bottom: 1px solid rgba(80,109,132,.12); padding: .75rem; }
.checker-map-panel .map-toolbar h2, .checker-map-panel .map-toolbar h3 { color: var(--primary); font-size: 1.125rem; font-weight: 700; margin: 0; }
.checker-map-panel .map-toolbar p { margin: .25rem 0 0; color: var(--text-muted); font-size: .75rem; }
.checker-map-surface { padding: .75rem; }
.checker-map-surface .yandex-map { height: 320px; max-height: none; }
@media (min-width:480px) { .checker-map-surface .yandex-map { height: 380px; } }
@media (min-width:640px) {
  .home-panel { padding: 2rem; }
  .feature-icon { width: 4rem; height: 4rem; }
  .auth-heading { margin-bottom: 2rem; }
  .auth-heading h1 { font-size: 2.25rem; }
  .auth-heading p { font-size: 1.125rem; }
  .auth-card .form-stack { gap: 1.25rem; }
  .auth-card .form-submit { font-size: 1.125rem; padding: 1rem 1.25rem; }
  .profile-hero { margin-bottom: 2rem; }
  .profile-account-strip { padding: 1.25rem 1.35rem; }
  .profile-account-strip .profile-data { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-setup { font-size: .875rem; }
  .checker-panel { padding: 2rem; }
  .checker-hero { margin-bottom: 2rem; }
  .checker-form { padding: 2rem; border-radius: 1.5rem; }
  .checker-coordinates { margin-bottom: 1.25rem; }
  .checker-coordinates label { font-size: 1.125rem; }
  .checker-coordinates #coords { min-height: 16rem; padding: 1.25rem; border-radius: 1rem; font-size: 1.05rem; }
  .checker-submit { padding: 1.25rem; border-radius: 1rem; font-size: 1.25rem; }
  .checker-summary { padding: 1.5rem; border-radius: 1.5rem; margin-bottom: 1.5rem; }
  .checker-summary__head { flex-direction: row; align-items: center; gap: 1rem; }
  .checker-summary__head h2 { font-size: 1.5rem; }
  .checker-summary__head p { font-size: 1rem; }
  .checker-result-badge { padding: .75rem 1.5rem; border-radius: 1rem; font-size: 1.25rem; }
  .checker-point-report { border-radius: 1.5rem; margin-bottom: 1.5rem; }
  .checker-point-report > summary { padding: 1.25rem; font-size: 1.25rem; }
  .checker-point-report > .result-grid { gap: 1rem; padding: 0 1.25rem 1.25rem; }
  .checker-point-card { padding: 1rem; border-radius: 1rem; }
  .checker-point-card__head h3 { font-size: 1rem; }
  .checker-point-card__data, .checker-point-card__violations { padding: .75rem; margin-top: .75rem; }
  .checker-map-panel .map-toolbar { padding: 1rem; }
  .checker-map-panel .map-toolbar h2, .checker-map-panel .map-toolbar h3 { font-size: 1.25rem; }
  .checker-map-surface { padding: 1rem; }
}
@media (min-width:768px) {
  .home-panel { padding: 2.5rem; }
  .home-hero { margin-bottom: 3.5rem; }
  .home-banners { margin-top: 4rem; }
  .profile-hero, .checker-hero { margin-bottom: 2.5rem; }
  .checker-point-report > .result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .checker-map-surface .yandex-map { height: 460px; }
}
@media (min-width:1024px) { .checker-map-surface .yandex-map { height: 520px; } }
@media (min-width:1280px) { .checker-point-report > .result-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }

/* Keep navigation usable when advertising titles are longer than the menu. */
.site-nav-ads { min-width: 0; max-width: 15rem; gap: .35rem .75rem; }
.site-nav-ads a { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-drawer__ads a, .profile-card strong { overflow-wrap: anywhere; }
.ticket-notification-badge { display:inline-flex; align-items:center; justify-content:center; min-width:1.35rem; height:1.35rem; padding:0 .35rem; border-radius:1rem; background:#fff0c2; color:#854d0e; font-size:.72rem; font-weight:700; vertical-align:middle; }
.ticket-notification-badge[hidden] { display:none; }
@media (min-width:1024px) and (max-width:1279px) { .site-nav-ads { display: none; } }

/* The catalog stays to the left of the brand, including the no-script header. */
.site-catalog-link { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: .4rem; min-height: 44px; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: .75rem; color: var(--primary); font-size: .85rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.site-catalog-link .icon { width: 1rem; height: 1rem; }
.site-catalog-link:hover, .site-catalog-link[aria-current='page'] { background: #e9f0f5; color: var(--primary-dark); }
@media (max-width: 479px) { .header-brand-row { gap: .55rem; } .site-catalog-link { gap: .3rem; padding: .4rem .5rem; font-size: .8rem; } }
