/* Catalysts and Activation Energy (CHE7403)
   Layout only - every colour comes from the model-shell palette at runtime. */

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

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

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

/* The equation or rule heads the results card. */
.cat-eqhead {
  margin: 0 0 0.1rem;
  text-align: center;
  font-size: clamp(1.15rem, 2.8vw, 1.9rem);
  font-weight: 700;
  line-height: 1.3;
}

.cat-eqhead:empty,
.cat-eqkey:empty {
  display: none;
}

.cat-eqkey {
  margin: 0 0 0.4rem;
  text-align: center;
  font-size: 0.95rem;
}

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

/* The verdict is the most important thing on the page, so it is the largest text. */
.cat-verdict {
  margin: 0.5rem 0 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 3px solid;
  border-radius: 10px;
}

.cat-verdict-main {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.cat-verdict-sub {
  display: block;
  font-size: 1.05rem;
  margin-top: 0.15rem;
}

.cat-stats .cat-swatch {
  flex: 0 0 auto;
}

.cat-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
  font-size: 1.02rem;
}

.cat-swatch {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid;
  border-radius: 3px;
}

.cat-swatch--e {
  border-style: dashed;
}

.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.cat-tab {
  flex: 1 1 8rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.45rem 0.5rem;
  border: 2px solid;
  border-radius: 999px;
  cursor: pointer;
}

.cat-process {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.cat-slider {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 7.6rem;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

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

.cat-go {
  display: block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-weight: 800;
  border: 2px solid;
  border-radius: 999px;
  cursor: pointer;
}

.cat-sub {
  margin: 0 0 0.3rem;
  font-weight: 700;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.cat-chip {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.3rem 0.65rem;
  border: 2px solid;
  border-radius: 999px;
  cursor: pointer;
}

.cat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-progress {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.cat-dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 2px solid;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0;
  cursor: pointer;
}

.cat-dot[aria-current="true"] {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.cat-score {
  font-weight: 800;
  font-size: 0.9rem;
}

.cat-task {
  margin: 0.6rem 0 0.2rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.cat-intro {
  margin: 0 0 0.6rem;
  line-height: 1.5;
}

.cat-step {
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.5rem;
  border: 2px solid;
  border-radius: 8px;
}

.cat-step-q {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

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

.cat-strong {
  font-weight: 800;
}

.cat-feedback {
  margin: 0.6rem 0 0;
  min-height: 2.6em;
}

@media (max-width: 820px) {
  .cat-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cat-stage {
    height: 440px;
  }
  .cat-verdict-main {
    font-size: 1.35rem;
  }
}

.cat-stats {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}

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

.cat-check {
  display: block;
  margin: 0.6rem 0 0.2rem;
  font-weight: 700;
}

.cat-note {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Three energy-profile sketches to choose between. */
.cat-options button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.35rem;
  border: 2px solid;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.cat-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
}

.cat-options button {
  text-align: left;
  padding: 0.4rem 0.6rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .cat-tab,
  .cat-chip {
    transition: none;
  }
}

/* Results table for the counting experiment */
.cat-results {
  margin-top: 0.8rem;
}

.cat-table-scroll {
  overflow-x: auto;
}

.cat-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.cat-table th,
.cat-table td {
  padding: 0.25rem 0.35rem;
  border-bottom: 1px solid;
  text-align: left;
  vertical-align: bottom;
}

.cat-table td {
  font-weight: 700;
  white-space: nowrap;
}

/* Additions for the catalyst lesson */
.cat-swatch--dot {
  border-radius: 50%;
}

.cat-swatch--line {
  height: 0;
  border-width: 3px 0 0;
  border-radius: 0;
}

.cat-swatch--line.cat-swatch--dash {
  border-top-style: dashed;
}

.cat-steplist {
  margin: 0.8rem 0 0;
  padding-left: 1.4rem;
  line-height: 1.5;
}

.cat-steplist li {
  margin: 0.15rem 0;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.cat-steplist li[aria-current="step"] {
  font-weight: 800;
  outline: 2px solid currentColor;
}

.cat-q {
  margin: 0.2rem 0 0.4rem;
  font-weight: 700;
}

.cat-options button {
  text-align: left;
  font-weight: 600;
}
