:root {
    color-scheme: dark;
    --font: 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg: #020818;
    --surface: #ffffff;
    --surface-alt: #fefefe;
    --border: rgba(255, 255, 255, 0.15);
    --text: #e9edff;
    --muted: rgba(233, 237, 255, 0.72);
    --accent: #4f8dff;
    --accent-strong: #7c3aed;
    --danger: #f87171;
    --shadow: 0 24px 60px rgba(5, 8, 18, 0.55);
    --card-accent: rgba(79, 141, 255, 0.35);
    --upload-accent: rgba(79, 141, 255, 0.2);
    --manage-accent: rgba(124, 58, 237, 0.2);
    --download-accent: rgba(16, 185, 129, 0.2);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.3), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.25), transparent 40%),
        linear-gradient(130deg, #020818, #041137 60%, #050b20);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.15), transparent 35%),
        radial-gradient(circle at 80% 30%, rgba(124, 58, 237, 0.12), transparent 45%);
    pointer-events: none;
    animation: hueShift 12s ease-in-out infinite alternate;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.3;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.08) 0, transparent 45%),
        radial-gradient(circle at 70% 30%, rgba(79, 141, 255, 0.12) 0, transparent 50%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
    animation: particleDrift 18s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes hueShift {
    0% { filter: hue-rotate(0deg); opacity: 0.8; }
    100% { filter: hue-rotate(20deg); opacity: 1; }
}

@keyframes particleDrift {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-60px, -40px, 0); }
}

body[dir="rtl"] { direction: rtl; }

[hidden] { display: none !important; }

img, iframe { max-width: 100%; border-radius: 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell-header {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 1.2rem clamp(1rem, 3vw, 2.2rem) 0.8rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.3rem;
    backdrop-filter: blur(12px);
    color: #ecf2ff;
}
.shell-header a { color: #f8fbff; }
.shell-header .brand-block .brand { color: #ffffff; }
.shell-header small { color: rgba(248, 251, 255, 0.75); }
.shell-header .primary-nav a { color: #f6f8ff; border-color: transparent; }
.shell-header .primary-nav a[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.brand-block { display: flex; flex-direction: column; gap: 0.3rem; }
.brand-block .brand { font-weight: 700; font-size: 1.4rem; letter-spacing: 0.35em; text-transform: uppercase; }
.brand-block small { color: inherit; }

.primary-nav { display: inline-flex; gap: 0.65rem; flex-wrap: wrap; justify-content: flex-end; }
.primary-nav a {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text);
    font-size: 0.85rem;
}
.primary-nav a[aria-current="page"] {
    border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(109, 241, 255, 0.2);
}

.header-actions { display: flex; align-items: center; gap: 0.45rem; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 720px) {
    .shell-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem clamp(0.9rem, 5vw, 1.5rem);
        gap: 0.6rem;
    }
    .brand-block { align-items: center; }
    .primary-nav,
    .header-actions { justify-content: center; }
}

main.shell-main {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem) 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
}

.shell-main > * {
    width: 100%;
}

.shell-footer {
    width: min(1100px, 100%);
    margin: 2rem auto 3rem;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    color: rgba(237, 241, 255, 0.8);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.3rem;
    backdrop-filter: blur(10px);
}

.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.shell-footer a { color: rgba(255, 255, 255, 0.9); }

.flash {
    border-radius: 1rem;
    padding: 0.85rem 1.2rem;
    background: rgba(109, 241, 255, 0.15);
    border: 1px solid rgba(109, 241, 255, 0.4);
    color: var(--text);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.pill.subtle { border-color: rgba(15, 23, 42, 0.12); color: var(--muted); }

.card,
.workspace-card {
    position: relative;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 11, 29, 0.78);
    padding: clamp(1.2rem, 3.5vw, 1.8rem);
    box-shadow: 0 35px 80px rgba(5, 10, 32, 0.5);
    font-size: 0.95rem;
    backdrop-filter: blur(20px);
    color: var(--text);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card::before,
.card::after,
.workspace-card::before,
.workspace-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    pointer-events: none;
}
.card::before,
.workspace-card::before {
    inset: 12px 14px 6px 14px;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    opacity: 0.35;
}
.card::after,
.workspace-card::after {
    background: radial-gradient(circle at 20% 20%, var(--card-accent), transparent 55%);
}
.card:hover,
.workspace-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 45px 90px rgba(5, 10, 32, 0.4);
}
.card[data-context="upload"]::after,
.workspace-card[data-context="upload"]::after { background: radial-gradient(circle at 20% 20%, var(--upload-accent), transparent 55%); }
.card[data-context="manage"]::after,
.workspace-card[data-context="manage"]::after { background: radial-gradient(circle at 20% 20%, var(--manage-accent), transparent 55%); }
.card[data-context="download"]::after,
.workspace-card[data-context="download"]::after { background: radial-gradient(circle at 20% 20%, var(--download-accent), transparent 55%); }
.card > *,
.workspace-card > * { position: relative; z-index: 1; }
.card h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
.card h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

.card-rail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(233, 237, 255, 0.55);
    margin-bottom: 1rem;
}
.card-rail .rail-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 141, 255, 0.6));
}
.card-rail i { color: var(--accent); }

