:root {
    color-scheme: light;
    --ink: #171b18;
    --ink-soft: #4f5a52;
    --muted: #727d74;
    --paper: #f4f0e6;
    --paper-2: #e7e0d0;
    --surface: #fffaf0;
    --surface-2: #ffffff;
    --line: rgba(23, 27, 24, 0.14);
    --line-strong: rgba(23, 27, 24, 0.24);
    --forest: #1f5a45;
    --teal: #2d8787;
    --amber: #c58222;
    --plum: #675070;
    --rust: #a6533c;
    --dark: #101612;
    --dark-2: #1d2a23;
    --shadow: 0 18px 48px rgba(31, 42, 35, 0.15);
    --radius: 8px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    letter-spacing: 0;
}

body.nav-open {
    overflow: hidden;
}

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

code,
pre {
    font-family: "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

code {
    padding: 0.12rem 0.34rem;
    border-radius: 6px;
    background: rgba(31, 90, 69, 0.1);
    color: #173d30;
    font-size: 0.92em;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: 74px;
    padding: 0 28px;
    color: #fffdf7;
    background: rgba(16, 22, 18, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    color: var(--ink);
    background: rgba(255, 250, 240, 0.94);
    box-shadow: 0 12px 32px rgba(31, 42, 35, 0.1);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 44px;
    color: inherit;
    font-weight: 900;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #fffdf7;
    background:
        linear-gradient(135deg, rgba(31, 90, 69, 0.96), rgba(45, 135, 135, 0.88)),
        var(--forest);
    box-shadow: 0 10px 24px rgba(31, 90, 69, 0.24);
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

.site-nav a,
.nav-action {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 0.9rem;
    border-radius: var(--radius);
    color: inherit;
    font-size: 0.9rem;
    font-weight: 800;
}

.site-nav a:hover,
.nav-action:hover,
.site-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.14);
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .nav-action:hover,
.site-header.is-scrolled .site-nav a[aria-current="page"] {
    background: rgba(31, 90, 69, 0.1);
}

.nav-action {
    border: 1px solid currentColor;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid currentColor;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    place-items: center;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.nav-toggle span + span {
    margin-top: 5px;
}

.hero {
    position: relative;
    min-height: 86svh;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fffdf7;
    background:
        radial-gradient(circle at 15% 18%, rgba(45, 135, 135, 0.28), transparent 28%),
        linear-gradient(140deg, #101612 0%, #1b2a22 58%, #34263a 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 36%;
    background: linear-gradient(180deg, rgba(16, 22, 18, 0), rgba(16, 22, 18, 0.68));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 130px 0 72px;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--amber);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1 {
    max-width: 12ch;
    font-size: 5.45rem;
    line-height: 0.95;
    letter-spacing: 0;
}

h2 {
    max-width: 13ch;
    font-size: 3.25rem;
    line-height: 1.04;
    letter-spacing: 0;
}

h3 {
    font-size: 1.42rem;
    line-height: 1.16;
    letter-spacing: 0;
}

h4 {
    font-size: 1.03rem;
    line-height: 1.25;
    letter-spacing: 0;
}

p,
li {
    color: var(--ink-soft);
}

.hero-lede {
    max-width: 720px;
    margin-top: 1.1rem;
    color: rgba(255, 253, 247, 0.84);
    font-size: 1.14rem;
}

.hero-actions,
.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.72rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 850;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button-primary {
    color: #fffdf7;
    background: var(--forest);
    box-shadow: 0 12px 28px rgba(31, 90, 69, 0.25);
}

.button-secondary {
    color: #fffdf7;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.button-light {
    color: var(--ink);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.58);
}

.abstract-art {
    position: absolute;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 18% 18%, rgba(197, 130, 34, 0.5), transparent 18%),
        radial-gradient(circle at 78% 30%, rgba(45, 135, 135, 0.45), transparent 22%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.art-hero {
    z-index: 1;
    right: max(20px, calc((100% - 1180px) / 2));
    bottom: 84px;
    width: min(42vw, 530px);
    aspect-ratio: 1 / 1;
}

.art-api {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1 / 0.86;
    background:
        radial-gradient(circle at 14% 22%, rgba(197, 130, 34, 0.36), transparent 22%),
        radial-gradient(circle at 74% 34%, rgba(45, 135, 135, 0.28), transparent 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 250, 240, 0.48));
    box-shadow: var(--shadow);
}

.art-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.art-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.art-api .art-orbit {
    border-color: rgba(31, 90, 69, 0.24);
}

.orbit-one {
    inset: 16%;
}

.orbit-two {
    inset: 30% 8%;
    transform: rotate(24deg);
}

.art-node {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fffdf7;
    box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.12);
}

.art-api .art-node {
    background: var(--forest);
}

.node-one {
    top: 24%;
    right: 22%;
}

.node-two {
    left: 18%;
    bottom: 22%;
}

.art-panel {
    position: absolute;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.panel-one {
    width: 38%;
    height: 28%;
    left: 15%;
    top: 18%;
}

.panel-two {
    width: 44%;
    height: 30%;
    right: 12%;
    bottom: 14%;
}

.signal-strip {
    display: flex;
    gap: 0.55rem;
    overflow: auto;
    padding: 18px max(20px, calc((100% - 1180px) / 2));
    border-block: 1px solid var(--line);
    background: var(--surface);
    scrollbar-width: none;
}

.signal-strip::-webkit-scrollbar {
    display: none;
}

.signal-strip span {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 0.9rem;
    color: var(--ink-soft);
    background: var(--surface-2);
    font-size: 0.9rem;
    font-weight: 800;
}

.section {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 82px 0;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: 34px;
}

.section-heading .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -2rem;
}

.section-heading p {
    max-width: 680px;
    font-size: 1.03rem;
}

.section-heading.compact {
    display: block;
    margin-bottom: 24px;
}

.section-heading.compact .eyebrow {
    margin-bottom: 0.75rem;
}

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

.feature-card,
.workflow-card,
.split-panel,
.close-section,
.wiki-section,
.member-grid article,
.table-wrap,
.example-entry {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: var(--shadow);
}

.feature-card {
    min-height: 245px;
    padding: 1.15rem;
    display: grid;
    align-content: space-between;
    gap: 1rem;
}

.feature-card:nth-child(2),
.workflow-card:nth-child(2) {
    background: #f4fbf9;
}

.feature-card:nth-child(3),
.workflow-card:nth-child(3) {
    background: #fff7e8;
}

.feature-card:nth-child(4) {
    background: #f8f4fb;
}

.card-kicker {
    color: var(--forest);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.feature-card p,
.workflow-card p {
    font-size: 0.96rem;
}

.workflow-section {
    padding-top: 24px;
}

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

.workflow-card {
    overflow: hidden;
}

.workflow-card > div:last-child {
    padding: 1rem;
}

.workflow-card h3 {
    margin-top: 0.35rem;
}

.abstract-thumb {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    background:
        radial-gradient(circle at 22% 20%, rgba(197, 130, 34, 0.32), transparent 22%),
        radial-gradient(circle at 78% 35%, rgba(45, 135, 135, 0.28), transparent 26%),
        linear-gradient(135deg, #fdf7ea, #e8efe9);
    border-bottom: 1px solid var(--line);
}

.abstract-thumb::before,
.abstract-thumb::after,
.abstract-thumb span {
    content: "";
    position: absolute;
    border-radius: var(--radius);
}

.abstract-thumb::before {
    inset: 18% 14%;
    border: 1px solid rgba(31, 90, 69, 0.18);
    transform: rotate(-9deg);
}

.abstract-thumb::after {
    width: 36%;
    height: 22%;
    left: 18%;
    top: 20%;
    background: rgba(31, 90, 69, 0.18);
}

.abstract-thumb span:nth-child(1) {
    width: 18%;
    aspect-ratio: 1;
    right: 20%;
    top: 22%;
    border-radius: 50%;
    background: var(--teal);
}

.abstract-thumb span:nth-child(2) {
    width: 44%;
    height: 12px;
    left: 24%;
    bottom: 32%;
    background: rgba(166, 83, 60, 0.44);
    transform: rotate(-12deg);
}

.abstract-thumb span:nth-child(3) {
    width: 24%;
    height: 28%;
    right: 16%;
    bottom: 18%;
    background: rgba(103, 80, 112, 0.2);
}

.scripting-landing {
    padding-top: 24px;
}

.split-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at 12% 18%, rgba(45, 135, 135, 0.12), transparent 28%),
        var(--surface-2);
}

.split-panel p {
    max-width: 620px;
}

.code-preview {
    min-width: 0;
}

.code-block,
.code-preview {
    position: relative;
}

pre {
    overflow: auto;
    margin: 0;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #101612;
    color: #f2f7ef;
    padding: 1rem;
    font-size: 0.88rem;
    line-height: 1.55;
}

pre code {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.copy-button {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fffdf7;
    padding: 0 0.55rem;
    font-weight: 800;
    cursor: pointer;
}

.close-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    margin-block: 82px;
    background: var(--dark);
    color: #fffdf7;
}

.close-section p {
    max-width: 620px;
    color: rgba(255, 253, 247, 0.78);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 28px max(20px, calc((100% - 1180px) / 2));
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--paper-2);
    font-size: 0.92rem;
}

.wiki-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0;
    min-height: 100svh;
    padding-top: 74px;
}

