:root {
    --bg: #f4efe7;
    --bg-soft: #fbf8f2;
    --panel: rgba(255, 251, 245, 0.88);
    --panel-strong: #fffdf8;
    --line: rgba(31, 41, 55, 0.12);
    --line-strong: rgba(31, 41, 55, 0.22);
    --text: #182230;
    --muted: #596579;
    --accent: #0b6a67;
    --accent-soft: #d9ece7;
    --accent-2: #a86d28;
    --accent-2-soft: #f1dfc8;
    --danger: #c94f45;
    --danger-soft: #f7ddd7;
    --warning: #d48a1b;
    --warning-soft: #f8ebcf;
    --success: #347d52;
    --success-soft: #dcebdd;
    --mono: "JetBrains Mono", monospace;
    --sans: "Instrument Sans", sans-serif;
    --serif: "Fraunces", serif;
    --shadow-lg: 0 30px 80px rgba(24, 34, 48, 0.08);
    --shadow-md: 0 18px 42px rgba(24, 34, 48, 0.07);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --shell: 1320px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--sans);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2)),
        radial-gradient(circle at top left, rgba(11, 106, 103, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(168, 109, 40, 0.12), transparent 20%),
        repeating-linear-gradient(
            90deg,
            rgba(24, 34, 48, 0.03) 0,
            rgba(24, 34, 48, 0.03) 1px,
            transparent 1px,
            transparent 120px
        ),
        var(--bg);
}

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

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

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(24, 34, 48, 0.08);
    background: rgba(244, 239, 231, 0.84);
    backdrop-filter: blur(18px);
}

.shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #133f4f);
    color: #fff;
    font: 700 0.9rem var(--mono);
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 1.1rem;
    letter-spacing: -0.03em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.9rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    transform: translateY(-1px);
}

.hero-panel,
.content-section,
.content-page,
.workspace-page {
    padding: 38px 0 70px;
}

.hero-grid,
.two-column,
.three-column {
    display: grid;
    gap: 28px;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    align-items: stretch;
}

.hero-copy,
.hero-stage,
.detail-card,
.identity-card,
.preview-card,
.content-card,
.workspace-card,
.workspace-rail {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow-md);
}

.hero-copy {
    padding: 42px;
}

.section-kicker,
.chip,
.card-label,
.rail-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(217, 236, 231, 0.88);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    letter-spacing: -0.045em;
}

.hero-copy h1,
.page-hero h1,
.workspace-topbar h1 {
    margin-top: 18px;
    font-family: var(--serif);
    font-size: clamp(3.3rem, 7vw, 6.2rem);
    line-height: 0.9;
}

.page-hero h1 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.workspace-topbar h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.hero-copy p,
.content-card p,
.detail-card p,
.identity-card p,
.preview-copy p,
.workspace-card p,
.workspace-note p,
.site-footer p,
.footer-list li {
    color: var(--muted);
    line-height: 1.72;
    font-size: 1.02rem;
}

.lead {
    font-size: 1.25rem;
    max-width: 60ch;
}

.pill-row,
.cta-row,
.footer-links,
.metrics-grid,
.flow-grid,
.preview-stack,
.content-stack {
    display: grid;
    gap: 14px;
}

.pill-row {
    grid-template-columns: repeat(2, minmax(0, max-content));
    margin-top: 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(11, 106, 103, 0.12);
    background: rgba(255, 255, 255, 0.8);
    color: #20455b;
    font-weight: 700;
}

.cta-row {
    grid-template-columns: repeat(2, max-content);
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.button-primary {
    background: linear-gradient(135deg, var(--accent), #18435c);
    color: #fff;
    box-shadow: 0 20px 40px rgba(24, 67, 92, 0.18);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(24, 34, 48, 0.1);
}

.hero-stage {
    position: relative;
    overflow: hidden;
    padding: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(249, 244, 235, 0.88)),
        var(--panel);
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(11, 106, 103, 0.08), transparent 26%),
        radial-gradient(circle at 82% 28%, rgba(168, 109, 40, 0.08), transparent 20%);
    pointer-events: none;
}

