:root {
    --ink:      #0d0d0d;
    --ink-soft: #444;
    --ink-mute: #888;
    --rule:     #e0e0e0;
    --accent:   #1a4fff;
    --accent-h: #0033dd;
    --bg:       #f9f8f6;
    --card:     #ffffff;
    --mono:     'DM Mono', monospace;
    --serif:    'DM Serif Display', serif;
    --sans:     'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
}

header {
    border-bottom: 1px solid var(--rule);
    padding: 0 40px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
    background: var(--ink) !important;
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    transition: background 0.15s !important;
}

.nav-cta:hover { background: #333 !important; }

.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 96px 40px 80px;
    text-align: center;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    height: 1px;
    width: 40px;
    background: var(--accent);
    opacity: 0.4;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 28px;
}

.hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.hero-sub {
    font-size: 17px;
    font-weight: 300;
    color: var(--ink-soft);
    max-width: 560px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 13px 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: var(--accent-h);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid var(--rule);
    transition: border-color 0.15s, transform 0.1s;
}

.btn-secondary:hover {
    border-color: var(--ink-soft);
    transform: translateY(-1px);
}

.stats-bar {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--card);
}

.stats-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 40px;
}

.stat {
    padding: 32px 20px;
    border-right: 1px solid var(--rule);
    text-align: center;
}

.stat:last-child { border-right: none; }

.stat-number {
    font-family: var(--serif);
    font-size: 36px;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 40px;
}

.section-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
}

.endpoints-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
}

.endpoint-card {
    background: var(--card);
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    display: block;
}

.endpoint-card:hover { background: #f4f3f0; }

.endpoint-method {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #059669;
    margin-bottom: 10px;
}

.endpoint-path {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 8px;
    word-break: break-all;
}

.endpoint-desc {
    font-size: 12px;
    color: var(--ink-mute);
    line-height: 1.5;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.link-card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 24px 28px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: border-color 0.15s, transform 0.1s;
}

.link-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.link-card-body h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--ink);
}

.link-card-body p {
    font-size: 13px;
    color: var(--ink-mute);
}

.link-arrow {
    font-size: 18px;
    color: var(--ink-mute);
    margin-left: 16px;
    flex-shrink: 0;
    transition: transform 0.15s, color 0.15s;
}

.link-card:hover .link-arrow {
    transform: translate(2px, -2px);
    color: var(--accent);
}

.auth-strip {
    background: var(--ink);
    color: #fff;
    padding: 40px;
}

.auth-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.auth-text h2 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 6px;
}

.auth-text p {
    font-size: 14px;
    color: #999;
}

.auth-text p a {
    color: #6699ff;
    text-decoration: none;
}

.btn-light {
    background: #fff;
    color: var(--ink);
    padding: 13px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-light:hover { background: #eee; }

footer {
    border-top: 1px solid var(--rule);
    background: var(--card);
    padding: 28px 40px;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-mute);
}

.footer-left a { color: inherit; }

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--ink-mute);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--ink); }

/* ── Base URL block ──────────────────────────────────────────────────── */
.base-url-section {
    padding: 32px 40px;
    border-bottom: 1px solid var(--rule);
    background: var(--bg);
}
.base-url-inner {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 28px 32px;
}
.burl-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 8px;
}
.burl-url {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
    user-select: all;
}
/* Collapsible groups */
.burl-group { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 12px; }
.burl-group-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: 3px 0;
    margin-bottom: 8px;
    transition: color 0.12s;
}
.burl-group-label::-webkit-details-marker { display: none; }
.burl-group-label::before { content: '▸'; font-size: 9px; color: var(--ink-mute); margin-right: 2px; }
details[open] > .burl-group-label::before { content: '▾'; }
.burl-group-label:hover { color: var(--ink); }
/* CSS tree connectors — replaces ASCII ├── └── */
.burl-tree {
    border-left: 1px solid var(--rule);
    margin-left: 6px;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.burl-item {
    position: relative;
    padding: 4px 6px 4px 18px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    border-radius: 4px;
    transition: background 0.12s;
}
.burl-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: calc(50% + 0.5px);
    width: 12px;
    height: 1px;
    background: var(--rule);
}
.burl-item:hover { background: #f5f5f3; }
.burl-item:hover .burl-path { color: var(--accent); }
.burl-path {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink);
    flex-shrink: 0;
    transition: color 0.12s;
}
.burl-param { font-style: normal; color: var(--accent); opacity: 0.85; }
.burl-note  { font-family: var(--sans); font-size: 11.5px; color: var(--ink-mute); font-weight: 400; }
/* Analytics tag pills */
.burl-item--sub { align-items: flex-start; padding-top: 5px; padding-bottom: 5px; }
.burl-tags  { display: flex; flex-wrap: wrap; gap: 4px; }
.burl-tag {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soft);
    background: var(--bg);
    border: 1px solid var(--rule);
    padding: 2px 7px;
    border-radius: 3px;
    transition: border-color 0.12s, color 0.12s;
}
.burl-tag:hover { border-color: var(--accent); color: var(--accent); }
.burl-tag--throttled { border-style: dashed; color: var(--ink-mute); font-size: 10.5px; }
/* Badges */
.burl-badge {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.6;
}
.burl-badge--free     { background: #d1fae5; color: #065f46; }
.burl-badge--flagship { background: #dbeafe; color: var(--accent); }
.burl-badge--bulk     { background: #f3f4f6; color: #374151; }

/* ── Flagship band (quant factor & risk) ─────────────────────────────── */
.flagship-band { background: var(--ink); color: #fff; padding: 56px 40px; }
.flagship-inner { max-width: 900px; margin: 0 auto; }
.flagship-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6699ff;
    margin-bottom: 20px;
}
.flagship-h {
    font-family: var(--serif);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.flagship-h em { font-style: italic; color: #6699ff; }
.flagship-sub { font-size: 15px; color: #aaa; max-width: 580px; line-height: 1.7; margin-bottom: 28px; }
.flagship-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.flagship-pill {
    font-family: var(--mono);
    font-size: 11px;
    color: #ccc;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    padding: 4px 10px;
    border-radius: 3px;
}
.flagship-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn-ghost {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.3);
    padding-bottom: 2px;
    transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.8); }

/* ── Endpoint card additions ──────────────────────────────────────────── */
.endpoint-kpi {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--ink-mute);
    margin-top: 10px;
    letter-spacing: 0.01em;
}
.endpoint-card.is-flagship { background: #f7f9ff; }
.endpoint-card.is-flagship:hover { background: #eef1ff; }
.endpoint-card.is-flagship .endpoint-method { color: var(--accent); font-weight: 500; }
.endpoint-card.is-flagship .endpoint-kpi { color: var(--accent); opacity: 0.75; }

@media (max-width: 700px) {
    header { padding: 0 20px; }
    .nav-links { display: none; }
    .hero { padding: 64px 20px 48px; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); padding: 0 20px; }
    .section { padding: 48px 20px; }
    .endpoints-grid { grid-template-columns: 1fr; }
    .links-grid { grid-template-columns: 1fr; }
    .auth-strip { padding: 32px 20px; }
    .flagship-band { padding: 40px 20px; }
    footer { padding: 24px 20px; }
    .base-url-section { padding: 24px 20px; }
    .burl-url { font-size: 13px; word-break: break-all; }
    .burl-note { display: none; }
    .burl-path { flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; }
}
