/* JoSAA / CSAB Choice Guide */
.cg-page {
  background-color: #f1f5f9;
  background-image: radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  min-height: 100vh;
}

.cg-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #0d9488 100%);
}

.cg-hero-points {
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.cg-hero-points li {
  position: relative;
  padding-left: 1.25rem;
}

.cg-hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #5eead4;
  font-weight: 700;
}

.cg-hero-ctas {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
}

.cg-hero-cta {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.4rem;
  border-radius: 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: #e8581a;
  color: #fff !important;
  border: 2px solid #fdba74;
  box-shadow: 0 3px 10px rgba(232, 88, 26, 0.3);
}

.cg-hero-cta__long {
  display: none;
}

.cg-hero-cta__short {
  display: inline;
}

.cg-hero-cta--outline {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: none;
}

.cg-hero-cta--buy {
  background: #0f766e;
  border-color: #5eead4;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.35);
}

.cg-hero-cta:hover {
  filter: brightness(1.08);
}

@media (min-width: 640px) {
  .cg-hero-ctas {
    flex-wrap: wrap;
    gap: 0.65rem;
    max-width: 42rem;
  }

  .cg-hero-cta {
    flex: 0 1 auto;
    min-width: auto;
    font-size: 0.875rem;
    padding: 0.55rem 1.1rem;
  }

  .cg-hero-cta__long {
    display: inline;
  }

  .cg-hero-cta__short {
    display: none;
  }
}

.cg-breadcrumb {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.cg-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cg-breadcrumb__list li + li::before {
  content: "›";
  margin-right: 0.5rem;
  color: #94a3b8;
  font-weight: 600;
}

.cg-breadcrumb__list li[aria-current="page"] {
  color: #64748b;
  font-weight: 600;
}

.cg-site-brand__hi,
.cg-site-brand__en {
  margin: 0;
}

/* FAQ & resources — bottom of choice guide */
.cg-seo-block {
  margin-top: 0;
  padding: 2.5rem 0 3rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-top: 1px solid #e2e8f0;
}

.cg-seo-block__inner {
  max-width: 72rem;
  margin: 0 auto;
}

.cg-seo-block__header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1.75rem;
}

.cg-seo-block__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f766e;
  margin: 0 0 0.4rem;
}

.cg-seo-block__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.cg-seo-block__lead {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

.cg-seo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.cg-faq-panel {
  padding: 0;
  overflow: hidden;
}

.cg-faq-list {
  display: flex;
  flex-direction: column;
}

.cg-faq-item {
  border-bottom: 1px solid #e8edf2;
  background: #fff;
}

.cg-faq-item:last-child {
  border-bottom: none;
}

.cg-faq-item[open] {
  background: #fffbf7;
}

.cg-faq-item[open] .cg-faq-item__num {
  background: #e8581a;
  color: #fff;
  border-color: #e8581a;
}

.cg-faq-item[open] .cg-faq-item__chev {
  transform: rotate(180deg);
  color: #e8581a;
}

.cg-faq-item__summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem 1rem 1rem 1.1rem;
  min-height: 3.25rem;
  -webkit-tap-highlight-color: transparent;
}

.cg-faq-item__summary::-webkit-details-marker {
  display: none;
}

.cg-faq-item__summary::marker {
  display: none;
  content: "";
}

.cg-faq-item__num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cg-faq-item__q {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  text-align: left;
}

.cg-faq-item__summary:hover .cg-faq-item__q {
  color: #c2410c;
}

.cg-faq-item__chev {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.1rem;
}

.cg-faq-item__body {
  padding: 0 1.1rem 1.1rem 3.85rem;
}

.cg-faq-item__body p {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.65;
  margin: 0;
  max-width: 52rem;
}

.cg-resources-panel {
  padding: 1.25rem 1.1rem;
}

