/* ===== Reading Progress Bar ===== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cw-blue), var(--cw-red), var(--cw-amber));
  z-index: 1001;
  width: 0%;
  transition: width 0.1s ease;
  box-shadow: 0 0 8px rgba(8, 51, 171, 0.4);
}

/* ===== CoreWave360 Brand Variables ===== */
:root {
  --cw-blue: #0833ab;
  --cw-blue-dark: #06288a;
  --cw-blue-light: #e8edf9;
  --cw-red: #fd1d1d;
  --cw-amber: #fcb045;
  --cw-black: #000000;
  --cw-white: #ffffff;
  --cw-gray-50: #f8fafc;
  --cw-gray-100: #f1f5f9;
  --cw-gray-200: #e2e8f0;
  --cw-gray-300: #cbd5e1;
  --cw-gray-400: #94a3b8;
  --cw-gray-500: #64748b;
  --cw-gray-600: #475569;
  --cw-gray-700: #334155;
  --cw-gray-800: #1e293b;
  --cw-gray-900: #0f172a;
  --cw-gradient: linear-gradient(135deg, #0833ab 0%, #fd1d1d 50%, #fcb045 100%);
  --cw-sidebar-width: 300px;
  --cw-top-height: 64px;
  --cw-font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cw-font-mono: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', monospace;
  --cw-font-heading: 'Nunito', sans-serif;
  --cw-radius: 8px;
  --cw-transition: 0.2s ease;
}

/* ===== Dark Mode Overrides ===== */
[data-theme='dark'] {
  --cw-blue: #4b7fff;
  --cw-blue-dark: #3a6aee;
  --cw-blue-light: #1a2744;
  --cw-red: #ff4d4d;
  --cw-amber: #fbbf24;
  --cw-gray-50: #0f1117;
  --cw-gray-100: #1a1d27;
  --cw-gray-200: #2a2d3a;
  --cw-gray-300: #3d4050;
  --cw-gray-400: #6b7085;
  --cw-gray-500: #8b90a5;
  --cw-gray-600: #a5aabf;
  --cw-gray-700: #c4c8db;
  --cw-gray-800: #e1e4f0;
  --cw-gray-900: #f0f2ff;
}
[data-theme='dark'] body {
  background: #0f1117;
  color: var(--cw-gray-800);
}
[data-theme='dark'] .top-nav {
  background: rgba(15, 17, 23, 0.88);
  border-bottom-color: var(--cw-gray-200);
}
[data-theme='dark'] .top-nav .version-badge {
  background: linear-gradient(135deg, #1a2744, #0f1117);
  border-color: rgba(75, 127, 255, 0.2);
}
[data-theme='dark'] .sidebar {
  background: #13161e;
  border-right-color: var(--cw-gray-200);
}
[data-theme='dark'] .sidebar-link {
  color: var(--cw-gray-600);
}
[data-theme='dark'] .sidebar-link:hover,
[data-theme='dark'] .sidebar-link.active {
  color: var(--cw-blue);
  background: var(--cw-blue-light);
}
[data-theme='dark'] .main-content h1,
[data-theme='dark'] .main-content h2,
[data-theme='dark'] .main-content h3,
[data-theme='dark'] .main-content h4 {
  color: var(--cw-gray-900);
}
[data-theme='dark'] .main-content p,
[data-theme='dark'] .main-content li {
  color: var(--cw-gray-600);
}
[data-theme='dark'] .main-content h2 {
  border-bottom-color: var(--cw-gray-200);
}
[data-theme='dark'] .doc-table-wrapper {
  border-color: var(--cw-gray-200);
}
[data-theme='dark'] .doc-table td {
  background: #13161e;
  color: var(--cw-gray-600);
  border-bottom-color: var(--cw-gray-200);
}
[data-theme='dark'] .doc-table tbody tr:nth-child(even) td {
  background: #1a1d27;
}
[data-theme='dark'] .doc-table tbody tr:hover td {
  background: #1a2744;
}
[data-theme='dark'] .inline-code {
  background: linear-gradient(135deg, #1a1d27, #1a1d27);
  color: #f87171;
  border-color: var(--cw-gray-200);
}
[data-theme='dark'] .callout-info {
  background: linear-gradient(135deg, #0f1a33, #13161e);
}
[data-theme='dark'] .callout-warning {
  background: linear-gradient(135deg, #1a180f, #13161e);
}
[data-theme='dark'] .callout-danger {
  background: linear-gradient(135deg, #1a0f0f, #13161e);
}
[data-theme='dark'] .callout-success {
  background: linear-gradient(135deg, #0f1a14, #13161e);
}
[data-theme='dark'] .prop-item {
  background: #13161e;
  border-color: var(--cw-gray-200);
}
[data-theme='dark'] .prop-item .prop-required {
  background: #1a0f0f;
}
[data-theme='dark'] .prop-item .prop-optional {
  background: #1a1d27;
}
[data-theme='dark'] .back-to-top {
  background: #1a1d27;
  border-color: var(--cw-gray-200);
  color: var(--cw-gray-500);
}
[data-theme='dark'] .back-to-top:hover {
  background: linear-gradient(135deg, var(--cw-blue), var(--cw-blue-dark));
  color: white;
}
[data-theme='dark'] #reading-progress {
  box-shadow: 0 0 8px rgba(75, 127, 255, 0.4);
}
[data-theme='dark'] .code-block {
  background: #0b1120;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme='dark'] .code-block .code-lang {
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}
[data-theme='dark'] .code-block .keyword {
  color: #c084fc;
}
[data-theme='dark'] .code-block .string {
  color: #34d399;
}
[data-theme='dark'] .code-block .number {
  color: #fbbf24;
}
[data-theme='dark'] .code-block .property {
  color: #60a5fa;
}
[data-theme='dark'] .code-block .punctuation {
  color: #94a3b8;
}
[data-theme='dark'] .code-block .function {
  color: #f472b6;
}
[data-theme='dark'] .code-block .tag {
  color: #f87171;
}
[data-theme='dark'] .code-block .attr {
  color: #fbbf24;
}
[data-theme='dark'] .code-block .value {
  color: #34d399;
}
[data-theme='dark'] .copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}
[data-theme='dark'] .copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}
[data-theme='dark'] .copy-btn.copied {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: var(--cw-font-body);
  color: var(--cw-gray-800);
  background: var(--cw-gray-50);
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: var(--cw-blue);
  text-decoration: none;
  transition: color var(--cw-transition);
}
a:hover {
  color: var(--cw-red);
}
img {
  max-width: 100%;
  height: auto;
}
code,
pre {
  font-family: var(--cw-font-mono);
  font-size: 0.875em;
}
::selection {
  background: var(--cw-blue);
  color: white;
}

/* Fix native anchor navigation scrolling behind fixed top nav */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== Top Navigation ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--cw-top-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cw-gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  gap: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.02);
}
.top-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--cw-gray-900);
  white-space: nowrap;
}
.top-nav .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: white;
  background: var(--cw-gradient);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(8, 51, 171, 0.25);
}
.top-nav .brand-sub {
  font-size: 0.75rem;
  color: var(--cw-gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.top-nav .nav-spacer {
  flex: 1;
}
.top-nav .version-badge {
  font-size: 0.7rem;
  background: linear-gradient(135deg, var(--cw-blue-light), #fff);
  color: var(--cw-blue);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(8, 51, 171, 0.15);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--cw-gray-600);
  cursor: pointer;
  padding: 4px;
  transition: color var(--cw-transition);
}
.mobile-menu-btn:hover {
  color: var(--cw-blue);
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--cw-gray-200);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  transition: all var(--cw-transition);
  color: var(--cw-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover {
  background: var(--cw-blue-light);
  border-color: var(--cw-blue);
  color: var(--cw-blue);
}
[data-theme='dark'] .theme-toggle {
  color: var(--cw-amber);
  border-color: var(--cw-gray-300);
  background: rgba(251, 191, 36, 0.08);
}
[data-theme='dark'] .theme-toggle:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--cw-amber);
  color: var(--cw-amber);
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: var(--cw-top-height);
  left: 0;
  bottom: 0;
  width: var(--cw-sidebar-width);
  background: var(--cw-white);
  border-right: 1px solid var(--cw-gray-200);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 900;
  padding: 16px 0;
  transition: transform 0.3s ease;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03);
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--cw-gray-300);
  border-radius: 4px;
}
.sidebar-section {
  margin-bottom: 4px;
}
.sidebar-section-title {
  padding: 8px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cw-gray-400);
  pointer-events: none;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px 7px 20px;
  font-size: 0.875rem;
  color: var(--cw-gray-600);
  border-left: 3px solid transparent;
  transition: all var(--cw-transition);
  text-decoration: none;
}
.sidebar-link:hover {
  color: var(--cw-blue);
  background: var(--cw-blue-light);
  border-left-color: var(--cw-blue);
}
.sidebar-link.active {
  color: var(--cw-blue);
  background: var(--cw-blue-light);
  border-left-color: var(--cw-blue);
  font-weight: 600;
  box-shadow: inset 0 1px 3px rgba(8, 51, 171, 0.06);
}
.sidebar-link .link-icon {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  flex-shrink: 0;
}
.sidebar-link .link-arrow {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.4;
  transition: transform var(--cw-transition);
}
.sidebar-link:hover .link-arrow {
  transform: translateX(3px);
  opacity: 0.8;
}

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--cw-sidebar-width);
  margin-top: var(--cw-top-height);
  padding: 40px 56px 80px;
  max-width: 960px;
  min-height: calc(100vh - var(--cw-top-height));
}
.main-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--cw-gray-900);
  margin-bottom: 8px;
  line-height: 1.2;
}
.main-content h1 .cw-gradient-text {
  background: var(--cw-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.main-content .lead {
  font-size: 1.125rem;
  color: var(--cw-gray-500);
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 680px;
}
.main-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cw-gray-900);
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cw-gray-200);
}
.main-content h2 .section-anchor {
  color: var(--cw-blue);
  opacity: 0.3;
  margin-left: 6px;
  font-weight: 400;
}
.main-content h2:hover .section-anchor {
  opacity: 0.8;
}
.main-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cw-gray-800);
  margin-top: 32px;
  margin-bottom: 8px;
}
.main-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cw-gray-700);
  margin-top: 24px;
  margin-bottom: 6px;
}
.main-content p,
.main-content li {
  color: var(--cw-gray-600);
  line-height: 1.75;
}
.main-content p {
  margin-bottom: 16px;
}
.main-content ul,
.main-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
.main-content li {
  margin-bottom: 4px;
}

