:root {
    --ink: #1a2332;
    --muted: #5c6b7a;
    --line: #d5dee8;
    --paper: #f7f9fb;
    --soft: #eef3f7;
    --teal: #0d7377;
    --teal-dark: #095456;
    --amber: #c9783a;
    --coral: #c45c48;
    --green: #2f9e6b;
    --shadow: 0 18px 48px rgba(26, 35, 50, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

body.is-admin {
    background:
        linear-gradient(180deg, #eef4f6 0%, var(--paper) 220px);
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(20px, 5vw, 72px);
    border-bottom: 1px solid rgba(219, 228, 238, 0.72);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    transition: box-shadow 180ms ease, border-color 180ms ease;
}

.site-header.scrolled {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(23, 32, 51, 0.1);
}

.brand,
nav {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    font-weight: 800;
}

.brand span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal), var(--amber));
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 139, 141, 0.24);
}

nav {
    gap: 8px;
}

nav a {
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 10px 12px;
}

nav a:hover {
    background: rgba(13, 115, 119, 0.09);
    color: var(--teal-dark);
}

nav a.is-active {
    background: rgba(13, 115, 119, 0.12);
    color: var(--teal-dark);
}

nav a.nav-accent {
    border: 1px solid rgba(13, 115, 119, 0.28);
    color: var(--teal-dark);
}

nav a.nav-accent:hover,
nav a.nav-accent.is-active {
    background: rgba(13, 115, 119, 0.14);
}

.nav-form {
    margin: 0;
}

.nav-form button {
    border: 0;
    border-radius: 8px;
    background: rgba(231, 111, 81, 0.1);
    color: var(--coral);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 10px 12px;
}

.flash {
    width: min(1180px, calc(100% - 40px));
    margin: 20px auto 0;
    border: 1px solid rgba(15, 139, 141, 0.2);
    border-radius: 8px;
    background: rgba(15, 139, 141, 0.08);
    color: var(--teal-dark);
    font-weight: 800;
    padding: 14px 16px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: clamp(36px, 6vw, 90px);
    align-items: center;
    min-height: 82vh;
    padding: clamp(74px, 9vw, 132px) clamp(20px, 5vw, 72px);
    background:
        radial-gradient(circle at 78% 12%, rgba(244, 162, 97, 0.2), transparent 26%),
        radial-gradient(circle at 12% 88%, rgba(15, 139, 141, 0.14), transparent 24%),
        linear-gradient(135deg, #f9fcfd 0%, #edf6f7 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-family: "Instrument Serif", Georgia, serif;
    font-size: clamp(2.45rem, 5vw, 5.35rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-family: "Instrument Serif", Georgia, serif;
    font-size: clamp(1.9rem, 3.3vw, 3.35rem);
    font-weight: 400;
    line-height: 1.06;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 1.15rem;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 710px;
    font-size: 1.12rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.actions form {
    margin: 0;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button.small {
    min-height: 40px;
    padding: 9px 13px;
}

.primary {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 18px 34px rgba(15, 139, 141, 0.22);
}

.secondary {
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
}

.danger {
    border-color: var(--coral);
    background: #fff;
    color: var(--coral);
}

.danger:hover {
    background: var(--coral);
    color: #fff;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
    margin-top: 38px;
}

.hero-metrics div {
    border: 1px solid rgba(219, 228, 238, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
    padding: 16px;
}

.hero-metrics strong {
    display: block;
    color: var(--teal-dark);
    font-size: 1.6rem;
}

.hero-metrics span {
    color: var(--muted);
    font-weight: 700;
}

.hero-panel,
.card,
.stat,
.form-shell,
.panel,
.workflow-step,
.cta-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 26px;
    transform: perspective(900px) rotateY(-4deg);
}

.score-card {
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 139, 141, 0.92), rgba(23, 32, 51, 0.96)),
        var(--ink);
    color: #fff;
    padding: 28px;
}

.score-card span,
.score-card p {
    color: rgba(255, 255, 255, 0.72);
}

.score-card strong {
    display: block;
    margin: 12px 0;
    color: var(--amber);
    font-size: 5rem;
    line-height: 1;
}

.check-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.check-list p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.check-list span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green);
}

.section,
.page-head,
.stats-grid,
.form-shell,
.dashboard-grid,
.cta-section {
    margin: 0 auto;
    width: min(1180px, calc(100% - 40px));
}

.section {
    padding: 92px 0;
}

.compact {
    padding-top: 48px;
}

.section-head {
    max-width: 780px;
    margin-bottom: 34px;
}

