/* ==========================================================================
   Greenwich Notification Portal - Kinetic Design System Engine & Styling
   Authoritative Kinetic Theme-Kit Implementation for ASP.NET Core Razor Pages
   ========================================================================== */

/* ---------- 1. Kinetic Token Bridge & Semantic Aliases ---------- */
:root,
:root[data-theme="light"],
:root[data-kx-mode="light"],
:root[data-theme="dark"],
:root[data-kx-mode="dark"] {
    /* Ground & Surface Primitives */
    --surface: var(--kx-surface);
    --bg: var(--kx-bg);
    --ink: var(--kx-text);
    --muted: var(--kx-text-muted);
    --line: var(--kx-border);
    --line-strong: var(--kx-border-strong);
    --hover: var(--kx-surface-2);

    /* Primary & Brand Accents */
    --brand: var(--kx-accent-text);
    --accent: var(--kx-accent);
    --primary: var(--kx-accent);
    --primary-hover: var(--kx-accent-hover);
    --primary-active: var(--kx-accent-hover);
    --primary-light: var(--kx-accent-soft);
    --primary-ring: var(--kx-ring);

    /* Neutral & Slate Compatibility Inversion */
    --slate-50: var(--kx-bg);
    --slate-100: var(--kx-surface-2);
    --slate-200: var(--kx-border);
    --slate-300: var(--kx-border-strong);
    --slate-400: var(--kx-text-muted);
    --slate-500: var(--kx-text-muted);
    --slate-600: var(--kx-text-muted);
    --slate-700: var(--kx-text);
    --slate-800: var(--kx-text);
    --slate-900: var(--kx-text);
    --slate-950: var(--kx-text);

    /* Greenwich Brand Scales */
    --brand-50: var(--kx-accent-soft);
    --brand-100: var(--kx-accent-soft);
    --brand-200: var(--kx-accent-line);
    --brand-300: var(--kx-accent-text);
    --brand-400: var(--kx-accent-text);
    --brand-500: var(--kx-accent);
    --brand-600: var(--kx-accent);
    --brand-700: var(--kx-accent-text);
    --brand-800: var(--kx-accent-text);
    --brand-900: var(--kx-accent-text);
    --brand-950: var(--kx-accent-text);

    /* Status & Feedback Tones */
    --success: var(--kx-success-text);
    --warning: var(--kx-warning-text);
    --danger: var(--kx-danger-text);
    --neutral: var(--kx-info-text);
    --neutral-bg: var(--kx-info-soft);
    --success-bg: var(--kx-success-soft);
    --success-text: var(--kx-success-text);
    --success-border: var(--kx-success-soft);
    --warning-bg: var(--kx-warning-soft);
    --warning-text: var(--kx-warning-text);
    --warning-border: var(--kx-warning-soft);
    --danger-bg: var(--kx-danger-soft);
    --danger-text: var(--kx-danger-text);
    --danger-border: var(--kx-danger-soft);
    --info-bg: var(--kx-info-soft);
    --info-text: var(--kx-info-text);
    --info-border: var(--kx-info-soft);

    /* Radii & Elevation Scales */
    --radius-sm: var(--kx-r-sm);
    --radius-md: var(--kx-r-md);
    --radius-lg: var(--kx-r-lg);
    --radius-full: var(--kx-r-pill);
    --shadow-xs: var(--kx-shadow-1);
    --shadow-sm: var(--kx-shadow-1);
    --shadow-md: var(--kx-shadow-2);
    --shadow-lg: var(--kx-shadow-3);
}

/* ---------- 2. Kinetic Ground Ambient Patterns ---------- */
[data-kx-pattern="none"] body {
    background-image: none;
}
[data-kx-pattern="dots"] body {
    background-image: radial-gradient(var(--kx-pattern-ink, rgba(19, 23, 20, 0.08)) 1px, transparent 1px);
    background-size: 20px 20px;
}
[data-kx-pattern="grid"] body {
    background-image:
        linear-gradient(var(--kx-pattern-ink, rgba(19, 23, 20, 0.07)) 1px, transparent 1px),
        linear-gradient(90deg, var(--kx-pattern-ink, rgba(19, 23, 20, 0.07)) 1px, transparent 1px);
    background-size: 32px 32px;
}
[data-kx-pattern="lines"] body {
    background-image: linear-gradient(var(--kx-pattern-ink, rgba(19, 23, 20, 0.07)) 1px, transparent 1px);
    background-size: 100% 24px;
}

/* ---------- 3. Typography Hierarchy ---------- */
body, body.operational-portal {
    font-family: var(--kx-font-body, 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    background: var(--kx-bg);
    color: var(--kx-text);
    font-size: 0.9375rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .page-title, .card-title, .stat-value, .operation-heading h2, .section-card-title, legend {
    font-family: var(--kx-font-display, 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    letter-spacing: var(--kx-display-tracking, -0.015em);
    color: var(--kx-text);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(1.6rem, 2.4vw, 2.125rem);
    font-weight: 750;
    line-height: 1.2;
    margin: 0 0 6px 0;
}

h2 {
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1.3;
    margin: 0 0 6px 0;
}

h3 {
    font-size: 0.975rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

p {
    text-wrap: pretty;
    margin: 0 0 12px 0;
}

small {
    font-size: 0.75rem;
}

code, pre, kbd, .code-editor, textarea.code-editor, time, .mono, .copy-chip, [data-copy], th, .badge, .kx-badge, .preview-plain {
    font-family: var(--kx-font-mono, 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace);
}

::selection {
    background: var(--kx-accent);
    color: var(--kx-on-accent);
}

* {
    scrollbar-color: var(--kx-border-strong) var(--kx-bg);
    scrollbar-width: thin;
    box-sizing: border-box;
}

:focus-visible {
    outline: 3px solid var(--kx-ring);
    outline-offset: 3px;
    box-shadow: none;
}

/* ---------- 4. App Shell & Layout Structure ---------- */
.portal-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 260px;
    min-height: 100vh;
    background: var(--kx-bg);
}

.portal-sidebar {
    padding: 28px 20px;
    border-right: 1px solid var(--kx-border);
    background: var(--kx-surface);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.greenwich-brand {
    display: block;
    margin-bottom: 4px;
    text-decoration: none;
}
.greenwich-brand img {
    display: block;
    width: 185px;
    max-width: 100%;
    height: auto;
}
.brand-dark { display: none !important; }
[data-theme="dark"] .brand-light,
[data-kx-mode="dark"] .brand-light { display: none !important; }
[data-theme="dark"] .brand-dark,
[data-kx-mode="dark"] .brand-dark { display: block !important; }

.portal-product {
    font-family: var(--kx-font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--kx-text-muted);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--kx-border);
    margin: 0;
}

.portal-sidebar .form-label {
    margin: 2px 0 -8px 0;
    font-size: 0.725rem;
}

.portal-navigation {
    display: grid;
    gap: 4px;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--kx-text-muted);
    padding: 10px 14px;
    border-radius: var(--kx-r-md);
    text-decoration: none;
    min-height: 44px;
    font-size: 0.8125rem;
    font-weight: 550;
    transition: background-color var(--kx-dur-2) var(--kx-ease-out), color var(--kx-dur-2) var(--kx-ease-out), box-shadow var(--kx-dur-2);
}

.portal-nav-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.portal-nav-link:hover {
    background: var(--kx-surface-2);
    color: var(--kx-text);
}

.portal-nav-link[aria-current="page"] {
    background: var(--kx-accent-soft);
    color: var(--kx-accent-text);
    font-weight: 650;
    box-shadow: inset 3px 0 0 var(--kx-accent);
}

.portal-nav-divider {
    border-top: 1px solid var(--kx-border);
    margin: 12px 0 6px;
}

.portal-sidebar-bottom {
    display: grid;
    gap: 12px;
    padding-top: 24px;
    margin-top: auto;
    border-top: 1px solid var(--kx-border);
}

.portal-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    min-width: 0;
    padding: 6px 0;
}

.portal-profile div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.portal-profile small {
    display: block;
    color: var(--kx-text-muted);
}

.portal-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kx-accent-soft);
    color: var(--kx-accent-text);
    border: 1px solid var(--kx-accent-line);
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-account-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
}

