/* B2B pages — VS Code Markdown Preview style */

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  line-height: 22px;
  color: #24292e;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.b2b-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f6f8fa;
  border-bottom: 1px solid #e1e4e8;
}

.b2b-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.b2b-nav-brand {
  font-weight: 600;
  font-size: 14px;
  color: #24292e;
  text-decoration: none;
  margin-right: 12px;
  white-space: nowrap;
}

.b2b-nav-brand:hover {
  color: #0366d6;
}

.b2b-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.b2b-nav-link {
  font-size: 13px;
  color: #586069;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.b2b-nav-link:hover {
  color: #0366d6;
  background: #e1e4e8;
}

.b2b-nav-link.active {
  color: #24292e;
  background: #dfe2e5;
  font-weight: 600;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-family: inherit;
  line-height: 1;
  color: #586069;
  background: transparent;
  border: 1px solid #d1d5da;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  height: 28px;
}

.print-btn:hover {
  color: #24292e;
  border-color: #959da5;
}

/* Sources section compact */
.b2b-content small {
  display: block;
  line-height: 1.3;
}
.b2b-content small p {
  margin: 2px 0;
}

/* Main content */
.b2b-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Typography */
.b2b-content h1 {
  font-size: 2em;
  font-weight: 600;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
  margin-top: 0;
  margin-bottom: 16px;
}

.b2b-content h2 {
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
  margin-top: 24px;
  margin-bottom: 16px;
}

.b2b-content h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 16px;
}

.b2b-content h4 {
  font-size: 1em;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 16px;
}

.b2b-content p {
  margin-top: 0;
  margin-bottom: 16px;
}

.b2b-content a {
  color: #0366d6;
  text-decoration: none;
}

.b2b-content a:hover {
  text-decoration: underline;
}

.b2b-content strong {
  font-weight: 600;
}

.b2b-content hr {
  border: none;
  border-top: 1px solid #eaecef;
  margin: 24px 0;
}

/* Lists */
.b2b-content ul,
.b2b-content ol {
  padding-left: 2em;
  margin-top: 0;
  margin-bottom: 16px;
}

.b2b-content li {
  margin-bottom: 4px;
}

.b2b-content li + li {
  margin-top: 4px;
}

/* Tables */
.b2b-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
  overflow-x: auto;
  display: block;
}

.b2b-content thead {
  display: table-header-group;
}

.b2b-content tr {
  display: table-row;
}

.b2b-content table {
  display: table;
}

.b2b-content th {
  font-weight: 600;
  background: #f0f0f0;
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
  text-align: left;
}

.b2b-content td {
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
}

.b2b-content tr:nth-child(even) {
  background: #f8f8f8;
}

/* Code */
.b2b-content code {
  background: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 85%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.b2b-content pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  font-size: 85%;
  line-height: 1.45;
  margin-bottom: 16px;
}

.b2b-content pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Blockquotes */
.b2b-content blockquote {
  border-left: 4px solid #dfe2e5;
  padding: 0 15px;
  color: #6a737d;
  margin: 0 0 16px 0;
}

.b2b-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Images */
.b2b-content img {
  max-width: 100%;
  height: auto;
}

/* Index page cards */
.b2b-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.b2b-card {
  display: block;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.b2b-card:hover {
  border-color: #0366d6;
  box-shadow: 0 1px 5px rgba(3, 102, 214, 0.15);
  text-decoration: none;
}

.b2b-card h2 {
  font-size: 1.1em;
  margin: 0 0 8px 0;
  border: none;
  padding: 0;
  color: #0366d6;
}

.b2b-card p {
  font-size: 13px;
  color: #586069;
  margin: 0;
  line-height: 1.5;
}

/* Footer */
.b2b-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid #eaecef;
  text-align: center;
  font-size: 13px;
  color: #959da5;
}

.b2b-footer a {
  color: #586069;
  text-decoration: none;
}

.b2b-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .b2b-content {
    padding: 20px 16px 40px;
  }

  .b2b-nav-inner {
    padding: 8px 12px;
  }

  .b2b-nav-links {
    gap: 2px;
  }

  .b2b-nav-link {
    font-size: 12px;
    padding: 3px 6px;
  }

  .b2b-content h1 {
    font-size: 1.6em;
  }

  .b2b-content h2 {
    font-size: 1.3em;
  }

  .b2b-content table {
    font-size: 13px;
  }

  .b2b-content th,
  .b2b-content td {
    padding: 4px 8px;
  }

  .b2b-cards {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  .b2b-nav,
  .print-btn,
  .b2b-footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .b2b-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .b2b-content a {
    color: #000;
    text-decoration: underline;
  }

  .b2b-content table,
  .b2b-content pre,
  .b2b-content blockquote {
    page-break-inside: avoid;
  }

  .b2b-content h1,
  .b2b-content h2,
  .b2b-content h3 {
    page-break-after: avoid;
  }

  .b2b-content tr {
    page-break-inside: avoid;
  }

  @page {
    margin: 15mm;
  }
}
