:root {
    --green-900: #0B6B3A;
    --green-700: #0E8A4B;
    --green-600: #16A765;
    --green-400: #34D399;
    --green-50: #EAF6EF;

    /* Ambient / Siri-orb palette */
    --emerald-deep: #0F5132;
    --forest-black: #051B10;
    --sage: #C4D8C4;
    --mint-light: #D9FBE8;

    --canvas: #F7FAF8;
    --surface: #FFFFFF;
    --border: #E3E9E5;
    --border-strong: #D2DBD5;
    --text: #101512;
    --text-muted: #5B6863;
    --text-faint: #8B968F;
    --shadow-sm: 0 1px 2px rgba(16, 21, 18, 0.04);
    --shadow-md: 0 8px 24px rgba(16, 21, 18, 0.06);
    --shadow-lg: 0 16px 40px rgba(11, 107, 58, 0.10);
    --radius-sm: 14px;
    --radius-md: 16px;
    --radius-lg: 18px;
    --nav-height: 64px;
    --sidebar-w: 248px;
    --sidebar-w-collapsed: 72px;
    --app-max-width: 1480px;
    font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--canvas);
    color: var(--text);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--green-600);
    outline-offset: 2px;
    border-radius: 6px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Pointer decorations must live outside document flow. The main-page script
   creates and removes trail tiles while the pointer moves; without this fixed
   layer, those temporary spans change the page height and make the viewport
   jump as the scrollbar repeatedly appears and disappears. */
.cursor-aura,
.cursor-trail {
    position: fixed;
    inset: 0 auto auto 0;
    pointer-events: none;
    contain: strict;
}

.cursor-aura {
    z-index: 100;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(11, 107, 58, 0.32);
    border-radius: 50%;
    opacity: 0;
    transition: width 0.14s ease, height 0.14s ease, opacity 0.14s ease,
        background-color 0.14s ease;
}

.cursor-aura.is-visible {
    opacity: 1;
}

.cursor-aura.is-hovering {
    width: 58px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.cursor-aura.is-pressed {
    opacity: 0.65;
}

.cursor-aura span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-900);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.cursor-trail {
    z-index: 99;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.cursor-trail-tile {
    position: absolute;
    width: 8px;
    height: 3px;
    border-radius: 999px;
    background: rgba(22, 167, 101, 0.34);
}

/* ---------- Ambient background ---------- */
/* A slow, macOS-style ambient wash behind the whole app. Kept very low-opacity
   and blurred so it reads as atmosphere, not decoration — the blob, composer
   and workspace stay the visual focus. */

.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--canvas);
}

.ambient-blob {
    position: absolute;
    width: 52vw;
    height: 52vw;
    max-width: 760px;
    max-height: 760px;
    border-radius: 50%;
    filter: blur(100px);
    will-change: transform;
}

.ab-1 {
    top: -16%;
    left: -10%;
    background: var(--green-900);
    opacity: 0.13;
    animation: ambient-drift-1 78s ease-in-out infinite;
}

.ab-2 {
    top: 26%;
    right: -16%;
    background: var(--emerald-deep);
    opacity: 0.12;
    animation: ambient-drift-2 92s ease-in-out infinite;
}

.ab-3 {
    bottom: -22%;
    left: 20%;
    background: var(--forest-black);
    opacity: 0.07;
    animation: ambient-drift-3 100s ease-in-out infinite;
}

.ab-4 {
    top: 4%;
    left: 42%;
    width: 38vw;
    height: 38vw;
    max-width: 560px;
    max-height: 560px;
    background: var(--sage);
    opacity: 0.10;
    animation: ambient-drift-4 64s ease-in-out infinite;
}

@keyframes ambient-drift-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(6%, 8%) scale(1.12);
    }
}

@keyframes ambient-drift-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-9%, -6%) scale(0.9);
    }
}

@keyframes ambient-drift-3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, -10%) scale(1.08);
    }
}

@keyframes ambient-drift-4 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-7%, 6%) rotate(14deg);
    }
}

/* ---------- Navbar ---------- */

.navbar {
    position: sticky;
    top: 16px;
    z-index: 60;
    width: min(calc(100% - 32px), calc(var(--app-max-width) - 32px));
    height: var(--nav-height);
    margin: 16px auto 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.76), rgba(247, 250, 248, 0.58));
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.86) inset,
        0 14px 34px rgba(16, 21, 18, 0.1),
        0 2px 8px rgba(16, 21, 18, 0.05);
    overflow: visible;
}

.navbar-inner {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.navbar-inner::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 12%;
    width: 42%;
    height: 1px;
    background: rgba(255, 255, 255, 0.82);
    filter: blur(0.5px);
    pointer-events: none;
}

.navbar-start {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
}

.mobile-menu-btn svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-btn:hover {
    background: var(--surface);
    border-color: var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 44px;
    flex-shrink: 0;
    gap: 9px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}

.brand:focus-visible {
    outline: 3px solid var(--green-900);
    outline-offset: 4px;
}

/* Frame the supplied PNG's internal whitespace without changing the artwork. */
.brand-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 50px;
    flex: none;
    overflow: hidden;
    vertical-align: middle;
}

