:root {
    --bg: #fff8ed;
    --bg-soft: #fffdf7;
    --card: #ffffff;
    --surface: #fff1dc;
    --text: #2f211a;
    --muted: #75685f;
    --border: #ead9c2;
    --accent: #5e1f0e;
    --accent-dark: #421407;
    --accent-gold: #c69a3c;
    --accent-gold-soft: #f9edcf;
    --accent-blue: #8b7b57;
    --leaf: #757b4b;
    --rose-soft: #fff0e2;
    --berry-soft: #f1d5c1;
    --accent-text: #ffffff;
    --danger: #b42318;
    --success: #757b4b;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background:
        radial-gradient(circle at 8% 4%, rgba(94, 31, 14, 0.10), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(198, 154, 60, 0.15), transparent 24%),
        radial-gradient(circle at 28% 96%, rgba(117, 123, 75, 0.13), transparent 28%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    color: var(--text);
}
a { color: inherit; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    width: min(1180px, calc(100% - 32px));
    margin: 14px auto 0;
    padding: 12px 14px;
    border: 1px solid rgba(234, 217, 194, 0.9);
    border-radius: 999px;
    background: rgba(255, 253, 247, 0.92);
    box-shadow: 0 14px 34px rgba(94, 31, 14, 0.09);
    backdrop-filter: blur(16px);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    font-weight: 950;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    box-shadow: inset 0 0 0 3px rgba(198, 154, 60, 0.34);
}
.site-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    overflow: visible;
}
.site-nav a,
.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 850;
}
.site-nav a:hover,
.site-nav a.active,
.nav-link:hover {
    background: var(--rose-soft);
    color: var(--accent);
}
.mega-trigger {
    position: relative;
}
.site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.button.small {
    padding: 9px 13px;
    font-size: 14px;
}
.mega-menu {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    display: none;
    width: min(1060px, calc(100vw - 32px));
    padding-top: 8px;
    transform: translateX(-42%);
}
.mega-trigger:hover .mega-menu,
.mega-trigger:focus-within .mega-menu {
    display: block;
}
.mega-inner {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 42px rgba(94, 31, 14, 0.08);
    text-align: left;
    max-height: calc(100vh - 120px);
    overflow: auto;
}
.mega-inner h3 {
    margin: 0 0 10px;
    color: var(--leaf);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mega-inner a {
    display: block;
    margin: 8px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
}
.mega-inner a:hover {
    color: var(--accent);
}
.page, .admin-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 32px;
}
.hero, .auth-card, .card, .admin-header, .installer-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 42px rgba(94, 31, 14, 0.08);
}
.hero {
    margin-top: 40px;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255, 240, 226, 0.98), rgba(255, 255, 255, 0.98) 50%),
        radial-gradient(circle at 88% 18%, rgba(198, 154, 60, 0.22), transparent 24%),
        radial-gradient(circle at 12% 86%, rgba(94, 31, 14, 0.09), transparent 24%),
        var(--card);
}
.hero h1 { font-size: clamp(38px, 6vw, 68px); margin: 10px 0; letter-spacing: 0; }
.hero p {
    color: var(--muted);
    font-size: 18px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
.badge {
    display: inline-flex;
    border: 1px solid rgba(94, 31, 14, 0.22);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--text);
    background: var(--rose-soft);
    font-weight: 800;
}
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(94, 31, 14, 0.18);
}
.button:hover { background: var(--accent-dark); color: #ffffff; }
.button.secondary {
    background: var(--accent-gold-soft);
    color: var(--text);
    box-shadow: none;
    border: 1px solid rgba(198, 154, 60, 0.48);
}
.cards, .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.card {
    min-width: 0;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.tool-grid a {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    font-weight: 800;
    color: var(--text);
    box-shadow: 0 10px 24px rgba(94, 31, 14, 0.05);
}
.tool-grid a:hover { border-color: var(--accent); background: var(--rose-soft); }
.card h2, .stat-card h2 { margin-top: 0; }
.card p, .admin-header p { color: var(--muted); }
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 16px;
    box-shadow: 0 10px 30px rgba(94, 31, 14, 0.06);
}
.admin-nav a {
    text-decoration: none;
    font-weight: 800;
    margin-right: 12px;
    color: var(--text);
}
.auth-card {
    width: min(440px, 100%);
    margin: 60px auto;
}
form { display: grid; gap: 12px; }
label { font-weight: 800; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: #ffffff;
}
.admin-form {
    display: grid;
    gap: 16px;
}
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    margin: 8px 0;
}
.check-row input {
    width: auto;
}
.table-card {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
th, td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}
th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.notice {
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 14px;
}
.notice.error { background: #fff4ef; color: var(--danger); }
.notice.success { background: #f2f5e8; color: var(--success); }
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(94, 31, 14, 0.05);
}
.stat-card span { color: var(--muted); }
.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 34px;
}
.check-list {
    display: grid;
    gap: 8px;
    padding: 0;
    list-style: none;
}
.check-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}
.ok { color: var(--success); font-weight: 800; }
.fail { color: var(--danger); font-weight: 800; }
.tool-hero {
    padding: 42px 0 20px;
    text-align: center;
}
.tool-hero h1 {
    font-size: clamp(34px, 7vw, 64px);
    margin: 10px 0;
}
.tool-hero p {
    color: var(--muted);
    font-size: 18px;
}
.upload-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(94, 31, 14, 0.08);
}
.upload-form {
    display: grid;
    gap: 16px;
}
.dropzone {
    display: grid;
    place-items: center;
    min-height: 220px;
    border: 2px dashed rgba(94, 31, 14, 0.36);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 240, 226, 0.9), #ffffff 52%, rgba(198, 154, 60, 0.10));
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone.is-dragging {
    border-color: var(--accent);
    background: var(--rose-soft);
}
.dropzone input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}
.dropzone-title {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}
.dropzone-help {
    color: var(--muted);
    margin-top: 8px;
}
.selected-files {
    color: var(--muted);
    overflow-wrap: anywhere;
}
.job-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 22px 0;
}
.job-meta div {
    background: var(--accent-gold-soft);
    border: 1px solid rgba(201, 162, 39, 0.34);
    border-radius: 12px;
    padding: 14px;
}
.job-meta strong,
.job-meta span {
    display: block;
}
.job-meta strong {
    margin-bottom: 6px;
}
.lead-gate {
    width: min(560px, 100%);
    margin: 24px auto 0;
    padding: 22px;
    text-align: left;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.lead-gate h2 {
    margin: 0;
}
.lead-gate p {
    margin-top: 8px;
}
.ad-slot {
    margin: 18px 0;
    padding: 16px;
    border: 1px dashed rgba(201, 162, 39, 0.55);
    border-radius: 12px;
    background: var(--accent-gold-soft);
    color: var(--text);
    text-align: center;
}
.revenue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.mini-stat {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.mini-stat strong {
    color: var(--accent);
}

.catalog-hero {
    padding: 42px 28px;
}

.catalog-hero h1 {
    max-width: 820px;
    margin-inline: auto;
}

.catalog-hero p {
    max-width: 780px;
    margin-inline: auto;
}

.quick-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.quick-strip a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    background: #ffffff;
    border: 1px solid transparent;
}

.quick-strip a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.value-cards .card {
    box-shadow: none;
}

.catalog-section {
    margin-top: 28px;
}

.catalog-section.compact {
    margin-top: 22px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-heading span {
    order: 2;
    color: var(--leaf);
    font-weight: 900;
    font-size: 13px;
}

.section-heading h2 {
    margin: 0;
    font-size: 26px;
}

.tool-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 12px;
}

.tool-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px 12px;
    align-items: center;
    min-height: 122px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(94, 31, 14, 0.05);
    overflow: hidden;
}

