/* CASTDICE Ver.3.16.6 — top page method section ONLY.
 * Loaded after the unchanged v3.16.3/4 hero stylesheet.
 * No global rules, navigation rules, or data changes. */

/* Previously approved: remove only the label overlaying the headmaster's photo.
 * Keep the adjacent 'MESSAGE FROM THE HEADMASTER' heading. */
.cd-site .cd-message-image-shell > .cd-message-image-label {
  display: none !important;
}

@media (max-width: 580px) {
  /* Preserve two columns of STEP cards and keep each item inside its column. */
  .cd-site .cd-method-flow .cd-method-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .cd-site .cd-method-grid > .wp-block-column,
  .cd-site .cd-method-grid .cd-method-step {
    min-width: 0;
  }
  .cd-site .cd-method-heading .cd-method-title {
    font-size: clamp(18px, 5.2vw, 20px);
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .cd-site .cd-method-title .cd3166-line,
  .cd-site .cd-method-step-title .cd3166-line {
    display: block;
    /* At larger font zooms, wrap inside a phrase instead of overflowing. */
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .cd-site .cd-method-step {
    padding: 13px 10px;
  }
  .cd-site .cd-method-step-title {
    font-size: 13px !important;
    line-height: 1.58;
    letter-spacing: -.025em;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  /* Extra breathing room in 320px phones without shrinking titles to tiny type. */
  .cd-site .cd-method-flow { padding-inline: 13px; }
  .cd-site .cd-method-step { padding-inline: 9px; }
  .cd-site .cd-method-step-title { font-size: 12.5px !important; }
}
