:root {
    --kk-blue: #302783;
    --kk-green: #009640;
    --kk-green-dark: #007a34;
    --kk-blue-soft: #eef2ff;
    --kk-green-soft: #ecfdf3;
    --text: #172033;
    --muted: #5f6b7a;
    --border: #dfe6ef;
    --surface: #ffffff;
    --surface-soft: #f5f8fc;
    --shadow: 0 20px 60px rgba(20, 32, 51, 0.12);
    --radius: 24px;
    --radius-small: 14px;
    --container: 1160px;
    --font: Tahoma, Verdana, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--surface);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--kk-blue);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    outline-color: var(--kk-green);
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.narrow {
    width: min(760px, calc(100% - 32px));
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -80px;
    z-index: 999;
    padding: 12px 16px;
    background: var(--kk-blue);
    color: #ffffff;
    border-radius: 10px;
}

.skip-link:focus {
    top: 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(223, 230, 239, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    gap: 24px;
}

.brand img {
    display: block;
    width: min(340px, 48vw);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--kk-green);
}

.nav-admin {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.hero {
    padding: 86px 0 72px;
    background:
        radial-gradient(circle at 80% 20%, rgba(0, 150, 64, 0.14), transparent 28%),
        linear-gradient(135deg, #f6fbff 0%, #e9f7ff 48%, #ffffff 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 42px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--kk-green);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin-top: 0;
    color: var(--text);
}

h1 {
    font-size: clamp(2.1rem, 5vw, 4.7rem);
    margin-bottom: 22px;
    letter-spacing: -0.05em;
}

h2 {
    font-size: clamp(1.8rem, 3.2vw, 3rem);
    margin-bottom: 18px;
    letter-spacing: -0.035em;
}

h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.hero-text {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.18rem;
}

.hero-actions,
.card-header-row,
.admin-title-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--kk-green);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 150, 64, 0.25);
}

.button-primary:hover {
    background: var(--kk-green-dark);
    color: #ffffff;
}

.button-secondary {
    background: var(--kk-blue);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(48, 39, 131, 0.18);
}

.button-secondary:hover {
    color: #ffffff;
}

.button-light {
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.button-full {
    width: 100%;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.trust-row span {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-card,
.card,
.form-card,
.feature-card,
.offer-card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-card {
    padding: 34px;
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--kk-green), var(--kk-blue));
}

.price-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.2rem;
}

.price-row strong {
    color: var(--kk-green);
    font-size: 1.75rem;
}

.section {
    padding: 84px 0;
}

.section-soft {
    background: var(--surface-soft);
}

.two-column,
.form-section-grid,
.lead-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 42px;
    align-items: start;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.feature-card,
.offer-card,
.card,
.form-card,
.stat-card {
    padding: 24px;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 12px;
    color: var(--kk-green);
    background: var(--kk-green-soft);
    font-weight: 900;
}

.flyer-preview {
    margin: 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.flyer-preview img {
    display: block;
    border-radius: 18px;
}

.flyer-preview figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 30px;
}

.offer-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.offer-card {
    position: relative;
    overflow: hidden;
}

.offer-card.is-highlighted {
    border-color: rgba(0, 150, 64, 0.45);
}

.ribbon {
    position: absolute;
    right: 22px;
    top: 22px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--kk-green);
    font-size: 0.78rem;
    font-weight: 700;
}

.offer-price {
    color: var(--kk-green);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 10px 0 20px;
}

.info-box {
    padding: 18px;
    border-radius: var(--radius-small);
    border: 1px solid rgba(0, 150, 64, 0.24);
    background: var(--kk-green-soft);
    color: #174b2e;
}

.form-card {
    padding: 30px;
}

.form-grid,
.lead-form {
    display: grid;
    gap: 18px;
}

.two-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
}

textarea {
    resize: vertical;
}

.checkbox-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
    font-weight: 400;
    color: var(--muted);
}

.checkbox-label input {
    width: auto;
    margin-top: 5px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 16px 18px;
    margin-bottom: 18px;
    border-radius: var(--radius-small);
    border: 1px solid transparent;
}

.alert-success {
    color: #0f5132;
    background: #dff7ea;
    border-color: #b7ebcf;
}

.alert-error {
    color: #842029;
    background: #f8d7da;
    border-color: #f5c2c7;
}

.alert ul {
    margin-bottom: 0;
}

