/* ============================================
   Vouch Protocol — Documentation Styles
   Consistent with main website brand
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #09090b;
    --bg-secondary: #111114;
    --bg-card: #16161a;
    --bg-card-hover: #1c1c21;
    --border: #27272a;
    --border-accent: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #14F195;
    --accent-light: #3DFFA8;
    --accent-glow: rgba(20, 241, 149, 0.15);
    --green: #14F195;
    --green-light: #3DFFA8;
    --blue: #38BDF8;
    --amber: #f59e0b;
    --purple: #9945FF;
    --coral: #FB7185;
    --gradient-1: linear-gradient(135deg, #14F195 0%, #09C275 100%);
    --gradient-2: linear-gradient(135deg, #3DFFA8 0%, #14F195 50%, #09C275 100%);
    --radius: 12px;
    --radius-lg: 20px;
    --sidebar-width: 260px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* -- FOCUS STATES -- */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* -- NAV -- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 24px;
    background: #09090b;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--gradient-1);
    color: #0E0E1A !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: opacity 0.2s;
}

.nav-cta:hover {
    opacity: 0.9;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* -- LAYOUT -- */
.docs-layout {
    display: flex;
    margin-top: 72px;
    min-height: calc(100vh - 72px);
}

/* -- SIDEBAR -- */
.sidebar {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 32px 0 48px;
    z-index: 50;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.sidebar-group {
    margin-bottom: 28px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 24px;
    margin-bottom: 8px;
}

.sidebar-group ul {
    list-style: none;
}

.sidebar-group li a {
    display: block;
    padding: 7px 24px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, border-left-color 0.2s;
    border-left: 2px solid transparent;
}

.sidebar-group li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-group li a.active {
    color: var(--accent-light);
    border-left-color: var(--accent);
    background: var(--accent-glow);
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 60;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* -- MAIN CONTENT -- */
.docs-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    max-width: 900px;
    padding: 48px 56px 120px;
}

/* -- TYPOGRAPHY -- */
.docs-content [id] {
    scroll-margin-top: 96px;
}

.docs-content h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.docs-content h1 .gradient-text {
    background: linear-gradient(135deg, #FFFFFF 0%, #14F195 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-content h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 64px;
    margin-bottom: 20px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    scroll-margin-top: 96px;
}

.docs-content h2:first-of-type {
    border-top: none;
    margin-top: 48px;
    padding-top: 0;
}

.docs-content h3 {
    font-size: 19px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 14px;
    scroll-margin-top: 96px;
}

.docs-content h4 {
    font-size: 15px;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.docs-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

.docs-content > p:first-of-type {
    font-size: 17px;
    line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.docs-content li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 4px;
}

.docs-content a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s;
}

.docs-content a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.docs-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

.docs-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* -- INLINE CODE -- */
code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: rgba(20, 241, 149, 0.08);
    border: 1px solid rgba(20, 241, 149, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-light);
}

/* -- CODE BLOCKS -- */
.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border-left: 3px solid rgba(20, 241, 149, 0.4);
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 20px;
}

.code-block:hover {
    border-left-color: rgba(20, 241, 149, 0.7);
    box-shadow: 0 8px 40px rgba(20, 241, 149, 0.06);
}

.code-block.blue-accent {
    border-left-color: rgba(56, 189, 248, 0.4);
}

.code-block.blue-accent:hover {
    border-left-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 8px 40px rgba(56, 189, 248, 0.06);
}

.code-block.purple-accent {
    border-left-color: rgba(153, 69, 255, 0.4);
}

.code-block.purple-accent:hover {
    border-left-color: rgba(153, 69, 255, 0.7);
    box-shadow: 0 8px 40px rgba(153, 69, 255, 0.06);
}

.code-block.amber-accent {
    border-left-color: rgba(245, 158, 11, 0.4);
}

.code-block.amber-accent:hover {
    border-left-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.06);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.code-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.code-lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-rust { background: #dea584; }
.dot-ts { background: #3178c6; }
.dot-json { background: #f59e0b; }
.dot-bash { background: #4EAA25; }
.dot-http { background: #FB7185; }

.code-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: var(--accent-glow);
    border: 1px solid rgba(20, 241, 149, 0.2);
    border-radius: 100px;
    color: var(--accent-light);
    font-weight: 500;
}

.code-tag.blue {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--blue);
}

.code-tag.purple {
    background: rgba(153, 69, 255, 0.1);
    border-color: rgba(153, 69, 255, 0.2);
    color: var(--purple);
}

.code-body {
    padding: 16px 20px;
    overflow-x: auto;
}

.code-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.code-body .kw { color: #14F195; }
.code-body .fn { color: #82aaff; }
.code-body .str { color: #c3e88d; }
.code-body .cm { color: #546e7a; }
.code-body .ty { color: #ffcb6b; }
.code-body .mc { color: #f78c6c; }
.code-body .op { color: #89ddff; }
.code-body .num { color: #f78c6c; }

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: rgba(255, 255, 255, 0.03);
}

.copy-btn.copied {
    color: var(--accent);
    border-color: rgba(20, 241, 149, 0.3);
}

/* -- INSTRUCTION CARD -- */
.instruction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}

.instruction-card:hover {
    border-color: var(--border-accent);
}

.instruction-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-name .badge {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.5px;
}

.badge-cpi {
    background: rgba(56, 189, 248, 0.12);
    color: var(--blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.instruction-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.instruction-params {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-params li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 14px;
    position: relative;
    margin-bottom: 2px;
}

.instruction-params li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.instruction-params code {
    font-size: 0.85em;
}

/* -- METHOD TABLE -- */
.method-group {
    margin-bottom: 24px;
}

.method-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.method-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

.method-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(39, 39, 42, 0.5);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.method-list li:last-child {
    border-bottom: none;
}

.method-list code {
    font-size: 0.85em;
}

/* -- ENDPOINT CARD -- */
.endpoint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

.endpoint-card:hover {
    border-color: var(--border-accent);
}

.endpoint-method {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.http-method {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.http-get {
    background: rgba(20, 241, 149, 0.12);
    color: var(--green);
    border: 1px solid rgba(20, 241, 149, 0.2);
}

.http-post {
    background: rgba(56, 189, 248, 0.12);
    color: var(--blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.http-patch {
    background: rgba(245, 158, 11, 0.12);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.http-delete {
    background: rgba(251, 113, 133, 0.12);
    color: var(--coral);
    border: 1px solid rgba(251, 113, 133, 0.2);
}

.endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-primary);
}

.endpoint-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.endpoint-params {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.endpoint-params code {
    font-size: 0.8em;
}

/* -- TYPE CARDS -- */
.type-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.type-card h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--amber);
    margin-top: 0;
    margin-bottom: 8px;
}

.type-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.type-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
}

/* -- ACCOUNT FIELDS -- */
.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.account-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-card h4 .badge {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    background: rgba(153, 69, 255, 0.12);
    color: var(--purple);
    border: 1px solid rgba(153, 69, 255, 0.2);
}

.account-fields {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-fields li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(39, 39, 42, 0.4);
    font-size: 13px;
    margin-bottom: 0;
}

.account-fields li:last-child {
    border-bottom: none;
}

.field-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-light);
    min-width: 180px;
    flex-shrink: 0;
}

.field-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--amber);
    min-width: 120px;
    flex-shrink: 0;
}

.field-desc {
    color: var(--text-muted);
    font-size: 12px;
}

/* -- CONSTANTS TABLE -- */
.constants-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.constants-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.constants-table td {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 16px;
    border-bottom: 1px solid rgba(39, 39, 42, 0.4);
}

.constants-table td:first-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-primary);
}

.constants-table tr:last-child td {
    border-bottom: none;
}

.constants-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

/* -- PARAM TABLE -- */
.param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.param-table th,
.param-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.param-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.param-table td {
  color: var(--text-primary);
}
.param-table code {
  background: var(--bg-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--accent-blue);
}

/* -- INTEGRATION PATHS -- */
.paths-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.path-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.3s, transform 0.2s;
}

.path-card:hover {
    transform: translateY(-2px);
}

.path-card.accent-green:hover { border-color: rgba(20, 241, 149, 0.3); }
.path-card.accent-blue:hover { border-color: rgba(56, 189, 248, 0.3); }

.path-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.path-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
}

.path-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

/* -- MCP TOOL CARD -- */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.tool-card:hover {
    border-color: var(--border-accent);
}

.tool-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 4px;
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* -- SECTION BADGE -- */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.badge-green-outline {
    color: var(--green);
    background: rgba(20, 241, 149, 0.08);
    border: 1px solid rgba(20, 241, 149, 0.2);
}

.badge-blue-outline {
    color: var(--blue);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.badge-purple-outline {
    color: var(--purple);
    background: rgba(153, 69, 255, 0.08);
    border: 1px solid rgba(153, 69, 255, 0.2);
}

.badge-amber-outline {
    color: var(--amber);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-coral-outline {
    color: var(--coral);
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.2);
}

/* -- NOTE CALLOUT -- */
.callout {
    background: rgba(20, 241, 149, 0.04);
    border: 1px solid rgba(20, 241, 149, 0.15);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.callout p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.callout strong {
    color: var(--accent-light);
}

.callout.callout-blue {
    background: rgba(56, 189, 248, 0.04);
    border-color: rgba(56, 189, 248, 0.15);
}

.callout.callout-blue strong {
    color: var(--blue);
}

.callout.callout-amber {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.15);
}

.callout.callout-amber strong {
    color: var(--amber);
}

/* -- FOOTER -- */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    margin-left: var(--sidebar-width);
}

.footer-inner {
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

.solana-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
}

/* -- SCROLL TO TOP -- */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s, color 0.2s;
    z-index: 50;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

/* -- MOBILE TAP BEHAVIOUR -- */
a, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* -- SIDEBAR BACKDROP (mobile) -- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.visible {
    display: block;
    opacity: 1;
}

/* -- RESPONSIVE -- */
@media (max-width: 1024px) {
    .docs-content {
        padding: 40px 36px 100px;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: #09090b;
        padding: 40px 24px;
        gap: 24px;
        align-items: flex-start;
        z-index: 101;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 18px;
    }

    .logo-mark {
        height: 50px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    /* Larger touch targets for sidebar links */
    .sidebar-group li a {
        padding: 12px 24px;
        font-size: 14px;
    }

    .docs-content {
        margin-left: 0;
        padding: 32px 24px 100px;
    }

    footer {
        margin-left: 0;
    }

    .paths-grid {
        grid-template-columns: 1fr;
    }

    .account-fields li {
        flex-direction: column;
        gap: 4px;
    }

    .field-name {
        min-width: auto;
    }

    .field-type {
        min-width: auto;
    }

    /* Tables scrollable at tablet too */
    .constants-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent long monospace from overflowing */
    .endpoint-path,
    .instruction-name,
    .tool-name {
        word-break: break-all;
    }

    .code-body pre {
        font-size: 12px;
    }

    .code-body {
        padding: 14px 16px;
    }

    /* Move scroll-top out of sidebar-toggle's way */
    .scroll-top {
        bottom: 80px;
        right: 20px;
    }

    .sidebar-toggle {
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 600px) {
    .docs-content {
        padding: 24px 16px 80px;
    }

    .docs-content h1 {
        font-size: 28px;
    }

    .docs-content h2 {
        font-size: 22px;
        margin-top: 48px;
    }

    .docs-content h3 {
        font-size: 17px;
        margin-top: 32px;
    }

    .docs-content > p:first-of-type {
        font-size: 15px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
    }

    footer {
        padding: 32px 16px;
    }

    .constants-table td,
    .constants-table th {
        padding: 8px 10px;
        font-size: 12px;
    }

    .constants-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .code-body pre {
        font-size: 11.5px;
        line-height: 1.6;
    }

    .code-body {
        padding: 12px 14px;
    }

    .code-header {
        padding: 8px 12px;
    }

    .code-lang {
        font-size: 11px;
    }

    /* Stack endpoint method + path vertically */
    .endpoint-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .endpoint-card {
        padding: 14px 16px;
    }

    .instruction-card {
        padding: 16px 18px;
    }

    .account-card {
        padding: 16px 18px;
    }

    .path-card {
        padding: 20px;
    }

    .callout {
        padding: 14px 16px;
    }

    .callout p {
        font-size: 13px;
    }

    .section-badge {
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    .docs-content {
        padding: 20px 12px 72px;
    }

    .docs-content h1 {
        font-size: 24px;
    }

    .docs-content h2 {
        font-size: 20px;
    }

    .nav-inner {
        padding: 0 16px;
        height: 64px;
    }

    .logo-mark {
        height: 42px;
    }

    .code-body pre {
        font-size: 11px;
    }

    .sidebar-group li a {
        padding: 12px 20px;
    }
}

/* -- REDUCED MOTION -- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
