.help-page,
.help-page h1,
.help-page h2,
.help-page h3,
.help-page-table th,
.help-page-table td,
.help-page code {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.help-page {
    margin: 0;
    padding-top: 40px; /* clears fixed top bar */
    color: #222;
    line-height: 1.5;
}

/* Fixed 70px Cin7 bar: logo + page title */
.navbar.navbar-custom.navbar-inverse.api-docs-navbar {
    background-color: #002E6E;
    color: #fff;
    border-radius: 0;
    border-bottom: none;
    min-height: 70px;
    height: 70px;
    max-height: 70px;
    margin-bottom: 0;
}

.api-docs-navbar .api-docs-navbar-container {
    display: flex;
    align-items: center;
    height: 70px;
    max-width: 1100px;
}

.api-docs-navbar .api-docs-navbar-header {
    float: none;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
}

.api-docs-navbar .api-docs-navbar-brand {
    float: none;
    height: auto;
    padding: 0 12px 0 0;
    margin: 0;
    display: flex;
    align-items: center;
    color: #fff;
}

.api-docs-navbar .api-docs-navbar-brand:hover,
.api-docs-navbar .api-docs-navbar-brand:focus {
    color: #fff;
}

.api-docs-navbar .api-docs-navbar-brand img {
    display: block;
    max-height: 52px;
    width: auto;
    height: auto;
}

.help-page .api-docs-navbar .api-docs-navbar-title {
    margin: 0;
    padding: 0;
    font-size: 2.875rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
    border: 0;
    flex: 0 1 auto;
}

/* Full-width top banner (API docs index + endpoint help) */
header.help-page.banner {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #f4f4f4;
    border-bottom: 1px solid #d4d4d4;
    padding: 0.35rem 0 0.85rem;
}

.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.featured {
    padding: 0 0 1.5rem;
}

/* Tighten gap under fixed blue bar: featured intro sits closer to navbar */
.help-page #body > .featured > .content-wrapper > :first-child {
    margin-top: 0;
}

/* Slightly tighter top after featured when main column follows */
.help-page #body > section.main-content > h2:first-of-type {
    margin-top: 0.25rem;
    margin-bottom: -2rem;
}

.main-content {
    padding-bottom: 3rem;
}

/* Body content headings (#body excludes navbar); sizes override Bootstrap defaults */
.help-page #body h1 {
    margin: 0;
    font-size: 2.625rem;
    font-weight: 600;
}

/* All section titles in API doc body (static + generated): one size */
.help-page #body h2 {
    margin-top: 1.75rem;
    font-size: 2.625rem;
    font-weight: 600;
}

.help-page #body h3 {
    margin-top: 3.35rem;
    font-size: 2.125rem;
    font-weight: 600;
}

.help-page #body h4 {
    margin-top: 3.35rem;
    font-size: 1.7rem;
    font-weight: 600;
}

.help-page #body h4:first-of-type {
    margin-top: 2rem;
}

header.help-page.banner .api-docs-endpoint-heading {
    margin-top: 0.35rem;
    margin-bottom: 0;
    font-size: 2.625rem;
    font-weight: 600;
}

.help-page a {
    color: #0066c0;
}

.help-page .api-docs-navbar a.navbar-brand,
.help-page .api-docs-navbar a.navbar-brand:hover,
.help-page .api-docs-navbar a.navbar-brand:focus {
    color: #fff;
}

.help-page a:hover {
    text-decoration: underline;
}

.help-page code {
    font-size: 0.92em;
    background: #f0f0f0;
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.help-page-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin: 0 0 1.25rem;
    border-top: 1px solid #d4d4d4;
}

.help-page-table thead th {
    font-weight: 600;
    padding: 0.5rem 0.5rem;
    background-color: #ebebeb;
    border-bottom: 1px solid #d4d4d4;
}

.help-page-table thead th:not(:last-child),
.help-page-table tbody td:not(:last-child) {
    border-right: 1px solid #d4d4d4;
}

.help-page-table tbody tr:nth-child(odd) td {
    background-color: #fff;
}

.help-page-table tbody tr:nth-child(even) td {
    background-color: #ebebeb;
}

.help-page-table td {
    padding: 0.65rem 0.5rem;
    vertical-align: top;
    border-bottom: 1px solid #d4d4d4;
}

.help-page-table tbody tr:hover td {
    background-color: #e0e0e0;
}

.controller-block {
    margin-top: 5rem;
}

/* Multi-group controllers: when no .controller-version sits between groups, table→table or
   table→summary reads cramped; .controller-version already adds vertical rhythm */
.controller-block .help-page-table + .help-page-table,
.controller-block .help-page-table + .controller-summary {
    margin-top: 1.1rem;
}

.controller-summary {
    color: #444;
    margin: 0.25rem 0 0.75rem;
}

.controller-version {
    margin: 0.15rem 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    color: #555;
}

.http-method {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

code.route {
    word-break: break-all;
    white-space: normal;
}

.help-page-table thead th.col-code {
    white-space: nowrap;
}

.help-page-table .col-code {
    min-width: 9.5rem;
    width: 1%;
}

.help-page-table tbody td.field-name {
    white-space: nowrap;
}

.help-page-table .col-summary {
    width: 8rem;
}

/* Index: all controller endpoint tables share Endpoint / Description column widths */
.controller-block .help-page-table {
    table-layout: fixed;
}

.controller-block .help-page-table thead th:nth-child(1),
.controller-block .help-page-table tbody td:nth-child(1) {
    width: 38%;
}

.controller-block .help-page-table thead th:nth-child(2),
.controller-block .help-page-table tbody td:nth-child(2) {
    width: 62%;
}

.controller-block .api-name {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.field-name {
    font-weight: 600;
}

.api-name {
    white-space: nowrap;
}

.api-name a {
    font-weight: 500;
}

.api-documentation p {
    margin: 0;
}

.label-beta {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background: #5bc0de;
    border-radius: 3px;
    vertical-align: middle;
}

.label-beta.standalone {
    margin-left: 0;
    margin-top: 0.5rem;
}

.back-link {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.endpoint-intro {
    margin-bottom: 1.5rem;
}

.swagger-hint {
    margin-top: 2rem;
    color: #555;
}
