/* Homepage v2 */

body.ci-home-v2-page {
  --ci-home-red: #8b1538;
  --ci-home-red-dark: #6f112d;
  --ci-home-text: #111111;
  --ci-home-muted: #5c5c5c;
  --ci-home-border: #e8e8e8;
  --ci-home-radius: 2px;
  --ci-home-bg: #ffffff;
  --ci-home-panel: #f5f5f5;
  --ci-home-serif: "Playfair Display", "Times New Roman", Times, serif;
  --ci-home-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--ci-home-bg);
}

body.ci-home-v2-page #main {
  overflow-x: clip;
  max-width: 100%;
}

body.ci-home-v2-page .coin-news-section,
body.ci-home-v2-page .guides-section,
body.ci-home-v2-page .cw-crypto-section,
body.ci-home-v2-page .articles-list {
  display: none !important;
}

.ci-home {
  font-family: var(--ci-home-sans);
  color: var(--ci-home-text);
  padding: 32px 0 0;
}

.ci-home__container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* Hero — featured (taller) + top news (natural height, no outer borders) */
body.ci-home-v2-page .ci-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 0;
  align-items: start;
  padding: 0;
  margin-bottom: 48px;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-sizing: border-box;
}

.ci-home-hero__feature {
  position: relative;
  min-height: clamp(400px, 38vw, 480px);
  overflow: hidden;
  background: var(--ci-home-bg);
  border: none;
  border-radius: 0;
}

.ci-home-hero__content {
  position: relative;
  z-index: 2;
  max-width: min(56%, 580px);
  min-height: inherit;
  padding: clamp(24px, 3vw, 36px) clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.ci-home-v2-page .ci-home-hero__badge {
  display: inline-block;
  width: fit-content;
  margin: 0 0 16px;
  padding: 7px 16px;
  background-color: var(--ci-home-red);
  color: #fff;
  font-family: var(--ci-home-sans);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  box-shadow: none;
}

.ci-home-hero__title {
  margin: 0 0 14px;
  font-family: var(--ci-home-serif);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
}

.ci-home-hero__title a {
  color: inherit;
  text-decoration: none;
}

.ci-home-hero__title a:hover {
  color: var(--ci-home-red);
}

.ci-home-hero__excerpt {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ci-home-muted);
  max-width: 52ch;
}

.ci-home-meta {
  font-size: 13px;
  color: var(--ci-home-muted);
}

.ci-home-meta span[aria-hidden="true"] {
  margin: 0 6px;
}

body.ci-home-v2-page .ci-home-hero__cta,
body.ci-home-v2-page .ci-home-hero__cta:hover,
body.ci-home-v2-page .ci-home-hero__cta:focus,
body.ci-home-v2-page .ci-home-hero__cta:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin-top: 20px;
  padding: 12px 28px;
  background-color: var(--ci-home-red) !important;
  color: #fff !important;
  font-family: var(--ci-home-serif) !important;
  font-size: 16px;
  font-weight: 600;
  font-style: normal;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none !important;
  text-transform: none;
  border: 1px solid var(--ci-home-red-dark);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.14);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.ci-home-v2-page .ci-home-hero__cta:hover {
  background-color: var(--ci-home-red-dark) !important;
  border-color: #5a0e24;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(17, 17, 17, 0.16);
}

body.ci-home-v2-page .ci-home-hero__cta-text,
body.ci-home-v2-page .ci-home-hero__cta-arrow {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.ci-home-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 30%;
  z-index: 0;
  display: block;
  height: 100%;
  max-height: none;
  transform: none;
  overflow: hidden;
}

.ci-home-hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #fff 0%,
    rgba(255, 255, 255, 0.98) 10%,
    rgba(255, 255, 255, 0.82) 22%,
    rgba(255, 255, 255, 0.45) 38%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 72%
  );
}

.ci-home-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: right center;
}