.tool-card:hover {
    border-color: rgba(94, 31, 14, 0.34);
    transform: translateY(-1px);
}

.tool-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent-gold-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 13px;
}

.tool-card strong {
    font-size: 17px;
    line-height: 1.25;
}

.tool-card small {
    grid-column: 2;
    color: var(--muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.seo-band {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid rgba(198, 154, 60, 0.42);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rose-soft), #ffffff 62%);
    text-align: center;
}

.seo-band h2 {
    margin: 0 0 8px;
}

.seo-band p {
    max-width: 740px;
    margin: 0 auto 16px;
    color: var(--muted);
}

.seo-tool-copy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.settings-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 2px 14px;
    margin-bottom: 16px;
}

.page-hero h1 {
    max-width: 840px;
    margin-inline: auto;
}

.page-hero p {
    max-width: 780px;
    margin-inline: auto;
}

.page-cards {
    align-items: stretch;
}

.content-stack {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.content-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(94, 31, 14, 0.05);
}

.content-panel h2 {
    margin-top: 0;
}

.content-panel p,
.contact-panel p {
    color: var(--muted);
}

.contact-panel {
    width: min(720px, 100%);
}

.site-footer {
    margin-top: 28px;
    padding: 36px 0;
    background: linear-gradient(180deg, rgba(255, 240, 226, 0.78), rgba(255, 248, 237, 0.96));
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 22px;
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-grid strong {
    font-size: 22px;
}

.footer-grid p {
    max-width: 360px;
    color: var(--muted);
}

.footer-grid h3 {
    margin: 0 0 10px;
    color: var(--leaf);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: var(--text);
    text-decoration: none;
    font-weight: 750;
}

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

@media (max-width: 720px) {
    .site-header {
        grid-template-columns: 1fr;
        border-radius: 8px;
        position: static;
    }

    .site-nav,
    .site-actions {
        justify-content: flex-start;
    }

    .mega-inner {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .mega-menu {
        position: static;
        display: none;
        width: 100%;
        transform: none;
    }

    .page, .admin-shell {
        width: min(100% - 22px, 1080px);
        padding: 18px 0;
    }

    .hero, .auth-card, .card, .admin-header, .installer-card, .seo-band {
        padding: 20px;
    }

    .hero h1,
    .tool-hero h1 {
        font-size: 36px;
    }

    .tool-card {
        grid-template-columns: 38px 1fr;
    }

    .quick-strip {
        justify-content: flex-start;
        border-radius: 8px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
