/* =========================================================================
   CROPGEM Design System
   ========================================================================= */

:root {
    --primary: #1f7a4d;
    --primary-dark: #175c3a;
    --primary-light: #e6f3ec;
    --background: #fafaf8;
    --surface: #ffffff;
    --text: #1a1a1a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --danger-light: #fdecea;
    --success: #16a34a;
    --success-light: #eaf7ee;
    --warning: #b45309;
    --warning-light: #fef6e7;

    --accent-blue: #2563eb;
    --accent-blue-light: #eaf1fd;
    --accent-purple: #7c3aed;
    --accent-purple-light: #f1eafe;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 4px 16px rgba(16, 24, 40, 0.08);

    --font: 'Poppins', 'Noto Sans Devanagari', 'Noto Sans Oriya', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --header-height: 64px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 var(--space-3);
}

p {
    margin: 0 0 var(--space-3);
    color: var(--muted);
}

::selection {
    background: var(--primary-light);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =========================================================================
   Layout
   ========================================================================= */

.site-main {
    min-height: 100vh;
}

body.has-header .site-main {
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.page-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-7) var(--space-5);
}

.page-container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-7) var(--space-5);
}

.page-header {
    margin-bottom: var(--space-6);
}

.page-header h1 {
    font-size: 28px;
}

.page-header p {
    font-size: 15px;
}

/* =========================================================================
   Header / Navigation
   ========================================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.site-header-inner {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-7);
}

.brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-mark {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.primary-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
    padding: var(--space-2) 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

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

.primary-nav a.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.primary-nav a.btn {
    padding: 8px 16px;
    border-bottom: none;
    color: #fff;
}

.primary-nav a.btn:hover {
    border-bottom: none;
    color: #fff;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.nav-user {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.nav-logout {
    color: var(--danger) !important;
}

.site-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

@media (min-width: 761px) {
    /* Nav links sit left, right after the logo; login/CTA/logout stay pinned
       to the far right edge of the header. */
    .site-header-right {
        flex: 1;
    }
    .primary-nav {
        flex: 1;
    }
    .nav-divider,
    .nav-dashboard-link {
        margin-left: auto;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================================================================
   App shell (sidebar layout for the authenticated product area)
   ========================================================================= */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 248px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width 0.2s ease;
}

.app-sidebar.collapsed {
    width: 76px;
}

.app-sidebar.collapsed .app-sidebar-brand-text,
.app-sidebar.collapsed .app-sidebar-nav span,
.app-sidebar.collapsed .app-sidebar-username,
.app-sidebar.collapsed .account-chevron {
    display: none;
}

.app-sidebar.collapsed .app-sidebar-top {
    justify-content: center;
}

.app-sidebar.collapsed .app-sidebar-nav a,
.app-sidebar.collapsed .app-account-trigger {
    justify-content: center;
}

.app-sidebar.collapsed .app-sidebar-collapse svg {
    transform: rotate(180deg);
}

.app-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-3) var(--space-3) var(--space-4);
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 19px;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.02em;
    overflow: hidden;
    white-space: nowrap;
}

.app-sidebar-brand-mark {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-sidebar-brand-mark svg {
    width: 16px;
    height: 16px;
}

.app-sidebar-collapse {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--muted);
    cursor: pointer;
}

.app-sidebar-collapse:hover {
    background: #f4f5f3;
    color: var(--text);
}

.app-sidebar-collapse svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    flex: 1;
}

.app-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar-nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.app-sidebar-nav a:hover {
    background: #f4f5f3;
    color: var(--text);
}

.app-sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--primary);
}

.app-sidebar-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-3);
}

.app-account-menu {
    position: relative;
}

.app-account-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: none;
    border: none;
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
}

.app-account-trigger:hover {
    background: #f4f5f3;
}

.app-sidebar-username {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;
    color: var(--muted);
    flex-shrink: 0;
}

.app-account-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 50;
}

.app-account-popup.open {
    display: block;
}

.app-account-popup-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font);
}

.app-account-popup-item:hover {
    background: var(--primary-light);
}

.app-account-popup-danger {
    color: var(--danger);
}

.app-account-popup-danger:hover {
    background: var(--danger-light);
}

/* =========================================================================
   Language switcher (icon-only trigger + premium dropdown)
   ========================================================================= */

.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(31, 122, 77, 0.07);
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher-trigger:hover,
.lang-switcher-trigger[aria-expanded="true"] {
    background: rgba(31, 122, 77, 0.14);
    color: var(--primary-dark);
}

.lang-switcher-trigger svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.lang-switcher-code {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.lang-switcher-popup {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    overflow: hidden;
    z-index: 60;
    padding: var(--space-1);
}

.lang-switcher-popup.open {
    display: block;
}

.lang-switcher-global {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 1100;
}

.lang-switcher-global .lang-switcher-trigger {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.lang-switcher-global .lang-switcher-trigger:hover,
.lang-switcher-global .lang-switcher-trigger[aria-expanded="true"] {
    background: rgba(31, 122, 77, 0.1);
    border-color: var(--primary);
}

.lang-switcher-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    background: none;
    border: none;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
}

.lang-switcher-option:hover {
    background: var(--primary-light);
}

.lang-switcher-check {
    width: 15px;
    height: 15px;
    color: var(--primary);
    flex-shrink: 0;
    visibility: hidden;
}

.lang-switcher-option[aria-checked="true"] .lang-switcher-check {
    visibility: visible;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.2s ease;
}

.modal-box h3 {
    font-size: 17px;
    margin-bottom: var(--space-2);
}

.modal-box p {
    font-size: 14px;
    margin-bottom: var(--space-5);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.modal-box-lg {
    max-width: 640px;
    max-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    text-align: left;
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    z-index: 5;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text);
}

.avatar-circle-sm {
    width: 32px;
    height: 32px;
    font-size: 14px;
    flex-shrink: 0;
}

.app-main {
    flex: 1;
    min-width: 0;
    background: var(--background);
}

.app-sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.app-sidebar-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.app-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
}

.app-sidebar-overlay.visible {
    display: block;
}

