.aicode-page h1,
.aicode-page h2,
.aicode-page h3 {
  overflow-wrap: normal;
  word-break: normal;
}

.aicode-page h1 {
  max-width: none;
  font-size: 4.5rem;
}

.aicode-page h2 {
  font-size: 4.6rem;
}

.aicode-page h3 {
  font-size: 2.8rem;
}

.aicode-page .nav-links a[href="https://aiformakers.my/"] {
  color: var(--white);
}

.aicode-page .hero-copy h1::after {
  content: none;
}

.aicode-page h1 span {
  display: block;
  white-space: nowrap;
}

.challenge-hero.section-grid {
  grid-template-columns: minmax(0, 0.88fr) minmax(390px, 0.68fr);
  gap: 54px;
  padding-bottom: 34px;
}

.challenge-panel {
  gap: 18px;
}

.challenge-visual {
  position: relative;
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: visible;
}

.challenge-visual::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 2px solid rgba(252, 209, 6, 0.3);
  border-left-color: rgba(206, 17, 38, 0.7);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.challenge-cutout {
  position: relative;
  z-index: 1;
  display: block;
  width: min(95%, 560px);
  height: auto;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.08) drop-shadow(0 30px 48px rgba(0, 0, 0, 0.58));
  animation: challenge-drift 7.2s ease-in-out 0.3s infinite;
}

.challenge-chip {
  position: absolute;
  z-index: 2;
  max-width: 230px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(252, 209, 6, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.38);
}

.chip-theme {
  top: 12%;
  left: 3%;
  animation: chip-hover-a 5.8s ease-in-out infinite;
}

.chip-track {
  right: 4%;
  top: 34%;
  color: var(--yellow);
  animation: chip-hover-b 6.2s ease-in-out 0.4s infinite;
}

.chip-build {
  right: 12%;
  bottom: 12%;
  background: rgba(206, 17, 38, 0.84);
  animation: chip-hover-c 5.4s ease-in-out 0.2s infinite;
}

.aicode-countdown {
  margin-top: 46px;
}

.maker-ticker {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-block: 1px solid rgba(252, 209, 6, 0.28);
  background: var(--red);
  color: var(--white);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.maker-ticker div {
  display: flex;
  min-width: max-content;
  animation: maker-ticker 28s linear infinite;
}

.maker-ticker span {
  display: block;
  padding: 16px 14px;
}

.challenge-stats {
  gap: 12px;
  margin-top: 24px;
  border: 0;
}

.challenge-stats div {
  display: grid;
  min-height: 138px;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 22px 18px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(252, 209, 6, 0.08), transparent 35%),
    rgba(16, 16, 16, 0.9);
}

.challenge-stats strong {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  font-size: clamp(2.3rem, 3.8vw, 3.35rem);
  line-height: 0.9;
  text-align: center;
}

.challenge-stats strong small {
  color: var(--red);
  font-family: var(--body);
  font-size: 0.32em;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.challenge-stats span {
  max-width: 13ch;
  line-height: 1.15;
  text-align: center;
}

.section-shell {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: var(--section-pad) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aicode-page :where(.section-shell, .challenge-intro, .aicode-register) {
  scroll-margin-top: calc(var(--header-offset) + 112px);
}

.section-shell:where(.timeline, .faq) {
  border-block: 1px solid rgba(255, 255, 255, 0.14);
}

.challenge-intro {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.submission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.submission-card,
.proposal-panel,
.track-card,
.timeline-card,
.rule-card,
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(252, 209, 6, 0.08), transparent 34%),
    rgba(16, 16, 16, 0.9);
}

.submission-card {
  display: grid;
  gap: 16px;
  min-height: 360px;
  align-content: start;
  padding: 26px;
}

.card-number,
.track-card span,
.timeline-card span,
.rule-card span {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.submission-card h3 {
  color: var(--yellow);
  font-size: 2.05rem;
}

.submission-card p,
.proposal-list span,
.track-card p,
.rule-card p,
.faq-answer p {
  color: var(--muted);
}

.submission-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.submission-card li {
  position: relative;
  padding-left: 22px;
  font-weight: 800;
}

.submission-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 9px;
  height: 9px;
  background: var(--yellow);
  transform: rotate(45deg);
}

.proposal-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: 32px;
  margin-top: 16px;
  padding: 30px;
  background:
    linear-gradient(115deg, rgba(206, 17, 38, 0.2), transparent 42%),
    var(--charcoal);
}

.proposal-panel h3 {
  margin-top: 16px;
  color: var(--white);
  font-size: 2.35rem;
}

.proposal-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: proposal;
}

.proposal-list li {
  counter-increment: proposal;
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 12px 46px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.proposal-list li::before {
  content: counter(proposal, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--yellow);
  font-weight: 900;
}

.proposal-list strong,
.track-card strong,
.timeline-card strong {
  color: var(--white);
  font-weight: 900;
  line-height: 1.12;
  text-transform: uppercase;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.track-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px 18px;
  min-height: 218px;
  padding: 22px;
}

.track-card p,
.track-tags {
  grid-column: 2;
}

.track-card .track-meaning {
  color: var(--white);
  font-size: 1rem;
  line-height: 1.38;
}

.track-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  margin-top: 2px;
}