.cg-resources-panel__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.cg-resources-panel__desc {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.cg-resources-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.cg-resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e3a5f;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.cg-resource-link::after {
  content: "→";
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #e8581a;
  opacity: 0.7;
  transition: transform 0.15s, opacity 0.15s;
}

.cg-resource-link:hover {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
  box-shadow: 0 2px 8px rgba(232, 88, 26, 0.12);
}

.cg-resource-link:hover::after {
  transform: translateX(2px);
  opacity: 1;
}

.cg-resource-link--blog {
  border-left: 3px solid #0f766e;
}

.cg-noscript-seo a {
  color: #2563eb;
  text-decoration: underline;
}

body.cg-phase-gate #accessGate {
  scroll-margin-top: 5.5rem;
}

body.cg-phase-gate .cg-main {
  min-height: 50vh;
}

.cg-gate-panel {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 400px) {
  .cg-faq-item__body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .cg-faq-item__summary {
    gap: 0.55rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

@media (min-width: 640px) {
  .cg-seo-block__title {
    font-size: 1.5rem;
  }

  .cg-faq-item__summary {
    padding: 1.1rem 1.25rem;
  }

  .cg-faq-item__body {
    padding: 0 1.25rem 1.15rem 4.1rem;
  }

  .cg-faq-item__q {
    font-size: 0.9375rem;
  }

  .cg-resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }
}

@media (min-width: 1024px) {
  .cg-seo-block {
    padding: 3rem 0 3.5rem;
  }

  .cg-seo-block__header {
    margin-bottom: 2rem;
  }

  .cg-seo-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    gap: 1.5rem;
  }

  .cg-resources-grid {
    grid-template-columns: 1fr;
  }
}

.cg-strategy-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f766e;
  margin: 0 0 0.5rem;
}

.cg-strategy-panel__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.85rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cg-strategy-panel__intro {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
  border-left: 3px solid #e8581a;
  border-radius: 0 0.5rem 0.5rem 0;
}

.cg-strategy-principles__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0 0 0.65rem;
}

.cg-strategy-list {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
  list-style: decimal;
}

.cg-strategy-list li {
  padding-left: 0.25rem;
}

.cg-strategy-list li + li {
  margin-top: 0.4rem;
}

.cg-strategy-list li::marker {
  color: #e8581a;
  font-weight: 700;
}

.cg-strategy-disclaimer {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0.6rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.4rem;
}

/* Onboarding: language + tutorial */
.cg-onboarding {
  margin-bottom: 2rem;
}

.cg-wizard-counselling-badge {
  font-size: 0.875rem;
  color: #475569;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.cg-wizard-counselling-badge strong {
  color: #c2410c;
}

.cg-lang-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.cg-lang-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: #fff;
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.cg-lang-card strong {
  font-size: 1.05rem;
  color: #0f172a;
}

.cg-lang-card span {
  font-size: 0.75rem;
  color: #64748b;
}

.cg-lang-card.selected {
  border-color: #e8581a;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(232, 88, 26, 0.2);
}

/* Animated “how it works” guide */
.cg-demo-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cg-demo-step-btn {
  flex: 1 1 auto;
  min-width: 3.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.4rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: center;
  line-height: 1.2;
}

.cg-demo-step-btn .cg-demo-step-num {
  display: block;
  font-size: 0.85rem;
  color: #e8581a;
  margin-bottom: 0.1rem;
}

.cg-demo-step-btn.active {
  border-color: #e8581a;
  background: #fff7ed;
  color: #0f172a;
  transform: scale(1.03);
  box-shadow: 0 0 0 3px rgba(232, 88, 26, 0.15);
}

.cg-demo-stage {
  background: linear-gradient(145deg, #f0f9ff 0%, #fff7ed 45%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 1rem 1rem 0.75rem;
  overflow: hidden;
}

.cg-demo-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e8581a;
  margin-bottom: 0.25rem;
}

