/* =============================================================================
   SolaceAGI — site.css
   Single source of truth for ALL site styles.
   No inline CSS. No CDN. No @import from external sources.
   Updated: 2026-02-28 (PHUC web architecture — Jinja2 edition)
   ============================================================================= */

/* =============================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================= */
:root {
    /* Brand Colors */
    --sa-bg-primary:        #030311;
    --sa-bg-secondary:      #1a1f3a;
    --sa-blue:              #81AFDD;
    --sa-purple:            #AE67FA;
    --sa-orange:            #FF4820;
    --sa-green:             #00CC66;
    --sa-link-blue:         #0066cc;
    --sa-gold:              #FFC857;
    --sa-amber:             #FFA500;
    --sa-forecast-dream:    #667eea;
    --sa-forecast-forecast: #764ba2;
    --sa-forecast-decide:   #f093fb;
    --sa-forecast-act:      #4facfe;
    --sa-forecast-verify:   #00f2fe;

    /* Text */
    --sa-text-primary:      #e0e0e0;
    --sa-text-muted:        #b0b0b0;
    --sa-text-dim:          #999;
    --sa-text-dark:         #666;

    /* Gradients */
    --sa-grad-hero:         linear-gradient(135deg, var(--sa-bg-primary) 0%, var(--sa-bg-secondary) 100%);
    --sa-grad-blue-purple:  linear-gradient(135deg, var(--sa-blue), var(--sa-purple));
    --sa-grad-orange-purple:linear-gradient(135deg, var(--sa-orange), var(--sa-purple));
    --sa-grad-text-main:    linear-gradient(135deg, var(--sa-blue), var(--sa-purple));

    /* Borders */
    --sa-border-subtle:     rgba(129, 175, 221, 0.2);
    --sa-border-card:       rgba(129, 175, 221, 0.3);
    --sa-border-nav:        rgba(0, 102, 204, 0.2);

    /* Backgrounds (transparent) */
    --sa-bg-card:           linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(129, 175, 221, 0.05));
    --sa-bg-card-blue:      linear-gradient(135deg, rgba(129, 175, 221, 0.1), rgba(174, 103, 250, 0.05));
    --sa-bg-footer:         linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(129, 175, 221, 0.1));

    /* Shadows */
    --sa-shadow-blue:       0 0 30px rgba(129, 175, 221, 0.4);
    --sa-shadow-blue-lg:    0 0 60px rgba(129, 175, 221, 0.8);
    --sa-shadow-orange:     0 0 20px rgba(255, 72, 32, 0.3);
    --sa-shadow-card:       0 20px 50px rgba(129, 175, 221, 0.2);

    /* Spacing */
    --sa-section-pad:       40px 40px;
    --sa-container-max:     1280px;
    --sa-container-lg:      1400px;

    /* Radius */
    --sa-radius-sm:         6px;
    --sa-radius-md:         8px;
    --sa-radius-lg:         12px;
    --sa-radius-xl:         16px;

    /* Extended UI tokens (auth, onboarding, billing) */
    --sa-white:             #f4f7fb;
    --sa-red:               #f05050;
    --sa-bg:                #030311;
    --sa-surface:           #0f1825;
    --sa-surface-strong:    #172335;
    --sa-surface-hover:     #1d2d42;
    --sa-border:            rgba(129, 175, 221, 0.18);
    --sa-text-body:         #d0d8e4;
    --sa-orange-hover:      #e63d18;
    --sa-font-display:      "Segoe UI", system-ui, sans-serif;
    --sa-font-body:         "Segoe UI", system-ui, sans-serif;
    --sa-font-size-root-min:16.75px;
    --sa-font-size-root-max:19.2px;
    --sa-reading-measure:   68ch;
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: clamp(var(--sa-font-size-root-min), 16px + 0.2vw, var(--sa-font-size-root-max));
    width: 100%;
    height: 100%;
    background-color: var(--sa-bg-primary);
    background-image: var(--sa-grad-hero);
    background-repeat: no-repeat;
    background-size: cover;
}

body {
    font-family: var(--sa-font-body);
    font-size: 1rem;
    background-color: var(--sa-bg-primary);
    background: var(--sa-grad-hero);
    color: var(--sa-text-primary);
    line-height: 1.7;
    width: 100%;
    min-height: 100%;
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

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

ul {
    list-style: none;
}

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

picture > img {
    display: block;
    width: 100%;
    height: auto;
}

.hero p,
.hero-subtitle,
.content-text,
.footer-bottom p,
.auth-card__tagline,
.auth-notice p,
.onboard-header__tagline,
.onboard-plan__desc,
.onboard-plan__features li,
.onboard-card p {
    max-inline-size: var(--sa-reading-measure);
}

/* =============================================================================
   3. HEADER & NAVIGATION
   ============================================================================= */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    margin-bottom: 0;
    width: 100%;
    background: rgba(3, 3, 17, 0.88);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sa-border-nav);
    box-sizing: border-box;
}

.site-header__inner {
    width: min(var(--sa-container-max), calc(100% - 48px));
    min-height: 60px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.site-header .logo-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    text-decoration: none;
    margin-bottom: 0;
    width: auto;
    flex-shrink: 0;
}

.site-header .logo-img {
    width: 50px;
    height: 50px;
    border-radius: var(--sa-radius-md);
    filter: brightness(1.1);
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    display: block;
}

.site-header .logo-text {
    font-size: 1.18em;
    font-weight: 700;
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-header .hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 20;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 44px;
    min-height: 44px;
    margin-left: auto;
    margin-right: -4px;
}

