
    .codex-showcase {
      display: none;
      min-height: 0;
      padding: 0;
      position: relative;
    }

    .apps-showcase-page[data-showcase-section="codex"] > .hero {
      display: none !important;
    }

    .apps-showcase-page[data-showcase-section="codex"] .codex-showcase {
      display: block;
      animation: codexShowcaseIn 0.58s cubic-bezier(.2,.85,.25,1) both;
    }

    .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="games"],
    .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="apps"] {
      color: rgba(246,247,251,.82) !important;
      background: rgba(255,255,255,.025);
      border-color: rgba(255,255,255,.06);
      box-shadow: none;
      transform: none;
    }

    .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="games"]:not(.active):hover,
    .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="apps"]:not(.active):hover {
      color: #ffffff !important;
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.16);
      box-shadow: 0 12px 28px rgba(82, 199, 255, 0.12);
      transform: translateY(-1px);
    }

    /* On laptop/desktop widths Bootstrap's collapsed-nav rule sets transform:none !important.
       Restore the same subtle lift for pointer hover without changing touch navigation. */
    @media (hover: hover) and (min-width: 992px) {
      .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="games"]:not(.active):hover,
      .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="apps"]:not(.active):hover {
        transform: translateY(-1px) !important;
      }
    }

    .apps-showcase-page[data-showcase-section="codex"] .section-tab-link[data-showcase-tab="codex"] {
      color: #f1fff9 !important;
      border-color: rgba(111,241,194,.42);
      background: linear-gradient(135deg, rgba(55,193,145,.3), rgba(62,130,105,.22));
      box-shadow: inset 0 1px 0 rgba(220,255,242,.12), 0 14px 34px rgba(69,220,163,.14);
    }

    .apps-showcase-page[data-showcase-section="codex"] {
      --primary: #6ee5b5;
      --primary-strong: #39be85;
      --accent: #a3efce;
      --accent-soft: #b7f8db;
    }

    .codex-showcase .hero-shell::before {
      background:
        radial-gradient(circle at 18% 6%, rgba(88, 226, 168, .18), transparent 26%),
        radial-gradient(circle at 84% 16%, rgba(126, 230, 205, .14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 52%);
    }

    .codex-showcase .hero h1 {
      color: #f2fff8;
      text-shadow: 0 0 28px rgba(86, 222, 164, .2);
    }

    .codex-showcase .hero h1 .accent {
      background: linear-gradient(90deg, #74e9bb, #d2f1c9 44%, #a7eee0);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .codex-showcase .search-card::before {
      background: linear-gradient(135deg, rgba(77, 219, 160, .11), transparent 38%, rgba(122, 227, 255, .055));
    }

    .codex-showcase .search-paste-button {
      background:
        linear-gradient(135deg, rgba(79, 226, 171, .2), rgba(122, 227, 255, .08)),
        rgba(17, 26, 39, .94);
    }

    .codex-showcase .search-paste-button i,
    .codex-showcase .search-support-note i {
      color: #9bf3cd;
    }

    .codex-search-catalog {
      border-color: rgba(110, 229, 181, .22);
      background:
        linear-gradient(180deg, rgba(99, 228, 176, .15), rgba(99, 228, 176, .055)),
        rgba(255, 255, 255, .03);
      color: #effff7;
      box-shadow: 0 16px 34px rgba(48, 203, 143, .14);
    }

    .codex-search-catalog .search-buy-link__icon {
      color: #a8f8d1;
      background: rgba(75, 220, 160, .13);
    }

    .codex-search-catalog:hover {
      border-color: rgba(143, 244, 194, .52);
      background:
        linear-gradient(180deg, rgba(99, 228, 176, .21), rgba(99, 228, 176, .075)),
        rgba(255, 255, 255, .04);
      box-shadow: 0 22px 42px rgba(48, 203, 143, .22);
      color: #f4fffa;
    }

    .codex-search-promo {
      border-color: rgba(110, 229, 181, .2);
      border-left-color: rgba(143, 244, 194, .62);
      background:
        linear-gradient(135deg, rgba(84, 224, 167, .14), rgba(116, 222, 205, .06)),
        rgba(12, 20, 32, .8);
    }

    .codex-search-promo .promo-code-pill__deal { color: #b8f7d5; }
    .codex-search-promo .promo-code-pill__code { color: #f1fff8; }
    .codex-search-promo i { color: #a6f6ce; }

    .codex-search-promo:hover,
    .codex-search-promo:focus-visible {
      border-color: rgba(143, 244, 194, .46);
      border-left-color: rgba(143, 244, 194, .72);
      background:
        linear-gradient(135deg, rgba(84, 224, 167, .22), rgba(116, 222, 205, .1)),
        rgba(12, 24, 29, .84);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 34px rgba(48, 203, 143, .18);
      color: #f4fffa;
    }

    .apps-showcase-page[data-showcase-section="codex"] .codex-catalog-panel__primary {
      border: 0;
      color: #052118;
      background: linear-gradient(100deg, #78eaba, #9ee7c7 64%, #d4e4c4);
      box-shadow: 0 14px 28px rgba(43, 204, 145, .2);
    }

    .apps-showcase-page[data-showcase-section="codex"] .codex-catalog-panel__primary:hover,
    .apps-showcase-page[data-showcase-section="codex"] .codex-catalog-panel__primary:focus-visible {
      color: #052118;
      background: linear-gradient(100deg, #83efc0, #a8efd1 64%, #dcebcf);
      box-shadow: 0 18px 34px rgba(43, 204, 145, .28);
      filter: brightness(1.04);
    }

    .codex-feature-strip {
      margin-top: 2rem;
      margin-bottom: 0;
    }

    /* Keep CODEX in the exact same information rhythm as Games and Services:
       one grid, one card size, and the same readable type scale. */
    .apps-showcase-page[data-showcase-section="codex"] .codex-feature-strip {
      gap: 1rem;
      margin-top: 2rem;
    }

    .apps-showcase-page[data-showcase-section="codex"] .feature-card {
      min-height: 178px;
      padding: 1.15rem 1.1rem;
    }

    .apps-showcase-page[data-showcase-section="codex"] .feature-card:hover {
      border-color: rgba(110, 229, 181, .32);
      background: rgba(15, 32, 38, .76);
    }

    .apps-showcase-page[data-showcase-section="codex"] .feature-icon {
      background: linear-gradient(135deg, rgba(100, 229, 178, .18), rgba(111, 199, 236, .13));
      color: #bdf8db;
    }

    .apps-showcase-page[data-showcase-section="codex"] .feature-card h5 {
      font-size: 1rem;
    }

    .apps-showcase-page[data-showcase-section="codex"] .feature-card p,
    .apps-showcase-page[data-showcase-section="codex"] .search-support-note,
    .apps-showcase-page[data-showcase-section="codex"] .search-buy-link__meta {
      font-size: .93rem;
      line-height: 1.55;
    }

    .apps-showcase-page[data-showcase-section="codex"] .search-label,
    .apps-showcase-page[data-showcase-section="codex"] .codex-submit-button {
      font-size: 1rem;
    }

    /* Keep Codex controls as compact as the shared Games/Services controls. */
    .apps-showcase-page[data-showcase-section="codex"] .search-label {
      font-size: 0.92rem;
    }

    .apps-showcase-page[data-showcase-section="codex"] .search-paste-button {
      font-size: 0.86rem;
    }

    .apps-showcase-page[data-showcase-section="codex"] .search-paste-button:hover,
    .apps-showcase-page[data-showcase-section="codex"] .search-paste-button:focus-visible {
      border-color: rgba(143, 244, 194, .5);
      background:
        linear-gradient(135deg, rgba(84, 224, 167, .28), rgba(116, 222, 205, .11)),
        rgba(12, 24, 29, .88);
      box-shadow:
        0 16px 30px rgba(48, 203, 143, .2),
        inset 0 1px 0 rgba(255, 255, 255, .08);
      color: #f4fffa;
    }

    .apps-showcase-page[data-showcase-section="codex"] .search-paste-button:hover i,
    .apps-showcase-page[data-showcase-section="codex"] .search-paste-button:focus-visible i {
      color: #bdf8db;
    }

    /* The Codex title is longer, so use the same rhythm at a calmer scale. */
    .apps-showcase-page[data-showcase-section="codex"] .codex-hero h1 {
      margin: 1.3rem 0 1rem;
      font-family: "Unbounded", sans-serif;
      font-size: clamp(1.75rem, 4.2vw, 3.35rem);
      font-weight: 700;
      line-height: 1.08;
      letter-spacing: -0.04em;
    }

    .apps-showcase-page[data-showcase-section="codex"] .codex-submit-button {
      min-height: 56px;
    }

    .apps-showcase-page[data-showcase-section="codex"][data-codex-view="stats"] {
      /* The embedded dashboard uses the page background rather than a second dark canvas. */
      background: transparent;
    }

    .codex-submit-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: .55rem;
      text-shadow: none;
    }

    .codex-submit-button i {
      width: 1em;
      margin: 0 !important;
      text-align: center;
    }

    .codex-submit-button.is-loading i {
      animation: codexButtonSpin .72s linear infinite;
    }

    .codex-submit-button:active,
    .codex-submit-button:focus-visible {
      text-shadow: none;
    }

    .codex-shell {
      position: relative;
      overflow: hidden;
      width: min(100%, 1090px);
      margin: 0 auto;
      padding: clamp(1.25rem, 4vw, 2.55rem);
      border: 1px solid rgba(104, 232, 185, .22);
      border-radius: clamp(1.45rem, 3vw, 2.25rem);
      background:
        radial-gradient(circle at 10% 0%, rgba(72, 221, 168, .13), transparent 32%),
        radial-gradient(circle at 100% 100%, rgba(104, 221, 185, .09), transparent 30%),
        linear-gradient(140deg, rgba(11, 28, 31, .95), rgba(12, 23, 33, .96));
      box-shadow: 0 30px 84px rgba(0, 0, 0, .3), inset 0 1px rgba(228, 255, 246, .07);
    }

    .codex-shell::before,
    .codex-shell::after {
      position: absolute;
      width: 330px;
      height: 330px;
      border: 1px solid rgba(111, 241, 194, .13);
      border-radius: 50%;
      content: "";
      pointer-events: none;
    }

    .codex-shell::before { top: -220px; right: -128px; }
    .codex-shell::after { bottom: -252px; left: -146px; }

    .codex-launcher { position: relative; z-index: 1; }
    .codex-launcher.is-leaving {
      animation: codexLauncherLeave .34s cubic-bezier(.22,.75,.26,1) both;
      pointer-events: none;
    }
    .codex-launcher.is-returning {
      animation: codexLauncherReturn .46s cubic-bezier(.16,.9,.22,1) both;
    }
    .codex-heading { max-width: 760px; margin: 0 auto; text-align: center; }
    .codex-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: .48rem;
      margin: 0 0 .85rem;
      padding: .44rem .72rem;
      border: 1px solid rgba(115, 241, 196, .2);
      border-radius: 999px;
      color: #9ef4d1;
      background: rgba(65, 188, 142, .09);
      font-size: .8rem;
      font-weight: 700;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .codex-heading h1 {
      margin: 0;
      color: #f6fff9;
      font-family: "Unbounded", sans-serif;
      font-size: clamp(1.95rem, 4.8vw, 3.9rem);
      font-weight: 700;
      line-height: 1.08;
      letter-spacing: -.04em;
    }

    .codex-heading p {
      max-width: 760px;
      margin: 1rem auto 0;
      color: #acc9c0;
      font-family: "Space Grotesk", sans-serif;
      font-size: 1.06rem;
      line-height: 1.75;
    }

    .codex-key-card {
      position: relative;
      width: min(100%, 1040px);
      margin: clamp(1.5rem, 4vw, 2.6rem) auto 0;
      padding: 1.65rem;
      overflow: visible;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: var(--radius-xl);
      background: rgba(10, 16, 26, .86);
      box-shadow: 0 18px 50px rgba(0, 0, 0, .26);
    }

    .codex-key-card::before {
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(73, 225, 172, .1), transparent 38%, rgba(122, 227, 255, .055));
      content: "";
      pointer-events: none;
    }

    .codex-search-label {
      position: relative;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: .55rem;
      margin-bottom: .85rem;
      color: rgba(246, 247, 251, .88);
      font-family: "Space Grotesk", sans-serif;
      font-size: .98rem;
      font-weight: 700;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .codex-search-label i { color: #91f2ca; }

    .codex-key-row {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(190px, 212px);
      grid-template-areas:
        "key-input key-actions"
        "key-support key-actions"
        "key-cta key-actions";
      column-gap: .95rem;
      row-gap: .72rem;
      align-items: start;
    }

    .codex-entry-shell {
      grid-area: key-input;
      position: relative;
      min-width: 0;
      z-index: 2;
    }

    .codex-control-shell { position: relative; min-width: 0; }

    #codexKeyInput {
      width: 100%;
      min-width: 0;
      height: 58px;
      padding: 0 8.1rem 0 1.2rem;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 18px;
      outline: none;
      color: var(--text);
      background: rgba(255, 255, 255, .04);
      font-family: "Space Grotesk", sans-serif;
      font-size: 1rem;
      box-shadow: none;
      transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, background .25s ease;
    }

    #codexKeyInput::placeholder { color: rgba(159, 178, 198, .8); }

    #codexKeyInput:focus {
      border-color: rgba(86, 232, 178, .58);
      color: var(--text);
      background: rgba(255, 255, 255, .06);
      box-shadow: 0 0 0 5px rgba(73, 225, 172, .12);
      transform: translateY(-1px);
    }

    .codex-paste-button {
      position: absolute;
      top: 50%;
      right: .55rem;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      gap: .42rem;
      height: 44px;
      padding: 0 .9rem;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, .1);
      border-radius: 14px;
      color: #effff8;
      background:
        linear-gradient(135deg, rgba(78, 226, 173, .2), rgba(122, 227, 255, .08)),
        rgba(17, 26, 39, .94);
      font-family: "Space Grotesk", sans-serif;
      font-size: .86rem;
      font-weight: 800;
      letter-spacing: .02em;
      transform: translateY(-50%);
      transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background .24s ease, opacity .24s ease;
    }

    .codex-paste-button i { color: #9ff5cf; }

    .codex-paste-button:hover {
      border-color: rgba(88, 231, 178, .38);
      box-shadow: 0 16px 30px rgba(53, 206, 151, .18);
      transform: translateY(calc(-50% - 1px));
    }

    .codex-paste-button:active { transform: translateY(-50%); }

    .codex-paste-button:disabled,
    .codex-submit-button:disabled { cursor: wait; opacity: .62; }

    .codex-support-note {
      grid-area: key-support;
      display: flex;
      align-items: flex-start;
      gap: .45rem;
      min-height: 1.35rem;
      color: rgba(159, 178, 198, .92);
      font-family: "Space Grotesk", sans-serif;
      font-size: .78rem;
      line-height: 1.45;
    }

    .codex-support-note i { margin-top: .1rem; color: #91f2ca; }

    .codex-cta-row {
      grid-area: key-cta;
      display: flex;
      flex-wrap: wrap;
      gap: .65rem;
      align-items: stretch;
    }

    .codex-overview-card,
    .codex-security-card {
      display: inline-flex;
      align-items: center;
      min-width: 0;
      border: 1px solid rgba(255, 255, 255, .08);
      border-radius: 18px;
      background: rgba(255, 255, 255, .035);
      box-shadow: inset 0 1px rgba(255, 255, 255, .035);
    }

    .codex-overview-card {
      gap: .7rem;
      flex: 1 1 260px;
      padding: .64rem .8rem;
    }

    .codex-overview-card__icon {
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      flex: 0 0 34px;
      border-radius: 12px;
      color: #a7f7d5;
      background: rgba(70, 219, 163, .13);
    }

    .codex-overview-card__copy { display: grid; min-width: 0; gap: .08rem; }
    .codex-overview-card__title { color: #f4fff9; font-size: .86rem; font-weight: 800; }
    .codex-overview-card__meta { color: rgba(159, 178, 198, .86); font-size: .73rem; line-height: 1.25; }

    .codex-security-card {
      gap: .38rem;
      padding: .68rem .8rem;
      color: #baf7dc;
      font-size: .74rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .codex-security-card i { color: #91f2ca; }

    .codex-submit-column {
      grid-area: key-actions;
      display: grid;
      gap: .58rem;
      align-self: start;
    }

    .codex-submit-button {
      min-height: 58px;
      width: 100%;
      border: 0;
      border-radius: 18px;
      color: #052118;
      background: linear-gradient(100deg, #78eaba, #9ee7c7 64%, #d4e4c4);
      box-shadow: 0 14px 28px rgba(43, 204, 145, .2);
      font-family: "Space Grotesk", sans-serif;
      font-size: 1rem;
      font-weight: 700;
      transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, opacity .2s ease;
    }

    .codex-submit-button:hover,
    .codex-submit-button:active,
    .codex-submit-button:focus-visible,
    .codex-submit-button:disabled {
      color: #052118;
    }

    .codex-submit-button:hover {
      filter: brightness(1.05);
      box-shadow: 0 18px 34px rgba(43, 204, 145, .28);
      transform: translateY(-1px);
    }

    .codex-key-error {
      min-height: 0;
      margin: 0;
      padding: .62rem .76rem;
      border: 1px solid rgba(255, 116, 116, .22);
      border-radius: 14px;
      color: #ffbeb9;
      background: rgba(91, 24, 35, .22);
      font-family: "Space Grotesk", sans-serif;
      font-size: .84rem;
      line-height: 1.4;
      overflow-wrap: anywhere;
      animation: codexInlineNoticeIn .28s cubic-bezier(.2,.9,.25,1) both;
    }

    .codex-key-error:empty { display: none; }

    .codex-section-hint {
      display: grid;
      gap: .55rem;
      margin-top: .55rem;
      padding: .72rem;
      border: 1px solid rgba(105, 221, 178, .26);
      border-radius: 14px;
      background: rgba(18, 83, 64, .2);
      color: #c9f8e3;
      font: 600 .84rem/1.38 "Space Grotesk", sans-serif;
      animation: codexInlineNoticeIn .28s cubic-bezier(.2,.9,.25,1) both;
    }

    .codex-section-hint[hidden] { display: none; }

    .codex-section-hint__actions {
      display: flex;
      flex-wrap: wrap;
      gap: .45rem;
    }

    .codex-section-hint__button {
      min-height: 34px;
      padding: .42rem .7rem;
      border: 1px solid rgba(172, 255, 222, .28);
      border-radius: 10px;
      background: rgba(6, 25, 21, .42);
      color: #f0fff8;
      font: 700 .8rem/1 "Space Grotesk", sans-serif;
      transition: transform .18s ease, background .18s ease, border-color .18s ease;
    }

    .codex-section-hint__button:hover,
    .codex-section-hint__button:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(181, 255, 226, .58);
      background: rgba(58, 177, 132, .25);
      color: #ffffff;
    }
    .codex-dashboard-shell {
      position: relative;
      z-index: 1;
      min-height: 640px;
      margin: 0;
      overflow: visible;
      background: transparent;
      opacity: 1;
      transform: translateY(0);
      transition: opacity .4s cubic-bezier(.16,.86,.2,1);
    }
    /* The frame is prepared while invisible, then the parent and dashboard
       enter together. This avoids the previous second, abrupt paint. */
    .codex-dashboard-shell.is-primed { opacity: 0; transform: none; pointer-events: none; }
    .codex-dashboard-shell.is-entering {
      animation: codexDashboardEnter .42s cubic-bezier(.16,.86,.2,1) both;
      opacity: 1;
      transform: translateY(0);
    }
    .codex-dashboard-shell iframe { display: block; width: 100%; min-height: 640px; height: 840px; border: 0; background: transparent; }
    .apps-showcase-page[data-showcase-section="codex"][data-codex-view="stats"] .codex-showcase { background: transparent; }
    @keyframes codexShowcaseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes codexLauncherLeave { to { opacity: 0; transform: translateY(-9px) scale(.994); } }
    @keyframes codexLauncherReturn { from { opacity: 0; transform: translateY(14px) scale(.994); } 72% { opacity: 1; transform: translateY(-1px) scale(1.002); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes codexDashboardEnter { from { opacity: 0; } to { opacity: 1; } }
    @keyframes codexInlineNoticeIn { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @keyframes codexButtonSpin { to { transform: rotate(360deg); } }
    @media (max-width: 650px) {
      .apps-showcase-page[data-showcase-section="codex"] .codex-showcase {
        padding-top: .72rem;
      }
      .apps-showcase-page[data-showcase-section="codex"] .codex-hero {
        scroll-margin-top: 4.6rem;
      }
      .codex-shell { padding: 1rem; border-radius: 1.3rem; }
      .codex-key-card { padding: 1rem; }
      .codex-key-row {
        grid-template-columns: 1fr;
        grid-template-areas:
          "key-input"
          "key-support"
          "key-actions"
          "key-cta";
      }
      #codexKeyInput { padding-right: 6.15rem; }
      .codex-paste-button { height: 42px; padding: 0 .82rem; font-size: .8rem; }
      .codex-cta-row { display: grid; grid-template-columns: 1fr; }
      .codex-security-card { justify-content: center; white-space: normal; }
      .codex-dashboard-shell { min-height: 620px; }
      .codex-dashboard-shell iframe { min-height: 620px; }

      /* The guide lives inside the statistics iframe. While it is open, lift
         that frame to the browser viewport so a fixed dialog stays fixed for
         the user rather than to the scrolled statistics document. */
      body.codex-guide-open { overflow: hidden; }
      #codexDashboardShell.codex-dashboard-shell.is-guide-overlay {
        position: fixed;
        inset: 0;
        z-index: 10000;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
        background: transparent;
      }
      #codexDashboardShell.codex-dashboard-shell.is-guide-overlay #codexStatsFrame {
        width: 100vw;
        height: 100dvh !important;
        min-height: 100dvh;
      }
    }
  