/* ===== Code Blocks ===== */
.code-block {
  background: #f8faff;
  color: #1e293b;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 16px 0 24px;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.65;
  position: relative;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cw-blue), var(--cw-red), var(--cw-amber));
  border-radius: 10px 10px 0 0;
}
.code-block .code-lang {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.code-block .comment {
  color: #6b7280;
  font-style: italic;
}
.code-block .keyword {
  color: #7c3aed;
}
.code-block .string {
  color: #059669;
}
.code-block .number {
  color: #d97706;
}
.code-block .property {
  color: #2563eb;
}
.code-block .punctuation {
  color: #64748b;
}
.code-block .function {
  color: #db2777;
}
.code-block .tag {
  color: #dc2626;
}
.code-block .attr {
  color: #d97706;
}
.code-block .value {
  color: #059669;
}
.code-block pre {
  margin: 0;
}

/* ===== Copy Button ===== */
.copy-btn {
  position: absolute;
  top: 8px;
  right: 80px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-family: var(--cw-font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.copy-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.7);
  border-color: rgba(0, 0, 0, 0.15);
}
.copy-btn.copied {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

.inline-code {
  background: linear-gradient(135deg, var(--cw-gray-100), #f1f5f9);
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8125em;
  font-weight: 600;
  border: 1px solid var(--cw-gray-200);
}

/* ===== Callouts / Alerts ===== */
.callout {
  border-radius: 10px;
  padding: 18px 22px;
  margin: 16px 0 24px;
  border-left: 4px solid;
  font-size: 0.9375rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.callout-info {
  background: linear-gradient(135deg, #eff6ff, #f8faff);
  border-color: var(--cw-blue);
}
.callout-info strong {
  color: var(--cw-blue);
}
.callout-info::before {
  content: 'ℹ️ ';
}
.callout-warning {
  background: linear-gradient(135deg, #fffbeb, #fffdf5);
  border-color: var(--cw-amber);
}
.callout-warning strong {
  color: #b45309;
}
.callout-warning::before {
  content: '⚠️ ';
}
.callout-danger {
  background: linear-gradient(135deg, #fef2f2, #fff8f8);
  border-color: var(--cw-red);
}
.callout-danger strong {
  color: #b91c1c;
}
.callout-danger::before {
  content: '🚫 ';
}
.callout-success {
  background: linear-gradient(135deg, #f0fdf4, #f8fff9);
  border-color: #22c55e;
}
.callout-success strong {
  color: #15803d;
}
.callout-success::before {
  content: '✅ ';
}
.callout code {
  background: rgba(0, 0, 0, 0.06);
  border: none;
}

/* ===== Tables ===== */
.doc-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 24px;
  border-radius: 10px;
  border: 1px solid var(--cw-gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.doc-table-wrapper .doc-table {
  margin: 0;
  border: none;
  box-shadow: none;
}
.doc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.doc-table thead {
  background: linear-gradient(135deg, var(--cw-blue), var(--cw-blue-dark));
}
.doc-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: none;
}
.doc-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--cw-gray-200);
  color: var(--cw-gray-600);
  vertical-align: top;
  background: var(--cw-white);
}
.doc-table tr:last-child td {
  border-bottom: none;
}
.doc-table tbody tr:nth-child(even) td {
  background: var(--cw-gray-50);
}
.doc-table tbody tr:hover td {
  background: #e8edf9;
}
.doc-table td code {
  font-size: 0.8rem;
}

/* ===== Properties List ===== */
.prop-list {
  margin: 12px 0 20px;
}
.prop-item {
  padding: 12px 16px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--cw-white);
  transition: all var(--cw-transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.prop-item:hover {
  border-color: var(--cw-blue);
  box-shadow: 0 2px 12px rgba(8, 51, 171, 0.1);
}
.prop-item .prop-name {
  font-family: var(--cw-font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cw-blue);
}
.prop-item .prop-type {
  font-size: 0.75rem;
  color: var(--cw-gray-400);
  margin-left: 8px;
}
.prop-item .prop-required {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cw-red);
  margin-left: 8px;
  background: #fef2f2;
  padding: 1px 6px;
  border-radius: 3px;
}
.prop-item .prop-optional {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cw-gray-400);
  margin-left: 8px;
  background: var(--cw-gray-100);
  padding: 1px 6px;
  border-radius: 3px;
}
.prop-item .prop-desc {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--cw-gray-500);
}

.v2-section {
  display: block;
}
.v2-badge {
  font-size: 0.65rem;
  background: #f0fdf4;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
  border: 1px solid rgba(21, 128, 61, 0.2);
}
.migration-callout {
  margin: 32px 0;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cw-white);
  border: 1px solid var(--cw-gray-200);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cw-gray-500);
  font-size: 1.2rem;
  transition: all 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 800;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: linear-gradient(135deg, var(--cw-blue), var(--cw-blue-dark));
  color: white;
  border-color: var(--cw-blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(8, 51, 171, 0.25);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .main-content {
    padding: 32px 32px 60px;
  }
}
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 24px 20px 60px;
  }
  .main-content h1 {
    font-size: 1.75rem;
  }
  .main-content h2 {
    font-size: 1.25rem;
  }
  .top-nav {
    padding: 0 16px;
  }
  .top-nav .version-badge {
    display: none;
  }
  .doc-table {
    font-size: 0.8rem;
  }
  .doc-table th,
  .doc-table td {
    padding: 8px 10px;
  }
  .code-block {
    padding: 14px 16px;
    font-size: 0.75rem;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 480px) {
  .main-content {
    padding: 16px 14px 40px;
  }
  .top-nav .brand-sub {
    display: none;
  }
}

/* CoreWave360 website documentation shell */
@font-face {
  font-family: Proxima;
  src: url('/assets/ProximaNovaWide-Regular.ttf');
  font-display: swap;
}
@font-face {
  font-family: Proxima;
  src: url('/assets/ProximaNovaWide-Bold.ttf');
  font-weight: 700 900;
  font-display: swap;
}
:root {
  --cw-font-body: Proxima, Arial, sans-serif;
  --cw-font-heading: Proxima, Arial, sans-serif;
  --cw-font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --cw-top-height: 88px;
  --cw-sidebar-width: 272px;
  --cw-gray-50: #fff;
  --cw-gray-800: #17213b;
  --cw-gray-900: #101d45;
}
body {
  background: var(--cw-gray-50);
  overflow-x: visible;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #fcb045;
  outline-offset: 4px;
}
section[id],
[id] {
  scroll-margin-top: 112px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 1100;
  padding: 12px;
  background: #fff;
  color: #0833ab;
}
.skip-link:focus {
  top: 10px;
}
#reading-progress {
  height: 3px;
}
.top-nav {
  padding: 0 32px;
  gap: 20px;
  box-shadow: none;
  background: var(--cw-white);
}
.top-nav .brand {
  flex-shrink: 0;
}
.brand img {
  width: 184px;
  height: auto;
}
.docs-brand-divider {
  height: 24px;
  width: 1px;
  background: var(--cw-gray-200);
}
.docs-wordmark {
  color: var(--cw-gray-600);
  font-size: 12px;
  white-space: nowrap;
}
.docs-search-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 10px 14px;
  width: 280px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 8px;
  background: var(--cw-gray-100);
  color: var(--cw-gray-500);
  font-size: 11px;
  text-align: left;
}
kbd {
  font: 10px var(--cw-font-body);
  padding: 2px 5px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 4px;
  white-space: nowrap;
}
.docs-search-trigger kbd {
  margin-left: auto;
}
.docs-back-home {
  font-size: 11px;
  white-space: nowrap;
  color: var(--cw-gray-600);
}
.docs-back-home i {
  transform: rotate(45deg);
  margin-left: 8px;
}
.docs-workspace {
  padding: 12px 16px;
  border-radius: 7px;
  background: #0833ab;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}
.docs-workspace:hover {
  background: #06288a;
  color: #fff;
}
.docs-workspace i {
  margin-left: 12px;
}
.theme-toggle {
  padding: 9px;
  font-size: 14px;
}
.sidebar {
  padding: 28px 16px;
  box-shadow: none;
  background: var(--cw-gray-50);
}
.sidebar-intro {
  display: grid;
  gap: 8px;
  padding: 0 12px 24px;
}
.sidebar-kicker {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--cw-gray-500);
}
.sidebar-intro strong {
  font-size: 16px;
  color: var(--cw-gray-900);
}
.sidebar-version {
  width: fit-content;
  padding: 3px 8px;
  background: var(--cw-blue-light);
  color: var(--cw-blue);
  border-radius: 5px;
  font-size: 9px;
}
.sidebar-section {
  margin-bottom: 22px;
}
.sidebar-section-title {
  padding: 6px 12px;
  font-size: 9px;
  color: var(--cw-gray-500);
  letter-spacing: 1px;
}
.sidebar-link {
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  gap: 8px;
}
.sidebar-link:hover,
.sidebar-link.active {
  border: 0;
  box-shadow: none;
}
.sidebar-link .link-icon {
  font-size: 11px;
  width: 16px;
}
.sidebar-support {
  margin: 20px 4px 0;
  padding: 18px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 12px;
}
.sidebar-support > i {
  color: var(--cw-blue);
  margin-bottom: 10px;
}
.sidebar-support strong {
  display: block;
  font-size: 11px;
  line-height: 1.6;
}
.sidebar-support p,
.sidebar-support a {
  font-size: 10px;
  margin: 8px 0 0;
}
.sidebar-support p {
  color: var(--cw-gray-500);
}
.sidebar-support a {
  display: flex;
  justify-content: space-between;
}
.main-content {
  margin-right: 228px;
  padding: 36px clamp(28px, 4vw, 72px) 0;
  max-width: none;
  min-width: 0;
}
.main-content > .v2-section {
  max-width: 1050px;
  margin-inline: auto;
}
.main-content section {
  min-width: 0;
}
.docs-breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: var(--cw-gray-500);
  margin-bottom: 48px;
}
.docs-breadcrumb a {
  color: var(--cw-gray-500);
}
.main-content .docs-eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--cw-blue);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.docs-eyebrow span {
  width: 7px;
  height: 7px;
  background: #fd1d1d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fd1d1d12;
}
.main-content h1 {
  font-size: clamp(36px, 3.8vw, 60px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 18px;
}
.main-content h1 .cw-gradient-text {
  color: var(--cw-blue);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.main-content .docs-hero-subtitle {
  color: var(--cw-gray-900);
  font-size: 18px;
  margin-bottom: 16px;
}
.main-content .lead {
  font-size: 13px;
  line-height: 1.9;
  max-width: 750px;
}
.docs-quicklinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0 36px;
}
.docs-quicklinks > a {
  border: 1px solid var(--cw-gray-200);
  border-radius: 12px;
  padding: 22px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.docs-quicklinks > a:hover {
  border-color: var(--cw-blue);
  box-shadow: 0 8px 24px #0833ab0c;
}
.docs-quicklinks > a > i {
  display: block;
  margin-bottom: 18px;
  color: var(--cw-blue);
}
.docs-quicklinks strong {
  display: block;
  color: var(--cw-gray-900);
  font-size: 13px;
}
.docs-quicklinks span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--cw-gray-500);
}
.main-content h2 {
  border-bottom: 1px solid var(--cw-gray-200);
  padding-bottom: 16px;
  margin-top: 64px;
  font-size: 25px;
  letter-spacing: -0.6px;
}
.main-content h3 {
  font-size: 18px;
}
.main-content p,
.main-content li {
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.main-content h4 {
  font-size: 14px;
}
.main-content code {
  overflow-wrap: anywhere;
}
.main-content .code-block {
  border-radius: 10px;
  background: #111d39;
  color: #e2e8f0;
  box-shadow: none;
  padding: 48px 22px 22px;
  max-width: 100%;
}
.code-block::before {
  background: #243658;
  height: 1px;
}
.code-block .code-lang {
  left: 16px;
  right: auto;
  color: #bdc9df;
  background: #ffffff0a;
  border: 0;
}
.code-block .copy-btn {
  right: 12px;
  color: #d3dff3;
  background: #ffffff10;
  border-color: #ffffff15;
  font-size: 9px;
}
.code-block pre {
  white-space: pre;
  overflow-wrap: normal;
  font-size: 12px;
  line-height: 1.8;
}
.doc-table-wrapper {
  overflow-x: auto;
  max-width: 100%;
  margin-block: 20px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 10px;
}
.doc-table {
  margin: 0;
  font-size: 12px;
}
.doc-table th {
  background: var(--cw-gray-100);
  color: var(--cw-gray-800);
}
.callout {
  box-shadow: none;
  font-size: 12px;
  border-radius: 8px;
}
.page-outline {
  position: fixed;
  right: 28px;
  top: 126px;
  width: 180px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}
.page-outline > p {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--cw-gray-500);
  margin-bottom: 18px;
}
.page-outline nav {
  border-left: 1px solid var(--cw-gray-200);
}
.page-outline nav a {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  padding: 6px 0 6px 16px;
  color: var(--cw-gray-500);
}
.page-outline nav a:hover {
  color: var(--cw-blue);
}
.outline-tip {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--cw-gray-200);
  margin-top: 28px;
  padding-top: 24px;
  font-size: 11px;
}
.outline-tip i {
  color: var(--cw-blue);
}
.outline-tip span {
  font-size: 10px;
  color: var(--cw-gray-500);
}
.docs-footer {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 1px solid var(--cw-gray-200);
  padding: 28px 0;
  margin-top: 64px;
  font-size: 10px;
  color: var(--cw-gray-500);
}
.docs-footer > a:first-child {
  font-weight: 700;
  color: var(--cw-gray-900);
}
.docs-search {
  width: min(620px, calc(100% - 32px));
  max-height: 80vh;
  margin: 12vh auto auto;
  padding: 24px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 16px;
  color: var(--cw-gray-800);
  background: var(--cw-white);
  box-shadow: 0 24px 100px #101d4540;
}
.docs-search::backdrop {
  background: #101d4570;
  backdrop-filter: blur(4px);
}
.search-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
.search-top button {
  border: 0;
  background: transparent;
  color: var(--cw-gray-500);
  padding: 8px;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cw-gray-200);
  border-radius: 8px;
  margin: 20px 0 12px;
  padding: 12px;
}
.search-input-wrap i {
  color: var(--cw-blue);
}
.search-input-wrap input {
  min-width: 0;
  width: 100%;
  background: transparent;
  color: inherit;
  border: 0;
  font-size: 13px;
}
#searchStatus {
  color: var(--cw-gray-500);
  font-size: 11px;
}
#searchResults a {
  display: block;
  padding: 12px;
  margin-top: 8px;
  border-radius: 8px;
  background: var(--cw-gray-100);
}
#searchResults strong {
  display: block;
  font-size: 13px;
}
#searchResults span {
  display: block;
  font-size: 11px;
  color: var(--cw-gray-500);
  margin-top: 4px;
}
.search-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 10px;
  color: var(--cw-gray-500);
}
[data-theme='dark'] .top-nav {
  background: #13161e;
}
[data-theme='dark'] .brand img {
  background: #fff;
  padding: 4px;
  border-radius: 4px;
}
@media (max-width: 1200px) {
  .page-outline {
    display: none;
  }
  .main-content {
    margin-right: 0;
  }
  .docs-back-home {
    display: none;
  }
}
@media (max-width: 980px) {
  .docs-wordmark,
  .docs-brand-divider {
    display: none;
  }
  .docs-search-trigger {
    width: 240px;
  }
}
@media (max-width: 768px) {
  :root {
    --cw-top-height: 72px;
  }
  .top-nav {
    padding: 0 20px;
    gap: 12px;
  }
  .brand img {
    width: 148px;
  }
  .docs-workspace {
    display: none;
  }
  .docs-search-trigger {
    width: auto;
    padding: 10px;
    margin-left: auto;
  }
  .docs-search-trigger span,
  .docs-search-trigger kbd {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
    font-size: 18px;
    padding: 6px;
  }
  .sidebar {
    width: 280px;
    background: var(--cw-white);
  }
  .sidebar-backdrop:not([hidden]) {
    position: fixed;
    inset: 72px 0 0;
    background: #101d4560;
    z-index: 850;
  }
  .main-content {
    margin-left: 0;
    padding: 24px 20px 0;
  }
  .docs-breadcrumb {
    margin-bottom: 36px;
    font-size: 9px;
  }
  .main-content h1 {
    font-size: 42px;
  }
  .main-content .docs-eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .docs-quicklinks {
    gap: 10px;
  }
  .docs-quicklinks > a {
    padding: 16px;
  }
  .docs-quicklinks span {
    font-size: 9px;
  }
  .main-content h2 {
    font-size: 23px;
  }
}
@media (max-width: 420px) {
  .docs-quicklinks {
    grid-template-columns: 1fr;
  }
  .main-content h1 {
    font-size: 36px;
  }
  .theme-toggle {
    padding: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
/* Keep long reference snippets inside the reading column. */
.main-content {
  overflow-x: clip;
}
.prop-item {
  overflow-wrap: anywhere;
}
.prop-item .prop-name,
.prop-item .prop-type,
.prop-item .prop-optional,
.prop-item .prop-required {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
}
.main-content p,
.main-content li {
  font-size: 14px;
}
.sidebar-link {
  font-size: 12px;
}
[data-theme='dark'] .sidebar-intro strong {
  color: #e2e8f0;
}
.docs-people-photo {
  display: block;
  width: 100%;
  max-width: 860px;
  height: 260px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 6px;
  margin: 32px 0;
}
@media (max-width: 650px) {
  .docs-people-photo {
    height: 210px;
  }
}

/* Documentation tools remain local; global navigation comes from the shared shell. */
.documentation-page .top-nav {
  position: sticky;
  top: 84px;
  z-index: 910;
}
.documentation-page .sidebar {
  top: calc(84px + var(--cw-top-height));
  z-index: 900;
}
.documentation-page .main-content {
  margin-top: 0;
  padding-top: 36px;
}
.documentation-page .page-outline {
  top: calc(120px + var(--cw-top-height));
}
.documentation-page main section[id] {
  scroll-margin-top: calc(104px + var(--cw-top-height));
}
@media (max-width: 980px) {
  .documentation-page .top-nav {
    top: 80px;
  }
  .documentation-page .sidebar {
    top: calc(80px + var(--cw-top-height));
  }
}
@media (max-width: 768px) {
  .documentation-page .sidebar-backdrop:not([hidden]) {
    inset: 152px 0 0;
  }
  .documentation-page .main-content {
    padding-top: 24px;
  }
}
.documentation-page .top-nav .docs-wordmark {
  display: block;
}