.site-header .hamburger-btn span {
    width: 22px;
    height: 3px;
    background: var(--sa-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.site-header .hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.site-header .hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.site-header .hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.site-header nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    margin-left: auto;
}

.site-header nav a {
    color: var(--sa-text-primary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    padding: 12px 16px;
    border-radius: var(--sa-radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.site-header nav a:active {
    background: rgba(0, 102, 204, 0.2);
}

.site-header nav a:hover {
    color: var(--sa-blue);
}

.site-header nav a.is-current:not(.nav-cta),
.site-mobile-menu a.is-current:not(.nav-cta) {
    color: var(--sa-blue);
}

.site-header .nav-cta {
    background: var(--sa-grad-blue-purple);
    color: var(--sa-bg-primary) !important;
    font-weight: 600;
}

/* Mobile Menu Drawer */
.site-mobile-menu {
    position: fixed;
    top: 61px;
    left: 0;
    width: 100%;
    background: var(--sa-grad-hero);
    border-bottom: 1px solid var(--sa-border-nav);
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    max-height: calc(100dvh - 61px);
    overflow-y: auto;
    z-index: 15;
    animation: site-slide-down 0.3s ease;
}

.site-mobile-menu.active {
    display: flex;
}

@keyframes site-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-mobile-menu .mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0 8px 0;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.site-mobile-menu .mobile-menu-section:last-child {
    border-bottom: none;
}

.site-mobile-menu .mobile-menu-section h3 {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--sa-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 16px 8px 16px;
    padding: 0;
}

.site-mobile-menu a {
    color: var(--sa-text-primary);
    text-decoration: none;
    font-size: 1em;
    padding: 12px 16px;
    border-radius: var(--sa-radius-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.site-mobile-menu a:active {
    background: rgba(0, 102, 204, 0.2);
}

.site-mobile-menu a:hover {
    color: var(--sa-blue);
}

.site-mobile-menu .nav-cta {
    background: var(--sa-grad-blue-purple);
    color: var(--sa-bg-primary) !important;
    font-weight: 600;
    margin: 8px 0;
}

/* =============================================================================
   4. FOOTER
   ============================================================================= */
.site-footer {
    background: var(--sa-bg-footer);
    border-top: 1px solid var(--sa-border-subtle);
    padding: 60px 40px;
    position: relative;
    z-index: 5;
}

.footer-content {
    max-width: var(--sa-container-max);
    margin: 0 auto;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--sa-blue);
    margin-bottom: 15px;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section a {
    color: var(--sa-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 8px;
    font-size: 0.86rem;
}

.footer-section a:hover {
    color: var(--sa-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(129, 175, 221, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: var(--sa-text-dim);
    font-size: 0.82rem;
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-bottom p:last-child {
    margin-bottom: 0;
}

/* =============================================================================
   5. LAYOUT UTILITIES
   ============================================================================= */
.container {
    max-width: var(--sa-container-max);
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 5;
}

section {
    padding: var(--sa-section-pad);
    position: relative;
    z-index: 5;
    clear: both;
}

section h2 {
    font-size: clamp(2rem, 4.4vw, 3rem);
    margin-bottom: 60px;
    text-align: center;
    background: var(--sa-grad-text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section {
    max-width: var(--sa-container-max);
    margin: 0 auto;
    padding: var(--sa-section-pad);
}

.content-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--sa-text-muted);
    margin-bottom: 40px;
}

.highlight {
    color: var(--sa-blue);
    font-weight: 600;
}

/* Particle background layer */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(129, 175, 221, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* =============================================================================
   6. BUTTONS
   ============================================================================= */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: var(--sa-radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--sa-grad-blue-purple);
    border-color: var(--sa-blue);
    color: var(--sa-bg-primary);
    box-shadow: var(--sa-shadow-blue);
}

.btn-primary:hover {
    box-shadow: var(--sa-shadow-blue-lg);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    border-color: var(--sa-orange);
    color: var(--sa-orange);
    box-shadow: var(--sa-shadow-orange);
}

.btn-secondary:hover {
    background: rgba(255, 72, 32, 0.1);
    box-shadow: 0 0 40px rgba(255, 72, 32, 0.6);
    transform: translateY(-3px);
}

.browser-btn {
    background: transparent;
    border-color: var(--sa-link-blue);
    color: var(--sa-link-blue);
}

.browser-btn:hover {
    background: rgba(0, 102, 204, 0.1);
    box-shadow: 0 0 30px rgba(0, 102, 204, 0.5);
}

/* =============================================================================
   7. HERO SECTIONS
   ============================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 40px 80px 40px;
    margin-top: -20px;
}

.hero--home {
    justify-content: flex-start;
    min-height: auto;
    padding: 0 40px 32px;
    margin-top: 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.2;
    margin-bottom: 20px;
    margin-top: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    max-width: 900px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--sa-orange), var(--sa-purple), var(--sa-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-wave 6s ease infinite;
}

@keyframes gradient-wave {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.hero p {
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    color: var(--sa-blue);
    max-width: 700px;
    margin-bottom: 20px;
    margin-top: 0;
    line-height: 1.8;
}

.hero-subtext {
    font-size: 1.1em;
    color: var(--sa-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 15px;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.3vw, 1.32rem);
    color: var(--sa-text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group,
.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    margin-bottom: 80px;
}

section.splash-image-container {
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            var(--sa-bg-primary) 3%,
            var(--sa-bg-primary) 97%,
            transparent 100%
        );
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}
section.splash-image-container.homepage {
    background: transparent;
}

section.splash-image img {
    max-width: 510px;
}
.splash-image {
    width: min(510px, 100%);
    margin: 0 auto 6px;
    padding: 1px 0 20px 0;
    position: relative;
    display: grid;
    justify-items: center;
}

.splash-image--compact {
    width: min(360px, 100%);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.splash-image__asset {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    grid-area: 1 / 1;
}

.splash-image[data-splash-rotator] {
    min-height: 0;
    row-gap: 14px;
}

.splash-image[data-splash-rotator] .splash-image__asset {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 700ms ease, transform 700ms ease;
    filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.28));
}

.splash-image[data-splash-rotator] .splash-image__asset.is-active {
    opacity: 1;
    transform: scale(1);
}

.splash-image__dots {
    position: static;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
    transform: none;
    z-index: 0;
}

.splash-image__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 220ms ease, background 220ms ease;
}

.splash-image__dot.is-active {
    background: var(--sa-blue);
    transform: scale(1.2);
}

.content-stack {
    display: grid;
    gap: 12px;
}

.content-stack--tight {
    gap: 6px;
}

.hero-content {
    width: min(920px, 100%);
}

.hero-content--narrow {
    width: min(780px, 100%);
}

.page-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.page-shell > section {
    padding-left: 0;
    padding-right: 0;
}

.layout-section {
    padding: var(--sa-section-pad);
}

.layout-grid {
    display: grid;
    gap: 32px;
}

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

.layout-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-feature {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.media-feature--align-start {
    align-items: start;
}

.media-feature__visual {
    width: 100%;
}

.media-feature__content {
    display: grid;
    gap: 16px;
    text-align: left;
}

.media-feature__content .content-text {
    margin-bottom: 0;
}

.media-feature__image {
    width: min(100%, 320px);
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}

.media-feature__image--phase {
    width: min(100%, 340px);
}

.action-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.eyebrow {
    color: var(--sa-blue);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.resource-meta {
    color: var(--sa-text-dim);
    font-size: 0.96rem;
}

.resource-meta a {
    color: var(--sa-blue);
}

.resource-meta a:hover {
    color: var(--sa-orange);
}

.resource-grid {
    display: grid;
    gap: 28px;
}

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

.resource-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card,
.metric-card,
.chart-card {
    display: grid;
    gap: 16px;
    justify-items: center;
    text-align: center;
    padding: 30px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    background:
        radial-gradient(circle at top right, rgba(129, 175, 221, 0.12), transparent 24%),
        linear-gradient(135deg, rgba(10, 14, 39, 0.92), rgba(26, 31, 58, 0.94));
    box-shadow: var(--sa-shadow-card);
}

.resource-card__image {
    width: 100%;
    border-radius: var(--sa-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(129, 175, 221, 0.12), rgba(174, 103, 250, 0.08));
}

.resource-card h3,
.metric-card h3,
.chart-card h3 {
    font-size: 1.4rem;
    line-height: 1.3;
}

.resource-card p,
.metric-card p,
.chart-card p {
    color: var(--sa-text-muted);
}

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

.metric-card h3 {
    color: var(--sa-orange);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

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

.chart-canvas {
    min-height: 320px;
    width: 100%;
}

.table-shell {
    border: 1px solid var(--sa-border-card);
    border-radius: var(--sa-radius-lg);
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(10, 14, 39, 0.95), rgba(26, 31, 58, 0.96));
    box-shadow: var(--sa-shadow-card);
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 14px 16px;
}

.data-table thead th {
    color: var(--sa-blue);
}

.data-table tbody td {
    color: var(--sa-text-muted);
}

.public-note {
    margin-top: 24px;
    padding: 24px 28px;
    border-left: 4px solid var(--sa-orange);
    border-radius: var(--sa-radius-md);
    background: rgba(255, 72, 32, 0.08);
}

.public-note p {
    margin: 0;
    color: var(--sa-text-muted);
}

.article-section {
    padding-top: 24px;
    padding-bottom: 24px;
}

.article-section + .article-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.article-section ul {
    list-style: disc;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
    background: rgba(255, 255, 255, 0.04);
    color: var(--sa-text-primary);
    border: 1px solid var(--sa-border-card);
    border-radius: var(--sa-radius-sm);
    padding: 8px 10px;
}

.dt-container .dt-info,
.dt-container .dt-length,
.dt-container .dt-search label {
    color: var(--sa-text-muted);
}

.dt-container .dt-paging .dt-paging-button {
    color: var(--sa-text-primary) !important;
    border: 1px solid transparent;
    border-radius: var(--sa-radius-sm);
}

.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button:hover {
    border-color: var(--sa-border-card);
    background: rgba(129, 175, 221, 0.12) !important;
}

.dt-container .dt-layout-row {
    gap: 16px;
}

.dt-container table.dataTable > thead > tr > th,
.dt-container table.dataTable > tbody > tr > td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Standard hero variant (non-fullscreen) */
.hero-header {
    text-align: center;
    padding: 100px 40px 60px;
    background: var(--sa-grad-hero);
    position: relative;
    z-index: 5;
}

.hero-header h1 {
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-header p {
    font-size: clamp(1.05rem, 1.7vw, 1.18rem);
    color: var(--sa-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.page-splash-shell {
    max-width: var(--sa-container-max);
    margin: 0 auto 60px;
    padding: 0 40px;
}

.page-splash-shell--image-only {
    margin: 0 auto 28px;
}

.page-splash-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: center;
    justify-items: center;
    text-align: center;
    padding: 30px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    background:
        radial-gradient(circle at top right, rgba(129, 175, 221, 0.14), transparent 26%),
        radial-gradient(circle at bottom left, rgba(174, 103, 250, 0.12), transparent 30%),
        linear-gradient(135deg, rgba(10, 14, 39, 0.95), rgba(26, 31, 58, 0.95));
    box-shadow: var(--sa-shadow-card);
}

.page-splash-shell--image-only .page-splash-card {
    gap: 0;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.page-splash-frame {
    position: relative;
    min-height: 360px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 72, 32, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(7, 11, 27, 0.96), rgba(15, 22, 44, 0.98));
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.page-splash-shell--image-only .page-splash-frame {
    display: block;
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 2;
    border: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
}

.page-splash-frame::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.page-splash-shell--image-only .page-splash-frame::before {
    display: none;
}

.page-splash-image {
    position: absolute;
    inset: 22px;
    width: calc(100% - 44px);
    height: calc(100% - 44px);
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 700ms ease, transform 700ms ease;
    filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.28));
}

.page-splash-shell--image-only .page-splash-image {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    filter: drop-shadow(0 30px 70px rgba(0, 0, 0, 0.42));
}

.page-splash-image.is-active {
    opacity: 1;
    transform: scale(1);
}

.token-swatch {
    display: grid;
    gap: 10px;
    padding: 28px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    min-height: 160px;
    align-content: end;
    box-shadow: var(--sa-shadow-card);
}

.token-swatch strong {
    font-size: 1.2em;
}

.token-swatch span {
    color: var(--sa-text-muted);
}

.token-swatch--blue {
    background: linear-gradient(135deg, rgba(129, 175, 221, 0.28), rgba(10, 14, 39, 0.92));
}

.token-swatch--purple {
    background: linear-gradient(135deg, rgba(174, 103, 250, 0.28), rgba(10, 14, 39, 0.92));
}

.token-swatch--orange {
    background: linear-gradient(135deg, rgba(255, 72, 32, 0.28), rgba(10, 14, 39, 0.92));
}

.page-splash-copy {
    display: grid;
    gap: 12px;
    align-content: center;
    justify-items: center;
    max-width: 42rem;
}

.page-splash-kicker {
    margin: 0;
    color: var(--sa-orange);
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.page-splash-title {
    margin: 0;
    font-size: clamp(2em, 5vw, 3.2em);
    line-height: 1.05;
    background: linear-gradient(135deg, var(--sa-blue) 0%, var(--sa-purple) 55%, var(--sa-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-splash-subtitle {
    margin: 0;
    color: var(--sa-text-muted);
    font-size: 1.08em;
    line-height: 1.8;
    max-width: 42rem;
}

.page-splash-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    z-index: 2;
}

.page-splash-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 220ms ease, background 220ms ease;
}

.page-splash-dot.is-active {
    background: var(--sa-blue);
    transform: scale(1.2);
}

/* Animated hero variant (used by software5/browser/oauth3) */
.hero.hero-animated {
    position: relative;
    justify-content: flex-start;
    min-height: auto;
    padding: 0 40px 40px;
    text-align: center;
    z-index: 5;
    overflow: hidden;
    margin-top: 0;
}

.hero--document {
    justify-content: flex-start;
    min-height: auto;
    padding: 0 40px 24px;
    margin-top: 0;
}

.hero--compact {
    padding-bottom: 8px;
}

.hero--compact .hero-subtitle {
    max-width: 620px;
    margin-bottom: 8px;
    font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero.hero-animated::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(129, 175, 221, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.hero.hero-animated::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(174, 103, 250, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(2.5em, 6vw, 4em);
    margin-bottom: 30px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--sa-blue) 0%, var(--sa-purple) 50%, var(--sa-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -1px;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--sa-blue), transparent);
    margin: 0 auto 40px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* =============================================================================
   8. CARDS — feature, value, feature-card
   ============================================================================= */
.feature {
    background: var(--sa-bg-card);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: center;
}

.feature:hover {
    border-color: var(--sa-purple);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(174, 103, 250, 0.2);
}

.feature h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--sa-purple);
}

.feature p {
    color: var(--sa-text-muted);
    line-height: 1.8;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.value-card {
    background: var(--sa-bg-card-blue);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: center;
}

.value-card:hover {
    border-color: var(--sa-blue);
    transform: translateY(-10px);
    box-shadow: var(--sa-shadow-card);
}

.value-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--sa-blue);
}

.value-card p {
    color: var(--sa-text-muted);
    line-height: 1.8;
}

.value-card__icon {
    margin: 0 auto 20px;
    display: block;
}

.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 100px 0;
    padding: 60px 0;
}

/* feature-card (used by software5, browser, oauth3, persistent-intelligence) */
.feature-card {
    background: var(--sa-bg-card);
    padding: 50px 40px;
    border-radius: var(--sa-radius-xl);
    border: 1px solid var(--sa-border-card);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sa-grad-blue-purple);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    border-color: var(--sa-purple);
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(174, 103, 250, 0.2);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-icon--software5-image {
    width: 190px;
    font-size: 0;
    line-height: 0;
    display: block;
    margin: 0 auto 20px;
}

.feature-icon--software5-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 720px) {
    .feature-icon--software5-image {
        width: 170px;
    }
}

.feature-icon--persistent-image {
    width: 210px;
    display: block;
    margin: 0 auto 20px;
    font-size: 0;
    line-height: 0;
}

.feature-icon--persistent-image img {
    width: 100%;
    height: auto;
    display: block;
}

.feature-icon--persistent-animated {
    width: 210px;
    height: 136px;
    position: relative;
    display: block;
    margin: 0 auto 20px;
}

.feature-icon--persistent-image-frame {
    position: absolute;
    inset: 0;
    will-change: opacity, transform;
}

.feature-icon--persistent-image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.feature-icon--persistent-context-a {
    animation: persistent-context-a 8s cubic-bezier(0.4, 0, 0.2, 3) infinite;
}

.feature-icon--persistent-context-b {
    animation: persistent-context-b 8s cubic-bezier(0.4, 0, 0.2, 3) infinite;
}

@keyframes persistent-context-a {
    0%, 38% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0;
        transform: translateX(-14px);
    }
    51%, 92% {
        opacity: 0;
        transform: translateX(14px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes persistent-context-b {
    0%, 38% {
        opacity: 0;
        transform: translateX(14px);
    }
    50% {
        opacity: 1;
        transform: translateX(0);
    }
    88% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-14px);
    }
}

@media (max-width: 720px) {
    .feature-icon--persistent-image {
        width: 186px;
    }

    .feature-icon--persistent-animated {
        width: 186px;
        height: 120px;
    }
}

.feature-icon--browser-image {
    width: 220px;
    display: block;
    margin: 0 auto 20px;
    font-size: 0;
    line-height: 0;
}

.feature-icon--browser-image img {
    width: 100%;
    height: auto;
    display: block;
}

.feature-icon--browser-animated {
    width: 220px;
    height: 120px;
    position: relative;
    display: block;
    margin: 0 auto 20px;
}

.feature-icon--browser-image-frame {
    position: absolute;
    inset: 0;
    will-change: opacity, transform;
}

.feature-icon--browser-image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.feature-icon--browser-record-a {
    animation: browser-record-a 5.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.feature-icon--browser-record-b {
    animation: browser-record-b 5.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes browser-record-a {
    0%, 38% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0;
        transform: translateX(-14px);
    }
    51%, 92% {
        opacity: 0;
        transform: translateX(14px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes browser-record-b {
    0%, 38% {
        opacity: 0;
        transform: translateX(14px);
    }
    50% {
        opacity: 1;
        transform: translateX(0);
    }
    88% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-14px);
    }
}

@media (max-width: 720px) {
    .feature-icon--browser-image {
        width: 196px;
    }

    .feature-icon--browser-animated {
        width: 196px;
        height: 108px;
    }
}

.feature-card h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--sa-purple);
}

.feature-card p {
    color: var(--sa-text-muted);
    line-height: 1.8;
    font-size: 0.95em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: var(--sa-section-pad);
    max-width: var(--sa-container-lg);
    margin: 0 auto;
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================================
   9. PAGE-SPECIFIC: Index (Home)
   ============================================================================= */

/* Pricing section inline link style */
.pricing-link {
    color: var(--sa-text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--sa-border-subtle);
    transition: all 0.3s;
}

.pricing-link:hover {
    color: var(--sa-blue);
}

/* Pricing grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.pricing-card {
    background: var(--sa-bg-card);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.pricing-card.popular {
    border: 2px solid var(--sa-orange);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--sa-grad-orange-purple);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: white;
}

.pricing-title {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--sa-orange);
}

.pricing-price {
    color: var(--sa-blue);
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.pricing-price.custom {
    color: var(--sa-orange);
}

.pricing-desc {
    color: var(--sa-text-muted);
    margin-bottom: 25px;
    min-height: 60px;
}

.pricing-list {
    text-align: left;
    margin: 20px 0;
    color: var(--sa-text-muted);
}

.pricing-list li {
    margin-bottom: 12px;
}

/* App section on home */
.app-highlight {
    border-left: 4px solid var(--sa-orange);
    background: var(--sa-bg-card);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: center;
}

.app-highlight-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.app-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: var(--sa-radius-md);
}

.app-highlight-label {
    font-weight: 600;
    margin-bottom: 12px;
}

.app-highlight-why {
    background: rgba(129, 175, 221, 0.1);
    padding: 15px;
    border-radius: var(--sa-radius-md);
    margin-bottom: 20px;
    border-left: 3px solid var(--sa-blue);
}

.app-highlight-why p {
    color: var(--sa-blue);
    font-size: 0.95em;
    margin: 0;
}

.app-highlight-meta {
    color: var(--sa-text-dim);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.app-store-cta-box {
    text-align: center;
    padding: 60px;
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
}

/* =============================================================================
   10. PAGE-SPECIFIC: Software5
   ============================================================================= */
#version-badge {
    display: none;
    position: fixed;
    bottom: 12px;
    right: 12px;
    background: rgba(4, 12, 24, 0.85);
    border: 1px solid rgba(129, 175, 221, 0.2);
    border-radius: var(--sa-radius-sm);
    padding: 6px 12px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: rgba(129, 175, 221, 0.6);
    z-index: 9999;
    backdrop-filter: blur(8px);
}

#version-badge.loaded {
    display: block;
}

#version-badge.error {
    color: var(--sa-orange);
    border-color: rgba(255, 72, 32, 0.35);
}

/* =============================================================================
   11. PAGE-SPECIFIC: OAuth3
   ============================================================================= */
.flow-diagram {
    background: linear-gradient(135deg, rgba(0, 204, 102, 0.1), rgba(129, 175, 221, 0.05));
    border: 2px solid rgba(0, 204, 102, 0.3);
    border-radius: var(--sa-radius-xl);
    padding: 60px 40px;
    margin: 60px auto;
    max-width: 800px;
    position: relative;
    z-index: 5;
}

.flow-step {
    display: flex;
    align-items: center;
    margin: 30px 0;
    font-size: 1.1em;
}

.flow-step-number {
    background: linear-gradient(135deg, var(--sa-green), var(--sa-blue));
    color: var(--sa-bg-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 30px;
    flex-shrink: 0;
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 204, 102, 0.3);
    border-radius: var(--sa-radius-md);
    padding: 20px;
    margin: 30px 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--sa-green);
    overflow-x: auto;
    line-height: 1.6;
}

/* OAuth3 specific feature-card overrides */
.oauth3-card {
    background: linear-gradient(135deg, rgba(0, 204, 102, 0.1), rgba(129, 175, 221, 0.05));
    border-color: rgba(0, 204, 102, 0.3);
}

.oauth3-card::before {
    background: linear-gradient(90deg, var(--sa-green), var(--sa-blue));
}

.oauth3-card:hover {
    border-color: var(--sa-green);
    box-shadow: 0 30px 60px rgba(0, 204, 102, 0.2);
}

.oauth3-card h3 {
    color: var(--sa-green);
}

.feature-icon--oauth3-image {
    width: 220px;
    display: block;
    margin: 0 auto 20px;
    font-size: 0;
    line-height: 0;
}

.feature-icon--oauth3-image img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 720px) {
    .feature-icon--oauth3-image {
        width: 196px;
    }
}

/* =============================================================================
   12. PAGE-SPECIFIC: Persistent Intelligence
   ============================================================================= */
.memory-example {
    background: var(--sa-bg-card-blue);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    margin-bottom: 30px;
}

/* =============================================================================
   13. PAGE-SPECIFIC: Browser
   ============================================================================= */
.showcase {
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    padding: 60px 40px;
    margin: 60px auto;
    max-width: 800px;
    text-align: center;
    border: 1px solid var(--sa-border-card);
}

.showcase h3 {
    color: var(--sa-blue);
    font-size: 1.4em;
    margin-bottom: 30px;
}

.showcase-image {
    font-size: 5em;
    margin-bottom: 30px;
}

.recipe-card {
    background: rgba(255, 200, 87, 0.1);
    padding: 30px;
    border-radius: var(--sa-radius-md);
    border-left: 4px solid var(--sa-gold);
}

.recipe-card h4 {
    color: var(--sa-gold);
    margin-bottom: 10px;
}

.recipe-card p {
    color: var(--sa-text-muted);
    font-size: 0.95em;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* =============================================================================
   14. PAGE-SPECIFIC: App Store
   ============================================================================= */
.app-store-hero {
    text-align: center;
    padding: 100px 40px 60px;
    background: var(--sa-grad-hero);
    position: relative;
    z-index: 5;
}

.app-store-hero h1 {
    font-size: clamp(2.5em, 6vw, 4em);
    margin-bottom: 20px;
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.app-store-hero p {
    font-size: 1.1em;
    color: var(--sa-text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.category {
    margin-bottom: 60px;
}

.category h3 {
    font-size: 1.5em;
    color: var(--sa-blue);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--sa-border-subtle);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.app-card {
    background: var(--sa-bg-card);
    padding: 30px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.app-card:hover {
    border-color: var(--sa-blue);
    transform: translateY(-5px);
    box-shadow: var(--sa-shadow-card);
}

.app-status {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.75em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-stable {
    background: rgba(0, 204, 102, 0.15);
    color: var(--sa-green);
}

.status-beta {
    background: rgba(255, 200, 87, 0.15);
    color: var(--sa-gold);
}

.status-coming {
    background: rgba(129, 175, 221, 0.15);
    color: var(--sa-blue);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    margin-top: 20px;
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--sa-radius-md);
}

.app-icon-thumb {
    display: block;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--sa-border-card);
    background: rgba(4, 12, 24, 0.55);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    flex-shrink: 0;
}

.app-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--sa-bg-primary);
    flex-shrink: 0;
}

.app-icon-badge--gmail {
    background: linear-gradient(135deg, var(--sa-orange), var(--sa-gold));
}

.app-icon-badge--linkedin {
    background: linear-gradient(135deg, var(--sa-link-blue), var(--sa-blue));
}

.app-icon-badge--github {
    background: linear-gradient(135deg, var(--sa-blue), var(--sa-purple));
}

.app-icon-emoji {
    width: 40px;
    height: 40px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-bg-card-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    border: 1px solid var(--sa-border-card);
}

.app-info h4 {
    font-size: 1em;
    color: var(--sa-text-primary);
    margin-bottom: 4px;
}

.app-info p {
    font-size: 0.85em;
    color: var(--sa-text-muted);
    margin: 0;
}

.app-description {
    color: var(--sa-text-muted);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.app-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.app-stat {
    font-size: 0.85em;
    color: var(--sa-text-dim);
}

.community-section {
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    padding: 60px 40px;
    text-align: center;
    border: 1px solid var(--sa-border-card);
    margin-top: 60px;
}

.community-section h3 {
    color: var(--sa-blue);
    font-size: 1.5em;
    margin-bottom: 20px;
}

.community-section p {
    color: var(--sa-text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.app-store-stats {
    text-align: center;
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid var(--sa-border-subtle);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-num {
    font-size: 2.5em;
    color: var(--sa-orange);
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--sa-text-muted);
}

/* =============================================================================
   15. PAGE-SPECIFIC: Founder
   ============================================================================= */
.hero-profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    padding: 60px 20px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.profile-picture {
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--sa-blue);
    box-shadow: 0 0 40px rgba(129, 175, 221, 0.5), inset 0 0 20px rgba(129, 175, 221, 0.2);
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.05) contrast(1.1);
    border-radius: inherit;
}

.profile-picture:hover {
    box-shadow: 0 0 60px rgba(129, 175, 221, 0.8), inset 0 0 30px rgba(129, 175, 221, 0.3);
    transform: scale(1.02);
    border-color: var(--sa-purple);
}

.profile-info {
    max-width: 600px;
}

.profile-info h1 {
    font-size: clamp(2em, 5vw, 3em);
    margin-bottom: 10px;
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-info p {
    font-size: clamp(1em, 2vw, 1.3em);
    color: var(--sa-text-muted);
    line-height: 1.6;
}

.social-links,
.social-links-bar {
    display: flex;
    gap: 25px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 40px 0;
    border-bottom: 1px solid var(--sa-border-subtle);
    margin-bottom: 40px;
}

.social-links-bar {
    width: 100%;
}

.social-link {
    color: var(--sa-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--sa-radius-md);
    background: rgba(0, 102, 204, 0.1);
}

.social-link:hover {
    background: rgba(129, 175, 221, 0.2);
    color: var(--sa-orange);
}

.social-link-icon {
    font-size: 1.6em;
}

.social-link-text {
    font-weight: 600;
    font-size: 0.95em;
}

.timeline {
    margin: 40px 0;
}

.timeline-item {
    padding: 40px;
    border-left: 4px solid var(--sa-blue);
    margin-bottom: 40px;
    background: var(--sa-bg-card-blue);
    border-radius: 0 var(--sa-radius-lg) var(--sa-radius-lg) 0;
    position: relative;
}

.timeline-year {
    font-size: 2em;
    font-weight: 700;
    color: var(--sa-blue);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--sa-purple);
    margin-bottom: 20px;
}

.timeline-text p {
    color: var(--sa-text-muted);
    line-height: 1.8;
    margin-bottom: 10px;
}

.stat-inline {
    display: inline-block;
    margin-right: 20px;
    font-size: 0.95em;
}

.stat-inline .number {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--sa-orange);
    display: block;
}

.stat-inline .label {
    color: var(--sa-text-dim);
    font-size: 0.85em;
}

.highlight-box {
    background: rgba(255, 72, 32, 0.05);
    border: 1px solid rgba(255, 72, 32, 0.2);
    border-radius: var(--sa-radius-md);
    padding: 20px;
    margin-top: 20px;
}

.values.founder-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
    padding: 0;
}

.value {
    background: var(--sa-bg-card-blue);
    padding: 30px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    text-align: center;
}

.value-emoji {
    font-size: 2em;
    margin-bottom: 10px;
}

.value h3 {
    color: var(--sa-blue);
    margin-bottom: 10px;
}

.value p {
    color: var(--sa-text-muted);
    font-size: 0.9em;
}

.cta {
    text-align: center;
    padding: 60px 40px;
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    margin-top: 60px;
    border: 1px solid var(--sa-border-card);
}

.cta h2 {
    margin-bottom: 20px;
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2em;
    text-align: center;
}

.cta p {
    color: var(--sa-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* =============================================================================
   16. PAGE-SPECIFIC: Manifesto + Mission (Content Pages)
   ============================================================================= */
.prose-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.prose-container h2 {
    font-size: clamp(1.5em, 3vw, 2em);
    margin: 50px 0 20px;
    background: var(--sa-grad-text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
}

.prose-container p {
    color: var(--sa-text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.prose-container ul {
    margin: 20px 0 20px 30px;
    color: var(--sa-text-muted);
    font-size: 1.05em;
    line-height: 2;
    list-style: disc;
}

.prose-container strong {
    color: var(--sa-text-primary);
}

.principle {
    margin-bottom: 40px;
    padding: 30px 40px;
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
}

.principle-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--sa-blue);
    margin-bottom: 15px;
}

.principle p {
    color: var(--sa-text-muted);
    line-height: 1.9;
}

.quote {
    font-size: 1.2em;
    color: var(--sa-orange);
    font-style: italic;
    text-align: center;
    padding: 40px;
    background: rgba(255, 72, 32, 0.05);
    border-radius: var(--sa-radius-lg);
    border: 1px solid rgba(255, 72, 32, 0.2);
    margin: 40px 0;
}

.signoff {
    text-align: center;
    padding: 40px;
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
    margin-top: 60px;
}

/* Mission-specific */
.forecast-phase {
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    margin-bottom: 30px;
    border: 1px solid var(--sa-border-card);
    background:
        linear-gradient(135deg, rgba(10, 14, 39, 0.92), rgba(26, 31, 58, 0.94));
}

.forecast-phase.dream    { border-left: 6px solid var(--sa-forecast-dream); }
.forecast-phase.forecast { border-left: 6px solid var(--sa-forecast-forecast); }
.forecast-phase.decide   { border-left: 6px solid var(--sa-forecast-decide); }
.forecast-phase.act      { border-left: 6px solid var(--sa-forecast-act); }
.forecast-phase.verify   { border-left: 6px solid var(--sa-forecast-verify); }

.phase-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--sa-blue);
    margin-bottom: 5px;
}

.forecast-phase p {
    color: var(--sa-text-muted);
    line-height: 1.9;
    margin-bottom: 10px;
}

.forecast-phase ul {
    margin: 15px 0 15px 30px;
    line-height: 1.9;
    color: var(--sa-text-muted);
    list-style: disc;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.values-grid .value-card {
    text-align: center;
}

.value-card__icon--mission-image {
    width: 190px;
    display: block;
    margin: 0 auto 20px;
    font-size: 0;
    line-height: 0;
}

.value-card__icon--mission-image img {
    width: 100%;
    height: auto;
    display: block;
}

.value-emoji {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.stat {
    text-align: center;
    padding: 30px;
    background: var(--sa-bg-card-blue);
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
}

/* Mission timeline */
.mission-timeline {
    margin: 30px 0;
}

.mission-timeline .timeline-item {
    border-left-color: var(--sa-purple);
}

.mission-timeline .timeline-item h4 {
    color: var(--sa-purple);
    font-size: 1.1em;
    margin-bottom: 10px;
}

/* =============================================================================
   17. PAGE-SPECIFIC: Contact, Privacy, Terms
   ============================================================================= */
.contact-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.contact-item {
    background: var(--sa-bg-card-blue);
    padding: 40px;
    border-radius: var(--sa-radius-lg);
    border: 1px solid var(--sa-border-card);
}

.contact-item h3 {
    color: var(--sa-blue);
    font-size: 1.2em;
    margin-bottom: 15px;
}

.contact-item p {
    color: var(--sa-text-muted);
    line-height: 1.8;
    margin-bottom: 10px;
}

.contact-item a {
    color: var(--sa-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--sa-orange);
}

.page-shell--legal {
    width: min(860px, calc(100% - 48px));
}

.page-shell--founder {
    width: min(1120px, calc(100% - 48px));
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.legal-container h1,
.page-shell--legal h1 {
    font-size: clamp(2em, 5vw, 3em);
    background: var(--sa-grad-blue-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.legal-container h2,
.page-shell--legal h2 {
    font-size: 1.4em;
    color: var(--sa-blue);
    margin: 40px 0 15px;
    text-align: left;
    background: none;
    -webkit-text-fill-color: var(--sa-blue);
}

.legal-container h3,
.page-shell--legal h3 {
    font-size: 1.1em;
    color: var(--sa-purple);
    margin: 25px 0 10px;
}

.legal-container p,
.page-shell--legal p {
    color: var(--sa-text-muted);
    line-height: 1.9;
    margin-bottom: 15px;
}

.legal-container ul,
.page-shell--legal ul {
    margin: 15px 0 20px 30px;
    color: var(--sa-text-muted);
    line-height: 1.9;
    list-style: disc;
}

.legal-container ul li,
.page-shell--legal ul li {
    margin-bottom: 8px;
}

.legal-container strong,
.page-shell--legal strong {
    color: var(--sa-text-primary);
}

.highlight-box {
    background: rgba(129, 175, 221, 0.1);
    border: 1px solid var(--sa-border-subtle);
    border-radius: var(--sa-radius-md);
    padding: 20px 30px;
    margin: 20px 0;
}

.highlight-box p {
    color: var(--sa-text-muted);
    margin: 0;
}

/* =============================================================================
   18. ERROR PAGES (401, 404)
   ============================================================================= */
.error-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
}

.error-code {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--sa-orange), var(--sa-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: clamp(1.4rem, 3.5vw, 2.3rem);
    font-weight: 600;
    color: var(--sa-blue);
    margin-bottom: 20px;
}

.error-message {
    font-size: 1rem;
    color: var(--sa-text-muted);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.error-page .btn {
    margin: 8px;
}

/* =============================================================================
   19. RESPONSIVE
   ============================================================================= */
@media (min-width: 769px) {
    .site-header {
        padding: 20px 0;
    }

    .site-header__inner {
        min-height: 78px;
    }

    .site-header .logo-section {
        margin-right: 10px;
    }

    .site-header .logo-img {
        width: 58px;
        height: 58px;
    }

    .site-header .logo-text {
        font-size: 1.34em;
    }

    .site-header nav {
        display: flex;
        flex-direction: row;
        gap: 22px;
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
    }

    .site-header nav a {
        font-size: 0.86rem;
        padding: 0;
        min-height: auto;
    }

    .site-header .hamburger-btn {
        margin-left: 0;
        margin-right: 0;
        border: 1px solid var(--sa-border-nav);
        border-radius: var(--sa-radius-sm);
        background: rgba(129, 175, 221, 0.06);
        flex-shrink: 0;
    }

    .site-header .nav-cta {
        padding: 9px 18px;
    }
}

@media (max-width: 768px) {
    .site-header {
        top: env(safe-area-inset-top, 0);
    }

    .site-mobile-menu {
        top: calc(61px + env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - 61px - env(safe-area-inset-top, 0px));
    }

    .site-footer {
        padding: 40px 20px;
    }

    .footer-links {
        gap: 30px;
        margin-bottom: 30px;
    }

    .footer-section h4 {
        font-size: 0.85em;
    }

    .footer-bottom p {
        font-size: 0.75em;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
    .splash-image {
        width: min(320px, 100%);
    }

    .splash-image[data-splash-rotator] {
        min-height: 0;
    }

    .hero--home {
        padding: 0 20px 24px;
    }

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

    .cta-group,
    .hero-cta {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .hero.hero-animated {
        padding: 0 20px 32px;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .features-grid {
        grid-template-columns: 1fr;
        padding: 60px 20px;
    }

    .layout-section {
        padding: 40px 20px;
    }

    .layout-grid--two,
    .layout-grid--three {
        grid-template-columns: 1fr;
    }

    .media-feature {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .media-feature__visual,
    .media-feature__content {
        width: 100%;
    }

    .media-feature__image,
    .media-feature__image--phase {
        width: 100%;
        max-width: 100%;
    }

    section {
        padding: 40px 20px;
    }

    .values {
        grid-template-columns: 1fr;
        padding: 60px 20px;
    }

    .flow-diagram {
        padding: 40px 20px;
    }

    .showcase {
        padding: 40px 20px;
    }

    .prose-container {
        padding: 40px 20px;
    }

    .legal-container {
        padding: 40px 20px;
    }

    .contact-box {
        grid-template-columns: 1fr;
    }

    .hero--document {
        padding: 0 20px 24px;
    }

    .resource-grid--two,
    .resource-grid--three,
    .metric-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .table-shell {
        padding: 14px;
    }

    .value-card__icon--mission-image {
        width: 180px;
    }
}

/* =============================================================================
   20. INDEX PAGE — Utility Classes (replaces all inline styles)
   ============================================================================= */

/* Pricing card CTA buttons */
.btn-full {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    display: block;
}

.btn-full-no-margin {
    width: 100%;
    text-align: center;
    display: block;
}

/* Popular pricing card CTA (gradient override) */
.btn-popular {
    background: var(--sa-grad-orange-purple);
    border-color: var(--sa-orange);
}

/* Enterprise pricing title color */
.pricing-title--blue {
    color: var(--sa-blue);
}

/* Popular card pricing title top margin (offset badge) */
.pricing-card.popular .pricing-title {
    margin-top: 10px;
}

/* Sections with tinted backgrounds */
.section-app-store {
    background: linear-gradient(135deg, rgba(255, 72, 32, 0.05), rgba(129, 175, 221, 0.02));
}

.section-philosophy {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05), rgba(129, 175, 221, 0.02));
}

.section-final-cta {
    text-align: center;
    padding: 100px 40px;
    background: linear-gradient(135deg, rgba(129, 175, 221, 0.1), rgba(174, 103, 250, 0.05));
    margin-top: 40px;
}

/* Section intro paragraph (below section h2) */
.section-intro {
    font-size: 1.1em;
    text-align: center;
    color: var(--sa-text-muted);
    max-width: 800px;
    margin: 0 auto 24px auto;
    line-height: 1.9;
}

.section-intro--lg {
    font-size: 1.15em;
    line-height: 1.8;
}

/* App highlight accent border colors */
.app-highlight--orange {
    border-left-color: var(--sa-orange);
}

.app-highlight--blue {
    border-left-color: var(--sa-blue);
}

.app-highlight--link-blue {
    border-left-color: var(--sa-link-blue);
}

/* App icon (favicon-sized image in highlight header) */
.app-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

/* Morning Brief gradient icon span */
.app-icon-gradient {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sa-orange), var(--sa-amber));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
}

/* App highlight label color variants */
.label--orange {
    color: var(--sa-orange);
}

.label--blue {
    color: var(--sa-blue);
}

.label--link-blue {
    color: var(--sa-link-blue);
}

/* App description paragraph */
.app-desc {
    color: var(--sa-text-muted);
    margin-bottom: 20px;
    min-height: 60px;
}

/* App store CTA box top spacing */
.app-store-cta-box {
    margin-top: 80px;
}

/* CTA box heading */
.cta-box-title {
    color: var(--sa-blue);
    font-size: 1.5em;
    margin-bottom: 20px;
}

/* CTA box description paragraph */
.cta-box-desc {
    color: var(--sa-text-muted);
    font-size: 1.05em;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* hero-cta with bottom margin spacing */
.hero-cta--spaced {
    margin-bottom: 20px;
}

/* Large padded buttons */
.btn-lg {
    padding: 16px 50px;
}

.btn-hero {
    padding: 18px 50px;
    font-size: 1.1em;
}

/* Note below CTA app store section */
.cta-note {
    color: var(--sa-blue);
    font-size: 0.95em;
    margin: 20px 0 0 0;
}

/* Philosophy / feature h3 color variants */
.feature-title--orange {
    color: var(--sa-orange);
}

.feature-title--blue {
    color: var(--sa-blue);
}

.feature-title--purple {
    color: var(--sa-purple);
}

/* Philosophy quote block */
.philosophy-quote {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(255, 72, 32, 0.1), rgba(129, 175, 221, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(255, 72, 32, 0.2);
    margin-top: 40px;
}

.philosophy-quote-text {
    font-size: 1.3em;
    color: var(--sa-orange);
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 600;
}

.philosophy-quote-sub {
    color: var(--sa-text-muted);
    font-size: 1.05em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Final CTA section text styles */
.cta-lead {
    font-size: 1.2em;
    margin: 30px auto 20px;
    color: var(--sa-text-muted);
    max-width: 700px;
    line-height: 1.9;
}

.cta-subtext {
    font-size: 1.1em;
    margin: 0 auto 40px;
    color: var(--sa-blue);
    max-width: 700px;
    line-height: 1.9;
}

.cta-meta {
    font-size: 1em;
    margin: 30px auto 40px;
    color: var(--sa-text-dim);
    max-width: 700px;
}

.cta-footer-note {
    font-size: 0.9em;
    color: var(--sa-text-dark);
    margin-top: 30px;
}

/* Inline link with blue underline */
.link-underline-blue {
    color: var(--sa-blue);
    border-bottom: 1px solid var(--sa-blue);
    text-decoration: none;
}

.link-underline-blue:hover {
    opacity: 0.8;
}

/* =========================================================================
   Yinyang Panel — styles for semantic-rungs.js DOM elements
   ========================================================================= */
.sa-yinyang-root {
    --yy-bg: rgba(10, 14, 39, 0.98);
    --yy-surface: rgba(26, 31, 58, 0.92);
    --yy-border: var(--sa-border-subtle);
    --yy-radius: 16px;
    --yy-accent: var(--sa-blue);
    --yy-text: var(--sa-text-primary);
    --yy-text-muted: var(--sa-text-muted);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--yy-text);
    z-index: 9999;
}

/* Launcher button */
.sa-yinyang-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    background: var(--yy-bg);
    border: 1px solid var(--yy-border);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 9999;
}
.sa-yinyang-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.sa-yinyang-launcher__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.sa-yinyang-launcher__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--yy-text);
    white-space: nowrap;
}

/* Overlay */
.sa-yinyang-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.sa-yinyang-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Panel */
.sa-yinyang-panel {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: min(440px, calc(100vw - 32px));
    max-height: min(600px, calc(100vh - 120px));
    background: var(--yy-bg);
    border: 1px solid var(--yy-border);
    border-radius: var(--yy-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}
.sa-yinyang-panel[aria-hidden="true"] {
    display: none;
}

/* Panel header */
.sa-yinyang-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--yy-border);
    background: var(--yy-surface);
    flex-shrink: 0;
}
.sa-yinyang-panel__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sa-yinyang-panel__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.sa-yinyang-panel__eyebrow {
    margin: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--yy-text-muted);
}
.sa-yinyang-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--yy-text);
}
.sa-yinyang-panel__credits {
    font-size: 0.75rem;
    color: var(--sa-green);
    white-space: nowrap;
}
.sa-yinyang-panel__close {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--yy-border);
    border-radius: 8px;
    color: var(--yy-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}
.sa-yinyang-panel__close:hover {
    background: rgba(129, 175, 221, 0.1);
}

/* Panel body */
.sa-yinyang-panel__body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.sa-yinyang-column {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sa-yinyang-column--chat {
    flex: 1;
    min-width: 0;
}
.sa-yinyang-column--recipe {
    width: 200px;
    flex-shrink: 0;
    border-left: 1px solid var(--yy-border);
    background: rgba(10, 14, 39, 0.6);
}

/* Context card */
.sa-yinyang-context {
    padding: 12px 16px;
    border-bottom: 1px solid var(--yy-border);
}
.sa-yinyang-context__title {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--yy-text);
}
.sa-yinyang-context__meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--yy-text-muted);
}

/* Chips */
.sa-yinyang-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
}
.sa-yinyang-chip {
    padding: 5px 12px;
    background: var(--yy-surface);
    border: 1px solid var(--yy-border);
    border-radius: 999px;
    color: var(--yy-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sa-yinyang-chip:hover {
    background: rgba(129, 175, 221, 0.12);
    color: var(--yy-text);
}
.sa-yinyang-chip--action {
    border-color: rgba(129, 175, 221, 0.3);
}

/* Chat log */
.sa-yinyang-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messages */
.sa-yinyang-message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.sa-yinyang-message--user {
    align-self: flex-end;
    background: rgba(129, 175, 221, 0.14);
    border: 1px solid rgba(129, 175, 221, 0.24);
    color: var(--yy-text);
}
.sa-yinyang-message--assistant {
    align-self: flex-start;
    background: var(--yy-surface);
    border: 1px solid var(--yy-border);
    color: var(--yy-text);
}
.sa-yinyang-message__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--yy-text-muted);
    margin-bottom: 4px;
}
.sa-yinyang-message__body {
    margin: 0;
}

/* Composer */
.sa-yinyang-composer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--yy-border);
}
.sa-yinyang-composer__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.sa-yinyang-composer__row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.sa-yinyang-composer__input {
    flex: 1;
    padding: 10px 14px;
    background: var(--yy-surface);
    border: 1px solid var(--yy-border);
    border-radius: 12px;
    color: var(--yy-text);
    font-size: 0.88rem;
    resize: none;
    font-family: inherit;
}
.sa-yinyang-composer__input:focus {
    outline: 2px solid var(--sa-blue);
    outline-offset: 1px;
}
.sa-yinyang-composer__submit {
    padding: 10px 18px;
    background: var(--sa-grad-blue-purple);
    border: none;
    border-radius: 12px;
    color: var(--sa-text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.15s;
    white-space: nowrap;
}
.sa-yinyang-composer__submit:hover {
    transform: translateY(-1px);
}

/* Recipe rail */
.sa-yinyang-recipe__header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--yy-border);
}
.sa-yinyang-recipe__title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
}
.sa-yinyang-recipe__count {
    font-size: 0.7rem;
    color: var(--yy-text-muted);
}

