/* Foundation */
:root {
    --bg:        #0c0f14;
    --bg-soft:   #141925;
    --bg-card:   #161c28;
    --line:      #232b3a;
    --line-soft: #1c2330;
    --fg:        #e6ebf2;
    --fg-muted:  #9aa6b8;
    --fg-faint:  #6b7689;
    --accent:    #6ea8fe;
    --accent-2:  #8b7cf6;
    --good:      #4ade80;
    --warn:      #fbbf24;

    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --maxw: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

img {
    -webkit-user-drag: none;
    user-drag: none;
}

body {
    margin: 0;
    background:
        radial-gradient(1100px 520px at 50% -200px, #1a2333 0%, transparent 70%),
        var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px 20px 72px;
}

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

code { font-family: var(--mono); font-size: 0.92em; }

/* Error page */
.error-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.error-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.error-icon {
    width: 112px;
    height: 112px;
    padding: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.error-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.error-content h1 {
    margin: 0;
    font-size: clamp(25px, 5vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* Homepage */
.home-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow-x: hidden;
    background: #090c11;
}

.home-video,
.home-video-veil {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-video {
    object-fit: cover;
    transform: scale(1.12);
    filter: blur(20px) saturate(1.05);
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -2;
}

.home-video-veil {
    background: rgba(9, 12, 17, 0.62);
    z-index: -1;
}

.home-video.is-visible { opacity: 1; }

.home-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(36px, 8vw, 88px) 24px;
}

.home-identity {
    width: min(100%, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 6vw, 64px);
}

.home-profile {
    flex: 0 0 auto;
    width: clamp(150px, 22vw, 230px);
    height: clamp(150px, 22vw, 230px);
    object-fit: cover;
    border: 3px solid rgba(230, 235, 242, 0.8);
    border-radius: 50%;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateX(-18px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.2,.7,.2,1);
}

.home-profile.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.home-copy { min-width: 0; }

.home-terminal {
    display: flex;
    align-items: baseline;
    min-height: 1.15em;
    margin: 0;
    color: #fff;
    font-family: var(--mono);
    font-size: clamp(36px, 7vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.045em;
    white-space: nowrap;
}

.home-prompt { margin-right: 0.32em; }

.home-name {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-cursor {
    color: #fff;
    animation: home-cursor-blink 0.85s steps(1, end) infinite;
}

@keyframes home-cursor-blink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

.home-links {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(14px, 2.4vw, 24px);
    margin-top: 30px;
}

.home-link {
    width: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    color: var(--fg);
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.2,.7,.2,1);
}

.home-link.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-link:hover { text-decoration: none; }

.home-link-icon {
    width: min(75px, 100%);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.home-link:hover .home-link-icon,
.home-link:focus-visible .home-link-icon {
    transform: translateY(-4px) scale(1.04);
    filter: brightness(1.12) saturate(1.08);
    box-shadow: 0 12px 30px rgba(110, 168, 254, 0.35), 0 0 22px rgba(139, 124, 246, 0.28);
}

.home-link:focus-visible {
    border-radius: var(--radius-sm);
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

.home-link-icon svg,
.home-link-icon img {
    width: 42px;
    height: 42px;
}

.home-link-text {
    color: #fff;
    font-family: var(--sans);
    font-weight: 750;
}

.home-orcid-mark { font-size: 31px; letter-spacing: -0.08em; }
.home-linkedin-mark { font-size: 34px; letter-spacing: -0.06em; }
.home-link-orcid .home-link-icon { background: linear-gradient(135deg, #aecd54, #5b8a32); }
.home-link-scholar .home-link-icon { background: linear-gradient(135deg, #6f98ee, #7b74f7); color: #fff; }
.home-link-linkedin .home-link-icon { background: linear-gradient(135deg, #2d65bc, #393494); }
.home-link-github .home-link-icon { background: linear-gradient(135deg, #f2f5f3, #b6bfb8); }
.home-link-recipes .home-link-icon { background: linear-gradient(135deg, #f5f1e7, #e0dfc5); }
.home-recipe-mark { width: 32px !important; height: 50px !important; object-fit: contain; }

.home-link-label {
    color: rgba(230, 235, 242, 0.92);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
}

@media (max-width: 680px) {
    .home-identity {
        flex-direction: column;
        gap: 28px;
    }
    .home-profile {
        width: clamp(145px, 42vw, 190px);
        height: clamp(145px, 42vw, 190px);
        transform: translateY(-14px);
    }
    .home-profile.is-visible { transform: translateY(0); }
    .home-copy { width: 100%; }
    .home-terminal { justify-content: center; font-size: clamp(32px, 10.5vw, 56px); }
    .home-links { justify-content: center; margin-top: 26px; }
}

@media (max-width: 400px) {
    .home-main { padding-inline: 14px; }
    .home-links { gap: 16px 8px; }
    .home-link { width: 70px; }
    .home-link-icon { width: 62px; border-radius: 15px; }
    .home-link-icon svg, .home-link-icon img { width: 36px; height: 36px; }
    .home-recipe-mark { width: 28px !important; height: 44px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .home-video,
    .home-profile,
    .home-link,
    .home-link-icon { transition: none; }
    .home-cursor { animation-duration: 1.2s; }
}

/* Shared layout */
.report-hero { margin-bottom: 36px; }

.report-eyebrow {
    margin: 0 0 10px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-faint);
}

.hero-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title .accent {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    margin: 0 0 18px;
    color: var(--fg-muted);
    font-size: 16px;
}

.report-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--fg-faint);
    font-size: 13px;
}

.report-hero-meta time { font-family: var(--mono); }

.report-run-id {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--fg-muted);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.report-run-id:hover { border-color: var(--accent); color: var(--fg); }
.report-run-id code { font-size: 12px; color: var(--fg); }
.report-run-id-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-faint);
}
.report-run-id.copied { border-color: var(--good); color: var(--good); }

/* Run report */
.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 40px;
}

.report-metric {
    padding: 18px 16px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.report-metric-value {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.report-metric-value .unit { font-size: 14px; color: var(--fg-faint); margin-left: 1px; }
.report-metric-models { font-size: 16px; line-height: 1.3; }

.report-metric-label {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-faint);
}

.block { margin: 0 0 34px; }

.block-title {
    margin: 0;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.block-note {
    margin: 8px 0 16px;
    color: var(--fg-muted);
    font-size: 13.5px;
    max-width: 62ch;
}

.gantt {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 22px;
}

.gantt-row {
    display: grid;
    grid-template-columns: 130px 1fr 56px;
    align-items: center;
    gap: 12px;
}

.gantt-name { font-size: 13px; color: var(--fg-muted); }

.gantt-track {
    position: relative;
    height: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    overflow: hidden;
}

.gantt-bar {
    display: block;
    height: 100%;
    min-width: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 6px;
    transform-origin: left;
}

.gantt-time {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-faint);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

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

.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.data th, .data td {
    padding: 9px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

.data thead th {
    color: var(--fg-faint);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data .num { text-align: right; font-family: var(--mono); }

.data tbody tr:hover { background: var(--bg-soft); }

.data tfoot td {
    border-top: 1px solid var(--line);
    border-bottom: none;
    font-weight: 700;
    color: var(--fg);
}

.pies {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.pies-head { padding: 18px 20px 16px; }
.pies-head .block-title { margin: 0; }
.pies-head .block-note { margin: 8px 0 0; }

.pie-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--line-soft);
}

.pie {
    min-width: 0;
    padding: 18px 20px 20px;
}
.pie + .pie { border-left: 1px solid var(--line-soft); }

.pie-cap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.pie-title { font-size: 14px; font-weight: 650; }
.pie-total {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-faint);
    font-variant-numeric: tabular-nums;
}

.pie-stage {
    position: relative;
    width: 100%;
    max-width: 230px;
    margin: 10px auto 4px;
    aspect-ratio: 1 / 1;
}
.pie-wrap { width: 100%; height: 100%; }
.pie-svg { display: block; width: 100%; height: 100%; overflow: visible; }

.seg {
    cursor: pointer;
    transition: opacity 0.18s ease, filter 0.18s ease, transform 0.22s cubic-bezier(.2,.7,.2,1);
}
.pie-svg.is-hovering .seg { opacity: 0.22; }
.pie-svg.is-hovering .seg.active {
    opacity: 1;
    filter: brightness(1.08) drop-shadow(0 3px 7px rgba(0, 0, 0, 0.5));
}
.pie-hole { fill: var(--bg-card); }

.pie-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.pie-center .pc-value { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pie-center .pc-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }

.pie-modal {
    position: fixed;
    left: 0; top: 0;
    width: min(94vw, 235px);
    transform: scale(0.92);
    transform-origin: top left;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6);
    padding: 12px 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s cubic-bezier(.2,.7,.2,1);
    z-index: 50;
}
.pie-modal[data-show="1"] { opacity: 1; transform: scale(1); }

.pie-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 9, 14, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 40;
}
.pie-backdrop[data-show="1"] { opacity: 1; pointer-events: auto; }

.pm-close {
    display: none;
    position: absolute;
    top: 8px; right: 8px;
    width: 26px; height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--fg-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.pm-close:hover { color: var(--fg); border-color: var(--accent); }

.pm-head { display: flex; align-items: baseline; gap: 8px; }
.pm-title { font-size: 13px; font-weight: 650; }
.pm-sub { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.pm-model { margin: 2px 0 0; font-size: 11px; color: var(--fg-muted); }
.pm-rows { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pm-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; }
.pm-row .pm-k { font-size: 12px; color: var(--fg-muted); }
.pm-row .pm-v { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); text-align: right; font-variant-numeric: tabular-nums; }
.pm-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--bg-card); overflow: hidden; }
.pm-bar > span { display: block; height: 100%; border-radius: 3px; }

.pie-legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pie-legend li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 12.5px;
    transition: background 0.15s;
}
.pie-legend li.active { background: var(--bg-soft); }
.pie-legend .lg-swatch { width: 11px; height: 11px; border-radius: 3px; }
.pie-legend .lg-label { color: var(--fg-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pie-legend .lg-value { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); font-variant-numeric: tabular-nums; }

/* Shared components */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
}

.badge.model {
    background: var(--bg-soft);
    border-color: var(--line);
    color: var(--fg-muted);
    font-family: var(--mono);
}

.framing-commercial      { background: rgba(110,168,254,0.14); border-color: rgba(110,168,254,0.4); color: #9cc2ff; }
.framing-data-engineer   { background: rgba(74,222,128,0.13);  border-color: rgba(74,222,128,0.4);  color: #7ee6a6; }
.framing-data-scientist  { background: rgba(139,124,246,0.16); border-color: rgba(139,124,246,0.42); color: #b3a6ff; }
.framing-physics-research{ background: rgba(251,191,36,0.14);  border-color: rgba(251,191,36,0.4);  color: #f7cf6b; }
.framing-strategy        { background: rgba(245,158,107,0.14); border-color: rgba(245,158,107,0.42); color: #f7b489; }

.chip-group { margin-top: 16px; }
.chip-group-title {
    margin: 0 0 9px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-faint);
    font-weight: 600;
}
.count {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--fg-muted);
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    --glow: 0;
    padding: 4px 11px;
    background: var(--bg-card);
    border: 1px solid;
    border-color: color-mix(in srgb, var(--accent) calc(var(--glow) * 100%), var(--line));
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--fg);
    box-shadow: 0 0 calc(var(--glow) * 14px) rgba(110, 168, 254, calc(var(--glow) * 0.5));
    transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.chip:hover {
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(110, 168, 254, 0.5);
}

.detail {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0 20px;
}
.detail > summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
}
.detail > summary::-webkit-details-marker { display: none; }
.detail > summary::after {
    content: "+";
    margin-left: auto;
    font-family: var(--mono);
    font-size: 18px;
    color: var(--fg-faint);
}
.detail[open] > summary::after { content: "\2212"; }
.summary-hint {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-faint);
}
.detail[open] > summary { border-bottom: 1px solid var(--line-soft); }
.detail > *:not(summary) { margin-bottom: 18px; }
.detail .block-note:first-of-type { margin-top: 16px; }

.kv {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 18px;
    margin: 16px 0;
}
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv dt {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-faint);
}
.kv dd { margin: 0; font-size: 14px; }

.retrieval-group { margin-top: 18px; }
.retrieval-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 650;
}
.retrieval-head .hint {
    font-size: 11.5px;
    color: var(--fg-faint);
    background: var(--bg-soft);
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    padding: 1px 6px;
}
.picks { max-width: 460px; }
.empty { color: var(--fg-faint); font-style: italic; font-size: 13px; }

.page-footer {
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
    color: var(--fg-muted);
}
.page-footer p { margin: 0 0 6px; }
.page-footer .muted { color: var(--fg-faint); font-size: 12px; }
.page-footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.page-footer-logo {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
}
.page-footer-copy { min-width: 0; }
.page-footer-copy p:last-child { margin-bottom: 0; }
.error-footer {
    width: min(calc(100% - 40px), var(--maxw));
    margin: 0 auto;
    padding-bottom: 28px;
}

@media (max-width: 560px) {
    .page { padding: 32px 16px 56px; }
    .gantt-row { grid-template-columns: 96px 1fr 48px; gap: 8px; }
    .gantt-name { font-size: 12px; }

    .pie-grid { grid-template-columns: 1fr; }
    .pie + .pie { border-left: none; border-top: 1px solid var(--line-soft); }

    .pie-modal {
        left: 50% !important;
        top: 50% !important;
        width: min(88vw, 330px);
        transform: translate(-50%, -50%) scale(0.94) !important;
        transform-origin: center;
        padding: 16px 16px 18px;
    }
    .pie-modal[data-show="1"] {
        transform: translate(-50%, -50%) scale(1) !important;
        pointer-events: auto;
    }
    .pie-modal .pm-head { padding-right: 30px; }
    .pm-close { display: inline-flex; }
}

@media (prefers-reduced-motion: no-preference) {
    .gantt-bar { transition: width 0.5s ease, margin-left 0.5s ease, filter 0.15s; }
}

/* Shared media */
.macwin {
    width: 100%;
    max-width: 500px;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.macwin-bar {
    position: relative;
    display: flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.macwin-lights { display: flex; gap: 8px; }
.macwin-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--fg-faint);
}
.macwin-light.red   { background: #b85650; }
.macwin-light.amber { background: #bf9333; }
.macwin-light.green { background: #4e9152; }

.macwin-title {
    position: absolute;
    left: 0;
    right: 0;
    padding: 0 70px;
    text-align: center;
    pointer-events: none;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--fg-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.macwin-body {
    background: #000;
    line-height: 0;
}
.macwin-body > video,
.macwin-body > img {
    display: block;
    width: 100%;
    height: auto;
}

.codebox {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.codebox-summary {
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line-soft);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.15s ease;
}
.codebox-summary::-webkit-details-marker { display: none; }
.codebox-summary:hover { background-color: var(--bg-soft); }

.codebox-name {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--fg-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.accordion-chevron {
    width: 14px;
    height: 14px;
    margin-left: 12px;
    flex-shrink: 0;
    color: var(--fg-faint);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1), color 0.15s ease;
    transform-origin: 50% 50%;
}
.codebox-summary:hover .accordion-chevron,
.lp-faq-item summary:hover .accordion-chevron { color: var(--fg-muted); }
.js-accordion[open] .accordion-chevron { transform: rotate(180deg); }
.accordion-js .js-accordion[open] .accordion-chevron { transform: rotate(0deg); }
.accordion-js .js-accordion.is-open .accordion-chevron { transform: rotate(180deg); }

.codebox-body {
    margin: 0;
    padding: 13px 15px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--fg);
    tab-size: 2;
    border-top: 1px solid var(--line-soft);
}

html:not(.accordion-js) .js-accordion[open] .accordion-body {
    animation: accordion-expand 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes accordion-expand {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .accordion-chevron { transition: color 0.15s ease; }
}
.codebox-body code { font-family: inherit; font-size: inherit; color: inherit; }

.lp-fade-img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

/* Landing page */
.lp-deploy-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    max-width: 500px;
}
.lp-deploy-node {
    flex: 0 0 auto;
    width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.lp-deploy-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--fg-muted);
}
.lp-deploy-icon svg, .lp-deploy-icon img { width: 24px; height: 24px; }
.lp-deploy-node.is-github .lp-deploy-icon {
    background: linear-gradient(135deg, #f2f5f3, #b6bfb8);
    border-color: rgba(242, 245, 243, 0.45);
}
.lp-deploy-node.is-cf .lp-deploy-icon {
    color: #f6821f;
    border-color: rgba(246, 130, 31, 0.45);
    background: rgba(246, 130, 31, 0.07);
}
.lp-deploy-label { font-size: 12.5px; font-weight: 650; color: var(--fg); line-height: 1.25; }
.lp-deploy-sub { font-family: var(--mono); font-size: 10.5px; color: var(--fg-faint); }

.lp-deploy-link {
    position: relative;
    flex: 1 1 0;
    min-width: 16px;
    height: 2px;
    margin-top: 24px;
    background: var(--line);
    border-radius: 2px;
}
.lp-deploy-link::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 2px solid var(--line);
    border-right: 2px solid var(--line);
    transform: translateY(-50%) rotate(45deg);
}
.lp-deploy-link::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px 1px rgba(110, 168, 254, 0.7);
    animation: lp-deploy-travel 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.lp-deploy-flow > .lp-deploy-link:nth-child(4)::after { animation-delay: 1.2s; }
@keyframes lp-deploy-travel {
    0%   { left: 0;    opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@media (max-width: 560px) {
    .lp-deploy-node { width: 68px; }
    .lp-deploy-icon { width: 42px; height: 42px; border-radius: 11px; }
    .lp-deploy-icon svg, .lp-deploy-icon img { width: 21px; height: 21px; }
    .lp-deploy-link { margin-top: 20px; min-width: 12px; }
    .lp-deploy-label { font-size: 11px; }
    .lp-deploy-sub { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-deploy-link::after { animation: none; opacity: 0.85; }
}

.lp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(380px, 70vh, 600px);
    display: flex;
    align-items: flex-end;
}
.lp-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.12);
    filter: blur(20px) saturate(1.05);
    z-index: -2;
    will-change: opacity;
}
.lp-hero-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 75% at 50% 0%, rgba(12, 15, 20, 0.20), transparent 60%),
        linear-gradient(180deg,
            rgba(12, 15, 20, 0.55) 0%,
            rgba(12, 15, 20, 0.32) 32%,
            rgba(12, 15, 20, 0.85) 82%,
            var(--bg) 100%);
}
.lp-hero-inner {
    width: 100%;
    padding-top: 96px;
    padding-bottom: 60px;
}
.lp-hero-inner .hero-sub { max-width: 56ch; font-size: 17px; }

.lp-runcard {
    width: fit-content;
    position: relative;
    margin: 0 0 34px;
    padding: 22px 22px 24px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.lp-runcard[hidden] { display: none; }

.lp-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 11px 5px 10px;
    background: rgba(74, 222, 128, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #9ff0bd;
}
.lp-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
    animation: lp-pulse 2.4s ease-out infinite;
}
@keyframes lp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.lp-runcard-role {
    margin: 2px 0 0;
    padding-right: 130px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.lp-runcard-company { margin: 3px 0 0; color: var(--fg-muted); font-size: 14px; }
.lp-runcard-note { margin: 12px 0 16px; max-width: 60ch; color: var(--fg-muted); font-size: 14px; }

.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: #0b0e13;
    font-size: 14px;
    font-weight: 650;
    transition: filter 0.15s, transform 0.15s;
}
.lp-btn:hover { filter: brightness(1.08); transform: translateY(-1px); text-decoration: none; }

.lp-nested {
    width: fit-content;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    color: var(--fg-faint);
    font-size: 13px;
}

.lp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.lp-section-heading > .block-title { font-size: clamp(24px, 4vw, 32px); }
.lp-section-heading > .eyebrow {
    margin: 0 0 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.lp-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.lp-ghost-btn:hover { border-color: var(--accent); color: var(--fg); text-decoration: none; }

.lp-flow {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
}
.lp-flow-node {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 16px;
    padding-bottom: 18px;
}
.lp-flow-node:last-child { padding-bottom: 0; }
.lp-flow-node::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 30px;
    bottom: -2px;
    width: 2px;
    background: var(--line);
}
.lp-flow-node:last-child::before { display: none; }

.lp-flow-marker {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--fg-faint);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
}
.lp-flow-node[data-kind="llm"] .lp-flow-marker {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    color: #0b0e13;
}
.lp-flow-node[data-kind="publish"] .lp-flow-marker {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.5), rgba(13, 255, 178, 0.796));
    color: var(--good);
}
.lp-flow-body { padding-top: 4px; min-width: 0; }
.lp-flow-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 14.5px;
    font-weight: 650;
}
.lp-flow-desc { margin: 4px 0 0; max-width: 64ch; color: var(--fg-muted); font-size: 13.5px; }

.lp-why-intro {
    max-width: 70ch;
    margin: 18px 0 24px;
    padding: 18px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
}
.lp-why-intro p { margin: 0; }
.lp-why-intro p + p { margin-top: 14px; }

.lp-why-summary {
    max-width: 70ch;
    margin: 18px 0 0;
    padding: 22px 24px;
    background: linear-gradient(90deg, rgba(110, 168, 254, 0.1), rgba(139, 124, 246, 0.08));
    border: 1px solid rgba(110, 168, 254, 0.24);
    border-radius: var(--radius);
}
.lp-why-summary p {
    max-width: 62ch;
    margin: 0;
    color: var(--fg);
    font-size: 17px;
    line-height: 1.5;
}
.lp-why-summary footer {
    margin-top: 8px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.lp-faq-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}
.lp-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.lp-faq-item:hover,
.lp-faq-item[open] {
    border-color: rgba(110, 168, 254, 0.38);
}
.lp-faq-item[open] {
    background: linear-gradient(135deg, rgba(110, 168, 254, 0.06), var(--bg-card) 45%);
}
.lp-faq-item summary {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 14px 18px;
    color: var(--fg);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item[open] .accordion-chevron { color: var(--accent); }
.lp-faq-number {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
}
.lp-faq-answer {
    margin: 0 18px 18px 60px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    color: var(--fg-muted);
    font-size: 14px;
}
.lp-faq-answer p { margin: 0 0 12px; max-width: 68ch; }
.lp-faq-answer p:last-child { margin-bottom: 0; }
.lp-faq-answer .lp-ghost-btn { margin-top: 4px; }

@media (max-width: 560px) {
    .lp-hero-inner { padding-top: 72px; padding-bottom: 44px; }
    .lp-pill { position: static; margin-bottom: 12px; }
    .lp-runcard-role { padding-right: 0; }
    .lp-section-head { align-items: flex-start; }
    .lp-why-intro, .lp-why-summary { padding: 18px; }
    .lp-faq-item summary { grid-template-columns: 24px 1fr auto; gap: 9px; padding: 13px 14px; }
    .lp-faq-answer { margin: 0 14px 16px 47px; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-pill-dot { animation: none; box-shadow: 0 0 8px 1px rgba(74, 222, 128, 0.55); }
}