.brand-logo {
    display: block;
    width: 136%;
    max-width: none;
    height: auto;
    flex: none;
    mix-blend-mode: multiply;
}

.brand:hover .brand-logo { opacity: .88; }
.brand-copyright { display: inline-flex; align-items: center; gap: 8px; }
.brand-copyright .brand-logo-frame { width: 54px; height: 26px; }

@media (max-width: 640px) {
    .brand .brand-logo-frame { width: 92px; height: 44px; }
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    position: relative;
}

.nav-hover-pill {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 4px 14px rgba(16, 21, 18, 0.06), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    transition:
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 120ms ease;
}

.primary-nav.is-pill-ready .nav-hover-pill {
    opacity: 1;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 14px;
    position: relative;
    z-index: 1;
    transition: color 0.24s ease, transform 0.24s ease;
}

.nav-link:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.nav-link.is-active {
    color: var(--text);
}

.navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border-strong);
    margin: 0 2px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.24s ease, color 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

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

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.72);
    color: var(--text);
    transform: translateY(-1px);
}

.wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.42);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.wallet-btn svg {
    width: 16px;
    height: 16px;
    color: var(--green-900);
}

.wallet-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-600);
    box-shadow: 0 0 0 2px rgba(22, 167, 101, 0.18);
    flex-shrink: 0;
}

.wallet-btn:hover {
    border-color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 6px 18px rgba(16, 21, 18, 0.08);
    transform: translateY(-1px);
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(234, 246, 239, 0.72);
    color: var(--green-900);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.avatar-btn:hover {
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 5px 15px rgba(16, 21, 18, 0.08);
    transform: translateY(-1px);
}

.profile-menu {
    position: relative;
    display: inline-flex;
}

.profile-menu-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 142px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 16px;
    background: rgba(247, 250, 248, 0.76);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    box-shadow: 0 12px 28px rgba(16, 21, 18, 0.13), 0 1px 0 rgba(255, 255, 255, 0.84) inset;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px) scale(0.97);
    transform-origin: top left;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.22s ease;
    visibility: hidden;
    z-index: 70;
}

.profile-menu-panel::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 14px;
}

.profile-menu:hover .profile-menu-panel,
.profile-menu:focus-within .profile-menu-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    visibility: visible;
}

.profile-menu-item {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.profile-menu-item svg {
    width: 15px;
    height: 15px;
}

.profile-menu-item:not(#sign-out):hover,
.profile-menu-item:not(#sign-out):focus-visible {
    border-color: rgba(56, 90, 53, 0.16);
    background: rgba(56, 90, 53, 0.08);
    color: var(--forest, #385A35);
}

.profile-menu-item#sign-out:hover,
.profile-menu-item#sign-out:focus-visible {
    border-color: rgba(166, 58, 40, 0.18);
    background: rgba(166, 58, 40, 0.1);
    color: var(--brick, #A63A28);
}

/* ---------- App shell / sidebar ---------- */

.app-shell {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--nav-height));
    max-width: var(--app-max-width);
    margin: 0 auto;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    top: calc(var(--nav-height) + 16px);
    background: rgba(10, 18, 14, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 44;
}

.sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    margin: 16px 0 24px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(247, 250, 248, 0.52));
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 24px;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.86) inset,
        0 14px 32px rgba(16, 21, 18, 0.08),
        0 2px 8px rgba(16, 21, 18, 0.04);
    position: sticky;
    top: calc(var(--nav-height) + 32px);
    height: calc(100vh - var(--nav-height) - 56px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 14px 12px 20px;
    gap: 4px;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 45;
}

.sidebar[data-collapsed="true"] {
    width: var(--sidebar-w-collapsed);
}

.sidebar-top {
    display: flex;
    justify-content: flex-end;
    padding: 2px 4px 8px;
}

.sidebar[data-collapsed="true"] .sidebar-top {
    justify-content: center;
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.28);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.28s ease;
}

.sidebar-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.28s ease;
}

.sidebar[data-collapsed="true"] .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.54);
    border-color: rgba(255, 255, 255, 0.86);
}

.sidebar-new {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    margin: 2px 0 14px;
    border-radius: 11px;
    border: 1px solid var(--green-900);
    background: var(--green-900);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s ease, transform 0.12s ease;
}

.sidebar-new svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sidebar-new:hover {
    background: var(--green-700);
}

.sidebar-new:active {
    transform: scale(0.98);
}

.sidebar[data-collapsed="true"] .sidebar-new {
    padding: 0;
    justify-content: center;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.sidebar-heading {
    margin: 6px 8px 4px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    border-left: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--text-faint);
    transition: color 0.15s ease;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.42);
    color: var(--text);
}

.sidebar-item.is-active {
    background: rgba(234, 246, 239, 0.68);
    color: var(--green-900);
    border-left-color: var(--green-900);
    font-weight: 600;
}

.sidebar-item.is-active svg {
    color: var(--green-900);
}

.sidebar-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease;
}

