:root {
    --bg: #0b1220;
    --bg-alt: #0f1728;
    --panel: #111a2d;
    --panel-2: #151f35;
    --panel-3: #1a2740;
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.28);
    --text: #f4f7fb;
    --text-soft: #d5deea;
    --muted: #9aabc2;
    --muted-strong: #c2cfde;
    --accent: #5b8cff;
    --accent-soft: rgba(91, 140, 255, 0.12);
    --success: #3fb984;
    --warning: #d9a441;
    --danger: #d76a73;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 8px 24px rgba(7, 12, 22, 0.18);
    --shadow-md: 0 18px 48px rgba(7, 12, 22, 0.24);
    --shadow-lg: 0 30px 80px rgba(7, 12, 22, 0.28);
    --max-width: 1240px;
    --header-height: 76px;
}

body[data-ui-theme="graphite"] {
    --bg: #111317;
    --bg-alt: #171a20;
    --panel: #1b1f26;
    --panel-2: #20252d;
    --panel-3: #272d37;
    --text: #f5f7fb;
    --text-soft: #dde3ea;
    --muted: #9ca5b3;
    --accent: #7aa2ff;
    --accent-soft: rgba(122, 162, 255, 0.12);
}

body[data-ui-theme="aurora"] {
    --bg: #0a1220;
    --bg-alt: #0f1829;
    --panel: #121d31;
    --panel-2: #16243a;
    --panel-3: #1b2b45;
    --accent: #4d88ff;
    --accent-soft: rgba(77, 136, 255, 0.14);
}

body[data-ui-theme="ivory"] {
    --bg: #f3f5f8;
    --bg-alt: #edf1f6;
    --panel: #ffffff;
    --panel-2: #ffffff;
    --panel-3: #f7f9fc;
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text: #0f172a;
    --text-soft: #22314b;
    --muted: #617189;
    --muted-strong: #425166;
    --accent: #3569f6;
    --accent-soft: rgba(53, 105, 246, 0.08);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.1);
}

