@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;700&family=Lora:ital,wght@0,400;0,700;1,400&family=Roboto+Mono:wght@400&display=swap");

/* ─── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

code {
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
  font-weight: 400;
  background: #eee;
  color: #000;
  border-radius: 12px;
  padding: 4px 8px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

pre {
  background: #eee;
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 12px 0;
}

pre code {
  background: none;
  color: #000;
  border-radius: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 14px;
}

pre code[class*="language-"],
code[class*="language-"] {
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
}

pre[class*="language-"],
pre code[class*="language-"] {
  white-space: pre-wrap;
  word-break: break-all;
}

body {
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #000;
  background: #fff;
  display: flex;
  min-height: 100vh;
  min-width: 360px;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  opacity: 0.5;
}

ul {
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #fff;
  border-right: 1px solid #d9d9d9;
  padding: 16px;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

/* Logo area */
.sidebar-logo {
  padding: 0 0 12px;
  flex-shrink: 0;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 9999px;
  padding: 16px;
}

.sidebar-logo a.active {
  background: rgba(11, 184, 218, 0.15);
}

.sidebar-logo img {
  height: 20px;
  width: auto;
  display: block;
}

/* Search */
.sidebar-search {
  position: relative;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  height: 48px;
  padding: 12px 16px 12px 44px;
  border: 1px solid #d9d9d9;
  border-radius: 9999px;
  font-size: 16px;
  font-family: "Lora", serif;
  color: #000;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.sidebar-search input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.sidebar-search input:focus {
  border: 2px solid;
  border-color: rgba(11, 184, 218);
}

.sidebar-search .search-icon-img {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0.5;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

.nav-section {
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background 0.1s;
}

.nav-section.open .nav-section-toggle {
  background: none;
  border-radius: 8px;
}

.nav-section-toggle.active,
.nav-section.open .nav-section-toggle.active {
  border-radius: 24px;
  background: rgba(11, 184, 218, 0.15);
}

.nav-section-label {
  color: inherit;
  text-decoration: none;
  flex: 1;
}

.nav-section-toggle .chevron-img {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.nav-section-toggle .chevron-img:hover {
  opacity: 0.5;
}

.nav-section.open .chevron-img {
  transform: rotate(180deg);
}

.nav-section-items {
  display: none;
  padding-bottom: 4px;
}

.nav-section.open .nav-section-items {
  display: block;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.1s;
}

.nav-item.active {
  border-radius: 24px;
  background: rgba(11, 184, 218, 0.15);
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

/* Subgroup (Salesforce + connector items) */
.nav-subgroup {
}

.nav-subgroup-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.1s;
}

.nav-subgroup.open .nav-subgroup-toggle {
  background: none;
  border-radius: 8px;
}

.nav-subgroup-toggle .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

.nav-subgroup-toggle .subgroup-label {
  flex: 1;
}

.nav-subgroup-toggle .chevron-sub-img {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.nav-subgroup-toggle .chevron-sub-img:hover {
  opacity: 0.5;
}

.nav-subgroup.open .chevron-sub-img {
  transform: rotate(180deg);
}

.nav-subgroup-items {
  display: none;
}

.nav-subgroup.open .nav-subgroup-items {
  display: block;
}

/* Sub-items (Salesforce children) */
.nav-subitem {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px 12px 44px;
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  border-radius: 8px;
  transition: background 0.1s;
}

.nav-subitem:hover {
  opacity: 0.5;
}

.nav-subitem.active {
  border-radius: 24px;
  background: rgba(11, 184, 218, 0.15);
}

.nav-subgroup-toggle.active,
.nav-subgroup.open .nav-subgroup-toggle.active {
  border-radius: 24px;
  background: rgba(11, 184, 218, 0.15);
}

/* No hover effect when active */
.sidebar-logo a.active:hover,
.sidebar-logo a.active:hover img,
.nav-section-label.active:hover,
.nav-item.active:hover,
.nav-subitem.active:hover,
.subgroup-label.active:hover {
  opacity: 1;
}

/* ─── Main Wrapper ──────────────────────────────────────────────── */
#main-wrapper {
  margin-left: 280px;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-x: clip;
}

/* ─── Page Content ──────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 64px;
  width: 100%;
}

/* ─── Home Hero ─────────────────────────────────────────────────── */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 64px;
}

.home-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(40px, calc(27px + 3.1vw), 72px);
  letter-spacing: -1.44px;
  line-height: 1.1;
  color: #000;
  white-space: nowrap;
}

