/* ==========================================================================
   Theme — hot pink brand, shared with Stella ops console
   ========================================================================== */
:root {
    --bg: #0a0e14;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent: #ff69b4;
    --accent-bright: #ff85c1;
    --accent-deep: #e91e8c;
    --card-bg: rgba(22, 27, 34, 0.92);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --glow: 0 0 12px rgba(255, 105, 180, 0.35);
    --overlay: rgba(10, 14, 20, 0.84);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --btn-pad-y: 0.45rem;
    --btn-pad-x: 0.95rem;
    --btn-font: 0.78rem;

    /* Semantic UI — shared meaning with Stella ops console */
    --semantic-selected: #60a5fa;
    --semantic-selected-text: #93c5fd;
    --semantic-selected-bg: rgba(96, 165, 250, 0.12);
    --semantic-selected-border: rgba(96, 165, 250, 0.45);
    --semantic-success: #4ade80;
    --semantic-success-text: #86efac;
    --semantic-success-bg: rgba(74, 222, 128, 0.12);
    --semantic-success-border: rgba(74, 222, 128, 0.38);
    --semantic-danger: #f87171;
    --semantic-danger-text: #fca5a5;
    --semantic-danger-bg: rgba(248, 113, 113, 0.12);
    --semantic-danger-border: rgba(248, 113, 113, 0.40);
    --semantic-danger-muted: #d4a574;
    --semantic-warning: #fbbf24;
    --semantic-warning-text: #fde68a;
    --semantic-warning-bg: rgba(251, 191, 36, 0.14);
    --semantic-warning-border: rgba(251, 191, 36, 0.38);
    --semantic-neutral: #94a3b8;
    --semantic-neutral-bg: rgba(148, 163, 184, 0.10);
    --semantic-neutral-border: rgba(148, 163, 184, 0.28);
    --bg-selected: var(--semantic-selected-bg);
    --border-selected: var(--semantic-selected-border);
    --text-selected: var(--semantic-selected-text);
}

[data-theme="light"] {
    --bg: #f9fbff;
    --text: #1e1e2e;
    --text-muted: #52525b;
    --accent: #d81b60;
    --accent-bright: #e91e8c;
    --accent-deep: #c2185b;
    --card-bg: rgba(255, 255, 255, 0.96);
    --border: rgba(0, 0, 0, 0.10);
    --border-strong: rgba(0, 0, 0, 0.18);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --glow: 0 0 12px rgba(216, 27, 96, 0.22);
    --overlay: rgba(249, 251, 255, 0.92);
    --semantic-selected: #2563eb;
    --semantic-selected-text: #1d4ed8;
    --semantic-selected-bg: rgba(37, 99, 235, 0.10);
    --semantic-selected-border: rgba(37, 99, 235, 0.35);
    --semantic-success-text: #15803d;
    --semantic-success-bg: rgba(34, 197, 94, 0.12);
    --semantic-success-border: rgba(34, 197, 94, 0.35);
    --semantic-danger-text: #b91c1c;
    --semantic-danger-bg: rgba(239, 68, 68, 0.10);
    --semantic-danger-border: rgba(239, 68, 68, 0.35);
    --semantic-warning-text: #b45309;
    --semantic-warning-bg: rgba(251, 191, 36, 0.16);
    --semantic-warning-border: rgba(251, 191, 36, 0.40);
}

[data-theme="light"] body {
    background-image: none;
    background-color: var(--bg);
}

[data-theme="light"] .header {
    background: rgba(249, 251, 255, 0.95);
}

[data-theme="light"] .footer {
    background: var(--bg);
    color: var(--text-muted);
}

/* ==========================================================================
   Global & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg) url('/static/img/bg-aurora.jpg') center/cover fixed;
    color: var(--text);
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    line-height: 1.65;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background 0.45s ease, color 0.45s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: -1;
    transition: background 0.45s ease;
}

/* ==========================================================================
   Layout & Structure
   ========================================================================== */
main.main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 40px 0 80px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

main.main-content:has(.playground-page) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 20px;
}

.footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    padding: 28px 40px;
    font-size: 0.92rem;
    color: #8892a6;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer-inner:has(.shop-rune-chip:not([hidden])) {
    grid-template-columns: 1fr auto;
    text-align: left;
}
.footer-inner:has(.shop-rune-chip:not([hidden])) .footer-links { justify-content: flex-start; }
.footer-copy { margin: 0; }

/* Header & Navigation */
.header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 10px;
    padding: 4px 6px;
    margin: -4px -6px;
}

.logo-link:hover {
    opacity: 0.92;
}

.logo-link:focus,
.logo-link:focus-visible,
.logo-link:active {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.logo-link--flash {
    animation: logo-flash 0.35s ease-out;
}

@keyframes logo-flash {
    0% { opacity: 1; filter: brightness(1); }
    35% { opacity: 0.55; filter: brightness(1.35); }
    100% { opacity: 1; filter: brightness(1); }
}

.logo-container img {
    height: 42px;
    width: auto;
    display: block;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    padding: var(--btn-pad-y) var(--btn-pad-x);
    border-radius: 9999px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--btn-font);
    background: transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255, 105, 180, 0.06);
    border-color: rgba(255, 105, 180, 0.35);
    color: var(--accent-bright);
}

.nav-btn.active,
.nav-btn[aria-current="page"] {
    background: rgba(255, 105, 180, 0.1);
    border-color: rgba(255, 105, 180, 0.42);
    color: var(--accent-bright);
    box-shadow: var(--glow);
}