@media (max-width: 760px) {
    .app-sidebar-toggle {
        display: flex;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 1000;
        box-shadow: var(--shadow);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-sidebar.collapsed {
        width: 260px;
    }

    .app-sidebar.collapsed .app-sidebar-brand-text,
    .app-sidebar.collapsed .app-sidebar-nav span,
    .app-sidebar.collapsed .app-sidebar-username,
    .app-sidebar.collapsed .account-chevron {
        display: initial;
    }

    .app-sidebar.collapsed .app-sidebar-nav a,
    .app-sidebar.collapsed .app-account-trigger {
        justify-content: flex-start;
    }

    .app-sidebar-collapse {
        display: none;
    }

    .app-main .page-container,
    .app-main .page-container-narrow {
        padding-top: 72px;
    }
}

/* =========================================================================
   Buttons
   ========================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 11px 20px;
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    border-color: #c9ccd1;
    background: #f7f7f6;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--text);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13.5px;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================================================
   Forms
   ========================================================================= */

.field {
    margin-bottom: var(--space-4);
}

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.field .hint {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: var(--space-1);
}

.input,
select.input,
textarea.input {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 14.5px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input.has-error {
    border-color: var(--danger);
}

.password-field {
    position: relative;
}

.password-field .input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: var(--radius-sm);
}

.password-toggle:hover {
    color: var(--text);
    background: #f2f2f1;
}

.password-strength {
    margin-top: var(--space-2);
    display: none;
    gap: var(--space-2);
    flex-direction: column;
}

.password-strength.visible {
    display: flex;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--danger);
    transition: width 0.2s ease, background 0.2s ease;
}

.strength-bar-fill.weak { background: var(--danger); }
.strength-bar-fill.medium { background: var(--warning); }
.strength-bar-fill.strong { background: var(--success); }

.strength-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    font-size: 12.5px;
    color: var(--muted);
}

.strength-checklist span {
    transition: color 0.15s ease;
}

.strength-checklist span.met {
    color: var(--success);
    font-weight: 500;
}

/* =========================================================================
   Alerts / flash messages
   ========================================================================= */

.flash-stack {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-5) 0;
}

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: var(--space-3);
    border: 1px solid transparent;
    animation: fadeIn 0.2s ease;
}

.alert-success {
    background: var(--success-light);
    color: var(--primary-dark);
    border-color: #cfe9d9;
}

.alert-error {
    background: var(--danger-light);
    color: #9a1c1c;
    border-color: #f3c9c6;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: #cfe9d9;
}

.form-alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    background: var(--danger-light);
    color: #9a1c1c;
    font-size: 13.5px;
    margin-bottom: var(--space-4);
}

/* =========================================================================
   Cards
   ========================================================================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.card-hover {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* =========================================================================
   Badges
   ========================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-low { background: var(--success-light); color: var(--primary-dark); }
.badge-medium { background: var(--warning-light); color: var(--warning); }
.badge-high { background: var(--danger-light); color: #9a1c1c; }
.badge-unknown { background: #eef0f2; color: var(--muted); }

/* =========================================================================
   Tables
   ========================================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    background: #f7f8f7;
    color: var(--muted);
    font-weight: 500;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #fafbfa;
}

.data-table tr.clickable-row {
    cursor: pointer;
}

.data-table td a {
    color: var(--primary-dark);
    font-weight: 500;
    text-decoration: none;
}

.data-table td a:hover {
    text-decoration: underline;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    gap: var(--space-3);
}

.card-header-row h2 {
    margin-bottom: 0;
}

/* =========================================================================
   Loading skeletons / spinner / empty states
   ========================================================================= */

@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #eef0ee 25%, #f6f7f6 37%, #eef0ee 63%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--radius-sm);
}

.skeleton-row {
    height: 44px;
    margin-bottom: var(--space-2);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-dark {
    border: 2px solid var(--border);
    border-top-color: var(--primary);
}

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

.empty-state {
    text-align: center;
    padding: var(--space-7) var(--space-4);
    color: var(--muted);
}

.empty-state::before {
    content: "";
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    border-radius: 50%;
    background-color: var(--primary-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v11a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7'/%3E%3Cpath d='M3 7l2.5-4h13L21 7'/%3E%3Cpath d='M3 7h18'/%3E%3Cline x1='9' y1='11' x2='15' y2='11'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px 26px;
}

.empty-state h3 {
    color: var(--text);
    font-size: 16px;
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: 14px;
    max-width: 360px;
    margin: 0 auto;
}

/* =========================================================================
   Back link (consistent "← back" affordance across detail/form pages)
   ========================================================================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    margin-bottom: var(--space-5);
    transition: color 0.15s ease;
}

.back-link svg {
    width: 15px;
    height: 15px;
    transition: transform 0.15s ease;
}

.back-link:hover {
    color: var(--primary-dark);
}

.back-link:hover svg {
    transform: translateX(-2px);
}

/* =========================================================================
   Page header icon (tinted icon badge beside a page title)
   ========================================================================= */

.page-header-with-icon {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.page-header-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-icon svg {
    width: 22px;
    height: 22px;
}

/* =========================================================================
   Form grid + section dividers (multi-field forms: add/edit crop, etc.)
   ========================================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--space-4);
}

.form-grid .field-span-2 {
    grid-column: 1 / -1;
}

.form-section-divider {
    grid-column: 1 / -1;
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 0 var(--space-4);
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* =========================================================================
   Marketing / home page
   ========================================================================= */

.hero {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.hero-text {
    flex: 1;
    animation: fadeInUp 0.4s ease;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.hero-text h1 {
    font-size: 40px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero-text p.lead {
    font-size: 16px;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: var(--space-5);
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
}

.hero-feature-list {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0 0;
    display: grid;
    gap: var(--space-2);
    font-size: 14px;
    color: var(--muted);
}

.hero-feature-list li::before {
    content: "✓";
    color: var(--primary);
    margin-right: var(--space-2);
    font-weight: 600;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-visual img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-height: 420px;
    object-fit: cover;
}

/* =========================================================================
   Marketing page - sections beyond the hero
   ========================================================================= */

.section {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto var(--space-6);
}

.section-header h2 {
    font-size: 28px;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 15px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.step-item {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.step-item h3 {
    font-size: 16px;
}

.step-item p {
    font-size: 14px;
}

.flow-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-6);
}

.flow-step {
    flex: 1;
    min-width: 180px;
    text-align: center;
    padding: var(--space-5);
}

.flow-step .flow-icon {
    font-size: 22px;
    margin-bottom: var(--space-2);
}

.flow-step h4 {
    font-size: 14.5px;
    margin-bottom: 4px;
}

.flow-step p {
    font-size: 13px;
    margin: 0;
}

.flow-arrow {
    color: var(--muted);
    font-size: 20px;
}

.market-explainer {
    display: flex;
    align-items: center;
    gap: var(--space-7);
}

.market-explainer-text {
    flex: 1;
}

.market-explainer-card {
    flex: 1;
}

.market-explainer-card .market-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.final-cta {
    text-align: center;
    padding: var(--space-8) var(--space-5);
    background: var(--primary-dark);
    color: #fff;
}

.final-cta h2 {
    color: #fff;
    font-size: 28px;
    margin-bottom: var(--space-5);
}

.final-cta .btn-primary {
    background: #fff;
    color: var(--primary-dark);
}

.final-cta .btn-primary:hover {
    background: #f0f0f0;
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-7) var(--space-5) var(--space-5);
}

.site-footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-6);
}

.site-footer-brand {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--space-2);
}

.site-footer-links {
    display: flex;
    gap: var(--space-7);
    flex-wrap: wrap;
}

.site-footer-links h4 {
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: var(--space-3);
}

.site-footer-links a {
    display: block;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    margin-bottom: var(--space-2);
}

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

.site-footer-bottom {
    max-width: 1080px;
    margin: var(--space-6) auto 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}

/* =========================================================================
   Authentication (login / register / otp / forgot password)
   ========================================================================= */

.auth-layout {
    min-height: 100vh;
    display: flex;
}

.auth-brand-panel {
    flex: 1;
    background: var(--primary-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    right: -160px;
    bottom: -160px;
}

.auth-brand-mark {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-7);
    letter-spacing: -0.02em;
}

.auth-brand-panel h1 {
    color: #fff;
    font-size: 32px;
    max-width: 420px;
    letter-spacing: -0.01em;
}

.auth-brand-panel p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 400px;
    font-size: 15px;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--surface);
}