.portal-account-links a {
    color: var(--kx-text-muted);
    text-decoration: none;
    transition: color var(--kx-dur-1);
}

.portal-account-links a:hover {
    color: var(--kx-accent-text);
    text-decoration: underline;
}

.portal-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    min-height: 60px;
    padding: 14px 32px;
    border-bottom: 1px solid var(--kx-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    color: var(--kx-text-muted);
    font-size: 0.75rem;
    background: var(--kx-surface);
}

.operational-portal .app-main {
    padding: 32px;
    max-width: none;
    margin: 0;
    flex: 1;
    min-height: calc(100vh - 120px);
}
.app-main:focus { outline: none; }

.portal-context {
    border-left: 1px solid var(--kx-border);
    background: var(--kx-surface);
    padding: 32px 24px;
    min-width: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.portal-context > p {
    margin-top: 10px;
    color: var(--kx-text-muted);
    font-size: 0.8125rem;
}

.portal-context section {
    margin: 24px 0;
    padding-top: 20px;
    border-top: 1px solid var(--kx-border);
}

.portal-context h3 {
    margin-bottom: 10px;
}

.portal-context section p {
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
    margin: 10px 0;
}

.portal-context code {
    background: var(--kx-surface-2);
    padding: 3px 6px;
    border-radius: var(--kx-r-xs);
    color: var(--kx-accent-text);
    font-size: 0.75rem;
    border: 1px solid var(--kx-border);
}

.context-link {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--kx-accent-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.context-link:hover {
    text-decoration: underline;
}

.portal-footer {
    padding: 16px 32px;
    color: var(--kx-text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--kx-border);
    background: var(--kx-surface);
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -100px;
    background: var(--kx-surface);
    color: var(--kx-accent-text);
    border: 1px solid var(--kx-border-strong);
    padding: 12px 18px;
    border-radius: var(--kx-r-md);
    z-index: 200;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--kx-shadow-2);
}
.skip-link:focus { top: 16px; }

/* ---------- 5. Cards & Elevated Surfaces ---------- */
.card, .stat-card, .table-container, .empty-state, .section-card, .login-card, .green-callout {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-lg);
    box-shadow: none;
    transition: border-color var(--kx-dur-2) var(--kx-ease-out), transform var(--kx-dur-2) var(--kx-ease-out), box-shadow var(--kx-dur-2) var(--kx-ease-out);
}

.card {
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--kx-border);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin: 0;
    color: var(--kx-text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 22px;
}

.card-footer {
    border-top: 1px solid var(--kx-border);
    padding: 14px 22px;
    background: var(--kx-surface-2);
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
}

/* Section Cards / Workspace Tools */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.section-card {
    padding: 22px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-card:hover, .kx-card--lift:hover {
    background: var(--kx-surface-2);
    border-color: var(--kx-accent-line);
    transform: translateY(-2px);
    box-shadow: var(--kx-shadow-2);
}

.section-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--kx-r-md);
    background: var(--kx-accent-soft);
    color: var(--kx-accent-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.section-card-title {
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--kx-text);
}

.section-card-description {
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
    line-height: 1.5;
}

.section-card-cta {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--kx-accent-text);
    margin-top: auto;
    padding-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- 6. KPI Telemetry & Statistic Panels ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card.featured {
    border-color: var(--kx-accent-line);
    background: var(--kx-surface);
    box-shadow: 0 0 0 1px var(--kx-accent-soft);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--kx-accent-line);
    box-shadow: var(--kx-shadow-2);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-label {
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--kx-text-muted);
    font-weight: 600;
}

.stat-value {
    font-family: var(--kx-font-display);
    font-size: 2.25rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--kx-text);
    font-variant-numeric: tabular-nums;
    margin: 4px 0;
}

.stat-subtext {
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
}

.channel-detail {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--kx-border);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
}

.channel-detail span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.channel-detail strong {
    color: var(--kx-text);
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
}

.hub-backlog {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 14px 20px;
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    color: var(--kx-text-muted);
    font-size: 0.8125rem;
    margin-bottom: 24px;
}

.hub-backlog strong {
    color: var(--kx-text);
    font-variant-numeric: tabular-nums;
}