.sidebar[data-collapsed="true"] .sidebar-item {
    justify-content: center;
    padding: 0;
}

.sidebar[data-collapsed="true"] .sidebar-item-text,
.sidebar[data-collapsed="true"] .sidebar-heading .sidebar-item-text {
    display: none;
}

/* ---------- Hero / app main ---------- */

.app-main {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 24px 24px;
    gap: 12px;
}

.app-main.is-workspace {
    justify-content: flex-start;
    padding-top: 40px;
    padding-bottom: 190px;
    gap: 22px;
}

.app-main.is-workspace .composer {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 55;
    width: min(820px, calc(100vw - 32px));
    margin: 0;
    transform: translateX(-50%);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    max-width: 620px;
    max-height: 760px;
    opacity: 1;
    transform: translateY(0);
    overflow: hidden;
    transition: max-height 0.32s ease, opacity 0.24s ease, transform 0.32s ease, margin 0.32s ease;
}

.app-main.is-workspace .hero-copy {
    max-height: 0;
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;
    margin-bottom: -10px;
}

.hero-copy h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero-copy p {
    margin: 0;
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ---------- Agent blob: a Siri-style luminous orb ---------- */
/* Structure: halo (soft outer glow) -> orb (circular, glassy base + rim
   light) -> three blurred color layers swirling at different speeds,
   screen-blended for a bright, glowing look -> sheen (glassy highlight). */

.agent-blob {
    --light-x: 32%;
    --light-y: 26%;
    --shadow-x: 0px;
    --shadow-y: 16px;
    --shadow-opacity: 0.25;
    --glow-opacity: 0.38;
    --glow-scale: 0.94;
    position: relative;
    width: 168px;
    height: 168px;
    isolation: isolate;
    transform-style: preserve-3d;
    will-change: transform;
}

.agent-blob-tilt {
    position: absolute;
    inset: 0;
    display: block;
    transform-style: preserve-3d;
    will-change: transform;
}

.agent-blob-spectrum {
    position: absolute;
    inset: 0;
    display: block;
    border-radius: 50%;
    opacity: 0.34;
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}

.agent-blob-spectrum::before,
.agent-blob-spectrum::after {
    content: "";
    position: absolute;
    inset: -13px;
    border: 1px solid rgba(78, 229, 159, 0.22);
    border-radius: 50%;
    animation: spectrum-ring-pulse 3.4s ease-out infinite;
}

.agent-blob-spectrum::after {
    animation-delay: 1.7s;
}

.agent-blob-spectrum-bar {
    position: absolute;
    left: calc(50% - 1px);
    top: 50%;
    width: 2px;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(to top, rgba(17, 151, 87, 0.22), rgba(111, 241, 183, 0.92));
    box-shadow: 0 0 5px rgba(77, 229, 158, 0.45);
    transform: rotate(var(--bar-angle)) translateY(-98px) scaleY(0.5);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
}

@keyframes spectrum-ring-pulse {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }

    28% {
        opacity: 0.48;
    }

    100% {
        opacity: 0;
        transform: scale(1.16);
    }
}

.agent-blob-shadow {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: -12%;
    height: 34%;
    border-radius: 50%;
    background: rgba(0, 74, 43, 0.72);
    filter: blur(23px);
    opacity: var(--shadow-opacity);
    transform: translate3d(var(--shadow-x), var(--shadow-y), -24px);
    transition: opacity 120ms linear;
    pointer-events: none;
    z-index: -2;
    will-change: transform, opacity;
}

.agent-blob-halo {
    position: absolute;
    inset: -34px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.38), rgba(52, 211, 153, 0) 68%);
    filter: blur(7px);
    opacity: var(--glow-opacity);
    transform: scale(var(--glow-scale));
    transition: opacity 120ms linear;
    z-index: -1;
    will-change: transform, opacity;
}

.agent-blob-orb {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at var(--light-x) var(--light-y), rgba(255, 255, 255, 0.96) 0%, rgba(217, 251, 232, 0.86) 10%, rgba(102, 226, 172, 0.74) 28%, transparent 49%),
        radial-gradient(circle at 34% 28%, var(--mint-light) 0%, var(--green-400) 34%, var(--green-600) 64%, var(--green-900) 100%);
    box-shadow:
        0 0 24px 4px rgba(52, 211, 153, 0.45),
        0 0 64px 18px rgba(11, 107, 58, 0.22),
        inset 0 -14px 22px rgba(5, 27, 16, 0.28),
        inset 0 10px 18px rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(10, 126, 71, 0.24);
    transform: translateZ(0);
    will-change: transform, border-radius;
}

.agent-blob-layer {
    position: absolute;
    width: 145%;
    height: 145%;
    top: -22%;
    left: -22%;
    border-radius: 50%;
    filter: blur(16px);
    mix-blend-mode: screen;
    opacity: 0.85;
}

.agent-blob-layer.l1 {
    background: radial-gradient(circle at 30% 30%, var(--mint-light), transparent 60%);
    animation: swirl-a 10s ease-in-out infinite;
}

