.nivata-data-page {
  background: var(--ivory-100);
}

.data-hero {
  position: relative;
  min-height: 82svh;
  padding: 168px var(--pad) 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.45fr);
  gap: clamp(50px, 9vw, 150px);
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(87, 216, 137, 0.16), transparent 27%),
    radial-gradient(circle at 5% 95%, rgba(197, 165, 106, 0.1), transparent 31%),
    linear-gradient(132deg, #061d18 0%, var(--forest-900) 58%, #174c40 100%);
  color: #fff;
}

.data-hero--compact {
  min-height: 68svh;
  grid-template-columns: 1fr;
}

.data-hero__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.065;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 90px 90px;
  -webkit-mask-image: linear-gradient(105deg, #000, transparent 74%);
  mask-image: linear-gradient(105deg, #000, transparent 74%);
  animation: data-mesh 28s linear infinite;
}

.data-hero::after {
  content: "";
  position: absolute;
  right: -15vw;
  bottom: -39vw;
  width: 75vw;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 6vw rgba(255, 255, 255, 0.012), 0 0 0 12vw rgba(255, 255, 255, 0.008);
}

.data-hero__copy,
.data-hero__stamp {
  position: relative;
  z-index: 1;
}

.data-hero__copy h1,
.data-hub__intro h2,
.data-guardrail h2,
.live-data-head h2,
.data-notes h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.data-hero__copy h1 {
  max-width: 1050px;
  font-size: clamp(60px, 8.5vw, 136px);
}

.data-hero--compact .data-hero__copy h1 {
  font-size: clamp(58px, 8vw, 118px);
}

.data-hero__copy h1 em,
.data-hub__intro h2 em,
.data-guardrail h2 em {
  color: var(--mint);
  font-weight: 400;
}

.data-hero__copy > p:last-child {
  max-width: 690px;
  margin: 38px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--serif);
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.52;
}

.data-hero__stamp {
  padding: 26px 0 7px 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.data-hero__stamp span {
  display: block;
  margin-bottom: 20px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.data-hero__stamp strong {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--serif);
  font-size: clamp(23px, 2.2vw, 32px);
  font-weight: 400;
  line-height: 1.45;
}

.data-hub {
  background: var(--ivory-100);
}

.data-hub__intro {
  margin: 0 0 clamp(58px, 8vw, 100px);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.45fr);
  gap: clamp(40px, 9vw, 150px);
  align-items: end;
}

.data-hub__intro h2 {
  color: var(--forest-950);
  font-size: clamp(52px, 7vw, 105px);
}

.data-hub__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.data-hub__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.data-hub-card {
  position: relative;
  min-height: 410px;
  padding: clamp(30px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffdf8;
  text-decoration: none;
  transition: background 260ms ease, color 260ms ease, transform 260ms ease;
}

.data-hub-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -110px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(18, 59, 50, 0.1);
  border-radius: 50%;
  transition: transform 450ms cubic-bezier(.2,.8,.2,1), border-color 260ms ease;
}

.data-hub-card:hover {
  z-index: 1;
  background: var(--forest-900);
  color: #fff;
  transform: translateY(-7px);
}

.data-hub-card:hover::after {
  border-color: rgba(87, 216, 137, 0.25);
  transform: translate(-20px, -20px) scale(1.14);
}

.data-hub-card > span {
  color: #2d8a5b;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.data-hub-card h3 {
  margin: auto 0 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.4vw, 51px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.data-hub-card p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  transition: color 260ms ease;
}

.data-hub-card:hover p {
  color: rgba(255, 255, 255, 0.58);
}

.data-hub-card > i {
  position: absolute;
  top: 42px;
  right: 42px;
  color: var(--mint);
  font-size: 20px;
  font-style: normal;
}

.data-guardrail {
  padding: clamp(90px, 12vw, 170px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.45fr);
  gap: clamp(40px, 8vw, 130px);
  align-items: end;
  background: var(--ivory-200);
  border-top: 1px solid var(--line);
}

.data-guardrail .overline {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: #2d8a5b;
}

.data-guardrail h2 {
  color: var(--forest-950);
  font-size: clamp(48px, 6vw, 90px);
}