.auth-form-card {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.35s ease;
}

.auth-form-card h2 {
    font-size: 22px;
    margin-bottom: var(--space-1);
}

.auth-form-card > p {
    font-size: 14px;
    margin-bottom: var(--space-6);
}

.auth-form-footer {
    margin-top: var(--space-5);
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

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

.auth-form-footer a:hover {
    text-decoration: underline;
}

.auth-links-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    margin-bottom: var(--space-4);
}

.auth-links-row a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.auth-links-row a:hover {
    color: var(--primary-dark);
}

.otp-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.otp-card {
    width: 100%;
    max-width: 380px;
    text-align: center;
    padding: var(--space-6);
    animation: fadeInUp 0.35s ease;
}

.otp-card .otp-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.otp-card .otp-icon svg {
    width: 22px;
    height: 22px;
}

.otp-input {
    text-align: center;
    letter-spacing: 10px;
    font-size: 22px;
    font-weight: 600;
}

.otp-resend {
    margin-top: var(--space-4);
    font-size: 13.5px;
}

.otp-resend button {
    background: none;
    border: none;
    color: var(--primary-dark);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-size: 13.5px;
}

/* =========================================================================
   Dashboard
   ========================================================================= */

/* Shared accent-color modifiers for icon badges across stat tiles, feature
   cards, crop tiles and market cards - gives the app visual variety instead
   of every icon being the same green tint. */
.icon-accent-blue {
    background: var(--accent-blue-light) !important;
    color: var(--accent-blue) !important;
}

.icon-accent-purple {
    background: var(--accent-purple-light) !important;
    color: var(--accent-purple) !important;
}

.icon-accent-amber {
    background: var(--warning-light) !important;
    color: var(--warning) !important;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-6);
    margin-bottom: var(--space-6);
    color: #fff;
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    right: -120px;
    top: -140px;
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    right: 60px;
    bottom: -140px;
}

.dashboard-hero h1 {
    color: #fff;
    position: relative;
}

.dashboard-hero p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0;
    position: relative;
}

.avatar-circle {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-tile {
    padding: var(--space-4) var(--space-5);
}

.stat-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.stat-tile-icon svg {
    width: 18px;
    height: 18px;
}

.stat-label {
    font-size: 12.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-2);
}

.stat-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

/* =========================================================================
   Dashboard charts (real data only - see app.py:dashboard())
   ========================================================================= */

.chart-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.chart-card h3 {
    font-size: 15px;
    margin-bottom: 2px;
}

.chart-card > p {
    font-size: 13px;
    margin-bottom: var(--space-4);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.chart-card-header p {
    margin-bottom: 0;
}

.chart-big-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    height: 120px;
}

.bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar-chart-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.bar-chart-bar {
    width: 100%;
    min-height: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 3px 3px 0 0;
    transition: opacity 0.15s ease;
}

.bar-chart-col:hover .bar-chart-bar {
    opacity: 0.85;
}

.bar-chart-label {
    margin-top: var(--space-2);
    font-size: 11.5px;
    color: var(--muted);
}

.severity-donut-row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.severity-donut {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.donut-seg-low { stroke: var(--success); }
.donut-seg-medium { stroke: var(--warning); }
.donut-seg-high { stroke: var(--danger); }
.donut-seg-unknown { stroke: var(--muted); }

.severity-legend {
    display: grid;
    gap: var(--space-2);
    font-size: 13px;
    color: var(--text);
}

.severity-legend b {
    margin-left: var(--space-1);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--space-2);
}

.dot-low { background: var(--success); }
.dot-medium { background: var(--warning); }
.dot-high { background: var(--danger); }
.dot-unknown { background: var(--muted); }

@media (max-width: 760px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.feature-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.feature-card {
    display: flex;
    flex-direction: column;
}

.feature-card .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 18px;
}

.feature-card .feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-card h2 {
    font-size: 17px;
}

.feature-card p {
    font-size: 14px;
    flex: 1;
}

.feature-card .btn {
    align-self: flex-start;
    margin-top: var(--space-3);
}

/* Disease detection widget */

.upload-card {
    margin-top: var(--space-2);
}

