/*
 * AidBase Design Polish — v1.0.0-alpha55
 * Decorative numbers are used only where sequence matters.
 * Non-sequential cards rely on icons and content, not mechanical numbering.
 */
:root{
  --aid-polish-shadow-sm:0 10px 28px rgba(18,42,72,.055);
  --aid-polish-shadow-md:0 20px 52px rgba(18,42,72,.085);
  --aid-polish-number-shadow:0 14px 28px rgba(24,70,112,.10);
}

/* A quieter, more deliberate card rhythm. */
.aidbase-card,
.aidbase-concern-card,
.consult-flow li,
.aid-recruit-steps article,
.aidbase-flow-grid article{
  box-shadow:var(--aid-polish-shadow-sm);
}

/* Shared decorative number: large, dimensional and partly hidden. */
.aidbase-card{
  isolation:isolate;
}
.aidbase-card__number{
  position:absolute;
  z-index:-1;
  top:-34px;
  right:12px;
  display:block;
  width:auto;
  height:auto;
  margin:0;
  border:0;
  border-radius:0;
  color:color-mix(in srgb,var(--aidbase-brand-primary,#2182d6) 13%,transparent);
  background:none;
  font-size:clamp(72px,8vw,112px);
  font-weight:950;
  line-height:1;
  letter-spacing:-.09em;
  text-shadow:var(--aid-polish-number-shadow);
  pointer-events:none;
  user-select:none;
}
.aidbase-card>h3,
.aidbase-card>p,
.aidbase-card>*:not(.aidbase-card__number){position:relative;z-index:1}

/* Company menu cards: the number becomes background typography, not a badge. */
@media(max-width:900px){
  .aidbase-mobile-nav__links a{
    position:relative;
    isolation:isolate;
    overflow:hidden;
    min-height:68px;
    padding:14px 18px;
    border-color:rgba(33,130,214,.10);
    background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(247,251,255,.88));
    box-shadow:var(--aid-polish-shadow-sm);
  }
  .aidbase-mobile-nav__links a span:first-child{
    position:relative;
    z-index:1;
    gap:0;
    font-size:13px;
    font-weight:820;
  }
  .aidbase-mobile-nav__links a i{
    position:absolute;
    z-index:-1;
    right:12px;
    bottom:-20px;
    display:block;
    width:auto;
    height:auto;
    border:0;
    border-radius:0;
    background:none;
    color:rgba(33,130,214,.09);
    font-size:58px;
    font-style:normal;
    font-weight:950;
    line-height:1;
    letter-spacing:-.08em;
    text-shadow:0 12px 24px rgba(33,130,214,.08);
  }
  .aidbase-mobile-nav__links a span:last-child{position:relative;z-index:2}
}

/* Sequential flow cards: keep the sequence, but make the number a visual layer. */
.aid-recruit-steps article{
  isolation:isolate;
  overflow:hidden;
}
.aid-recruit-steps article>span{
  position:absolute;
  z-index:-1;
  top:-28px;
  right:10px;
  display:block;
  width:auto;
  height:auto;
  margin:0;
  border:0;
  border-radius:0;
  background:none;
  color:color-mix(in srgb,currentColor 12%,transparent);
  font-size:clamp(68px,6vw,94px);
  font-weight:950;
  line-height:1;
  letter-spacing:-.08em;
  text-shadow:0 12px 25px rgba(26,73,99,.08);
  pointer-events:none;
}
.aid-recruit-steps article>h3,
.aid-recruit-steps article>p{position:relative;z-index:1}

/* Child-development flow is controlled exclusively by child-development.css. */

/* Home-care sub-steps remain readable but lose the generic circular badge. */
.aidbase-flow-grid li{
  position:relative;
  min-height:58px;
  padding:17px 0 17px 48px;
}
.aidbase-flow-grid li span{
  position:absolute;
  left:0;
  top:50%;
  display:block;
  width:auto;
  height:auto;
  border:0;
  border-radius:0;
  background:none;
  color:color-mix(in srgb,var(--homecare-accent,#2f7d96) 76%,#203b58);
  font-size:14px;
  font-weight:950;
  letter-spacing:.05em;
  transform:translateY(-50%);
}
.aidbase-flow-grid li span:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-6px;
  height:2px;
  border-radius:99px;
  background:linear-gradient(90deg,var(--homecare-accent,#2f7d96),transparent);
  opacity:.55;
}

/* Non-sequential concern / audience lists use a symbol, never a fake sequence. */
.consult-concern-grid span,
.aidcms-child-concern-grid span,
.after-target-grid span{
  font-size:0!important;
}
.consult-concern-grid span:before,
.aidcms-child-concern-grid span:before,
.after-target-grid span:before{
  content:"✓";
  font-size:15px;
  font-weight:950;
  line-height:1;
}

/* Typography and spacing polish. */
.aidbase-section__head h2,
.consult-heading h2,
.after-heading h2,
.aidcms-child-section-head h2{
  letter-spacing:-.025em;
  text-wrap:balance;
}
.aidbase-card h3,
.consult-support-grid h3,
.after-promise-grid h3,
.after-activity-grid h3,
.aidcms-child-support-grid h3{
  letter-spacing:-.018em;
}

@media(max-width:600px){
  .aidbase-card__number{top:-22px;right:8px;font-size:74px}
  .aid-recruit-steps article>span{top:-18px;right:8px;font-size:66px!important}
  .aidbase-mobile-nav__links a i{font-size:52px;bottom:-17px}
}
