/* AMC and ICAS use the visual hierarchy of the HAST practice landing page. */
.free-exam-layout .icas-hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #d9ddfa;
}
.free-exam-layout .icas-copy { padding: clamp(24px, 4vw, 56px); }
.free-exam-layout .icas-art {
  max-width: none;
  max-height: 300px;
  object-fit: contain;
  mask-image: linear-gradient(to right, transparent, black 11%, black 90%, transparent);
}
.free-exam-layout .icas-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
.free-exam-layout .icas-total { padding: 0; border: 0; background: transparent; }
.free-exam-layout .icas-start,
.free-exam-card-action {
  justify-content: center;
  background: #c82038;
  color: #fff;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  text-align: center;
}
.free-exam-layout .icas-start:hover { background: #a81830; color: #fff; }
.free-exam-notice {
  margin: 16px 0 0;
  padding: 12px 18px;
  border-radius: 14px;
  background: #e2f9ee;
}
.free-exam-layout .icas-subjects h2 { text-align: center; }
.free-exam-layout .icas-subject {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #e6f1ff;
}
.free-exam-layout .icas-subject:nth-child(3n + 2) { background: #e2f9ee; }
.free-exam-layout .icas-subject:nth-child(3n) { background: #eee8ff; }
.free-exam-layout .icas-subject:hover { border-color: #ff9eac; background: #fff2f6; }
.free-exam-layout .icas-icon {
  grid-row: span 2;
  background: transparent;
  font-size: 28px;
}
.free-exam-layout :is([data-amc-count], [data-icas-count]) {
  margin: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e4d9ff;
  color: #261949;
}
.free-exam-card-action { grid-column: 2 / -1; font-size: 14px; }
.free-exam-layout .free-exam-card-action {
  box-sizing: border-box;
  justify-self: start;
  width: 50%;
  min-width: min(100%, 8.5rem);
  padding: 8px 12px;
}
.free-exam-layout .icas-finder {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  border: 0;
  border-radius: 24px;
  background: #dff0fd;
}
#amc-page .free-exam-layout .icas-finder {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}
.free-exam-layout .icas-finder h2,
#amc-page .free-exam-layout .icas-finder h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 24px;
}
@media (max-width: 700px) {
  .free-exam-layout .icas-hero,
  .free-exam-layout .icas-grid,
  .free-exam-layout .icas-finder,
  #amc-page .free-exam-layout .icas-finder { grid-template-columns: 1fr; }
  .free-exam-layout .icas-art { max-height: 210px; }
}
@media (min-width: 701px) and (max-width: 850px) {
  .free-exam-layout .icas-finder .icas-start { grid-column: 1 / -1; justify-self: start; }
}

/* Carry the same panel colours through the guides and related practice links. */
:is(#amc-page .amc-bank, #amc-page .amc-faq, body:has(.free-exam-layout) .exam-support-grid #faq) {
  background: #ece7fc;
  border-radius: 24px;
}
:is(#amc-page .amc-official, body:has(.free-exam-layout) .exam-support-grid .exam-official-resources) {
  background: #dff0fd;
  border-radius: 24px;
}
#amc-page .amc-related a:nth-child(3n + 1) { background: #dff0fd; }
#amc-page .amc-related a:nth-child(3n + 2) { background: #e2f9ee; }
#amc-page .amc-related a:nth-child(3n) { background: #ece7fc; }
#amc-page .amc-related a:hover { background: #fff2f6; }
