/* ===== Base ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}
h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.3em;
}
h2 {
    font-size: 1.5em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
h3 {
    font-size: 1.2em;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}
p {
    margin-bottom: 1em;
}
ul, ol {
    margin-bottom: 1em;
    padding-left: 2em;
}
li {
    margin-bottom: 0.5em;
}
a {
    color: #0066cc;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
strong {
    font-weight: 600;
}
hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

/* ===== Inline code ===== */
code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

/* ===== Code blocks ===== */
pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2em 1.4em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.2em 0;
    line-height: 1.5;
}
pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.88em;
    color: inherit;
}
pre .comment { color: #6a9955; }
pre .keyword { color: #569cd6; }
pre .string  { color: #ce9178; }
pre .number  { color: #b5cea8; }

/* Endpoint / URL code blocks — light background for short config-style blocks */
pre.endpoint {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}
pre.endpoint code {
    color: #333;
}

/* ===== Tables ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.95em;
}
th {
    text-align: left;
    padding: 0.6em 0.8em;
    background-color: #f5f5f5;
    border-bottom: 2px solid #ddd;
    font-weight: 600;
}
td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
tr:last-child td {
    border-bottom: none;
}

/* ===== Callout boxes ===== */
.callout {
    padding: 1em 1.2em;
    border-left: 4px solid #0066cc;
    border-radius: 3px;
    margin: 1.5em 0;
    background-color: #e7f5ff;
}
.callout h2,
.callout h3 {
    margin-top: 0;
}
.callout-warn {
    border-left-color: #e8a100;
    background-color: #fff8e1;
}
.callout-success {
    border-left-color: #2ea043;
    background-color: #e6f9ed;
}

/* Reuse for the fast-start block on the index page */
.fast-start {
    padding: 1em 1.2em;
    border-left: 4px solid #0066cc;
    border-radius: 3px;
    margin: 1.5em 0;
    background-color: #e7f5ff;
}
.fast-start h2 {
    margin-top: 0;
}

/* ===== Diagram (ASCII art) ===== */
pre.diagram {
    background-color: #f9f9f9;
    color: #333;
    border: 1px solid #e0e0e0;
    font-size: 0.82em;
    line-height: 1.4;
}
pre.diagram code {
    color: #333;
}

/* ===== Note / small text ===== */
.note {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

/* ===== Page header / nav ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5em;
    font-size: 0.9em;
    color: #666;
}
.breadcrumb {
    font-size: inherit;
    color: inherit;
}
.breadcrumb a {
    color: #666;
}
.breadcrumb a:hover {
    color: #0066cc;
}
.breadcrumb .current {
    color: #333;
    font-weight: 600;
}

/* ===== Copy page dropdown ===== */
.page-actions {
    position: relative;
    flex-shrink: 0;
    margin-left: 1.5em;
}
.page-actions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.35em 0.75em;
    font-size: 0.85rem;
    font-family: inherit;
    color: #555;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.page-actions-btn:hover {
    border-color: #999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.page-actions-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.page-actions-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 300px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: hidden;
}
.page-actions-dropdown.open {
    display: block;
}
.page-actions-dropdown button,
.page-actions-dropdown a {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    width: 100%;
    padding: 0.6em 0.8em;
    font-size: 0.85rem;
    font-family: inherit;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
}
.page-actions-dropdown button:hover,
.page-actions-dropdown a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}
.page-actions-dropdown svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #666;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 0.1em;
}
.page-actions-dropdown .action-label {
    font-weight: 500;
}
.page-actions-dropdown .action-desc {
    font-size: 0.8rem;
    color: #888;
}
.page-actions-dropdown hr {
    margin: 0;
    border-top: 1px solid #eee;
}
.page-actions .copied-toast {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    padding: 0.4em 0.8em;
    font-size: 0.8rem;
    color: #fff;
    background: #2ea043;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.page-actions .copied-toast.show {
    opacity: 1;
}

/* ===== Doc footer ===== */
.doc-footer {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
}
.doc-footer a {
    color: #0066cc;
}