.cg-demo-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.cg-demo-body {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.cg-demo-preview {
  position: relative;
  min-height: 9.5rem;
  background: #fff;
  border-radius: 0.65rem;
  border: 1px dashed #cbd5e1;
  padding: 0.75rem;
  overflow: hidden;
}

.cg-demo-scene {
  display: none;
  pointer-events: none;
}

.cg-demo-scene--active {
  display: block;
  pointer-events: auto;
  animation: cg-demo-fade-in 0.45s ease forwards;
}

@keyframes cg-demo-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cg-demo-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.cg-mock-hint {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.65rem;
}

.cg-mock--counselling {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.cg-mock-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #334155;
  background: #f8fafc;
}

.cg-mock-card--josaa.cg-mock-pulse {
  border-color: #e8581a;
  background: #fff7ed;
  color: #c2410c;
  animation: cg-mock-pulse 1.6s ease-in-out infinite;
}

@keyframes cg-mock-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 88, 26, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(232, 88, 26, 0);
  }
}

.cg-mock--signin .cg-mock-field {
  height: 0.65rem;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  border-radius: 0.35rem;
  margin-bottom: 0.45rem;
  animation: cg-mock-shimmer 1.8s ease-in-out infinite;
}

.cg-mock-field--1 {
  width: 85%;
  animation-delay: 0s;
}

.cg-mock-field--2 {
  width: 70%;
  animation-delay: 0.2s;
}

.cg-mock-btn--signin {
  width: 55%;
  height: 1.5rem;
  margin: 0.5rem auto 0;
  border-radius: 0.4rem;
  background: #0f766e;
  animation: cg-mock-btn-pop 2s ease-in-out infinite;
}

@keyframes cg-mock-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes cg-mock-btn-pop {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.92;
  }
}

.cg-mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.cg-mock-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  color: #94a3b8;
  opacity: 0;
  transform: scale(0.85);
}

.cg-demo-scene--active .cg-mock-chip--on {
  animation: cg-mock-chip-in 0.5s ease forwards;
  border-color: #e8581a;
  background: #fff7ed;
  color: #c2410c;
}

.cg-demo-scene--active .cg-mock-chip--delay1 {
  animation-delay: 0.15s;
}

.cg-demo-scene--active .cg-mock-chip--delay2 {
  animation-delay: 0.3s;
}

.cg-demo-scene--active .cg-mock-chip--delay3 {
  animation-delay: 0.45s;
}

@keyframes cg-mock-chip-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.cg-mock--sort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.cg-mock-sort-card {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  color: #64748b;
}

.cg-mock-sort-card--active {
  border-color: #e8581a;
  background: #fff7ed;
  color: #c2410c;
  animation: cg-mock-pulse 2s ease-in-out infinite;
}

.cg-mock-branch-order {
  grid-column: 1 / -1;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}

.cg-mock-branch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  margin-bottom: 0.25rem;
  background: #f8fafc;
}

.cg-mock-branch-row--move {
  animation: cg-mock-row-swap 2.2s ease-in-out infinite;
}

@keyframes cg-mock-row-swap {
  0%,
  100% {
    transform: translateY(0);
    border-color: #e2e8f0;
  }
  40% {
    transform: translateY(-4px);
    border-color: #e8581a;
    background: #fff7ed;
  }
}

.cg-mock-arrows {
  font-size: 0.6rem;
  color: #e8581a;
}

.cg-mock-result {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  opacity: 0;
  transform: translateX(-12px);
}

.cg-demo-scene--active .cg-mock-result--1 {
  animation: cg-mock-result-in 0.4s ease forwards;
}

.cg-demo-scene--active .cg-mock-result--2 {
  animation: cg-mock-result-in 0.4s ease 0.15s forwards;
}

.cg-demo-scene--active .cg-mock-result--3 {
  animation: cg-mock-result-in 0.4s ease 0.3s forwards;
}