.nav-btn--console {
    /* Same as other nav tabs — only .active highlights */
}

.theme-btn {
    position: relative;
    margin-left: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0 12px;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.theme-btn:hover {
    color: var(--accent);
}

.theme-btn .sun,
.theme-btn .moon {
    position: absolute;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.theme-btn .sun {
    opacity: 0;
    transform: rotate(-30deg) scale(0.85);
}

[data-theme="light"] .sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .moon,
[data-theme="dark"] .sun {
    opacity: 0;
}

[data-theme="dark"] .moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ==========================================================================
   Main Content & Cards
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin: 48px 0;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    font-size: 1.55rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.card p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* ==========================================================================
   Buttons & CTA
   ========================================================================== */
.cta-button {
    display: inline-block;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    border-radius: 9999px;
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--btn-font);
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
    color: var(--text);
    box-shadow: none;
}

.cta-button--action {
    background: var(--semantic-success-bg);
    border-color: var(--semantic-success-border);
    color: var(--semantic-success-text);
}

.cta-button--action:hover {
    background: rgba(74, 222, 128, 0.18);
    border-color: var(--semantic-success-border);
    color: var(--semantic-success-text);
}

.cta-button--danger {
    background: var(--semantic-danger-bg);
    border-color: var(--semantic-danger-border);
    color: var(--semantic-danger-text);
}

.cta-button--danger:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: var(--semantic-danger-border);
    color: var(--semantic-danger-text);
}

.cookie-banner button,
.chat-send-btn {
    display: inline-block;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    background: var(--semantic-success-bg);
    color: var(--semantic-success-text);
    border-radius: 9999px;
    border: 1px solid var(--semantic-success-border);
    font-weight: 600;
    font-size: var(--btn-font);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-banner button:hover,
.chat-send-btn:hover {
    background: rgba(74, 222, 128, 0.18);
    box-shadow: none;
}

.close-btn {
    display: inline-block;
    padding: var(--btn-pad-y) calc(var(--btn-pad-x) + 0.35rem);
    background: transparent;
    color: var(--text-muted);
    border-radius: 9999px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: var(--btn-font);
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    transform: translateY(-1px);
}

.cta-row {
    text-align: center;
    margin: 48px 0;
}

/* ==========================================================================
   Form
   ========================================================================== */
.contact-form {
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text);
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.05rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.22);
}

.ops-gate {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
}

.ops-gate h2 {
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.ops-gate input {
    width: 100%;
    margin: 1rem 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
}

.contact-stats {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

/* ==========================================================================
   Contact Layout (form + chat)
   ========================================================================== */
main.main-content:has(.contact-layout) {
    display: flex;
    flex-direction: column;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    margin: 0;
}

.contact-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-shadow: var(--shadow);
}

.contact-panel .panel-title {
    margin-bottom: 0.35rem;
}

.contact-panel .panel-lead {
    margin-bottom: 0.65rem;
}

.contact-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.contact-form .form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.22);
}

.contact-form .cta-button {
    align-self: flex-start;
    margin-top: 0.75rem;
    flex-shrink: 0;
}

.form-group--grow {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form-group--grow textarea {
    flex: 1 1 auto;
    min-height: 80px;
    resize: none;
}

.chat-side-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.contact-aella {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-strong);
    flex-shrink: 0;
}

.chat-side-head__text {
    min-width: 0;
}

.chat-side-head__text .panel-title {
    margin-bottom: 0.2rem;
}

.chat-side-head__text .panel-lead {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.contact-panel .aella-note-inline {
    font-size: 0.82rem;
    margin: 0 0 0.75rem;
    text-align: left;
}

.contact-layout .chat-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.contact-layout .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0.65rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.22);
    font-size: 0.9rem;
}

.contact-layout .chat-input-area {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.contact-layout .chat-input-area input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.22);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}

.contact-layout .chat-input-area input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.contact-layout .chat-container > .cta-button {
    align-self: flex-start;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.contact-layout > * {
    margin-top: 0;
}

.panel-title {
    font-size: 1.55rem;
    color: var(--accent);
    margin-bottom: 0.65rem;
}

.panel-lead {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}

.chat-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ==========================================================================
   Chat
   ========================================================================== */
.chat-header {
    text-align: center;
    margin-bottom: 16px;
}

.chat-avatar-glow {
    width: 234px;
    height: 234px;
    margin: 0 auto 32px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.35) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-glow 4s infinite ease-in-out;
}

.chat-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 105, 180, 0.5);
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.persona-btn {
    padding: 10px 28px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.persona-btn.active {
    background: var(--bg-selected);
    border-color: var(--border-selected);
    color: var(--text-selected);
    box-shadow: none;
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 280px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow-y: auto;
}

.chat-input-area {
    display: flex;
    gap: 12px;
}

#chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
}