.wiki-sidebar {
    position: sticky;
    top: 74px;
    height: calc(100svh - 74px);
    overflow: auto;
    padding: 1.2rem;
    border-right: 1px solid var(--line);
    background: rgba(255, 250, 240, 0.82);
}

.wiki-sidebar-title {
    display: grid;
    gap: 0.1rem;
    margin-bottom: 1rem;
}

.wiki-sidebar-title strong {
    font-size: 1rem;
}

.wiki-sidebar nav {
    display: grid;
    gap: 0.28rem;
}

.wiki-sidebar a {
    min-height: 36px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 0 0.7rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 800;
}

.wiki-sidebar a:hover,
.wiki-sidebar a.active {
    color: #fffdf7;
    background: var(--forest);
}

.wiki-main {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0 84px;
}

.wiki-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.wiki-hero h1 {
    color: var(--ink);
    font-size: 4rem;
}

.wiki-hero p {
    max-width: 720px;
    font-size: 1.05rem;
}

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

.wiki-section > p {
    margin-top: 0.45rem;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.member-grid article {
    padding: 1rem;
    box-shadow: none;
}

ul {
    margin: 0.7rem 0 0;
    padding-left: 1.1rem;
}

li + li {
    margin-top: 0.35rem;
}

.table-wrap {
    overflow: auto;
    margin-top: 1rem;
    box-shadow: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.85rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--ink);
    background: #f7f2e8;
}

