.home-top-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
}

.home-title {
  justify-self: start;
  font-size: 18px;
}

.kyc-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: #f4f4f4;
  color: #111111;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.kyc-banner:hover {
  background: #eeeeee;
  transform: translateY(-1px);
}

.kyc-banner > svg:first-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: #e7e7e7;
  color: #777777;
}

.kyc-banner strong {
  display: block;
  margin-bottom: 5px;
  color: #111111;
  font-size: 15px;
  font-weight: 900;
}

.kyc-banner p {
  margin: 0;
  color: #555555;
  font-size: 13px;
  line-height: 1.45;
}

.kyc-banner > svg:last-child {
  width: 18px;
  height: 18px;
  color: #999999;
}

.exchange-hero {
  position: relative;
  min-height: 132px;
  padding-top: 22px;
}

.exchange-hero .spark-card {
  display: none;
}

.exchange-hero:has(.guest-auth-card:not([hidden])) {
  min-height: 202px;
  margin-bottom: 14px;
}

.guest-auth-card {
  display: grid;
  gap: 12px;
  max-width: 300px;
  padding-top: 4px;
}

.guest-auth-card strong {
  font-size: 26px;
  line-height: 1.15;
}

.guest-auth-card p {
  margin: 0;
  color: #767676;
  font-size: 13px;
  line-height: 1.5;
}

.guest-auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 268px;
  margin-top: 2px;
}

.guest-auth-actions a {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  text-decoration: none;
}

.exchange-hero .asset-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.balance-visibility-toggle {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #777777;
}

.balance-visibility-toggle svg {
  width: 15px;
  height: 15px;
}

.btc-total {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  margin-top: 8px;
  white-space: nowrap;
}

.btc-total strong {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(32px, 9vw, 38px);
  line-height: 1;
  letter-spacing: 0;
  text-overflow: ellipsis;
}

.btc-total span {
  padding-bottom: 3px;
  font-size: 14px;
  font-weight: 800;
}

.mini-profit {
  margin-top: 14px;
  color: #777777;
  font-size: 14px;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 6px 0 22px;
}

.hero-action-pill {
  min-height: 48px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(31, 122, 22, 0.14);
}

.hero-action-pill.is-alt {
  background: #111111;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.16);
}

.promo-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 247, 255, 0.92));
  transition: opacity 180ms ease, transform 180ms ease;
}

.exchange-hero:has(.guest-auth-card:not([hidden])) + .promo-card {
  margin-top: 4px;
}

.promo-card.is-clickable {
  cursor: pointer;
}

.promo-card i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8f4ff;
  color: #247cff;
  font-size: 0;
  font-style: normal;
  font-weight: 900;
}

.promo-card i svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

.promo-card-content {
  min-width: 0;
}

.promo-card strong {
  display: block;
  margin-bottom: 4px;
  color: #10233f;
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo-card span {
  display: -webkit-box;
  overflow: hidden;
  color: #4b6689;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.market-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0;
}

.market-tabs {
  margin: 24px 0 18px;
}

.market-tabs button {
  flex: 0 0 auto;
  border: 0;
  padding: 7px 10px;
  border-radius: 16px;
  background: transparent;
  color: #666666;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.market-tabs button.active {
  background: #f1f1f1;
  color: #111111;
}

.pair-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pair-row {
  display: grid;
  grid-template-columns: 1fr 88px 64px;
  gap: 10px;
  align-items: center;
}

.pair-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.pair-name strong {
  font-size: 15px;
}

.pair-name small,
.pair-price small {
  display: block;
  margin-top: 4px;
  color: #8a8a8a;
  font-size: 11px;
}

.pair-price {
  text-align: right;
}

.pair-price strong {
  font-size: 14px;
}

.change-badge {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 4px;
  background: #30a866;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.change-badge.down {
  background: #e85d6a;
}

.pair-row.is-stale {
  border-color: #d8e6f8;
}

.pair-row.is-stale .pair-price,
.pair-row.is-stale .change-badge {
  opacity: 0.62;
}

.pair-row.is-stale .pair-name > small {
  color: #7b8da8;
}

.view-more {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin: 24px 0 28px;
  border-radius: 23px;
  background: #f1f1f1;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.market-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.market-info-card {
  min-height: 72px;
  padding: 12px 10px;
  border-radius: 8px;
  background: #f6f6f6;
}

.market-info-card span {
  display: block;
  color: #8a8a8a;
  font-size: 12px;
}

.market-info-card strong {
  display: block;
  margin: 8px 0 3px;
  font-size: 17px;
}

.news-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: #333333;
  font-size: 13px;
  text-decoration: none;
}

