/*
 * MihanArz Portal — search-first masthead and editorial market workspace.
 * This layer intentionally changes the homepage structure instead of
 * reskinning the previous card dashboard.
 */
:root {
  --portal-blue: #2f6466;
  --portal-blue-dark: #244e50;
  --portal-blue-soft: #e8f1ee;
  --portal-ink: #263437;
  --portal-text: #485754;
  --portal-muted: #7b8581;
  --portal-line: #ded9cf;
  --portal-line-soft: #ece8df;
  --portal-surface: #fffdf8;
  --portal-canvas: #f3f0e9;
  --portal-up: #07845d;
  --portal-up-soft: #eaf8f2;
  --portal-down: #c43d4d;
  --portal-down-soft: #fff0f2;
  --portal-gold: #8a6826;
  --portal-gold-soft: #f8f0dc;
  --portal-shadow: 0 18px 52px rgba(54, 66, 61, .075);
  --white: #fffdf8;
  --bg: #f3f0e9;
  --bg-card: #fffdf8;
  --bg-hover: #f7f4ee;
  --border: #ded9cf;
  --border-md: #cbc4b8;
  --blue: #2f6466;
  --blue-lt: #e8f1ee;
  --blue-md: #4c7a78;
  --text-1: #263437;
  --text-2: #465451;
  --text-3: #6f7a76;
  --text-4: #929b97;
  --mz-ink: #263437;
  --mz-text: #485754;
  --mz-muted: #7b8581;
  --mz-line: #ded9cf;
  --mz-soft: #f3f0e9;
  --mz-surface: #fffdf8;
  --mz-brand: #2f6466;
  --mz-brand-dark: #244e50;
  --mz-brand-soft: #e8f1ee;
  --mz2-navy: #263437;
  --mz2-text: #485754;
  --mz2-muted: #7b8581;
  --mz2-blue: #2f6466;
  --mz2-blue-strong: #244e50;
  --mz2-blue-soft: #e8f1ee;
  --mz2-line: #ded9cf;
  --mz2-bg: #f3f0e9;
  --mz2-card: #fffdf8;
}

html {
  scroll-padding-top: 180px;
}

body {
  font-family: 'Ravi', Tahoma, sans-serif;
  color: var(--portal-text);
  background: linear-gradient(180deg, #f7f4ef 0, var(--portal-canvas) 520px);
}

button,
input,
select,
textarea {
  font-family: 'Ravi', Tahoma, sans-serif;
}

.market-masthead {
  z-index: 900;
  top: 0;
  color: var(--portal-text);
  background: rgba(255, 253, 248, .98);
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  box-shadow: 0 8px 30px rgba(25, 44, 72, .045);
  backdrop-filter: none;
}

.mast-shell {
  width: min(calc(100% - 32px), 1240px);
  margin-inline: auto;
}

.mast-utility {
  min-height: 35px;
  color: #5e7189;
  background: #eeebe4;
  border-bottom: 1px solid #dfdad0;
}

.mast-utility-inner {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 10.5px;
}

.mast-market-state,
.mast-mini-quotes,
.mast-utility-links,
.mast-mini-quotes a {
  display: flex;
  align-items: center;
}

.mast-market-state {
  flex: 0 0 auto;
  gap: 7px;
  white-space: nowrap;
}

.mast-market-state strong {
  color: #39516e;
  font-weight: 800;
}

.mast-state-dot {
  width: 7px;
  height: 7px;
  background: var(--portal-up);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(7, 132, 93, .12);
}

.mast-market-state.is-stale .mast-state-dot {
  background: #cc8b14;
  box-shadow: 0 0 0 3px rgba(204, 139, 20, .14);
}

.mast-mini-quotes {
  min-width: 0;
  flex: 1;
  justify-content: center;
  overflow: hidden;
}

.mast-mini-quotes a {
  min-width: 0;
  padding-inline: 12px;
  gap: 6px;
  color: #52667e;
  border-inline-start: 1px solid #e1e8f0;
  white-space: nowrap;
}

.mast-mini-quotes a:first-child {
  border-inline-start: 0;
}

.mast-mini-quotes strong {
  color: #172b48;
  font-weight: 850;
}

.mast-mini-quotes small {
  font-size: 9px;
  font-weight: 800;
}

.mast-mini-quotes .is-up,
.portal-change.is-up {
  color: var(--portal-up);
}

.mast-mini-quotes .is-down,
.portal-change.is-down {
  color: var(--portal-down);
}

.mast-mini-quotes .is-flat,
.portal-change.is-flat {
  color: #7c8999;
}

.mast-utility-links {
  flex: 0 0 auto;
  gap: 15px;
  white-space: nowrap;
}

.mast-utility-links a:hover {
  color: var(--portal-blue);
}

.mast-main {
  background: var(--portal-surface);
}

.mast-main-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 180px minmax(280px, 520px) 1fr;
  align-items: center;
  gap: 28px;
}