button {
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s ease;
}

button.primary {
    background: linear-gradient(120deg, var(--accent), var(--accent-strong));
    color: #050713;
    box-shadow: 0 18px 35px rgba(109, 241, 255, 0.25);
}

button.danger {
    background: var(--danger);
    color: #fff;
}

button.ghost {
    background: rgba(4, 17, 55, 0.15);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.85rem 1.4rem;
    color: var(--text);
    text-decoration: none;
}

button:active { transform: scale(0.98); }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(6, 11, 29, 0.6);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(79, 141, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(79, 141, 255, 0.25);
}

label span { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; color: var(--muted); }

.dropzone {
    border: 1.5px dashed rgba(255, 255, 255, 0.25);
    border-radius: 1.3rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: rgba(6, 11, 29, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(16px);
}
.dropzone input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}
.dropzone strong { font-size: 1.05rem; }
.dropzone small { color: var(--muted); }
.dropzone::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, rgba(109, 241, 255, 0.25), transparent 60%);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.dropzone:hover::after,
.dropzone.drag::after {
    opacity: 1;
    transform: scale(1);
}

.neon-drop {
    border: 1.5px solid transparent;
    background:
        linear-gradient(rgba(6, 11, 29, 0.92), rgba(6, 11, 29, 0.92)) padding-box,
        linear-gradient(120deg, rgba(37, 99, 235, 0.7), rgba(124, 58, 237, 0.7)) border-box;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0% { box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15); }
    50% { box-shadow: 0 20px 50px rgba(124, 58, 237, 0.25); }
    100% { box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15); }
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.05);
}
.file-preview[hidden] { display: none !important; }

.form-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }

.toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.8rem 1rem;
}

.progress {
    position: relative;
    height: 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.progress .bar { height: 100%; width: 0; background: linear-gradient(120deg, var(--accent-strong), var(--accent)); }
.progress .percent { position: absolute; top: -1.4rem; right: 0; font-size: 0.8rem; color: var(--muted); }

.upload-feedback { min-height: 1rem; font-size: 0.9rem; color: var(--muted); }

.helper { margin: 0; font-size: 0.9rem; }

.action-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.action-row .helper { margin: 0; }

.primary.pulse {
    position: relative;
    overflow: hidden;
}
.primary.pulse::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 60%);
    transform: rotate(25deg);
    animation: sheen 3s linear infinite;
    pointer-events: none;
}
@keyframes sheen {
    0% { transform: translateX(-80%) rotate(25deg); }
    100% { transform: translateX(80%) rotate(25deg); }
}

