/* Homepage text wrapping. */
.il-home-main :is(h2,h3,.btn,.csf b,.fan-cap span),
.il-home-main #why .cst h2 {
  white-space: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.il-home-main :is(.cst p,.lead,.bundle .bdis,.bn2,.wc p) {
  text-wrap: balance;
}
.il-home-main :is(.course .cd,.about p,.il-announcement-item,.contact .cthx) {
  text-wrap: pretty;
  overflow-wrap: break-word;
}
.il-home-main .bundle .bh2 { flex-wrap: wrap; }
.il-home-main .bundle .bh2 h3 { white-space: normal; }
.il-home-main :is(.bset,.bpanel) .bl ul li {
  white-space: normal;
  text-wrap: pretty;
}

/* Use the active public palette for the hero surfaces and controls. */
html body:not(.il-portal) #home.il-home-hero {
  --hero-ink: var(--color-text, #0f172a);
  --hero-accent: var(--color-primary-text, #c2410c);
  --hero-button: var(--color-primary, #ea580c);
  background-image: linear-gradient(var(--color-surface-2, #eef2f7), var(--color-background, #f4f6f9));
  background-image: var(--il-hero-background-layer,
    radial-gradient(ellipse at 16% 4%, color-mix(in srgb, var(--brand-tint, #ffedd5) 60%, transparent), transparent 64%),
    linear-gradient(var(--color-surface-2, #eef2f7), var(--color-background, #f4f6f9)));
  background-color: var(--color-background, #f4f7fb);
  background-size: 100% calc(100% - 32px);
  background-repeat: no-repeat;
  color: var(--hero-ink);
  padding-block: clamp(34px, 6vw, 88px) 0;
  overflow: visible;
  border: 0;
}
#home.il-home-hero::before,
#home.il-home-hero::after { content: none; }
#home.il-home-hero > .wrap.hsplit {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(0,1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  text-align: start;
}
html body:not(.il-portal) #home.il-home-hero .eb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 13px;
  max-width: 100%;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--brand-tint, #ffedd5);
  color: var(--on-tint, #9a3412);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.45;
  text-wrap: balance;
}
#home.il-home-hero .eb::before { content: none; }
#home.il-home-hero :is(.eb,.home-hero-benefit-icon) svg {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#home.il-home-hero .eb svg { width: 17px; height: 17px; color: var(--hero-accent); }
html body:not(.il-portal) #home.il-home-hero :is(.home-hero-title,.home-hero-title > span) { color: var(--hero-ink); }
#home.il-home-hero .hero-t { container-type: inline-size; }
#home.il-home-hero .home-hero-title {
  max-width: 100%;
  margin: 0 0 .27em;
  font: 800 clamp(1rem,3.65vw,3.6rem)/1.3 var(--f-head);
  font-size: clamp(1rem,8.7cqi,3.6rem);
  white-space: nowrap;
  text-wrap: nowrap;
}
#home.il-home-hero .home-hero-title > span { display: inline; white-space: inherit; }
#home.il-home-hero .home-hero-title .l2 { padding: 0; }
#home.il-home-hero .home-hero-title .l2::after { content: none; }
#home.il-home-hero .home-hero-title .home-hero-accent {
  display: inline;
  white-space: inherit;
  color: var(--hero-accent);
}
html body:not(.il-portal) #home.il-home-hero .hero-t > p {
  max-width: 39ch;
  margin: 0 0 22px;
  color: var(--color-text-2, #334155);
  font-size: clamp(.95rem,1.7vw,1.23rem);
  line-height: 1.7;
  text-align: start;
  text-wrap: balance;
}
#home.il-home-hero .hero-t .btns { gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
#home.il-home-hero .hero-t .btns .btn {
  min-height: 46px;
  padding: 7px clamp(10px,2.3vw,26px);
  border-radius: 10px;
  font-weight: 800;
  line-height: 1.4;
}
html body:not(.il-portal) #home.il-home-hero .home-hero-primary {
  color: var(--color-on-primary, #0f172a);
  background: var(--hero-button);
  border-color: var(--hero-button);
}
html body:not(.il-portal) #home.il-home-hero .home-hero-primary:is(:hover,:focus-visible) {
  background: var(--color-primary-hover, #c94b08);
  border-color: var(--color-primary-hover, #c94b08);
  color: var(--il-on-hover, #fff);
}
html body:not(.il-portal) #home.il-home-hero .btn.line { color: var(--hero-ink); border-color: var(--hero-ink); }
html body:not(.il-portal) #home.il-home-hero .btn.line:is(:hover,:focus-visible) { background: var(--color-surface, #fff); }
#home.il-home-hero :is(a,button):focus-visible { outline: 2px solid var(--hero-ink); outline-offset: 3px; }
#home.il-home-hero .home-hero-benefits {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin: clamp(18px,4vw,48px) 0 0;
  padding: 8px;
  list-style: none;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 18px;
  box-shadow: var(--shadow-soft, 0 10px 25px rgb(17 38 64 / 12%));
}
#home.il-home-hero .home-hero-benefits li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 12px;
  font-weight: 800;
  line-height: 1.45;
  text-wrap: balance;
}
#home.il-home-hero .home-hero-benefits li + li { border-inline-start: 1px solid var(--color-border, #e2e8f0); }
#home.il-home-hero .home-hero-benefit-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--color-surface-2, #eef2f7);
  color: var(--hero-ink);
}
@media (max-width: 760px) {
  html body:not(.il-portal) #home.il-home-hero { padding-block-start: 23px; }
  #home.il-home-hero > .wrap.hsplit { grid-template-columns: minmax(0,1fr); gap: 13px; text-align: center; }
  #home.il-home-hero .hero-t { display: block; }
  html body:not(.il-portal) #home.il-home-hero .eb {
    gap: 5px;
    padding-inline: 10px;
    font-size: .7rem;
  }
  #home.il-home-hero .eb svg { width: 15px; height: 15px; }
  #home.il-home-hero .home-hero-title { text-align: center; }
  html body:not(.il-portal) #home.il-home-hero .hero-t > p { display: block; margin: 0 auto 15px; text-align: center; }
  #home.il-home-hero .hero-t .btns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-width: 26rem; margin-inline: auto; }
  #home.il-home-hero .hero-t .btns .btn { width: 100%; min-height: 44px; padding-inline: 5px; font-size: clamp(.81rem,3.7vw,.94rem); }
  #home.il-home-hero .home-hero-benefits { grid-template-columns: repeat(2,minmax(0,1fr)); margin-block-start: 16px; }
  #home.il-home-hero .home-hero-benefits li { font-size: clamp(.75rem,3.35vw,.9rem); gap: 5px; padding: 7px 5px; }
  #home.il-home-hero .home-hero-benefits li:nth-child(odd) { border-inline-start: 0; }
  #home.il-home-hero .home-hero-benefits li:nth-child(n+3) { border-block-start: 1px solid var(--color-border, #e2e8f0); }
  #home.il-home-hero .home-hero-benefit-icon { width: 28px; height: 28px; border-radius: 8px; }
}
@media (max-width: 345px) {
  #home.il-home-hero .home-hero-benefits li {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 600px) {
  #home .hero-card { max-width: 235px; margin: 0 auto; }
  #home .hero-card:has(.il-hero-upload) { max-width: 350px; }
  #home .tiles { --bwmax: 69px; --k: .52; }
  #home .il-hero-upload { max-height: 178px; }
}

/* Match the illustration's moving elements to the published palette. */
#home.il-home-hero .hero-card .who .wp {
  fill: var(--il-hero-character, var(--il-component-icon, var(--color-text, #0f172a)));
}
#home.il-home-hero .hero-card .stars .s1 {
  fill: var(--il-hero-star-right, var(--il-accent, var(--color-primary, #ea580c)));
}
#home.il-home-hero .hero-card .stars .s2 {
  fill: var(--il-hero-star-left, var(--il-component-icon, var(--color-text, #0f172a)));
}

/* Pin the currency label to the physical left of the amount. */
.il-home-main :is(#courses .cpr,#bundle .bprice) .prices > div { direction: ltr; }
.il-home-main :is(#courses .cpr,#bundle .bprice) .prices > div > small {
  order: -1;
  direction: rtl;
}

/* Keep the bundle covers inside the rounded viewer, including while dragging. */
.il-home-main #bundle .bvis { overflow: hidden; }
@media (max-width: 760px) {
  .il-home-main #bundle .fan .s-r {
    transform: translate(-50%,-50%) translate(32%,5%) rotate(11deg) scale(.86);
  }
}

/* Keep the icons next to the titles and give descriptions the full card width. */
.il-home-main #why :is(.cst,.wc) p {
  text-align: start;
  text-wrap: pretty;
}
@media (max-width: 800px) {
  .il-home-main #why :is(.csb,.wc) {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 6px 12px;
  }
  .il-home-main #why :is(.csb > .cst,.wc > div) { display: contents; }
  .il-home-main #why :is(.csb h2,.wc h3) { margin: 0; }
  .il-home-main #why :is(.csb p,.wc p) { grid-column: 1 / -1; max-width: none; margin: 0; }
  .il-home-main #why .csb .cst > p {
    margin-block-start: 8px;
    text-align: right;
    text-wrap: balance;
  }
}

/* Preserve the amounts' baseline while labeling the crossed-out original. */
.il-home-main :is(#courses,#bundle) .il-previous-price {
  display: inline-block;
  position: relative;
  min-inline-size: 2rem;
  padding-block-start: .8rem;
  text-align: center;
}
.il-home-main :is(#courses,#bundle) .il-previous-label {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}

.il-home-main #bundle .il-previous-label { color: var(--on-dark-2, #cbd5e1); }

/* The bilingual wordmarks sit on the same dark surface as the other headings. */
.il-home-main #about .nmc .en { color: var(--il-dark-heading, var(--on-dark, #fff)); }

.il-home-main #why .why-heading-icon .il-why-upload {
  width: 24px;
  height: 24px;
  margin: 0;
}

/* Keep the actual notice border 16px below the hero. */
#home.il-home-hero + #il-site-announcements:not([hidden]) {
  margin-top: 16px;
}

/* Keep the moving character in a layer above all three columns. */
#home.il-home-hero .tiles { position: relative; }
#home.il-home-hero .who {
  display: block;
  left: calc(50% - var(--bw) * 1.687 - var(--g));
  bottom: calc(var(--bw) * 3.08 * var(--k));
  transform-box: border-box;
  z-index: 1;
  animation: none;
}
#home.il-home-hero .who > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Let the prompt generator description fill the available card width. */
#free .ftcard p.ftp {
  max-width: none;
  white-space: normal;
  text-align: start;
  text-wrap: wrap;
  text-wrap: pretty;
}

/* Align the Why section title to the start of the icon row. */
.il-home-main #why .csb .cst h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  text-align: start;
  text-wrap: wrap;
  justify-self: start;
}
