:root {
  --chae-navy: #071a3a;
  --chae-navy-dark: #041126;
  --chae-blue: #0b2b66;
  --chae-red: #e63332;
  --chae-red-dark: #c8232b;
  --chae-white: #ffffff;
  --chae-light: #f4f7fb;
  --chae-text: #0b1730;
  --chae-muted: #5b6475;
  --chae-border: rgba(7, 26, 58, .12);
  --chae-shadow: 0 18px 42px rgba(7, 26, 58, .13);
  --chae-radius: 22px;
  --chae-max: 1180px;
}

/* =========================================================
   GLOBAL RESET
========================================================= */

.chae-page,
.chae-page *,
.ca-page,
.ca-page * {
  box-sizing: border-box;
}

.chae-page,
.ca-page {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--chae-text);
  background: var(--chae-white);
  line-height: 1.55;
  overflow-x: hidden;
}

.chae-page a,
.ca-page a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   GLOBAL WRAP / SECTION
========================================================= */

.chae-wrap,
.ca-wrap {
  width: min(var(--chae-max), calc(100% - 40px));
  margin: 0 auto;
}

.chae-section,
.ca-section {
  padding: 82px 0;
}

.chae-section-light,
.ca-section-light {
  background: linear-gradient(180deg, #ffffff, var(--chae-light));
}

/* =========================================================
   TYPO
========================================================= */

.chae-eyebrow,
.ca-eyebrow {
  color: var(--chae-red);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 10px;
}

.chae-section-head,
.ca-section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 38px;
}

.chae-section-head h2,
.ca-section-head h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.02;
  margin: 0 0 14px;
  letter-spacing: -.04em;
  text-transform: uppercase;
  font-weight: 950;
  color: var(--chae-text);
}

.chae-section-head p,
.ca-section-head p {
  color: var(--chae-muted);
  font-size: 17px;
  margin: 0;
}

/* =========================================================
   BUTTONS
========================================================= */

.chae-btn,
.ca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 15px 24px;
  border-radius: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .02em;
  border: 2px solid transparent;
  transition:
    transform .2s ease,
    background .2s ease,
    box-shadow .2s ease;
  font-size: 13px;
}

.chae-btn:hover,
.ca-btn:hover {
  transform: translateY(-2px);
}

.chae-btn-primary,
.ca-btn-primary {
  background: var(--chae-red);
  color: #fff !important;
  box-shadow: 0 14px 25px rgba(230, 51, 50, .26);
}

.chae-btn-primary:hover,
.ca-btn-primary:hover {
  background: var(--chae-red-dark);
}

.chae-btn-outline,
.ca-btn-outline {
  border-color: rgba(255,255,255,.82);
  color: #fff !important;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
}

/* =========================================================
   MOBILE TEXT STRENGTH
========================================================= */

@media (max-width: 640px) {

  .chae-page,
  .ca-page {
    color: #071a3a !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .chae-section-head p,
  .ca-section-head p {
    color: #24324a !important;
    font-weight: 650 !important;
    line-height: 1.58 !important;
  }

}

/* =========================================================
   GLOBAL TOPBAR / NAVIGATION
   Gemensam komponent för både chae- och ca-sidor.
========================================================= */

.chae-topbar,
.ca-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 26, 58, .98);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
}

body.admin-bar .chae-topbar,
body.admin-bar .ca-topbar {
  top: 0 !important;
}

.chae-nav,
.ca-nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.chae-brand,
.ca-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  flex: 0 0 auto;
  text-decoration: none;
}

.chae-logo-img,
.ca-logo-img {
  width: 45px;
  height: auto;
  display: block;
}

.chae-brand-title,
.ca-brand-title {
  color: #fff;
  font-size: 27px;
  line-height: .9;
  font-weight: 950;
  letter-spacing: .04em;
}

.chae-brand-title span,
.ca-brand-title span {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: .20em;
  margin-top: 5px;
}

.chae-menu-toggle,
.ca-menu-toggle {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

.chae-menu-button,
.ca-menu-button {
  display: none;
}

.chae-menu,
.ca-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  flex: 1 1 auto;
}

.chae-menu a,
.ca-menu a {
  color: #fff;
  opacity: .94;
  white-space: nowrap;
  padding: 6px 0;
  text-decoration: none;
}