.mast-logo {
  width: fit-content;
  flex-shrink: 0;
}

.mast-logo .logo-img {
  width: auto;
  height: 42px;
  max-width: 170px;
  object-fit: contain;
}

.mast-search {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  color: #667990;
  text-align: right;
  background: #f6f8fb;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mast-search:hover,
.mast-search:focus-visible {
  color: var(--portal-blue);
  background: #fafdff;
  border-color: #a9caef;
  box-shadow: 0 0 0 4px rgba(18, 102, 212, .08);
  outline: 0;
}

.mast-search > .mz-icon {
  width: 20px;
  height: 20px;
}

.mast-search > span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.mast-search strong {
  color: #334a66;
  font-size: 12px;
  font-weight: 800;
}

.mast-search small {
  overflow: hidden;
  color: #8a99aa;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mast-search kbd {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #77889b;
  background: #fff;
  border: 1px solid #d4dde8;
  border-bottom-width: 2px;
  border-radius: 6px;
  direction: ltr;
  font-family: inherit;
  font-size: 10px;
}

.mast-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mast-watch,
.mast-converter {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.mast-watch {
  color: #405671;
  background: #fff;
  border: 1px solid var(--portal-line);
  cursor: pointer;
}

.mast-converter {
  color: #fff;
  background: var(--portal-blue);
  border: 1px solid var(--portal-blue);
}

.mast-watch:hover {
  color: var(--portal-blue);
  border-color: #adcaed;
}

.mast-converter:hover {
  color: #fff;
  background: var(--portal-blue-dark);
}

.mast-watch .mz-icon,
.mast-converter .mz-icon {
  width: 16px;
  height: 16px;
}

.mast-actions .hamburger {
  width: 40px;
  height: 40px;
  border-color: var(--portal-line);
  border-radius: 10px;
}

.mast-nav-row {
  background: var(--portal-surface);
  border-top: 1px solid #edf1f5;
}

.mast-nav-shell {
  min-height: 47px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}

.mast-nav {
  display: flex;
  align-items: stretch;
  gap: 3px;
}

.mast-nav > a {
  min-height: 47px;
  padding: 0 13px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #445a74;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.mast-nav > a::after {
  height: 2px;
  content: '';
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  background: transparent;
  border-radius: 2px 2px 0 0;
}

.mast-nav > a:hover,
.mast-nav > a.active {
  color: var(--portal-blue);
}

.mast-nav > a.active::after {
  background: var(--portal-blue);
}

.mast-nav .mz-icon {
  width: 15px;
  height: 15px;
}

.mast-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8996a6;
  font-size: 10px;
  white-space: nowrap;
}

.mast-disclaimer .mz-icon {
  width: 14px;
  height: 14px;
}

.mast-mobile-nav {
  top: calc(100% + 8px);
}

.search-result-market-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
}

.search-result-market-icon > .mz-icon {
  width: 20px;
  height: 20px;
}

.search-result-market-icon .market-icon {
  width: 38px;
  height: 38px;
}

.market-search-results > a[hidden] {
  display: none !important;
}

.portal-home {
  padding-top: 0;
}