.announcement-list {
  display: grid;
  gap: 18px;
  margin-bottom: 22px;
}

.announcement-list a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.announcement-list article h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.45;
}

.announcement-list article time {
  color: #999999;
  font-size: 12px;
}

.announcement-page-list {
  margin-top: 24px;
}

.announcement-detail {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  background: #f7f7f7;
}

.announcement-detail h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.35;
}

.announcement-detail time {
  color: #8a8a8a;
  font-size: 13px;
}

.announcement-detail p {
  margin: 20px 0 0;
  color: #333333;
  line-height: 1.75;
}

.home-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.home-popup.open {
  pointer-events: auto;
  opacity: 1;
}

.home-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.46);
}

.home-popup-panel {
  position: relative;
  width: min(352px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  display: grid;
  gap: 12px;
  padding: 24px 18px 18px;
  border-radius: 18px;
  background: #ffffff;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 180ms ease;
}

.home-popup.open .home-popup-panel {
  transform: translateY(0) scale(1);
}

.home-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.home-popup-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: fit-content;
  min-height: 20px;
  padding: 0 8px;
  margin: 0;
  border-radius: 999px;
  background: #f4f4f4;
  color: #777777;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-popup-panel h2 {
  margin: 22px 0 4px;
  color: #111111;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-popup-panel p {
  margin: 8px auto 0;
  max-width: 100%;
  color: #555555;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.home-popup-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-popup-actions a,
.home-popup-actions button {
  width: 100%;
  text-decoration: none;
}

/* 2026 UI refresh */
.home-title {
  font-size: 19px;
  font-weight: 900;
}

.exchange-hero {
  min-height: 178px;
  margin: 18px -2px 18px;
  padding: 22px 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.22), transparent 22%),
    linear-gradient(135deg, rgba(15, 143, 111, 0.12), rgba(37, 99, 235, 0.08)),
    #ffffff;
  box-shadow: var(--shadow);
}

.exchange-hero:has(.guest-auth-card:not([hidden])) {
  min-height: 220px;
  margin-bottom: 18px;
}

.guest-auth-card {
  max-width: 316px;
  gap: 14px;
}

.guest-auth-card strong {
  color: #0f172a;
  font-size: 27px;
  line-height: 1.08;
}

.guest-auth-card p,
.exchange-hero .asset-label,
.mini-profit {
  color: var(--muted);
}

.btc-total strong {
  color: #0f172a;
  font-size: clamp(36px, 10vw, 44px);
}

.hero-actions {
  margin: 0 0 22px;
}

.hero-action-pill,
.hero-action-pill.is-alt {
  min-height: 50px;
  border-radius: 16px;
}

.hero-action-pill.is-alt {
  background: linear-gradient(135deg, #111827, #334155);
}

.promo-card,
.kyc-banner,
.market-info-card,
.announcement-list article,
.pair-list a,
.pair-list article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.promo-card {
  grid-template-columns: 48px 1fr;
  min-height: 82px;
}

.promo-card i,
.kyc-banner > svg:first-child {
  background: #ecfdf5;
  color: var(--green);
}

.promo-card strong {
  color: #10233f;
}

.market-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 20px -18px 10px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0.88));
  backdrop-filter: blur(12px);
}

