/* ! rs-shift-cards.css v1.1 (30 Nov 2026, proposed shared file) · data-sheet chemical shift cards (rs-shift-cards.js)
   One card per data-sheet row, ordered by shift: the displayed-formula fragment (the H the range is for circled), the
   label as the board writes it, a short plain description, the range, and a mini δ strip (high δ on the left).
   4 across on a wide page column, 3 on a tablet, 2 on a phone, 1 on the narrowest phones (then the drawing sits beside
   the words). The "List view" switch lines every zone up on one scale, one row each, for a quick look-up. */

.rs-sc {
  container-type: inline-size;
  margin: 12px 0 18px;
}

.rs-sc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 0 0 8px;
}

.rs-sc-title {
  margin: 0;
  font-weight: 800;
  color: var(--rs-navy, #394362);
}

.rs-sc-title .rs-sc-nw {
  white-space: nowrap;
}

.rs-sc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@container (min-width: 520px) {
  .rs-sc-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (min-width: 700px) {
  .rs-sc-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rs-sc-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 6px 8px 4px;
  border: 1px solid #d0d4e0;
  border-radius: 10px;
  background: #fff;
}

.rs-sc-fig {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  margin: 0 0 6px;
  padding: 2px;
  border-radius: 7px;
  background: #f5f6fb;
}

.rs-sc-fig svg {
  display: block;
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
}

.rs-sc-lab {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--rs-ink, #25242f);
}

.rs-sc-what {
  display: block;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #5a5e6e;
}

.rs-sc-range {
  display: block;
  margin-top: auto;
  padding-top: 4px;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--rs-navy, #394362);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rs-sc-strip {
  display: block;
  margin-top: 2px;
}

/* v1.1: the axis box is the scale. Its left edge is the top value (12 or 220) and its right edge 0; the track, the ticks,
   the numbers (each centred on its tick) and the zone all use that same box. Padding inside the card keeps the end numbers whole. */

.rs-sc-axis {
  position: relative;
  display: block;
  height: 30px;
  margin: 0 12px;
}

.rs-sc-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 8px;
  border-radius: 4px;
  background: #e9ebf0;
}

.rs-sc-zone {
  position: absolute;
  top: -2px;
  bottom: -2px;
  min-width: 3px;
  border-radius: 3px;
  background: var(--rs-navy, #394362);
}

.rs-sc-tick {
  position: absolute;
  top: 13px;
  width: 1px;
  height: 3px;
  margin-left: -0.5px;
  background: #8a8fa0;
}

.rs-sc-tick.is-big {
  height: 5px;
}

.rs-sc-num {
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  color: #5a5e6e;
}

.rs-sc-strip-list {
  display: none;
}

/* the narrowest phones: one card per row, the drawing beside the words */

@container (max-width: 329.98px) {
  .rs-sc-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 329.98px) {
  .rs-sc-card {
    display: grid;
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: 10px;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-fig {
    grid-row: 1 / 4;
    grid-column: 1;
    height: 76px;
    margin: 0;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-fig svg {
    max-height: 72px;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-lab, .rs-sc-what, .rs-sc-range {
    grid-column: 2;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-strip {
    grid-column: 1 / -1;
  }
}

/* List view: every zone on one scale, one row each */

.rs-sc.is-list .rs-sc-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid #d0d4e0;
  border-radius: 10px;
  overflow: hidden;
}

.rs-sc.is-list .rs-sc-card {
  display: grid;
  grid-template-columns: minmax(0, 34%) minmax(0, 20%) minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 3px 10px;
  border: 0;
  border-top: 1px solid #e0e3e8;
  border-radius: 0;
}

.rs-sc.is-list .rs-sc-card:first-child {
  border-top: 0;
}

.rs-sc.is-list .rs-sc-card:nth-child(even) {
  background: #f8f9fc;
}

.rs-sc.is-list .rs-sc-fig {
  display: none;
}

.rs-sc.is-list .rs-sc-lab {
  grid-column: 1;
  font-size: 0.95rem;
}

.rs-sc.is-list .rs-sc-what {
  grid-column: 1;
}

.rs-sc.is-list .rs-sc-range {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  white-space: normal;
}

.rs-sc.is-list .rs-sc-strip {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
}

.rs-sc.is-list .rs-sc-strip-card {
  display: none;
}

.rs-sc.is-list .rs-sc-strip-list {
  display: block;
}

@container (max-width: 459.98px) {
  .rs-sc.is-list .rs-sc-card {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
    padding: 5px 8px;
  }
}

@container (max-width: 459.98px) {
  .rs-sc.is-list .rs-sc-range {
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: right;
    white-space: nowrap;
  }
}

@container (max-width: 459.98px) {
  .rs-sc.is-list .rs-sc-strip {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* phones: smaller drawings, so two cards a row stay compact (kept after the base rules so they win) */

@container (max-width: 519.98px) {
  .rs-sc-card {
    padding: 5px 7px 3px;
  }
}

@container (max-width: 519.98px) {
  .rs-sc-fig {
    height: 70px;
    margin-bottom: 4px;
  }
}

@container (max-width: 519.98px) {
  .rs-sc-fig svg {
    max-height: 66px;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-fig {
    height: 64px;
    margin: 0;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-fig svg {
    max-height: 60px;
  }
}

@container (max-width: 329.98px) {
  .rs-sc-range {
    font-size: 1rem;
    white-space: normal;
  }
}

/* v1.1: ten cards (Carbon-13, AQA) fill rows of five on a wide column */

@container (min-width: 700px) {
  .rs-sc[data-cols="5"]:not(.is-list) .rs-sc-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