.agent-blob-layer.l2 {
    background: radial-gradient(circle at 68% 42%, var(--green-400), transparent 58%);
    animation: swirl-b 14s ease-in-out infinite;
}

.agent-blob-layer.l3 {
    background: radial-gradient(circle at 48% 78%, var(--sage), transparent 55%);
    animation: swirl-c 18s ease-in-out infinite;
}

.agent-blob-sheen {
    position: absolute;
    width: 54%;
    height: 42%;
    left: calc(var(--light-x) - 27%);
    top: calc(var(--light-y) - 21%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08) 55%, transparent 74%);
    filter: blur(5px);
    mix-blend-mode: screen;
    opacity: 0.82;
    transform: rotate(-22deg);
    transition: left 80ms linear, top 80ms linear;
}

.agent-blob-rim {
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.55),
        inset -2px -2px 5px rgba(0, 61, 35, 0.28);
    pointer-events: none;
}

@keyframes blob-breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.045);
    }
}

@keyframes swirl-a {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(9%, -7%) scale(1.15);
    }
}

@keyframes swirl-b {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-11%, 9%) scale(0.9);
    }
}

@keyframes swirl-c {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(6%, 6%) rotate(18deg);
    }
}

/* Typing: brighten slightly and quicken the swirl */
.agent-blob.is-active .agent-blob-layer.l1 {
    animation-duration: 5.5s;
}

.agent-blob.is-active .agent-blob-layer.l2 {
    animation-duration: 7.5s;
}

.agent-blob.is-active .agent-blob-layer.l3 {
    animation-duration: 9.5s;
}

.agent-blob.is-active .agent-blob-orb {
    box-shadow:
        0 0 30px 6px rgba(52, 211, 153, 0.55),
        0 0 70px 20px rgba(11, 107, 58, 0.26),
        inset 0 -14px 22px rgba(5, 27, 16, 0.26),
        inset 0 10px 18px rgba(255, 255, 255, 0.5);
}

/* Listening / thinking: fast, energetic swirl plus a spinning halo ring */
.agent-blob.is-listening .agent-blob-layer.l1,
.agent-blob.is-thinking .agent-blob-layer.l1 {
    animation-duration: 2.4s;
}

.agent-blob.is-listening .agent-blob-layer.l2,
.agent-blob.is-thinking .agent-blob-layer.l2 {
    animation-duration: 3.1s;
}

.agent-blob.is-listening .agent-blob-layer.l3,
.agent-blob.is-thinking .agent-blob-layer.l3 {
    animation-duration: 3.8s;
}

.agent-blob.is-listening .agent-blob-halo,
.agent-blob.is-thinking .agent-blob-halo {
    background: radial-gradient(circle, rgba(217, 251, 232, 0.5), rgba(52, 211, 153, 0.2) 55%, transparent 72%);
}

.agent-blob.is-thinking::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(217, 251, 232, 0.7), transparent 62%);
    animation: blob-ring-spin 1.4s linear infinite;
    z-index: -2;
}

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

/* Completion: bright pop + expanding ring flash */
.agent-blob.is-complete .agent-blob-orb {
    animation: blob-pop 0.6s ease-out;
}

@keyframes blob-pop {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    30% {
        transform: scale(1.16);
        filter: brightness(1.3);
    }

    60% {
        transform: scale(0.96);
        filter: brightness(1.05);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.agent-blob.is-complete::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(217, 251, 232, 0.65);
    animation: blob-complete-ring 0.65s ease-out forwards;
}

/* ---------- Voice orb ---------- */

.agent-blob.voice-orb {
    --voice-orb-size: clamp(248px, 23vw, 312px);
    width: var(--voice-orb-size);
    height: calc(var(--voice-orb-size) + 28px);
    display: grid;
    grid-template-rows: var(--voice-orb-size) 28px;
    place-items: center;
    isolation: isolate;
    transform: none;
    contain: layout paint;
}

.agent-blob-legacy {
    display: none;
}

.voice-orb-canvas {
    display: block;
    width: var(--voice-orb-size);
    height: var(--voice-orb-size);
    grid-row: 1;
    touch-action: manipulation;
}

.voice-orb-status {
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.voice-orb-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
    box-shadow: 0 0 0 3px rgba(139, 150, 143, 0.12);
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.voice-orb[data-state="listening"] .voice-orb-status::before {
    background: var(--green-600);
    box-shadow: 0 0 0 4px rgba(22, 167, 101, 0.14);
}

.voice-orb[data-state="processing"] .voice-orb-status::before {
    background: var(--green-900);
    box-shadow: 0 0 0 4px rgba(11, 107, 58, 0.12);
}

.voice-orb[data-state="speaking"] .voice-orb-status::before {
    background: var(--green-400);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

@keyframes blob-complete-ring {
    0% {
        opacity: 1;
        transform: scale(0.82);
    }

    100% {
        opacity: 0;
        transform: scale(1.4);
    }
}

/* ---------- Composer ---------- */

.composer {
    width: 100%;
    max-width: 820px;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 6px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
}

.composer:focus-within {
    border-color: var(--green-600);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(22, 167, 101, 0.10);
}

.composer.is-processing {
    border-color: var(--green-600);
    animation: composer-pulse 1.4s ease-in-out infinite;
}

@keyframes composer-pulse {

    0%,
    100% {
        box-shadow: var(--shadow-md), 0 0 0 0 rgba(22, 167, 101, 0.22);
    }

    50% {
        box-shadow: var(--shadow-lg), 0 0 0 8px rgba(22, 167, 101, 0.10);
    }
}

.composer-field {
    padding: 16px 18px 8px;
}

.composer-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 16.5px;
    line-height: 1.5;
    max-height: 220px;
    overflow-y: auto;
}

.composer-input::placeholder {
    color: var(--text-faint);
}

.composer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 10px;
    gap: 12px;
}

.composer-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.toolbar-btn svg {
    width: 14px;
    height: 14px;
}

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

.voice-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.voice-btn svg {
    width: 16px;
    height: 16px;
}

.voice-btn:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.voice-btn.is-active {
    background: var(--green-50);
    border-color: var(--green-600);
    color: var(--green-900);
    animation: voice-listen 1.3s ease-in-out infinite;
}

@keyframes voice-listen {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(22, 167, 101, 0.28);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(22, 167, 101, 0.10);
    }
}

