* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --surface-3: #e4edf6;
    --ink: #111827;
    --muted: #667085;
    --line: #d9e3ec;
    --primary: #2563eb;
    --secondary: #0f766e;
    --clinical: #0f766e;
    --pharma: #4f46e5;
    --amber: #b45309;
    --shadow: 0 18px 45px rgba(16, 24, 40, 0.12);
    --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.08);
    --radius: 8px;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #fbfdff 0%, var(--bg) 52%, #eef3f8 100%);
}

body.clinical-theme {
    --accent: var(--clinical);
    --accent-soft: #d9f2ed;
    --accent-ink: #0b5d55;
}

body.pharma-theme {
    --accent: var(--pharma);
    --accent-soft: #e5e7ff;
    --accent-ink: #3730a3;
}

body.dark {
    --bg: #0b1220;
    --surface: #101827;
    --surface-2: #172033;
    --surface-3: #1d2a3f;
    --ink: #f8fafc;
    --muted: #a9b4c3;
    --line: #29364b;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 30rem),
        var(--bg);
}

body.dark.clinical-theme {
    --accent-soft: #123a36;
    --accent-ink: #5eead4;
}

body.dark.pharma-theme {
    --accent-soft: #25255c;
    --accent-ink: #c4b5fd;
}

button,
a {
    color: inherit;
}

a {
    text-decoration: none;
}

a:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
    outline-offset: 3px;
}

.product-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 3rem;
}

.product-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    background: color-mix(in srgb, #fbfdff 88%, transparent);
    backdrop-filter: blur(16px);
}

body.dark .product-nav {
    border-bottom-color: color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-mark,
.tool-icon,
.stat-icon {
    display: grid;
    place-items: center;
    border-radius: var(--radius);
}

.brand-mark {
    width: 42px;
    height: 42px;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: var(--shadow-sm);
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.15;
}

.brand strong {
    color: var(--ink);
}

.brand small {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--ink);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}

.mobile-nav-toggle:hover {
    color: var(--accent-ink);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    background: var(--accent-soft);
}

.nav-pill,
.settings-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.78rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.settings-toggle {
    cursor: pointer;
    font-family: inherit;
}

.nav-pill:hover,
.settings-toggle:hover {
    color: var(--accent-ink);
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    background: var(--accent-soft);
}

body.dark .nav-pill,
body.dark .mobile-nav-toggle,
body.dark .settings-toggle {
    border-color: color-mix(in srgb, var(--line) 88%, transparent);
    background: color-mix(in srgb, var(--surface-2) 92%, transparent);
    color: var(--ink);
}

body.dark .nav-pill:hover,
body.dark .mobile-nav-toggle:hover,
body.dark .settings-toggle:hover {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.settings-menu {
    position: relative;
}

.settings-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    display: none;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.settings-panel.open {
    display: block;
}

.settings-panel h2 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--surface-2);
}

.setting-row strong,
.setting-row small {
    display: block;
}

.setting-row small {
    margin-top: 0.2rem;
    color: var(--muted);
}

.switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--surface-3);
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.switch input:checked + .slider {
    background: var(--accent);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 1rem;
    align-items: stretch;
    padding: 1.4rem 0 1rem;
}

.hero-copy,
.hero-panel,
.section-band {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-sm);
}

.hero-copy {
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.1rem, 2vw, 1.6rem);
    overflow: hidden;
}

.hero-panel {
    min-height: 520px;
    padding: 1rem;
}

.kicker,
.module-label,
.price-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent-ink);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 820px;
    margin: 0.75rem 0;
    font-size: clamp(2.25rem, 4.6vw, 4.55rem);
    line-height: 0.97;
    letter-spacing: 0;
}

.hero p,
.section-copy,
.tool-card small,
.price-card small,
.persona-list li,
.timeline-step p,
.stat-card small {
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions,
.hero-meta,
.panel-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 1.2rem;
}

.action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.78rem 1rem;
    border-radius: var(--radius);
    font-weight: 800;
}

.action.primary {
    color: white;
    background: var(--accent);
    box-shadow: var(--shadow-sm);
}