body.ci-home-v2-page .ci-home-hero__side {
  align-self: start;
  background: var(--ci-home-bg);
  border: none;
  border-radius: 0;
  padding: clamp(20px, 2.5vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ci-home-hero__side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ci-home-hero__side-title {
  margin: 0;
  font-family: var(--ci-home-sans);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ci-home-text);
}

.ci-home-topnews {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}

.ci-home-hero .ci-home-topnews__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ci-home-border);
}

.ci-home-hero .ci-home-topnews__item:nth-child(3n) {
  border-bottom: none;
}

.ci-home-topnews__item.is-hidden {
  display: none;
}

.ci-home-topnews__num {
  font-family: var(--ci-home-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #d4d4d4;
  line-height: 1;
  transition: color 0.15s ease;
}

.ci-home-topnews__item:hover .ci-home-topnews__num {
  color: var(--ci-home-red);
}

.ci-home-topnews__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.ci-home-topnews__title a {
  color: inherit;
  text-decoration: none;
}

.ci-home-topnews__title a:hover {
  color: var(--ci-home-red);
}

.ci-home-hero__nav {
  display: flex;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

.ci-home-hero__arrow {
  appearance: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--ci-home-border);
  background: #fff;
  color: var(--ci-home-text);
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
}

.ci-home-hero__arrow:hover:not(:disabled) {
  border-color: var(--ci-home-red);
  color: var(--ci-home-red);
}

.ci-home-hero__arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Section headers */
.ci-home-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ci-home-border);
}

.ci-home-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ci-home-section__title {
  margin: 0 0 18px;
  font-family: var(--ci-home-sans);
  font-size: 18px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ci-home-red);
  line-height: 1.2;
}

.ci-home-section__head .ci-home-section__title {
  margin-bottom: 0;
}

.ci-home-section__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ci-home-section__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ci-home-text);
  text-decoration: none;
}

.ci-home-section__link:hover {
  color: var(--ci-home-red);
}

.ci-home-section__arrows {
  display: flex;
  gap: 8px;
}

/* Cards grid */
.ci-home-grid {
  display: grid;
  gap: 24px;
}

.ci-home-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ci-home-grid--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.ci-home-section--latest .ci-home-grid--5 {
  gap: 12px;
}

.ci-home-latest-pages > .ci-home-grid {
  display: none;
}

.ci-home-latest-pages > .ci-home-grid.is-active {
  display: grid;
}

.ci-home-section--latest .ci-home-card {
  border: none;
  background: #fff;
}

.ci-home-section--latest .ci-home-card__body {
  padding: 12px 12px 14px;
}

.ci-home-section--latest .ci-home-card__title {
  font-size: 0.95rem;
}

.ci-home-section--latest .ci-home-card__media img {
  aspect-ratio: 16 / 9;
}

.ci-home-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ci-home-border);
  background: #fff;
}

.ci-home-card__media {
  display: block;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: 0;
}

.ci-home-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

.ci-home-card__body {
  padding: 14px 14px 16px;
}

.ci-home-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ci-home-red);
}

.ci-home-card__title {
  margin: 0 0 8px;
  font-family: var(--ci-home-serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.ci-home-card__title a {
  color: inherit;
  text-decoration: none;
}

.ci-home-card__title a:hover {
  color: var(--ci-home-red);
}

.ci-home-card__excerpt {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ci-home-muted);
}

/* Market overview */
.ci-home-market {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--ci-home-border);
}

.ci-home-market__panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--ci-home-border);
  background: #fff;
}

.ci-home-market__chart {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 20px 0;
}

.ci-home-market__stats-top {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  padding: 0;
  border-left: 1px solid var(--ci-home-border);
  border-right: 1px solid var(--ci-home-border);
}

.ci-home-market__pulse {
  grid-column: 1 / 3;
  grid-row: 2;
  padding: 0;
  border-top: 1px solid var(--ci-home-border);
  background: #fff;
}

.ci-home-market__lists {
  grid-column: 3;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 100%;
}

.ci-home-market__label {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ci-home-muted);
}