@keyframes cg-mock-result-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cg-mock-rank {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.35rem;
  background: #e8581a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cg-mock-line {
  flex: 1;
  height: 0.5rem;
  border-radius: 0.25rem;
  background: linear-gradient(90deg, #e2e8f0, #f1f5f9);
}

.cg-mock-downloads {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.cg-mock-dl {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  color: #fff;
}

.cg-mock-dl--pdf {
  background: #0f766e;
  animation: cg-mock-dl-bounce 1.8s ease-in-out infinite;
}

.cg-mock-dl--csv {
  background: #e8581a;
  animation: cg-mock-dl-bounce 1.8s ease-in-out 0.35s infinite;
}

@keyframes cg-mock-dl-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.cg-demo-progress {
  height: 4px;
  background: #e2e8f0;
  border-radius: 9999px;
  margin: 0.85rem 0 0;
  overflow: hidden;
}

.cg-demo-progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #e8581a, #f59e0b);
  border-radius: 9999px;
  transition: width 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .cg-demo-scene--active,
  .cg-mock-card--josaa.cg-mock-pulse,
  .cg-mock-field,
  .cg-mock-btn--signin,
  .cg-mock-chip--on,
  .cg-mock-sort-card--active,
  .cg-mock-branch-row--move,
  .cg-mock-result,
  .cg-mock-dl {
    animation: none !important;
  }

  .cg-demo-scene--active .cg-mock-chip--on,
  .cg-demo-scene--active .cg-mock-result--1,
  .cg-demo-scene--active .cg-mock-result--2,
  .cg-demo-scene--active .cg-mock-result--3 {
    opacity: 1;
    transform: none;
  }
}

.cg-tutorial-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  min-height: 10rem;
}

.cg-tutorial-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e8581a;
  margin-bottom: 0.35rem;
}

.cg-tutorial-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.cg-tutorial-body {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
}

.cg-tutorial-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0 0.75rem;
}

.cg-tutorial-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
}

.cg-tutorial-dot.active {
  background: #e8581a;
  width: 1.25rem;
  border-radius: 9999px;
}

.cg-onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  position: relative;
  z-index: 2;
}

.cg-lang-switch {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 700;
}

.cg-lang-switch button {
  padding: 0.35rem 0.65rem;
  border: none;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}

.cg-lang-switch button.active {
  background: #0f766e;
  color: #fff;
}

.cg-nav-lang.cg-lang-switch {
  border-color: rgba(255, 255, 255, 0.55);
}

.cg-nav-lang.cg-lang-switch button {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.3rem 0.55rem;
}

.cg-nav-lang.cg-lang-switch button.active {
  background: #fff;
  color: #c2410c;
}

.cg-nav-lang.cg-lang-switch button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.22);
}

.cg-replay-link {
  font-size: 0.75rem;
  color: #e8581a;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.cg-card {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.cg-step-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.cg-step-active .cg-step-badge {
  background: #0d9488;
  color: #fff;
}

.cg-step-done .cg-step-badge {
  background: #059669;
  color: #fff;
}

.cg-step-idle .cg-step-badge {
  background: #e2e8f0;
  color: #64748b;
}

.cg-chip {
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.cg-chip.selected {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

#branchChips .cg-chip:not(.selected) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.5);
}

@media (max-width: 639px) {
  #branchChips .cg-chip.selected {
    background: #e8581a;
    border-color: #e8581a;
  }

  /* Step 2: compact on phones only */
  .cg-panel-compact h2,
  .cg-panel-compact h3 {
    margin-bottom: 0.35rem;
  }

  .cg-panel-compact > p.text-sm,
  .cg-panel-compact > p.text-xs {
    margin-bottom: 0.5rem !important;
  }

  .cg-panel-compact .border-t {
    margin-top: 0.85rem !important;
    padding-top: 0.65rem !important;
  }

  .cg-branch-chips-wrap {
    grid-template-columns: repeat(auto-fill, minmax(6.75rem, 1fr));
    gap: 0.3rem;
  }

  #branchChips .cg-chip {
    font-size: 0.625rem;
    line-height: 1.15;
    padding: 0.22rem 0.35rem;
    border-radius: 0.35rem;
  }

  #instituteChips .cg-chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
  }

  #branchSelectionHint {
    font-size: 0.65rem;
  }

  .cg-branch-order-name {
    font-size: 0.7rem;
  }
}

.cg-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* College list preview — scrollable with visible scrollbar */
.cg-results-preview {
  max-height: min(70vh, calc(100dvh - 14rem));
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #e8581a #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
}

.cg-results-preview::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.cg-results-preview::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