.chae-menu a:hover,
.ca-menu a:hover {
  opacity: 1;
}

.chae-menu a.chae-active,
.ca-menu a.ca-active {
  border-bottom: 3px solid var(--chae-red);
}

.chae-nav-cta,
.ca-nav-cta {
  background: var(--chae-red);
  color: #fff !important;
  padding: 14px 22px !important;
  border-radius: 9px;
  border-bottom: none !important;
  box-shadow: 0 8px 20px rgba(230, 51, 50, .22);
}

/* =========================================================
   GLOBAL HERO
========================================================= */

.chae-hero,
.ca-hero {
  min-height: 640px;
  background-size: cover;
  background-position: center right;
  color: #fff;
  display: flex;
  align-items: center;
}

.chae-hero-inner,
.ca-hero-inner {
  width: 100%;
  padding: 90px 0;
}

.chae-hero-content,
.ca-hero-content {
  max-width: 720px;
  padding-left: 18px;
}

.chae-hero h1,
.ca-hero h1 {
  font-size: clamp(58px, 8vw, 104px);
  line-height: .9;
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: -.055em;
  font-weight: 950;
  color: #fff;
}

.chae-hero h1 span,
.ca-hero h1 span {
  color: var(--chae-red);
}

.chae-hero p,
.ca-hero p {
  max-width: 620px;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.18;
  margin: 0 0 30px;
  font-weight: 850;
  color: #fff;
}

.chae-hero-small,
.ca-hero-small {
  max-width: 560px;
  font-size: 16px !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  opacity: .9;
  margin-bottom: 30px !important;
}

.chae-actions,
.ca-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* =========================================================
   GLOBAL HERO STATS
========================================================= */

.chae-hero-stats,
.ca-hero-stats {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  max-width: 780px !important;
  margin-top: 54px;
  padding-left: 18px !important;
}

.chae-stat,
.ca-stat {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 18px;
}

.chae-stat strong,
.ca-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 950;
  margin-bottom: 2px;
}

.chae-stat span,
.ca-stat span {
  display: block;
  font-size: 13px;
  opacity: .86;
}

/* =========================================================
   GLOBAL GRADE CARDS / BELTS
========================================================= */

.chae-grade-grid,
.ca-grade-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  width: 100% !important;
}

.chae-grade-card,
.ca-grade-card {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  background: #fff;
  border: 1px solid var(--chae-border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 12px 28px rgba(7,26,58,.08);
  min-height: 214px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.chae-grade-card:hover,
.ca-grade-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--chae-shadow);
  border-color: rgba(230, 51, 50, .24);
}

.chae-grade-card h3,
.ca-grade-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
  text-transform: uppercase;
}