.action.secondary {
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.hero-meta {
    margin-top: 1.4rem;
}

.pharma-bridge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
    margin-top: 1.4rem;
    padding: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 68%, transparent), transparent 72%),
        color-mix(in srgb, var(--surface) 92%, transparent);
}

.pharma-bridge > i {
    align-self: center;
    color: color-mix(in srgb, var(--accent) 72%, var(--muted));
    font-size: 0.95rem;
}

.bridge-node {
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 0.78rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.bridge-node.active {
    border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.bridge-node span {
    color: var(--accent-ink);
    font-size: 0.72rem;
    font-weight: 800;
}

.bridge-node strong {
    font-size: 0.98rem;
}

.bridge-node small {
    color: var(--muted);
    line-height: 1.45;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.52rem 0.7rem;
    border-radius: var(--radius);
    color: var(--accent-ink);
    background: var(--accent-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-panel {
    display: grid;
    gap: 0.8rem;
}

.panel-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.product-badge {
    padding: 0.38rem 0.55rem;
    border-radius: var(--radius);
    color: var(--accent-ink);
    background: var(--accent-soft);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.stat-card {
    min-height: 112px;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.stat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.8rem;
    color: var(--accent-ink);
    background: var(--accent-soft);
}

.stat-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1;
}

.persona-list {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.persona-list li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.persona-list i {
    margin-top: 0.18rem;
    color: var(--accent);
}

.section-band {
    margin-top: 1rem;
    padding: 1rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.section-head h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    letter-spacing: 0;
}

.section-copy {
    max-width: 520px;
    margin: 0;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.timeline-step {
    min-height: 150px;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.step-number {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-bottom: 0.65rem;
    border-radius: var(--radius);
    color: white;
    background: var(--accent);
    font-weight: 800;
}

.timeline-step h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.timeline-step p {
    margin: 0;
    font-size: 0.9rem;
}

.insilico-flow,
.insilico-hub,
.preclinical-flow,
.preclinical-hub {
    position: relative;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 72%, transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent), color-mix(in srgb, var(--surface-2) 54%, transparent));
}

.preclinical-stage-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.insilico-flow .preclinical-stage-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preclinical-stage-map article {
    min-height: 180px;
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
}

.preclinical-stage-map article::after {
    content: "";
    position: absolute;
    top: 2rem;
    right: -0.85rem;
    width: 0.95rem;
    height: 2px;
    background: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.preclinical-stage-map article:last-child::after {
    display: none;
}

.stage-index {
    color: color-mix(in srgb, var(--accent) 72%, var(--muted));
    font-size: 0.72rem;
    font-weight: 800;
}

.preclinical-stage-map i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    box-shadow: var(--shadow-sm);
}

.preclinical-stage-map strong {
    font-size: 1.05rem;
}

.preclinical-stage-map small {
    color: var(--muted);
    line-height: 1.55;
}

.tool-grid,
.price-grid,
.role-grid,
.suite-grid,
.category-grid,
.value-grid,
.api-path {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.tool-card,
.price-card,
.role-card,
.suite-grid article,
.category-grid article,
.value-grid article,
.api-path article {
    min-height: 156px;
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover,
.role-card:hover,
.preclinical-feature:hover {
    border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.role-card {
    color: inherit;
}

.role-card > i,
.suite-grid i,
.category-grid i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: var(--accent-ink);
    background: var(--accent-soft);
}

.role-card span,
.suite-grid span,
.category-grid span,
.value-grid span,
.api-path small {
    color: var(--muted);
    line-height: 1.55;
}

.role-card span {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.suite-grid,
.category-grid,
.value-grid,
.api-path {
    margin-top: 0.8rem;
}

.suite-emphasis,
.enterprise-value,
.model-api-path {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 58%, transparent), transparent 62%),
        color-mix(in srgb, var(--surface) 94%, transparent);
}

.preclinical-module-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 0.85rem;
    align-items: stretch;
}

.preclinical-feature {
    min-height: 100%;
    display: grid;
    align-content: space-between;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
    border-radius: var(--radius);
    color: white;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 94%, #111827), color-mix(in srgb, var(--secondary) 82%, #111827));
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.preclinical-feature .module-label,
.preclinical-feature small,
.preclinical-feature .feature-cta {
    color: color-mix(in srgb, white 86%, transparent);
}

.preclinical-feature strong {
    display: block;
    font-size: clamp(1.6rem, 2.8vw, 2.45rem);
    line-height: 1.05;
}

.preclinical-feature small {
    max-width: 36rem;
    line-height: 1.65;
}

.feature-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
}

.preclinical-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.preclinical-module-grid .tool-card {
    min-height: 146px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.sample-case {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.sample-case div {
    display: grid;
    gap: 0.3rem;
}

.sample-case span {
    color: var(--muted);
}

.trust-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--muted);
}

.trust-note > i {
    color: var(--accent);
    margin-top: 0.15rem;
}

.trust-note strong {
    color: var(--ink);
}

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

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

.api-path article span {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: white;
    background: var(--accent);
    font-weight: 800;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.product-footer div,
.product-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-footer div {
    flex-direction: column;
    gap: 0.25rem;
}

.product-footer strong {
    color: var(--ink);
}

.product-footer a {
    color: var(--accent-ink);
    font-weight: 800;
}

.tool-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.tool-icon {
    width: 38px;
    height: 38px;
    color: var(--accent-ink);
    background: var(--accent-soft);
}

.module-label {
    color: var(--muted);
    font-size: 0.68rem;
}

.tool-card span,
.price-card strong {
    font-weight: 800;
}

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

.price-card {
    min-height: 180px;
    position: relative;
}

.price-card.featured {
    border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 52%, white), var(--surface));
}

.price-card em {
    color: var(--accent-ink);
    font-style: normal;
    font-size: 1.35rem;
    font-weight: 800;
}

.price-label {
    color: var(--accent-ink);
}

@media (max-width: 960px) {
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-nav {
        min-height: 64px;
        align-items: center;
        padding: 0.55rem 0.25rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        right: 0;
        display: none;
        max-height: min(70vh, 520px);
        overflow-y: auto;
        gap: 0.55rem;
        padding: 0.8rem;
        border: 1px solid var(--line);
        border-radius: calc(var(--radius) + 4px);
        background: color-mix(in srgb, var(--surface) 98%, transparent);
        box-shadow: var(--shadow);
    }

    .nav-links.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.dark .nav-links {
        background: color-mix(in srgb, var(--surface) 98%, transparent);
    }

    .nav-pill,
    .settings-toggle {
        width: 100%;
        min-height: 46px;
        justify-content: flex-start;
        border-radius: 16px;
        background: color-mix(in srgb, var(--surface-2) 82%, transparent);
    }

    .settings-menu {
        width: 100%;
    }

    .settings-panel {
        position: static;
        width: 100%;
        margin-top: 0.55rem;
        box-shadow: none;
    }

    .hero,
    .workflow,
    .preclinical-stage-map,
    .tool-grid,
    .price-grid,
    .role-grid,
    .suite-grid,
    .category-grid,
    .value-grid,
    .api-path {
        grid-template-columns: 1fr;
    }

    .pharma-bridge,
    .preclinical-module-layout,
    .preclinical-module-grid {
        grid-template-columns: 1fr;
    }

    .pharma-bridge > i,
    .preclinical-stage-map article::after {
        display: none;
    }

    .hero-copy,
    .hero-panel {
        min-height: auto;
    }

    .hero {
        padding-top: 0.8rem;
    }

    .hero-copy {
        padding: 1rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.02;
    }

    .sample-case,
    .product-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .product-shell {
        width: min(100% - 24px, 1240px);
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .action,
    .settings-toggle {
        width: 100%;
    }

    .brand {
        min-width: 0;
    }

    .brand small {
        display: none;
    }

    .brand strong {
        font-size: 0.95rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .mobile-nav-toggle span {
        display: none;
    }

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

    .settings-panel {
        right: auto;
        left: 0;
    }
}