.submit-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--green-900);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.12s ease;
}

.submit-btn svg {
    width: 16px;
    height: 16px;
}

.submit-btn:hover {
    background: var(--green-600);
}

.submit-btn:active {
    transform: scale(0.94);
}

.submit-btn:disabled {
    background: var(--border-strong);
    cursor: default;
}

/* ---------- Quick actions ---------- */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 820px;
    max-height: 80px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
}

.app-main.is-workspace .quick-actions {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.pill {
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill:hover {
    color: var(--text);
    border-color: var(--green-600);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.pill:active {
    transform: translateY(0);
}

/* ---------- Workspace panel ---------- */

.workspace-panel {
    width: 100%;
    max-width: 1160px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.workspace-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Intent chips */

.intent-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.intent-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 8px 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    animation: chip-in 0.28s ease both;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.intent-chip.is-removing {
    opacity: 0;
    transform: scale(0.9);
}

@keyframes chip-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.intent-chip-label {
    color: var(--text-faint);
    font-weight: 500;
}

.intent-chip-value {
    color: var(--text);
    font-weight: 600;
    border-radius: 6px;
    padding: 2px 5px;
    margin: -2px -5px;
    cursor: text;
    transition: background 0.15s ease;
}

.intent-chip-value:hover,
.intent-chip-value:focus-visible {
    background: var(--green-50);
}

.intent-chip-input {
    font: inherit;
    font-weight: 600;
    color: var(--text);
    border: 1px solid var(--green-600);
    border-radius: 6px;
    padding: 1px 5px;
    background: var(--surface);
    width: 8ch;
    min-width: 60px;
}

.intent-chip-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-faint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.intent-chip-remove:hover {
    background: var(--border);
    color: var(--text);
}

.skeleton-chip {
    width: 118px;
}

/* Results grid */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: card-in 0.32s ease both;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-media {
    position: relative;
    height: 140px;
    background: var(--canvas);
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 55%, white 45%), transparent 60%),
        linear-gradient(150deg, color-mix(in srgb, var(--accent) 22%, var(--canvas) 78%), var(--canvas));
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-monogram {
    font-size: 40px;
    font-weight: 700;
    color: color-mix(in srgb, var(--accent) 70%, black 10%);
    opacity: 0.55;
    letter-spacing: -0.02em;
}

.product-card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--green-900);
}

.product-card-body {
    flex: 1;
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card-brand {
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.product-card-name {
    margin: 2px 0 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--green-900);
}

.product-card-save {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.product-card-save svg {
    width: 14px;
    height: 14px;
}

.product-card-save:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.product-card-save.is-saved {
    background: var(--green-900);
    border-color: var(--green-900);
    color: #fff;
}

/* Skeletons */

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--border);
    border: 1px solid var(--border);
    animation: none;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.3s infinite;
}

.skeleton-card {
    height: 216px;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

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

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: calc(var(--nav-height) + 32px);
        bottom: 24px;
        height: auto;
        max-height: calc(100vh - var(--nav-height) - 56px);
        margin: 0 0 0 16px;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
    }

    .sidebar[data-collapsed="true"] {
        width: 260px;
        transform: translateX(-100%);
    }

    .sidebar[data-collapsed="true"] .sidebar-item-text,
    .sidebar[data-collapsed="true"] .sidebar-heading .sidebar-item-text {
        display: inline;
    }

    .sidebar[data-collapsed="true"] .sidebar-new {
        padding: 0 12px;
        justify-content: flex-start;
    }

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

    .sidebar-top {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }
}