.disease-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.disease-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.disease-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--background);
    border: 1.5px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.disease-step-label {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.disease-step.active .disease-step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.disease-step.active .disease-step-label {
    color: var(--primary-dark);
}

.disease-step.completed .disease-step-number {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.disease-step-connector {
    width: 40px;
    height: 1.5px;
    background: var(--border);
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.disease-step-connector.completed {
    background: var(--primary);
}

.upload-intro {
    text-align: center;
    padding: var(--space-7) var(--space-4);
    animation: fadeInUp 0.25s ease;
}

.upload-intro-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.upload-intro-icon svg {
    width: 26px;
    height: 26px;
}

.upload-intro h3 {
    font-size: 18px;
    margin-bottom: var(--space-2);
}

.upload-intro p {
    font-size: 14px;
    max-width: 380px;
    margin: 0 auto var(--space-5);
}

.upload-dropzone {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: var(--space-7) var(--space-5);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-dropzone .upload-icon {
    font-size: 28px;
    margin-bottom: var(--space-3);
    color: var(--primary);
}

.upload-dropzone p {
    margin-bottom: var(--space-1);
    font-size: 14.5px;
    color: var(--text);
}

.upload-dropzone .hint {
    color: var(--muted);
}

.upload-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    color: var(--muted);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.upload-divider::before,
.upload-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.upload-preview {
    display: none;
    align-items: center;
    gap: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
}

.upload-preview.visible {
    display: flex;
}

.upload-preview img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.upload-preview-info {
    flex: 1;
    min-width: 0;
}

.upload-preview-info .filename {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-analyzing {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    font-size: 14px;
    color: var(--muted);
}

.upload-analyzing.visible {
    display: flex;
}

.disease-result {
    display: none;
    margin-top: var(--space-6);
    animation: fadeInUp 0.3s ease;
}

.disease-result.visible {
    display: block;
}

.disease-summary-card {
    margin-bottom: var(--space-4);
}

.disease-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}

.disease-summary-main {
    flex: 1;
    min-width: 200px;
}

.disease-summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.disease-summary-crop {
    font-size: 22px;
    margin-bottom: 0;
}

.disease-summary-disease {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.disease-summary-explanation {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 4px;
}

.confidence-meter-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: var(--space-2);
}

.confidence-meter-value {
    font-weight: 600;
    color: var(--text);
}

.confidence-meter-track {
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.confidence-meter-fill.confidence-high { background: var(--success); }
.confidence-meter-fill.confidence-medium { background: var(--warning); }
.confidence-meter-fill.confidence-low { background: var(--muted); }

.disease-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.disease-detail-card {
    animation: fadeInUp 0.25s ease;
}

.disease-detail-card-primary {
    border-color: var(--primary);
    background: var(--primary-light);
}

.disease-detail-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.disease-detail-card-primary .disease-detail-icon {
    background: var(--surface);
}

.disease-detail-icon svg {
    width: 16px;
    height: 16px;
}

.disease-detail-card h4 {
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.disease-detail-card ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

.disease-detail-card-full {
    grid-column: 1 / -1;
}

.medication-name {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
}

.medication-subsection {
    margin-top: var(--space-3);
}

.medication-subsection-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.medication-subsection ul {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
}

.medication-name-unavailable {
    color: var(--muted);
    background: var(--border);
    font-weight: 500;
}

.medication-precautions {
    background: var(--warning-light);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
}

.medication-precautions .medication-subsection-label {
    color: var(--warning);
}

.disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    background: var(--warning-light);
    color: var(--warning);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font-size: 13px;
    line-height: 1.5;
}

.disclaimer-box svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* =========================================================================
   Disease scan history
   ========================================================================= */

.scan-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
}

.scan-history-card {
    display: block;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.scan-history-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: var(--background);
}

.scan-history-body {
    padding: var(--space-4);
}

.scan-history-body h3 {
    font-size: 15px;
    margin-bottom: 2px;
}

.scan-history-disease {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: var(--space-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.scan-history-date {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
}

.scan-detail-image-card {
    padding: 0;
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.scan-detail-image-card img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

/* =========================================================================
   Crop intelligence page
   ========================================================================= */

.crop-search-bar {
    margin-bottom: var(--space-4);
}

.crop-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}

.crop-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.crop-chip {
    appearance: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.crop-chip:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.crop-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.crop-results-count {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.crop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
}

.crop-tile {
    cursor: pointer;
    text-align: left;
    position: relative;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.crop-tile:hover {
    border-color: var(--primary);
}

.crop-tile-photo {
    position: relative;
    width: 100%;
    height: 112px;
    background: var(--primary-light);
    overflow: hidden;
    flex-shrink: 0;
}

.crop-tile-photo.icon-rabi { background: var(--accent-blue-light); }
.crop-tile-photo.icon-kharif { background: var(--warning-light); }
.crop-tile-photo.icon-mixed { background: var(--accent-purple-light); }

.crop-tile-photo-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-dark);
}

.crop-tile-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.crop-tile:hover .crop-tile-photo img {
    transform: scale(1.05);
}

.crop-tile-body {
    padding: var(--space-4);
}

.crop-tile-body h3 {
    font-size: 16px;
    margin-bottom: 2px;
}

.crop-tile .season {
    font-size: 12.5px;
    color: var(--primary-dark);
    background: var(--primary-light);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: var(--space-2);
    white-space: nowrap;
}

.crop-tile .season.season-rabi { color: var(--accent-blue); background: var(--accent-blue-light); }
.crop-tile .season.season-kharif { color: var(--warning); background: var(--warning-light); }
.crop-tile .season.season-zaid { color: var(--primary-dark); background: var(--primary-light); }
.crop-tile .season.season-mixed { color: var(--accent-purple); background: var(--accent-purple-light); }

.crop-search-bar {
    position: relative;
}

.crop-search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted);
    pointer-events: none;
}

.crop-search-bar input.input {
    padding-left: 40px;
}


.crop-detail-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.crop-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--primary-light), var(--surface) 85%);
    border-bottom: 1px solid var(--border);
}

.crop-modal-header-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.crop-modal-header-icon svg {
    width: 24px;
    height: 24px;
}

.crop-modal-header-icon-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.crop-modal-header-icon img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.crop-modal-header-text {
    flex: 1;
    min-width: 0;
    padding-right: var(--space-6);
}

.crop-modal-header-text h1,
.crop-modal-header-text h2 {
    font-size: 21px;
    margin-bottom: 2px;
    color: var(--primary-dark);
}

.crop-modal-scientific {
    font-style: italic;
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

.crop-modal-season {
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
}

.crop-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--space-5) var(--space-6);
}