.track-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(252, 209, 6, 0.3);
  border-radius: 999px;
  background: rgba(252, 209, 6, 0.08);
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: center;
  min-height: 86px;
  padding: 18px 20px;
}

.timeline-card.finale {
  border-color: rgba(252, 209, 6, 0.36);
  background:
    linear-gradient(105deg, rgba(206, 17, 38, 0.32), transparent 48%),
    var(--graphite);
}

.timeline-card time {
  color: var(--yellow);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.rule-card {
  display: grid;
  gap: 12px;
  min-height: 230px;
  align-content: start;
  padding: 22px;
}

.rule-card.wide {
  grid-column: span 2;
}

.rule-card h3 {
  color: var(--yellow);
  font-size: 1.85rem;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  overflow: hidden;
}

.faq-question {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-family: var(--body);
  text-align: left;
}

.faq-question span {
  color: var(--yellow);
  font-weight: 900;
}

.faq-question strong {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.faq-question em {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(252, 209, 6, 0.34);
  border-radius: 8px;
  color: var(--yellow);
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease-out);
}

.faq-answer > p {
  min-height: 0;
  overflow: hidden;
  padding: 0 76px 0 88px;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-item.is-open .faq-answer > p {
  padding-bottom: 22px;
}

.faq-item.is-open .faq-question em {
  background: var(--yellow);
  color: var(--black);
}

.aicode-register .register-inner {
  background:
    linear-gradient(115deg, rgba(206, 17, 38, 0.28), transparent 40%),
    linear-gradient(300deg, rgba(252, 209, 6, 0.14), transparent 34%),
    var(--charcoal);
}

.register-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

html.js
  .aicode-page
  :where(
    .countdown-grid,
    .countdown-title,
    .manifesto > div,
    .manifesto-list article,
    .stats-band,
    .section-heading,
    .register-inner
  ) {
  opacity: 1;
}

html.js .ai-reveal {
  opacity: 0;
}

html.js .ai-reveal.is-revealing {
  animation: aicode-reveal-up 620ms var(--ease-out) var(--reveal-delay, 0ms) both;
}

html.js .ai-reveal.is-visible {
  opacity: 1;
}

@keyframes maker-ticker {
  to {
    transform: translateX(-100%);
  }
}

@keyframes challenge-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(-1.2deg);
  }
}

@keyframes chip-hover-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(8px, -8px, 0);
  }
}

@keyframes chip-hover-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-7px, 7px, 0);
  }
}

@keyframes chip-hover-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(6px, 6px, 0);
  }
}

@keyframes aicode-reveal-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .aicode-page h1 {
    font-size: 3.55rem;
  }

  .aicode-page h2 {
    font-size: 3.45rem;
  }

  .aicode-page h3 {
    font-size: 2.15rem;
  }

  .challenge-hero.section-grid,
  .submission-grid,
  .proposal-panel,
  .track-grid,
  .rules-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .challenge-visual {
    min-height: 340px;
  }

  .challenge-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .proposal-panel {
    gap: 24px;
  }

  .timeline-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .timeline-card time {
    grid-column: 2;
    text-align: left;
  }

  .rule-card.wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .aicode-page h1 {
    font-size: 2.25rem;
  }

  .aicode-page h2,
  .aicode-page .section-heading.compact h2 {
    font-size: 2.35rem;
  }

  .aicode-page h3 {
    font-size: 1.55rem;
  }

  .section-shell {
    width: min(100% - 24px, var(--max));
    padding: var(--section-pad) 0;
  }

  .challenge-hero.section-grid {
    padding-top: 44px;
  }

  .challenge-visual {
    min-height: 270px;
  }

  .challenge-chip {
    max-width: 170px;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 0.62rem;
  }

  .chip-theme {
    left: 0;
  }

  .chip-track {
    right: 0;
  }

  .chip-build {
    right: 4%;
  }

  .maker-ticker {
    font-size: 0.9rem;
  }

  .maker-ticker span {
    padding: 13px 10px;
  }

  .challenge-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .challenge-stats div {
    min-height: 118px;
    gap: 10px;
    padding: 18px 12px 16px;
  }

  .challenge-stats strong {
    min-height: 0;
    font-size: 2rem;
  }

  .challenge-stats span {
    max-width: 11ch;
  }

  .submission-card,
  .proposal-panel,
  .track-card,
  .rule-card {
    min-height: 0;
    padding: 18px;
  }

  .track-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .track-card p {
    grid-column: 1 / -1;
  }

  .proposal-list li {
    padding-left: 38px;
  }

  .timeline-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .timeline-card time {
    grid-column: auto;
  }

  .faq-question {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    gap: 10px;
    min-height: 68px;
    padding: 14px;
  }

  .faq-question em {
    width: 32px;
    height: 32px;
  }

  .faq-answer > p {
    padding: 0 18px 0 62px;
  }

  .aicode-register .register-inner {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .maker-ticker div {
    animation: none;
  }

  .challenge-cutout,
  .challenge-chip {
    animation: none;
  }

  html.js .ai-reveal {
    opacity: 1;
  }
}