.hero-stage-label {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(217, 236, 231, 0.95);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-stage img,
.preview-card img {
    position: relative;
    z-index: 1;
    border-radius: 22px;
    border: 1px solid rgba(24, 34, 48, 0.08);
}

.metrics-band {
    padding-bottom: 32px;
}

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

.stat-card,
.flow-card,
.workspace-kpi {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-md);
}

.stat-card span,
.workspace-kpi span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.stat-card strong,
.workspace-kpi strong {
    display: block;
    font: 700 clamp(1.8rem, 4vw, 2.5rem) var(--serif);
    line-height: 0.98;
}

.workspace-kpi small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.two-column {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    align-items: start;
}

.three-column {
    grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
}

.section-heading {
    display: grid;
    gap: 14px;
}

.section-heading h2,
.identity-card h2,
.content-card h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 0.96;
}

.section-heading.center {
    text-align: center;
    justify-items: center;
    margin-bottom: 28px;
}

.detail-card,
.identity-card,
.content-card {
    padding: 30px;
}

.detail-list,
.footer-list {
    margin: 16px 0 0;
    padding-left: 20px;
}

.section-tinted {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.54));
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

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

.flow-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 241, 233, 0.92));
}

.flow-index {
    display: inline-flex;
    margin-bottom: 16px;
    font: 700 0.84rem var(--mono);
    color: var(--accent-2);
}

.flow-card h3,
.preview-copy h3,
.workspace-card h3,
.workspace-note h4 {
    font-size: 1.35rem;
    line-height: 1.1;
}

.identity-row {
    display: grid;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(24, 34, 48, 0.08);
}

.identity-row:last-child {
    border-bottom: 0;
}

.identity-row span {
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.identity-row strong {
    font-size: 1.02rem;
}

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

.preview-card {
    overflow: hidden;
}

.preview-copy {
    padding: 22px;
}

.chip {
    min-height: 32px;
    font-size: 0.76rem;
}

.content-page {
    padding-top: 26px;
}

.page-hero {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
}

.content-stack {
    grid-template-columns: 1fr;
}

.content-card {
    display: grid;
    gap: 14px;
}

.workspace-page {
    padding-top: 26px;
}

.workspace-shell {
    width: min(calc(100% - 30px), 1450px);
    margin: 0 auto 70px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
}

.workspace-rail {
    position: sticky;
    top: 94px;
    align-self: start;
    display: grid;
    gap: 20px;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(244, 239, 231, 0.92));
}

.rail-badge {
    display: inline-flex;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: #203445;
    color: #fff;
    font: 700 0.76rem var(--mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rail-group {
    display: grid;
    gap: 10px;
}

.rail-link,
.rail-pill {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(24, 34, 48, 0.08);
    color: var(--muted);
    font-weight: 600;
}

.rail-link.is-active {
    color: var(--text);
    background: rgba(217, 236, 231, 0.68);
    border-color: rgba(11, 106, 103, 0.14);
}

.workspace-main {
    display: grid;
    gap: 20px;
}

.workspace-topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}

.workspace-topbar-meta {
    display: grid;
    gap: 8px;
    justify-items: end;
    color: var(--muted);
    font-size: 0.92rem;
}

.workspace-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
}

.workspace-grid-bottom {
    grid-template-columns: 1.15fr 0.85fr;
}

.workspace-card {
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(248, 244, 236, 0.92));
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 22px;
}

.chart-caption,
.health-score {
    color: var(--muted);
    font: 700 0.86rem var(--mono);
    letter-spacing: 0.03em;
}

.health-score {
    font-size: 1.8rem;
    color: var(--text);
}

.trend-chart {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(24, 34, 48, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 239, 231, 0.88)),
        repeating-linear-gradient(
            0deg,
            rgba(24, 34, 48, 0.05) 0,
            rgba(24, 34, 48, 0.05) 1px,
            transparent 1px,
            transparent 60px
        );
}

.trend-bars {
    position: absolute;
    inset: auto 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
    gap: 10px;
    height: 74%;
}

