:root {
    --bg: #fafafa;
    --bg-alt: #f0efeb;
    --tx: #1c1c1c;
    --tx-muted: #6b6b6b;
    --link: #4a6db8;
    --border: #e4e2dc;
    --accent: #1c1c1c;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --bg-alt: #242422;
        --tx: #e6e4df;
        --tx-muted: #9a9893;
        --link: #9db3e0;
        --border: #2f2f2d;
        --accent: #e6e4df;
    }
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--tx);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 24px 96px;
}

.intro {
    max-width: 900px;
    margin: 0 auto 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.intro > img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 40px auto 0;
    border-radius: 8px;
}


.split {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(340px, 450px);
    gap: 24px;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.split + .split {
    margin-top: 80px;
}

.split-text {
    min-width: 0;
}

.split-content {
    min-width: 0;
}

.split-title {
    margin-top: 0 !important;
}

.split-image {
    margin: 0;
    align-self: center;
}

.split-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.split-image figcaption {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--tx-muted);
    text-align: center;
}

.split-image figcaption a {
    color: var(--tx-muted);
}

.split-image-sm img {
    max-width: 350px;
    margin: 0 auto;
}

.duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 64px;
}

.duo > section {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 16px 40px 32px;
}

.duo > section h2 {
    margin-top: 24px;
}

.duo code {
    background: var(--bg);
}

.flow-3 {
    display: grid;
    grid-template-columns: 3fr auto 4fr;
    grid-template-areas:
        "title title title"
        "l1    .     l2"
        "fig1  arr1  fig2";
    gap: 4px 16px;
    align-items: center;
    justify-items: center;
    margin: 48px 0 0 100px;
}

.flow-3 .step-label {
    align-self: end;
}

.flow-title {
    grid-area: title;
    text-align: center;
    font-size: 2.8rem;
    line-height: 1.15;
    color: var(--tx-muted);
    margin: 0 0 32px !important;
    white-space: nowrap;
}

.step-label {
    color: var(--tx-muted);
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
}

.l1 { grid-area: l1; }
.l2 { grid-area: l2; }
.l3 { grid-area: l3; }

.flow-3 .l1 {
    justify-self: end;
    width: 290px;
    text-align: center;
}

.flow-3 .l2 {
    justify-self: start;
    width: 330px;
    text-align: center;
}

.fig {
    margin: 0;
}

.fig-1 { grid-area: fig1; justify-self: end; }
.fig-2 { grid-area: fig2; justify-self: start; }
.fig-3 { grid-area: fig3; }

.fig img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 10px;
    margin: 0 auto;
}

.flow-3 .fig-1 img {
    max-width: 290px;
}

.flow-3 .fig-2 img {
    max-width: 330px;
}

.fig figcaption {
    margin: 12px auto 0;
    text-align: center;
    max-width: 280px;
    color: var(--tx-muted);
}

.flow-arrow {
    width: 40px;
    border-top: 2px dashed var(--tx-muted);
    position: relative;
}

.flow-arrow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -7px;
    border-left: 10px solid var(--tx-muted);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.arr-1 { grid-area: arr1; }
.arr-2 { grid-area: arr2; }

.n2 {
    grid-area: n2;
    margin: 0;
    text-align: center;
    max-width: 280px;
    color: var(--tx-muted);
}

.flow-note {
    text-align: center;
    margin: 16px auto 0;
    color: var(--tx-muted);
    font-size: 2rem;
}