@media (max-width: 640px) {
    .navbar-inner {
        padding: 0 16px;
        gap: 16px;
    }

    .primary-nav {
        display: none;
    }

    .wallet-btn span {
        display: none;
    }

    .wallet-btn {
        width: 36px;
        padding: 0;
        justify-content: center;
    }

    .app-main {
        padding: 8px 16px 18px;
        gap: 10px;
    }

    .app-main.is-workspace {
        padding-top: 28px;
    }

    .hero-copy h1 {
        font-size: 28px;
    }

    .agent-blob.voice-orb {
        --voice-orb-size: clamp(196px, 58vw, 236px);
    }

    .composer-toolbar-group .toolbar-btn span {
        display: none;
    }

    .toolbar-btn {
        width: 32px;
        padding: 0;
        justify-content: center;
    }
}

/* ---------- Reduced motion ---------- */

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

    .agent-blob,
    .agent-blob-tilt,
    .agent-blob-spectrum,
    .agent-blob-spectrum-bar,
    .agent-blob-shadow,
    .agent-blob-halo,
    .agent-blob-orb,
    .agent-blob-layer,
    .agent-blob-sheen,
    .ambient-blob {
        animation: none !important;
    }
}

/* Live discovery results */
.product-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.product-card-tag {
    z-index: 1;
}

.product-card-details {
    order: 4;
    margin: 5px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-faint);
}

.product-card-body>.product-card-details:nth-of-type(2) {
    display: none;
}

.product-card-link {
    order: 5;
    margin-top: auto;
    padding-top: 8px;
    color: var(--green-900);
    font-size: 13px;
    font-weight: 600;
}

.search-message {
    grid-column: 1 / -1;
    padding: 24px;
    line-height: 1.6;
    color: var(--text);
}

/* AI Top picks: grouped results reuse the standard .results-grid inside each group */
.results-grid.is-grouped {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.results-group-title {
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.results-group--top .results-group-title {
    color: var(--green-900);
}

.product-card.is-top-pick {
    border-color: color-mix(in srgb, var(--green-600) 40%, var(--border));
}

.product-card.is-top-pick:hover {
    border-color: color-mix(in srgb, var(--green-600) 60%, var(--border));
}

.product-card.is-top-pick .product-card-tag {
    background: var(--green-900);
    color: #fff;
}

.conversation-thread {
    width: 100%;
    max-width: 1160px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 8px 0 24px;
}

.conversation-turn {
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-margin-top: 28px;
}

.conversation-query {
    align-self: flex-end;
    max-width: min(760px, 82%);
    padding: 13px 18px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 20px 20px 6px 20px;
    background: rgba(234, 246, 239, 0.72);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82) inset, 0 8px 22px rgba(16, 21, 18, 0.06);
    color: var(--text);
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.conversation-turn .workspace-panel {
    max-width: none;
    opacity: 1;
    transform: none;
}

/* Cart actions and page */
.cart-nav-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease
}

.cart-nav-btn svg {
    width: 17px;
    height: 17px
}

.cart-nav-btn:hover,
.cart-nav-btn.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, .54);
    border-color: rgba(255, 255, 255, .72)
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--green-700);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(11, 107, 58, .28)
}

.product-card-actions {
    order: 6;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 10px
}

.product-card-body:not(:has(.product-card-link)) .product-card-actions {
    margin-top: auto;
    padding-top: 10px
}

.product-card-actions button,
.cart-buy-button {
    min-height: 32px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    padding: 0 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease
}

.product-card-add {
    background: rgba(255, 255, 255, .62);
    color: var(--green-900)
}

.product-card-add:hover,
.product-card-add.is-added {
    background: var(--green-100);
    border-color: rgba(11, 107, 58, .24)
}

.product-card-buy,
.cart-buy-button {
    background: var(--green-900);
    color: #fff;
    border-color: var(--green-900) !important
}

.product-card-buy:hover,
.cart-buy-button:hover {
    background: var(--green-700);
    transform: translateY(-1px)
}

.cart-main {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 68px 0 80px
}

.cart-heading {
    margin-bottom: 30px
}

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

.cart-heading h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -.055em
}

.cart-heading>p:last-child {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 15px
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start
}

.cart-panel,
.cart-summary {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, .56);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px)
}

.cart-panel {
    padding: 20px
}

.cart-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 3px 17px;
    border-bottom: 1px solid var(--border)
}

.cart-panel-heading h2 {
    margin: 0;
    font-size: 16px
}

.cart-panel-heading span {
    color: var(--text-faint);
    font-size: 12px
}

.cart-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 3px;
    border-bottom: 1px solid var(--border)
}

.cart-item:last-child {
    border-bottom: 0
}

.cart-item-media {
    position: relative;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(145deg, #e0eee7, #f7faf8);
    color: var(--green-700);
    font-size: 28px;
    font-weight: 700
}

.cart-item-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff
}

.cart-item-info h2 {
    margin: 3px 0 5px;
    font-size: 14px;
    line-height: 1.35
}

.cart-item-brand,
.cart-item-detail {
    margin: 0;
    color: var(--text-faint);
    font-size: 11px
}

.cart-item-brand {
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .6)
}

.quantity-control button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 17px
}

.quantity-control button:hover {
    background: var(--green-100)
}

.quantity-control span {
    min-width: 15px;
    text-align: center;
    font-size: 12px;
    font-weight: 700
}

.cart-remove {
    border: 0;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    font-size: 11px
}

