:root {
    --get: #61affe;
    --get-bg: rgba(97, 175, 254, 0.1);
    --post: #49cc90;
    --post-bg: rgba(73, 204, 144, 0.1);
    --put: #fca130;
    --put-bg: rgba(252, 161, 48, 0.1);
    --text: #3b4151;
    --muted: #6b6b6b;
    --lighted: #bbbbbb;
    --line: rgba(59, 65, 81, 0.25);
    --bg: #fafafa;
    --link: #4990e2;
    --code-bg: #41444e;
    --required: #f93e3e;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
code,
pre,
.mono {
    font-family: Consolas, "Courier New", monospace;
}
a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ---------- topbar ---------- */
.topbar {
    background: #1b1b1b;
    padding: 10px 0;
}
.topbar-wrapper {
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}
.topbar-logo .dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #49cc90, #61affe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b1b1b;
    font-weight: 700;
    font-size: 15px;
}
.topbar-form {
    flex: 1;
    display: flex;
    max-width: 640px;
}
.topbar-form input {
    flex: 1;
    border: none;
    border-radius: 3px 0 0 3px;
    padding: 8px 10px;
    font-size: 13px;
}
.topbar-form button {
    background: var(--post);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-size: 13px;
}
.topbar-form button:hover {
    filter: brightness(1.08);
}
.topbar-note {
    color: #9a9a9a;
    font-size: 11.5px;
    margin-left: auto;
    white-space: nowrap;
}