.feature-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.card {
    min-height: 194px;
    padding: 24px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.interactive-card:hover {
    border-color: rgba(15, 139, 141, 0.36);
    box-shadow: 0 28px 80px rgba(23, 32, 51, 0.16);
    transform: translateY(-6px);
}

.page-head {
    padding: 74px 0 34px;
}

.page-head p {
    max-width: 720px;
}

.stat {
    padding: 22px;
}

.stat span {
    color: var(--muted);
    font-weight: 700;
}

.stat strong {
    display: block;
    margin-top: 8px;
    color: var(--teal-dark);
    font-size: 2.6rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
    margin-top: 20px;
}

.panel {
    padding: 26px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-head h2,
.panel h2 {
    font-size: clamp(1.55rem, 2.6vw, 2.2rem);
}

.issue-list,
.task-card {
    display: grid;
    gap: 12px;
}

.issue-list p,
.task-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.critical {
    background: var(--coral);
}

.high {
    background: var(--amber);
}

.medium {
    background: var(--teal);
}

.task-card {
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.task-card strong {
    display: grid;
    flex: 0 0 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: rgba(15, 139, 141, 0.1);
    color: var(--teal-dark);
}

.workflow-band {
    width: 100%;
    padding-left: clamp(20px, 5vw, 72px);
    padding-right: clamp(20px, 5vw, 72px);
    background: var(--soft);
}

.workflow-band .section-head,
.workflow-grid {
    margin-left: auto;
    margin-right: auto;
    max-width: 1180px;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.workflow-step {
    padding: 24px;
}

.workflow-step span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 800;
}

.cta-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 92px;
    padding: clamp(26px, 4vw, 44px);
    background:
        linear-gradient(135deg, rgba(15, 139, 141, 0.94), rgba(23, 32, 51, 0.96)),
        var(--ink);
}

.cta-section h2,
.cta-section p {
    color: #fff;
}

.cta-section .eyebrow {
    color: var(--amber);
}

.form-shell {
    margin-bottom: 90px;
    padding: clamp(22px, 4vw, 42px);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 28px;
}

.panel-form {
    display: grid;
    gap: 16px;
}

.form-note {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(13, 115, 119, 0.18);
    border-radius: 8px;
    background: rgba(13, 115, 119, 0.07);
    padding: 16px;
}

.form-note span {
    color: var(--muted);
}

.upload-field {
    display: grid;
    gap: 8px;
    border: 1px dashed rgba(13, 115, 119, 0.35);
    border-radius: 10px;
    background: rgba(13, 115, 119, 0.04);
    padding: 18px 16px;
}

.upload-label {
    font-weight: 700;
}

.upload-hint {
    color: var(--muted);
    font-weight: 500;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    padding: 13px 14px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(15, 139, 141, 0.58);
    box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

.error {
    color: var(--coral);
    font-weight: 800;
}

.check-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-field input {
    width: auto;
}

.pagination-wrap {
    margin-top: 30px;
}

.pagination-wrap nav {
    display: block;
}

.pagination-wrap svg {
    width: 20px;
    height: 20px;
}

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

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

.lead-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.lead-card:hover {
    border-color: rgba(15, 139, 141, 0.36);
    transform: translateY(-5px);
}

.lead-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.lead-card-head strong,
.lead-score-big {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal), var(--amber));
    color: #fff;
    font-weight: 800;
}

.lead-card-head strong {
    flex: 0 0 54px;
    height: 54px;
    font-size: 1.25rem;
}

.lead-score-big {
    width: 150px;
    height: 150px;
    margin: 22px 0;
    font-size: 4.2rem;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.chip-row.vertical {
    display: grid;
}

.chip-row span {
    border: 1px solid rgba(15, 139, 141, 0.18);
    border-radius: 999px;
    background: rgba(15, 139, 141, 0.08);
    color: var(--teal-dark);
    font-size: 0.86rem;
    font-weight: 800;
    padding: 7px 10px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.copy-box {
    margin-top: 16px;
    background: #f7fbfc;
}

.lead-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.lead-meta p {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.package-box {
    margin-top: 24px;
    border: 1px solid rgba(244, 162, 97, 0.32);
    border-radius: 8px;
    background: rgba(244, 162, 97, 0.1);
    padding: 18px;
}

.package-box h3 {
    margin-bottom: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 26px clamp(20px, 5vw, 72px);
    background: var(--soft);
}

.site-footer p {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

    .hero-panel {
        transform: none;
    }

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

@media (max-width: 700px) {
    .site-header {
        align-items: center;
    }

    .nav-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 72px;
        left: 20px;
        right: 20px;
        display: grid;
        max-height: 0;
        overflow: hidden;
        border: 1px solid transparent;
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow);
        transition: max-height 200ms ease, padding 200ms ease, border-color 200ms ease;
    }

    nav.open {
        max-height: 280px;
        border-color: var(--line);
        padding: 8px;
    }

    nav a {
        padding: 12px;
    }

    .feature-grid,
    .stats-grid,
    .workflow-grid,
    .lead-grid,
    .filter-form,
    .check-grid,
    .lead-meta,
    .form-row,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .actions .button,
    .cta-section .button {
        width: 100%;
    }

    .cta-section,
    .panel-head,
    .site-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .hero {
        min-height: auto;
        padding-top: 54px;
    }
}

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

.activity-timeline {
    display: grid;
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.activity-timeline li {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
}

.activity-timeline strong {
    color: var(--teal-dark);
}

.activity-timeline span {
    float: right;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.activity-timeline p {
    margin: 8px 0 0;
    clear: both;
}

.activity-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    clear: both;
}

.activity-actions > form {
    margin: 0;
}

.activity-actions details {
    flex: 1 1 auto;
}

.activity-actions summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--teal-dark);
}

.activity-actions details form {
    margin-top: 10px;
}
