/* ---------- Page and background ---------- */

  .cp-page {
      position: relative;
      isolation: isolate;
      min-height: 100vh;
      color: #e6e6e6;
      background: #0b0f18;
      /* fallback if the image is missing */
  }

  .cp-bg-layer {
      position: fixed;
      inset: 0;
      z-index: -2;
      background-image: var(--cp-bg, none);
      background-size: cover;
      background-position: center top;
      background-color: #0b0f18;
      opacity: .8;
      pointer-events: none;
      transition: background-image 200ms ease;
  }

  /* Fixed to the viewport, so the art covers the whole page and never stretches */
  .cp-page::before {
      content: '';
      position: fixed;
      inset: 0;
      z-index: -2;
      background-image: var(--cp-bg, none);
      background-size: cover;
      background-position: center top;
      opacity: .8;
      pointer-events: none;
  }


  /* Uniform dark overlay so text stays readable over the art */
  .cp-page::after {
      content: '';
      position: fixed;
      inset: 0;
      z-index: -1;
      background: linear-gradient(180deg, rgba(11, 15, 24, .4) 0%, rgba(11, 15, 24, .7) 100%);
      pointer-events: none;
  }

  .cp-page h1,
  .cp-page h2,

  .cp-page p {
      color: #e6e6e6;
  }

  .cp-page {
      transition: opacity 150ms ease;
  }

  .cp-page.is-swapping {
      opacity: 0;
  }

  /* ---------- Sections ---------- */

  .cp-band {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2rem 1.5rem;
      box-sizing: border-box;
  }

  /* Only the hero is full height */
  .cp-hero {
      min-height: 35;
      padding-top: 1.5rem;
      padding-bottom: 1rem;

  }

  .cp-column {
      width: 100%;
      max-width: 1100px;
      margin-top: 12px;
      padding-top: 0.25rem;
      ;
  }

  /* ---------- Hero ---------- */

  .cp-hero-inner {
      width: 100%;
      max-width: 1100px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
  }

  .cp-title {
    color: var(--class-color, #f0c94a);
     text-shadow: 0 0 4px currentColor,
                  0 0 8px #0b0f18;

      font-size: 3.2rem;
      margin: 0;
      text-align: center;
  }

  .cp-augments {
      width: 100%;
      display: flex;
      justify-content: center;
      /* centers the cards across the row */
      align-items: center;
      gap: 1rem;
      flex-wrap: wrap;
  }

  .cp-caption {
      margin: 0;
      font-size: 1rem;
      font-style: italic;
      color: #c9a227;
      text-align: center;
  }

  /* ---------- Intro ---------- */

  .cp-intro .cp-column {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 3rem;
      align-items: center;
  }

  .cp-intro {
      height: 22vh;
      min-height: 140px;
      padding: 1.5rem;
      box-sizing: border-box;
  }

  .cp-overview {
      font-size: 1.25rem;
      line-height: 1.6;
      margin: 6px;
      padding-right: 8px;
  }

  .cp-spells {
      display: flex;
      gap: .75rem;
  }

  /* ---------- Specs ---------- */

  .cp-spec {
      height: 8vh;
      min-height: 150px;
      padding: 1rem 1.5rem;
      box-sizing: border-box;
  }

  .cp-spec-row {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 2rem;
      align-items: center;
      height: 100%;
  }

  .cp-spec-talents {
      display: grid;
      grid-template-columns: repeat(2, 64px);
      gap: .75rem;
  }

  .cp-spec-name {
      color: var(--spec-color, #f0c94a);
      font-size: 2rem;
      margin: 0 0 .75rem;
      text-shadow: 0 0 4px var(--spec-color);
    }

  .cp-spec-text p {
      font-size: 1.15rem;
      line-height: 1.6;
      margin: 0;
  }

  /* ---------- Footer / class selector ---------- */

  .cp-footer {
      padding: 2rem 1.5rem;
  }

  /* ---------- Talents ---------- */

  .cp-talent {
      position: relative;
      width: 64px;
      height: 64px;
  }

  .cp-talent img {
      display: block;
      box-sizing: border-box;
      border: 2px solid rgba(168, 168, 168, .466);
      outline: 2px solid #ffd24d;
      outline-offset: -1px;
      box-shadow: 0 0 0 3px rgba(255, 210, 77, .25);
      border-radius: 8px;
      object-fit: cover;
  }

  .cp-talent-title {
      color: #d4a84b;
      font-weight: 700;
  }

  .cp-missing {
      border: 1px dashed #555;
  }

  /* ---------- Spells ---------- */

  .cp-spell {
      width: 48px;
      height: 48px;
      cursor: default;
  }

  .cp-spell img {
      display: block;
      border: 1px solid #555;
      border-radius: 4px;
  }

  .cp-spell:hover img {
      border-color: #d4a84b;
  }

  .cp-spells-block {
      display: flex;
      flex-direction:
          column;
      gap: .75rem;
  }

  .cp-caption-left {
      text-align: left;
  }

  .cp-spells {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
  }

  .cp-spell-card {
      width: 300px;
      box-sizing: border-box;
      padding: 10px 12px;
      border: 3px solid #4d4e50;
      border-radius: 8px;
      background:
          linear-gradient(180deg,
              rgba(10, 15, 28, 0.35) 0%,
              rgba(10, 15, 28, 0.75) 100%);
      box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
      font-size: 14px;
      line-height: 1.35;
  }

  .cp-spell-head {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 6px;
  }

  .cp-spell-head img {
      border: 2px solid #c9a227;
      border-radius: 4px;
      flex: 0 0 44px;
  }

  .cp-spell-name {
      color: #f0c94a;
      font-size: 16px;
      font-weight: 700;
  }

  .cp-spell-cost {
      display: inline-block;
      margin-top: 3px;
      padding: 1px 8px;
      border: 1px solid rgba(90, 150, 255, .5);
      border-radius: 3px;
      color: #6ea8ff;
      font-size: 13px;
      font-weight: 600;
  }

  .cp-spell-meta {
      color: #9aa6bd;
      font-size: 12px;
      line-height: 1.5;
  }

  .cp-spell-desc {
      margin-top: 8px;
      padding-top: 6px;
      font-size: 1rem;
      border-top: 1px solid rgba(201, 162, 39, .3);
      color: #d6dcea;
  }

  /* ---------- Augments ---------- */

  .cp-aug {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px 10px 6px 6px;
      min-width: 170px;
      background: linear-gradient(180deg, #1a2338 0%, #0d1424 100%);
      border: 1px solid #3a4560;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
      color: #e6e6e6;
      cursor: default;
      transition: border-color 80ms ease, box-shadow 80ms ease;
  }

  .cp-aug img {
      display: block;
      width: 40px;
      height: 40px;
      flex: 0 0 40px;
      border: 2px solid #c9a227;
      border-radius: 4px;
  }

  .cp-aug-name {
      color: #f0c94a;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.2;
  }

  .cp-aug-spec {
      font-size: 13px;
      font-weight: 600;
      line-height: 1.2;
  }

  .cp-aug:hover {
      border-color: #c9a227;
      box-shadow: 0 0 0 1px rgba(201, 162, 39, .4), 0 4px 12px rgba(0, 0, 0, .6);
  }

  /* ---------- Warnings ---------- */

  .cp-warnings {
      color: #f88;
  }


  /* ---------- Page layout ---------- */

  .cp-page .cp-shell {
      width: 100%;
      max-width: 1550px;
      margin: 0 auto;
      padding: 20px;
      box-sizing: border-box;
  }

  .cp-page .cp-main-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 245px;
      align-items: stretch;
      gap: 22px;
      width: 100%;
  }

  .cp-page .cp-main-content {
      display: flex;
      flex-direction: column;
      align-items: stretch;

      gap: 40px;
      min-width: 0;
  }

  /* ---------- Hero ---------- */

  .cp-page .cp-hero {
      min-height: 0;
      height: auto;
      padding: 1.5rem 1.5rem 1rem;
  }

  .cp-page .cp-hero-inner {
      max-width: 1100px;
      margin: 0 auto;
  }

  /* ---------- Intro: retain original fixed height ---------- */

  .cp-page .cp-intro {
      position: relative;
      display: block;

      height: 21vh;
      min-height: 140px;
      max-height: none;

      padding: 1.5rem;
      margin: 0;
      box-sizing: border-box;

      /* Spell cards may extend beyond the intro */
      overflow: visible;
  }

  /* Overview occupies the left side */
  .cp-page .cp-overview {
      position: relative;
      width: 36%;
      max-width: none;
      line-height: 1.6;
  }

  /* Spell Cards are positioned independently.*/
  .cp-page .cp-spells-block {
      position: absolute;
      top: 1.5rem;
      right: 1.5rem;

      width: 62%;
      height: auto;
      margin: 0;
      overflow: visible;

      z-index: 2;
  }

  /* Preserve natural card heights and the original card styling */
  .cp-page .cp-spells {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
      gap: 1rem;
      margin-left: 1rem;
      ;
      width: 100%;
      height: auto;
      overflow: visible;
  }

  .cp-page .cp-spell-card {
      width: 100%;
      min-width: 0;
      height: auto;
      max-height: none;
      align-self: start;
      overflow: visible;
      background:
          linear-gradient(180deg,
              rgba(10, 15, 28, 0.35) 0%,
              rgba(10, 15, 28, 0.75) 100%);
  }

  /* ---------- Specialization sections ---------- */

  .cp-page .cp-spec-list {
      display: flex;
      flex-direction: column;
      gap: 16px;
      width: 100%;
      min-width: 0;
  }

  .cp-page .cp-spec {
      height: 8vh;
      min-height: 150px;
      flex: 0 0 auto;

      padding: 1rem 1.5rem;
      margin: 0;

      box-sizing: border-box;
  }

  .cp-page .cp-spec-row {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 2rem;
      height: 100%;
  }

  /* ---------- Augments: right-hand rail ---------- */

  .cp-page .cp-augment-rail {
      display: flex;
      flex-direction: column;
      align-self: stretch;
      min-width: 0;

      /* No outer panel */
      padding: 0;
      border: none;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
  }

  .cp-page .cp-augment-heading {
      margin: 0 0 12px;
      padding: 0 0 12px;

      text-align: center;
      color: #f0c94a;
      border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  }

  /* Distribute Augments through the rail's available height */
  .cp-page .cp-augments {
      display: flex;
      flex: 1 1 auto;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: stretch;

      width: 100%;
      gap: 14px;
  }

  /* Larger Augment cards */
  .cp-page .cp-aug {
      display: flex;
      align-items: center;
      gap: 12px;

      width: 100%;
      min-width: 0;
      min-height: 68px;
      padding: 10px;

      box-sizing: border-box;
  }

  .cp-page .cp-aug img {
      width: 54px;
      height: 54px;
      flex: 0 0 54px;
      object-fit: cover;
  }

  /* ---------- Class selector ---------- */

  .cp-page .cp-footer {
      height: auto;
      min-height: 0;
      margin-top: 20px;
      padding: 1rem 0;

      border: none;
      background: transparent;
      box-shadow: none;
  }

  /* Class selector styles live in sections.css (single source). */

  /* ---------- Responsive layout ---------- */

  @media (max-width: 760px) {
      .cp-page .cp-shell {
          padding: 12px;
      }

      .cp-page .cp-main-grid {
          grid-template-columns: minmax(0, 1fr);
          gap: 20px;
      }

      .cp-page .cp-main-content {
          gap: 20px;
      }

      /* On narrow screens, cards return to normal flow */
      .cp-page .cp-intro {
          display: flex;
          flex-direction: column;
          gap: 16px;

          height: auto;
          min-height: 0;
          padding: 1rem;
      }

      .cp-page .cp-overview {
          width: 100%;
      }

      .cp-page .cp-spells-block {
          position: static;
          width: 100%;
      }

      .cp-page .cp-spells {
          grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .cp-page .cp-augment-rail {
          align-self: auto;
      }

      .cp-page .cp-augments {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          flex: initial;
          gap: 12px;
      }
  }

  @media (max-width: 460px) {

      .cp-page .cp-spells,
      .cp-page .cp-augments {
          grid-template-columns: minmax(0, 1fr);
      }
  }

  /* =============================
        AUGMENT COLOR SPECIFICATIONS 
       =============================

       Default Augment appearance */
  .cp-page .cp-aug {
      background: linear-gradient(135deg, rgba(20, 28, 42, 0.92), rgba(8, 13, 24, 0.96));
  }

  /* =========================================
   BARD
   ========================================= */

  .cp-page .cp-aug.class-bard.spec-discordance {
      background: linear-gradient(135deg, rgba(255, 72, 87, 0.38), rgba(8, 13, 24, 0.92));
  }   

  .cp-page .cp-aug.class-bard.spec-harmony {
      background: linear-gradient(135deg, rgba(212, 255, 56, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-bard.spec-symphony {
      background: linear-gradient(135deg, rgba(14, 235, 216, 0.438), rgba(8, 13, 24, 0.92));
  }

  /* =========================================
   DRUID
   ========================================= */

  .cp-page .cp-aug.class-druid.spec-balance {
      background: linear-gradient(135deg, rgba(117, 45, 224, 0.438), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-druid.spec-feral {
      background: linear-gradient(135deg, rgba(199, 115, 14, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-druid.spec-restoration {
      background: linear-gradient(135deg, rgba(43, 186, 0, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   HUNTER
   ========================================= */

  .cp-page .cp-aug.spec-beast-mastery {
      background: linear-gradient(135deg, rgba(0, 143, 36, 0.35), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.spec-marksmanship {
      background: linear-gradient(135deg, rgba(24, 85, 255, 0.35), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.spec-survival {
      background: linear-gradient(135deg, rgba(150, 127, 127, 0.35), rgba(8, 13, 24, 0.92));
  }

  /* =========================================
   MAGE
   ========================================= */

  .cp-page .cp-aug.class-mage.spec-arcane {
      background: linear-gradient(135deg, rgba(119, 77, 255, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-mage.spec-fire {
      background: linear-gradient(135deg, rgba(255, 42, 0, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-mage.spec-frost {
      background: linear-gradient(135deg, rgba(0, 183, 255, 0.38), rgba(8, 13, 24, 0.92));
  }

    /* =========================================
   NECROMANCER
   ========================================= */

  .cp-page .cp-aug.class-necromancer.spec-command {
      background: linear-gradient(135deg, rgba(14, 235, 216, 0.438), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-necromancer.spec-necrolyte {
      background: linear-gradient(135deg, rgba(255, 72, 87, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-necromancer.spec-thaumaturgy {
      background: linear-gradient(135deg, rgba(212, 255, 56, 0.38), rgba(8, 13, 24, 0.92));
  }

  /* =========================================
   PALADIN
   ========================================= */

  .cp-page .cp-aug.class-paladin.spec-holy {
      background: linear-gradient(135deg, rgba(255, 210, 77, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-paladin.spec-protection {
      background: linear-gradient(135deg, rgba(163, 122, 92, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-paladin.spec-retribution {
      background: linear-gradient(135deg, rgba(222, 0, 48, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   PRIEST
   ========================================= */

  .cp-page .cp-aug.class-priest.spec-discipline {
      background: linear-gradient(135deg, rgba(0, 184, 194, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-priest.spec-holy {
      background: linear-gradient(135deg, rgba(214, 201, 58, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-priest.spec-shadow {
      background: linear-gradient(135deg, rgba(89, 33, 255, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   ROGUE
   ========================================= */

  .cp-page .cp-aug.class-rogue.spec-assassination {
      background: linear-gradient(135deg, rgba(184, 2, 35, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-rogue.spec-combat {
      background: linear-gradient(135deg, rgba(255, 227, 43, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-rogue.spec-subtlety {
      background: linear-gradient(135deg, rgba(167, 36, 237, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   SHAMAN
   ========================================= */

  .cp-page .cp-aug.class-shaman.spec-elemental {
      background: linear-gradient(135deg, rgba(74, 234, 255, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-shaman.spec-enhancement {
      background: linear-gradient(135deg, rgba(255, 220, 82, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-shaman.spec-restoration {
      background: linear-gradient(135deg, rgba(105, 255, 51, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   SPELLBREAKER
   ========================================= */

  .cp-page .cp-aug.class-spellbreaker.spec-essence-weaver {
      background: linear-gradient(135deg, rgba(77, 255, 136, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-spellbreaker.spec-magicant {
      background: linear-gradient(135deg, rgba(255, 77, 77, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-spellbreaker.spec-warden {
      background: linear-gradient(135deg, rgba(77, 166, 255, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   WARLOCK
   ========================================= */

  .cp-page .cp-aug.class-warlock.spec-affliction {
      background: linear-gradient(135deg, rgba(35, 92, 0, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-warlock.spec-demonology {
      background: linear-gradient(135deg, rgba(139, 10, 139, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-warlock.spec-destruction {
      background: linear-gradient(135deg, rgba(255, 69, 0, 0.38), rgba(8, 13, 24, 0.92));
  }


  /* =========================================
   WARRIOR
   ========================================= */

  .cp-page .cp-aug.class-warrior.spec-arms {
      background: linear-gradient(135deg, rgba(255, 106, 0, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-warrior.spec-fury {
      background: linear-gradient(135deg, rgba(255, 226, 64, 0.38), rgba(8, 13, 24, 0.92));
  }

  .cp-page .cp-aug.class-warrior.spec-protection {
      background: linear-gradient(135deg, rgba(163, 122, 92, 0.38), rgba(8, 13, 24, 0.92));
  }