.cart-remove:hover {
    color: #a13e3e
}

.cart-item-buy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px
}

.cart-item-buy strong {
    color: var(--green-900);
    font-size: 15px
}

.cart-buy-button {
    padding: 0 12px
}

.cart-summary {
    position: sticky;
    top: 108px;
    padding: 23px
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 21px 0 9px;
    border-top: 1px solid var(--border);
    font-size: 13px
}

.cart-summary-row strong {
    color: var(--green-900);
    font-size: 21px
}

.cart-summary-note {
    margin: 0 0 20px;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.5
}

.cart-checkout {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--green-900);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer
}

.cart-checkout:hover:not(:disabled) {
    background: var(--green-700)
}

.cart-checkout:disabled {
    opacity: .45;
    cursor: not-allowed
}

.cart-continue {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none
}

.cart-empty {
    padding: 64px 22px;
    text-align: center
}

.cart-empty-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 23px
}

.cart-empty h2 {
    margin: 16px 0 6px;
    font-size: 19px
}

.cart-empty p {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 13px
}

.cart-primary-link {
    display: inline-flex;
    padding: 10px 15px;
    border-radius: 10px;
    background: var(--green-900);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700
}

@media (max-width:760px) {
    .cart-main {
        width: calc(100% - 28px);
        padding-top: 42px
    }

    .cart-layout {
        grid-template-columns: 1fr
    }

    .cart-summary {
        position: static
    }

    .cart-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px
    }

    .cart-item-media {
        width: 64px;
        height: 64px
    }

    .cart-item-buy {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between
    }

    .cart-nav-btn span {
        display: none
    }

    .cart-nav-btn {
        width: 36px;
        padding: 0;
        justify-content: center
    }
}

/* Account history and permanent favorites */
.history-row {
    display: flex;
    align-items: center;
    gap: 3px;
}

.history-row .sidebar-item {
    min-width: 0;
    flex: 1;
}

.chat-delete {
    flex-shrink: 0;
    width: 26px;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #82798c;
    font-size: 21px;
    cursor: pointer;
}

.chat-delete:hover,
.chat-delete:focus-visible {
    background: #f5e3eb;
    color: #a2335c;
}

.sidebar[data-collapsed="true"] .chat-delete {
    display: none;
}

#recent-list {
    color: #81798a;
    font-size: 12px;
}

.app-main.is-saved-view {
    display: block;
    padding-top: 54px;
}

.app-main.is-saved-view> :not(.saved-collection) {
    display: none !important;
}

.saved-collection {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.saved-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.saved-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    color: #8b64ae;
}

.saved-heading h1 {
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -.045em;
    margin: 12px 0;
    font-weight: 500;
}

.saved-heading p {
    color: #81798a;
    max-width: 470px;
    line-height: 1.7;
    font-size: 14px;
}

.saved-count {
    padding: 10px 17px;
    white-space: nowrap;
    border: 1px solid #e6dcec;
    border-radius: 30px;
    color: #87659a;
    font-size: 12px;
    background: #ffffff80;
}

.saved-filter-label {
    display: block;
    font-size: 12px;
    color: #81798a;
    margin-bottom: 8px;
}

.saved-filter {
    width: min(100%, 440px);
    padding: 14px 18px;
    border: 1px solid #e5dfec;
    border-radius: 15px;
    background: #ffffffa0;
    font: inherit;
    font-size: 14px;
    margin-bottom: 30px;
    color: inherit;
}

.saved-filter:focus {
    outline: 2px solid #b599d3;
    outline-offset: 3px;
}

.saved-empty {
    grid-column: 1 / -1;
    padding: 70px 24px;
    text-align: center;
    background: #ffffff70;
    border: 1px dashed #dcd1e7;
    border-radius: 26px;
}

.saved-empty h2 {
    font-size: 23px;
    font-weight: 500;
    letter-spacing: -.03em;
}

.saved-empty p {
    margin: 14px 0 26px;
    color: #81798a;
    font-size: 14px;
}

.saved-empty a {
    color: #8251a8;
    font-size: 14px;
}

.account-notice {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 620px;
    width: calc(100% - 40px);
    padding: 17px 22px;
    border: 1px solid #dac6e4;
    border-radius: 16px;
    background: #fffbff;
    color: #684e77;
    box-shadow: 0 10px 40px #38204820;
    font-size: 14px;
}

.account-notice button,
.sync-retry {
    margin: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid #dac6e4;
    background: white;
    color: inherit;
    cursor: pointer;
}

@media (max-width: 640px) {
    .saved-heading {
        align-items: start;
    }

    .saved-count {
        padding: 8px 10px;
    }

    .app-main.is-saved-view {
        padding-top: 28px;
    }
}

/* History navigation stays in the destination layout while data loads. */
.app-main.is-chat-navigation .hero-copy,
.app-main.is-chat-navigation .quick-actions {
    display: none;
}