/* Callout Banner */
.green-callout {
    padding: 18px 22px;
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-left: 4px solid var(--kx-accent);
    border-radius: var(--kx-r-md);
    margin-bottom: 24px;
}
.green-callout-header {
    font-weight: 650;
    color: var(--kx-text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* ---------- 7. Buttons & Action Controls ---------- */
.btn, button:not([class]), .kx-btn {
    min-height: var(--kx-control, 40px);
    padding: 0 calc(var(--kx-space-4, 16px) + 2px);
    border-radius: var(--kx-r-md, 8px);
    border: 1px solid var(--kx-border-strong);
    background: var(--kx-surface);
    color: var(--kx-text);
    font-family: var(--kx-font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--kx-dur-1) var(--kx-ease-spring), background-color var(--kx-dur-2), border-color var(--kx-dur-2), color var(--kx-dur-2), box-shadow var(--kx-dur-2);
}

.btn:hover, button:not([class]):hover {
    border-color: var(--kx-accent-line);
    color: var(--kx-text);
    background: var(--kx-surface-2);
}

.btn:active, button:active {
    transform: scale(0.97);
}

.btn:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary, button.primary {
    background: var(--kx-accent);
    color: var(--kx-on-accent);
    border-color: var(--kx-accent);
}

.btn-primary:hover, button.primary:hover {
    background: var(--kx-accent-hover);
    border-color: var(--kx-accent-hover);
    color: var(--kx-on-accent);
    box-shadow: 0 8px 24px -8px var(--kx-glow);
}

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

.btn-secondary:hover {
    background: var(--kx-surface-2);
    border-color: var(--kx-accent-line);
    color: var(--kx-text);
}

.btn-danger {
    background: var(--kx-danger);
    border-color: var(--kx-danger);
    color: var(--kx-on-danger);
}

.btn-danger:hover {
    background: var(--kx-danger-text);
    border-color: var(--kx-danger-text);
    color: var(--kx-surface);
}

.btn-sm {
    min-height: var(--kx-control-sm, 32px);
    padding: 0 12px;
    font-size: 0.75rem;
    border-radius: var(--kx-r-sm);
}

.btn-lg {
    min-height: var(--kx-control-lg, 48px);
    padding: 0 24px;
    font-size: 0.9375rem;
    border-radius: var(--kx-r-lg);
}

/* Segmented Buttons */
.preview-controls, .type-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--kx-surface-2);
    padding: 3px;
    border-radius: var(--kx-r-md);
    border: 1px solid var(--kx-border);
}

.preview-controls button, .type-switcher .btn {
    border: 0;
    background: transparent;
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.75rem;
    border-radius: var(--kx-r-sm);
    color: var(--kx-text-muted);
}

.preview-controls [aria-pressed="true"], .type-switcher .btn[aria-pressed="true"] {
    background: var(--kx-surface);
    color: var(--kx-accent-text);
    font-weight: 700;
    box-shadow: var(--kx-shadow-1);
}

/* ---------- 8. Form Fields & Controls ---------- */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-family: var(--kx-font-mono);
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kx-text-muted);
    margin-bottom: 4px;
}

.form-control, input.form-control, select.form-control, textarea.form-control {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--kx-r-md);
    border: 1px solid var(--kx-border-strong);
    background: var(--kx-surface);
    color: var(--kx-text);
    font-family: var(--kx-font-body);
    font-size: 0.875rem;
    outline: none;
    transition: border-color var(--kx-dur-2), box-shadow var(--kx-dur-2), background-color var(--kx-dur-2);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--kx-accent);
    box-shadow: var(--kx-focus, 0 0 0 3px var(--kx-ring));
    outline: none;
}

.form-control::placeholder {
    color: var(--kx-text-muted);
    opacity: 0.85;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--kx-text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

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

textarea.code-editor, .code-editor {
    font-family: var(--kx-font-mono) !important;
    background: var(--kx-surface-2) !important;
    color: var(--kx-text) !important;
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-md);
    padding: 12px 14px;
    line-height: 1.6;
    tab-size: 2;
    min-height: 160px;
    resize: vertical;
}

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--kx-accent);
}

/* ---------- 9. Tables & Ledger Presentation ---------- */
.table-container, .table-responsive {
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-lg);
    background: var(--kx-surface);
    overflow-x: auto;
    max-width: 100%;
}

.modern-table, table.modern-table, table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.modern-table th, table th {
    background: var(--kx-surface-2);
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid var(--kx-border);
    text-align: left;
    white-space: nowrap;
}

.modern-table td, table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--kx-border);
    color: var(--kx-text);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: background-color var(--kx-dur-1);
}

.modern-table tbody tr:hover {
    background: var(--kx-surface-2);
}

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

.primary-cell {
    font-weight: 600;
    color: var(--kx-text);
}

.table-toolbar, .operation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--kx-text-muted);
    pointer-events: none;
}

.search-input-wrapper input {
    padding-left: 38px;
}

/* ---------- 10. Status Badges, Chips & Avatars ---------- */
.badge, .status-badge, .kx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--kx-r-pill);
    font-family: var(--kx-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-approved, .badge-success, .kx-badge--success {
    background: var(--kx-success-soft);
    color: var(--kx-success-text);
}

.badge-warning, .badge-pending, .kx-badge--warning {
    background: var(--kx-warning-soft);
    color: var(--kx-warning-text);
}

.badge-rejected, .badge-danger, .kx-badge--danger {
    background: var(--kx-danger-soft);
    color: var(--kx-danger-text);
}

.badge-neutral, .badge-info, .badge-draft, .kx-badge--info {
    background: var(--kx-info-soft);
    color: var(--kx-info-text);
}

.badge-dot, .kx-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.copy-chip, [data-copy] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--kx-r-sm);
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border);
    color: var(--kx-text);
    cursor: pointer;
    transition: border-color var(--kx-dur-1), background-color var(--kx-dur-1), color var(--kx-dur-1);
}

.copy-chip:hover, [data-copy]:hover {
    border-color: var(--kx-accent);
    color: var(--kx-accent-text);
}

/* ---------- 11. Feedback, Alerts, Toasts & Skeletons ---------- */
.alert-banner, .kx-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--kx-r-lg);
    border: 1px solid;
    margin-bottom: 20px;
    font-size: 0.8125rem;
}

.alert-success {
    background: var(--kx-success-soft);
    border-color: color-mix(in srgb, var(--kx-success) 35%, transparent);
    color: var(--kx-text);
}

.alert-error {
    background: var(--kx-danger-soft);
    border-color: color-mix(in srgb, var(--kx-danger) 35%, transparent);
    color: var(--kx-text);
}

.alert-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-region, .kx-toasts {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(400px, calc(100vw - 32px));
    pointer-events: none;
}

.portal-toast, .kx-toast {
    pointer-events: auto;
    background: var(--kx-surface);
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-lg);
    box-shadow: var(--kx-shadow-3);
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.8125rem;
    animation: kx-toast-in var(--kx-dur-3) var(--kx-ease-spring) both;
}

.portal-toast-close {
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--kx-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-left: auto;
}
.portal-toast-close:hover { color: var(--kx-text); }

/* Skeletons & Shimmer States */
.skeleton-state {
    padding: 24px;
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-lg);
    display: grid;
    gap: 16px;
    color: var(--kx-text-muted);
    font-size: 0.8125rem;
}