.chat-send-btn {
    padding: 12px 24px;
    background: var(--semantic-success-bg);
    color: var(--semantic-success-text);
    border: 1px solid var(--semantic-success-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.reset-chat-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--semantic-danger-bg);
    color: var(--semantic-danger-text);
    border: 1px solid var(--semantic-danger-border);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.reset-chat-btn:hover {
    background: rgba(248, 113, 113, 0.18);
}

.message {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
}

.message.user {
    background: rgba(255, 105, 180, 0.18);
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: rgba(100, 100, 100, 0.22);
    margin-right: auto;
}

/* ==========================================================================
   Language Selector
   ========================================================================== */
.lang-selector {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

#lang-select {
    background: transparent;
    border: 1px solid rgba(255, 105, 180, 0.35);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 8px;
    cursor: pointer;
    appearance: none;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

#lang-select:hover {
    border-color: var(--accent);
    background: rgba(255, 105, 180, 0.08);
}

#lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.3);
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 105, 180, 0.12);
    border-top: 1px solid rgba(255, 105, 180, 0.25);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 9999;
    font-size: 0.92rem;
    color: var(--text);
    padding: 0 40px;
}

.cookie-banner button {
    background: rgba(255, 105, 180, 0.75);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-banner button:hover {
    background: rgba(255, 105, 180, 1);
}

/* ==========================================================================
   Other Components (Local, Gallery, Overlay, etc.)
   ========================================================================== */
.local-layout {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 800px);  /* cap right column max width */
    gap: 48px;
    align-items: start;
    justify-content: center;  /* centers the entire grid tracks within the container if there's extra space */
    max-width: 1280px;        /* match parent container for safety */
    margin: 0 auto;           /* redundant but explicit centering */
}

.sidebar {
    position: sticky;
    top: 0px;
    padding: 32px 24px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 320px;
}

.map-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 24px;
    display: block;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.main-section {
    padding: 0 24px 40px;          /* breathing room, consistent with cards */
    max-width: calc(100% - 48px);             /* cap content width to avoid stretch-bloat */
    margin: 0 auto;                /* center within its grid cell if extra space */
    width: 100%;
}

/* Main container – constrains and hides overflow */
.image-carousel {
    width: 100%;
    overflow: hidden;              /* hides edges for clean loop */
    margin: 32px 0;
    position: relative;
}

/* Track that holds images and animates */
.carousel-track {
    display: flex;
    gap: 24px;
    animation: scroll 40s linear infinite;  /* speed: adjust 40s to faster/slower */
    width: max-content;                    /* allows full width of duplicated content */
    will-change: transform;                /* perf hint */
}

/* Pause on hover for usability */
.image-carousel:hover .carousel-track {
    animation-play-state: paused;
}

/* Image styling – keep hover effects */
.carousel-img {
    flex: 0 0 auto;
    width: 360px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-img:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* Infinite scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);  /* -50% because we duplicated the set */
    }
}

@media (max-width: 960px) {
    .contact-layout,
    .local-layout {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        height: auto;
    }

    .contact-panel {
        min-height: min(480px, calc(100vh - 240px));
    }
    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 900px) {
    .header {
        flex-direction: column;
        gap: 24px;
        padding: 20px 24px;
    }
    .chat-section {
        max-height: 60vh;
    }
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .nav-btn {
        padding: 9px 18px;
        font-size: 0.92rem;
    }
}

 /* ==========================================================================
    List
    ========================================================================== */
.services-list {
    list-style: none;
    padding: 0;
    margin: 32px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.services-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-list li:hover {
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.services-list .icon {
    font-size: 2rem;
    color: var(--accent);
    min-width: 40px;
    text-align: center;
}

.services-list li span:not(.icon) {
    color: var(--text);
    font-size: 1.05rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==========================================================================
   Spinner
   ========================================================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinner {
    border: 4px solid rgba(255,105,180,0.3);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ==========================================================================
   Video & Misc
   ========================================================================== */
.video-wrapper {
    position: relative;
    width: 100%;
    margin: 16px 0 20px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border);
    aspect-ratio: 16 / 9;
}

.video-wrapper.hero-video {
    aspect-ratio: 16 / 9;
    max-height: 286px;
}

.video-wrapper--card {
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.card-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: var(--card-bg);
}

.product-card p {
    font-size: 0.95rem;
    line-height: 1.55;
}

.replay-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent);
    border: 1px solid var(--border-strong);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.replay-btn:not([hidden]) {
    display: flex;
}

.replay-btn:hover {
    background: var(--bg-selected);
    border-color: var(--border-selected);
    color: var(--text-selected);
    transform: translate(-50%, -50%) scale(1.1);
}

.thank-you-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.thank-you-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 3.5rem;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.thank-you-box .close-btn {
    padding: 12px 32px;
    background: var(--semantic-success-bg);
    color: var(--semantic-success-text);
    border: 1px solid var(--semantic-success-border);
    border-radius: 9999px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.thank-you-box .close-btn:hover {
    background: rgba(74, 222, 128, 0.18);
    transform: translateY(-2px);
}

/* ==========================================================================
   Beta banner, trust strip, flagship products
   ========================================================================== */
.beta-banner {
    flex-shrink: 0;
    text-align: center;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--semantic-warning-text);
    background: var(--semantic-warning-bg);
    border-bottom: 1px solid var(--semantic-warning-border);
}

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0 2rem;
}

.trust-pill {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    background: rgba(255, 105, 180, 0.08);
    color: var(--accent-bright);
}

.why-now,
.flagship-section {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.why-now h3,
.flagship-section h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1.35rem;
}

.lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.flagship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.card--flagship {
    border-color: var(--border-strong);
}

.card--flagship.card--thala {
    border-color: rgba(251, 191, 36, 0.45);
}

.card--flagship .card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-bright);
    margin-bottom: 0.35rem;
}

.card--thala .card-label {
    color: #fbbf24;
}

