/* Reading rhythm for AS Computer Science 1.1 only; leave the shared tabs intact. */
.as-cs-data-representation .content-section,
.as-cs-data-representation .worked-example {
  margin: 1.4rem 0;
  padding: 1.35rem 1.5rem;
}

.as-cs-data-representation .content-section:first-child {
  margin-top: 0;
}

.as-cs-data-representation .content-section h2 {
  margin: 0 0 1.15rem;
  padding-bottom: 0.7rem;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.3;
}

.as-cs-data-representation .content-section h3 {
  margin: 1.4rem 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.as-cs-data-representation .content-section h3:first-child {
  margin-top: 0;
}

.as-cs-data-representation .note-list {
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.as-cs-data-representation .note-list > li,
.as-cs-data-representation .note-sublist > li,
.as-cs-data-representation .worked-example p,
.as-cs-data-representation .calculation-step {
  line-height: 1.6;
}

.as-cs-data-representation .notes-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.as-cs-data-representation .notes-table-scroll:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.as-cs-data-representation .notes-table-scroll .comparison-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  margin: 0.6rem 0 0.8rem;
  overflow: visible;
}

.as-cs-data-representation .comparison-table th,
.as-cs-data-representation .comparison-table td {
  padding: 0.7rem 0.85rem;
}

.as-cs-data-representation .comparison-table td,
.as-cs-data-representation .comparison-table th {
  white-space: nowrap;
}

.as-cs-data-representation .revision-takeaway {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.9rem;
  border-left: 2px solid var(--primary-color);
  background: var(--primary-color-dim);
  line-height: 1.5;
}

.as-cs-data-representation .bit-place-table caption {
  caption-side: top;
  padding: 0.3rem 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
}

.as-cs-data-representation .bit-place-table th:nth-child(2),
.as-cs-data-representation .bit-place-table td:first-child {
  color: var(--primary-color);
  font-weight: 700;
}

.as-cs-data-representation .worked-example {
  counter-reset: example-step;
}

.as-cs-data-representation .worked-example-title {
  line-height: 1.4;
}

.as-cs-data-representation .worked-example .calculation-step {
  display: flex;
  gap: 0.8rem;
  margin: 0.6rem 0;
  padding-left: 0;
}

.as-cs-data-representation .worked-example .calculation-step::before {
  counter-increment: example-step;
  content: counter(example-step) ".";
  flex: 0 0 1.2rem;
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 600px) {
  .as-cs-data-representation .content-section,
  .as-cs-data-representation .worked-example {
    padding: 1rem;
  }
}