.skeleton-line, .kx-skeleton {
    height: 16px;
    border-radius: var(--kx-r-sm);
    background: linear-gradient(90deg, var(--kx-surface-2) 25%, var(--kx-surface-3) 50%, var(--kx-surface-2) 75%);
    background-size: 300% 100%;
    animation: kx-shimmer calc(1.6s / max(var(--kx-motion, 1), 0.01)) linear infinite;
}
.skeleton-line:nth-child(even) { width: 70%; }

@keyframes kx-shimmer {
    to { background-position: -300% 0; }
}

@keyframes kx-toast-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 11b. Kinetic Loaders, Spinners & Overlays ---------- */
.kx-spinner {
    --_s: var(--kx-spinner-size, 22px);
    display: inline-block;
    width: var(--_s);
    height: var(--_s);
    flex: none;
    border-radius: 50%;
    border: max(2.5px, calc(var(--_s) / 9)) solid var(--kx-surface-3);
    border-top-color: var(--kx-accent);
    animation: kx-spin calc(0.75s / max(var(--kx-motion, 1), 0.01)) linear infinite;
    box-sizing: border-box;
}

.kx-spinner--sm { --kx-spinner-size: 14px; }
.kx-spinner--lg { --kx-spinner-size: 36px; }
.kx-spinner--xl { --kx-spinner-size: 56px; }

[data-kx-motion="none"] .kx-spinner {
    border-top-color: var(--kx-accent);
    border-right-color: var(--kx-accent);
    animation: none;
}

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

.kx-dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.kx-dots > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: kx-dot calc(1.1s / max(var(--kx-motion, 1), 0.01)) ease-in-out infinite;
}

.kx-dots > span:nth-child(2) { animation-delay: 0.15s; }
.kx-dots > span:nth-child(3) { animation-delay: 0.3s; }

@keyframes kx-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes kx-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Partial Container Loader Overlay */
.kx-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: color-mix(in srgb, var(--kx-surface) 84%, transparent);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: inherit;
    animation: kx-fade var(--kx-dur-2) var(--kx-ease-out) both;
}

.kx-overlay[hidden], .kx-pagebar[hidden] {
    display: none !important;
}

.kx-overlay__label {
    font-family: var(--kx-font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--kx-text);
    letter-spacing: 0.01em;
}

/* Full-Page Loader Overlay */
.kx-overlay--page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
    background: color-mix(in srgb, var(--kx-bg) 86%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    gap: 16px;
}

.kx-overlay--page .kx-overlay__label {
    font-family: var(--kx-font-display);
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--kx-text);
    letter-spacing: var(--kx-display-tracking, -0.01em);
}

/* Top Route Progress Bar for instant navigation feedback */
.kx-pagebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
}

.kx-pagebar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: var(--kx-accent);
    box-shadow: 0 0 12px var(--kx-accent);
    border-radius: 0 2px 2px 0;
    animation: kx-indeterminate calc(1.2s / max(var(--kx-motion, 1), 0.01)) var(--kx-ease-inout) infinite;
}

[data-kx-motion="none"] .kx-pagebar::before {
    animation: none;
    width: 100%;
}

/* Button Loading States */
.kx-btn.is-loading, .btn.is-loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}

.kx-btn.is-loading::before, .btn.is-loading::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.15em;
    height: 1.15em;
    margin: -0.575em 0 0 -0.575em;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: kx-spin calc(0.7s / max(var(--kx-motion, 1), 0.01)) linear infinite;
}

.btn-primary.is-loading::before {
    border-color: var(--kx-on-accent);
    border-right-color: transparent;
}

/* Container helper for host of partial overlay */
[data-kx-loading-host], .hub-stream-wrap {
    position: relative !important;
}

.hub-stream-wrap {
    border-radius: var(--kx-r-lg);
}

/* ---------- 11c. Kinetic File Upload, Dropzone & Update Components ---------- */
@keyframes kx-nudge {
    0%, 100% { transform: none; }
    30% { transform: scale(1.02); }
    60% { transform: scale(0.995); }
}

.kx-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--kx-space-2, 8px);
    min-height: 140px;
    padding: var(--kx-space-5, 20px);
    text-align: center;
    cursor: pointer;
    border: 2px dashed var(--kx-border-strong);
    border-radius: var(--kx-r-xl, 14px);
    background: var(--kx-surface-2);
    color: var(--kx-text);
    transition: border-color var(--kx-dur-2) var(--kx-ease-out),
                background-color var(--kx-dur-2) var(--kx-ease-out),
                box-shadow var(--kx-dur-2) var(--kx-ease-out),
                transform var(--kx-dur-3) var(--kx-ease-spring);
    user-select: none;
    -webkit-user-select: none;
}

.kx-dropzone:hover,
.kx-dropzone:focus-within {
    border-color: var(--kx-accent);
    background: color-mix(in srgb, var(--kx-surface-2) 92%, var(--kx-accent));
    box-shadow: 0 0 0 3px var(--kx-accent-soft);
}

.kx-dropzone.is-over {
    border-color: var(--kx-accent);
    background: var(--kx-accent-soft);
    box-shadow: 0 0 0 4px var(--kx-accent-soft);
    transform: scale(1.01);
}

.kx-dropzone.is-dropped {
    animation: kx-nudge var(--kx-dur-3) var(--kx-ease-out);
}

.kx-dropzone.has-file {
    border-color: var(--kx-accent);
    border-style: solid;
    background: var(--kx-accent-soft);
}

.kx-dropzone__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--kx-accent-soft);
    color: var(--kx-accent);
    transition: transform var(--kx-dur-3) var(--kx-ease-spring);
    flex-shrink: 0;
}

.kx-dropzone.is-over .kx-dropzone__icon {
    transform: translateY(-4px) scale(1.08);
}

.kx-dropzone.has-file .kx-dropzone__icon {
    background: var(--kx-accent);
    color: var(--kx-on-accent);
}

.kx-dropzone__title {
    font-family: var(--kx-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kx-text);
    line-height: 1.3;
}

.kx-dropzone__meta,
.kx-dropzone .kx-hint {
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
    color: var(--kx-text-muted);
}

.kx-dropzone.has-file .kx-hint,
.kx-dropzone.has-file .kx-dropzone__meta {
    color: var(--kx-accent-text, var(--kx-accent));
    font-weight: 600;
}

/* Compact Dropzone Variant (for cards, revision rows) */
.kx-dropzone--compact {
    min-height: auto;
    padding: 12px 16px;
    flex-direction: row;
    gap: 12px;
    text-align: left;
    border-radius: var(--kx-r-md, 8px);
    border-width: 1.5px;
}

.kx-dropzone--compact .kx-dropzone__icon {
    width: 36px;
    height: 36px;
}