.chae-grade-card p,
.ca-grade-card p {
  color: var(--chae-muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.chae-card-link,
.ca-card-link {
  margin-top: auto;
  color: var(--chae-blue);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 12px;
}

.chae-belt,
.ca-belt {
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(7,26,58,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.44);
  overflow: hidden;
}

.chae-belt-white,
.ca-belt-white {
  background: #f8fafc;
}

.chae-belt-yellow,
.ca-belt-yellow {
  background: #facc15;
}

.chae-belt-green,
.ca-belt-green {
  background: #22c55e;
}

.chae-belt-green-blue,
.ca-belt-green-blue {
  background: linear-gradient(to right, #22c55e 0%, #22c55e 72%, #2563eb 72%, #2563eb 100%);
}

.chae-belt-blue,
.ca-belt-blue {
  background: #2563eb;
}

.chae-belt-blue-red,
.ca-belt-blue-red {
  background: linear-gradient(to right, #2563eb 0%, #2563eb 72%, #dc2626 72%, #dc2626 100%);
}

.chae-belt-red,
.ca-belt-red {
  background: #dc2626;
}

.chae-belt-red-black-1,
.ca-belt-red-black-1 {
  background: linear-gradient(to right, #dc2626 0%, #dc2626 70%, #111827 70%, #111827 100%);
}

.chae-belt-red-black-2,
.ca-belt-red-black-2 {
  background:
    linear-gradient(
      to right,
      #dc2626 0%,
      #dc2626 52%,
      #111827 52%,
      #111827 61%,
      #dc2626 61%,
      #dc2626 72%,
      #111827 72%,
      #111827 100%
    );
}

.chae-belt-red-black-3,
.ca-belt-red-black-3 {
  background:
    linear-gradient(
      to right,
      #dc2626 0%,
      #dc2626 43%,
      #111827 43%,
      #111827 51%,
      #dc2626 51%,
      #dc2626 59%,
      #111827 59%,
      #111827 67%,
      #dc2626 67%,
      #dc2626 75%,
      #111827 75%,
      #111827 100%
    );
}

.chae-belt-black,
.ca-belt-black {
  background: #111827;
}

/* =========================================================
   MOBILE NAV / HERO / GRADE CARDS
========================================================= */

@media (max-width: 768px) {

  .chae-nav,
  .ca-nav {
    min-height: 76px;
  }

  .chae-menu-button,
  .ca-menu-button {
    display: flex;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
  }

  .chae-menu-button span,
  .chae-menu-button span::before,
  .chae-menu-button span::after,
  .ca-menu-button span,
  .ca-menu-button span::before,
  .ca-menu-button span::after {
    width: 23px;
    height: 3px;
    border-radius: 999px;
    background: #fff;
    display: block;
    content: "";
    position: relative;
  }

  .chae-menu-button span::before,
  .ca-menu-button span::before {
    position: absolute;
    top: -8px;
  }

  .chae-menu-button span::after,
  .ca-menu-button span::after {
    position: absolute;
    top: 8px;
  }

  .chae-menu,
  .ca-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--chae-navy);
    padding: 12px 20px 22px;
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .chae-menu a,
  .ca-menu a {
    padding: 15px 6px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .chae-menu a.chae-active,
  .ca-menu a.ca-active {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .chae-menu-toggle:checked ~ .chae-menu,
  .ca-menu-toggle:checked ~ .ca-menu {
    display: flex;
  }

  .chae-brand,
  .ca-brand {
    gap: 8px;
    min-width: 0;
    max-width: calc(100% - 64px);
  }

  .chae-logo-img,
  .ca-logo-img {
    width: 44px;
    flex: 0 0 auto;
  }

  .chae-brand-title,
  .ca-brand-title {
    font-size: 22px;
    line-height: .9;
    white-space: nowrap;
  }

  .chae-brand-title span,
  .ca-brand-title span {
    font-size: 10px;
    letter-spacing: .12em;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {

  .chae-wrap,
  .ca-wrap {
    width: min(100% - 28px, var(--chae-max));
  }

  .chae-hero,
  .ca-hero {
    min-height: 650px;
    background-position: 58% center;
  }

  .chae-hero-inner,
  .ca-hero-inner {
    padding: 70px 0 42px;
  }

  .chae-hero-content,
  .ca-hero-content {
    padding-left: 0 !important;
  }

  .chae-hero h1,
  .ca-hero h1 {
    font-size: 54px;
  }

  .chae-hero p,
  .ca-hero p {
    font-size: 20px;
  }

  .chae-hero-small,
  .ca-hero-small {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 650 !important;
    line-height: 1.6 !important;
    opacity: .98 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.18);
  }

  .chae-actions,
  .ca-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chae-btn,
  .ca-btn {
    width: 100%;
  }

  .chae-hero-stats,
  .ca-hero-stats {
    padding-left: 0 !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    margin-top: 34px;
  }

  .chae-stat,
  .ca-stat {
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .chae-stat span,
  .ca-stat span {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    opacity: .96 !important;
  }

  .chae-section,
  .ca-section {
    padding: 56px 0;
  }

  .chae-section-head,
  .ca-section-head {
    text-align: left;
    margin-bottom: 26px;
  }

  .chae-section-head h2,
  .ca-section-head h2 {
    font-size: 34px;
  }

  .chae-grade-grid,
  .ca-grade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .chae-grade-card,
  .ca-grade-card {
    min-height: auto !important;
    padding: 16px 12px !important;
  }

  .chae-grade-card h3,
  .ca-grade-card h3 {
    font-size: 18px !important;
  }

  .chae-grade-card p,
  .ca-grade-card p {
    color: #1f2937 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    letter-spacing: .01em !important;
  }

  .chae-belt,
  .ca-belt {
    height: 16px !important;
  }

  .chae-card-link,
  .ca-card-link {
    font-size: 12px !important;
    font-weight: 950 !important;
    letter-spacing: .02em !important;
  }
}
