/* BHC Partner API — Proposal & Documentation styles
   Postman-inspired theme. Self-contained, no external dependencies. */

* { box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --bg-sidebar: #fafbfc;
    --border: #e1e4e8;
    --border-soft: #eaecef;
    --text: #1f2328;
    --text-soft: #57606a;
    --text-mute: #8b949e;
    --accent: #ff6c37;
    --accent-soft: #fff1ec;
    --code-bg: #1f2328;
    --code-text: #e6edf3;
    --code-string: #a5d6ff;
    --code-key: #ff7b72;
    --code-comment: #8b949e;
    --code-number: #79c0ff;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.04);

    --method-get: #61affe;
    --method-post: #49cc90;
    --method-put: #fca130;
    --method-patch: #50e3c2;
    --method-delete: #f93e3e;

    --sidebar-width: 280px;
    --content-max: 920px;
    --header-h: 60px;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Header === */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
}
.topbar .logo {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}
.topbar .logo .dot {
    display: inline-block;
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}
.topbar .version {
    margin-left: 14px;
    padding: 3px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 500;
}
.topbar .spacer { flex: 1; }
.topbar .date {
    font-size: 13px;
    color: var(--text-mute);
}

/* === Layout === */
.layout {
    display: flex;
    padding-top: var(--header-h);
    min-height: 100vh;
}

/* === Sidebar nav === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    overflow-y: auto;
}
.sidebar .nav-section {
    margin-bottom: 28px;
}
.sidebar .nav-section h4 {
    margin: 0 0 8px 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-mute);
}
.sidebar a.nav-link {
    display: block;
    padding: 7px 24px;
    color: var(--text-soft);
    font-size: 14px;
    border-left: 2px solid transparent;
}
.sidebar a.nav-link:hover {
    color: var(--text);
    background: var(--bg-soft);
    text-decoration: none;
}
.sidebar a.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

/* === Main content === */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 48px 56px 96px;
    max-width: calc(var(--content-max) + 112px);
}
.content h1 {
    font-size: 32px;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.content h2 {
    font-size: 22px;
    margin: 48px 0 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}
.content h3 {
    font-size: 17px;
    margin: 32px 0 12px;
    font-weight: 600;
}
.content h4 {
    font-size: 14px;
    margin: 20px 0 8px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.content p { margin: 0 0 14px; }
.content .lede {
    font-size: 17px;
    color: var(--text-soft);
    margin-bottom: 28px;
    line-height: 1.55;
}

/* === Cards === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    background: var(--bg);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}
.card a { color: var(--text); }
.card a:hover { text-decoration: none; }
.card .card-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}
.card .card-desc {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}
.card .card-icon {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 14px;
}

/* === Code blocks === */
pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px 18px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    margin: 16px 0;
    position: relative;
}
pre .cmt { color: var(--code-comment); font-style: italic; }
pre .kwd { color: var(--code-key); }
pre .str { color: var(--code-string); }
pre .num { color: var(--code-number); }
pre .copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--code-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    opacity: 0;
    transition: opacity 0.15s;
}
pre:hover .copy-btn { opacity: 1; }
pre .copy-btn:hover { background: rgba(255,255,255,0.15); }

code {
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
    font-size: 0.88em;
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
}
pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }

/* === Method badges (Postman style) === */
.method {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-family: "SF Mono", Monaco, monospace;
    text-transform: uppercase;
    min-width: 50px;
    text-align: center;
    vertical-align: middle;
}
.method.get { background: var(--method-get); }
.method.post { background: var(--method-post); }
.method.put { background: var(--method-put); }
.method.patch { background: var(--method-patch); }
.method.delete { background: var(--method-delete); }

/* Endpoint header */
.endpoint {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.endpoint .path { font-weight: 500; }

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}
th, td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}
th {
    background: var(--bg-soft);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
td code { font-size: 12px; }
.param-required {
    display: inline-block;
    background: #fde7e6;
    color: #cf222e;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}
.param-type {
    color: var(--text-mute);
    font-size: 12px;
    font-family: "SF Mono", Monaco, monospace;
}

/* === Callouts === */
.callout {
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    padding: 14px 18px;
    border-radius: 0 6px 6px 0;
    margin: 18px 0;
    font-size: 14px;
}
.callout.info {
    border-left-color: #0969da;
    background: #ddf4ff;
    color: #0a4b7a;
}
.callout.warn {
    border-left-color: #bf8700;
    background: #fff8c5;
    color: #6a4d00;
}
.callout.success {
    border-left-color: #1a7f37;
    background: #dafbe1;
    color: #0f5132;
}
.callout strong { font-weight: 600; }

/* === Lists === */
ul, ol { padding-left: 24px; margin: 12px 0; }
li { margin-bottom: 6px; }
li::marker { color: var(--text-mute); }

/* === Phase / week blocks === */
.phase {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    background: var(--bg);
}
.phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.phase-number {
    background: var(--accent);
    color: white;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.phase-title {
    font-weight: 600;
    font-size: 16px;
}
.phase-meta {
    color: var(--text-mute);
    font-size: 13px;
    margin-left: auto;
}

/* === Steps === */
.steps { counter-reset: step; padding: 0; list-style: none; margin: 24px 0; }
.steps > li {
    counter-increment: step;
    padding-left: 56px;
    position: relative;
    margin-bottom: 32px;
}
.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.steps > li > h3:first-child {
    margin-top: 4px;
    margin-bottom: 8px;
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin: 18px 0 0;
}
.tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
}
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === Footer === */
.page-footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-mute);
}
.page-footer a { color: var(--text-soft); }

/* === Tags === */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 500;
    margin-right: 4px;
}
.tag.ok { background: #dafbe1; color: #0f5132; }
.tag.warn { background: #fff8c5; color: #6a4d00; }

/* === Hr === */
hr { border: 0; border-top: 1px solid var(--border-soft); margin: 32px 0; }

/* === Responsive (simple) === */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .content { margin-left: 0; padding: 32px 24px 80px; }
}
