/* Notebook Run custom theme */
:root {
    --app-bg: #f4f7fb;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --surface-alt: #e8f0f5;
    --ink: #0f172a;
    --ink-soft: #4f5d75;
    --border: rgba(148, 163, 184, 0.24);
    --border-strong: rgba(15, 118, 110, 0.2);
    --primary: #0f766e;
    --primary-deep: #115e59;
    --secondary: #06b6d4;
    --accent: #f97316;
    --success: #15803d;
    --danger: #b91c1c;
    --warning: #d97706;
    --info: #0891b2;
    --hero-start: #0f766e;
    --hero-end: #06b6d4;
    --hero-shadow: 0 24px 80px rgba(8, 145, 178, 0.25);
    --card-shadow: 0 18px 65px rgba(15, 23, 42, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 26%),
        radial-gradient(circle at 10% 20%, rgba(15, 118, 110, 0.16), transparent 28%),
        var(--app-bg);
}

body.app-body::selection {
    background: rgba(6, 182, 212, 0.25);
}

.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
    z-index: 0;
}

.container {
    max-width: var(--container-width);
}

.site-header,
.page-shell,
.site-footer {
    position: relative;
    z-index: 1;
}

.navbar {
    margin: 1rem auto 0;
    max-width: calc(var(--container-width) + 1.5rem);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.9rem;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.22);
}

.nav-link {
    color: var(--ink-soft);
    font-weight: 600;
    padding: 0.7rem 1rem !important;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: var(--ink);
    background: rgba(15, 118, 110, 0.09);
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-deep);
    background: rgba(15, 118, 110, 0.1);
}

.trust-pill::before {
    content: "";
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0.25rem rgba(21, 128, 61, 0.13);
}

.hero-panel,
.glass-card,
.flash-card {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
}

.hero-panel {
    padding: clamp(2rem, 3vw, 3.6rem);
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(6, 182, 212, 0.92));
    box-shadow: var(--hero-shadow);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0.4;
}

.hero-orb-one {
    width: 16rem;
    height: 16rem;
    top: -4rem;
    right: -4rem;
    background: rgba(255, 255, 255, 0.18);
}

.hero-orb-two {
    width: 10rem;
    height: 10rem;
    bottom: -2rem;
    left: 52%;
    background: rgba(255, 255, 255, 0.12);
}

.hero-copy,
.hero-panel .lead,
.hero-panel p {
    max-width: 56rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
}

.hero-panel h1,
.section-title {
    letter-spacing: -0.04em;
}

.section-eyebrow,
.card-kicker,
.terminal-caption,
.file-overline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    font-size: 0.82rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.text-accent {
    color: var(--accent) !important;
}

.glass-card {
    background: var(--surface);
    padding: clamp(1.4rem, 2.4vw, 2rem);
}

.section-card {
    position: relative;
    overflow: hidden;
}

.section-card::after {
    content: "";
    position: absolute;
    inset: auto -10% -70% auto;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-console,
.tip-card,
.notebook-card,
.notebook-grid-card,
.cell-preview-card,
.run-history-card,
.output-card,
.asset-row,
.run-list-item,
.metric-card,
.empty-state,
.warning-box {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.hero-console {
    padding: 1.5rem;
    background: rgba(9, 15, 31, 0.18);
    border-color: rgba(255, 255, 255, 0.18);
}

.metric-card {
    padding: 1rem 1.1rem;
}

.metric-inverse {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.metric-label {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.85;
}

.metric-inverse .metric-label {
    color: rgba(255, 255, 255, 0.82);
}

.flash-card {
    background: rgba(255, 255, 255, 0.92);
}

.alert-success {
    border-color: rgba(21, 128, 61, 0.2);
    color: #166534;
    background: rgba(220, 252, 231, 0.78);
}

.alert-warning {
    border-color: rgba(217, 119, 6, 0.2);
    color: #9a3412;
    background: rgba(255, 237, 213, 0.82);
}

.alert-error,
.alert-danger {
    border-color: rgba(185, 28, 28, 0.18);
    color: #991b1b;
    background: rgba(254, 226, 226, 0.82);
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: 0.88rem 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary-deep), var(--secondary));
}

.btn-ghost,
.btn-outline-secondary {
    color: var(--ink);
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(255, 255, 255, 0.76);
}

.btn-ghost:hover,
.btn-ghost:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: var(--ink);
    border-color: rgba(15, 118, 110, 0.26);
    background: rgba(15, 118, 110, 0.08);
}

