/* Base layout */

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

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222;
  background: #f5f5f7;
}

body {
  margin: 0;
  background: #f5f5f7;
}

a {
  color: #0090e3;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Header / navigation */

.site-header {
  background: #0090e3;
  color: #fff;
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo svg {
  height: 100%;
  width: auto;
  display: block;
}

.site-header__nav {
  display: flex;
  align-items: center;
}

.site-header__nav a {
  color: #fff;
  margin-left: 16px;
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.site-header__nav a:hover {
  border-bottom-color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.site-header__nav a.active {
  font-weight: 600;
  border-bottom-color: #fff;
}

/* Page layout */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  background: #f5f5f7;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.page-header p {
  margin: 0;
  max-width: 720px;
  color: #555;
}

/* Hero and cards */

.hero h2 {
  margin-top: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 16px 16px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 8px;
  color: #555;
}

.card__link {
  display: inline-block;
  margin-right: 8px;
  margin-top: 4px;
  font-size: 0.9rem;
}

/* API sections */

section {
  margin-top: 32px;
}

section h2 {
  margin-top: 0;
}

.api {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #e4e4e7;
}

.api h3 {
  margin-bottom: 4px;
}

.api p {
  margin: 0 0 4px;
}

/* Environment table */

.env-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 8px;
  font-size: 0.95rem;
}

.env-table th,
.env-table td {
  border: 1px solid #e4e4e7;
  padding: 8px 10px;
  vertical-align: top;
}

.env-table thead {
  background: #f3f4f6;
}

.env-table tbody tr:first-child {
  background: #fff9e6; /* highlight Acceptance */
}

/* TOC sidebar */

.page-toc {
  float: right;
  width: 220px;
  margin-left: 24px;
  padding: 12px 12px 8px;
  border-left: 3px solid #e4e4e7;
  background: #fff;
  font-size: 0.9rem;
}

.page-toc h2 {
  margin-top: 0;
  font-size: 1rem;
}

.page-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 8px 0 0;
}

.page-toc li {
  margin-bottom: 4px;
}

/* Callouts */

.warning {
  border-left: 4px solid #d9534f;
  background: #fcebea;
  padding: 10px 14px;
  margin: 16px 0;
}

.info {
  border-left: 4px solid #5bc0de;
  background: #e7f5fb;
  padding: 10px 14px;
  margin: 16px 0;
}

/* Code blocks */

pre {
  background: #111827;
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

/* Footer */

.site-footer {
  border-top: 1px solid #e4e4e7;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  background: #f9fafb;
}

/* Responsive tweaks */

@media (max-width: 800px) {
  .page-toc {
    float: none;
    width: auto;
    margin: 0 0 16px;
    border-left-width: 0;
    border-top: 3px solid #e4e4e7;
  }
}

/* Deep-dive API document styles */
.page--doc p {
  margin: 0;
  padding: 8px 0;
}

.page--doc dl {
  margin: 8px 0;
}

.page--doc dt {
  font-weight: 700;
  margin-top: 10px;
}

.page--doc dd {
  margin-left: 20px;
  margin-bottom: 2px;
  color: #444;
}

.note {
  background-color: #cce9f9;
  border: 1px solid #285dab;
  border-radius: 4px;
  padding: 8px 12px;
  margin: 12px 0;
}

.toc {
  padding-bottom: 16px;
}

.toc p {
  padding: 0;
  margin: 2px 0;
}

.toc a {
  text-decoration: none;
  color: #285dab;
}

.toc a:hover {
  text-decoration: underline;
}

.title {
  color: #285dab;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtitle {
  color: #666;
  font-size: 1rem;
  margin-bottom: 16px;
}