.data-guardrail > p:not(.overline) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.data-guardrail > a {
  grid-column: 2;
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-underline-offset: 6px;
  text-transform: uppercase;
}

.live-data-section {
  padding: clamp(90px, 11vw, 160px) var(--pad);
}

.live-data-section--wide {
  padding-right: max(20px, 3vw);
  padding-left: max(20px, 3vw);
}

.live-data-head {
  max-width: 1500px;
  margin: 0 auto clamp(42px, 6vw, 76px);
  display: flex;
  justify-content: space-between;
  gap: 35px;
  align-items: end;
}

.live-data-head .overline {
  margin-bottom: 13px;
  color: #2d8a5b;
}

.live-data-head h2 {
  color: var(--forest-950);
  font-size: clamp(45px, 5.5vw, 84px);
}

.freshness {
  max-width: 360px;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(18, 59, 50, 0.14);
  background: rgba(255, 255, 255, 0.55);
  color: #52645c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.freshness i {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ead68;
  box-shadow: 0 0 0 5px rgba(46, 173, 104, 0.12);
}

.freshness.is-delayed i {
  background: #c59644;
  box-shadow: 0 0 0 5px rgba(197, 150, 68, 0.13);
}

.freshness.is-unavailable i {
  background: #a85643;
  box-shadow: 0 0 0 5px rgba(168, 86, 67, 0.12);
}

.market-message {
  max-width: 1500px;
  margin: -24px auto 34px;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  background: #f2e9d9;
  color: #645c4e;
  font-size: 13px;
}

