/* Celetus Upsell SDK — tutoriais */
:root {
  --brand: #1c52bd;
  --brand-ink: #0e2a60;
  --accent: #f6d240;
  --ok: #2ecc71;
  --ink: #1a2233;
  --muted: #5b6478;
  --line: #e5e7eb;
  --bg: #f7f8fb;
  --card: #ffffff;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --code-comment: #94a3b8;
  --code-keyword: #7dd3fc;
  --code-string: #fcd34d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(10, 20, 50, 0.04), 0 8px 24px rgba(10, 20, 50, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.ct-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-ink) 100%);
  color: #fff;
  padding: 48px 24px 64px;
}
.ct-header-inner {
  max-width: 960px;
  margin: 0 auto;
}
.ct-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  margin: 0 0 8px;
}
.ct-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  font-weight: 700;
}
.ct-header p.lead {
  font-size: 17px;
  margin: 0;
  max-width: 640px;
  opacity: 0.92;
}

.ct-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.ct-section {
  margin-top: 40px;
}
.ct-section h2 {
  font-size: 22px;
  margin: 0 0 12px;
  color: var(--brand-ink);
}
.ct-section p {
  margin: 0 0 12px;
  color: var(--muted);
}

.ct-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: -32px auto 0;
  max-width: 960px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.ct-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.ct-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(10, 20, 50, 0.06), 0 16px 32px rgba(10, 20, 50, 0.08);
  text-decoration: none;
}
.ct-card-icon {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.ct-card h3 {
  margin: 4px 0 0;
  font-size: 18px;
}
.ct-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
}
.ct-card-cta {
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
}

.ct-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ct-steps > li {
  counter-increment: step;
  padding: 16px 16px 16px 56px;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.ct-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ct-steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.ct-steps p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

pre.ct-code {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 16px 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  margin: 8px 0 0;
}
code.ct-inline {
  background: #eef2ff;
  color: var(--brand-ink);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.ct-note,
.ct-warn {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
}
.ct-note {
  background: #eef2ff;
  color: var(--brand-ink);
  border-left: 3px solid var(--brand);
}
.ct-warn {
  background: #fff8e1;
  color: #5c4a00;
  border-left: 3px solid var(--accent);
}

.ct-breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.ct-breadcrumbs a {
  color: var(--muted);
}

.ct-event-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
  border: 1px solid var(--line);
}
.ct-event-table th,
.ct-event-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ct-event-table th {
  background: #f3f5fb;
  font-weight: 600;
  color: var(--brand-ink);
}
.ct-event-table tr:last-child td {
  border-bottom: none;
}
.ct-event-table code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--brand-ink);
}

/* Layout do exemplo (live demo) */
.ct-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 720px) {
  .ct-demo {
    grid-template-columns: 1fr;
  }
}
.ct-demo-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.ct-demo-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--brand-ink);
}
.ct-demo-log {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: #0f172a;
  color: #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  height: 220px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
}
.ct-demo-log .ok {
  color: #4ade80;
}
.ct-demo-log .err {
  color: #f87171;
}
.ct-demo-log .ev {
  color: #fcd34d;
}

.ct-button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}
.ct-button:hover {
  background: var(--brand-ink);
}
.ct-button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.ct-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ct-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  background: var(--card);
}