.portal-intro {
  padding: 42px 2px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .5fr);
  align-items: end;
  gap: 50px;
}

.portal-kicker {
  display: block;
  color: var(--portal-blue);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .01em;
}

.portal-intro h1 {
  max-width: 760px;
  margin: 7px 0 9px;
  color: var(--portal-ink);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.portal-intro h1 span {
  color: var(--portal-blue);
}

.portal-intro-copy > p {
  max-width: 760px;
  margin: 0;
  color: #61748c;
  font-size: 14px;
  line-height: 2;
}

.portal-intro-meta {
  padding-inline-start: 22px;
  display: grid;
  gap: 9px;
  border-inline-start: 1px solid #dce5ef;
}

.portal-date,
.portal-freshness {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #425975;
  font-size: 11px;
  font-weight: 800;
}

.portal-date .mz-icon {
  width: 16px;
  height: 16px;
  color: var(--portal-blue);
}

.portal-freshness i {
  width: 7px;
  height: 7px;
  background: var(--portal-up);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(7, 132, 93, .1);
}

.portal-freshness.is-stale i {
  background: #c28718;
  box-shadow: 0 0 0 3px rgba(194, 135, 24, .12);
}

.portal-intro-meta small {
  color: #8795a6;
  font-size: 10px;
}

.portal-snapshot {
  overflow: hidden;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  box-shadow: var(--portal-shadow);
}

.portal-snapshot-head {
  min-height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--portal-line-soft);
}

.portal-snapshot-head > div {
  display: grid;
  gap: 2px;
}

.portal-snapshot-head span {
  color: #8795a7;
  font-size: 9.5px;
  font-weight: 700;
}

.portal-snapshot-head strong {
  color: var(--portal-ink);
  font-size: 15px;
  font-weight: 900;
}

.portal-snapshot-head > a,
.portal-section-head > a,
.portal-all-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--portal-blue);
  font-size: 10.5px;
  font-weight: 850;
}

.portal-snapshot-head .mz-icon,
.portal-section-head > a .mz-icon,
.portal-all-link .mz-icon {
  width: 14px;
  height: 14px;
}

.portal-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-quote {
  min-width: 0;
  min-height: 132px;
  padding: 22px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 12px 10px;
  border-inline-start: 1px solid var(--portal-line-soft);
  transition: background .16s ease;
}

.portal-quote:first-child {
  border-inline-start: 0;
}

.portal-quote:hover {
  background: #f9fbfd;
}

.portal-quote-icon {
  grid-row: 1;
}