.ci-home-market__value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.ci-home-market__value {
  margin: 0;
  font-family: var(--ci-home-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.ci-home-market__change {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.ci-home-market__change.is-up {
  color: #15803d;
}

.ci-home-market__change.is-down {
  color: #b91c1c;
}

.ci-home-market__tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.ci-home-market__tab {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ci-home-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.ci-home-market__tab.is-active {
  color: var(--ci-home-text);
  border-bottom-color: var(--ci-home-red);
}

.ci-home-market__spark {
  height: 140px;
  position: relative;
  margin-bottom: 0;
}

.ci-home-market__spark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ci-home-market__spark.is-loading {
  opacity: 0.45;
}

.ci-home-market__spark-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  font-size: 13px;
  color: var(--ci-home-muted);
}

/* Market Pulse — 2×2 bordered cards (design mockup) */
.ci-home-market__pulse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 20px 12px;
  background: #fff;
}

.ci-home-market__pulse-title {
  margin: 0;
  font-family: var(--ci-home-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ci-home-text);
  line-height: 1.2;
}

.ci-home-pulse__updated {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ci-home-muted);
  white-space: nowrap;
}

.ci-home-market__pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0 20px 20px;
  align-items: stretch;
}

.ci-home-pulse-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  min-height: 132px;
  margin: 0;
  padding: 14px 16px 16px;
  background: #fff;
  border: 1px solid var(--ci-home-border);
  border-radius: 2px;
  box-shadow: none;
}

.ci-home-pulse-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.ci-home-pulse-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ci-home-text);
  line-height: 1.2;
}

.ci-home-pulse-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 38%);
  gap: 10px 14px;
  align-items: center;
  flex: 1;
  margin-top: 0;
}

.ci-home-pulse-card__copy {
  min-width: 0;
}

.ci-home-pulse-card__chart {
  width: 100%;
  height: 72px;
  justify-self: end;
  align-self: center;
}

.ci-home-pulse-card__chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ci-home-pulse__tip {
  position: relative;
  appearance: none;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--ci-home-border);
  border-radius: 50%;
  background: #fafafa;
  color: var(--ci-home-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.ci-home-pulse__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--ci-home-border);
  border-radius: var(--ci-home-radius);
  background: #fff;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.08);
  color: var(--ci-home-text);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.ci-home-pulse__tip:hover .ci-home-pulse__tooltip,
.ci-home-pulse__tip:focus .ci-home-pulse__tooltip,
.ci-home-pulse__tip:focus-visible .ci-home-pulse__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.ci-home-pulse__tag {
  display: inline-block;
  width: fit-content;
  margin: 0 0 10px;
  padding: 3px 10px;
  border: 1px solid #f5e8e8;
  border-radius: 3px;
  background: #fdf7f7;
  color: var(--ci-home-red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.ci-home-pulse__tag.is-positive,
.ci-home-pulse__tag.is-negative,
.ci-home-pulse__tag.is-neutral {
  border-color: #f5e8e8;
  background: #fdf7f7;
  color: var(--ci-home-red);
}

.ci-home-pulse-card__value {
  display: block;
  margin: 0 0 6px;
  font-family: var(--ci-home-sans);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ci-home-text);
}

.ci-home-pulse-card__desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ci-home-muted);
}

.ci-home-market__stat {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--ci-home-border);
}

.ci-home-market__stat:first-child {
  border-top: none;
}

.ci-home-market__stat-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ci-home-muted);
}

.ci-home-market__stat strong {
  font-size: 1.25rem;
  font-weight: 700;
}

.ci-home-market__fg span {
  margin-left: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #15803d;
}

.ci-home-market__fg-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #b91c1c, #eab308, #15803d);
  overflow: hidden;
}

.ci-home-market__fg-bar span {
  display: block;
  height: 100%;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.ci-home-market__list-wrap {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  min-height: 0;
}

.ci-home-market__list-wrap + .ci-home-market__list-wrap {
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid var(--ci-home-border);
}

.ci-home-market__list-title {
  margin: 0 0 10px;
  flex-shrink: 0;
  font-family: var(--ci-home-sans);
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ci-home-red);
}

