:root {
    --green: #34d399;
    --green-strong: #10b981;
    --green-dark: #047857;
    --mint: #ecfdf5;
    --cyan: #0ea5e9;
    --amber: #f59e0b;
    --ink: #050706;
    --muted: #5f6663;
    --paper: #ffffff;
    --soft: #f8fffb;
    --line: #d9f7e8;
    --zinc: #18181b;
    --shadow: 0 24px 70px rgba(8, 47, 34, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(236, 253, 245, 0.52), transparent 480px),
        var(--paper);
    color: var(--ink);
    font-family: "Geist Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand, .nav-links, .hero-actions, .feature-row, .footer-links {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 12px 32px rgba(52, 211, 153, 0.25);
}

.nav-links {
    gap: 6px;
}

.nav-links a, .secondary-action, .card-link, .lab-toolbar button, .lab-actions button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--zinc);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: calc(100dvh - 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: clamp(28px, 5vw, 84px);
    padding: clamp(72px, 9vw, 132px) clamp(18px, 5vw, 72px) 72px;
    overflow: clip;
}

.hero-bg, .grid-plane, .signal {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grid-plane {
    inset: -20%;
    background-image:
        linear-gradient(rgba(24, 24, 27, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 24, 27, 0.08) 1px, transparent 1px);
    background-size: 72px 72px;
    transform: perspective(900px) rotateX(58deg) translateY(-18%);
    transform-origin: top center;
    animation: gridDrift 18s linear infinite;
}

.signal {
    width: 40rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(24, 24, 27, 0.25), transparent);
}

.signal::before {
    content: "";
    display: block;
    width: 5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.95), transparent);
    animation: packet 5s ease-in-out infinite;
}

.signal-one { top: 28%; left: -5rem; transform: rotate(15deg); }
.signal-two { right: -7rem; bottom: 30%; transform: rotate(-13deg); }
.signal-two::before { animation-delay: 1.3s; }

.hero-copy, .tool-console, .page-hero, .section, .tool-page {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 860px;
}

.pill, .eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: var(--green-dark);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow {
    border: 0;
    background: transparent;
    padding: 0;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 24px;
    font-size: clamp(48px, 7.6vw, 112px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h2 {
    font-size: clamp(34px, 4.8vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 18px;
}

h3 {
    font-size: 20px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero p, .page-hero p, .section-heading p, .workspace-copy p {
    color: var(--muted);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.55;
    max-width: 760px;
}

.search-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 760px;
    padding: 8px;
    margin: 34px 0 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.search-shell.narrow {
    margin-inline: auto;
}

.search-shell input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 14px 18px;
    font: inherit;
}

.search-shell button, .primary-action, .dropzone button {
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #020403;
    padding: 14px 20px;
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(52, 211, 153, 0.22);
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.tool-console {
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 255, 251, 0.94)),
        radial-gradient(circle at 10% 10%, rgba(52, 211, 153, 0.16), transparent 32%);
    box-shadow: var(--shadow);
    padding: 12px;
    min-height: 520px;
}

.console-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.console-top span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--green);
}

.console-top strong {
    margin-left: auto;
}

.console-upload {
    min-height: 190px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 12px;
    margin: 14px;
    border: 1px dashed #9be7c3;
    border-radius: 20px;
    background: #ffffff;
}

.upload-glyph, .drop-icon, .tool-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--green);
    font-weight: 950;
}

.mini-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 2px 14px 14px;
}

.mini-tools a {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    font-weight: 800;
}

.section, .page-hero, .tool-page {
    padding: clamp(72px, 9vw, 132px) clamp(18px, 5vw, 72px);
}

.section-tight {
    padding-top: 80px;
}

.page-hero {
    text-align: center;
    background: linear-gradient(180deg, var(--soft), #fff);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    max-width: 980px;
    margin-inline: auto;
    font-size: clamp(44px, 6.4vw, 88px);
}

.page-hero p {
    margin-inline: auto;
}

.section-heading {
    max-width: 900px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading.left {
    margin-left: 0;
    text-align: left;
}

.tool-grid, .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.tool-grid.wide {
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.tool-card, .category-card {
    position: relative;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 255, 251, 0.88));
    box-shadow: 0 10px 30px rgba(8, 47, 34, 0.055);
}

.tool-card:hover, .category-card:hover {
    border-color: #9be7c3;
    transform: translateY(-3px);
    transition: 220ms ease;
}

.tool-card::after, .category-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--cyan), var(--amber));
    opacity: 0;
    transition: opacity 180ms ease;
}