.btn-light {
    color: var(--primary-deep);
    font-weight: 700;
}

.form-label {
    font-weight: 700;
    color: var(--ink);
}

.form-control,
.form-select {
    min-height: 3.35rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.9rem 1rem;
    color: var(--ink);
    box-shadow: none;
}

textarea.form-control {
    min-height: 7.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(8, 145, 178, 0.48);
    box-shadow: 0 0 0 0.3rem rgba(6, 182, 212, 0.14);
}

.form-text,
.text-muted,
.footer-copy,
.run-item-meta,
.run-inline-note,
.small {
    color: var(--ink-soft) !important;
}

.field-error {
    margin-top: 0.45rem;
    color: var(--danger);
    font-size: 0.92rem;
    font-weight: 600;
}

.input-group > .form-control {
    border-radius: 1rem 0 0 1rem;
}

.input-group > .btn {
    border-radius: 0 1rem 1rem 0;
}

.code-block,
.terminal-block,
.result-block,
.error-block {
    margin: 0;
    overflow-x: auto;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 1.05rem;
}

.code-block,
.terminal-block {
    padding: 1rem 1.1rem;
}

.code-block {
    color: #d6f8f4;
    background: #0f172a;
}

.compact-code {
    font-size: 0.88rem;
    max-height: 18rem;
}

.terminal-block {
    color: #d7fbe6;
    background: #08111d;
}

.compact-terminal {
    font-size: 0.86rem;
}

.tall-terminal {
    max-height: 42rem;
}

.result-block {
    padding: 0.9rem 1rem;
    color: #0c4a6e;
    background: rgba(207, 250, 254, 0.85);
    border: 1px solid rgba(8, 145, 178, 0.16);
}

.error-block {
    padding: 0.9rem 1rem;
    color: #7f1d1d;
    background: rgba(254, 226, 226, 0.88);
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.output-label,
.tip-title,
.footer-brand,
.run-item-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.feature-list {
    padding-left: 1.2rem;
}

.feature-list li + li {
    margin-top: 0.8rem;
}

.tip-card,
.asset-row,
.run-list-item,
.output-card,
.run-history-card,
.notebook-card,
.notebook-grid-card,
.cell-preview-card,
.warning-box,
.empty-state {
    padding: 1.15rem 1.2rem;
}

.highlight-tip {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 254, 255, 0.92));
}

.warning-box {
    color: #9a3412;
    background: rgba(255, 247, 237, 0.86);
    border-color: rgba(249, 115, 22, 0.18);
}

.meta-chip,
.file-pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.78rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.meta-chip {
    color: var(--ink-soft);
    background: rgba(226, 232, 240, 0.82);
}

.file-pill {
    color: var(--primary-deep);
    background: rgba(15, 118, 110, 0.1);
}

.status-chip {
    border: 1px solid transparent;
}

.status-success {
    color: #166534;
    background: rgba(220, 252, 231, 0.88);
}

.status-danger {
    color: #991b1b;
    background: rgba(254, 226, 226, 0.9);
}

.status-warning {
    color: #9a3412;
    background: rgba(255, 237, 213, 0.9);
}

.status-info {
    color: #0c4a6e;
    background: rgba(207, 250, 254, 0.88);
}

.status-muted {
    color: var(--ink-soft);
    background: rgba(226, 232, 240, 0.82);
}

.link-cta,
.footer-links a {
    color: var(--primary-deep);
    font-weight: 700;
    text-decoration: none;
}

.link-cta:hover,
.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary);
}

.asset-row,
.run-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.run-list-item {
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.run-list-item:hover,
.run-list-item:focus {
    transform: translateY(-1px);
    border-color: rgba(15, 118, 110, 0.22);
}

.sticky-panel {
    top: 7rem;
}

.empty-state {
    text-align: left;
    border-style: dashed;
    border-width: 1.5px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.95));
}

.small-empty {
    padding: 1.2rem;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(12px);
}

.footer-brand {
    font-size: 1.05rem;
}

code {
    color: inherit;
}

@media (max-width: 991.98px) {
    .navbar {
        border-radius: 1.5rem;
    }

    .trust-pill {
        margin-top: 1rem;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .hero-panel,
    .glass-card,
    .flash-card {
        border-radius: 1.4rem;
    }

    .asset-row,
    .run-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