.market-tabs button {
  border: 1px solid transparent;
  border-radius: 14px;
  background: #eef2f7;
  color: var(--muted);
}

.market-tabs button.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.market-info-grid {
  gap: 10px;
}

.news-link,
.view-more {
  color: var(--green);
  font-weight: 800;
}

/* Tech blue refinement */
.exchange-hero {
  background:
    radial-gradient(circle at 92% 10%, rgba(84, 184, 255, 0.24), transparent 24%),
    linear-gradient(135deg, rgba(36, 124, 255, 0.1), rgba(172, 221, 255, 0.2)),
    #ffffff;
}

.guest-auth-card strong,
.btc-total strong {
  color: #102033;
}

.hero-action-pill.is-alt {
  background: linear-gradient(135deg, #102f66, #1b65d8);
}

.promo-card i,
.kyc-banner > svg:first-child {
  background: #e8f4ff;
  color: #247cff;
}

.news-link,
.view-more {
  color: #247cff;
}

.market-tabs {
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(244, 249, 255, 0.88));
}

.market-tabs button {
  background: #eaf3ff;
}

.market-tabs button.active {
  background: #1b65d8;
  box-shadow: 0 10px 22px rgba(36, 124, 255, 0.16);
}

/* Oh bits dark home overrides */
.phone-page .kyc-banner {
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  gap: 12px;
  min-height: 82px;
  margin: 16px 0 22px;
  padding: 14px 16px;
  border: 1px solid rgba(247, 167, 7, 0.32);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 18%, rgba(247, 167, 7, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(17, 24, 34, 0.96), rgba(8, 12, 18, 0.96));
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.phone-page .kyc-banner:hover {
  background:
    radial-gradient(circle at 8% 18%, rgba(247, 167, 7, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(20, 28, 40, 0.98), rgba(8, 12, 18, 0.98));
}

.phone-page .kyc-banner > svg:first-child {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  padding: 12px;
  border: 1px solid rgba(247, 167, 7, 0.38);
  border-radius: 14px;
  background: rgba(247, 167, 7, 0.12);
  color: var(--brand);
}

.phone-page .kyc-banner strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.phone-page .kyc-banner p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.phone-page .kyc-banner > svg:last-child {
  color: var(--muted);
}

/* Market row alignment */
.pair-list {
  gap: 10px;
}

.pair-row {
  grid-template-columns: minmax(0, 1fr) minmax(78px, 96px) 64px;
  column-gap: 14px;
  min-height: 64px;
  padding: 9px 10px 9px 10px;
  overflow: hidden;
}

.pair-main,
.pair-name,
.pair-price {
  min-width: 0;
}

.pair-main .coin-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.pair-name strong,
.pair-name small,
.pair-price strong,
.pair-price small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pair-name strong {
  display: block;
}

.pair-name strong small {
  display: none;
}

.pair-name > small {
  display: block;
  margin-top: 3px;
}

.pair-price {
  justify-self: end;
  padding-right: 2px;
}

.pair-price strong {
  display: block;
}

.change-badge {
  justify-self: end;
  width: 64px;
  min-width: 64px;
  min-height: 36px;
  border-radius: 10px;
}

@media (max-width: 380px) {
  .pair-row {
    grid-template-columns: minmax(0, 1fr) minmax(70px, 86px) 60px;
    column-gap: 10px;
    padding-right: 8px;
  }

  .pair-main {
    gap: 8px;
  }

  .pair-main .coin-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .pair-name strong,
  .pair-price strong,
  .change-badge {
    font-size: 13px;
  }

  .change-badge {
    width: 60px;
    min-width: 60px;
  }
}

/* Lower homepage sections alignment */
.view-more {
  min-height: 44px;
  margin: 22px 0 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
}

.market-info-grid {
  gap: 10px;
}

.market-info-card {
  min-height: 92px;
  padding: 13px 10px 12px;
  border-radius: 18px;
}

.market-info-card strong {
  margin-top: 9px;
  font-size: 18px;
  line-height: 1.1;
}

.market-info-card small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.news-link {
  min-height: 42px;
  margin: 10px 0 8px;
  padding: 0 2px;
}

.announcement-list {
  gap: 10px;
  margin-bottom: 22px;
}

.announcement-list article {
  padding: 13px 14px;
}

.announcement-list article h3 {
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Oh bits home mockup alignment */
.home-top-row {
  grid-template-columns: 44px 1fr auto;
  min-height: 54px;
}

.home-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: center;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.home-title::before {
  content: "";
  width: 34px;
  height: 34px;
  background: url("../assets/brand-mark.svg") center / contain no-repeat;
}

.exchange-hero {
  min-height: 166px;
  margin: 20px 0 16px;
  padding: 28px 20px;
  border-color: rgba(247, 167, 7, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 83% 36%, rgba(247, 167, 7, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(24, 31, 41, 0.96), rgba(8, 12, 18, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow);
}

.exchange-hero::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 34px;
  width: 118px;
  height: 92px;
  opacity: 0.78;
  background:
    linear-gradient(135deg, transparent 40%, rgba(247, 167, 7, 0.25) 41% 42%, transparent 43%),
    radial-gradient(circle at 24% 78%, #f7931a 0 18px, transparent 19px),
    radial-gradient(circle at 54% 82%, #313843 0 16px, transparent 17px),
    linear-gradient(135deg, transparent 0 34%, #1b212a 35% 68%, transparent 69%);
  pointer-events: none;
}

.exchange-hero .asset-label,
.mini-profit {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.balance-visibility-toggle {
  color: var(--muted);
}

.btc-total {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.btc-total strong {
  color: var(--text);
  font-size: clamp(44px, 13vw, 56px);
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.btc-total span {
  color: var(--text);
  font-size: 15px;
}

.mini-profit b {
  margin-left: 8px;
  font-size: 18px;
}

.hero-actions {
  gap: 12px;
  margin: 18px 0 22px;
}

.hero-action-pill {
  min-height: 58px;
  border-radius: 12px;
  font-size: 16px;
}

.hero-action-pill.is-alt {
  border: 1px solid #333a44;
  background: linear-gradient(180deg, #111821 0%, #0b1017 100%);
  color: var(--text);
  box-shadow: none;
}

.market-tabs {
  position: static;
  margin: 18px 0 0;
  padding: 18px 18px 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, rgba(15, 21, 29, 0.96), rgba(10, 15, 21, 0.96));
}

.market-tabs button {
  padding: 0 4px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
}

.market-tabs button.active {
  border-bottom-color: var(--brand);
  background: transparent;
  color: var(--brand);
  box-shadow: none;
}

.pair-list {
  gap: 0;
  margin: 0 0 18px;
  padding: 14px 10px 16px;
  border: 1px solid var(--line);
  border-top-color: #1c232c;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, rgba(15, 21, 29, 0.96), rgba(8, 12, 18, 0.98));
}

.pair-row,
.pair-list a,
.pair-list article {
  min-height: 72px;
  margin-bottom: 10px;
  border: 1px solid #202730;
  border-radius: 14px;
  background: linear-gradient(180deg, #101720 0%, #0a0f15 100%);
  box-shadow: none;
}

.pair-row:last-child,
.pair-list a:last-child,
.pair-list article:last-child {
  margin-bottom: 0;
}

.pair-name strong,
.pair-price strong {
  color: var(--text);
}

.pair-name small,
.pair-price small {
  color: var(--muted);
}

.change-badge {
  width: 66px;
  min-width: 66px;
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #35d875 0%, #159c4c 100%);
}

.change-badge.down {
  background: linear-gradient(180deg, #ff5d66 0%, #de2f3a 100%);
}

.view-more {
  border: 0;
  background: transparent;
  box-shadow: none;
}