.card--flagship h4 {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.feature-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.feature-list.compact {
    margin: 0.75rem 0 1rem;
}

.platform-detail {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.platform-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(255, 105, 180, 0.15);
    border: 1px solid var(--border-strong);
    color: var(--accent-bright);
    margin-bottom: 0.75rem;
}

.platform-badge--thala {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
}

.platform-detail h3 .tagline {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.35rem;
}

.platform-detail .specs {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
    margin: 1rem 0;
}

.platform-detail .suited {
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
}

.aella-note-inline {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.card--summary h3 {
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
}

.card--summary p {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.roadmap-section {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: linear-gradient(165deg, rgba(8, 47, 73, 0.35), var(--card-bg) 55%);
    box-shadow: var(--shadow);
}

.roadmap-section h3 {
    color: #67e8f9;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.roadmap-card {
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: rgba(8, 47, 73, 0.25);
}

.roadmap-card h4 {
    font-size: 1rem;
    color: var(--text);
    margin: 0.35rem 0 0.5rem;
}

.roadmap-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.roadmap-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #22d3ee;
}

.aella-note {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--card-bg);
}

.aella-note h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.pricing-section {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.pricing-section h3 {
    color: var(--accent);
    margin-bottom: 0.65rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.card--pricing {
    border-color: var(--border-strong);
}

.card--pricing h4 {
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.pricing-tier {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
    color: var(--text);
}

.solutions-jump {
    position: sticky;
    top: -20px;
    z-index: 900;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1rem 0 1.5rem;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
}

.solutions-jump__tab {
    pointer-events: auto;
}

.solutions-jump__tab {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--btn-font);
    color: var(--text);
    background: rgba(10, 14, 20, 0.82);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
}

.solutions-jump__tab::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.solutions-jump__tab--offline::before {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), transparent 70%);
}

.solutions-jump__tab--resilient::before {
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.4), transparent 70%);
}

.solutions-jump__tab--rugged::before {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.35), transparent 70%);
}

.solutions-jump__tab:hover,
.solutions-jump__tab:focus-visible {
    transform: translateY(-3px);
    border-color: var(--border-strong);
}

.solutions-jump__tab:hover::before,
.solutions-jump__tab:focus-visible::before,
.solutions-jump__tab.is-active::before {
    opacity: 1;
}

.solutions-jump__tab--offline:hover,
.solutions-jump__tab--resilient:hover,
.solutions-jump__tab--rugged:hover {
    border-color: var(--border);
}

.solutions-jump__tab.is-active,
.solutions-jump__tab--offline.is-active,
.solutions-jump__tab--resilient.is-active,
.solutions-jump__tab--rugged.is-active {
    border-color: var(--accent);
    background: rgba(255, 105, 180, 0.14);
    box-shadow: var(--glow), 0 6px 18px rgba(0, 0, 0, 0.3);
    color: var(--accent-bright);
}

.solutions-jump__tab.is-active {
    transform: translateY(-2px);
}

