/* The DbnSuite website, in SquidEyes colours: Squidly's blues on a calm page. Roles, swapped once for dark mode. */

:root {
    color-scheme: light;
    --page: #f6fafd;
    --surface: #ffffff;
    --surface-2: #eaf4fb;
    --ink: #0b1d33;
    --ink-2: #3b5068;
    --muted: #6d8197;
    --line: #d7e5f0;
    --brand: #1f72c9;
    --brand-ink: #ffffff;
    --brand-soft: #46bcf4;
    --brand-tint: #e3f3fd;
    --good: #0f7a3d;
    --good-tint: #e4f5ea;
    --warn-tint: #fff4dc;
    --shadow: 0 1px 2px rgba(11, 29, 51, 0.06), 0 8px 24px rgba(11, 29, 51, 0.06);
    --radius: 14px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page: #07121f;
        --surface: #0d1c2e;
        --surface-2: #11253b;
        --ink: #eaf3fb;
        --ink-2: #b4c6d8;
        --muted: #7f95ab;
        --line: #1d3550;
        --brand: #3f95ec;
        --brand-ink: #04111f;
        --brand-soft: #46bcf4;
        --brand-tint: #0f2a45;
        --good: #4fd08a;
        --good-tint: #0f2c1e;
        --warn-tint: #2e2510;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #07121f;
    --surface: #0d1c2e;
    --surface-2: #11253b;
    --ink: #eaf3fb;
    --ink-2: #b4c6d8;
    --muted: #7f95ab;
    --line: #1d3550;
    --brand: #3f95ec;
    --brand-ink: #04111f;
    --brand-soft: #46bcf4;
    --brand-tint: #0f2a45;
    --good: #4fd08a;
    --good-tint: #0f2c1e;
    --warn-tint: #2e2510;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
/* FocusOnNavigate moves focus to the h1 for screen readers; it is not a control, so it shows no ring. */
h1:focus { outline: none; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1.25em; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 460px; padding-top: 56px; padding-bottom: 56px; }
.center { text-align: center; }
.center-art { display: block; margin: 0 auto 12px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 600; color: var(--brand); margin: 0 0 12px; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--ink-2); font-weight: 500; }
.site-nav a.active { color: var(--ink); }
.site-nav a.button { color: var(--brand-ink); }

.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 28px 0 40px; color: var(--muted); font-size: 0.875rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 18px; }
.footer-row a { color: var(--muted); }

/* Buttons */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand);
    padding: 12px 20px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.button:hover { text-decoration: none; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.button:active { transform: translateY(1px); }
.button.ghost { background: transparent; color: var(--brand); }
.button.small { padding: 7px 14px; font-size: 0.9rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Home */
.hero { background: radial-gradient(1200px 400px at 80% 20%, var(--brand-tint), transparent 70%); padding: 72px 0 48px; }
.hero-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
.hero-art { width: clamp(180px, 26vw, 300px); height: auto; filter: drop-shadow(0 18px 30px rgba(31, 114, 201, 0.25)); }
.hero h1 { max-width: 18ch; }

.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.tool-card { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.tool-card:hover { text-decoration: none; border-color: var(--brand-soft); }
.tool-card h2 { margin: 0; }
.tool-card p { color: var(--ink-2); margin: 0; }
.tool-card .kind { color: var(--brand); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }

.feature-set { margin-top: 88px; scroll-margin-top: 80px; }
.feature-head { max-width: 760px; margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 1rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.more { margin-top: 18px; font-weight: 600; }

.needs { margin-top: 88px; }
.needs ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 18px 0 0; }
.needs li { background: var(--surface-2); border-radius: var(--radius); padding: 20px; color: var(--ink-2); }
.needs strong { display: block; color: var(--ink); margin-bottom: 4px; }

.oss { margin-top: 88px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: center; }

/* Docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; padding-top: 40px; }
.docs-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.docs-nav-head { color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 6px; }
.docs-nav-head:first-child { margin-top: 0; }
.docs-nav a { color: var(--ink-2); padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.docs-nav a:hover { text-decoration: none; background: var(--surface-2); }
.docs-nav a.active { color: var(--brand); background: var(--brand-tint); }

.doc { max-width: 820px; min-width: 0; }
.doc h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.doc h2 { margin-top: 48px; padding-top: 8px; scroll-margin-top: 80px; }
.doc h3 { scroll-margin-top: 80px; }
.doc p, .doc li { color: var(--ink-2); }
.doc li { margin: 4px 0; }
.doc strong { color: var(--ink); }
.toc { background: var(--surface-2); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc p { margin: 0 0 6px; font-weight: 600; color: var(--ink); }
.toc ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 32px; }
.steps-list { counter-reset: step; list-style: none; padding: 0; }
.steps-list > li { counter-increment: step; position: relative; padding-left: 44px; margin: 22px 0; }
.steps-list > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.note { background: var(--brand-tint); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 18px 0; }
.note.warn { background: var(--warn-tint); border-left-color: #d08a12; }
.note p { margin: 0; }
.next { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 600; }

/* Code */
.code { margin: 14px 0; border-radius: 10px; overflow: hidden; background: #0b1d33; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 8px 6px 14px; background: #10284a; color: #9fb8d4; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: #dff3ff; line-height: 1.55; }
.copy { background: transparent; color: #9fb8d4; border: 1px solid #2a4a72; border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; }
.copy:hover { color: #fff; border-color: #4b74a6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .code { background: #020a14; } :root:not([data-theme="light"]) .code figcaption { background: #0a1a2e; } }
:root[data-theme="dark"] .code { background: #020a14; }
:root[data-theme="dark"] .code figcaption { background: #0a1a2e; }

/* Tables */
.table { width: 100%; overflow-x: auto; margin: 14px 0; }
.table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.table td { color: var(--ink-2); }
.table td:first-child code { white-space: nowrap; }

/* Not found */
.narrow { max-width: 460px; padding-top: 56px; padding-bottom: 56px; }
.center { text-align: center; }
.center-art { display: block; margin: 0 auto 12px; }

@media (max-width: 900px) {
    .tools, .features, .needs ul, .oss { grid-template-columns: 1fr; }
    .docs { grid-template-columns: 1fr; gap: 8px; padding-top: 24px; }
    .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
    .docs-nav-head { display: none; }
    .toc ul { columns: 1; }
}

@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .hero-row { grid-template-columns: 1fr; }
    .hero-art { order: -1; width: 150px; }
    .site-nav { gap: 14px; font-size: 0.92rem; }
}

/* WebAssembly start-up and error bar */
.loading { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: var(--warn-tint); color: var(--ink); z-index: 100; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; }
.fine-print { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

/* The Databento notice */
.notice-box { border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 8px 0 32px; }
.notice-box p { margin: 0 0 8px; color: var(--ink-2); font-size: 0.95rem; }
.notice-box p:last-child { margin-bottom: 0; }
.notice-box strong { color: var(--ink); }
.datasets { margin-top: 88px; }