body[data-ui-theme="voltage"] {
    --bg: #0d1117;
    --bg-alt: #121826;
    --panel: #161f31;
    --panel-2: #1a2640;
    --panel-3: #22314f;
    --accent: #6d8cff;
    --accent-soft: rgba(109, 140, 255, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    background: none;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    padding: 0.82rem 0.95rem;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

body[data-ui-theme="ivory"] input,
body[data-ui-theme="ivory"] textarea,
body[data-ui-theme="ivory"] select {
    background: var(--panel-2);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(91, 140, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

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

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.75rem;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(11, 18, 32, 0.84);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

body[data-ui-theme="ivory"] .site-header {
    background: rgba(243, 245, 248, 0.88);
}

.site-header-inner {
    max-width: var(--max-width);
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-copy strong {
    font-size: 0.96rem;
    letter-spacing: -0.02em;
}

.brand-copy span {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav,
.site-header-actions,
.site-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-nav {
    flex-wrap: wrap;
}

.site-nav a,
.header-link,
.sidebar-link {
    color: var(--muted);
    transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.site-nav a:hover,
.header-link:hover,
.sidebar-link:hover {
    color: var(--text);
}

.site-nav a,
.header-link {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.92rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-switch form,
.theme-switch,
.inline-form {
    margin: 0;
}

.lang-pill,
.theme-switch select,
.nav-button {
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    padding: 0 12px;
}

.lang-pill {
    min-width: 46px;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 600;
}

.lang-pill.active,
.nav-highlight {
    border-color: rgba(91, 140, 255, 0.32);
    background: var(--accent-soft);
    color: var(--text);
}

.nav-highlight,
.nav-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 120ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.button {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    cursor: pointer;
}

.button:hover,
.nav-button:hover,
.nav-highlight:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.button-primary:hover {
    background: #4d7ef0;
    border-color: #4d7ef0;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.button-secondary:hover,
.nav-button:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--border-strong);
}

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

.button-ghost:hover {
    color: var(--text);
    background: rgba(148, 163, 184, 0.08);
}

.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
}

.button-block {
    width: 100%;
}

.nav-button {
    cursor: pointer;
}

.flash-stack {
    max-width: var(--max-width);
    margin: 16px auto 0;
    padding: 0 24px;
    display: grid;
    gap: 10px;
}

.flash {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow-sm);
}

.flash-success {
    border-color: rgba(63, 185, 132, 0.28);
}

.flash-warning {
    border-color: rgba(217, 164, 65, 0.28);
}

.flash-error {
    border-color: rgba(215, 106, 115, 0.28);
}

.workspace-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 24px;
    min-height: calc(100vh - var(--header-height) - 72px);
}

.workspace-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.sidebar-group + .sidebar-group {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.sidebar-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar-link {
    display: block;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 12px;
    font-size: 0.94rem;
}

.sidebar-link.active {
    background: var(--accent-soft);
    color: var(--text);
}

.workspace-main {
    min-width: 0;
}

main {
    width: 100%;
}

.public-main,
.landing-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 72px;
}

.app-shell {
    display: grid;
    gap: 32px;
}

.section,
.section-slab {
    padding-top: 40px;
}

.section-tight {
    padding-top: 8px;
}

.page-header,
.app-hero,
.landing-hero,
.auth-shell {
    display: grid;
    gap: 28px;
}

.page-header,
.app-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    align-items: start;
}

.page-header-single {
    grid-template-columns: 1fr;
}

.page-eyebrow,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow-small {
    font-size: 0.7rem;
}

.page-title,
.app-hero h1,
.landing-hero h1,
.auth-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.page-lead,
.hero-text,
.flagship-hero-lead,
.auth-panel p,
.landing-hero p {
    margin: 0;
    max-width: 760px;
    color: var(--text-soft);
    font-size: 1.02rem;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.stats-grid,
.app-hero-stats,
.flagship-stat-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.detail-card,
.stat-card,
.flagship-stat-card {
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.detail-card strong,
.stat-card strong,
.flagship-stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.detail-label {
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.landing-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    padding-top: 56px;
    align-items: center;
}

.hero-copy {
    max-width: 640px;
}

.hero-preview,
.hero-stage-shell,
.preview-window {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.preview-window {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    min-height: 460px;
}

.preview-rail {
    padding: 22px 18px;
    background: rgba(148, 163, 184, 0.05);
    border-right: 1px solid rgba(148, 163, 184, 0.08);
}

.preview-rail h3,
.preview-main h3,
.dashboard-card h2,
.dashboard-card h3,
.asset-item strong,
.auth-panel h2,
.pricing-card h3 {
    margin: 0;
    letter-spacing: -0.03em;
}

.preview-rail .preview-section + .preview-section,
.preview-main .preview-section + .preview-section {
    margin-top: 18px;
}

.preview-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.preview-list span,
.preview-pill,
.tag,
.status-pill,
.service-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-soft);
}

.preview-main {
    padding: 22px;
    display: grid;
    gap: 18px;
}

.preview-surface {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.04);
}

.preview-output-grid,
.asset-output-grid,
.section-grid,
.pricing-grid,
.dashboard-grid,
.brand-grid,
.campaign-grid,
.service-grid,
.showcase-grid {
    display: grid;
    gap: 18px;
}

.section-grid.cols-3,
.dashboard-grid-3,
.brand-grid,
.campaign-grid,
.showcase-grid,
.pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.dashboard-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preview-output-grid,
.asset-output-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-slab {
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    margin-top: 24px;
}

.feature-card,
.dashboard-card,
.showcase-card,
.pricing-card,
.output-card,
.result-card,
.auth-panel,
.hero-panel,
.status-card {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.feature-card p,
.dashboard-card p,
.showcase-card p,
.pricing-card p,
.muted-block,
.muted-line,
.service-meta,
.ticket-message-stack .chat-content {
    color: var(--text-soft);
}

.feature-card h3,
.showcase-card h3,
.pricing-card h3,
.dashboard-card h2,
.dashboard-card h3,
.auth-panel h2 {
    font-size: 1.2rem;
    margin: 8px 0 10px;
}

.feature-list,
.data-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.feature-list li,
.data-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    color: var(--text-soft);
}

.feature-list li:first-child,
.data-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.compact li,
.compact-list li {
    font-size: 0.92rem;
}

.studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    gap: 20px;
    align-items: start;
}

.studio-main,
.studio-side {
    display: grid;
    gap: 18px;
}

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

.content-form-grid label,
.content-form-grid fieldset {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.content-form-grid label > span,
.content-form-grid legend,
.field-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted-strong);
}

.content-form-grid fieldset {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    margin: 0;
}

.full-span {
    grid-column: 1 / -1;
}

.compact-form-grid {
    grid-template-columns: 1fr;
}

.form-section {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.03);
}

