/* Developer docs (/developers). Builds on guide.css. */

.dev-page .guide-main .guide-body {
    max-width: 780px;
}

.dev-body h2 code,
.dev-body p code,
.dev-body li code,
.dev-body td code,
.dev-facts code {
    padding: 1px 6px;
    border-radius: 6px;
    background: #eef3f9;
    color: #0b2a5b;
    font: 600 .88em/1.5 'SFMono-Regular', Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

.dev-body h2 code {
    font-size: .9em;
}

/* Code block with a copy button. */
.dev-code {
    margin: 12px 0 18px;
    overflow: hidden;
    border: 1px solid #1c3357;
    border-radius: 14px;
    background: #0b1a33;
}

.dev-code figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 6px 14px;
    border-bottom: 1px solid #1c3357;
    color: #9fb4d0;
    font: 600 13px/1.4 'SFMono-Regular', Menlo, Consolas, monospace;
}

.dev-code figcaption span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-code button,
.dev-facts button {
    flex: none;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #2c4a78;
    border-radius: 999px;
    background: transparent;
    color: #dbe8f8;
    font: 700 13px 'DM Sans', sans-serif;
    cursor: pointer;
}

.dev-code button:hover {
    background: #16305a;
}

.dev-code button:focus-visible,
.dev-facts button:focus-visible {
    outline: 3px solid #16c9f5;
    outline-offset: 2px;
}

.dev-code pre {
    margin: 0;
    padding: 14px 16px 16px;
    overflow-x: auto;
    color: #e6eef9;
    font: 13.5px/1.6 'SFMono-Regular', Menlo, Consolas, monospace;
    tab-size: 4;
}

.dev-code pre:focus-visible {
    outline: 3px solid #16c9f5;
    outline-offset: -3px;
}

/* Tables scroll sideways on phones instead of squeezing the text. */
.dev-table-wrap {
    margin: 12px 0 16px;
    overflow-x: auto;
    border: 1px solid #d4e2ee;
    border-radius: 14px;
    background: #fff;
}

.dev-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 14.5px;
    line-height: 1.55;
}

.dev-table th,
.dev-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f8;
    color: #3c526c;
    text-align: left;
    vertical-align: top;
}

.dev-table th {
    background: #f6f9fd;
    color: #09214a;
    font: 700 13px 'DM Sans', sans-serif;
}

.dev-table tr:last-child td {
    border-bottom: 0;
}

.dev-table td:first-child {
    color: #09214a;
    font-weight: 600;
}

/* Quick facts on the landing page. */
.dev-facts {
    padding: 18px 20px 8px;
    border: 1px solid #d4e2ee;
    border-radius: 18px;
    background: #fff;
}

.dev-facts dl {
    margin: 0;
}

.dev-facts dl > div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 4px 16px;
    padding: 10px 0;
    border-top: 1px solid #edf2f8;
}

.dev-facts dt {
    color: #5a6f86;
    font: 700 13px/1.7 'DM Sans', sans-serif;
}

.dev-facts dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0;
    color: #3c526c;
    font-size: 15px;
    line-height: 1.6;
}

.dev-facts button {
    min-height: 32px;
    padding: 0 12px;
    border-color: #c9d9ea;
    color: #087cff;
}

.dev-facts button:hover {
    background: #eef6ff;
}

/* Numbered steps that link to their page. */
.dev-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    list-style: none;
    counter-reset: dev-step;
}

.dev-body .dev-steps li + li {
    margin-top: 0;
}

.dev-steps a {
    display: grid;
    gap: 6px;
    height: 100%;
    padding: 16px;
    border: 1px solid #d4e2ee;
    border-radius: 16px;
    background: #fff;
    counter-increment: dev-step;
}

.dev-steps a::before {
    content: counter(dev-step);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #087cff;
    color: #fff;
    font: 800 14px Manrope, sans-serif;
}

.dev-steps a:hover {
    border-color: #087cff;
}

.dev-steps strong {
    color: #09214a;
    font: 800 16px Manrope, sans-serif;
}

.dev-steps span {
    color: #3c526c;
    font-weight: 400;
    font-size: 14.5px;
    line-height: 1.55;
}

/* Request flow, drawn as a line of dots. */
.dev-flow {
    position: relative;
    padding-left: 0;
    list-style: none;
}

.dev-body .dev-flow li {
    position: relative;
    margin: 0;
    padding: 0 0 14px 30px;
}

.dev-flow li::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16c9f5;
    box-shadow: 0 0 0 4px rgba(22, 201, 245, .15);
}

.dev-flow li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    bottom: 2px;
    left: 8px;
    width: 2px;
    background: #d4e2ee;
}

.dev-checklist {
    padding-left: 0;
    list-style: none;
}

.dev-body .dev-checklist li {
    position: relative;
    padding-left: 30px;
}

.dev-checklist li::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #9fb8d4;
    border-radius: 5px;
}

.dev-body section[id] {
    scroll-margin-top: 110px;
}

@media (max-width: 900px) {
    /* Wide tables and code must scroll inside their box, not widen the page. */
    .dev-doc {
        grid-template-columns: minmax(0, 1fr);
    }

    .dev-doc > * {
        min-width: 0;
    }

    .dev-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dev-facts {
        padding: 14px 14px 6px;
    }

    .dev-facts dl > div {
        grid-template-columns: 1fr;
    }

    .dev-code pre {
        font-size: 12.5px;
    }
}