.workspace-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

.workspace-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: min(780px, 100%);
}

.workspace-head {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.workspace-head .eyebrow,
.panel .eyebrow,
.section-head .eyebrow { text-transform: uppercase; letter-spacing: 0.4em; color: var(--muted); font-size: 0.75rem; margin: 0 0 0.3rem; }
.workspace-head h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }

.home-stage {
    position: relative;
    width: 100%;
    padding: 2rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: stretch;
}
.hero-panel {
    border-radius: 1.6rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    color: var(--text);
}
.hero-panel h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.ambient-orb {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    animation: floatOrb 12s ease-in-out infinite;
    z-index: 0;
}
.orb-one { top: -80px; left: -60px; background: rgba(37, 99, 235, 0.45); }
.orb-two { bottom: -80px; right: -40px; background: rgba(124, 58, 237, 0.35); animation-delay: 3s; }
.hero-grid,
.highlight-row { position: relative; z-index: 1; }

@keyframes floatOrb {
    0% { transform: translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateY(30px) scale(1.05); opacity: 0.6; }
    100% { transform: translateY(0px) scale(1); opacity: 0.4; }
}

.hero-subcopy { font-size: 1.05rem; color: var(--muted); margin: 0.6rem 0 0.8rem; max-width: 520px; }
.hero-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}
.hero-points li::before {
    content: '\2022';
    color: var(--accent);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}
.stats-grid div {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(6, 11, 29, 0.68);
    box-shadow: 0 25px 45px rgba(5, 10, 32, 0.4);
}
.stats-grid strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text);
}
.stats-grid span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
}
.hero-upload {
    animation: floatCard 8s ease-in-out infinite;
}
.home-hero .hero-copy { position: relative; }

@keyframes floatCard {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

.workflow-grid {
    width: 100%;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.workflow-grid header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}
.workflow-grid header h2 {
    margin: 0.3rem 0;
}
.workflow-grid header p {
    margin: 0;
    color: var(--muted);
}
.workflow-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.workflow-card {
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1.2rem;
    background: rgba(15, 23, 42, 0.03);
}
.step-badge {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.workflow-card h3 { margin: 0 0 0.4rem; }
.workflow-card p { margin: 0; color: var(--muted); }

.assurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.assurance-card {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 1.2rem;
    padding: 1.2rem;
    background: rgba(15, 23, 42, 0.03);
    text-align: center;
}
.assurance-card h3 { margin: 0.2rem 0; }
.assurance-card p { margin: 0; color: var(--muted); }

.highlight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    position: relative;
    z-index: 1;
}
.highlight-card {
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem;
    background: rgba(6, 11, 29, 0.78);
    box-shadow: 0 25px 60px rgba(5, 10, 32, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--text);
}
.highlight-card h3 { margin: 0; }
.highlight-card p { margin: 0; color: rgba(233, 237, 255, 0.7); }
.icon-ring {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 30%, rgba(79, 141, 255, 0.3), transparent 65%),
        rgba(6, 11, 29, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent);
    flex-shrink: 0;
}
.highlight-card .icon-ring { margin-bottom: 0.4rem; }

.system-pill {
    display: inline-flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
}

.upload-help {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.help-block {
    border-radius: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 1rem 1.2rem;
    background: rgba(15, 23, 42, 0.03);
}

.help-block h3 {
    margin: 0 0 0.6rem;
}

.help-block ol,
.help-block ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.help-block li + li {
    margin-top: 0.4rem;
}

.limits-card, .path-card {
    border-radius: 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 1rem;
    background: rgba(15, 23, 42, 0.03);
}
.limits-card ul { margin: 0; padding-left: 1.1rem; }

.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; width: 100%; }
.panel {
    border-radius: 1.2rem;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.03);
    padding: 1.5rem;
    text-align: center;
}
.panel h3 { margin-top: 0.3rem; }