/* ---------- wrapper ---------- */
.wrapper {
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- info block ---------- */
.info {
    padding: 36px 0 18px;
}
.info .title {
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.version-badge {
    background: #7d8492;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 50px;
    vertical-align: middle;
}
.info .desc {
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    max-width: 760px;
}
.info .base-url {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
}
.info .base-url code {
    background: #eceff1;
    padding: 2px 7px;
    border-radius: 3px;
    color: var(--text);
}

.authorize-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 6px 0 18px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.btn-authorize {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #d0d2d6;
    color: var(--text);
    font-weight: 600;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.btn-authorize svg {
    width: 14px;
    height: 14px;
}
.btn-authorize.authorized {
    border-color: var(--post);
    color: var(--post);
}
.btn-authorize:hover {
    background: #f5f5f5;
}

/* ---------- setup callout ---------- */
.callout {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--get);
    border-radius: 4px;
    padding: 18px 20px;
    margin-bottom: 30px;
}
.callout h4 {
    margin: 0 0 10px;
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 18px;
}
.callout ol {
    margin: 8px 0 0;
    padding-left: 20px;
}
.callout li {
    margin-bottom: 6px;
    line-height: 1.55;
}
.callout .warn {
    color: #b45200;
    background: #fff6e9;
    border: 1px solid #fde3b8;
    border-radius: 3px;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 13px;
}

/* ---------- tag group ---------- */
.tag-group {
    margin-bottom: 8px;
}
.tag-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}
.tag-header h3 {
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 22px;
    margin: 0;
}
.tag-header .tag-desc {
    color: var(--muted);
    font-size: 13px;
}
.tag-header .chev {
    margin-left: auto;
    transition: transform 0.15s;
}
.tag-group.collapsed .tag-body {
    display: none;
}
.tag-group.collapsed .chev {
    transform: rotate(-90deg);
}
.tag-body {
    padding: 18px 0 28px;
}

/* ---------- operation block ---------- */
.opblock {
    border: 1px solid;
    border-radius: 4px;
    margin-bottom: 14px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.opblock.post {
    border-color: var(--post);
    background: var(--post-bg);
}
.opblock.get {
    border-color: var(--get);
    background: var(--get-bg);
}

.opblock-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
}
.opblock-summary:hover {
    background: rgba(255, 255, 255, 0.85);
}
.op-method {
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    border-radius: 3px;
    padding: 7px 0;
    text-align: center;
    min-width: 78px;
    letter-spacing: 0.5px;
}
.opblock.post .op-method {
    background: var(--post);
}
.opblock.get .op-method {
    background: var(--get);
}
.op-path {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    word-break: break-all;
}
.op-summary-text {
    color: var(--muted);
    font-size: 13px;
    margin-left: 6px;
    flex: 1;
}
.opblock-summary .chev {
    flex-shrink: 0;
    transition: transform 0.15s;
}
.opblock.open .chev {
    transform: rotate(180deg);
}
.opblock-body {
    display: none;
    background: #fff;
    padding: 20px 22px 26px;
}
.opblock.open .opblock-body {
    display: block;
}

.op-description {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
    color: var(--text);
}
.section-label {
    font-family: "Lato", Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #6b6b6b;
    text-transform: uppercase;
    margin: 18px 0 8px;
}

table.params {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.params th {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 8px 6px;
    color: #6b6b6b;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
table.params td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
table.params td.pname {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 600;
    white-space: nowrap;
}
table.params .ptype {
    color: var(--lighted);
    font-size: 12px;
    white-space: nowrap;
}
table.params .req {
    color: var(--required);
    font-style: italic;
    font-size: 11px;
    display: block;
    margin-top: 2px;
}
table.params td.pdesc {
    color: var(--text);
    line-height: 1.55;
}
table.params td.pdesc .eg {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 3px;
}
table.params input {
    width: 100%;
    border: 1px solid #d0d2d6;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 13px;
    font-family: inherit;
}
.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.btn-try {
    background: #fff;
    border: 1px solid var(--link);
    color: var(--link);
    font-weight: 600;
    font-size: 13px;
    padding: 7px 22px;
    border-radius: 4px;
    cursor: pointer;
}
.btn-try:hover {
    background: #eef5fd;
}
.btn-exec {
    background: var(--link);
    border: 1px solid var(--link);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 22px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
}
.btn-exec:hover {
    filter: brightness(1.08);
}
.demo-note {
    font-size: 11.5px;
    color: #999;
    align-self: center;
}

.code-block {
    position: relative;
    background: var(--code-bg);
    color: #e8e8e8;
    border-radius: 4px;
    padding: 14px 16px;
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.55;
    overflow-x: auto;
}
.code-block .copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ddd;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 3px;
    cursor: pointer;
}
.code-block .copy:hover {
    background: rgba(255, 255, 255, 0.22);
}

.resp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
.resp-table th {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    color: #6b6b6b;
    font-size: 12px;
    text-transform: uppercase;
}
.resp-table td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.status-200 {
    color: var(--post);
    font-weight: 700;
}

.exec-result {
    display: none;
    margin-top: 18px;
    /* border-top: 1px dashed var(--line); */
    /* padding-top: 16px; */
}
.exec-result.show {
    display: block;
}
.exec-result .badge-200 {
    background: var(--post);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 8px;
}

/* ---------- schemas ---------- */
.models-wrap {
    margin-top: 10px;
}
.model {
    border: 1px solid var(--line);
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
}
.model-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #f6f6f6;
}
.model-head b {
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
}
.model-head .chev {
    margin-left: auto;
    transition: transform 0.15s;
}
.model.open .chev {
    transform: rotate(180deg);
}
.model-body {
    display: none;
    padding: 6px 14px 14px;
}
.model.open .model-body {
    display: block;
}
.model-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.model-body td {
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
}
.model-body td.mn {
    font-family: Consolas, "Courier New", monospace;
    color: #a04a00;
}
.model-body td.mt {
    color: #0b8235;
}

/* ---------- modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.modal-overlay.show {
    display: flex;
}
.modal {
    background: #fff;
    border-radius: 6px;
    width: 380px;
    padding: 22px 24px;
}
.modal h3 {
    margin: 0 0 16px;
    font-family: "Lato", Helvetica, Arial, sans-serif;
}
.modal label {
    display: block;
    font-size: 12px;
    color: #6b6b6b;
    margin-bottom: 4px;
    margin-top: 12px;
    font-weight: 600;
}
.modal input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d0d2d6;
    border-radius: 3px;
    font-size: 13px;
}
.modal .modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.modal .modal-btns button {
    padding: 7px 18px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.modal .modal-btns .cancel {
    background: #fff;
    border: 1px solid #d0d2d6;
    color: var(--text);
}
.modal .modal-btns .save {
    background: var(--post);
    border: 1px solid var(--post);
    color: #fff;
}

footer {
    padding: 30px 0 60px;
    color: #9a9a9a;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 680px) {
    .op-summary-text {
        display: none;
    }
    .topbar-note {
        display: none;
    }
}
.mt-3 {
    margin-top: 30px;
}