.crop-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.crop-modal-tile {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
}

.crop-modal-tile-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crop-modal-tile-icon svg {
    width: 14px;
    height: 14px;
}

.crop-modal-tile-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 2px;
}

.crop-modal-tile-value {
    font-size: 13.5px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.4;
}

.crop-modal-section-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.crop-modal-section-label svg {
    width: 14px;
    height: 14px;
}

.crop-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.crop-modal-tag {
    background: var(--danger-light);
    color: #9a1c1c;
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
}

.crop-modal-notes {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: var(--space-5);
}

.crop-modal-source {
    font-size: 12px;
    color: var(--muted);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

/* =========================================================================
   Market prices page
   ========================================================================= */

.filter-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    align-items: end;
}

.filter-bar .field {
    margin-bottom: 0;
    position: relative;
}

.optional-label {
    font-weight: 400;
    color: var(--muted);
}

.market-filter-card {
    margin-bottom: var(--space-6);
}

.filter-bar-simple {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: end;
}

.market-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.market-results-header h2 {
    font-size: 19px;
    margin-bottom: 4px;
}

.market-results-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

.best-price-callout {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font-size: 13.5px;
    margin-bottom: var(--space-5);
}

.market-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.market-result-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.market-result-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.market-result-icon svg {
    width: 15px;
    height: 15px;
}

.market-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
}

.market-result-header-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.best-price-callout {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.best-price-callout svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.market-result-header h3 {
    font-size: 16px;
    margin: 0;
}

.market-result-header span {
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}

.market-result-crop {
    font-size: 13.5px;
    color: var(--text);
}

.market-result-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border);
    margin-top: var(--space-1);
}

.modal-price-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.modal-price-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
}

.modal-price-value span {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.min-max-block {
    text-align: right;
    font-size: 12.5px;
    color: var(--muted);
    display: grid;
    gap: 2px;
}

.market-result-footer {
    font-size: 12px;
    color: var(--muted);
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    font-size: 10px;
    cursor: help;
    position: relative;
}

.info-tooltip:hover::after,
.info-tooltip:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: var(--text);
    color: #fff;
    font-size: 12px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    line-height: 1.4;
    z-index: 30;
    text-transform: none;
    letter-spacing: normal;
}

.about-prices-card p {
    font-size: 13.5px;
}

.about-prices-card .hint {
    color: var(--muted);
    font-size: 12.5px;
}

.market-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* =========================================================================
   Error page
   ========================================================================= */

.error-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-6);
}

.error-page .error-code {
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-2);
}

.error-page h1 {
    font-size: 24px;
    margin-bottom: var(--space-4);
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 900px) {
    .filter-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: var(--space-6);
    }

    .hero-text p.lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-feature-list {
        justify-items: center;
    }

    .feature-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stat-row {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .market-explainer {
        flex-direction: column;
    }

    .flow-step {
        min-width: 140px;
    }
}

@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-3) var(--space-5) var(--space-4);
        gap: var(--space-1);
        display: none;
        box-shadow: var(--shadow);
    }

    .primary-nav.open {
        display: flex;
    }

    .primary-nav a {
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--border);
    }

    .primary-nav a.btn {
        padding: 10px 16px;
        border-bottom: none;
        margin-top: var(--space-2);
        text-align: center;
    }

    .nav-divider {
        display: none;
    }

    .nav-user {
        padding: var(--space-3) 0;
    }

    .auth-layout {
        flex-direction: column;
    }

    .auth-brand-panel {
        padding: var(--space-6) var(--space-5);
        flex: none;
    }

    .auth-brand-panel h1 {
        font-size: 24px;
    }

    .feature-grid,
    .feature-grid-3 {
        grid-template-columns: 1fr;
    }

    .crop-modal-grid {
        grid-template-columns: 1fr;
    }

    .crop-modal-header {
        flex-wrap: wrap;
    }

    .crop-modal-season {
        margin-top: 0;
    }

    .site-footer-links {
        gap: var(--space-5);
    }

    .flow-preview {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .page-container,
    .page-container-narrow {
        padding: var(--space-5) var(--space-4);
    }
}

@media (max-width: 520px) {
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .upload-dropzone {
        padding: var(--space-6) var(--space-3);
    }

    .disease-summary-row {
        flex-direction: column;
    }

    .disease-detail-grid {
        grid-template-columns: 1fr;
    }
}

.language-gate-card {
    max-width: 420px;
}

.language-gate-heading {
    line-height: 1.5;
}

.language-gate-sub {
    color: var(--muted);
    margin-bottom: var(--space-5);
}

.language-gate-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.language-gate-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.language-gate-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.language-gate-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.language-gate-option-label {
    font-weight: 600;
}

.language-gate-continue {
    margin-top: var(--space-4);
}

/* =========================================================================
   Marketing home v2 — pixel-reference redesign
   ========================================================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.in-view > * {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-stagger.in-view > *:nth-child(1) { animation-delay: 0.02s; }
.reveal-stagger.in-view > *:nth-child(2) { animation-delay: 0.08s; }
.reveal-stagger.in-view > *:nth-child(3) { animation-delay: 0.14s; }
.reveal-stagger.in-view > *:nth-child(4) { animation-delay: 0.2s; }
.reveal-stagger.in-view > *:nth-child(5) { animation-delay: 0.26s; }
.reveal-stagger.in-view > *:nth-child(6) { animation-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ---- Header: scroll state + dropdown nav ---- */

.site-header {
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(16, 24, 40, 0.08);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
    padding: var(--space-2) 0;
}

.nav-dropdown-trigger:hover {
    color: var(--text);
}

.nav-dropdown-trigger svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.nav-dropdown.open .nav-dropdown-trigger {
    color: var(--primary-dark);
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translate(-50%, 8px);
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1100;
}

.nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 10px var(--space-3);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease;
}