.cg-results-preview::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fb7a2e 0%, #e8581a 100%);
  border-radius: 6px;
  border: 2px solid #f1f5f9;
}

.cg-results-preview::-webkit-scrollbar-thumb:hover {
  background: #c2410c;
}

/* Results list: card grid (mobile + laptop) */
.cg-results-list.cg-results-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  padding: 0.45rem 0.4rem 0.5rem 0.5rem;
  align-content: start;
}

/* Alumni / detail modal */
.cg-modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.cg-modal-root.hidden {
  display: none;
}

@media (min-width: 640px) {
  .cg-modal-root {
    align-items: center;
    padding: 1rem;
  }
}

.cg-modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
}

.cg-modal-panel {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 32rem;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

@media (min-width: 640px) {
  .cg-modal-panel {
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  }
}

.cg-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%);
  border-bottom: 1px solid #fed7aa;
  flex-shrink: 0;
}

.cg-modal-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c2410c;
  margin: 0 0 0.2rem;
}

.cg-modal-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.cg-modal-branch {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f766e;
  margin: 0.25rem 0 0;
  line-height: 1.25;
}

.cg-modal-close-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cg-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cg-modal-body {
  overflow-y: auto;
  padding: 0.75rem 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

body.cg-modal-open {
  overflow: hidden;
}

.cg-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cg-modal-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.5rem;
}

.cg-modal-stat__label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 0.15rem;
}

.cg-modal-stat__value {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.cg-modal-stat__value--rating {
  color: #c2410c;
  font-size: 0.8rem;
}

.cg-modal-section {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.5rem;
  background: #fff;
}

.cg-modal-section__title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
  margin: 0 0 0.35rem;
}

.cg-modal-section__text {
  font-size: 0.72rem;
  line-height: 1.45;
  color: #475569;
  margin: 0;
  word-break: break-word;
}

.cg-modal-section--alumni {
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  border-color: #99f6e4;
}

.cg-modal-section--alumni .cg-modal-section__title {
  color: #0f766e;
}

.cg-modal-section--positive {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.cg-modal-section--positive .cg-modal-section__title {
  color: #166534;
}

.cg-modal-section--positive .cg-modal-section__text {
  color: #15803d;
}

.cg-modal-section--concern {
  background: #fffbeb;
  border-color: #fde68a;
}

.cg-modal-section--concern .cg-modal-section__title {
  color: #b45309;
}

.cg-modal-section--concern .cg-modal-section__text {
  color: #92400e;
}

.cg-modal-section--meta {
  background: #f8fafc;
  margin-bottom: 0;
}

.cg-modal-meta-line {
  font-size: 0.72rem;
  color: #475569;
  margin: 0 0 0.35rem;
  line-height: 1.4;
}

.cg-modal-meta-line span {
  font-weight: 700;
  color: #334155;
}

.cg-modal-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0369a1;
  text-decoration: underline;
}

.cg-modal-link:hover {
  color: #0c4a6e;
}

/* Branch chips — comfortable default (laptop / tablet) */
.cg-branch-chips-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem;
}

#branchChips .cg-chip {
  font-size: 0.875rem;
  line-height: 1.3;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

#instituteChips .cg-chip {
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
}

.cg-branch-order-name {
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
  color: #334155;
}

#branchSelectionHint {
  font-size: 0.875rem;
  line-height: 1.4;
}

#branchOrderList .cg-branch-item {
  padding: 0.35rem 0.5rem;
}

#branchOrderList .cg-branch-item .branch-up,
#branchOrderList .cg-branch-item .branch-down {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
}