.home-title .yellow {
  color: #ffcc00;
}

.home-hero-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.hero-tagline {
  font-family: "Lora", serif;
  font-size: 16px;
  color: #000;
  white-space: nowrap;
}

.tagline-short { display: none; }
.btn-short { display: none; }

@media (max-width: 1400px) {
  .tagline-full { display: none; }
  .tagline-short { display: inline; }
  .btn-full { display: none; }
  .btn-short { display: inline; }
}


.btn-dark {
  display: inline-block;
  background: #2c2c2c;
  color: #f5f5f5;
  border-radius: 9999px;
  padding: 12px 18px;
  font-family: "Lora", serif;
  font-weight: 700;
  font-size: clamp(14px, calc(8px + 0.7vw), 18px);
  white-space: nowrap;
  transition: box-shadow 0.15s;
}

.btn-dark:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 1;
}

/* ─── Home Section Titles ───────────────────────────────────────── */
.home-section-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, calc(15px + 1.2vw), 32px);
  line-height: 1.2;
  color: #000;
  margin-bottom: clamp(24px, calc(16px + 0.83vw), 48px);
}

/* ─── Home Sections ─────────────────────────────────────────────── */
.home-sections {
  padding: 0 64px 64px;
  height: fit-content;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 64px;
}


/* Topics Grid */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (min-width: 1401px) {
  .topics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

.topic-card {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #d9d9d9;
  padding: 0px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.topic-card:hover {
  box-shadow: 0 8px 24px rgba(12, 12, 13, 0.1);
  opacity: 1;
}

.topic-card-img {
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: rgba(11, 184, 218, 0.15);
  flex-shrink: 0;
  border-radius: 24px 24px 0px 0px;
}

.topic-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card-text {
  padding: 24px;
}

.topic-card h3 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, calc(10px + 0.97vw), 24px);
  letter-spacing: -0.48px;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-card p {
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
}

/* ─── Page Hero (category/article pages) ───────────────────────── */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.hero-text {
  flex: 1;
}

.hero-text .breadcrumb {
  font-family: "Lora", serif;
  font-size: 14px;
  margin-bottom: 12px;
}

.hero-text .breadcrumb a {
  text-decoration: underline;
}

.hero-text h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(40px, calc(27px + 3.1vw), 72px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.44px;
  color: #000;
  margin-bottom: 16px;
}

.hero-text .hero-desc {
  font-family: "Lora", serif;
  font-size: clamp(16px, calc(10px + 0.97vw), 24px);
  line-height: 1.5;
  letter-spacing: 0.48px;
  color: #000;
}

.hero-illustration {
  width: 240px;
  height: 240px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-illustration img {
  background: rgba(11, 184, 218, 0.15);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Breadcrumb (standalone) ───────────────────────────────────── */
.breadcrumb {
  font-family: "Lora", serif;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a {
  text-decoration: underline;
}

.breadcrumb .sep {
}

/* ─── Article Hero (legacy, used on some pages) ─────────────────── */
.article-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 40px;
}

.article-hero-text {
  flex: 1;
}

.article-hero h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(40px, calc(27px + 3.1vw), 72px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.44px;
  color: #000;
  margin-bottom: 16px;
}

.article-hero p {
  font-family: "Lora", serif;
  font-size: clamp(16px, calc(10px + 0.97vw), 24px);
  line-height: 1.5;
  letter-spacing: 0.48px;
  color: #000;
}

.article-hero-img {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 204, 0, 0.3);
}

.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Article Cards (category pages) ───────────────────────────── */
.article-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}

.article-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid #d9d9d9;
  padding: 0 24px 0 0;
  cursor: pointer;
  transition: box-shadow 0.15s;
  overflow: hidden;
}