.solutions-jump__icon {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.solutions-jump__tab--offline .solutions-jump__icon { color: #22d3ee; }
.solutions-jump__tab--resilient .solutions-jump__icon { color: var(--accent-bright); }
.solutions-jump__tab--rugged .solutions-jump__icon { color: #fbbf24; }

.solutions-jump__label {
    line-height: 1.25;
}

.solution-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    scroll-margin-top: 58px;
}

.solution-section .video-wrapper.hero-video {
    max-height: 286px;
}

.solution-section .video-wrapper:not(.hero-video) {
    max-height: 191px;
}

.solution-section__title {
    font-size: 1.65rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.techlink-block {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-strong);
    background: color-mix(in srgb, var(--card-bg) 85%, var(--bg));
}

.techlink-block h3 {
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.techlink-tagline {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 0.65rem;
}

.token-vision {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(167, 139, 250, 0.28);
    background: linear-gradient(165deg, rgba(76, 29, 149, 0.22), var(--card-bg) 60%);
    box-shadow: var(--shadow);
}

.token-vision h3 {
    color: #c4b5fd;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.token-vision-lead {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.token-pillar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.token-pillar {
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(167, 139, 250, 0.2);
    background: rgba(30, 27, 75, 0.35);
}

.token-pillar__num {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #a78bfa;
    margin-bottom: 0.45rem;
}

.token-pillar h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.45rem;
}

.token-pillar p {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.token-design h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a78bfa;
    margin-bottom: 0.75rem;
}

.token-design-list {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.token-design-list li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.token-design-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #a78bfa;
    font-weight: 700;
}

.platforms-token-cta,
.token-design-cta {
    margin-top: 1rem;
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(167, 139, 250, 0.12);
    color: #c4b5fd;
}

.token-design-cta:hover {
    background: rgba(167, 139, 250, 0.22);
    color: #e9d5ff;
    border-color: rgba(167, 139, 250, 0.6);
}

.token-flow {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(167, 139, 250, 0.22);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.token-flow h3 {
    color: #c4b5fd;
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
}

.token-flow__diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.token-flow__node {
    flex: 1 1 160px;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(30, 27, 75, 0.3);
}

.token-flow__step {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #a78bfa;
    margin-bottom: 0.35rem;
}

.token-flow__node strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.token-flow__node p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.token-flow__arrow {
    align-self: center;
    color: #a78bfa;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.token-stack {
    margin: 2rem 0 1rem;
}

.token-stack h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.token-stack__layers {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.token-stack__layer {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.token-stack__label {
    display: block;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--accent-bright);
    margin-bottom: 0.3rem;
}

.token-stack__layer p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

.token-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    background: var(--semantic-neutral-bg);
}

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 5.5rem;
    z-index: 1100;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    transform: translateY(-4px);
    border-color: var(--border-selected);
    background: var(--bg-selected);
    color: var(--text-selected);
}

.back-to-top__arrow {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.code-block {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--bg) 70%, #000 30%);
    border: 1px solid var(--border);
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.5;
}

.code-block code {
    font-family: ui-monospace, "Cascadia Code", monospace;
    color: var(--accent-bright);
    white-space: pre-wrap;
    word-break: break-all;
}

[data-theme="light"] .beta-banner {
    background: linear-gradient(90deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.9), rgba(224, 242, 254, 0.95));
    color: #0e7490;
    border-bottom-color: rgba(14, 116, 144, 0.25);
}

[data-theme="light"] .roadmap-section {
    background: linear-gradient(165deg, rgba(224, 242, 254, 0.6), var(--card-bg) 55%);
    border-color: rgba(14, 116, 144, 0.2);
}

[data-theme="light"] .roadmap-section h3 {
    color: #0e7490;
}

[data-theme="light"] .roadmap-card {
    background: rgba(224, 242, 254, 0.5);
    border-color: rgba(14, 116, 144, 0.15);
}

[data-theme="light"] .roadmap-label {
    color: #0891b2;
}

[data-theme="light"] .trust-pill {
    background: rgba(216, 27, 96, 0.08);
    color: var(--accent-deep);
}

[data-theme="light"] .why-now,
[data-theme="light"] .flagship-section,
[data-theme="light"] .platform-detail,
[data-theme="light"] .pricing-section,
[data-theme="light"] .aella-note {
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

[data-theme="light"] .solutions-jump__tab {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .contact-form .form-group input,
[data-theme="light"] .contact-form .form-group textarea,
[data-theme="light"] .contact-layout .chat-messages,
[data-theme="light"] .contact-layout .chat-input-area input {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .techlink-block {
    background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .token-vision {
    background: linear-gradient(165deg, rgba(237, 233, 254, 0.7), var(--card-bg) 60%);
    border-color: rgba(124, 58, 237, 0.2);
}

[data-theme="light"] .token-vision h3 {
    color: #6d28d9;
}

[data-theme="light"] .token-pillar {
    background: rgba(237, 233, 254, 0.5);
    border-color: rgba(124, 58, 237, 0.15);
}

[data-theme="light"] .back-to-top {
    background: linear-gradient(145deg, rgba(216, 27, 96, 0.15), rgba(255, 255, 255, 0.95));
}

/* ==========================================================================
   Stella-aligned contact panels
   ========================================================================== */
.contact-layout--stella {
    align-items: stretch;
}

.stella-panel {
    background: rgba(22, 22, 26, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[data-theme="light"] .stella-panel {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.10);
}

.stella-panel__head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 105, 180, 0.25);
    background: rgba(9, 9, 11, 0.55);
}

[data-theme="light"] .stella-panel__head {
    background: rgba(249, 251, 255, 0.9);
}

.stella-panel__head--center {
    text-align: center;
}

.stella-panel__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.4rem;
    letter-spacing: 0.02em;
}

.stella-panel__lead {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.stella-form {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1 1 auto;
}

.stella-field {
    margin-bottom: 1rem;
}

.stella-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.stella-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(9, 9, 11, 0.55);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .stella-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
}

.stella-input:focus {
    outline: none;
    border-color: var(--border-selected);
    box-shadow: 0 0 0 2px var(--semantic-selected-bg);
}

.stella-textarea {
    resize: vertical;
    min-height: 120px;
}

.stella-btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
    border: 1px solid transparent;
}

.stella-btn--primary {
    background: var(--semantic-success-bg);
    border-color: var(--semantic-success-border);
    color: var(--semantic-success-text);
}

.stella-btn--primary:hover {
    background: rgba(74, 222, 128, 0.18);
}

.stella-btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.stella-chat {
    padding: 0 1.5rem 1.25rem;
    flex: 1 1 auto;
}

.stella-chat__messages {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.stella-chat__input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0 0;
    background: transparent;
    border: none;
}

.stella-chat__input .stella-input {
    flex: 1;
}

.contact-layout--stella .chat-avatar-glow {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
}

.contact-layout--stella .chat-avatar {
    width: 100px;
    height: 100px;
}

.contact-layout--stella .contact-stats {
    padding: 0 1.5rem;
    margin: 0;
}

[data-theme="light"] .code-block {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .code-block code {
    color: var(--accent-deep);
}

[data-theme="light"] .lead,
[data-theme="light"] .feature-list li {
    color: var(--text-muted);
}

[data-theme="light"] .platform-detail .specs {
    color: var(--text-muted);
}

[data-theme="light"] .cookie-banner {
    background: var(--card-bg);
    border-color: var(--border);
}

/* ── Footer links ── */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: var(--accent);
}

/* ── Technology ── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.tech-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.tech-card--accent {
    border-color: rgba(255, 105, 180, 0.45);
}
.tech-card--wide {
    grid-column: 1 / -1;
}
.section-cta {
    margin-top: 2rem;
    text-align: center;
}
.text-link {
    color: var(--accent);
    text-decoration: none;
}
.text-link:hover {
    text-decoration: underline;
}

/* ── Ecosystem ── */
.ecosystem-diagram {
    margin: 2rem 0;
    text-align: center;
}
.eco-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.eco-node {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 120px;
}
.eco-node span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.eco-cluster {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.eco-arrow {
    font-size: 1.5rem;
    color: var(--accent);
}
.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.eco-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.eco-tagline {
    color: var(--accent);
    font-size: 0.9rem;
    margin: 0.25rem 0 0.75rem;
}

/* ── Aella page ── */
.aella-hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}
@media (max-width: 700px) {
    .aella-hero { grid-template-columns: 1fr; }
}
.aella-hours-banner {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 105, 180, 0.35);
    border-radius: 10px;
    background: rgba(255, 105, 180, 0.08);
}
.aella-hours-banner__lead {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.shop-product__link {
    display: inline-block;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.aella-wireframe {
    position: relative;
    width: 200px;
    height: 200px;
    border: 2px dashed rgba(255, 105, 180, 0.5);
    border-radius: 12px;
    overflow: hidden;
}
.aella-wireframe__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,105,180,0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,105,180,0.08) 1px, transparent 1px);
    background-size: 16px 16px;
}
.aella-wireframe__avatar {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: saturate(0.9) contrast(1.05);
}
.aella-acronym {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.aella-note {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.aella-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.aella-role-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}
.aella-cloud-note {
    text-align: center;
    color: var(--text-muted);
    margin: 1.5rem 0;
}
.aella-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.cta-button--ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* ── Playground v0.4 ── */
.playground-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - var(--pg-chrome, 300px));
    height: calc(100vh - var(--pg-chrome, 300px));
    gap: 0.75rem;
    overflow: hidden;
}
.pg-page-head { flex-shrink: 0; }
.pg-page-head h2 { margin-bottom: 0.25rem; }
.pg-page-head .lead { margin: 0; font-size: 0.95rem; }