.example-entry {
    margin-top: 1rem;
    padding: 1rem;
    box-shadow: none;
}

.example-entry .code-block {
    margin-top: 0.8rem;
}

.limits-panel {
    background: #fff8e8;
    border-color: rgba(197, 130, 34, 0.28);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
}

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

@media (max-width: 1080px) {
    .art-hero {
        opacity: 0.34;
        right: -10%;
        width: min(70vw, 560px);
    }

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

@media (max-width: 920px) {
    .site-header {
        grid-template-columns: auto 1fr auto;
    }

    .site-nav,
    .nav-action {
        display: none;
    }

    .nav-toggle {
        display: grid;
        justify-self: end;
    }

    .site-header.nav-open .site-nav,
    .site-header.nav-open .nav-action {
        position: fixed;
        left: 16px;
        right: 16px;
        display: grid;
        justify-content: stretch;
        background: #fffaf0;
        color: var(--ink);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

    .site-header.nav-open .site-nav {
        top: 82px;
        gap: 0;
        padding: 0.5rem;
    }

    .site-header.nav-open .nav-action {
        top: 270px;
        text-align: center;
        justify-content: center;
    }

    h1,
    .wiki-hero h1 {
        font-size: 3.6rem;
    }

    h2 {
        font-size: 2.4rem;
    }

    .section-heading,
    .split-panel,
    .close-section,
    .wiki-hero,
    .member-grid {
        grid-template-columns: 1fr;
    }

    .section-heading .eyebrow {
        margin-bottom: 0;
    }

    .wiki-shell {
        display: block;
    }

    .wiki-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .wiki-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .art-api {
        display: none;
    }
}

@media (max-width: 640px) {
    .site-header {
        min-height: 66px;
        padding: 0 18px;
    }

    .brand span:last-child {
        display: none;
    }

    .hero {
        min-height: 78svh;
    }

    .hero-content {
        width: min(100% - 32px, 1180px);
        padding: 110px 0 54px;
    }

    h1,
    .wiki-hero h1 {
        font-size: 2.9rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-lede {
        font-size: 1rem;
    }

    .section,
    .wiki-main {
        width: min(100% - 32px, 1180px);
        padding-block: 58px;
    }

    .feature-grid,
    .workflow-grid,
    .wiki-sidebar nav {
        grid-template-columns: 1fr;
    }

    .split-panel,
    .close-section {
        padding: 1rem;
    }

    .site-footer {
        display: grid;
    }
}