.nav-dropdown-item:hover {
    background: var(--primary-light);
}

.nav-dropdown-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-dropdown-item-icon svg {
    width: 16px;
    height: 16px;
}

.nav-dropdown-item strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
}

.nav-dropdown-item small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.nav-cta {
    border-radius: 999px !important;
}

/* ---- Hero v2 ---- */

.hero2 {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px var(--space-5) var(--space-7);
}

.hero2-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.hero2-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.hero2-badge svg {
    width: 13px;
    height: 13px;
}

.hero2-text h1 {
    font-size: 46px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: var(--space-4);
}

.hero2-text h1 .text-accent {
    color: var(--primary);
    background: linear-gradient(90deg, var(--primary) 0%, #2fae73 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero2-lead {
    font-size: 17px;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: var(--space-6);
}

.hero2-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.btn-lg {
    padding: 13px 26px;
    font-size: 15px;
    border-radius: 999px;
}

.hero2-demo {
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.hero2-demo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero2-demo-icon svg {
    width: 15px;
    height: 15px;
}

.hero2-demo:hover .hero2-demo-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(31, 122, 77, 0.22);
}

.hero2-stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    padding: 0;
    margin: 0;
}

.hero2-stats li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
}

.hero2-stats li svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.hero2-stats li strong {
    color: var(--text);
    font-weight: 600;
}

.hero2-visual {
    position: relative;
}

.hero2-photo {
    position: relative;
    height: 440px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero2-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(23, 92, 58, 0.05) 10%, rgba(10, 36, 22, 0.55) 100%);
}

.hero2-drone {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    box-shadow: var(--shadow);
    z-index: 2;
    animation: droneFloat 4.5s ease-in-out infinite;
}

.hero2-drone svg {
    width: 22px;
    height: 22px;
}

@keyframes droneFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -14px); }
}

.hero2-mock {
    position: absolute;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 20px 48px rgba(16, 24, 40, 0.22);
    animation: fadeInUp 0.6s ease 0.15s both, mockFloat 6s ease-in-out infinite 0.8s;
    z-index: 3;
}

.hero2-mock-laptop {
    width: 300px;
    left: -24px;
    bottom: -28px;
    padding: var(--space-4);
    border: 1px solid var(--border);
}

.hero2-mock-phone {
    width: 128px;
    top: -22px;
    right: -14px;
    padding: var(--space-3) var(--space-3) 14px;
    border: 1px solid var(--border);
    animation-delay: 0.3s, 1.6s;
}

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

.mock-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mock-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-dark);
}

.mock-brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--primary);
}

.mock-greeting {
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mock-sub {
    font-size: 10.5px;
    color: var(--muted);
    margin-bottom: 10px;
}

.mock-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.mock-stat {
    background: var(--background);
    border-radius: 8px;
    padding: 6px 7px;
    font-size: 9px;
    color: var(--muted);
}

.mock-stat strong {
    display: block;
    font-size: 12px;
    color: var(--text);
}

.mock-stat.mock-stat-warn strong { color: var(--danger); }
.mock-stat.mock-stat-up strong { color: var(--success); }

.mock-chart-card {
    background: var(--background);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-chart-sparkline {
    flex: 1;
    height: 30px;
}

.mock-thumb {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: linear-gradient(135deg, #6fae4e, #2d5d2a);
    flex-shrink: 0;
}

.mock-chart-label {
    font-size: 9px;
    color: var(--muted);
}

.mock-chart-value {
    font-size: 9px;
    font-weight: 700;
    color: var(--danger);
}

.mock-phone-scan {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #577a3a, #2b4522);
    position: relative;
    margin-bottom: 8px;
    overflow: hidden;
}

.mock-phone-scan::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 6px;
}

.mock-phone-scan-line {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: #7fe3a8;
    box-shadow: 0 0 8px 1px #7fe3a8;
    animation: scanLine 2.4s ease-in-out infinite;
}

@keyframes scanLine {
    0%, 100% { top: 10px; }
    50% { top: calc(100% - 12px); }
}

.mock-phone-label {
    font-size: 9px;
    font-weight: 600;
    text-align: center;
}

.mock-phone-sub {
    font-size: 8px;
    color: var(--muted);
    text-align: center;
}

/* ---- Trust bar ---- */

.trustbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5);
    text-align: center;
}

.trustbar-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: var(--space-5);
}

.trustbar-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trustbar-stat svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
    flex-shrink: 0;
}

.trustbar-stat strong {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trustbar-stat-label {
    margin-top: var(--space-2);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

/* ---- Feature grid v2 ---- */

.mkt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.mkt-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.mkt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(16, 24, 40, 0.1);
    border-color: transparent;
}

.mkt-card-accent {
    background: var(--primary-light);
    border-color: transparent;
}

.mkt-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.mkt-card-icon svg {
    width: 20px;
    height: 20px;
}

.mkt-card-body {
    flex: 1;
    min-width: 0;
}

.mkt-card-body h3 {
    font-size: 15.5px;
    margin-bottom: 4px;
}

.mkt-card-body p {
    font-size: 13.5px;
    margin: 0;
    color: var(--muted);
}

.mkt-card-arrow {
    flex-shrink: 0;
    color: var(--muted);
    margin-top: 10px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mkt-card-arrow svg {
    width: 16px;
    height: 16px;
}

.mkt-card:hover .mkt-card-arrow {
    transform: translateX(4px);
    color: var(--primary-dark);
}

/* ---- Steps v2 ---- */

.steps-grid2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    position: relative;
}

.step-item2 {
    text-align: left;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    transition: transform 0.2s ease;
}

.step-item2:hover {
    transform: translateY(-3px);
}

.step-item2-top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.step-number2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.step-arrow2 {
    display: none;
    color: var(--border);
    flex-shrink: 0;
}

@media (min-width: 761px) {
    .step-arrow2 {
        display: flex;
        position: absolute;
        top: 22px;
    }
    .step-arrow2-1 { left: calc(33.333% - 20px); }
    .step-arrow2-2 { left: calc(66.666% - 20px); }
}

.step-item2 h3 {
    font-size: 16.5px;
}

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

/* ---- AI Crop Health ---- */

.ai-health-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--danger-light);
    color: #b32424;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.ai-health-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 0.9fr;
    gap: var(--space-5);
    align-items: center;
}