.cg-branch-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cg-sort-card {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cg-sort-card.selected {
  border-color: #e8581a;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(232, 88, 26, 0.2);
}

.cg-choice-option {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.cg-choice-option:focus {
  outline: 2px solid #e8581a;
  outline-offset: 2px;
}

.cg-btn-continue {
  display: inline-block;
  background: linear-gradient(180deg, #fb7a2e 0%, #e8581a 55%, #d14d14 100%) !important;
  color: #ffffff !important;
  border: 2px solid #fdba74 !important;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(232, 88, 26, 0.35);
}

.cg-btn-continue:hover {
  filter: brightness(1.06);
}

/* Tailwind .hidden loses to .cg-btn-continue display:!important */
.cg-btn-continue.hidden,
.cg-btn-muted.hidden {
  display: none !important;
  pointer-events: none !important;
}

.cg-btn-muted {
  color: #475569 !important;
  font-weight: 600;
  font-size: 0.875rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
}

.cg-btn-muted:hover {
  color: #0f172a !important;
}

.cg-wizard-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cg-sort-card:hover {
  border-color: #94a3b8;
}

/* Primary CTA — brand orange + glowing border (overrides Tailwind gaps) */
@keyframes cg-glow-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(251, 146, 60, 0.65),
      0 0 14px 2px rgba(232, 88, 26, 0.45),
      0 4px 14px rgba(232, 88, 26, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 200, 120, 0.95),
      0 0 28px 8px rgba(232, 88, 26, 0.65),
      0 6px 20px rgba(194, 65, 12, 0.35);
  }
}

.cg-btn-signin,
.cg-btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #fb7a2e 0%, #e8581a 55%, #d14d14 100%) !important;
  color: #ffffff !important;
  border: 2px solid #fdba74 !important;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(120, 40, 0, 0.35);
  animation: cg-glow-pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cg-btn-signin:hover,
.cg-btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  animation-duration: 1.4s;
}

.cg-btn-signin:active,
.cg-btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.cg-btn-signin:disabled,
.cg-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  animation: none;
}

/* Results: download + mobile cards */
/* Step 4 — compact results header */
.cg-panel-results {
  padding-bottom: 0.5rem;
}

.cg-results-header__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.cg-results-header__title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.cg-results-summary {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.2rem 0 0;
  line-height: 1.35;
}

.cg-results-edit {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e8581a;
  background: none;
  border: none;
  padding: 0.15rem 0;
  cursor: pointer;
  text-decoration: underline;
}

.cg-results-edit:hover {
  color: #c2410c;
}