.form-section + .form-section {
    margin-top: 16px;
}

.form-section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.form-section-head h3 {
    margin: 4px 0 0;
    font-size: 1rem;
}

.channel-grid,
.tag-cloud,
.prompt-chips,
.mode-switcher,
.hero-tag-row,
.profile-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.channel-chip,
.prompt-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.05);
    color: var(--text-soft);
    cursor: pointer;
}

.channel-chip input {
    width: auto;
    margin: 0;
    accent-color: var(--accent);
}

.prompt-chip,
.mode-button {
    cursor: pointer;
}

.mode-button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
}

.mode-button.active {
    background: var(--accent-soft);
    color: var(--text);
    border-color: rgba(91, 140, 255, 0.28);
}

.form-actions,
.chat-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.chat-status,
.output-label,
.service-meta,
.auth-note,
.muted-line,
.result-banner {
    font-size: 0.86rem;
    color: var(--muted);
}

.result-shell {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.result-banner {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.05);
}

.result-banner-soft {
    background: rgba(91, 140, 255, 0.08);
    border-color: rgba(91, 140, 255, 0.18);
}

.output-card,
.result-card {
    min-width: 0;
}

.output-card pre,
.result-card pre,
.asset-summary-box pre,
.log-stream pre,
.ticket-message-stack pre {
    margin: 0;
    font-family: inherit;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-soft);
}

.output-card-top,
.dashboard-card-head,
.service-top,
.drop-card-top,
.ticket-admin-bar,
.asset-item summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.visual-post-card {
    overflow: hidden;
}

.visual-post-preview {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 16px;
    margin: 14px 0;
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.chat-history,
.log-stream,
.ticket-message-stack {
    display: grid;
    gap: 12px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.chat-row {
    display: grid;
    gap: 6px;
}

.chat-role {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.chat-content {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.08);
    color: var(--text-soft);
}

.chat-row-user .chat-content {
    background: var(--accent-soft);
    border-color: rgba(91, 140, 255, 0.18);
    color: var(--text);
}

.chat-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.mini-feed,
.activity-feed,
.asset-list,
.support-ticket-list {
    display: grid;
    gap: 12px;
}

.mini-feed-item,
.activity-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(148, 163, 184, 0.04);
}

.mini-feed-item strong,
.activity-label {
    display: block;
    margin-bottom: 4px;
}

.asset-item {
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 18px;
    background: rgba(148, 163, 184, 0.04);
    overflow: hidden;
}

.asset-item summary {
    list-style: none;
    padding: 16px 18px;
    cursor: pointer;
}

.asset-item summary::-webkit-details-marker {
    display: none;
}

.asset-item > *:not(summary) {
    padding: 0 18px 18px;
}

.asset-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.asset-summary-box {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.03);
    margin-bottom: 16px;
}

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

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

.service-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(148, 163, 184, 0.04);
}

.service-up {
    border-color: rgba(63, 185, 132, 0.18);
}

.service-down {
    border-color: rgba(215, 106, 115, 0.18);
}

.service-pill,
.status-pill {
    background: rgba(148, 163, 184, 0.1);
    color: var(--muted-strong);
}

.priority-high {
    background: rgba(63, 185, 132, 0.12);
    color: #a7f0ce;
}

.priority-medium {
    background: rgba(217, 164, 65, 0.14);
    color: #f0d493;
}

.priority-info {
    background: rgba(91, 140, 255, 0.12);
    color: #b8cbff;
}

.log-stream {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(7, 12, 22, 0.22);
}

body[data-ui-theme="ivory"] .log-stream {
    background: rgba(15, 23, 42, 0.02);
}