.kx-dropzone--compact .kx-dropzone__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.kx-dropzone--compact .kx-dropzone__title {
    font-size: 0.8125rem;
}

/* Inline Dropzone Variant (for table rows / inline toolbars) */
.kx-dropzone--inline {
    min-height: var(--kx-control, 36px);
    padding: 0 12px;
    flex-direction: row;
    gap: 8px;
    text-align: left;
    border-radius: var(--kx-r-md, 8px);
    border-width: 1.5px;
    display: inline-flex;
}

.kx-dropzone--inline .kx-dropzone__icon {
    width: 22px;
    height: 22px;
    background: transparent;
}

.kx-dropzone--inline .kx-dropzone__meta {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* Native input[type="file"] Kinetic Styling */
input[type="file"]:not([hidden]) {
    font-family: var(--kx-font-body);
    font-size: 0.8125rem;
    color: var(--kx-text);
    padding: 6px 10px;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-md);
    cursor: pointer;
    line-height: 1.5;
}

input[type="file"]:not([hidden])::file-selector-button {
    margin-right: 12px;
    padding: 4px 12px;
    border-radius: var(--kx-r-sm);
    border: 1px solid var(--kx-border-strong);
    background: var(--kx-surface);
    color: var(--kx-text);
    font-family: var(--kx-font-body);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--kx-dur-1), border-color var(--kx-dur-1), color var(--kx-dur-1);
}

input[type="file"]:not([hidden])::file-selector-button:hover {
    background: var(--kx-accent-soft);
    color: var(--kx-accent-text, var(--kx-accent));
    border-color: var(--kx-accent-line, var(--kx-accent));
}

/* Layout helpers for file upload and update forms */
.kx-dropzone-compact-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.kx-dropzone-compact-wrap .kx-dropzone {
    flex: 1;
    min-width: 220px;
}

.inline-file-upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.audience-upload-box {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-lg);
    padding: 20px;
}

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

/* ---------- 12. Native Dialogs & Kinetic Modals ---------- */
dialog.kx-dialog {
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-xl);
    background: var(--kx-surface);
    color: var(--kx-text);
    padding: 0;
    max-width: 520px;
    width: calc(100% - 32px);
    box-shadow: var(--kx-shadow-3);
    margin: auto;
}

dialog.kx-dialog::backdrop {
    background: color-mix(in srgb, var(--kx-bg) 65%, black 35%);
    backdrop-filter: blur(4px);
}

.kx-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--kx-border);
}

.kx-dialog__title {
    font-family: var(--kx-font-display);
    font-size: 1.15rem;
    font-weight: 650;
    margin: 0;
    color: var(--kx-text);
}

.kx-dialog__close {
    width: 32px;
    height: 32px;
    border-radius: var(--kx-r-sm);
    border: none;
    background: transparent;
    font-size: 20px;
    color: var(--kx-text-muted);
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

.kx-dialog__close:hover {
    background: var(--kx-surface-2);
    color: var(--kx-text);
}

.kx-dialog__body {
    padding: 22px;
}

.kx-dialog__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 22px;
    border-top: 1px solid var(--kx-border);
    background: var(--kx-surface-2);
}

/* ---------- 13. Campaign Wizard Stepper ---------- */
.campaign-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
    padding: 0;
}

.campaign-steps li {
    padding: 12px 14px;
    border-bottom: 3px solid var(--kx-border);
    font-size: 0.8125rem;
    color: var(--kx-text-muted);
    font-weight: 550;
    transition: border-color var(--kx-dur-2), color var(--kx-dur-2);
}

.campaign-steps li[aria-current="step"] {
    border-color: var(--kx-accent);
    color: var(--kx-accent-text);
    font-weight: 700;
}

.campaign-stage legend {
    font-family: var(--kx-font-display);
    font-size: 1.25rem;
    font-weight: 650;
    margin-bottom: 8px;
}

.campaign-stage > p {
    color: var(--kx-text-muted);
    margin-bottom: 24px;
}

.campaign-wizard-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--kx-border);
    flex-wrap: wrap;
}

.campaign-review dt {
    font-family: var(--kx-font-mono);
    font-size: 0.725rem;
    text-transform: uppercase;
    color: var(--kx-text-muted);
    margin-top: 16px;
}

.campaign-review dd {
    font-weight: 600;
    color: var(--kx-text);
    margin: 4px 0 0 0;
    overflow-wrap: anywhere;
}

/* ---------- 14. Template Live Preview Frame ---------- */
.template-preview-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 28px;
}

.preview-container {
    position: relative;
    background: var(--kx-surface-2);
    padding: 16px;
    border-radius: var(--kx-r-md);
    border: 1px solid var(--kx-border);
}

.preview-iframe {
    display: block;
    width: 100%;
    min-height: 480px;
    background: #ffffff;
    border: 0;
    border-radius: var(--kx-r-sm);
    margin: 0 auto;
    transition: none;
}

.preview-iframe.is-mobile {
    max-width: 375px;
    border-radius: 24px;
    box-shadow: 0 0 0 10px #1e293b, var(--kx-shadow-3);
}

/* ---------- 15. Policy Pickers & Matrix Selectors ---------- */
.policy-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.policy-picker-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.policy-selection-count {
    margin-right: 4px;
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.policy-picker-viewport {
    height: 32rem;
    min-height: 0;
    padding: 10px;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-lg);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-color: var(--kx-border-strong) var(--kx-surface-2);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.policy-picker-viewport:focus-visible {
    outline: none;
    box-shadow: var(--kx-focus);
}

.policy-card-list {
    display: grid;
    min-width: 0;
    gap: 10px;
    align-content: start;
}

.policy-option-card {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    overflow: hidden;
    transition: border-color var(--kx-dur-2) var(--kx-ease-out), background-color var(--kx-dur-2) var(--kx-ease-out), box-shadow var(--kx-dur-2);
}

.policy-option-card:hover,
.policy-option-card[open] {
    border-color: var(--kx-accent-line);
    box-shadow: var(--kx-shadow-1);
}

.policy-option-card:has(input:checked) {
    background: var(--kx-accent-soft);
    border-color: var(--kx-accent);
}

.policy-option-card-incompatible {
    background: var(--kx-surface-3);
    border-color: var(--kx-border);
}

.policy-option-card-incompatible:not(:has(input:checked)) {
    opacity: 0.65;
}

.policy-option-card-incompatible .policy-card-summary {
    cursor: default;
}

.policy-type-status {
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
}

.policy-type-status-allowed {
    color: var(--kx-accent-text);
    background: var(--kx-accent-soft);
    border: 1px solid var(--kx-accent-line);
}

.policy-validation-message {
    margin: 0 0 12px;
    padding: 10px 14px;
    color: var(--kx-danger-text);
    background: var(--kx-danger-soft);
    border: 1px solid color-mix(in srgb, var(--kx-danger) 40%, transparent);
    border-radius: var(--kx-r-md);
    font-size: 0.8125rem;
    line-height: 1.5;
    animation: kx-pop var(--kx-dur-3) var(--kx-ease-spring) both;
}

.policy-card-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color var(--kx-dur-1);
}