.pg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}
.pg-tab {
    padding: 0.35rem 0;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.pg-tab:hover { color: var(--text); }
.pg-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.pg-stage {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}
.pg-stage.is-active { display: flex; }
#stage-colors.is-active { overflow-y: auto; }

.pg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: flex-end;
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}
.pg-toolbar--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
    align-items: end;
}
.pg-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.pg-field--grow { flex: 1; min-width: 140px; }
.pg-field--xs { min-width: 72px; max-width: 88px; }
.pg-field-label { font-size: 0.78rem; color: var(--text-muted); }

.pg-control {
    font: inherit;
    font-size: 0.88rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
    color: inherit;
    min-width: 0;
}
.pg-control--color {
    width: 100%;
    height: 36px;
    padding: 2px;
    cursor: pointer;
}
.pg-control--area { resize: vertical; min-height: 4.5rem; }

.pg-btn {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #111;
    cursor: pointer;
    font-weight: 600;
}
.pg-btn--ghost {
    background: transparent;
    color: var(--accent);
}
.pg-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.pg-ascii-viewport {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    overflow: hidden;
}
.pg-ascii-out {
    margin: 0;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.12;
    white-space: pre;
    text-align: center;
    overflow: hidden;
}

.pg-qr-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(200px, 1fr);
    gap: 1.25rem;
    overflow: hidden;
}
@media (max-width: 800px) {
    .pg-qr-layout { grid-template-columns: 1fr; overflow: auto; }
}
.pg-qr-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}
.pg-qr-fields { display: flex; flex-direction: column; gap: 0.5rem; }
.pg-qr-fields[hidden], .pg-field[hidden] { display: none !important; }
.pg-qr-fields--grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
.pg-logo-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.pg-logo-name {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pg-qr-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 1rem;
}
.pg-qr-preview canvas {
    max-width: 100%;
    max-height: min(48vh, 360px);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.pg-colors-rainbow {
    flex-shrink: 0;
    height: 112px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: crosshair;
    margin-bottom: 0.65rem;
}
.pg-colors-picked {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-bottom: 0.65rem;
    min-height: 40px;
}
.pg-colors-picked-swatch {
    width: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.pg-colors-picked-swatch--empty {
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.06) 6px,
        transparent 6px,
        transparent 12px
    );
}
.pg-colors-variants {
    flex: 1;
    display: flex;
    gap: 3px;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.pg-color-variant {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0;
    cursor: pointer;
    min-height: 40px;
    transition: transform 0.1s, box-shadow 0.1s;
}
.pg-color-variant:hover {
    transform: scaleY(1.08);
    z-index: 1;
    box-shadow: 0 0 0 2px var(--accent);
}
.pg-colors-count { font-weight: 400; opacity: 0.7; }
.pg-colors-empty {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.pg-colors-suggest {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}
.pg-colors-named--suggest {
    max-height: 72px;
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
}
.pg-colors-variants--suggest { margin-bottom: 0.35rem; }
.pg-color-convert {
    flex-shrink: 0;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
}
.pg-convert-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.pg-convert-out { flex: 1; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.pg-convert-detect { font-size: 0.72rem; color: #60a5fa; font-weight: 600; text-transform: lowercase; }
.pg-symbol-block--lazy .pg-symbol-grid { min-height: 2.5rem; }
.pg-symbol-count--pending { opacity: 0.5; }
.pg-colors-subhead {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.pg-colors-named {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 4px;
    overflow: auto;
    padding: 2px;
}
.pg-color-chip {
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    transition: transform 0.1s, box-shadow 0.1s;
}
.pg-color-chip:hover {
    transform: scale(1.12);
    z-index: 2;
    box-shadow: 0 0 0 2px var(--accent);
}

.pg-symbols-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
.pg-symbols-loading {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.pg-symbol-block { margin-bottom: 1rem; }
.pg-symbol-title {
    margin: 0 0 0.45rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.pg-symbol-count { font-weight: 400; opacity: 0.75; }
.pg-symbol-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.pg-symbol-btn {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0;
}
.pg-symbol-btn:hover { border-color: var(--accent); background: rgba(255, 105, 180, 0.08); }

.pg-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    max-width: min(92vw, 520px);
    padding: 0.55rem 1rem;
    border-radius: 8px;
    background: rgba(255, 105, 180, 0.94);
    color: #111;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    text-align: center;
    word-break: break-all;
}
.pg-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Shop ── */
.shop-badge {
    font-size: 0.65rem;
    vertical-align: middle;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 105, 180, 0.2);
    color: var(--accent);
    margin-left: 0.5rem;
}
.shop-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 800px) {
    .shop-layout { grid-template-columns: 1fr; }
}
.shop-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.shop-product {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.shop-product__link-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.shop-product__link-card:hover .shop-product__name {
    color: var(--accent-bright);
}
.shop-product__name {
    margin: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}
.shop-product__tags {
    margin: 0.2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.shop-product__desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-product__meta {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.shop-cart {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
    align-self: start;
}
.shop-cart-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.shop-cart-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.shop-checkout-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ── Patch 1: nav, lang, ecosystem v2 ── */
.lang-select {
    font: inherit;
    font-family: inherit;
    font-size: 0.72rem;
    text-transform: lowercase;
}
.nav-cart-badge {
    display: inline-flex;
    min-width: 1.1rem;
    height: 1.1rem;
    margin-left: 0.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--accent);
    color: #111;
    font-size: 0.65rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}
.platform-badge--saga { background: rgba(255, 193, 7, 0.2); color: #ffc107; border-color: rgba(255, 193, 7, 0.45); }
.platform-detail--saga { border-color: rgba(255, 193, 7, 0.35); }
.platform-detail--bundle { border-color: rgba(96, 165, 250, 0.35); }

.eco-flow--v2 { flex-direction: column; gap: 1rem; }
.eco-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; align-items: center; }
.eco-node--core { min-width: 200px; }
.eco-node__badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    margin-bottom: 0.35rem;
}
.eco-bundle { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.eco-link-bar { width: 2rem; height: 3px; background: var(--border); border-radius: 2px; }
.eco-standalone-label { font-size: 0.65rem; color: var(--text-muted); font-style: normal; display: block; margin-top: 0.25rem; }
.eco-caption { color: var(--text-muted); font-size: 0.85rem; text-align: center; margin-top: 0.75rem; }

.control-page { max-width: 760px; }
.control-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 1rem;
}
.control-tab {
    padding: var(--btn-pad-y) var(--btn-pad-x);
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: var(--btn-font);
    cursor: pointer;
}
.control-tab.is-active {
    background: rgba(255, 105, 180, 0.1);
    border-color: rgba(255, 105, 180, 0.42);
    color: var(--accent-bright);
}
.control-panel { display: none; }
.control-panel.is-active { display: block; }
.control-card, .ops-gate { margin-top: 0.5rem; }
.control-form label { display: block; margin: 0.75rem 0 0.35rem; font-weight: 600; }
.control-form input,
.control-form textarea {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
}
.control-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }
.control-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 1rem 0; }
.control-dl dt { color: var(--text-muted); font-weight: 600; }
.control-form-status { margin-top: 0.75rem; font-size: 0.9rem; }
.control-form-status.is-error { color: #f87171; }
.control-status { font-size: 0.9rem; color: var(--text-muted); }

.shop-catalog-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }
.shop-catalog-source { font-family: ui-monospace, monospace; color: var(--accent-bright); }

.platform-badge--coming { border-color: var(--border); color: var(--text-muted); }
.platform-badge--skjal { border-color: rgba(167, 139, 250, 0.45); color: #c4b5fd; }
.platform-badge--shipping { border-color: rgba(74, 222, 128, 0.45); color: #4ade80; }
.platform-detail--coming { opacity: 0.92; }
.shop-product__saga-id {
    font-weight: 600;
    font-family: ui-monospace, monospace;
}

/* Contact v2 */
.contact-page-lead { margin-bottom: 1.25rem; }
.contact-layout--v2 { min-height: min(70vh, 720px); align-items: stretch; }
.contact-form--v2 .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.chat-status-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.8rem;
    border: 1px solid var(--border); margin-top: 0.35rem;
}
.chat-status-pill.is-online { border-color: rgba(74, 222, 128, 0.5); color: #86efac; }
.chat-status-pill.is-away { border-color: rgba(251, 146, 60, 0.5); color: #fdba74; }
.chat-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chat-schedule-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.35rem 0 0; }
.chat-section { position: relative; }
.chat-section--offline .chat-container { opacity: 0.45; pointer-events: none; }
.chat-offline-overlay {
    position: absolute; inset: auto 0 0 0; padding: 1rem;
    background: rgba(0, 0, 0, 0.55); border-radius: 0 0 10px 10px;
    text-align: center; font-size: 0.9rem;
}



/* Shop v2 basket */
.shop-layout--v2 { grid-template-columns: 1fr minmax(280px, 320px); }
.shop-basket {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 12px; padding: 1.25rem; position: sticky; top: 1rem;
}
.shop-basket-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.shop-basket-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.shop-remove {
    background: transparent; border: none; color: var(--accent);
    cursor: pointer; font-size: 0.8rem; text-decoration: underline;
}
.shop-product__head { min-width: 0; }
.shop-product__rev { font-family: ui-monospace, monospace; }
.shop-product-page { max-width: 920px; }
.shop-product-breadcrumb {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.45rem;
    align-items: center;
}
.shop-product-hero {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 2rem;
}
@media (max-width: 640px) {
    .shop-product-hero { grid-template-columns: 1fr; }
}
.shop-product-hero__img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}
.shop-product-hero__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    line-height: 1.15;
}
.shop-product-hero__tags {
    margin: 0 0 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.shop-product__status-pill {
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
}
.shop-product-hero__lead {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.shop-product-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.shop-product-body {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
.shop-product-body h2 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.saga-rich-read { font-size: 0.9rem; line-height: 1.55; }
.saga-rich-read p { margin: 0 0 0.65rem; }
.saga-rich-read ul, .saga-rich-read ol { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.shop-basket-totals { display: flex; justify-content: space-between; margin: 1rem 0; font-size: 0.95rem; }
.shop-product__img-wrap {
    width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
    margin-bottom: 0.85rem; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border);
}
.shop-product__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.shop-rune-chip {
    display: flex; flex-direction: column; gap: 0.15rem; align-items: flex-end;
    padding: 0.55rem 0.75rem; border-radius: 10px;
    border: 1px solid rgba(147, 197, 253, 0.35); background: rgba(37, 99, 235, 0.12);
    font-size: 0.82rem; min-width: 10rem;
}
.shop-rune-chip--footer { justify-self: end; align-self: end; }
.shop-rune-chip__label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.shop-rune-chip__id { font-family: ui-monospace, monospace; color: #93c5fd; font-weight: 600; }
.shop-rune-chip__email { font-size: 0.78rem; color: var(--text-muted); max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-payment-preview { margin: 1rem 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.shop-payment-preview h4 { margin: 0 0 0.65rem; font-size: 0.9rem; color: var(--text-muted); }
.shop-payment-rails { display: flex; flex-direction: column; gap: 0.45rem; }
.shop-pay-rail {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15); font-size: 0.82rem;
}
.shop-pay-rail__main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.shop-pay-rail__name { font-weight: 600; }
.shop-pay-rail__desc { font-size: 0.72rem; color: var(--text-muted); }
.shop-pay-rail__status {
    flex-shrink: 0; padding: 0.15rem 0.45rem; border-radius: 999px; font-size: 0.68rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
    border: 1px solid rgba(251, 146, 60, 0.45); color: #fdba74; background: rgba(251, 146, 60, 0.1);
}
.shop-pay-rail--live .shop-pay-rail__status {
    border-color: rgba(74, 222, 128, 0.45); color: #86efac; background: rgba(74, 222, 128, 0.1);
}
.shop-payment-methods { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.shop-pay-chip {
    padding: 0.25rem 0.55rem; border-radius: 6px; font-size: 0.75rem;
    border: 1px dashed var(--border); color: var(--text-muted);
}

.shop-modal {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: calc(100% - 2rem);
    background: var(--card-bg);
    color: inherit;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    margin: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.shop-modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.shop-modal__inner { padding: 1.25rem 1.5rem 1.5rem; }
.shop-modal__inner h3 { margin: 0 0 0.35rem; }
.shop-modal__lead { margin: 0 0 1rem; font-size: 0.88rem; color: var(--text-muted); }
.shop-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.shop-modal__field input {
    font: inherit;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
}
.shop-modal__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.shop-modal__status {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: var(--accent);
}
.shop-modal__status.is-error { color: #f87171; }

@media (max-width: 700px) {
    .contact-form--v2 .form-row { grid-template-columns: 1fr; }
    .pg-qr-fields--grid { grid-template-columns: 1fr; }
    .pg-colors-rainbow { height: 88px; }
}

/* ── Software downloads ── */
.software-page {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 0 2rem;
}
.sw-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    margin-top: 1rem;
}
.sw-card--rune {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.sw-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.sw-card__head h3 { margin: 0.15rem 0 0; }
.sw-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}
.sw-tagline {
    margin: 0.2rem 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.sw-version {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
    flex-shrink: 0;
}
.sw-block { margin-top: 1.15rem; }
.sw-block h4 {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
}
.sw-hint {
    margin: 0 0 0.5rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.sw-hint--sub { margin-top: 0.65rem; }
.sw-code-block {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    flex-wrap: wrap;
}
.sw-code {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.sw-copy {
    flex-shrink: 0;
    align-self: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.sw-copy:active { transform: scale(0.97); }
.sw-copy.is-copied {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    color: var(--accent);
}
.sw-dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.55rem;
}
.sw-dl {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}
a.sw-dl:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    background: rgba(255, 255, 255, 0.05);
}
.sw-dl strong { font-size: 0.88rem; }
.sw-dl span { font-size: 0.76rem; color: var(--text-muted); }
.sw-dl--muted { opacity: 0.95; }
.sw-dl--soon {
    opacity: 0.55;
    cursor: default;
}
.sw-steps {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.sw-steps li { margin-bottom: 0.45rem; }
.sw-steps strong { color: var(--text); }
.sw-footnote {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.sw-security {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted);
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
    background: rgba(255, 255, 255, 0.03);
}