.article-card:hover {
  box-shadow: 0 8px 24px rgba(12, 12, 13, 0.1);
  opacity: 1;
}

.article-card:only-child {
  grid-column: 1 / -1;
}

.card-icon {
  border-radius: 24px 0 0 24px;
  overflow: hidden;
  flex: 0 0 clamp(100px, 33.333%, 150px);
  aspect-ratio: 1;
  min-width: 100px;
  min-height: 100px;
  max-width: 150px;
  max-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon.yellow-bg {
  background: #ffcc00;
}

.card-icon.yellow-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-icon.teal-bg {
  background: #004455;
}

.card-icon.teal-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-body h3 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(16px, calc(10px + 0.97vw), 24px);
  letter-spacing: -0.48px;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body p {
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc-short { display: none; }

/* ─── Article Layout with ToC ───────────────────────────────────── */
.article-layout {
  display: block;
}

.article-body {
  width: 100%;
  min-width: 0;
}

.article-content {
  overflow: hidden;
}

.article-toc {
  position: fixed;
  top: 0;
  right: 0;
  width: 200px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #d9d9d9;
  padding: 16px;
  overflow-y: auto;
  z-index: 90;
}

/* Push entire main wrapper left when TOC is visible */
@media (min-width: 1201px) {
  body:has(.article-toc) #main-wrapper {
    margin-right: 200px;
  }
}

.toc-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #000;
  padding: 12px 0;
}

.toc-list a {
  display: block;
  font-family: "Lora", serif;
  font-size: 14px;
  color: #000;
  padding: 12px 16px;
  border-radius: 24px;
  transition: background 0.1s;
}

.toc-list a:hover {
  opacity: 0.5;
}

.toc-list a.active {
  background: rgba(11, 184, 218, 0.15);
  color: #000;
  opacity: 1;
}

.toc-list a.toc-h3 {
  padding-left: 32px;
}

/* ─── Article Image with Caption ───────────────────────────────── */
.image-grid {
  display: flex;
  gap: 32px;
  margin: 32px 0;
}

.image-grid figure.article-image {
  flex: 1;
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 2), 1fr);
  gap: 32px;
  margin: 32px 0;
}

.content-grid figure.article-image {
  margin: 16px 0;
}

figure.article-image {
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 32px 0;
  width: fit-content;
}

.article-content li figure.article-image {
  margin: 16px 0 0;
}

figure.article-image:has(figcaption) {
  padding-bottom: 16px;
}

figure.article-image img {
  max-width: 100%;
  display: block;
}

@media (min-width: 1400px) {
  figure.article-image img {
    max-height: 60vh;
  }
}

figure.article-image:has(figcaption) img {
  border-bottom: 1px solid #d9d9d9;
}

figure.article-image figcaption {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  text-align: left;
  padding: 0 16px;
}

/* ─── Sync Status Table ─────────────────────────────────────────── */

.sync-status-table {
  min-width: 670px;
  
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
}

.sync-status-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d9d9d9;
}

.sync-status-row:last-child {
  border-bottom: none;
}

.sync-status-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-status-label {
  width: 200px;
  flex-shrink: 0;
  padding: 16px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
}

