:root {
    color-scheme: light;
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
    background: #f5f6f8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f5f6f8;
}

button, a, select, input { font: inherit; }

.demo-shell {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
}

.demo-header {
    border-bottom: 1px solid #dedfe5;
    background: #fff;
}

.demo-header-inner {
    width: min(1080px, calc(100% - 2rem));
    min-height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.demo-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #625bb1;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.demo-header nav { display: flex; gap: 1rem; }
.demo-header nav a { color: #4f46a5; font-size: 0.85rem; }

.page-heading {
    margin-bottom: 1.5rem;
}

h1 {
    margin: 0 0 0.4rem;
    color: #27244f;
    font-size: 2rem;
    line-height: 1.2;
}

.page-heading p {
    margin: 0;
    color: #60646f;
    line-height: 1.5;
}

.page-heading a { color: #4f46a5; }

.sdk-development-notice {
    margin: -0.5rem 0 1.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d7c98c;
    border-radius: 8px;
    color: #5e4b12;
    background: #fff9df;
    font-size: 0.88rem;
    line-height: 1.5;
}

.sdk-development-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sdk-development-icon {
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.sdk-development-copy {
    display: block;
    margin: 0.2rem 0 0 2.05rem;
}

.biomapi-widget-button {
    min-height: 54px;
    padding: 0.65rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: #625bb1;
    font-weight: 600;
    cursor: pointer;
}

.biomapi-widget-button:hover { background: #514a9f; }
.biomapi-widget-button:focus-visible { outline: 3px solid rgba(98, 91, 177, 0.32); outline-offset: 3px; }

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

.demo-card {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid #dedfe5;
    border-radius: 9px;
    background: #fff;
}

.demo-card h2 { margin: 0 0 0.85rem; color: #27244f; font-size: 1.1rem; }
.demo-card p, .demo-card li { color: #555b66; line-height: 1.55; }
.demo-card ol, .demo-card ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.demo-card li + li { margin-top: 0.4rem; }
.integration-card, .payload-card { grid-column: 1 / -1; }
.integration-card > p code { color: #433c92; }

.share-card select {
    width: 100%;
    margin: 0.45rem 0 1rem;
    padding: 0.55rem;
    border: 1px solid #c9c7d4;
    border-radius: 6px;
    color: inherit;
    background: #fff;
}
.identity-choice { display: flex; align-items: flex-start; gap: 0.45rem; line-height: 1.45; }
.identity-choice input { margin: 0.2rem 0 0; accent-color: #625bb1; }
.identity-details { margin: 0.5rem 0 1rem; font-size: 0.82rem; overflow-wrap: anywhere; }
.copy-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.demo-button {
    min-height: 42px;
    padding: 0.5rem 0.8rem;
    border: 1px solid #625bb1;
    border-radius: 6px;
    background: #fff;
    color: #514a9f;
    cursor: pointer;
}
.demo-button:hover:not(:disabled) { background: #f4f2ff; }
.demo-button:disabled { opacity: 0.5; cursor: default; }
.demo-button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #b9b3e5; outline-offset: 2px; }
.demo-status { font-size: 0.85rem; overflow-wrap: anywhere; }
.demo-status[data-state="error"] { color: #a52232; }
.demo-status[data-state="success"] { color: #24603d; }
.fragment-card code { overflow-wrap: anywhere; }

.tips-callout {
    grid-column: 1 / -1;
    padding: 1rem 1.25rem;
    border-left: 4px solid #625bb1;
    border-radius: 0 9px 9px 0;
    background: #eeecfb;
}

.tips-callout h2 {
    margin: 0 0 0.65rem;
    color: #27244f;
    font-size: 1rem;
}

.tips-callout ul {
    margin: 0;
    padding-left: 1.2rem;
}

.tips-callout li {
    color: #4f5260;
    line-height: 1.5;
}

.tips-callout li + li { margin-top: 0.35rem; }
.tips-callout a { color: #4f46a5; }
.tips-callout code { color: #433c92; }

.card-heading {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.card-heading h2 { margin-bottom: 0; }

pre {
    margin: 0;
    overflow: auto;
    border-radius: 12px;
    color: #d7f9e9;
    background: #151a22;
    font: 0.78rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.code-box { position: relative; }
.code-copy-button {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    z-index: 1;
    width: 34px;
    height: 34px;
    padding: 7px;
    display: grid;
    place-items: center;
    border: 1px solid #46505e;
    border-radius: 8px;
    color: #d7f9e9;
    background: #252c36;
    cursor: pointer;
}
.code-copy-button:hover { color: #fff; background: #343d49; }
.code-copy-button:focus-visible { outline: 3px solid rgba(125, 211, 252, 0.4); outline-offset: 2px; }
.code-copy-button:disabled { color: #7c8591; background: #20262f; cursor: default; }
.code-copy-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }

#payloadViewer { min-height: 180px; max-height: 560px; padding: 1rem 3.8rem 1rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.response-schema-note {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #625bb1;
    border-radius: 6px;
    background: #f4f2ff;
    font-size: 0.82rem;
}
.response-schema-note a { color: #4f46a5; }
.code-sample { margin-top: 1rem; padding: 1rem 3.8rem 1rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.syntax-tag, .syntax-call { color: #7dd3fc; }
.syntax-attr { color: #c4b5fd; }
.syntax-string { color: #f9c97b; }
.syntax-keyword { color: #d8a7ff; }
.syntax-comment { color: #94a3b8; }
.syntax-json-key { color: #7dd3fc; }
.syntax-json-string { color: #f9c97b; }
.syntax-json-number { color: #c4b5fd; }
.syntax-json-boolean { color: #86efac; }
.syntax-json-null { color: #94a3b8; }

@media (max-width: 780px) {
    .demo-grid { grid-template-columns: 1fr; }
    .demo-header-inner { align-items: center; }
    .demo-header nav { gap: 0.65rem; }
    .integration-card, .tips-callout { grid-column: auto; }
}