.empty-state {
    padding: 20px;
    border: 1px dashed var(--border-strong);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

.auth-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    align-items: stretch;
}

.auth-panel-brand {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.08);
}

.auth-panel-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-submit {
    width: 100%;
}

.stack-layout {
    display: grid;
    gap: 18px;
}

.stack-rail {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
}

.stack-index {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.pricing-grid {
    align-items: stretch;
}

.pricing-card-highlight {
    border-color: rgba(91, 140, 255, 0.26);
    box-shadow: var(--shadow-md);
}

.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.reveal {
    opacity: 1;
    transform: none;
}

@media (max-width: 1100px) {
    .workspace-shell,
    .landing-hero,
    .page-header,
    .app-hero,
    .studio-layout,
    .auth-shell,
    .preview-window {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        position: static;
    }

    .dashboard-grid-4,
    .dashboard-grid-3,
    .section-grid.cols-3,
    .brand-grid,
    .campaign-grid,
    .showcase-grid,
    .pricing-grid,
    .service-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .site-header-inner,
    .public-main,
    .landing-shell,
    .workspace-shell,
    .flash-stack,
    .site-footer,
    .auth-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-header-inner {
        min-height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header-actions,
    .site-controls,
    .site-nav,
    .hero-actions,
    .page-actions,
    .form-actions,
    .chat-form-foot {
        width: 100%;
    }

    .site-nav,
    .site-header-actions,
    .site-controls {
        flex-wrap: wrap;
    }

    .stats-grid,
    .app-hero-stats,
    .flagship-stat-row,
    .dashboard-grid-2,
    .dashboard-grid-3,
    .dashboard-grid-4,
    .preview-output-grid,
    .asset-output-grid,
    .service-grid,
    .service-grid-compact,
    .content-form-grid,
    .asset-meta-grid,
    .pricing-grid,
    .showcase-grid,
    .brand-grid,
    .campaign-grid {
        grid-template-columns: 1fr;
    }

    .workspace-shell {
        gap: 16px;
    }

    .workspace-sidebar {
        padding: 14px;
    }

    .preview-rail,
    .preview-main,
    .dashboard-card,
    .feature-card,
    .pricing-card,
    .auth-panel,
    .output-card,
    .result-card {
        padding: 18px;
    }

    .landing-hero {
        padding-top: 32px;
    }

    .page-title,
    .app-hero h1,
    .landing-hero h1,
    .auth-panel h1 {
        font-size: clamp(1.85rem, 10vw, 2.8rem);
    }
}

.page-header-wide {
    gap: 28px;
}

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

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

.product-grid-showcase {
    margin-top: 24px;
}

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

.product-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border-radius: 22px;
    background: rgba(14, 19, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.product-card-highlight {
    background: rgba(17, 24, 39, 0.98);
    border-color: rgba(100, 149, 237, 0.22);
}

.product-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.product-card-top h3 {
    margin: 4px 0 0;
    font-size: 1.15rem;
}

.product-note,
.section-copy {
    margin: 0;
    color: var(--muted-text, #93a4b6);
    line-height: 1.6;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-list-tight {
    gap: 6px;
}

.tag,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #cfd9e5;
    font-size: 0.82rem;
    line-height: 1;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-pill-active,
.status-chip-active {
    background: rgba(73, 130, 255, 0.14);
    color: #8ab0ff;
}

.status-pill-idle,
.status-chip-idle {
    background: rgba(255, 255, 255, 0.06);
    color: #9caec1;
}

.compact-feed {
    gap: 8px;
}

.tall-feed {
    max-height: 520px;
    overflow: auto;
}

.wrap-actions {
    flex-wrap: wrap;
}

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

.admin-user-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-user-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-user-top span {
    display: block;
    margin-top: 4px;
    color: #8ea0b4;
    font-size: 0.88rem;
}

.mini-feed-item-nested {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.delivery-url {
    display: block;
    margin-top: 4px;
    color: #8ea0b4;
    word-break: break-all;
}

.mini-inline-form {
    margin: 4px 0 0 14px;
}

@media (max-width: 1100px) {
    .product-grid,
    .product-grid-admin,
    .admin-user-grid,
    .stats-grid-wide {
        grid-template-columns: 1fr;
    }
}