.sync-status-desc {
  flex: 1;
  padding: 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

/* ─── Data Table (generic 2-column) ─────────────────────────────── */

.data-table {
  min-width: 670px;
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.data-table-row {
  display: contents;
}

.data-table-cell {
  min-width: 0;
  padding: 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #d9d9d9;
}

.data-table-row:last-child .data-table-cell {
  border-bottom: none;
}

.data-table-header .data-table-cell,
.data-table-cell--label {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.data-table-header .data-table-cell {
  border-bottom: 2px solid #d9d9d9;
}

/* ─── Table clip container ───────────────────────────────────────── */

.table-clip {
  overflow-x: auto;
  width: 100%;
  margin: 0;
}

.table-clip > * {
  margin: 0 !important;
}

/* ─── Article tables ─────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  margin: 24px 0;
}

.table-inner {
  min-width: 670px;
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
}

.table-inner table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

.table-inner tr:not(:first-child) {
  border-top: 1px solid #d9d9d9;
}

.table-inner tr.no-border {
  border-top: none;
}

.table-inner th,
.table-inner td {
  padding: 16px;
  vertical-align: top;
  text-align: left;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

.table-inner th {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.table-inner tr:has(th):not(:has(td)) + tr:not(:first-child) {
  border-top: 2px solid #d9d9d9;
}

.table-inner td p {
  margin: 0;
}

.table-inner td p:last-child {
  margin-bottom: 0;
}

.table-inner th p {
  margin: 0;
}

.table-inner td img,
.table-inner th img {
  display: block;
}

.table-inner td code,
.table-inner th code {
  white-space: nowrap;
  display: inline-block;
  margin-bottom: 4px;
}

.table-inner.has-rowspan tr:not(.rowspan-cont) td:first-child {
  border-right: 1px solid #d9d9d9;
}

/* ─── Objects Table ──────────────────────────────────────────────── */

.objects-table {
  min-width: 670px;
  
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
}

.objects-table-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d9d9d9;
}

.objects-table-row:last-child,
.objects-table-row.no-border {
  border-bottom: none;
}

.objects-table-header {
  border-bottom: 2px solid #d9d9d9;
  align-items: center;
  height: 54px;
}

.objects-table-object {
  flex: 1;
  min-width: 0;
  padding: 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
  display: flex;
  align-items: center;
}

.objects-table-header .objects-table-object {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

.objects-table-object.sub {
  padding-left: 32px;
}

.objects-table-cell {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
}

.objects-table--text .objects-table-cell {
  justify-content: flex-start;
  width: 150px;
}

.objects-table-header .objects-table-cell {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  padding: 16px;
}

/* ─── Custom Fields Table ────────────────────────────────────────── */

.cft {
  min-width: 670px;
  
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
}

.cft-header {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid #d9d9d9;
}

.cft-header .cft-sub-row {
  border-bottom: none;
}

.cft-header .cft-field,
.cft-header .cft-object,
.cft-header .cft-values,
.cft-header .cft-api-values {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0;
  font-style: normal;
}

.cft-header .cft-field {
  border-right: none;
}

.cft-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d9d9d9;
}

.cft-row:last-child {
  border-bottom: none;
}

.cft-field {
  flex: 3;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #d9d9d9;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cft-field-name {
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

.cft-field-type {
  font-family: "Lora", serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  background: #eee;
  border-radius: 12px;
  padding: 4px 8px;
  font-family: "Roboto Mono", monospace;
  font-size: 14px;
  line-height: 1.3;
  color: #000;
  white-space: nowrap;
  align-self: flex-start;
}

.cft-sub-rows {
  flex: 6;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cft-sub-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d9d9d9;
  flex: 1;
}

.cft-sub-row:last-child {
  border-bottom: none;
}

.cft-object {
  flex: 2;
  padding: 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

.cft-values {
  flex: 2;
  min-width: 0;
  padding: 16px;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
}

.cft-values ul {
  list-style: disc;
  margin: 0;
  padding-left: 0;
  display: block;
}

.cft-values li {
  list-style: disc;
  margin-bottom: 4px;
}

.cft-values li:last-child {
  margin-bottom: 0;
}

.cft-api-values {
  flex: 2;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

/* ─── Standard Fields Table ──────────────────────────────────────── */

.std-fields-table {
  min-width: 670px;
  
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  overflow: hidden;
  margin: 24px 0;
}

.std-fields-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d9d9d9;
}

.std-fields-row:last-child {
  border-bottom: none;
}

.std-fields-label {
  width: 150px;
  flex-shrink: 0;
  padding: 16px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
  display: flex;
  align-items: center;
}

.std-fields-values {
  flex: 1;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
}

.std-fields-dot {
  opacity: 0.2;
}

/* ─── Fields Table ───────────────────────────────────────────────── */

.fields-table {
  min-width: 670px;
  
  border: 1px solid #d9d9d9;
  border-radius: 16px;
  overflow: hidden;
  margin: 24px 0;
}

.fields-table-row {
  display: flex;
}

.fields-table-cell {
  flex: 1;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid #d9d9d9;
  border-bottom: 1px solid #d9d9d9;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.32px;
  color: #000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fields-table-cell:last-child {
  border-right: none;
}

.fields-table-row:last-child .fields-table-cell {
  border-bottom: none;
}

.fields-table-header .fields-table-cell {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  gap: 0;
}

.fields-table-cell p {
  margin: 0;
}

/* ─── Article Content Typography ───────────────────────────────── */
/* ─── Lightbox ───────────────────────────────────────────────────── */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-inner {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  cursor: default;
}

.lightbox-overlay img {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

figure.article-image img,
.step-layout-image img {
  cursor: zoom-in;
}

.lightbox-arrow {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  width: clamp(24px, 6vw, 56px);
  height: clamp(24px, 6vw, 56px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-arrow svg {
  width: clamp(12px, 2.5vw, 24px);
  height: clamp(12px, 2.5vw, 24px);
}

/* ─── Article Content Typography ───────────────────────────────── */

.article-content h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(20px, calc(12px + 1.1vw), 28px);
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  color: #000;
  letter-spacing: -0.3px;
}

.article-content h3 {
  font-family: "Sora", sans-serif;
  font-size: clamp(18px, calc(9px + 0.77vw), 20px);
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  color: #000;
}

.article-content h4 {
  font-family: "Sora", sans-serif;
  font-size: clamp(16px, calc(8px + 0.57vw), 17px);
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 16px;
  color: #000;
}

.article-content p {
  font-family: "Lora", serif;
  margin-bottom: 16px;
  color: #000;
  line-height: 1.5;
}

.article-content a {
  text-decoration: underline;
}

.article-content ul + p,
.article-content ol + p {
  margin-top: 16px;
}

.article-content ul {
  margin: 0 0 0 20px;
  color: #000;
  font-family: "Lora", serif;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-content li {
  margin-bottom: 0;
  list-style: disc;
}

.article-content ul ul {
  margin: 16px 0 0 20px;
}

.article-content ul ul li {
  list-style: circle;
}

.article-content ul ul li:last-child {
  margin-bottom: 0;
}

.article-content ul ul ul li {
  list-style: square;
}

.article-content li > *:last-child,
.article-content details > *:last-child,
.details-content > *:last-child {
  margin-bottom: 0;
}

.article-content li p {
  margin-bottom: 0;
}

.article-content li p + p {
  margin-top: 16px;
}

.article-content ol {
  list-style: none;
  counter-reset: ol-counter;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  color: #000;
  font-family: "Lora", serif;
}

.article-content ol li {
  counter-increment: ol-counter;
  list-style: none;
  margin-bottom: 0;
  position: relative;
  padding-left: 34px;
}

.article-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: #eee;
  border-radius: 50%;
  text-align: center;
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 0.32px;
  color: rgba(0, 0, 0, 0.5);
}

/* Callouts */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid;
  margin: 24px 0;
}

.callout.callout-single-line {
  align-items: center;
}

.callout::before {
  content: '';
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.callout p {
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  margin: 0;
}

.callout-neutral-technical,
.callout-neutral-info,
.callout-neutral-beta {
  background: rgba(0, 102, 255, 0.05);
  border-color: rgba(0, 102, 255, 0.15);
}

.callout-warning {
  background: rgba(255, 153, 0, 0.05);
  border-color: rgba(255, 153, 0, 0.15);
}

/* ─── Step layout (text + screenshot side by side) ──────────────── */

.step-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.step-layout-image img {
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid #d9d9d9;
  display: block;
}

/* ─── Callout Link ───────────────────────────────────────────────── */

.callout-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(0, 102, 255, 0.15);
  background: rgba(0, 102, 255, 0.05);
  margin: 24px 0;
  color: #000;
  text-decoration: none;
  transition: opacity 0.15s;
}

.article-content a.callout-link {
  text-decoration: none;
}

.callout-link:hover {
  opacity: 0.6;
}

.callout-link-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.callout-link-text {
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.32px;
}

.callout-neutral-technical::before {
  background-image: url('../images/icons/callout-neutral-technical.svg');
}

.callout-neutral-info::before {
  background-image: url('../images/icons/callout-neutral-info.svg');
}

.callout-neutral-beta::before {
  background-image: url('../images/icons/callout-neutral-beta.svg');
}

.callout-warning::before {
  background-image: url('../images/icons/callout-warning.svg');
}

/* Collapsible sections */
details:not(.callout-error) {
  margin: 24px 0;
}

details:not(.callout-error) > summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
  list-style: none;
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  padding: 4px 0;
}

details:not(.callout-error) > summary:hover {
  opacity: 0.5;
}

details:not(.callout-error) > summary::-webkit-details-marker { display: none; }
details:not(.callout-error) > summary::marker { content: ''; }

details:not(.callout-error) > summary::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url('../images/icons/chevron.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.15s;
}

details:not(.callout-error)[open] > summary::before {
  transform: rotate(180deg);
}

details:not(.callout-error)[open] > summary {
  padding-bottom: 24px;
}

/* Section-level collapsibles — styled like h2 headings */
details.details-section {
  margin-top: 40px;
  margin-bottom: 12px;
}

details.details-section:not(.callout-error) > summary {
  font-family: "Sora", sans-serif;
  font-size: clamp(20px, calc(12px + 1.1vw), 28px);
  font-weight: 700;
  letter-spacing: -0.3px;
  gap: 16px;
  padding-bottom: 12px;
}

details.details-section:not(.callout-error) > summary::before {
  width: 32px;
  height: 32px;
}

details.details-section:not(.callout-error)[open] > summary {
  padding-bottom: 24px;
}

details.details-section.details-section--h3:not(.callout-error) > summary {
  font-size: clamp(18px, calc(9px + 0.77vw), 20px);
  letter-spacing: 0;
}

details.details-section.details-section--h3:not(.callout-error) > summary::before {
  width: 24px;
  height: 24px;
}

details.details-section.details-section--h4:not(.callout-error) > summary {
  font-size: clamp(16px, calc(8px + 0.6vw), 18px);
  letter-spacing: 0;
}

details.details-section.details-section--h4:not(.callout-error) > summary::before {
  width: 20px;
  height: 20px;
}

details.details-section > div {
  border-left: 4px solid #d9d9d9;
  border-radius: 2px;
  padding-left: 24px;
}

.details-content {
  border-left: 4px solid #d9d9d9;
  border-radius: 2px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.details-content > * {
  margin: 0;
}

.details-content > .table-clip {
  margin: 24px 0;
}

.details-content > .table-clip:last-child,
.article-content li > .table-clip:last-child {
  margin-bottom: 0;
}

.details-content > .callout-error:not(:last-child) {
  margin-bottom: 24px;
}

details.details-section .callout:not(:last-child) {
  margin-bottom: 24px;
}

/* Error callout (used inside .details-nested) */
details.callout-error {
  position: relative;
  /* 20px top/right/bottom + 67px left (20px pad + 32px icon + 15px gap) */
  padding: 20px 20px 20px 67px;
  border-radius: 24px;
  background: rgba(255, 0, 0, 0.05);
  border: 1px solid rgba(255, 0, 0, 0.15);
}

details.callout-error::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  background-image: url('../images/icons/callout-error.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

details.callout-error > summary {
  display: block;
  cursor: default;
  pointer-events: none;
  list-style: none;
  font-family: "Lora", serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
}

details.callout-error > summary::-webkit-details-marker { display: none; }
details.callout-error > summary::marker { content: ''; }

details.callout-error > summary strong { font-weight: 600; }

details.callout-error > *:not(summary) {
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  margin: 8px 0 0 0;
}

/* Content placeholder */
.content-placeholder {
  border: 2px dashed #ffcc00;
  background: #fffdf0;
  padding: 20px 24px;
  border-radius: 8px;
  margin: 24px 0;
  color: #78716c;
}

.content-placeholder p {
  margin: 0;
  color: #78716c;
}

/* ─── Divider ───────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #d9d9d9;
  margin: 32px 0;
}

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid #d9d9d9;
  padding: 64px;
  background: #fff;
}

.footer-inner {
  display: flex;
  gap: 16px;
}

.footer-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo img {
  height: 20px;
  width: auto;
  display: block;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  transition: background 0.15s;
}

.footer-social a:hover {
  background: #e5e5e5;
  opacity: 1;
}

.footer-social img {
  width: 24px;
  height: 24px;
}

.footer-col {
  flex: 1;
}

.footer-col h4 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #000;
  margin-bottom: 16px;
}

.footer-col h4 a {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #000;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #000;
  transition: opacity 0.1s;
}

.footer-col ul li a:hover {
  opacity: 0.6;
}

.footer-bottom {
  padding-top: 20px;
  margin-top: 20px;
  font-family: "Lora", serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.5);
}

/* ─── Hamburger ─────────────────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  background: #000;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
  box-shadow: none;
  transition: box-shadow 0.15s;
}

.hamburger:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99;
}

/* ─── Responsive ────────────────────────────────────────────────── */

/* ≤ 1200px — sidebar collapses, hamburger appears, tablet layout */
@media (max-width: 1200px) {
  .home-hero-right { display: none; }

  #sidebar {
    transform: translateX(-280px);
    top: 0;
    left: 0;
    height: 100vh;
    border-radius: 0;
  }

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

  .sidebar-overlay.visible {
    display: block;
  }

  #main-wrapper {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .home-hero {
    padding: 72px 48px 48px;
    flex-direction: column;
    align-items: flex-start;
  }

  .home-sections {
    padding: 0 48px 48px;
  }

  .page-content {
    padding: 64px 48px 48px;
  }

  .page-hero {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .hero-illustration {
    width: 240px;
    height: 240px;
  }

  .article-hero {
    flex-direction: column-reverse;
  }
  .article-hero-img {
    width: 100%;
    height: 180px;
  }

  .article-toc {
    display: none;
  }

  footer {
    padding: 48px;
  }
  .footer-inner {
    flex-wrap: wrap;
  }
  .footer-brand {
    flex: 0 0 100%;
  }
}

/* ≤ 800px — compact padding, single-column, stacked footer */
@media (max-width: 1200px) {
  .home-hero {
    padding: 64px 32px 32px;
  }

  .home-sections {
    padding: 0 32px 32px;
  }

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

  .hero-illustration {
    width: max(33.333vw, 100px);
    height: max(33.333vw, 100px);
  }

  .page-content {
    padding: 56px 32px 32px;
  }

  footer {
    padding: 32px;
  }

  .footer-col {
    flex: 0 0 calc(50% - 8px);
  }
}

/* ≤ 650px — single column, stacked footer */
@media (max-width: 650px) {
  .image-row,
  .image-row--3 {
    flex-direction: column !important;
  }

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

  .card-grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .footer-brand {
    flex: none;
  }

  .footer-col {
    flex: none;
  }
}

@media (max-width: 1400px) {
  .desc-full { display: none; }
  .desc-short { display: inline; }
  .card-body p { -webkit-line-clamp: 2; }
}