.ai-health-text h2 {
    font-size: 28px;
    margin-bottom: var(--space-3);
}

.ai-health-text p {
    font-size: 14.5px;
    margin-bottom: var(--space-5);
}

.ai-health-metrics {
    display: flex;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.ai-health-metric strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 19px;
    color: var(--text);
}

.ai-health-metric strong svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.ai-health-metric span {
    font-size: 12.5px;
    color: var(--muted);
}

.compare-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3.1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    user-select: none;
    cursor: ew-resize;
}

.compare-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.compare-layer svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.compare-layer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compare-after img {
    filter: saturate(1.08) contrast(1.05);
}

.compare-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.compare-credit {
    position: absolute;
    bottom: 10px;
    right: 14px;
    z-index: 3;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.compare-credit a {
    color: inherit;
}

.compare-before { z-index: 1; }

.compare-after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

.compare-handle-wrap {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    z-index: 4;
    pointer-events: none;
}

.compare-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.compare-handle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.3);
    color: var(--primary-dark);
}

.compare-handle svg {
    width: 16px;
    height: 16px;
}

.compare-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 5;
    -webkit-appearance: none;
}

.compare-tag {
    position: absolute;
    top: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    background: rgba(10, 20, 15, 0.6);
    color: #fff;
    z-index: 3;
    backdrop-filter: blur(3px);
}

.compare-tag-before { left: 14px; }
.compare-tag-after {
    right: 14px;
    background: var(--primary);
}

.ai-health-result {
    padding: var(--space-5);
}

.ai-health-result-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-weight: 700;
    font-size: 14.5px;
    margin-bottom: 4px;
}

.ai-health-result-head svg {
    width: 18px;
    height: 18px;
}

.ai-health-confidence {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.ai-health-treatment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
    display: grid;
    gap: 8px;
}

.ai-health-treatment-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
}

.ai-health-treatment-list li svg {
    width: 15px;
    height: 15px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- Market data v2 ---- */

.market2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.85fr;
    gap: var(--space-5);
    align-items: center;
}

.market2-text h2 {
    font-size: 28px;
}

.market2-text p {
    font-size: 14.5px;
}

.market2-chart {
    padding: var(--space-5);
}

.market2-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.market2-chart-head h4 {
    font-size: 14.5px;
    margin: 0;
}

.market2-chart-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
    background: var(--success-light);
    padding: 3px 9px;
    border-radius: 999px;
}

.market2-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.market2-chart-path {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.in-view .market2-chart-path {
    stroke-dashoffset: 0;
}

.market2-chart-fill {
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
}

.in-view .market2-chart-fill {
    opacity: 1;
}

.market2-chart-point {
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.3s ease 1.3s, transform 0.3s ease 1.3s;
}

.in-view .market2-chart-point {
    opacity: 1;
}

.market2-chart-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10.5px;
    color: var(--muted);
}

.market2-table {
    padding: var(--space-5);
}

.market2-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.market2-table-head h4 {
    font-size: 14.5px;
    margin: 0;
}

.market2-table-head a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: none;
}

.market2-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.market2-row:first-of-type {
    border-top: none;
}

.market2-row-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    overflow: hidden;
}

.market2-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market2-row-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 600;
}

.market2-row-price {
    font-size: 13.5px;
    font-weight: 600;
}

.market2-row-change {
    font-size: 12px;
    font-weight: 700;
    color: var(--success);
}

/* ---- Testimonial v2 ---- */

.testimonial2-section .section-header {
    max-width: 640px;
}

.testimonial2 {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 var(--space-7);
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.testimonial2-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-7);
    box-shadow: var(--shadow);
    flex: 1;
}

.testimonial2-portrait {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border);
}

.testimonial2-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonial2-quote {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: var(--space-4);
}

.testimonial2-quote::before {
    content: "\201C";
    display: block;
    color: var(--primary);
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.testimonial2-quote strong,
.testimonial2-quote .testimonial2-highlight {
    color: var(--primary);
}

.testimonial2-author strong {
    display: block;
    font-size: 16px;
}

.testimonial2-author span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.testimonial2-author span svg {
    width: 13px;
    height: 13px;
    color: var(--primary);
}

.testimonial2-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding-left: var(--space-6);
    border-left: 1px solid var(--border);
}

.testimonial2-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.testimonial2-stat-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm, 8px);
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial2-stat-icon svg {
    width: 17px;
    height: 17px;
}

.testimonial2-stat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.testimonial2-stat-text strong {
    font-size: 15px;
    color: var(--primary-dark);
}

.testimonial2-stat-text span {
    font-size: 12px;
    color: var(--muted);
}

.testimonial2-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.testimonial2-arrow:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: scale(1.06);
}

.testimonial2-arrow svg {
    width: 16px;
    height: 16px;
}

.testimonial2-arrow-side {
    flex-shrink: 0;
}

.testimonial2-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin-top: var(--space-5);
}

.testimonial2-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.testimonial2-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* ---- Final CTA v2 ---- */

.final-cta2 {
    position: relative;
    text-align: center;
    padding: var(--space-8) var(--space-5);
    background: radial-gradient(circle at 20% 20%, #1f6b46 0%, var(--primary-dark) 55%, #0f3a25 100%);
    color: #fff;
    overflow: hidden;
}

.final-cta2::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.4;
}

.final-cta2-inner {
    position: relative;
    z-index: 1;
}

.final-cta2 h2 {
    color: #fff;
    font-size: 30px;
    margin-bottom: var(--space-2);
}

.final-cta2 p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    margin-bottom: var(--space-6);
}

.final-cta2 .btn-primary {
    background: #fff;
    color: var(--primary-dark);
}

.final-cta2 .btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* ---- Footer v2 ---- */

.site-footer-social {
    display: flex;
    gap: 10px;
    margin-top: var(--space-4);
}

.site-footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.site-footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.site-footer-social svg {
    width: 15px;
    height: 15px;
}