/* Recipe steps */
.sa-yinyang-steps {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}
.sa-yinyang-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(129, 175, 221, 0.08);
}
.sa-yinyang-step.is-done {
    opacity: 0.6;
}
.sa-yinyang-step--empty {
    padding: 16px 14px;
    color: var(--yy-text-muted);
    font-style: italic;
    text-align: center;
}
.sa-yinyang-step__toggle {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid var(--yy-border);
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
}
.sa-yinyang-step.is-done .sa-yinyang-step__toggle {
    background: var(--sa-green);
    border-color: var(--sa-green);
}
.sa-yinyang-step__text {
    flex: 1;
    min-width: 0;
}
.sa-yinyang-recipe__reset {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--yy-border);
    color: var(--yy-text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s;
}
.sa-yinyang-recipe__reset:hover {
    color: var(--sa-orange);
}

/* Target highlight (element picked by Yinyang) */
.sa-yinyang-target {
    outline: 3px solid var(--sa-blue) !important;
    outline-offset: 2px;
}

/* Responsive — small screens stack recipe below chat */
@media (max-width: 520px) {
    .sa-yinyang-panel {
        bottom: 0;
        right: 0;
        width: 100vw;
        max-height: 70vh;
        border-radius: var(--yy-radius) var(--yy-radius) 0 0;
    }
    .sa-yinyang-panel__body {
        flex-direction: column;
    }
    .sa-yinyang-column--recipe {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--yy-border);
        max-height: 150px;
    }
    .sa-yinyang-launcher {
        bottom: 16px;
        right: 16px;
    }
    .sa-yinyang-launcher__label {
        display: none;
    }
}