.compliance-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.compliance-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}
.compliance-header p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}
.compliance-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.compliance-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.compliance-card .ghost {
    align-self: flex-start;
}
.compliance-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.contact-points {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.contact-points li + li {
    margin-top: 0.3rem;
}
.contact-points strong {
    font-weight: 600;
}

.promo-panel { display: flex; flex-direction: column; gap: 1.2rem; }
.promo-panel.minimal { border: 1px solid var(--border); border-radius: 1.3rem; padding: 1.5rem; background: var(--surface); }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.promo-card { border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; background: rgba(15, 23, 42, 0.03); }

.ad-standard {
    border: 1px dashed rgba(37, 99, 235, 0.12);
    border-radius: 1.2rem;
    padding: 1.2rem;
    background: rgba(15, 23, 42, 0.03);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}
.ad-label { font-size: 0.7rem; letter-spacing: 0.4em; color: var(--muted); }
.ad-canvas { width: 100%; min-height: 120px; border-radius: 1rem; border: 1px dashed var(--border); }

.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; width: 100%; }
.manage-columns .primary-card,
.download-columns .primary-card { order: 1; }
.manage-columns .secondary-card,
.download-columns .secondary-card { order: 2; }

.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.section-head h2, .section-head h3 { margin: 0; }
.section-head.small h3 { font-size: 1rem; }
.section-head .eyebrow i { margin-right: 0.35rem; color: var(--accent); }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.8rem;
}
.meta-grid div { border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 1rem; padding: 0.8rem; background: rgba(15, 23, 42, 0.03); }
.meta-grid dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.meta-grid dd { margin: 0.2rem 0 0; font-weight: 600; font-size: 1rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
.stat-row div { border-radius: 1rem; border: 1px solid rgba(15, 23, 42, 0.12); padding: 0.9rem; background: rgba(15, 23, 42, 0.03); }
.stat-row strong { display: block; font-size: 0.8rem; color: var(--muted); }
.stat-row span { font-size: 1rem; font-weight: 600; }

.copy-group { display: flex; gap: 0.6rem; }
.copy-group input { flex: 1; }

.quick-actions { list-style: none; padding: 0; margin: 1rem 0; color: var(--muted); }
.quick-actions li { margin-bottom: 0.4rem; }
.quick-actions li a { font-weight: 600; font-size: 0.95rem; }
.command-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
    padding: 0.7rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 11, 29, 0.55);
    backdrop-filter: blur(14px);
}
.command-bar .ghost,
.command-bar .primary {
    font-size: 0.8rem;
    padding: 0.65rem 1.1rem;
}

.share-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 1.2rem;
    align-items: flex-start;
}

.share-qr {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.03);
}

.share-qr img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    background: #fff;
    border-radius: 0.8rem;
    padding: 0.3rem;
}

.share-qr .label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.qr img { background: #fff; padding: 0.4rem; border-radius: 1rem; border: 1px solid var(--border); }

.danger-card { border-color: rgba(255, 123, 156, 0.4); }
.danger-card button.danger { width: 100%; }

.download-card .download-form { margin-top: 1rem; }
.preview-card pre { white-space: pre-wrap; word-break: break-word; }
.preview-card iframe { width: 100%; min-height: 320px; border: none; }
.preview-card .section-head { margin-bottom: 0.8rem; }
.preview-stage {
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(6, 11, 29, 0.55);
    padding: 1rem;
    box-shadow: 0 25px 50px rgba(5, 10, 32, 0.35);
    backdrop-filter: blur(18px);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.download-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}
.download-meta dl {
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 1rem;
    padding: 0.7rem;
    text-align: center;
    font-size: 0.9rem;
}
.download-meta dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin: 0 0 0.2rem;
}
.download-meta dd {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.1rem;
    padding: 1rem 1.2rem;
    background: rgba(6, 12, 30, 0.65);
    color: var(--text);
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
    text-align: center;
}