.policy-card-summary:hover {
    background: var(--kx-surface-2);
}

.policy-card-summary::-webkit-details-marker {
    display: none;
}

.policy-card-summary::after {
    content: "";
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--kx-text-muted);
    border-bottom: 2px solid var(--kx-text-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--kx-dur-3) var(--kx-ease-spring);
    flex-shrink: 0;
}

.policy-option-card[open] > .policy-card-summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.policy-card-summary-selectable > input[type="checkbox"],
.policy-version-option > input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--kx-accent);
    flex-shrink: 0;
    margin: 0;
}

.policy-card-main {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.policy-card-title {
    color: var(--kx-text);
    font-family: var(--kx-font-display);
    font-size: 0.95rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.policy-card-subtitle {
    overflow: hidden;
    color: var(--kx-text-muted);
    font-size: 0.8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.policy-card-meta,
.policy-eligibility-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.policy-card-details {
    padding: 0 16px 16px;
    border-top: 1px solid var(--kx-border);
    background: var(--kx-surface);
}

.policy-version-list {
    display: grid;
    gap: 8px;
    padding-top: 12px;
}

.policy-version-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    cursor: pointer;
    transition: border-color var(--kx-dur-2), background-color var(--kx-dur-2), box-shadow var(--kx-dur-2);
}

.policy-version-option:hover {
    border-color: var(--kx-accent-line);
    background: var(--kx-surface);
}

.policy-version-option:has(input:checked) {
    border-color: var(--kx-accent);
    background: var(--kx-accent-soft);
}

.policy-version-option-invalid,
.policy-version-option-invalid:hover {
    background: var(--kx-danger-soft);
    border-color: var(--kx-danger);
}

.policy-version-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.policy-version-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
}

.policy-version-heading strong {
    color: var(--kx-text);
    font-family: var(--kx-font-body);
    font-size: 0.875rem;
    font-weight: 650;
}

.policy-version-subject {
    color: var(--kx-text);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.policy-variable-groups {
    display: grid;
    gap: 6px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--kx-border);
}

.policy-variable-group {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.policy-variable-label {
    padding-top: 2px;
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.policy-variable-list {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.policy-variable-chip {
    padding: 3px 8px;
    color: var(--kx-accent-text);
    background: var(--kx-accent-soft);
    border: 1px solid var(--kx-accent-line);
    border-radius: var(--kx-r-xs);
    font-family: var(--kx-font-mono);
    font-size: 0.725rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.policy-variable-chip-optional {
    color: var(--kx-text-muted);
    background: var(--kx-surface-3);
    border-color: var(--kx-border);
}

.policy-variable-empty {
    padding-top: 2px;
    color: var(--kx-text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.policy-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 12px 0;
}

.policy-detail-grid div {
    min-width: 0;
}

.policy-detail-grid dt {
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.policy-detail-grid dd {
    margin: 3px 0 0;
    color: var(--kx-text);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.policy-no-results {
    padding: 24px;
    color: var(--kx-text-muted);
    text-align: center;
    border: 1px dashed var(--kx-border-strong);
    border-radius: var(--kx-r-md);
    background: var(--kx-surface);
    font-size: 0.875rem;
}

/* ---------- 16. Brand Asset Library & Revisions ---------- */
.brand-asset-grid {
    display: grid;
    gap: 14px;
}

.brand-asset-card {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-xl);
    overflow: hidden;
    transition: border-color var(--kx-dur-2), box-shadow var(--kx-dur-2);
}

.brand-asset-card:hover,
.brand-asset-card[open] {
    border-color: var(--kx-accent-line);
    box-shadow: var(--kx-shadow-2);
}

.brand-asset-card > summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color var(--kx-dur-1);
}

.brand-asset-card > summary:hover {
    background: var(--kx-surface-2);
}

.brand-asset-card > summary::-webkit-details-marker {
    display: none;
}

.brand-asset-card > summary img,
.brand-revision-row > img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    padding: 4px;
    flex-shrink: 0;
}

.brand-asset-card > summary span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.brand-asset-card > summary strong {
    font-family: var(--kx-font-display);
    font-size: 0.975rem;
    font-weight: 650;
    color: var(--kx-text);
}

.brand-asset-card small {
    display: block;
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
}

.brand-asset-body {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-top: 1px solid var(--kx-border);
    background: var(--kx-surface);
}

.brand-asset-body > p {
    color: var(--kx-text-muted);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.brand-revision-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    background: var(--kx-surface-2);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    transition: border-color var(--kx-dur-1);
}

.brand-revision-row:hover {
    border-color: var(--kx-accent-line);
}

.brand-revision-row > div {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-revision-row strong {
    color: var(--kx-text);
    font-size: 0.875rem;
}

.brand-usage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.brand-usage-list a {
    padding: 3px 8px;
    color: var(--kx-accent-text);
    background: var(--kx-accent-soft);
    border: 1px solid var(--kx-accent-line);
    border-radius: var(--kx-r-pill);
    font-family: var(--kx-font-mono);
    font-size: 0.725rem;
    font-weight: 550;
    text-decoration: none;
    transition: background-color var(--kx-dur-1), border-color var(--kx-dur-1);
}

.brand-usage-list a:hover {
    background: var(--kx-accent);
    color: var(--kx-on-accent);
    border-color: var(--kx-accent);
}

.brand-revision-form,
.brand-attach-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--kx-border);
}

.brand-revision-form .form-control,
.brand-attach-form .form-control {
    width: auto;
    min-width: 14rem;
    flex: 1;
}

@media (max-width: 560px) {
    .brand-asset-card > summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .brand-revision-form .form-control,
    .brand-attach-form .form-control,
    .brand-revision-form .btn,
    .brand-attach-form .btn {
        width: 100%;
    }
}

/* ---------- 17. Checkbox Cards & Interactive Options ---------- */
.checkbox-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--kx-surface);
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-md);
    cursor: pointer;
    user-select: none;
    transition: background-color var(--kx-dur-2), border-color var(--kx-dur-2), transform var(--kx-dur-1) var(--kx-ease-spring), box-shadow var(--kx-dur-2);
}

.checkbox-card:hover {
    background: var(--kx-surface-2);
    border-color: var(--kx-accent-line);
    transform: translateY(-1px);
}

.checkbox-card:active {
    transform: scale(0.98);
}

.checkbox-card:has(input:checked) {
    background: var(--kx-accent-soft);
    border-color: var(--kx-accent);
}

.checkbox-card input[type="checkbox"] {
    accent-color: var(--kx-accent);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

.checkbox-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kx-text);
}