.file-icon {
    width: 80px;
    height: 100px;
    margin: 0 auto;
    background: var(--bg-alt);
    border-radius: 8px;
    clip-path: polygon(0 0, 75% 0, 100% 20%, 100% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--tx-muted);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (max-width: 720px) {
    .flow-3 {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "l1"
            "fig1"
            "arr1"
            "l2"
            "fig2";
        margin-left: 0;
        margin-right: 0;
    }
    .flow-3 .l1,
    .flow-3 .l2 {
        justify-self: center;
        width: auto;
    }
    .flow-3 .fig-1,
    .flow-3 .fig-2 {
        justify-self: center;
    }
    .flow-3 .flow-arrow {
        grid-area: arr1;
        width: 0;
        height: 50px;
        margin: 16px auto;
        border-top: none;
        border-left: 2px dashed var(--tx-muted);
    }
    .flow-3 .flow-arrow::after {
        right: auto;
        top: auto;
        left: -7px;
        bottom: -2px;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid var(--tx-muted);
        border-bottom: none;
    }
}

.lazy-hero {
    text-align: center;
    margin: 0 auto 100px;
    max-width: 640px;
}

.lazy-hero h2 {
    display: inline-block;
    font-size: 2.8rem;
    margin: 0 0 20px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 0 0 16px;
}

.feature {
    background: var(--bg-alt);
    border-radius: 10px;
    padding: 14px 18px;
    line-height: 1.4;
    font-size: 0.95rem;
}

@media (max-width: 720px) {
    .duo { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
    .split { grid-template-columns: 1fr; }
    .split-text { display: contents; }
    .split-title { order: 0; }
    .split-image { order: 1; }
    .split-content { order: 2; }
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 0 0 60px;
    font-size: 0.95rem;
    line-height: 1.4;
}

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

.quick-links a:hover {
    color: var(--tx);
}

section img,
main > img {
    max-width: min(680px, 100%);
    height: auto;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
}

section > p,
section > ol,
section > ul,
section > blockquote,
section > h4 {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

section > h2:not(.knowledge-title):not(.flow-title):not(.split-title):not(.muted) {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.knowledge-title {
    width: fit-content;
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    font-size: 2rem !important;
}

@media (min-width: 900px) {
    main {
        max-width: 1150px;
    }
}

html {
    scroll-behavior: smooth;
}

h2 {
    position: relative;
}

h2 .anchor {
    position: absolute;
    right: 100%;
    margin-right: 8px;
    color: var(--tx-muted);
    font-weight: 400;
    text-decoration: none;
    border-bottom: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

h2:hover .anchor,
h2 .anchor:focus {
    opacity: 1;
}

h2 .anchor:hover {
    color: var(--tx);
    border-bottom: none;
}

.logo {
    display: block;
    margin: 0 0 24px;
    border-radius: 14px;
}

h1 {
    font-size: 3rem;
    line-height: 1.15;
    font-weight: 600;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h2:not(.muted) {
    margin: 40px 0 12px;
}

h2#knowledge {
    margin-top: 80px;
}

.chatbot-title {
    width: fit-content;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    font-size: 2.8rem !important;
}

.chatbot-img {
    max-width: 360px !important;
    margin: 40px auto !important;
}

.chat-hero {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 32px auto 48px;
    border-radius: 12px;
}

.step-figure {
    margin: 0 auto;
}

.step-figure img {
    display: block;
    max-width: 320px;
    width: 100%;
    height: auto;
    margin: 8px auto 24px;
    border-radius: 10px;
}

h2#how {
    margin-top: 100px;
}

h2#chatbot {
    margin-top: 100px;
}

.knowledge-sub {
    text-align: center;
    font-size: 1.5rem;
    color: var(--tx-muted);
    margin: 0 auto 32px;
}

.knowledge-sub.muted {
    margin-top: 32px;
}

img[src$="base.png"] {
    margin: 40px auto;
}

p {
    margin: 0 0 16px;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.45;
    color: var(--tx);
    margin: 0 0 14px;
}

.muted {
    color: var(--tx-muted);
}

ul, ol {
    padding-left: 1.3em;
    margin: 0 0 16px;
}

li {
    margin: 4px 0;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

a:hover {
    border-bottom-color: currentColor;
}

code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--bg-alt);
    padding: 1px 6px;
    border-radius: 4px;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
    color: var(--tx-muted);
}

blockquote {
    margin: 20px 0;
    padding: 2px 20px;
    border-left: 3px solid var(--border);
    color: var(--tx-muted);
}

blockquote p {
    margin-bottom: 12px;
}

blockquote p:last-of-type {
    margin-bottom: 0;
}

blockquote strong {
    color: var(--tx);
}

blockquote footer {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--tx-muted);
}

table {
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.35;
}

th, td {
    padding: 6px 24px 6px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

th:last-child, td:last-child {
    padding-right: 0;
}

th {
    font-weight: 600;
    color: var(--tx-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:last-child td {
    border-bottom: none;
}

td code {
    white-space: nowrap;
}

.cta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 500;
    border-bottom: none;
}

.button:hover {
    opacity: 0.85;
    border-bottom: none;
}

.secondary {
    font-size: 0.95rem;
}

.muted {
    color: var(--tx-muted);
}

.site-footer {
    max-width: 680px;
    margin: 64px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--tx-muted);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

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

@media (max-width: 720px) {
    body { font-size: 16px; }
    main { padding: 40px 20px 64px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h2:not(.muted) { margin-top: 36px; }
    .lead { font-size: 1.1rem; }
    .hide-mobile { display: none; }
}