.site-footer {
    padding: 42px 0;
    color: #ffffff;
    background: var(--kk-blue);
}

.site-footer a {
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
}

.thank-you-section,
.setup-section {
    min-height: 65vh;
    display: flex;
    align-items: center;
}

.thank-you-card,
.setup-card {
    padding: 36px;
}

.admin-body {
    background: var(--surface-soft);
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    gap: 22px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
}

.admin-brand img {
    width: 36px;
    height: 36px;
}

.admin-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.admin-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.admin-main {
    padding-top: 34px;
    padding-bottom: 64px;
}

.login-wrap {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.login-card,
.narrow-card {
    width: min(520px, 100%);
    margin: 0 auto;
}

.admin-title-row {
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-title-row h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}

.stat-card {
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: var(--kk-green);
    font-size: 2rem;
}

.admin-card {
    margin-bottom: 24px;
    box-shadow: none;
}

.card-header-row {
    justify-content: space-between;
    margin-bottom: 16px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--kk-blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.badge-new {
    background: #e0f2fe;
    color: #075985;
}

.badge-working {
    background: #fef3c7;
    color: #92400e;
}

.badge-offer {
    background: #dcfce7;
    color: #166534;
}

.badge-question {
    background: #fae8ff;
    color: #86198f;
}

.badge-done {
    background: #d1fae5;
    color: #065f46;
}

.badge-muted {
    background: #e5e7eb;
    color: #374151;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 260px auto auto;
    gap: 14px;
    align-items: end;
}

.detail-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px 18px;
}

.detail-list dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
}

.message-box,
.note-item,
.mail-log-item {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.notes-list,
.mail-log-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.note-meta {
    color: var(--muted);
    font-size: 0.86rem;
}

.mail-error {
    margin-top: 8px;
    color: #842029;
    font-size: 0.86rem;
}

.table-actions,
.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--kk-blue);
    text-decoration: underline;
    cursor: pointer;
}

.link-button.danger {
    color: #b42318;
}

.accessibility-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
}

.accessibility-toggle {
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 999px;
    background: var(--kk-green);
    color: #ffffff;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 1.35rem;
}

.accessibility-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    display: grid;
    gap: 8px;
    width: 220px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.accessibility-panel[hidden] {
    display: none;
}

.accessibility-panel button {
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    cursor: pointer;
    text-align: left;
}

.a11y-font-plus {
    font-size: 112%;
}

.a11y-font-minus {
    font-size: 92%;
}

.a11y-contrast body {
    background: #000000;
    color: #ffffff;
}

.a11y-contrast .site-header,
.a11y-contrast .card,
.a11y-contrast .form-card,
.a11y-contrast .feature-card,
.a11y-contrast .offer-card,
.a11y-contrast .hero-card,
.a11y-contrast .admin-header,
.a11y-contrast .stat-card,
.a11y-contrast input,
.a11y-contrast select,
.a11y-contrast textarea {
    background: #111111;
    color: #ffffff;
    border-color: #ffffff;
}

.a11y-contrast h1,
.a11y-contrast h2,
.a11y-contrast h3,
.a11y-contrast a,
.a11y-contrast .site-nav a,
.a11y-contrast .admin-nav a {
    color: #ffffff;
}

.a11y-links a {
    text-decoration: underline !important;
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .two-column,
    .form-section-grid,
    .lead-detail-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid,
    .offer-cards,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-form {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 760px) {
    .accessibility-widget {
        right: 14px;
        bottom: 14px;
    }

    .accessibility-panel {
        right: 0;
        bottom: 62px;
        width: min(260px, calc(100vw - 32px));
        max-height: min(430px, calc(100vh - 120px));
        overflow-y: auto;
    }
}

@media (max-width: 760px) {
    .header-inner,
    .admin-header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .site-nav,
    .admin-nav {
        width: 100%;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .site-nav a,
    .admin-nav a {
        white-space: nowrap;
    }

    .brand img {
        width: min(300px, 76vw);
    }

    .hero {
        padding: 58px 0;
    }

    .section {
        padding: 58px 0;
    }

    .two-fields,
    .detail-list {
        grid-template-columns: 1fr;
    }

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

    .offer-price {
        font-size: 2.1rem;
    }

    .admin-table th,
    .admin-table td {
        white-space: nowrap;
    }
}
