/* Focused refinements for the Quantum Dawn inner pages. */

/* Weekly cards need even padding without the shared lists' forced heights. */
html[data-theme="qrl-dawn"] .weekly-list .listPage__item {
  min-height: 0;
  padding-block: 1.25rem;
  margin-bottom: 0;
}
html[data-theme="qrl-dawn"] .weekly-list .listPage__item h2 {
  min-height: 0;
}
html[data-theme="qrl-dawn"] .weekly-list .listPage__pag {
  margin-top: 60px;
}

/* Match partner cards: the whole logo panel responds to hover and keyboard focus. */
html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets > a {
  display: block;
  min-width: 0;
  margin-block: -20px 40px;
  cursor: pointer;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets :is(.core__el__top, .core__el__inner) {
  cursor: inherit;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-box);
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets .core__el {
  margin: 0;
  border-bottom: 1px solid var(--qrl-line);
  transition: border-color .2s ease;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:is(:hover, :focus-visible) .core__el {
  border-color: var(--color-primary);
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets .core__el__img {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  background: var(--color-base-200);
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  transition: background-color .2s ease;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  width: min(100%, 23rem);
  height: 100%;
  max-height: 8rem;
  min-width: 0;
  min-height: 0;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(.92);
  transition: none;
}

/* The Biconomy SVG embeds a bitmap icon. Keep that icon legible in monochrome. */
html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate:has(img[src$="/biconomy.svg"]) {
  position: relative;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate:has(img[src$="/biconomy.svg"])::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/markets/biconomy.svg") center / contain no-repeat;
  clip-path: inset(0 78% 0 0);
  filter: grayscale(1);
  pointer-events: none;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate.logo-unavailable:has(img[src$="/biconomy.svg"])::after {
  display: none;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:hover .market-logo-plate:has(img[src$="/biconomy.svg"])::after,
html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:focus-visible .market-logo-plate:has(img[src$="/biconomy.svg"])::after {
  display: none;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:is(:hover, :focus-visible) .core__el__img {
  background: #e9f0f2;
}

html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:hover .market-logo-plate img,
html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets a:focus-visible .market-logo-plate img {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="qrl-dawn"] body.coreTeam #markets .grid-markets :is(.core__el, .core__el__img) {
    transition: none;
  }
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .event.info .welcome__btn {
  display: block;
  height: auto;
  min-height: 3.375rem;
  padding: .8rem 1rem;
  white-space: normal;
  text-align: center;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .heading::before {
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: .04em;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .heading::after {
  left: -7px;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline.pro .heading.complete::after {
  left: -14px;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline.pro .event.complete::after {
  left: -64px;
}

/* Keep release context and delivery checklists readable within the timeline. */
html[data-theme="qrl-dawn"] #project-zond .roadmap-event {
  scroll-margin-top: 6rem;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event h3 {
  margin-bottom: .65rem;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .roadmap-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1rem;
  margin: 0 0 1rem;
  color: var(--qrl-muted);
  font-size: .875rem;
  letter-spacing: 0;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-state {
  color: var(--color-primary);
  font-weight: 600;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-state-complete {
  color: var(--color-success);
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event-current .roadmap-state {
  color: var(--color-secondary);
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .roadmap-progress-label {
  margin: 1rem 0 .4rem;
  color: var(--qrl-muted);
  font-size: .875rem;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .progress {
  width: min(100%, 19rem);
  margin-bottom: 1rem;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .progress div {
  background: var(--color-base-300);
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .progress .complete {
  background: var(--color-success);
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-event .roadmap-release-note {
  margin: 1rem 0;
  color: var(--qrl-muted);
  font-size: .875rem;
  line-height: 1.6;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-details {
  margin-top: 1.25rem;
  border-top: 1px solid var(--qrl-line);
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-details-title {
  margin: .85rem 0 .75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

html[data-theme="qrl-dawn"] #project-zond .timeline .roadmap-checklist {
  display: grid;
  gap: .8rem;
  margin: .25rem 0 1rem;
  padding: 0;
  list-style: none;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-checklist-item {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  color: var(--color-base-content);
  line-height: 1.5;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

html[data-theme="qrl-dawn"] #project-zond .roadmap-checklist-icon {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  align-self: flex-start;
  margin-top: .2rem;
  color: var(--color-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="qrl-dawn"] #project-zond .is-complete .roadmap-checklist-icon {
  color: var(--color-success);
}

.roadmap-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .roadmap-section-heading {
  padding-block: 0;
  margin-top: clamp(2.5rem, 5vw, 3.25rem);
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .roadmap-section-heading > .section-title-header {
  margin: 0 0 1.5rem;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .network-map {
  margin-bottom: 2rem;
}

html[data-theme="qrl-dawn"] body.coreTeam #project-zond .network-map > img.network-map {
  display: block;
  width: 100%;
  height: auto;
  padding-top: 1.25rem;
  margin: 0;
}

@media (max-width: 767px) {
  /* Collapse the stacked section and article padding above mobile post titles. */
  html[data-theme="qrl-dawn"] .blogPageInner .blogPage__inner {
    padding-block-start: 1rem;
  }

  html[data-theme="qrl-dawn"] .blogPageInner :is(.article-content, .blog-article) {
    padding-block-start: 0;
  }

  html[data-theme="qrl-dawn"] .blogPageInner .blog-article > h1 {
    font-size: clamp(32px, 8.5vw, 40px);
    line-height: 1.15;
    margin-bottom: 1.25rem;
  }

  html[data-theme="qrl-dawn"] .blogPageInner .blog-article > h1 + .date-box,
  html[data-theme="qrl-dawn"] .blogPageInner .blog-article > h1 + .date-box > span {
    font-size: 18px;
    line-height: 1.6;
  }

  html[data-theme="qrl-dawn"] #project-zond > .timeline {
    max-width: 100%;
    padding: 0 1.25rem 1.25rem;
  }

  html[data-theme="qrl-dawn"] #project-zond > .timeline > .heading {
    margin-inline: -1.25rem;
    padding: 1rem 1.25rem;
  }

  html[data-theme="qrl-dawn"] #project-zond > .timeline > .event::after {
    left: calc(-1.25rem - 7px);
  }

  html[data-theme="qrl-dawn"] body.coreTeam #markets .market-logo-plate {
    max-height: 6rem;
  }

  html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .heading::before {
    position: static;
    display: block;
    width: auto;
    min-width: 0;
    margin-bottom: .3rem;
    text-align: left;
  }

  html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .heading:not([data-date])::before,
  html[data-theme="qrl-dawn"] body.coreTeam #project-zond .timeline .heading[data-date=""]::before {
    display: none;
  }
}