.ci-home-market__list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ci-home-market__coin {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  flex: 1 1 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--ci-home-border);
}

.ci-home-market__coin:last-child {
  border-bottom: none;
}

.ci-home-market__coin-icon {
  border-radius: 50%;
}

.ci-home-market__coin-info strong {
  display: block;
  font-size: 13px;
}

.ci-home-market__coin-info span {
  font-size: 11px;
  color: var(--ci-home-muted);
}

.ci-home-market__coin-price {
  text-align: right;
}

.ci-home-market__coin-price strong {
  display: block;
  font-size: 13px;
}

.ci-home-market__coin.is-up .ci-home-market__coin-price span {
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
}

.ci-home-market__coin.is-down .ci-home-market__coin-price span {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}

/* Browse */
.ci-home-browse {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ci-home-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.ci-home-filters__btn {
  appearance: none;
  border: 1px solid var(--ci-home-border);
  background: #fff;
  color: var(--ci-home-text);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ci-home-filters__btn:hover {
  border-color: var(--ci-home-red);
  color: var(--ci-home-red);
}

.ci-home-filters__btn.is-active {
  background: var(--ci-home-red);
  border-color: var(--ci-home-red);
  color: #fff;
}

.ci-home-browse__head {
  margin-bottom: 12px;
}

.ci-home-browse__controls {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  margin-bottom: 6px;
}

.ci-home-browse__controls .ci-home-section__arrows {
  grid-column: 2;
  justify-self: end;
}

.ci-home-browse__layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: start;
}

.ci-home-browse__featured {
  background: #fff;
  overflow: hidden;
}

.ci-home-browse__featured-body {
  padding: 18px 0 0;
}

.ci-home-browse__side {
  display: flex;
  flex-direction: column;
  align-self: start;
  background: #fff;
}

.ci-home-browse__side-page.is-active > .ci-home-browse__row:first-of-type {
  padding-top: 0;
}

.ci-home-browse__side-pages {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ci-home-browse__side-page {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ci-home-browse__side-page.is-active {
  display: flex;
}

.ci-home-browse__featured-media {
  display: block;
  margin-bottom: 0;
  border-radius: 0;
  overflow: hidden;
}

.ci-home-browse__featured-media img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 400px;
  object-fit: cover;
  border-radius: 0;
}

.ci-home-browse__featured-title {
  margin: 0 0 10px;
  font-family: var(--ci-home-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.ci-home-browse__featured-title a {
  color: inherit;
  text-decoration: none;
}

.ci-home-browse__featured-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ci-home-muted);
}

.ci-home-browse__row {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ci-home-border);
  flex: 1 1 0;
}

.ci-home-browse__side-page .ci-home-browse__row:last-of-type {
  border-bottom: none;
}

.ci-home-browse__row-thumb {
  border-radius: 0;
  overflow: hidden;
}

.ci-home-browse__row-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;
}

.ci-home-browse__explore {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  margin-top: auto;
  padding: 20px 0 8px;
  border-top: 1px solid var(--ci-home-border);
}

.ci-home-browse__explore-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ci-home-red);
  text-decoration: none;
}

.ci-home-browse__explore-link:hover {
  text-decoration: underline;
}

.ci-home-browse__row-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.ci-home-browse__row-title a {
  color: inherit;
  text-decoration: none;
}

.ci-home-browse__row-title a:hover {
  color: var(--ci-home-red);
}

.ci-home-empty {
  padding: 24px 0;
  color: var(--ci-home-muted);
}

.ci-home-browse__panel {
  display: none;
}

.ci-home-browse__panel.is-active {
  display: block;
}

.ci-home-browse__content.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Newsletter promo banner — full width below home content (scales with page zoom, not 100vw) */
.ci-home > .ci-newsletter-banner {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-top: 48px;
}

body.ci-home-v2-page .ci-home > .ci-newsletter-banner--footer-banner {
  width: 100%;
  max-width: 100%;
}