.helper.small { font-size: 0.85rem; }

.summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}
.summary-list .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
}
.summary-list strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.05rem;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}
.timeline .label { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.timeline strong { display: block; margin-top: 0.2rem; }

.share-stack header,
.danger-stack header { margin-bottom: 0.6rem; }

.qr-panel {
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    text-align: center;
    background: rgba(6, 11, 29, 0.6);
    box-shadow: 0 20px 40px rgba(5, 10, 32, 0.35);
    backdrop-filter: blur(14px);
}
.qr-panel img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    background: #050a1e;
    border-radius: 1rem;
    padding: 0.4rem;
    margin: 0.6rem 0;
}

.secondary-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.countdown.inline { margin-left: 0.3rem; }

.status-card { text-align: center; }
.status-card h2 { margin-top: 0; }

.compact-form { display: flex; flex-direction: column; gap: 1rem; }
.error { color: var(--danger); font-size: 0.9rem; }

/* Tables + admin */
.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.filter .actions { display: flex; gap: 0.6rem; align-items: center; }

.table { border-radius: 1rem; border: 1px solid var(--border); overflow: hidden; }
.table-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid rgba(15, 23, 42, 0.06); font-size: 0.85rem; }
.table-row.head { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; color: var(--muted); background: rgba(15, 23, 42, 0.03); }

.pagination { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination .pill.active { border-color: var(--accent); }

.log-viewer {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 1rem;
    max-height: 400px;
    overflow: auto;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    white-space: pre-wrap;
}

.diag-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.diag-table th, .diag-table td { border: 1px solid var(--border); padding: 0.5rem; }

.verify-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    background: rgba(6, 11, 29, 0.72);
    box-shadow: 0 25px 55px rgba(5, 10, 32, 0.4);
    backdrop-filter: blur(18px);
}
.verify-card h3 { margin: 0 0 0.3rem; }
.method-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0 1rem;
}
.method-tabs .pill {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(6, 11, 29, 0.55);
    cursor: not-allowed;
}
.method-tabs .pill.active {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.15);
}
.snippet-card {
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(6, 11, 29, 0.6);
    backdrop-filter: blur(12px);
}
.snippet-block {
    margin: 0.8rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: 0.8rem;
    background: #0f172a;
    color: #f8fafc;
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.95rem;
    overflow-x: auto;
}

@media (max-width: 880px) {
    .workspace-card { width: 100%; }
    .upload-help { grid-template-columns: 1fr; }
    .shell-header { grid-template-columns: 1fr; text-align: center; }
    .header-actions { justify-content: center; }
    .share-grid { grid-template-columns: 1fr; }
    .hero-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .hero-panel { padding: 1.4rem; }
    .hero-upload { order: 2; }
    .hero-panel { order: 1; }
    .highlight-row { grid-template-columns: 1fr; }
    .download-grid,
    .manage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .copy-group { flex-direction: column; }
    .primary-nav { justify-content: center; }
    .section-head { flex-direction: column; align-items: center; text-align: center; }
    .meta-grid dd { text-align: center; }
    .shell-main { padding-left: 1rem; padding-right: 1rem; }
    .card, .workspace-card { padding: 1.2rem; }
    .panel-grid { grid-template-columns: 1fr; }
    .hero-panel h1 { font-size: 1.8rem; }
    .hero-subcopy { font-size: 0.95rem; }
    .hero-points li { font-size: 0.9rem; }
}
.page-intro {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    width: min(720px, 100%);
    margin: 0 auto;
}

.page-intro h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.page-intro p {
    margin: 0;
    color: var(--muted);
}

.page-intro.narrow {
    max-width: 560px;
}