.tool-card:hover::after, .category-card:hover::after {
    opacity: 1;
}

.tool-card p, .category-card p {
    color: var(--muted);
    line-height: 1.55;
}

.card-link {
    margin-top: auto;
    width: max-content;
}

.center-row {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.band {
    background: var(--soft);
    border-block: 1px solid var(--line);
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 40px;
    align-items: center;
    max-width: 1220px;
    margin: 0 auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats div {
    min-height: 150px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.stats strong {
    display: block;
    font-size: 52px;
    letter-spacing: -0.06em;
}

.stats span {
    color: var(--muted);
    font-weight: 800;
}

.tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: clamp(24px, 5vw, 72px);
    align-items: center;
    max-width: 1220px;
    margin: 0 auto;
}

.breadcrumb {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--green-dark);
    font-weight: 900;
}

.feature-row {
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.feature-row span {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
    font-weight: 800;
}

.dropzone {
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
    padding: clamp(28px, 5vw, 48px);
    border: 1px dashed #9be7c3;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,255,251,0.96)),
        radial-gradient(circle at 50% 0%, rgba(52, 211, 153, 0.16), transparent 38%);
    box-shadow: var(--shadow);
}

.dropzone input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.upgraded-tool {
    background:
        radial-gradient(circle at 75% 12%, rgba(14, 165, 233, 0.12), transparent 30%),
        radial-gradient(circle at 18% 18%, rgba(52, 211, 153, 0.16), transparent 34%),
        #fff;
}

.live-dropzone {
    align-content: start;
}

.file-picker, .option-field {
    width: 100%;
    display: grid;
    gap: 8px;
    text-align: left;
    color: var(--muted);
    font-weight: 800;
}

.file-picker {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.file-picker span, .option-field span {
    color: var(--ink);
}

.option-field input, .option-field select, .lab-sidebar select, .lab-fields input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.tool-lab-shell {
    padding: 0 clamp(18px, 5vw, 72px) clamp(72px, 9vw, 132px);
    background: linear-gradient(180deg, var(--soft), #fff);
}

.lab-panel {
    max-width: 1220px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.lab-sidebar, .lab-workbench {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 48px rgba(8, 47, 34, 0.08);
}

.lab-sidebar {
    padding: clamp(24px, 4vw, 36px);
}

.lab-sidebar h2 {
    font-size: clamp(28px, 3vw, 44px);
}

.lab-sidebar p {
    color: var(--muted);
    line-height: 1.65;
}

.lab-workbench {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(220px, 1fr) auto minmax(160px, auto);
}

.lab-toolbar, .lab-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}

.lab-actions {
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.lab-actions button:first-child {
    background: var(--green);
    color: #020403;
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(52, 211, 153, 0.18);
}

.lab-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 14px;
}

.lab-fields:empty {
    display: none;
}

.lab-workbench textarea, .lab-workbench pre {
    width: 100%;
    min-height: 220px;
    margin: 0;
    border: 0;
    outline: 0;
    resize: vertical;
    padding: 18px;
    font: 14px/1.6 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lab-workbench textarea {
    background: #fff;
}

.lab-workbench pre {
    white-space: pre-wrap;
    overflow: auto;
    color: #d8fff0;
    background:
        linear-gradient(180deg, rgba(5, 7, 6, 0.96), rgba(12, 24, 19, 0.98));
}

.dropzone small {
    color: var(--muted);
}

.category-section:nth-of-type(even) {
    background: var(--soft);
    border-block: 1px solid var(--line);
}

.prose-section {
    max-width: 860px;
    margin: 0 auto;
}

.prose-section p {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.65;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 42px clamp(18px, 5vw, 72px);
    border-top: 1px solid var(--line);
    background: var(--soft);
}

.footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

.footer-links {
    gap: 14px;
    font-weight: 800;
}

[hidden] { display: none !important; }

@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 72px 72px, 72px 72px; }
}

@keyframes packet {
    0% { transform: translateX(-5rem); opacity: 0; }
    18%, 82% { opacity: 1; }
    100% { transform: translateX(40rem); opacity: 0; }
}

@media (max-width: 920px) {
    .hero, .split, .tool-workspace, .lab-panel {
        grid-template-columns: 1fr;
    }

    .tool-console {
        min-height: auto;
    }
}

@media (max-width: 680px) {
    .site-header, .footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .search-shell {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .search-shell button {
        width: 100%;
    }

    .mini-tools, .stats {
        grid-template-columns: 1fr;
    }

    h1 {
        letter-spacing: -0.04em;
    }
}