.portal-quote .market-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.portal-quote-name {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-quote-name strong {
  overflow: hidden;
  color: #263b57;
  font-size: 11.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-quote-name small,
.portal-quote-value small {
  color: #8a98a8;
  font-size: 9px;
}

.portal-quote-value {
  grid-column: 1 / 3;
  grid-row: 2;
  display: grid;
  gap: 3px;
}

.portal-quote-value strong {
  color: var(--portal-ink);
  direction: ltr;
  font-size: clamp(15px, 1.55vw, 20px);
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.portal-change {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  direction: ltr;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.portal-change .mz-icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}

.portal-change.is-up .mz-icon {
  transform: rotate(90deg);
}

.portal-change.is-down .mz-icon {
  transform: rotate(-90deg);
}

.portal-workspace {
  margin-top: 28px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: start;
  gap: 20px;
  scroll-margin-top: 180px;
}

.portal-board,
.portal-brief {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(28, 48, 76, .045);
}

.portal-board-head {
  min-height: 84px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--portal-line-soft);
}

.portal-board-head h2,
.portal-section-head h2,
.portal-tools h2,
.portal-guide h2,
.portal-brief h2 {
  margin: 4px 0 0;
  color: var(--portal-ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.portal-tabs {
  padding: 4px;
  display: flex;
  gap: 3px;
  background: #f2f5f8;
  border-radius: 11px;
}

.portal-tabs button {
  min-height: 35px;
  padding: 0 13px;
  color: #65768a;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 850;
}

.portal-tabs button:hover {
  color: var(--portal-blue);
}

.portal-tabs button.is-active {
  color: var(--portal-blue);
  background: #fff;
  box-shadow: 0 3px 10px rgba(28, 48, 76, .08);
}

.portal-tab-panel[hidden] {
  display: none !important;
}

.portal-tab-panel {
  min-width: 0;
  max-width: 100%;
}

.portal-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th {
  padding: 11px 18px;
  color: #8290a0;
  background: #fbfcfd;
  border-bottom: 1px solid var(--portal-line-soft);
  font-size: 9.5px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.portal-table th:nth-child(2),
.portal-table td:nth-child(2),
.portal-table th:nth-child(3),
.portal-table td:nth-child(3) {
  text-align: left;
}

.portal-table td {
  height: 68px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--portal-line-soft);
  vertical-align: middle;
}

.portal-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-table tbody tr {
  transition: background .14s ease;
}

.portal-table tbody tr:hover {
  background: #f9fbfd;
}

.portal-asset {
  display: flex;
  align-items: center;
  gap: 11px;
}

.portal-asset .market-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
}

.portal-asset > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-asset strong {
  overflow: hidden;
  color: #243954;
  font-size: 11.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-asset small,
.portal-price-cell small {
  color: #8c99a8;
  font-size: 9px;
}

.portal-price-cell {
  min-width: 148px;
}

.portal-price-cell strong {
  display: block;
  color: var(--portal-ink);
  font-size: 13px;
  font-weight: 900;
}

.portal-price-cell small {
  display: block;
  margin-top: 2px;
}

.portal-row-action {
  width: 86px;
  text-align: left;
  white-space: nowrap;
}

.portal-row-action button,
.portal-row-action > a {
  width: 30px;
  height: 30px;
  margin-inline-start: 3px;
  display: inline-grid;
  place-items: center;
  color: #78889a;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  cursor: pointer;
}

.portal-row-action button:hover,
.portal-row-action button.is-watched,
.portal-row-action > a:hover {
  color: var(--portal-blue);
  background: var(--portal-blue-soft);
  border-color: #bfd6f1;
}

.portal-row-action button.is-watched {
  color: #fff;
  background: var(--portal-blue);
}

.portal-row-action .mz-icon {
  width: 14px;
  height: 14px;
}

.portal-all-link {
  min-height: 50px;
  padding: 0 20px;
  justify-content: center;
  background: #fbfcfd;
  border-top: 1px solid var(--portal-line-soft);
}

.portal-brief-head {
  padding: 20px 20px 14px;
}

.portal-brief-head p {
  margin: 6px 0 0;
  color: #8694a5;
  font-size: 9.5px;
}

.portal-movers {
  margin: 0;
  padding: 0 14px;
  list-style: none;
}

.portal-movers li + li {
  border-top: 1px solid var(--portal-line-soft);
}

.portal-movers a {
  min-height: 65px;
  display: grid;
  grid-template-columns: 22px 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.portal-rank {
  color: #a0acba;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.portal-movers .market-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
}

.portal-mover-name {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-mover-name strong {
  overflow: hidden;
  color: #2b405b;
  font-size: 10.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-mover-name small {
  color: #8c99a7;
  font-size: 8.5px;
}

.portal-brief-note {
  margin: 10px 14px 14px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #718197;
  background: #f7f9fc;
  border-radius: 9px;
  font-size: 8.5px;
  line-height: 1.8;
}

.portal-brief-note .mz-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--portal-blue);
}

.portal-watch-open {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--portal-blue);
  background: #f7fbff;
  border: 0;
  border-top: 1px solid #dfeaf7;
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 850;
}

.portal-watch-open .mz-icon {
  width: 14px;
  height: 14px;
}

.portal-watch-open .mz-icon:last-child {
  margin-inline-start: auto;
}

.mz-ad {
  margin: 24px 0 0;
  position: relative;
}

.mz-ad-label {
  padding: 3px 7px;
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 7px;
  color: #7a899b;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(215, 224, 234, .9);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
}

.mz-ad-link {
  min-height: 122px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
}

.mz-ad-link.has-artwork {
  background: #fff;
}

.mz-ad-link.has-artwork picture,
.mz-ad-link.has-artwork img {
  width: 100%;
  display: block;
}

.mz-ad-link.has-artwork img {
  min-height: 110px;
  max-height: 190px;
  object-fit: cover;
}

.mz-ad-link.is-house-ad {
  padding: 22px 26px;
  gap: 16px;
  color: #36516f;
  background-color: #f2f7fd;
  background-image: linear-gradient(90deg, rgba(18, 102, 212, .035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.mz-ad-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #fff;
  border: 1px solid #ccdef2;
  border-radius: 13px;
}

.mz-ad-mark .mz-icon {
  width: 23px;
  height: 23px;
}

.mz-ad-copy {
  display: grid;
  gap: 4px;
}

.mz-ad-copy strong {
  color: #173352;
  font-size: 15px;
  font-weight: 900;
}

.mz-ad-copy small {
  color: #667c96;
  font-size: 10.5px;
}

.mz-ad-action {
  min-height: 38px;
  margin-inline-start: auto;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: var(--portal-blue);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.mz-ad-action .mz-icon {
  width: 13px;
  height: 13px;
}

.portal-tools {
  margin-top: 24px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.8fr);
  align-items: center;
  gap: 38px;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
}

.portal-tools-copy p {
  margin: 7px 0 0;
  color: #7b8b9d;
  font-size: 10.5px;
  line-height: 1.9;
}

.portal-tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-tool-links > a {
  min-width: 0;
  min-height: 72px;
  padding: 11px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  background: #f8fafc;
  border: 1px solid #e6ecf3;
  border-radius: 12px;
  transition: border-color .16s ease, transform .16s ease;
}

.portal-tool-links > a:hover {
  border-color: #bdd3ed;
  transform: translateY(-2px);
}

.portal-tool-links > a > span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
  background: #fff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
}

.portal-tool-links > a > span .mz-icon {
  width: 18px;
  height: 18px;
}

.portal-tool-links > a > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-tool-links strong {
  color: #263d58;
  font-size: 10.5px;
  font-weight: 850;
}

.portal-tool-links small {
  overflow: hidden;
  color: #8391a1;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-tool-links > a > .mz-icon {
  width: 14px;
  height: 14px;
  color: #96a4b4;
}

.portal-crypto {
  margin-top: 40px;
}

.portal-section-head {
  margin-bottom: 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.portal-crypto-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
}

.portal-crypto-rail > a {
  min-width: 0;
  min-height: 96px;
  padding: 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 10px;
  border-inline-start: 1px solid var(--portal-line-soft);
  border-bottom: 1px solid var(--portal-line-soft);
}

.portal-crypto-rail > a:nth-child(5n + 1) {
  border-inline-start: 0;
}

.portal-crypto-rail > a:nth-last-child(-n + 5) {
  border-bottom: 0;
}

.portal-crypto-rail .market-icon {
  width: 40px;
  height: 40px;
  grid-row: 1;
  border-radius: 11px;
}

.portal-crypto-rail > a > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.portal-crypto-rail > a > span strong {
  overflow: hidden;
  color: #263d58;
  font-size: 10.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-crypto-rail > a > span small {
  color: #8a98a8;
  font-size: 8.5px;
}

.portal-crypto-rail > a > b {
  grid-column: 1 / 2;
  color: var(--portal-ink);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.portal-crypto-rail > a > em {
  grid-column: 2;
  justify-self: end;
}

.portal-guide {
  margin-top: 40px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  gap: 38px;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
}

.portal-guide h2 {
  max-width: 760px;
  margin-top: 6px;
  font-size: clamp(21px, 2.3vw, 29px);
  line-height: 1.55;
}

.portal-guide-content > p {
  max-width: 800px;
  margin: 10px 0 0;
  color: #657990;
  font-size: 12px;
  line-height: 2.15;
}

.portal-guide-paths {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.portal-guide-paths a {
  min-height: 94px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-content: center;
  gap: 3px 8px;
  background: #f8fafc;
  border: 1px solid #e5ebf2;
  border-radius: 12px;
}

.portal-guide-paths span {
  grid-column: 1;
  color: var(--portal-blue);
  font-size: 9px;
  font-weight: 800;
}

.portal-guide-paths strong {
  grid-column: 1;
  color: #30465f;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.7;
}

.portal-guide-paths .mz-icon {
  width: 14px;
  height: 14px;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: #8a99aa;
}

.portal-method-note {
  padding: 24px;
  align-self: stretch;
  color: #435a75;
  background: var(--portal-blue-soft);
  border: 1px solid #d6e6f7;
  border-radius: 15px;
}

.portal-method-note > .mz-icon {
  width: 30px;
  height: 30px;
  color: var(--portal-blue);
}

.portal-method-note h3 {
  margin: 14px 0 7px;
  color: #173958;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.65;
}

.portal-method-note p {
  margin: 0 0 16px;
  color: #5b718a;
  font-size: 10.5px;
  line-height: 2;
}

.portal-method-note a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--portal-blue);
  font-size: 10px;
  font-weight: 850;
}

.portal-method-note a .mz-icon {
  width: 13px;
  height: 13px;
}

.portal-faq {
  margin-top: 40px;
}

.portal-faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-faq details {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 13px;
}

.portal-faq summary {
  min-height: 59px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #2d435e;
  cursor: pointer;
  list-style: none;
  font-size: 10.5px;
  font-weight: 850;
}

.portal-faq summary::-webkit-details-marker {
  display: none;
}

.portal-faq summary .mz-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #8796a7;
  transition: transform .18s ease;
}

.portal-faq details[open] summary .mz-icon {
  color: var(--portal-blue);
  transform: rotate(180deg);
}

.portal-faq details p {
  margin: 0;
  padding: 0 16px 16px;
  color: #697b90;
  font-size: 10.5px;
  line-height: 2;
}

@media (max-width: 1120px) {
  .mast-main-inner {
    grid-template-columns: 158px minmax(260px, 1fr) auto;
    gap: 16px;
  }

  .mast-mini-quotes a:nth-child(n + 4) {
    display: none;
  }

  .mast-disclaimer {
    display: none;
  }

  .portal-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .portal-quote {
    padding: 18px 15px;
  }

  .portal-tools {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 135px;
  }

  .mast-utility {
    display: none;
  }

  .mast-main-inner {
    min-height: 116px;
    padding-block: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .mast-logo {
    order: 1;
  }

  .mast-actions {
    margin-inline-start: auto;
    order: 2;
  }

  .mast-search {
    width: 100%;
    min-height: 42px;
    order: 3;
  }

  .mast-search small {
    display: none;
  }

  .mast-nav-row {
    display: none;
  }

  .mast-actions .hamburger {
    display: grid;
  }

  .mast-mobile-nav {
    top: calc(100% + 7px);
  }

  .portal-intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .portal-intro-meta {
    padding-inline-start: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    border: 0;
  }

  .portal-snapshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-quote:nth-child(odd) {
    border-inline-start: 0;
  }

  .portal-quote:nth-child(-n + 2) {
    border-bottom: 1px solid var(--portal-line-soft);
  }

  .portal-workspace,
  .portal-guide {
    grid-template-columns: 1fr;
  }

  .portal-brief {
    display: grid;
    grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
  }

  .portal-brief-head {
    grid-column: 1;
  }

  .portal-movers {
    grid-column: 2;
    grid-row: 1 / 4;
  }

  .portal-brief-note,
  .portal-watch-open {
    grid-column: 1;
  }

  .portal-crypto-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-crypto-rail > a,
  .portal-crypto-rail > a:nth-child(5n + 1),
  .portal-crypto-rail > a:nth-last-child(-n + 5) {
    border-inline-start: 1px solid var(--portal-line-soft);
    border-bottom: 1px solid var(--portal-line-soft);
  }

  .portal-crypto-rail > a:nth-child(odd) {
    border-inline-start: 0;
  }

  .portal-crypto-rail > a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .mast-shell,
  .portal-home {
    width: min(calc(100% - 24px), 1240px);
  }

  .mast-main-inner {
    min-height: 108px;
  }

  .mast-logo .logo-img {
    height: 36px;
    max-width: 145px;
  }

  .mast-watch,
  .mast-converter {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .mast-watch span,
  .mast-converter span {
    display: none;
  }

  .portal-intro {
    padding: 29px 0 20px;
  }

  .portal-intro h1 {
    font-size: clamp(25px, 8vw, 34px);
  }

  .portal-intro-copy > p {
    font-size: 12px;
  }

  .portal-snapshot-head,
  .portal-board-head,
  .portal-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-snapshot-head {
    min-height: 76px;
    padding-block: 14px;
  }

  .portal-quote {
    min-height: 122px;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .portal-quote .market-icon {
    width: 38px;
    height: 38px;
  }

  .portal-quote-value {
    grid-column: 1 / 3;
  }

  .portal-quote > .portal-change {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: end;
  }

  .portal-board-head {
    padding: 16px;
  }

  .portal-tabs {
    width: 100%;
  }

  .portal-tabs button {
    min-width: 0;
    flex: 1;
    padding-inline: 7px;
  }

  .portal-table {
    min-width: 570px;
  }

  .portal-brief {
    display: block;
  }

  .mz-ad-link.is-house-ad {
    min-height: 154px;
    padding: 22px 18px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .mz-ad-copy {
    width: calc(100% - 66px);
  }

  .mz-ad-action {
    margin-inline-start: 66px;
  }

  .portal-tools {
    padding: 22px 16px;
  }

  .portal-tool-links,
  .portal-guide-paths,
  .portal-faq-list {
    grid-template-columns: 1fr;
  }

  .portal-guide {
    padding: 24px 18px;
    gap: 24px;
  }

  .portal-crypto {
    margin-top: 32px;
  }

  .portal-section-head {
    gap: 8px;
  }
}

@media (max-width: 430px) {
  .mast-search kbd {
    display: none;
  }

  .mast-search {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .portal-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .portal-quote,
  .portal-quote:nth-child(odd) {
    border-inline-start: 0;
    border-bottom: 1px solid var(--portal-line-soft);
  }

  .portal-quote:last-child {
    border-bottom: 0;
  }

  .portal-crypto-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .portal-crypto-rail > a,
  .portal-crypto-rail > a:nth-child(odd),
  .portal-crypto-rail > a:nth-last-child(-n + 2) {
    min-width: 220px;
    flex: 0 0 220px;
    border-inline-start: 1px solid var(--portal-line-soft);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .portal-crypto-rail > a:first-child {
    border-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-tool-links > a,
  .portal-faq summary .mz-icon {
    transition: none;
  }
}

/* Warm-neutral theme bridge for legacy market pages. */
body .sc,
body .pghd,
body .cmp-card,
body .info-strip-item,
body .seo-wrap,
body .cp-hero,
body .cp-stat,
body .cp-hero-meta,
body .wg-builder,
body .wg-how,
body .faq-item,
.portal-snapshot,
.portal-board,
.portal-brief,
.portal-tools,
.portal-crypto-rail,
.portal-guide,
.portal-faq details {
  background: var(--portal-surface);
  border-color: var(--portal-line);
  box-shadow: 0 10px 30px rgba(54, 66, 61, .045);
}

body .bcrumb a,
body .tc-lnk:hover .tnm,
body .section-more,
body .chart-detail-link,
body .seo-inner a {
  color: var(--portal-blue);
}

body .tbl-search-wrap,
body .pghd-meta-item,
body .cp-stat,
body .cp-hero-meta,
body .seo-tags span,
body .faq-item {
  background: #f7f4ee;
  border-color: var(--portal-line);
}

body .tbl-search-wrap:focus-within {
  border-color: var(--portal-blue);
  background: var(--portal-surface);
  box-shadow: 0 0 0 3px rgba(47, 100, 102, .09);
}

body.page-arz .pghd-usd {
  color: #fff !important;
  background: linear-gradient(135deg, #28585a, #63877f) !important;
  border-color: #547d78 !important;
  box-shadow: 0 10px 24px rgba(47, 100, 102, .18) !important;
}

body.page-arz .pghd-usd * {
  color: #fff !important;
}

body.page-arz .pghd,
body.page-arz .cp-hero {
  background: linear-gradient(110deg, #eef1eb, #fffdf8 62%) !important;
  border: 1px solid #d8d6cd !important;
  border-inline-start: 4px solid #4f7d79 !important;
  border-right-color: #4f7d79 !important;
}

body.page-arz .pghd::before {
  background: radial-gradient(circle, rgba(47, 100, 102, .09) 0%, transparent 65%);
}

body.page-gold .pghd,
body.page-gold .cp-hero {
  background: linear-gradient(110deg, #f8f0dc, #fffdf8 62%) !important;
  border-color: #e6d8b6 !important;
  border-right-color: #aa812f !important;
}

body.page-crypto .pghd,
body.page-crypto .cp-hero {
  background: linear-gradient(110deg, #f5ece6, #fffdf8 62%) !important;
  border-color: #e3d4ca !important;
  border-right-color: #9a6654 !important;
}

body.page-arz .cmp-card:hover {
  border-color: #6f9690;
  box-shadow: 0 8px 22px rgba(47, 100, 102, .1);
}

body.page-arz .seo-inner h2,
body.page-arz .ctab.active {
  border-color: var(--portal-blue);
}

body .ctab:hover {
  color: var(--portal-blue);
  border-color: #7da09b;
}

body .ctab.active {
  color: #fff;
  background: var(--portal-blue);
  border-color: var(--portal-blue);
}

body.page-arz .cp-sym-badge {
  color: var(--portal-blue);
  background: var(--portal-blue-soft);
  border-color: #b9d0cb;
}

.cp-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.cp-badges .cp-sym-badge {
  margin-bottom: 0;
}

.cp-market-badge {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  color: #6f6250;
  background: #f7f1e5;
  font-size: 10px;
  font-weight: 700;
}

.cp-market-badge.cp-market-free {
  color: #376562;
  background: #e8f1ee;
  border-color: #c8dbd6;
}

.cp-market-badge.cp-market-nima {
  color: #635780;
  background: #f0ecf7;
  border-color: #ddd4ec;
}

body .chart-wrap {
  min-height: 360px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdf8, #faf7f1);
}

body .chart-status {
  min-height: 300px;
  color: var(--portal-muted);
}

body.page-widget .wg-hero {
  background: linear-gradient(135deg, #dbe6df 0%, #e9e7dc 55%, #f5efe5 100%) !important;
  border: 0 !important;
}

body.page-widget .wg-hero h1 {
  color: #244e50 !important;
}

body.page-widget .wg-hero > .pg > p {
  color: #5c6d67 !important;
}

body.page-widget .wg-badge {
  color: #385f5e !important;
  background: rgba(255, 253, 248, .82) !important;
  border-color: rgba(86, 122, 116, .26) !important;
}

body.page-widget .wg-hero::after {
  background: var(--portal-canvas);
}

body.page-widget .wg-builder-head {
  background: linear-gradient(135deg, #2f6466, #63877f) !important;
}

body.page-widget .wg-builder-head h2,
body.page-widget .wg-builder-head p,
body.page-widget .wg-builder-head .mz-icon {
  color: #fff !important;
}

body.page-widget .wg-opt.on,
body.page-widget .wg-scb.on {
  color: var(--portal-blue);
  background: var(--portal-blue-soft);
  border-color: var(--portal-blue);
}

body.page-widget input {
  accent-color: var(--portal-blue);
}

@media (max-width: 700px) {
  body .chart-wrap {
    min-height: 300px;
    padding: 10px;
  }

  body .chart-status {
    min-height: 240px;
  }
}
