/* The Arrhenius Equation (CHM2001, Lectures 5-6)
   Layout only - every colour comes from the model-shell palette at runtime. */

.arr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.arr-layout > * {
  min-width: 0;
}

/* Elements with their own display value would otherwise ignore the hidden attribute. */
.arr-layout [hidden] {
  display: none !important;
}

/* The equation heads the results card. */
.arr-eqhead {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
}

/* A x fraction = k, one card per term. */
.arr-terms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: stretch;
  margin-bottom: 0.6rem;
}

.arr-op {
  align-self: center;
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
}

.arr-term {
  border: 3px solid;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  text-align: center;
}

.arr-term-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.arr-term-val {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.arr-term-val-unit {
  font-size: 0.55em;
  font-weight: 700;
}

.arr-term-unit {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
}

.arr-term-what {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.arr-stage {
  display: block;
  width: 100%;
  height: 400px;
}

.arr-stats {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.arr-stats li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.2rem 0;
  font-size: 1.02rem;
}

.arr-swatch {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid;
  border-radius: 50%;
}

.arr-slider {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 7.6rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.arr-slider label {
  font-weight: 800;
}

.arr-slider input {
  width: 100%;
}

.arr-val {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.arr-guide {
  margin: 0.7rem 0;
  line-height: 1.5;
}

.arr-sub {
  margin: 0 0 0.3rem;
  font-weight: 800;
}

.arr-try {
  margin: 0 0 0.6rem;
  padding-left: 1.3rem;
  line-height: 1.5;
}

.arr-try li {
  margin-bottom: 0.3rem;
}

.arr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 820px) {
  .arr-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .arr-terms {
    grid-template-columns: minmax(0, 1fr);
  }
  .arr-op {
    font-size: 1.3rem;
    line-height: 1;
  }
  .arr-stage {
    height: 360px;
  }
}

@media (max-width: 480px) {
  .arr-slider {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "label value" "input input";
  }
  .arr-slider label {
    grid-area: label;
  }
  .arr-slider input {
    grid-area: input;
  }
  .arr-val {
    grid-area: value;
  }
}