/* ---------- Compare: card toggle, tray, dialog ---------- */
.product-card-select {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.product-card-select input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.product-card-select input:disabled {
    cursor: not-allowed;
}

.product-card-select-box {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 1.5px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    pointer-events: none;
}

.product-card-select-box svg {
    width: 14px;
    height: 14px;
}

.product-card-select:hover .product-card-select-box {
    border-color: var(--green-600);
}

.product-card-select input:focus-visible+.product-card-select-box {
    outline: 2px solid var(--green-600);
    outline-offset: 2px;
}

.product-card-select input:checked+.product-card-select-box {
    background: var(--green-900);
    border-color: var(--green-900);
    color: #fff;
}

.product-card-select input:disabled+.product-card-select-box {
    opacity: 0.45;
}

.product-card.is-compare-selected {
    border-color: var(--green-600);
    box-shadow: 0 0 0 1px var(--green-600), var(--shadow-sm);
}

.compare-bar {
    position: sticky;
    top: calc(16px + var(--nav-height) + 10px);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px auto;
    width: fit-content;
    max-width: 100%;
    padding: 6px 6px 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.compare-bar.is-active {
    border-color: color-mix(in srgb, var(--green-600) 45%, var(--border));
    box-shadow: var(--shadow-md);
}

.compare-bar-hint {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

.compare-bar.is-active .compare-bar-hint {
    color: var(--text);
    font-weight: 600;
}

.compare-bar button {
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.compare-bar-clear {
    background: transparent;
    color: var(--text-muted);
}

.compare-bar-clear:hover {
    color: var(--text);
}

.compare-bar-open {
    background: var(--green-900);
    color: #fff;
}

.compare-bar-open:hover:not(:disabled) {
    background: var(--green-700);
}

.compare-bar-open:disabled {
    background: var(--canvas);
    color: var(--text-faint);
    border: 1px solid var(--border);
    cursor: default;
}

.compare-dialog {
    width: min(1040px, calc(100% - 32px));
    max-height: min(88vh, 900px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.compare-dialog[open] {
    display: flex;
    flex-direction: column;
}

.compare-dialog::backdrop {
    background: rgba(5, 27, 16, 0.42);
    backdrop-filter: blur(3px);
}

.compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.compare-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.compare-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--canvas);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.compare-close:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.compare-body {
    overflow: auto;
    padding: 18px 20px 22px;
}

.compare-verdict {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--green-50);
    border: 1px solid color-mix(in srgb, var(--green-600) 25%, transparent);
}

.compare-verdict.is-error {
    background: var(--canvas);
    border-color: var(--border);
}

.compare-verdict-label {
    margin: 0 0 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green-900);
}

.compare-verdict-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
}

.compare-retry {
    margin-top: 10px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--green-900);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.compare-table-wrap {
    overflow-x: auto;
}

.compare-table {
    width: 100%;
    min-width: calc(120px + var(--compare-cols) * 190px);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
}

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

.compare-table thead td,
.compare-table thead th {
    border-bottom: 0;
}

.compare-table tr> :first-child {
    width: 120px;
}

.compare-row-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.compare-table .is-winner {
    background: color-mix(in srgb, var(--green-50) 70%, transparent);
}

.compare-table thead .is-winner {
    border-radius: 12px 12px 0 0;
}

.compare-product {
    font-weight: 400;
}

.compare-winner-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--green-900);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.compare-product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
}

.compare-product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.compare-product-monogram {
    font-size: 34px;
    font-weight: 700;
    color: var(--green-900);
    opacity: 0.5;
}

.compare-product-short {
    display: block;
    margin-bottom: 2px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
}

.compare-product-short+.compare-product-name {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    -webkit-line-clamp: 2;
}

.compare-product-name {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
}

.compare-product-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.compare-product-actions button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.compare-add {
    flex: 1;
    color: var(--green-900);
}

.compare-add:hover {
    background: var(--green-50);
}

.compare-remove {
    color: var(--text-muted);
}

.compare-remove:disabled {
    opacity: 0.45;
    cursor: default;
}

.compare-best-value {
    font-weight: 700;
    color: var(--green-900);
}

.compare-best-value::after {
    content: " · best";
    font-size: 11px;
    font-weight: 600;
    color: var(--green-700);
}

.compare-best-for {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--green-50);
    color: var(--green-900);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.compare-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 5px;
    line-height: 1.45;
}

.compare-points li {
    position: relative;
    padding-left: 16px;
}

.compare-points li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.compare-points--pros li::before {
    content: "+";
    color: var(--green-700);
}

.compare-points--cons li::before {
    content: "–";
    color: #B4532A;
}

.compare-empty {
    color: var(--text-faint);
}

.compare-skeleton {
    display: block;
    width: 70%;
    height: 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--border) 25%, var(--canvas) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: compare-shimmer 1.2s linear infinite;
}

.compare-skeleton--wide {
    width: 95%;
}

@keyframes compare-shimmer {
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 640px) {
    .compare-bar {
        width: 100%;
        padding-left: 12px;
    }

    .compare-bar-hint {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .compare-dialog {
        width: calc(100% - 16px);
        max-height: 92vh;
    }

    .compare-body {
        padding: 14px 12px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .compare-skeleton {
        animation: none;
    }
}
