:root {
  color-scheme: light;
  --ink: #142c28;
  --muted: #536962;
  --line: #cad8d1;
  --paper: #f5f8f3;
  --green: #075840;
  --focus: #a5440a;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
a:hover {
  color: #00291e;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.skip {
  position: absolute;
  top: -5rem;
  background: white;
  padding: 1rem;
  z-index: 10;
}
.skip:focus {
  top: 0;
}
.top {
  background: #102e27;
  color: #f2f8ed;
  padding: 0.85rem max(1.5rem, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 4px solid #92c9aa;
}
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #f2f8ed;
  font-size: 1.15rem;
}
.brand img {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0.3rem;
}
.brand-subtitle {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #b9d4c5;
}
.top-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.top-links > a {
  color: #f2f8ed;
  font-size: 0.9rem;
}
.brand:hover {
  color: white;
}
.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.languages a {
  color: #f2f8ed;
  padding: 0.3rem;
}
.languages a[aria-current='page'] {
  font-weight: 700;
  text-decoration-thickness: 3px;
}
.badge {
  border: 1px solid #7ca390;
  border-radius: 2rem;
  padding: 0.25rem 0.8rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.layout {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 4rem;
  padding: 2.5rem 1.5rem 4rem;
  align-items: start;
}
.sidebar {
  font-size: 0.9rem;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 0.5rem;
}
.sidebar summary {
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 1rem;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 0.4rem 0.65rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.sidebar a[aria-current='page'] {
  color: var(--green);
  border-color: var(--green);
  background: #e4efe6;
  font-weight: 700;
}
.nav-group > span {
  display: block;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1.2rem;
}
.sidebar .nav-group > ul {
  margin: 0.35rem 0;
}
.search {
  margin-bottom: 1.25rem;
}
.on-this-page {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.on-this-page summary {
  cursor: pointer;
  font-weight: 600;
}
.on-this-page ul {
  margin-bottom: 0.5rem;
}
.source-link {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1rem;
  font-size: 0.85rem;
}
.search-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
input {
  font: inherit;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: white;
}
.search-results {
  font-size: 0.85rem;
}
main {
  max-width: 850px;
  min-width: 0;
}
main img {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: white;
}
main video.doc-video {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: black;
}
main img[src$='/apexrest-logo.svg'] {
  max-width: 144px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
main img[src$='/badge.svg'] {
  width: auto;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0.75rem 0;
}
main h2,
main h3,
main h4 {
  scroll-margin-top: 1rem;
}
.table-scroll {
  max-width: 100%;
  margin: 1.4rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  background: #e4efe6;
}
tr:last-child td {
  border-bottom: 0;
}
blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 1.2rem;
  border-left: 4px solid #92c9aa;
  background: #eaf1e7;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  letter-spacing: -0.045em;
  line-height: 1.12;
  margin: 0.6rem 0 1.8rem;
  font-weight: 750;
}
h2 {
  font-size: 1.45rem;
  margin: 2.3rem 0 0.6rem;
  line-height: 1.3;
}
p,
ul,
ol {
  margin: 0.8rem 0 1.15rem;
}
pre {
  background: #142b27;
  color: #e6f6e9;
  padding: 1.2rem 1.4rem;
  border-radius: 0.6rem;
  overflow: auto;
  font-size: 0.86rem;
  line-height: 1.65;
  border: 1px solid #37574d;
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
p code,
li code {
  background: #e4ece3;
  border-radius: 0.2rem;
  padding: 0.1rem 0.3rem;
}
footer {
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--muted);
  padding: 1.5rem;
  text-align: center;
}
.lead {
  font-size: 1.1rem;
}
.rule {
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}
.search-results:empty {
  display: none;
}
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.2rem;
  }
  .sidebar {
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .sidebar details:not([open]) ul {
    display: none;
  }
  .top {
    padding: 0.85rem 1.5rem;
  }
  .brand {
    gap: 0.65rem;
    font-size: 0.9rem;
  }
  .badge {
    font-size: 0.7rem;
  }
  h1 {
    margin-top: 1rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 0.12s;
  }
}
@media print {
  .sidebar,
  .top,
  .skip {
    display: none;
  }
  .layout {
    display: block;
  }
  pre {
    white-space: pre-wrap;
    background: #eee;
    color: black;
  }
}
