/* ==========================================================================
   FastJoins — Developers (/developers) and API docs (/docs). Square-cornered cards.
   ========================================================================== */
.dv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.dv-row { margin-bottom: 14px; }
.span-3 { grid-column: span 3; }
.span-6 { grid-column: span 6; }
.dv-card { position: relative; padding: 18px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); animation: dvIn 0.45s var(--ease) both; }
@keyframes dvIn { from { opacity: 0; transform: translateY(8px); } }
.dv-card h2 { font-size: 15px; font-weight: 700; }
.dv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dv-head .grow { flex: 1; min-width: 0; }
.dv-muted { display: block; color: var(--text-3); font-size: 13px; }
.dv-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.gold-text { color: #f0bd6a; }
.btn-ico { width: 16px; height: 16px; }
.dv-card .button, .dv-hero .button { gap: 7px; border-radius: 6px; }
.dv-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-size: 13px; font-weight: 600; text-decoration: none; }
.dv-link:hover { text-decoration: underline; }
.dv-link .btn-ico { width: 14px; height: 14px; }
.dv-chip { padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; color: #5fd394; background: var(--green-soft); white-space: nowrap; }

.dv-ico { --c: var(--accent); flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.dv-ico svg { width: 19px; height: 19px; }
.dv-ico.blue { --c: #5b8eff; }
.dv-ico.violet { --c: #a48bff; }
.dv-ico.gold { --c: #f0bd6a; }
.dv-ico.green { --c: #3fca7e; }
.dv-icon-btn { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.dv-icon-btn svg { width: 16px; height: 16px; }
.dv-icon-btn:hover { color: var(--text); background: var(--surface-3); }
.dv-icon-btn.on { color: var(--accent-text); border-color: var(--accent); }
.dv-icon-btn.copied { color: #fff; background: var(--green); border-color: transparent; }
.dv-icon-btn.sm { width: 28px; height: 28px; }
.dv-icon-btn.sm svg { width: 14px; height: 14px; }
.dv-method { flex-shrink: 0; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: #5fd394; background: var(--green-soft); }

/* ---------- Hero ---------- */
.dv-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 26px;
    margin-bottom: 14px;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
    background:
        radial-gradient(560px 260px at 0% 0%, rgba(60, 120, 242, 0.2), transparent 70%),
        radial-gradient(460px 240px at 100% 100%, rgba(63, 202, 126, 0.12), transparent 70%),
        var(--surface);
}
.dv-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(90deg, #000, transparent 65%);
    pointer-events: none;
}
.dv-hero > * { position: relative; z-index: 1; }
.dv-eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); font-family: ui-monospace, Consolas, monospace; }
.dv-eyebrow svg { width: 14px; height: 14px; }
.dv-hero h1 { margin: 12px 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.dv-hero-text p { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.dv-hero-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Key box */
.dv-key { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 6px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border-strong); }
.dv-key-head { display: flex; align-items: flex-start; gap: 12px; }
.dv-key-head .grow { flex: 1; min-width: 0; }
.dv-key-head strong { display: block; font-size: 15px; }
.dv-key-head small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; line-height: 1.45; }
.dv-key-field { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); }
.dv-key-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--text); letter-spacing: 0.02em; }
.dv-key-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.dv-key-foot { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dv-key-foot small { color: var(--text-3); font-size: 12px; line-height: 1.4; }
.dv-key-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 6px; border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 14px; }

/* Docs hero side + base URL */
.dv-hero-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dv-mini { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.24); border: 1px solid var(--border); }
.dv-mini strong { display: block; font-size: 14px; }
.dv-mini small { color: var(--text-3); font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.dv-base { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 6px 6px 6px 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border-strong); }
.dv-base code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--text); }

/* ---------- Stats ---------- */
.dv-stat { display: flex; align-items: center; gap: 14px; transition: border-color 0.15s, transform 0.2s var(--ease); }
.dv-stat:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.dv-stat .dv-ico { width: 42px; height: 42px; }
.dv-stat strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dv-stat small { color: var(--text-3); font-size: 12px; }
.dv-chart { position: relative; height: 230px; }

