.sql-tab-wrapper {
  margin-bottom: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.sql-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.02));
}

.sql-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sql-tab:is(:hover, :focus-visible) {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.sql-tab.is-active {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 6px 12px rgba(29, 78, 216, 0.2);
}

.sql-tab.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.sql-tab i {
  font-size: 1rem;
}

.sql-tab-panels {
  padding: 20px 24px;
}

.sql-tab-panel[hidden] {
  display: none;
}

.sql-tab-panel.is-active {
  animation: sqlTabFade 0.2s ease;
}

.sql-tab-panel .sql-panel-content {
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.sql-tab-panel.is-active .sql-panel-content {
  opacity: 1;
}

.sql-panel-content {
  display: grid;
  gap: 12px;
  font-size: 0.95rem;
  color: #1f2937;
  line-height: 1.7;
}

.sql-panel-content .sql-placeholder {
  color: #6b7280;
  font-style: italic;
}

.sql-hidden {
  display: none !important;
}

.sql-panel-content table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
}

.sql-panel-content th,
.sql-panel-content td {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.sql-panel-content th {
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
}

.sql-schema h4 {
  margin: 12px 0 8px;
  font-size: 1rem;
  color: #1d4ed8;
}

.sql-schema table {
  margin-bottom: 12px;
}

.sql-panel-content ul {
  margin: 0;
  padding-left: 1.2rem;
}

.sql-panel-content .metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #0f5132;
}

.er-image {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

@media (max-width: 768px) {
  .sql-tab-list {
    flex-direction: column;
  }
  .sql-tab {
    width: 100%;
    justify-content: center;
  }
}

@keyframes sqlTabFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

pre.sql-choice-block {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #1f2937;
  font-size: 0.9rem;
  font-family: "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  border: 1px solid #d1d5db;
}

pre.sql-choice-block code {
  font-family: inherit;
}

.sql-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.sql-content-wrapper {
  max-width: 1240px;
  margin: 0 auto;
}

.sql-hero {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), rgba(14, 165, 233, 0.08));
  padding: 64px 0 56px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.sql-hero .main-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
}

.sql-hero .subtitle {
  max-width: 720px;
  font-size: 1.05rem;
  color: #1f2937;
  margin-bottom: 20px;
}

.sql-hero-grid {
  display: grid;
  gap: 28px;
  align-items: start;
}

@media (min-width: 992px) {
  .sql-hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

.sql-hero-copy {
  display: grid;
  gap: 16px;
}

.sql-breadcrumb {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
}

.sql-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.sql-breadcrumb a:hover {
  text-decoration: underline;
}

.sql-hero-points {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.sql-hero-points li {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 14px 18px;
  line-height: 1.6;
  color: #1f2937;
  font-size: 0.95rem;
}

.sql-hero-stats {
  display: grid;
  gap: 16px;
}

.sql-stat-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 6px;
}

.sql-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1d4ed8;
}

.sql-stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.sql-stat-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

.section-intro {
  color: #475569;
  font-size: 0.98rem;
  max-width: 760px;
  margin-bottom: 24px;
}

.sql-section-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #334155;
}

.sql-section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  font-weight: 600;
}

.sql-section-count {
  font-weight: 600;
}

.sql-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #0f172a;
  font-size: 0.82rem;
  margin-right: 6px;
}

.sql-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  height: 100%;
  display: grid;
  gap: 18px;
}

.sql-overview-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sql-overview-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

.sql-overview-list {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.7;
}

.sql-overview-link {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.sql-overview-link:hover {
  text-decoration: underline;
}

.sql-overview-card.roadmap {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(37, 99, 235, 0.08));
}

.sql-roadmap-grid {
  display: grid;
  gap: 16px;
}

.sql-roadmap-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 16px 18px;
}

.sql-roadmap-item h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #1d4ed8;
}

.sql-roadmap-item ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
}

.sql-roadmap-note {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}

.sql-resource-layout {
  align-items: stretch;
}

.sql-resource-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
}

.sql-resource-list li + li {
  margin-top: 6px;
}

.sql-cta {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(59, 130, 246, 0.08));
  padding: 48px 0 56px;
  margin-top: 64px;
}

.sql-cta-inner {
  display: grid;
  gap: 20px;
  align-items: center;
}

@media (min-width: 992px) {
  .sql-cta-inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.sql-cta-copy h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  color: #0f172a;
}

.sql-cta-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

.sql-cta-actions {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.sql-cta-link {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.sql-cta-link:hover {
  text-decoration: underline;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 24px;
}

.sql-section-cards .sql-section-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sql-section-card.active {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.18);
}

.sql-section-card.coming-soon {
  opacity: 0.9;
}

.sql-section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.sql-section-card .card-header {
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.sql-section-card.coming-soon .card-header {
  background: rgba(148, 163, 184, 0.15);
}

.sql-section-card .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.sql-section-card .card-meta {
  margin: 12px 0 0;
  padding-left: 20px;
  color: #334155;
  font-size: 0.9rem;
}

.sql-section-card .card-meta li + li {
  margin-top: 6px;
}

.sql-section-card .btn.disabled,
.sql-section-card .btn:disabled,
.sql-section-card .btn.disabled:hover {
  opacity: 0.7;
  cursor: not-allowed;
}

.resource-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
  height: 100%;
}

.resource-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e293b;
}

.resource-card ul {
  margin: 0;
  padding-left: 20px;
}

.resource-card ul li + li {
  margin-top: 6px;
}

.learning-steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 16px;
}

.learning-steps li {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.98rem;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.learning-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 20px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

@media (max-width: 992px) {
  .sql-hero {
    padding: 48px 0;
  }
  .sql-hero .main-title {
    font-size: 1.8rem;
  }
  .sql-hero .subtitle {
    font-size: 0.98rem;
  }
  .sql-section-card {
    min-height: auto;
  }
}

.sql-problem-card .custom-control-label {
  display: block;
  width: 100%;
}

.sql-problem-card .custom-control-label .sql-choice-block {
  margin-top: 8px;
}


.sql-columns {
  display: block;
  min-height: 0;
}

.sql-column-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  min-width: 0;
}

.sql-column-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
  min-height: 0;
  min-width: 0;
}

.sql-support-card .card-body {
  padding: 16px 20px;
}


.sql-support-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sql-support-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}


.sql-support-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
}

.sql-support-card .sql-tab-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sql-support-card .sql-tab-list {
  flex: 0 0 auto;
}

.sql-support-card .sql-tab-panels {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}


.same-section-heading {
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}
.sql-open-diagram {
  display: none;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.sql-open-diagram:hover,
.sql-open-diagram:focus-visible {
  background: #1d4ed8;
  color: #fff;
}

.sql-problem-context {
  padding: 12px 16px;
  border-radius: 10px;
  background: #eef2ff;
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #1f2937;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.sql-problem-context:empty {
  display: none;
}



@media (min-width: 1200px) {
  .sql-columns {
    display: flex;
    gap: 28px;
    align-items: stretch;
  }

  .sql-column-left {
    flex: 1 1 0;
  }

  .sql-column-right {
    flex: 0 0 32%;
    margin-top: 0;
  }

  .sql-support-card {
    flex: 1 1 auto;
  }

  .sql-content-wrapper {
    max-width: 1280px;
  }
}