.ci-home > .ci-newsletter-banner--footer-banner .ci-newsletter-banner__footer-wrap {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 1100px) {
  body.ci-home-v2-page .ci-home-hero {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Tablet/mobile: full-bleed image behind headline + excerpt (text on top). */
  body.ci-home-v2-page .ci-home-hero__feature {
    position: relative;
    display: block;
    min-height: clamp(340px, 92vw, 440px);
    overflow: hidden;
    border: none;
  }

  body.ci-home-v2-page .ci-home-hero__media {
    position: absolute;
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    transform: none;
    overflow: hidden;
  }

  body.ci-home-v2-page .ci-home-hero__media::before {
    display: block;
    top: 0;
    right: 0;
    left: 0;
    bottom: auto;
    height: clamp(10.75rem, 34vw, 13.25rem);
    z-index: 1;
    /* White fade only behind badge + title; excerpt sits on the image below. */
    background: linear-gradient(
      to bottom,
      #fff 0%,
      rgba(255, 255, 255, 0.98) 50%,
      rgba(255, 255, 255, 0.88) 82%,
      transparent 100%
    );
  }

  body.ci-home-v2-page .ci-home-hero__media img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 35%;
  }

  body.ci-home-v2-page .ci-home-hero__content {
    position: relative;
    z-index: 2;
    max-width: none;
    min-height: clamp(340px, 92vw, 440px);
    padding: 20px 0 28px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: transparent;
    pointer-events: none;
  }

  body.ci-home-v2-page .ci-home-hero__excerpt {
    font-size: 14px;
    color: #fff;
  }

  body.ci-home-v2-page .ci-home-hero__meta.ci-home-meta {
    color: #fff;
  }

  body.ci-home-v2-page .ci-home-hero__content a,
  body.ci-home-v2-page .ci-home-hero__content button {
    pointer-events: auto;
  }

  body.ci-home-v2-page .ci-home-hero__side {
    justify-content: flex-start;
    padding: 20px 0 0;
  }

  .ci-home-section__head {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .ci-home-browse__controls,
  .ci-home-browse__layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ci-home-browse__controls .ci-home-section__arrows {
    grid-column: 1;
    justify-self: end;
  }

  .ci-home-browse__row {
    grid-template-columns: 120px 1fr;
  }

  .ci-home-grid--4,
  .ci-home-grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ci-home-section--latest .ci-home-card {
    border-right: none;
    border-bottom: 1px solid var(--ci-home-border);
  }

  .ci-home-section--latest .ci-home-card:last-child {
    border-bottom: none;
  }

  .ci-home-market__panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .ci-home-market__chart,
  .ci-home-market__stats-top,
  .ci-home-market__pulse,
  .ci-home-market__lists {
    grid-column: 1;
    grid-row: auto;
  }

  .ci-home-market__stats-top {
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--ci-home-border);
  }

  .ci-home-market__lists {
    border-top: 1px solid var(--ci-home-border);
  }

  .ci-home-browse__layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ci-home {
    padding-top: 20px;
  }

  .ci-home-hero,
  .ci-home-section,
  .ci-home-market {
    margin-bottom: 36px;
    padding-bottom: 36px;
  }

  .ci-home-section__head {
    align-items: flex-start;
  }

  .ci-home-market > .ci-home-section__head {
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .ci-home-market > .ci-home-section__head .ci-home-section__link {
    margin-left: auto;
    flex-shrink: 0;
    text-align: right;
  }

  .ci-home-section__actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }

  .ci-home-section__link {
    font-size: 12px;
    white-space: nowrap;
  }

  .ci-home-market__tabs {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .ci-home-market__chart {
    padding: 16px 16px 0;
  }

  .ci-home-market__pulse-head {
    flex-wrap: wrap;
    padding: 12px 16px 10px;
  }

  .ci-home-market__value {
    font-size: 1.5rem;
  }

  .ci-home-filters {
    gap: 6px;
  }

  .ci-home-filters__btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .ci-home {
    overflow-x: clip;
  }

  .ci-home__container {
    width: calc(100% - 24px);
  }

  .ci-home-hero__title {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  body.ci-home-v2-page .ci-home-hero__content {
    padding-left: 20px;
  }

  /* Slightly taller fade on small phones for multi-line titles. */
  body.ci-home-v2-page .ci-home-hero__media::before {
    height: clamp(11.5rem, 40vw, 14.5rem);
  }

  .ci-home-hero__excerpt {
    font-size: 14px;
    max-width: none;
  }

  .ci-home-grid--4,
  .ci-home-grid--5 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ci-home-section--latest .ci-home-grid--5 {
    gap: 0;
  }

  .ci-home-section--latest .ci-home-card {
    border-bottom: 1px solid var(--ci-home-border);
  }

  .ci-home-section--latest .ci-home-card:last-child {
    border-bottom: none;
  }

  .ci-home-section__head .ci-home-section__title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .ci-home-market__spark {
    height: 120px;
  }

  .ci-home-market__spark-empty {
    height: 120px;
  }

  .ci-home-market__stat {
    padding: 14px 16px;
  }

  .ci-home-market__list-wrap {
    padding: 14px 16px;
  }

  .ci-home-market__pulse-grid {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
    gap: 8px;
  }

  /* Slim cards: copy left, mini chart right (no stacked chart below). */
  .ci-home-pulse-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, 38%);
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    row-gap: 4px;
    min-height: 0;
    padding: 10px 12px 11px;
    align-items: start;
  }

  .ci-home-pulse-card__head {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  .ci-home-pulse__tag {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
  }

  .ci-home-pulse-card__body {
    display: contents;
  }

  .ci-home-pulse-card__copy {
    grid-column: 1;
    grid-row: 3;
    min-width: 0;
    padding-right: 2px;
  }

  .ci-home-pulse-card__chart {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    justify-self: end;
    width: 100%;
    max-width: 112px;
    height: 52px;
    min-height: 52px;
  }

  .ci-home-pulse-card__value {
    font-size: 1.2rem;
    margin: 0 0 4px;
  }

  .ci-home-pulse-card__desc {
    font-size: 11px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ci-home-browse__row {
    grid-template-columns: 100px 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  .ci-home-browse__featured-title {
    font-size: 1.25rem;
  }

  .ci-home-browse__featured-media img {
    aspect-ratio: 16 / 9;
    max-height: none;
  }

  .ci-home > .ci-newsletter-banner {
    margin-top: 28px;
  }

  body.ci-home-v2-page .ci-home > .ci-newsletter-banner--mobile-stack {
    margin-top: 24px;
  }

  body.ci-home-v2-page .ci-home > .ci-newsletter-banner--footer-banner:not(.ci-newsletter-banner--mobile-stack) .ci-newsletter-banner__footer-cta {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  body.ci-home-v2-page .ci-home > .ci-newsletter-banner--mobile-stack {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .ci-home__container {
    width: calc(100% - 20px);
  }

  .ci-home-section__head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .ci-home-market > .ci-home-section__head {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .ci-home-market > .ci-home-section__head .ci-home-section__title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .ci-home-market > .ci-home-section__head .ci-home-section__link {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: center;
    text-align: right;
  }

  .ci-home-section__actions {
    width: 100%;
    justify-content: space-between;
  }

  .ci-home-browse__controls .ci-home-section__arrows {
    justify-self: stretch;
    justify-content: flex-end;
  }

  .ci-home-browse__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ci-home-browse__row-thumb img {
    aspect-ratio: 16 / 9;
  }

  .ci-home-filters__btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .ci-home-market__value-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .ci-home-pulse-card {
    grid-template-columns: minmax(0, 1fr) minmax(88px, 42%);
    column-gap: 8px;
    padding: 10px 10px 11px;
  }

  .ci-home-pulse-card__chart {
    max-width: 100px;
    height: 48px;
    min-height: 48px;
  }
}