/* ---------- Code block ---------- */
.dv-code { overflow: hidden; border-radius: 6px; border: 1px solid var(--border); background: #0b0d11; }
.dv-code-tabs { display: flex; align-items: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--bg-raised); }
.dv-code-tabs button { height: 28px; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--text-3); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.dv-code-tabs button:hover { color: var(--text); }
.dv-code-tabs button.active { color: var(--text); background: var(--surface-3); }
.dv-code-tabs .dv-code-copy { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.dv-code-copy svg { width: 14px; height: 14px; }
.dv-code-copy.copied { color: #5fd394; }
.dv-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; line-height: 1.65; color: #c9d1e0; white-space: pre; tab-size: 2; }

/* ---------- Own bot ---------- */
.dv-bot { display: flex; align-items: flex-start; gap: 18px; border-color: color-mix(in srgb, #a48bff 30%, var(--border)); background: radial-gradient(500px 200px at 100% 0%, rgba(123, 92, 255, 0.14), transparent 70%), var(--surface); }
.dv-bot .grow { flex: 1; min-width: 0; }
.dv-bot h2 { font-size: 17px; }
.dv-bot > .grow > p { margin-top: 4px; color: var(--text-2); font-size: 14px; line-height: 1.5; max-width: 640px; }
.dv-bot-ico { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 6px; color: #fff; background: linear-gradient(135deg, #7b5cff, #4d8bff); box-shadow: 0 10px 26px -10px rgba(123, 92, 255, 0.7); }
.dv-bot-ico svg { width: 26px; height: 26px; }
.dv-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; }
.dv-steps li { display: flex; gap: 10px; padding: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); }
.dv-steps li span { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); }
.dv-steps li p { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.dv-bot-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Quick reference ---------- */
.dv-ref { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dv-ref-group { display: flex; flex-direction: column; gap: 4px; }
.dv-ref-group .dv-label { margin-bottom: 4px; }
.dv-ref-item { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; border: 1px solid transparent; transition: background-color 0.12s, border-color 0.12s; }
.dv-ref-item:hover { background: var(--bg-raised); border-color: var(--border); }
.dv-ref-item code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--text); }
.dv-ref-item small { grid-column: 2; color: var(--text-3); font-size: 12px; line-height: 1.4; }

/* ---------- Docs layout ---------- */
.dc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.dc-toc { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding: 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); scrollbar-width: thin; }
.dc-toc .dv-label { margin: 12px 8px 4px; }
.dc-toc a { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 4px; color: var(--text-2); font-size: 13px; text-decoration: none; transition: background-color 0.12s, color 0.12s; }
.dc-toc a:hover { color: var(--text); background: var(--surface-2); }
.dc-toc a.active { color: var(--text); background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.dc-toc a.ep { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.dc-toc a.ep i { font-style: normal; font-size: 9px; font-weight: 800; color: #5fd394; }
.dc-search { position: relative; display: block; }
.dc-search svg { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.dc-search input { width: 100%; height: 34px; padding: 0 10px 0 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); font: inherit; font-size: 13px; outline: none; }
.dc-search input:focus { border-color: var(--accent); }

.dc-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dc-section, .dc-ep { scroll-margin-top: 80px; }
.dc-section h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.dc-section h3 { margin: 16px 0 4px; font-size: 15px; font-weight: 700; }
.dc-section p { color: var(--text-2); font-size: 14px; line-height: 1.6; }
.dc-section p + .dv-code, .dc-section .dv-code { margin-top: 14px; }
.dc-section code:not(.dc-code), .dc-desc code { padding: 1px 5px; border-radius: 3px; background: var(--surface-3); font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--text); }
.dc-guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dc-guides .dc-section h3 { margin-top: 12px; }
.dc-guides .dc-section p { font-size: 13px; }
.dc-group { margin: 14px 0 -2px; font-size: 18px; font-weight: 800; }
.dc-example h2 { margin-top: 12px; }

/* Tables */
.dc-table { margin-top: 12px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; font-size: 13px; }
.dc-tr { display: grid; grid-template-columns: 90px 80px 1fr; gap: 12px; align-items: center; padding: 9px 14px; background: var(--bg-raised); }
.dc-tr + .dc-tr { border-top: 1px solid var(--border); }
.dc-tr.head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); background: var(--surface-2); }
.dc-table.small .dc-tr { grid-template-columns: 1.2fr 1fr 0.8fr; padding: 8px 12px; }
.dc-code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--accent-text); }
.dc-type { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #f0bd6a; }
.dc-http { padding: 2px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-http.s4 { color: #f0bd6a; background: var(--amber-soft); }
.dc-http.s5 { color: #ff8c9c; background: var(--red-soft); }

/* Endpoint */
.dc-ep-head { display: flex; align-items: center; gap: 10px; }
.dc-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 15px; color: var(--text-3); }
.dc-path b { color: var(--text); font-weight: 700; }
.dc-desc { margin: 8px 0 14px; color: var(--text-2); font-size: 14px; }
.dc-ep-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.dc-ret { margin-top: 14px; }
.dc-returns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dc-returns code { padding: 3px 7px; border-radius: 4px; background: var(--bg-raised); border: 1px solid var(--border); font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
    .span-3 { grid-column: span 6; }
    .span-6 { grid-column: span 12; }
    .dv-hero { grid-template-columns: minmax(0, 1fr); }
    .dc-ep-grid { grid-template-columns: minmax(0, 1fr); }
    .dc-guides { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .dc-layout { grid-template-columns: minmax(0, 1fr); }
    .dc-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .dc-toc .dv-label, .dc-toc a.ep, .dc-search { display: none; }
    .dv-bot { flex-direction: column; }
    .dv-steps { grid-template-columns: minmax(0, 1fr); }
    .dv-bot-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 640px) {
    .dv-grid { gap: 10px; }
    .dv-row { margin-bottom: 10px; }
    .dv-hero { padding: 18px; gap: 16px; }
    .dv-hero h1 { font-size: 24px; }
    .dv-hero-side { grid-template-columns: minmax(0, 1fr); }
    .dv-stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .dv-stat .dv-ico { width: 34px; height: 34px; }
    .dv-stat strong { font-size: 20px; }
    .dv-key-foot { flex-direction: column; align-items: flex-start; }
    .dc-tr { grid-template-columns: 50px 56px 1fr; padding: 9px 10px; }
    .dc-path { font-size: 13px; }
    .dv-code pre { font-size: 11.5px; }
}
