.api-docs { --docs-border: #dce4ee; }
.api-docs [id] { scroll-margin-top: 1.5rem; }
.api-docs-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.api-docs-choice {
    display: flex; flex-direction: column; align-items: flex-start; gap: .8rem;
    min-width: 0; padding: 1.75rem; border: 1px solid var(--docs-border); border-radius: 1.25rem;
    background: #fff; color: #334155; text-decoration: none; box-shadow: 0 8px 24px rgba(20, 63, 116, .04);
    transition: border-color .15s, box-shadow .15s;
}
.api-docs-choice--primary { background: linear-gradient(140deg, #edf5ff, #fff); border-color: #b6cdeb; }
.api-docs-choice:hover { color: #334155; border-color: var(--app-primary); box-shadow: 0 8px 24px rgba(20, 63, 116, .1); }
.api-docs-choice:focus-visible, .api-docs summary:focus-visible { outline: 3px solid var(--app-primary); outline-offset: 4px; }
.api-docs-choice__top { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; width: 100%; justify-content: space-between; }
.api-docs-number { font-size: 1.75rem; font-weight: 800; color: var(--app-primary); }
.api-docs-choice .h4 { color: #14304e; margin: 0; }
.api-docs-choice code { overflow-wrap: anywhere; }
.api-docs-choice__action { font-weight: 600; color: var(--app-primary); margin-top: auto; padding-top: .3rem; }
.api-docs-access { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: .25rem .25rem .75rem; color: #475569; font-size: .95rem; }
.api-docs-eyebrow { color: var(--app-primary); text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.api-docs-jumps { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--docs-border); font-size: .9rem; }
.api-docs-flow { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .95rem; font-weight: 600; color: var(--app-primary); background: #f1f6fc; padding: .85rem 1rem; border-radius: .65rem; }
.api-docs-details { border: 1px solid var(--docs-border); border-radius: 1rem; background: #fff; overflow: hidden; }
.api-docs-details > details + details { border-top: 1px solid var(--docs-border); }
.api-docs summary { display: flex; align-items: center; gap: .75rem; list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 600; color: #203b58; }
.api-docs summary::-webkit-details-marker { display: none; }
.api-docs summary::before { content: ''; flex: 0 0 .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.api-docs details[open] > summary::before { transform: rotate(45deg); }
.api-docs summary::after { content: 'Xem chi tiết'; margin-left: auto; flex-shrink: 0; color: #52657c; font-size: .75rem; font-weight: 400; }
.api-docs details[open] > summary::after { content: 'Thu gọn'; }
.api-docs summary:hover, .api-docs details[open] > summary { background: #f5f8fc; }
.api-docs-detail-body { padding: 1.25rem; border-top: 1px solid var(--docs-border); }
.api-docs-detail-body > :last-child { margin-bottom: 0; }
.api-docs-evidence { border: 1px solid var(--docs-border); border-radius: .75rem; }
.api-docs-evidence > summary { border-radius: .75rem; }
.api-docs pre { max-width: 100%; overflow-x: auto; padding: 1.2rem; background: #101e32; color: #e4edf9; border-radius: .6rem; font-size: .85rem; line-height: 1.65; tab-size: 4; }
.api-docs pre code { color: inherit; white-space: pre; overflow-wrap: normal; }
.api-docs-code { min-width: 0; margin-bottom: 1rem; }
.api-docs-code pre { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.api-docs-code__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; background: #1c304a; color: #d2dfef; border-radius: .6rem .6rem 0 0; font-size: .8rem; }
.api-docs-copy { color: #fff; background: transparent; border: 1px solid #8297b3; border-radius: .35rem; padding: .25rem .6rem; }
.api-docs-copy:hover, .api-docs-copy:focus-visible { background: #324c6d; }
.api-docs .table td code { overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
    .api-docs-choices { grid-template-columns: minmax(0, 1fr); }
    .api-docs-choice { padding: 1.25rem; }
    .api-docs summary { flex-wrap: wrap; padding: 1rem; }
    .api-docs summary::after { font-size: .7rem; }
    .api-docs-detail-body { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .api-docs-choice { transition: none; }
}