.site-footer-bottom2 {
    max-width: 1200px;
    margin: var(--space-6) auto 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.site-footer-bottom2 a {
    color: var(--muted);
    text-decoration: none;
    margin-left: var(--space-5);
}

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

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .ai-health-grid {
        grid-template-columns: 1fr;
    }
    .market2-grid {
        grid-template-columns: 1fr 1fr;
    }
    .market2-grid .market2-table {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .hero2-inner {
        grid-template-columns: 1fr;
    }
    .hero2-visual {
        max-width: 480px;
        margin: 0 auto;
    }
    .mkt-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .step-arrow2 { display: none; }
}

@media (max-width: 760px) {
    .nav-dropdown-panel {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        margin-top: 4px;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-dropdown.open .nav-dropdown-panel {
        display: block;
        transform: none;
    }
    .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .hero2-text h1 {
        font-size: 32px;
    }
    .hero2-mock-laptop {
        width: 220px;
        left: -10px;
        bottom: -18px;
    }
    .hero2-mock-phone {
        width: 100px;
        top: -12px;
        right: -8px;
    }
    .hero2-photo {
        height: 320px;
    }
    .trustbar-stat strong {
        font-size: 38px;
    }
    .trustbar-stat-label {
        font-size: 15px;
    }
    .mkt-grid {
        grid-template-columns: 1fr;
    }
    .steps-grid2 {
        grid-template-columns: 1fr;
    }
    .ai-health-metrics {
        gap: var(--space-5);
        flex-wrap: wrap;
    }
    .market2-grid {
        grid-template-columns: 1fr;
    }
    .market2-grid .market2-table {
        grid-column: auto;
    }
    .testimonial2 {
        padding: 0 var(--space-4);
    }
    .testimonial2-arrow-side {
        display: none;
    }
    .testimonial2-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--space-6) var(--space-4);
    }
    .testimonial2-portrait {
        margin: 0 auto;
    }
    .testimonial2-author span {
        justify-content: center;
    }
    .testimonial2-stats {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: var(--space-4);
        align-items: center;
    }
    .site-footer-bottom2 {
        flex-direction: column;
        text-align: center;
    }
    .site-footer-bottom2 a {
        margin: 0 var(--space-2);
    }
}

/* =========================================================================
   Marketing subpages (Product / Solutions / Resources / Pricing)
   ========================================================================= */

.subhero {
    position: relative;
    text-align: center;
    padding: calc(var(--space-8) + 24px) var(--space-5) var(--space-8);
    background: radial-gradient(circle at 15% 0%, var(--primary-light) 0%, var(--bg) 55%);
    overflow: hidden;
}

.subhero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(31, 122, 77, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}

.subhero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.subhero h1 {
    font-size: 42px;
    letter-spacing: -0.015em;
    margin: var(--space-4) 0 var(--space-3);
}

.subhero-lead {
    font-size: 17px;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto var(--space-6);
}

.subhero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.subhero-breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.subhero-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.subhero-breadcrumb a:hover {
    color: var(--primary-dark);
}

/* ---- Two-column feature layout (reused by Product/Solutions pages) ---- */

.split-row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-7);
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
}

.split-row.reverse {
    grid-template-columns: 0.9fr 1.1fr;
}

.split-row.reverse > :first-child {
    order: 2;
}

.split-row h2 {
    font-size: 26px;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-3);
}

.split-row p {
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.split-visual {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: var(--space-5);
}

.check-list {
    list-style: none;
    margin: 0 0 var(--space-5);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
}

.check-list svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--primary);
    margin-top: 2px;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-8);
}

.stat-strip-item {
    text-align: center;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

.stat-strip-item strong {
    display: block;
    font-size: 30px;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.stat-strip-item span {
    font-size: 13.5px;
    color: var(--muted);
}

/* ---- Pricing ---- */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    max-width: 1080px;
    margin: 0 auto;
    align-items: stretch;
}

.price-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.price-card-featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--surface) 140px);
    position: relative;
}

.price-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 12px;
    border-radius: 999px;
}

.price-card h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.price-card-desc {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: var(--space-4);
}

.price-card-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: var(--space-5);
}

.price-card-amount strong {
    font-size: 36px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.price-card-amount span {
    font-size: 13.5px;
    color: var(--muted);
}

.price-card .check-list {
    flex: 1;
}

/* ---- FAQ / accordion ---- */

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.faq-trigger svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.faq-item.open .faq-trigger svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
    max-height: 400px;
}

.faq-answer-inner {
    padding: 0 var(--space-5) var(--space-4);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ---- Blog / Guides ---- */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    max-width: 1080px;
    margin: 0 auto;
}

.article-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.article-card-media {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-light), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.article-card-media svg {
    width: 36px;
    height: 36px;
}

.article-card-body {
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: var(--space-3);
    width: fit-content;
}

.article-card-body h3 {
    font-size: 16.5px;
    margin-bottom: 6px;
}

.article-card-body p {
    font-size: 13.5px;
    color: var(--muted);
    flex: 1;
}

.article-card-meta {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: var(--space-4);
    display: flex;
    justify-content: space-between;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-5) var(--space-8);
}

.article-content h2 {
    font-size: 22px;
    margin: var(--space-6) 0 var(--space-3);
}

.article-content p {
    color: var(--text);
    margin-bottom: var(--space-4);
    line-height: 1.75;
}

.article-content ul {
    margin: 0 0 var(--space-4) var(--space-5);
    color: var(--text);
    line-height: 1.75;
}

.article-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    justify-content: center;
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: var(--space-6);
}

/* ---- API docs ---- */

.api-endpoint {
    max-width: 820px;
    margin: 0 auto var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}

.api-endpoint-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}

.api-method {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.api-method-post { background: #fdf0e3; color: #9a5b1c; }

.api-path {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 13.5px;
    color: var(--text);
}

.api-endpoint-body {
    padding: var(--space-5);
}

.api-endpoint-body p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: var(--space-3);
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: var(--space-4);
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

/* ---- Responsive: subpages ---- */

@media (max-width: 900px) {
    .pricing-grid,
    .article-grid {
        grid-template-columns: 1fr 1fr;
    }
    .split-row,
    .split-row.reverse {
        grid-template-columns: 1fr;
    }
    .split-row.reverse > :first-child {
        order: 0;
    }
    .stat-strip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .subhero h1 {
        font-size: 30px;
    }
    .pricing-grid,
    .article-grid,
    .stat-strip {
        grid-template-columns: 1fr;
    }
}