.checkbox-card:has(input:checked) .checkbox-card-label {
    color: var(--kx-accent-text);
}

/* ---------- 18. Breadcrumbs & Trail Navigation ---------- */
.breadcrumb-nav, .kx-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: var(--kx-font-mono);
    font-size: var(--kx-text-xs, 0.75rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--kx-text-muted);
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.breadcrumb-nav a, .kx-crumbs a {
    color: var(--kx-text-muted);
    text-decoration: none;
    transition: color var(--kx-dur-1);
}

.breadcrumb-nav a:hover, .kx-crumbs a:hover {
    color: var(--kx-text);
}

.breadcrumb-separator {
    color: var(--kx-border-strong);
    opacity: 0.7;
    font-size: 0.75rem;
    user-select: none;
}

.breadcrumb-current {
    color: var(--kx-text);
    font-weight: 700;
}

/* ---------- 19. Progress Indicators, Quota Gauges & Status Pulses ---------- */
.progress-bar-wrapper, .kx-progress {
    background: var(--kx-surface-3);
    border-radius: var(--kx-r-pill);
    height: 8px;
    overflow: hidden;
    margin-top: 8px;
    position: relative;
}

.progress-bar-fill, .kx-progress > span {
    display: block;
    height: 100%;
    background: var(--kx-bar, var(--kx-accent));
    border-radius: inherit;
    animation: kx-grow var(--kx-dur-4) var(--kx-ease-out) both;
    transition: width var(--kx-dur-3) var(--kx-ease-out);
}

.kx-progress--thin {
    height: 4px;
}

.kx-progress--indeterminate > span {
    width: 35%;
    animation: kx-indeterminate calc(1.4s / max(var(--kx-motion, 1), 0.01)) var(--kx-ease-inout) infinite;
}

.system-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--kx-font-mono);
    font-size: 0.75rem;
    color: var(--kx-text-muted);
    font-weight: 500;
}

.status-pulse-dot, .kx-dot--live {
    width: 8px;
    height: 8px;
    background-color: var(--kx-success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 var(--kx-success);
    animation: kx-ping calc(1.8s / max(var(--kx-motion, 1), 0.01)) var(--kx-ease-out) infinite;
    flex-shrink: 0;
}

@keyframes kx-ping {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--kx-success) 60%, transparent); }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes kx-grow {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}

@keyframes kx-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ---------- 20. Empty States & Zero-Data Presentation ---------- */
.empty-state, .kx-empty {
    padding: 48px 24px;
    text-align: center;
    background: var(--kx-surface);
    border-radius: var(--kx-r-xl);
    border: 1px dashed var(--kx-border-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 520px;
    margin: 20px auto;
}

.empty-state-icon, .kx-empty__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--kx-accent-soft);
    color: var(--kx-accent-text);
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}

.empty-state-icon svg, .kx-empty__icon svg {
    width: 26px;
    height: 26px;
}

.empty-state-title, .kx-empty__title {
    font-family: var(--kx-font-display);
    font-size: 1.25rem;
    font-weight: 650;
    color: var(--kx-text);
    margin: 0;
}

.empty-state-description, .kx-empty p {
    font-size: 0.875rem;
    color: var(--kx-text-muted);
    max-width: 440px;
    margin: 0;
    line-height: 1.55;
}

/* ---------- 21. Account & Authentication Surfaces ---------- */
.account-surface {
    background: var(--kx-bg);
}

.account-surface .portal-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

.account-surface .portal-sidebar,
.account-surface .portal-context,
.account-surface .portal-topbar {
    display: none;
}

.account-surface .portal-workspace {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.account-surface .app-main {
    padding: 0;
    min-height: auto;
}

.account-surface .card, .login-card {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border-strong);
    border-radius: var(--kx-r-xl);
    box-shadow: var(--kx-shadow-3);
    overflow: hidden;
}

.account-surface hr {
    border: 0;
    border-top: 1px solid var(--kx-border);
    margin: 24px 0;
}

.account-surface details {
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    background: var(--kx-surface-2);
    padding: 14px 18px;
    margin-top: 16px;
}

.account-surface details > summary {
    font-weight: 600;
    color: var(--kx-text);
    cursor: pointer;
    font-size: 0.875rem;
}

.technical-details {
    margin: 0 0 24px;
    color: var(--kx-text-muted);
    font-size: 0.8125rem;
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-md);
    background: var(--kx-surface-2);
    padding: 12px 16px;
}

.technical-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--kx-text);
}

/* ---------- 22. Home Hero & Operational Welcome Surfaces ---------- */
.home-hero {
    background: var(--kx-surface);
    border: 1px solid var(--kx-border);
    border-radius: var(--kx-r-xl);
    padding: 32px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kx-accent), var(--kx-accent-text));
}

.home-hero h1 {
    font-family: var(--kx-font-display);
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 750;
    letter-spacing: var(--kx-display-tracking, -0.02em);
    color: var(--kx-text);
    margin-bottom: 8px;
}

.home-hero p {
    color: var(--kx-text-muted);
    font-size: 0.95rem;
    max-width: 65ch;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---------- 23. Kinetic Primitives & Data Display Bridges ---------- */
.kx-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kx-stat__value {
    font-family: var(--kx-font-display);
    font-weight: var(--kx-display-weight, 700);
    font-size: var(--kx-text-3xl, 2rem);
    letter-spacing: var(--kx-display-tracking, -0.02em);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--kx-text);
}

.kx-stat__label {
    font-size: var(--kx-text-sm, 0.875rem);
    color: var(--kx-text-muted);
    font-weight: 500;
}

.kx-delta {
    font-family: var(--kx-font-mono);
    font-size: var(--kx-text-xs, 0.75rem);
    color: var(--kx-text-muted);
}

.kx-delta--up {
    color: var(--kx-success-text);
}

.kx-delta--down {
    color: var(--kx-danger-text);
}