.page-intro.hero-intro {
    padding-top: 0.5rem;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 1.5rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.page-hero.card {
    padding: clamp(1.2rem, 4vw, 2.5rem);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
}
.hero-main p {
    margin: 0.5rem 0 0;
    color: var(--muted);
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(6, 11, 29, 0.65);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--muted);
}
.hero-tag i { color: var(--accent); }
.hero-tag i { color: var(--accent); }
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}
.stat-chip {
    position: relative;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(6, 11, 29, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: 0 25px 45px rgba(5, 10, 32, 0.4);
}
.stat-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(79, 141, 255, 0.25);
    opacity: 0.8;
    pointer-events: none;
}
.stat-chip::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(79, 141, 255, 0.3), transparent 60%);
    animation: statPulse 6s ease-in-out infinite;
    pointer-events: none;
}
.stat-chip span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    position: relative;
    z-index: 1;
}
.stat-chip strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.download-grid,
.manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    width: 100%;
}

.manage-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr);
    gap: 1.2rem;
    width: 100%;
    margin-top: 1.5rem;
}
.manage-primary,
.manage-side {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.hero-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hero-controls .ghost {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
}
.card-rail.compact {
    margin-top: 0.8rem;
}
.copy-grid {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.copy-row .label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.copy-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.copy-field input {
    flex: 1;
}
.copy-btn {
    width: 44px;
    height: 44px;
    border-radius: 1rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.share-highlights {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
}
.share-highlights li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.share-highlights i {
    color: var(--accent);
}
.timeline-card.compact {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.timeline-card.compact .label {
    margin-bottom: 0.15rem;
}

.meta-panel .data-grid dd > .id-chip {
    width: 100%;
    display: inline-flex;
    justify-content: flex-start;
}

.hero-controls .ghost i,
.copy-btn i {
    margin: 0;
}

.manage-side .card {
    min-height: auto;
}

.share-panel .command-bar {
    margin-top: 1.1rem;
}

.share-panel .command-bar .ghost {
    font-size: 0.85rem;
}

.manage-shell .insight-panel .timeline-card {
    margin-top: 0.9rem;
}

.manage-shell .qr-panel small {
    display: block;
    margin-top: 0.4rem;
    color: var(--muted);
}

@media (max-width: 960px) {
    .manage-shell {
        grid-template-columns: 1fr;
    }
}

.action-panel,
.meta-panel,
.share-panel,
.info-panel,
.qr-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-download {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    align-items: center;
}

.primary-lg {
    width: 100%;
    padding: 0.95rem 1.2rem;
    font-size: 1.05rem;
}

.security-note {
    border: 1px dashed rgba(37, 99, 235, 0.12);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(15, 23, 42, 0.03);
}
.security-note .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}
.security-note p {
    margin: 0.3rem 0 0;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}
.data-grid dl {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.8rem;
    background: rgba(6, 11, 29, 0.6);
    box-shadow: 0 20px 40px rgba(5, 10, 32, 0.35);
    backdrop-filter: blur(14px);
}
.data-grid dt {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.2rem;
}
.data-grid dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.timeline-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.1rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    background: rgba(6, 11, 29, 0.6);
    box-shadow: 0 20px 40px rgba(5, 10, 32, 0.35);
    backdrop-filter: blur(14px);
}
.timeline-card .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
}
.timeline-card strong {
    display: block;
    margin-top: 0.2rem;
    color: var(--text);
}

.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}
.property-list > div {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
    background: rgba(6, 11, 29, 0.55);
    box-shadow: 0 15px 35px rgba(5, 10, 32, 0.35);
}
.property-list .label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}
.property-list strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.05rem;
}
.id-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(5, 10, 32, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-family: 'Space Grotesk', var(--font), monospace;
    word-break: break-all;
    max-width: 100%;
}
.table .id-chip {
    font-size: 0.72rem;
}

.preview-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

@media (max-width: 800px) {
    .page-hero {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .page-hero.card { padding: 1.4rem; }
}




.section-head .eyebrow i { margin-right: 0.35rem; color: var(--accent); }
@keyframes statPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