.trend-bars span {
    display: block;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, rgba(168, 109, 40, 0.5), rgba(168, 109, 40, 0.92));
}

.trend-line {
    position: absolute;
    left: 18px;
    right: 18px;
    height: 3px;
    border-radius: 999px;
    transform-origin: left center;
}

.trend-line-revenue {
    top: 42%;
    background: linear-gradient(90deg, #0b6a67, #2f877e, #6aa59f);
    transform: rotate(5deg);
}

.trend-line-spend {
    top: 58%;
    background: linear-gradient(90deg, #18344a, #426f86, #8eb7c8);
    transform: rotate(-4deg);
}

.health-ring {
    width: 210px;
    aspect-ratio: 1;
    margin: 12px auto 20px;
    padding: 18px;
    border-radius: 50%;
    background:
        conic-gradient(var(--accent) 0 302deg, rgba(24, 34, 48, 0.08) 302deg 360deg);
}

.health-ring-inner {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--panel-strong);
    box-shadow: inset 0 0 0 1px rgba(24, 34, 48, 0.06);
}

.health-ring-inner strong {
    font: 700 3.2rem var(--serif);
    line-height: 0.9;
}

.alerts-list,
.workspace-sidebar {
    display: grid;
    gap: 14px;
}

.alert-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) 100px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(24, 34, 48, 0.08);
    background: rgba(255, 255, 255, 0.68);
}

.alert-row h4 {
    margin-bottom: 6px;
    font-size: 1rem;
}

.alert-row p {
    margin: 0;
    font-size: 0.94rem;
}

.severity {
    display: inline-flex;
    justify-content: center;
    width: fit-content;
    min-width: 82px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
}

.severity-high {
    background: var(--danger-soft);
    color: var(--danger);
}

.severity-medium {
    background: var(--warning-soft);
    color: #8f5a07;
}

.severity-low {
    background: var(--success-soft);
    color: var(--success);
}

.funnel-stack {
    display: grid;
    gap: 12px;
}

.funnel-step {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 34, 48, 0.08);
}

.funnel-step strong,
.funnel-step small {
    font-family: var(--mono);
}

.workspace-note {
    padding: 16px 0;
    border-top: 1px solid rgba(24, 34, 48, 0.08);
}

.workspace-note:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.table-wrap {
    overflow-x: auto;
}

.campaign-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.campaign-table th,
.campaign-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(24, 34, 48, 0.08);
    text-align: left;
}

.campaign-table th {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.campaign-table td {
    font-size: 0.96rem;
}

.site-footer {
    padding: 0 0 44px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 253, 248, 0.82);
    box-shadow: var(--shadow-md);
}

.site-footer h3 {
    margin-bottom: 12px;
    font-size: 1.04rem;
}

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

.footer-links a {
    color: var(--muted);
}

@media (max-width: 1180px) {
    .hero-grid,
    .two-column,
    .three-column,
    .workspace-shell,
    .workspace-grid,
    .workspace-grid-bottom {
        grid-template-columns: 1fr;
    }

    .flow-grid,
    .metrics-grid,
    .workspace-kpi-grid,
    .preview-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-rail {
        position: static;
    }

    .workspace-topbar {
        flex-direction: column;
        align-items: start;
    }

    .workspace-topbar-meta {
        justify-items: start;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(calc(100% - 24px), var(--shell));
    }

    .shell-header {
        align-items: start;
        flex-direction: column;
    }

    .nav,
    .pill-row,
    .cta-row,
    .metrics-grid,
    .flow-grid,
    .workspace-kpi-grid,
    .preview-stack {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-stage,
    .detail-card,
    .identity-card,
    .content-card,
    .workspace-card,
    .workspace-rail,
    .footer-grid {
        padding: 22px;
    }

    .hero-copy h1,
    .page-hero h1,
    .workspace-topbar h1 {
        font-size: clamp(2.5rem, 16vw, 4rem);
    }

    .alert-row,
    .funnel-step,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        align-items: start;
    }
}