.cg-results-tips {
  margin-top: 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.cg-results-tips__summary {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  list-style: none;
}

.cg-results-tips__summary::-webkit-details-marker {
  display: none;
}

.cg-results-tips[open] .cg-results-tips__summary {
  color: #e8581a;
  border-bottom: 1px solid #e2e8f0;
}

.cg-results-tips__list {
  margin: 0;
  padding: 0.45rem 0.65rem 0.5rem 1.15rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #475569;
  list-style: disc;
}

.cg-results-tips__list li + li {
  margin-top: 0.25rem;
}

.cg-results-tips.hidden {
  display: none;
}

.cg-sticky-download:not(.hidden) {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}

.cg-sticky-download:not(.hidden) .cg-btn-download,
.cg-sticky-download:not(.hidden) .cg-btn-download-outline {
  flex: 1;
  min-width: 0;
}

.cg-btn-download {
  flex: 1 1 auto;
  min-width: 8.5rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #fdba74;
  background: linear-gradient(180deg, #fb7a2e 0%, #e8581a 100%);
  color: #fff !important;
}

.cg-btn-download[aria-disabled="true"],
.cg-btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.cg-btn-download[aria-disabled="false"],
.cg-btn-download-outline[aria-disabled="false"] {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.cg-btn-download-outline[aria-disabled="true"],
.cg-btn-download-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.cg-btn-download-outline {
  flex: 1 1 auto;
  min-width: 8.5rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #e8581a;
  background: #fff;
  color: #c2410c !important;
}

.cg-btn-download-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cg-result-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.6rem 0.65rem;
  background: #fff;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cg-result-card:hover {
  border-color: #fdba74;
  box-shadow: 0 2px 8px rgba(232, 88, 26, 0.08);
}

.cg-result-card__main {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.cg-result-card__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.4rem;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
  font-size: 0.75rem;
}

.cg-result-card__body {
  flex: 1;
  min-width: 0;
}

.cg-result-card__title {
  font-weight: 700;
  font-size: 0.8rem;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.cg-result-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: #64748b;
  align-items: center;
}

.cg-result-card__chip {
  background: #f1f5f9;
  color: #334155;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 600;
}

.cg-result-card__pkg,
.cg-result-card__rating {
  font-size: 0.6rem;
  white-space: nowrap;
}

.cg-result-card__rating {
  color: #c2410c;
  font-weight: 700;
}

.cg-result-card__detail {
  margin-top: 0.4rem;
  width: 100%;
  min-height: 34px;
  padding: 0.35rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  cursor: pointer;
}

.cg-sticky-download {
  display: none;
}

.cg-step-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.cg-step-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 639px) {
  .cg-page main {
    padding-bottom: 5.5rem;
  }

  .cg-hero {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .cg-hero h1 {
    font-size: 1.35rem;
  }

  .cg-card {
    padding: 1rem !important;
    border-radius: 0.85rem;
  }

  .cg-wizard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cg-wizard-actions .cg-btn-continue,
  .cg-wizard-actions .cg-btn-primary,
  .cg-wizard-actions .cg-btn-muted {
    width: 100%;
    text-align: center;
    min-height: 48px;
  }

  .cg-wizard-actions p {
    text-align: center;
    width: 100%;
  }

  .cg-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }

  .cg-chip.selected {
    background: #e8581a;
    border-color: #e8581a;
  }

  .cg-sort-card {
    padding: 0.85rem;
  }

  .cg-branch-item {
    flex-wrap: wrap;
  }

  .cg-branch-item .branch-up,
  .cg-branch-item .branch-down {
    min-width: 44px;
    min-height: 44px;
  }

  .cg-results-list.cg-results-preview {
    max-height: calc(100dvh - 20rem);
  }

  .cg-panel-results {
    padding-bottom: 4.75rem;
  }

  #stepIndicators {
    flex-wrap: nowrap;
    max-width: 100%;
  }

  #stepIndicators > div {
    flex-shrink: 0;
    font-size: 0.7rem;
  }

  #stepIndicators .cg-step-badge {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.75rem;
  }

  header .text-right,
  header .text-left {
    font-size: 0.65rem;
  }
}

