body { height: auto; overflow: auto; }

/* ── Page wrapper ── */
.cs-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 24px 0;
}

/* ── Intro ── */
.cs-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.cs-title {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}
.cs-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 0;
}

/* ── Accordion ── */
.cs-accordion {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-bottom: 32px;
}

.cs-acc-item {
  border-bottom: 1px solid var(--border);
}

.cs-acc-header {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 36px 0 28px;
  font-family: inherit;
  display: block;
}

.cs-acc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.cs-acc-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.2;
}

.cs-acc-chevron-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #CEAA3C;
  background: rgba(206,170,60,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.2s;
}

.cs-acc-item--open .cs-acc-chevron-wrap {
  background: rgba(206,170,60,0.18);
}

.cs-acc-chevron {
  width: 15px;
  height: 15px;
  color: #CEAA3C;
  transition: transform 0.28s ease;
}

.cs-acc-item--open .cs-acc-chevron {
  transform: rotate(180deg);
}

.cs-acc-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 620px;
  margin-bottom: 20px;
}

.cs-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.cs-acc-body-inner {
  padding-bottom: 40px;
}

/* ── Section tag ── */
.cs-section-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 14px;
}

/* ── Inline stats ── */
.cs-inline-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.cs-inline-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--border);
}
.cs-inline-stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.cs-stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
  line-height: 1;
}

.cs-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ── Section label ── */
.cs-built-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

/* ── Module grid ── */
.cs-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.cs-module {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.cs-module-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.cs-module-icon svg { color: var(--bg); }
.cs-module-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.cs-module-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Flow diagram ── */
.cs-flow-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 20px 20px 16px;
}
.cs-flow-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 4px;
}
.cs-flow-labels span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  flex: 1;
  text-align: center;
}
.cs-flow-labels span:first-child { text-align: left; }
.cs-flow-labels span:last-child  { text-align: right; }
.cs-flow-svg {
  width: 100%;
  min-width: 560px;
  height: auto;
  color: var(--text);
}
[data-theme="dark"] .cs-flow-svg rect[fill="#111"] { fill: var(--bg-card); stroke: var(--border); }
[data-theme="dark"] .cs-flow-svg text[fill="#fff"] { fill: var(--text); }
[data-theme="dark"] .cs-flow-svg text[fill="#bbb"] { fill: var(--text-muted); }

/* ── Workflow grid ── */
.cs-wf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cs-wf-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cs-wf-dept {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  align-self: flex-start;
}
.cs-wf-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.cs-wf-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cs-wf-agents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.cs-wf-agent {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 8px;
}
.cs-db-note {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-subtle);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .cs-wf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cs-page { padding: 96px 16px 0; }
  .cs-title { font-size: 26px; }
  .cs-acc-header { padding: 28px 0 22px; }
  .cs-inline-stats { flex-wrap: wrap; }
  .cs-inline-stat { padding-right: 20px; margin-right: 20px; }
  .cs-stat-num { font-size: 22px; }
  .cs-acc-title { font-size: 20px; }
}