/* ── Auth Login Page ── */
.auth-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    padding: 40px 20px;
}
.auth-card {
    width: 440px;
    max-width: 100%;
    background: var(--sa-bg-secondary);
    border: 1px solid var(--sa-border);
    border-radius: 20px;
    padding: 40px 36px 36px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.auth-card__logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 20px;
    display: block;
}
.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    background: var(--sa-grad-text-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-card__tagline {
    color: var(--sa-text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    line-height: 1.4;
}
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 10px;
    border: 1px solid var(--sa-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sa-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    font-family: inherit;
}
.auth-btn:hover {
    border-color: var(--sa-blue);
    background: rgba(129, 175, 221, 0.08);
    transform: translateY(-1px);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth-btn:disabled { opacity: 0.5; cursor: wait; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--sa-text-dim);
    font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sa-border);
}
.auth-form { text-align: left; margin-top: 4px; }
.auth-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--sa-text-muted);
    margin-bottom: 4px;
}
.auth-form input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid var(--sa-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sa-text-primary);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-family: inherit;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--sa-blue);
}
.auth-notice {
    background: rgba(129, 175, 221, 0.08);
    border: 1px solid rgba(129, 175, 221, 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 16px;
}
.auth-notice p {
    font-size: 0.82rem;
    color: var(--sa-text-muted);
    line-height: 1.5;
    margin: 0;
}
.auth-notice strong { color: var(--sa-blue); }
.auth-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
}
.auth-status--error {
    background: rgba(255, 72, 32, 0.1);
    border: 1px solid rgba(255, 72, 32, 0.2);
    color: var(--sa-orange);
    display: block;
}
.auth-status--success {
    background: rgba(70, 217, 167, 0.1);
    border: 1px solid rgba(70, 217, 167, 0.2);
    color: var(--sa-blue);
    display: block;
}
.auth-status--loading {
    background: rgba(129, 175, 221, 0.08);
    border: 1px solid rgba(129, 175, 221, 0.15);
    color: var(--sa-blue);
    display: block;
}