.kx-priority {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.kx-priority > i {
    width: 4px;
    border-radius: 1px;
    background: var(--kx-surface-3);
}

.kx-priority > i:nth-child(1) { height: 40%; }
.kx-priority > i:nth-child(2) { height: 70%; }
.kx-priority > i:nth-child(3) { height: 100%; }

.kx-priority--low > i:nth-child(1),
.kx-priority--medium > i:nth-child(-n + 2),
.kx-priority--high > i {
    background: var(--_p, var(--kx-accent));
}

.kx-priority--high { --_p: var(--kx-danger); }
.kx-priority--medium { --_p: var(--kx-warning); }

.kx-dl {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
    gap: var(--kx-space-3) var(--kx-space-5);
    margin: 0;
    font-size: var(--kx-text-sm);
}

.kx-dl > dt {
    color: var(--kx-text-muted);
    font-family: var(--kx-font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 2px;
}

.kx-dl > dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--kx-text);
    font-weight: 500;
}

.kx-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    counter-reset: kx-step;
}

.kx-steps > li {
    position: relative;
    display: flex;
    gap: 12px;
    counter-increment: kx-step;
}

.kx-steps > li::before {
    content: counter(kx-step);
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--kx-font-mono);
    font-size: 11px;
    font-weight: 600;
    background: var(--kx-surface-3);
    color: var(--kx-text-muted);
    position: relative;
    z-index: 1;
}

.kx-steps > li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: 30px;
    bottom: -16px;
    width: 2px;
    background: var(--kx-border);
}

.kx-steps > li.is-done::before {
    content: "\2713";
    background: var(--kx-accent);
    color: var(--kx-on-accent);
}

.kx-steps > li.is-done::after {
    background: var(--kx-accent);
}

.kx-steps > li.is-current::before {
    background: var(--kx-surface);
    color: var(--kx-accent-text);
    box-shadow: inset 0 0 0 2px var(--kx-accent);
    animation: kx-pulse calc(2s / max(var(--kx-motion, 1), 0.01)) ease-in-out infinite;
}

.kx-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kx-timeline > li {
    display: flex;
    gap: 12px;
}

.kx-timeline > li::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--kx-dot, var(--kx-accent));
}

.kx-timeline time {
    display: block;
    font-family: var(--kx-font-mono);
    font-size: 11px;
    color: var(--kx-text-muted);
    margin-top: 2px;
}

/* ---------- 24. High Contrast Mode (WCAG AAA 7:1) ---------- */
[data-kx-contrast="high"] .card,
[data-kx-contrast="high"] .stat-card,
[data-kx-contrast="high"] .table-container,
[data-kx-contrast="high"] .section-card,
[data-kx-contrast="high"] .form-control,
[data-kx-contrast="high"] .policy-option-card,
[data-kx-contrast="high"] .brand-asset-card,
[data-kx-contrast="high"] .checkbox-card,
[data-kx-contrast="high"] .policy-picker-viewport,
[data-kx-contrast="high"] .brand-revision-row,
[data-kx-contrast="high"] .policy-version-option,
[data-kx-contrast="high"] .login-card,
[data-kx-contrast="high"] .home-hero {
    border-width: 2px;
    border-color: var(--kx-border-strong);
}

[data-kx-contrast="high"] .btn {
    border-width: 2px;
}

[data-kx-contrast="high"] :focus-visible {
    outline: 4px solid var(--kx-ring);
    outline-offset: 4px;
}

/* ---------- 25. Density Dial Scaling ---------- */
[data-kx-density="compact"] .operational-portal .app-main {
    padding: 20px;
}
[data-kx-density="compact"] .card-body {
    padding: 14px;
}
[data-kx-density="compact"] .modern-table td,
[data-kx-density="compact"] .modern-table th {
    padding: 8px 12px;
}
[data-kx-density="compact"] .btn {
    min-height: 36px;
    padding: 0 12px;
}
[data-kx-density="compact"] .policy-card-summary,
[data-kx-density="compact"] .brand-asset-card > summary {
    padding: 8px 12px;
}
[data-kx-density="compact"] .checkbox-card {
    padding: 6px 10px;
}
[data-kx-density="compact"] .policy-version-option {
    padding: 8px 10px;
}

[data-kx-density="spacious"] .operational-portal .app-main {
    padding: 44px;
}
[data-kx-density="spacious"] .card-body {
    padding: 28px;
}
[data-kx-density="spacious"] .modern-table td,
[data-kx-density="spacious"] .modern-table th {
    padding: 16px 20px;
}
[data-kx-density="spacious"] .policy-card-summary,
[data-kx-density="spacious"] .brand-asset-card > summary {
    padding: 16px 22px;
}
[data-kx-density="spacious"] .checkbox-card {
    padding: 14px 18px;
}
[data-kx-density="spacious"] .policy-version-option {
    padding: 16px 18px;
}

/* ---------- 26. Responsive Layout Breakpoints ---------- */
@media (max-width: 1250px) {
    .portal-shell {
        grid-template-columns: 210px minmax(0, 1fr);
    }
    .portal-context {
        grid-column: 2;
        border-left: 0;
        border-top: 1px solid var(--kx-border);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        position: static;
        height: auto;
    }
    .portal-context h2 {
        grid-column: 1 / -1;
    }
    .portal-context section {
        margin: 0;
    }
    .operational-portal .app-main {
        padding: 24px;
    }
}

@media (max-width: 1000px) {
    .template-preview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .stats-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .portal-shell {
        display: block;
    }
    .portal-sidebar {
        position: static;
        height: auto;
        padding: 18px;
        gap: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--kx-border);
    }
    .greenwich-brand img { width: 145px; }
    .portal-product { margin: 0; }
    .portal-navigation {
        display: flex;
        flex-wrap: wrap;
    }
    .portal-nav-link {
        padding: 10px;
        flex-grow: 1;
    }
    .portal-nav-divider { display: none; }
    .portal-sidebar-bottom {
        padding-top: 8px;
        margin-top: 0;
        gap: 12px;
    }
    .portal-profile { display: none; }
    .portal-topbar {
        padding: 14px 18px;
        flex-wrap: wrap;
        min-height: 50px;
    }
    .portal-topbar span:last-child { display: none; }
    .operational-portal .app-main {
        padding: 20px 16px;
        min-height: 0;
    }
    .portal-context {
        display: block;
        padding: 20px 16px;
    }
    .portal-context section { margin: 20px 0; }
    .portal-footer { padding: 16px; }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
    .campaign-steps li { padding: 8px 4px; }
    .policy-picker-viewport {
        height: 24rem;
    }
    .policy-picker-toolbar {
        align-items: stretch;
    }
    .policy-picker-actions {
        width: 100%;
    }
}

/* ---------- 27. Motion & Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
[data-kx-motion="none"] *,
[data-kx-motion="none"] *::before,
[data-kx-motion="none"] *::after {
    animation: none !important;
    transition: none !important;
}