/* Laptop / tablet: readable scale (mobile layout, larger type) */
@media (min-width: 640px) {
  .cg-page {
    font-size: 17px;
  }

  .cg-main {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-top: 2rem !important;
  }

  .cg-hero-desc {
    max-width: 52rem;
  }

  header .text-sm,
  header .font-semibold {
    font-size: 0.9rem !important;
  }

  header .text-sm.sm\:text-lg {
    font-size: 1.15rem !important;
  }

  .cg-hero {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .cg-hero h1 {
    font-size: 2.25rem !important;
    line-height: 1.2;
  }

  .cg-hero p {
    font-size: 1.125rem !important;
    line-height: 1.55;
  }

  .cg-hero-points {
    font-size: 1rem !important;
  }

  .cg-hero-cta {
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
  }

  .cg-strategy-panel__title {
    font-size: 1.45rem;
  }

  .cg-strategy-panel__intro {
    font-size: 1.05rem;
  }

  .cg-strategy-list {
    font-size: 1rem;
  }

  .cg-card {
    padding: 1.35rem 1.5rem !important;
    border-radius: 1rem;
  }

  .cg-onboarding .text-xl,
  #accessGate .text-xl,
  #panel1 h2,
  #panel2 h2,
  #panel3 h2 {
    font-size: 1.5rem !important;
  }

  .cg-onboarding .text-sm,
  #accessGate .text-sm,
  #panel1 .text-sm,
  #panel2 .text-sm,
  #panel3 .text-sm,
  #panel1 .text-xs,
  #panel2 .text-xs,
  #panel3 .text-xs {
    font-size: 1rem !important;
  }

  .cg-lang-card {
    min-height: 5.5rem;
    padding: 1.25rem;
  }

  .cg-lang-card strong {
    font-size: 1.25rem;
  }

  .cg-lang-card span {
    font-size: 0.9rem;
  }

  .cg-tutorial-title {
    font-size: 1.3rem;
  }

  .cg-tutorial-body {
    font-size: 1.05rem;
  }

  .cg-tutorial-step-label {
    font-size: 0.8rem;
  }

  .cg-btn-continue,
  .cg-btn-primary,
  .cg-btn-signin {
    font-size: 1rem !important;
    padding: 0.75rem 1.6rem !important;
  }

  .cg-btn-muted {
    font-size: 1rem !important;
  }

  #loginIdentifier,
  #loginPassword {
    font-size: 1rem !important;
    padding: 0.65rem 0.85rem !important;
  }

  label[for="loginIdentifier"],
  label[for="loginPassword"] {
    font-size: 0.95rem !important;
  }

  .cg-panel-compact {
    padding: 1.35rem 1.5rem !important;
  }

  #instituteChips .cg-chip.selected,
  .cg-chip.selected {
    background: #e8581a;
    border-color: #e8581a;
    color: #fff;
  }

  .cg-chip {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }

  .cg-branch-chips-wrap {
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.55rem;
  }

  #branchChips .cg-chip {
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
  }

  #branchSelectionHint {
    font-size: 0.95rem;
  }

  #stepIndicators {
    font-size: 0.95rem;
    gap: 0.65rem;
  }

  .cg-step-badge {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
  }

  .cg-lang-switch {
    font-size: 0.9rem;
  }

  .cg-lang-switch button {
    padding: 0.5rem 0.9rem;
  }

  .cg-replay-link {
    font-size: 0.95rem;
  }

  .cg-sort-card {
    padding: 1.15rem 1.2rem;
  }

  .cg-sort-card .font-bold {
    font-size: 1.05rem !important;
  }

  .cg-sort-card .text-xs {
    font-size: 0.9rem !important;
  }

  .cg-choice-option .text-lg {
    font-size: 1.2rem !important;
  }

  #sortCards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  #sortCards .cg-sort-full {
    grid-column: 1 / -1;
  }

  .cg-wizard-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
  }

  .cg-wizard-actions .cg-btn-continue,
  .cg-wizard-actions .cg-btn-primary {
    margin-left: auto;
  }

  .cg-branch-item {
    padding: 0.6rem 0.75rem;
  }

  .cg-branch-order-name {
    font-size: 0.95rem;
  }

  .cg-page main {
    padding-bottom: 5rem;
  }

  .cg-panel-results {
    padding-bottom: 5rem;
  }

  .cg-results-header__title {
    font-size: 1.4rem;
  }

  .cg-results-summary {
    font-size: 1rem;
  }

  .cg-results-edit {
    font-size: 0.95rem;
  }

  .cg-results-tips__summary {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .cg-results-tips__list {
    font-size: 0.9rem;
  }

  .cg-results-list.cg-results-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.65rem;
    max-height: calc(100dvh - 14rem);
  }

  .cg-result-card {
    padding: 0.85rem 0.95rem;
  }

  .cg-result-card__rank {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  .cg-result-card__title {
    font-size: 0.95rem;
  }

  .cg-result-card__meta {
    font-size: 0.8rem;
    margin-top: 0.45rem;
  }

  .cg-result-card__chip {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
  }

  .cg-result-card__detail {
    font-size: 0.875rem;
    color: #2563eb;
    background: transparent;
    border: none;
    text-decoration: underline;
    justify-content: flex-start;
    padding: 0.35rem 0 0;
    min-height: 0;
  }

  .cg-result-card__detail:hover {
    color: #1d4ed8;
    background: transparent;
  }

  .cg-sticky-download:not(.hidden) {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }

  .cg-sticky-download:not(.hidden) .cg-btn-download,
  .cg-sticky-download:not(.hidden) .cg-btn-download-outline {
    font-size: 0.95rem;
    min-height: 46px;
  }
}

@media (min-width: 1024px) {
  .cg-results-list.cg-results-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: calc(100dvh - 13rem);
  }

  .cg-branch-chips-wrap {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  }

  #sortCards {
    grid-template-columns: repeat(3, 1fr);
  }

  #sortCards .cg-sort-full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1280px) {
  .cg-results-list.cg-results-preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