/* ─────────────────────────────────────────────
   Onboarding — Plan Selection + BYOK
   ───────────────────────────────────────────── */
.onboard-hidden {
    display: none !important;
}
.onboard-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem 4rem;
    min-height: 60vh;
}
.onboard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.onboard-header__logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: block;
}
.onboard-header h1 {
    font-family: var(--sa-font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--sa-white);
}
.onboard-header__tagline {
    color: var(--sa-text-muted);
    font-size: 1rem;
    line-height: 1.5;
}
.onboard-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 840px;
    width: 100%;
}
@media (max-width: 700px) {
    .onboard-plans {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
}
.onboard-plan {
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.onboard-plan:hover {
    border-color: var(--sa-blue);
    box-shadow: 0 8px 32px rgba(129, 175, 221, 0.08);
}
.onboard-plan--dragon {
    border-color: var(--sa-orange);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.08);
}
.onboard-plan--dragon:hover {
    border-color: var(--sa-orange);
    box-shadow: 0 12px 48px rgba(255, 107, 53, 0.15);
}
.onboard-plan__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(129, 175, 221, 0.1);
    color: var(--sa-blue);
    margin-bottom: 1rem;
}
.onboard-plan__badge--dragon {
    background: rgba(255, 107, 53, 0.12);
    color: var(--sa-orange);
}
.onboard-plan__toggle {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    overflow: hidden;
}
.onboard-plan__cycle {
    padding: 0.4rem 1rem;
    border: none;
    background: transparent;
    color: var(--sa-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--sa-font-body);
}
.onboard-plan__cycle--active {
    background: var(--sa-orange);
    color: var(--sa-white);
}
.onboard-plan__price {
    font-family: var(--sa-font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--sa-white);
    margin-bottom: 0.25rem;
}
.onboard-plan__price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--sa-text-muted);
}
.onboard-plan__savings {
    font-size: 0.8rem;
    color: var(--sa-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.onboard-plan__desc {
    color: var(--sa-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.onboard-plan__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
    width: 100%;
}
.onboard-plan__features li {
    padding: 0.35rem 0;
    color: var(--sa-text-body);
    font-size: 0.85rem;
    line-height: 1.4;
}
.onboard-plan__features li::before {
    content: "\2713 ";
    color: var(--sa-green);
    font-weight: 700;
    margin-right: 0.5rem;
}
.onboard-plan__btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--sa-border);
    background: var(--sa-surface-strong);
    color: var(--sa-white);
    font-family: var(--sa-font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}
.onboard-plan__btn:hover {
    border-color: var(--sa-blue);
    background: var(--sa-surface-hover);
    transform: translateY(-1px);
}
.onboard-plan__btn--dragon {
    background: var(--sa-orange);
    border-color: var(--sa-orange);
    color: var(--sa-white);
}
.onboard-plan__btn--dragon:hover {
    background: var(--sa-orange-hover);
    border-color: var(--sa-orange-hover);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

/* BYOK Key Entry */
.onboard-byok {
    max-width: 500px;
    width: 100%;
}
.onboard-card {
    background: var(--sa-surface);
    border: 1px solid var(--sa-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}
.onboard-card h2 {
    font-family: var(--sa-font-display);
    font-size: 1.4rem;
    color: var(--sa-white);
    margin-bottom: 0.5rem;
}
.onboard-card p {
    color: var(--sa-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.onboard-byok__provider {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid var(--sa-border);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto 1.25rem;
}
.onboard-byok__provider-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--sa-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--sa-font-body);
}
.onboard-byok__provider-btn--active {
    background: var(--sa-blue);
    color: var(--sa-white);
}
.onboard-byok form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.onboard-byok input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--sa-border);
    background: var(--sa-bg);
    color: var(--sa-white);
    font-family: monospace;
    font-size: 0.85rem;
}
.onboard-byok input[type="text"]:focus {
    outline: none;
    border-color: var(--sa-blue);
}
.onboard-byok__skip {
    margin-top: 1rem;
    background: none;
    border: none;
    color: var(--sa-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--sa-font-body);
}
.onboard-byok__skip:hover {
    color: var(--sa-blue);
}

/* Success Card */
.onboard-card--success {
    max-width: 500px;
    margin: 0 auto;
}
.onboard-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.12);
    border: 2px solid var(--sa-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
}
.onboard-card--success h1 {
    font-family: var(--sa-font-display);
    font-size: 1.6rem;
    color: var(--sa-orange);
    margin-bottom: 0.75rem;
}
.onboard-card__redirect {
    font-size: 0.85rem;
    color: var(--sa-text-muted);
    margin-top: 1rem;
}

/* Status Messages */
.onboard-status {
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
    max-width: 500px;
    width: 100%;
    text-align: center;
}
.onboard-status--error {
    background: rgba(240, 80, 80, 0.08);
    border: 1px solid rgba(240, 80, 80, 0.15);
    color: var(--sa-red);
    display: block;
}
.onboard-status--success {
    background: rgba(70, 217, 167, 0.08);
    border: 1px solid rgba(70, 217, 167, 0.15);
    color: var(--sa-green);
    display: block;
}
.onboard-status--loading {
    background: rgba(129, 175, 221, 0.08);
    border: 1px solid rgba(129, 175, 221, 0.15);
    color: var(--sa-blue);
    display: block;
}