.bullion-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bullion-card {
  position: relative;
  min-height: 360px;
  padding: clamp(30px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(13, 48, 40, 0.1);
}

.bullion-card--gold {
  background: linear-gradient(142deg, #f0e1ba, #c7a45f);
  color: #342a19;
}

.bullion-card--gold-soft {
  background: linear-gradient(142deg, #fffaf0, #e4d6b9);
  color: #3b3326;
}

.bullion-card--silver {
  background: linear-gradient(142deg, #eef1ef, #b7c1bd);
  color: #26332f;
}

.bullion-card > span {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.bullion-card > strong {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin-top: auto;
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: clamp(38px, 4.2vw, 64px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.bullion-card > small {
  position: relative;
  z-index: 1;
  margin-top: 15px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.62;
}

.bullion-card > i {
  position: absolute;
  z-index: 0;
  right: -0.07em;
  bottom: -0.28em;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--serif);
  font-size: 250px;
  font-style: normal;
  line-height: 1;
}

.data-notes {
  padding: clamp(80px, 10vw, 140px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 0.65fr);
  gap: clamp(50px, 9vw, 150px);
  align-items: start;
  background: var(--forest-950);
  color: #fff;
}

.data-notes h2 {
  font-size: clamp(46px, 5.5vw, 80px);
}

.data-notes > div {
  padding-left: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.data-notes p {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.data-notes p + p {
  margin-top: 24px;
}

.data-toolbar {
  max-width: 1500px;
  margin: 0 auto 22px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(200px, 0.35fr);
  gap: 18px;
  background: var(--forest-950);
}

.data-toolbar label {
  min-width: 0;
}

.data-toolbar label > span {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.43);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.data-toolbar input,
.data-toolbar select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: 0;
}

.data-toolbar input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.data-toolbar select option {
  color: var(--ink);
}

.data-toolbar input:focus,
.data-toolbar select:focus {
  border-color: var(--mint);
}

.data-toolbar--fund {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}

.data-search-button,
.fund-add,
.fund-remove {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.data-search-button {
  min-height: 48px;
  padding: 10px 20px;
  background: var(--mint);
  color: var(--forest-950);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-search-button span {
  margin-left: 10px;
}

.fund-search-results {
  max-width: 1500px;
  margin: -1px auto 24px;
  border: 1px solid var(--line);
  background: #fffdf8;
  box-shadow: 0 20px 55px rgba(13, 48, 40, 0.08);
}

.fund-search-result {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid rgba(18, 59, 50, 0.1);
}

.fund-search-result:last-child {
  border-bottom: 0;
}

.fund-search-result strong,
.fund-search-result small {
  display: block;
}

.fund-search-result strong {
  color: var(--forest-950);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
}

.fund-search-result small {
  margin-top: 4px;
  color: #87928c;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.fund-add {
  padding: 10px 13px;
  border: 1px solid rgba(18, 59, 50, 0.2);
  background: transparent;
  color: var(--forest-800);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fund-add:hover:not(:disabled) {
  border-color: var(--forest-900);
  background: var(--forest-900);
  color: #fff;
}

.fund-add:disabled {
  cursor: default;
  opacity: 0.48;
}

.fund-remove {
  margin-top: 8px;
  padding: 0;
  display: block;
  background: transparent;
  color: #8d5b4c;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
}

.fund-search-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

.market-message.is-error {
  border-left-color: #a85643;
  background: #f5e7e1;
  color: #714b40;
}

.data-table-wrap {
  max-width: 1500px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fffdf8;
  box-shadow: 0 28px 70px rgba(13, 48, 40, 0.09);
}

.data-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
  text-align: left;
}

.ipo-table {
  min-width: 1150px;
}

.data-table th,
.data-table td {
  padding: 21px 17px;
  border-bottom: 1px solid rgba(18, 59, 50, 0.1);
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--ivory-200);
  color: #4f6158;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.data-table th:first-child {
  width: 32%;
}

.data-table th span {
  margin-top: 4px;
  display: block;
  color: #95a099;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.data-table tbody tr {
  transition: background 160ms ease;
}

.data-table tbody tr:hover {
  background: #f7f3e9;
}

.data-table td {
  color: #526159;
  font-size: 13px;
}

.data-table td:first-child {
  color: var(--forest-950);
}

.scheme-name,
.issue-name,
.nav-value,
.date-range {
  display: block;
  color: var(--forest-950);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
}

a.issue-name {
  text-decoration-color: rgba(45, 138, 91, 0.45);
  text-underline-offset: 4px;
}

.scheme-meta,
.issue-meta,
.nav-date,
.date-close {
  margin-top: 6px;
  display: block;
  color: #66756d;
  font-size: 11px;
  line-height: 1.45;
}

.return-value {
  color: #277b51 !important;
  font-weight: 750;
  white-space: nowrap;
}

.return-value.is-negative {
  color: #a34f3d !important;
}

.status-pill {
  padding: 7px 9px;
  display: inline-block;
  border: 1px solid rgba(18, 59, 50, 0.15);
  color: #5c6d64;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-pill--open {
  border-color: rgba(42, 151, 91, 0.28);
  background: #e6f5ea;
  color: #227d4d;
}

.status-pill--upcoming,
.status-pill--announced {
  border-color: rgba(197, 165, 106, 0.38);
  background: #f7efdf;
  color: #7c6333;
}

.table-empty {
  padding: 60px 24px !important;
  color: var(--muted) !important;
  text-align: center;
}

.table-count {
  max-width: 1500px;
  margin: 14px auto 0;
  color: #7c8982;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.regulated-warning {
  max-width: 1500px;
  margin: 28px auto 0;
  padding: 24px 27px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  border-left: 3px solid var(--mint);
  background: var(--forest-950);
  color: #fff;
}

.regulated-warning strong {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.regulated-warning p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  line-height: 1.7;
}

.official-source-grid {
  max-width: 1500px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.official-source-grid a {
  position: relative;
  min-height: 145px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  color: var(--forest-950);
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.official-source-grid a:hover {
  background: var(--forest-900);
  color: #fff;
}

.official-source-grid span {
  color: #2d8a5b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.official-source-grid strong {
  margin-top: auto;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
}

.official-source-grid i {
  position: absolute;
  top: 24px;
  right: 24px;
  align-self: flex-end;
  color: var(--mint);
  font-style: normal;
}

@keyframes data-mesh {
  to { background-position: 90px 90px; }
}

@media (max-width: 1000px) {
  .data-hub__cards,
  .bullion-grid {
    grid-template-columns: 1fr;
  }

  .data-hub-card {
    min-height: 310px;
  }

  .bullion-card {
    min-height: 300px;
  }

  .data-notes {
    grid-template-columns: 1fr;
  }

  .official-source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .data-hero,
  .data-hub__intro,
  .data-guardrail {
    grid-template-columns: 1fr;
  }

  .data-hero {
    min-height: 720px;
    gap: 54px;
    align-content: end;
  }

  .data-hero--compact {
    min-height: 620px;
  }

  .data-hero__stamp {
    max-width: 520px;
  }

  .data-guardrail {
    gap: 34px;
  }

  .data-guardrail .overline,
  .data-guardrail > a {
    grid-column: auto;
  }

}

@media (max-width: 720px) {
  .data-hero {
    min-height: 650px;
    padding-top: 132px;
    padding-bottom: 62px;
  }

  .data-hero--compact {
    min-height: 570px;
  }

  .data-hero__copy h1,
  .data-hero--compact .data-hero__copy h1 {
    font-size: clamp(52px, 17vw, 82px);
  }

  .data-hero__copy > p:last-child {
    margin-top: 28px;
    font-size: 18px;
  }

  .live-data-head {
    display: block;
  }

  .freshness {
    max-width: none;
    margin-top: 28px;
  }

  .data-toolbar {
    grid-template-columns: 1fr;
  }

  .fund-search-result {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fund-add {
    width: 100%;
  }

  .data-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .data-table,
  .ipo-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    width: 100%;
    min-width: 0;
    display: block;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table tbody {
    display: grid;
    gap: 16px;
  }

  .data-table tbody tr {
    padding: 8px 20px;
    display: block;
    border: 1px solid var(--line);
    background: #fffdf8;
    box-shadow: 0 16px 42px rgba(13, 48, 40, 0.07);
  }

  .data-table tbody tr:hover {
    background: #fffdf8;
  }

  .data-table td {
    min-height: 48px;
    padding: 15px 0;
    display: grid;
    grid-template-columns: minmax(112px, 0.36fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-align: right;
  }

  .data-table td::before {
    content: attr(data-label);
    color: #5f6d66;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  .data-table td:first-child {
    padding-top: 22px;
  }

  .data-table td:first-child > * {
    grid-column: 2;
  }

  .data-table td > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .data-table td small {
    justify-self: end;
  }

  .table-empty {
    display: block !important;
  }

  .table-empty::before {
    display: none;
  }

  .regulated-warning {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .official-source-grid a {
    min-height: 118px;
  }

}

@media (max-width: 560px) {
  .live-data-section,
  .live-data-section--wide {
    padding-right: 16px;
    padding-left: 16px;
  }

  .data-hub,
  .data-guardrail,
  .data-notes {
    padding-right: 22px;
    padding-left: 22px;
  }

  .data-hub-card,
  .bullion-card {
    min-height: 280px;
  }

  .bullion-card > strong {
    font-size: clamp(34px, 10vw, 52px);
    letter-spacing: -0.04em;
    line-height: 1.05;
  }

  .data-toolbar {
    padding: 19px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .data-hero__mesh {
    animation: none;
  }
}

/* A slightly tighter vertical rhythm reduces scrolling without crowding data. */
.data-hero {
  min-height: 72svh;
  padding-top: 148px;
  padding-bottom: 72px;
}

.data-hero--compact {
  min-height: 58svh;
}

.data-hero__copy > p:last-child {
  margin-top: 30px;
}

.data-hub__intro {
  margin-bottom: clamp(46px, 6vw, 72px);
}

.data-guardrail,
.live-data-section {
  padding-top: clamp(72px, 8vw, 116px);
  padding-bottom: clamp(72px, 8vw, 116px);
}

.live-data-head {
  margin-bottom: clamp(34px, 4.5vw, 56px);
}

@media (max-width: 900px) {
  .data-hero {
    min-height: 640px;
  }

  .data-hero--compact {
    min-height: 550px;
  }
}

@media (max-width: 720px) {
  .data-hero {
    min-height: 590px;
    padding-top: 122px;
    padding-bottom: 54px;
  }

  .data-hero--compact {
    min-height: 520px;
  }

  .data-guardrail,
  .live-data-section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}
