/*
 * GR Reserve /learn post enhancements
 * SER-668 collector-guide rollout
 *
 * Broad rules are scoped to the existing single-post template.
 * Layout components are opt-in via gr-* classes so existing posts keep their
 * current structure unless content intentionally adopts the component.
 */

.single-post-article {
  --gr-blog-gold: #bd994c;
  --gr-blog-gold-soft: #efe3c5;
  --gr-blog-ink: #171717;
  --gr-blog-muted: #616161;
  --gr-blog-line: #e6e1d7;
  --gr-blog-panel: #fbfaf7;
  --gr-blog-panel-strong: #f5f1e8;
}

.innrBnner .single-post-meta {
  column-gap: 1rem;
  row-gap: .45rem;
}

.innrBnner .single-post-meta .post-categories a + a::before {
  content: ", ";
  color: rgba(255, 255, 255, .7);
}

.single-post-body,
.single-post-article {
  color: var(--gr-blog-ink);
}

.single-post-body code,
.single-post-article code {
  color: inherit;
  background: rgba(189, 153, 76, .11);
  border: 1px solid rgba(189, 153, 76, .22);
  border-radius: 4px;
  font-family: inherit;
  font-size: .95em;
  padding: .05em .28em;
}

.single-post-body figure,
.single-post-article figure {
  margin: 2rem 0;
}

.single-post-body figure img,
.single-post-article figure img {
  margin-bottom: .6rem;
}

.single-post-body figcaption,
.single-post-body .wp-caption-text,
.single-post-article figcaption,
.single-post-article .wp-caption-text {
  color: var(--gr-blog-muted);
  font-size: .92rem;
  line-height: 1.45;
  text-align: center;
}

.single-post-body table,
.single-post-article table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.single-post-body th,
.single-post-article th {
  color: var(--gr-blog-ink);
}

.single-post-body h2,
.single-post-article h2 {
  color: var(--gr-blog-ink);
}

.single-post-body h3,
.single-post-article h3 {
  color: var(--gr-blog-ink);
}

.single-post-body h4,
.single-post-article h4 {
  font-size: 1.16rem;
  font-weight: 700;
  margin: 1.75rem 0 .7rem;
  color: var(--gr-blog-ink);
}

.gr-guide-summary,
.gr-guide-note,
.gr-source-note,
.gr-next-steps {
  background: var(--gr-blog-panel);
  border: 1px solid var(--gr-blog-line);
  border-left: 4px solid var(--gr-blog-gold);
  border-radius: 8px;
  margin: 1.6rem 0 2rem;
  padding: 1.2rem 1.35rem;
}

.gr-guide-summary h2,
.gr-guide-summary h3,
.gr-guide-note h2,
.gr-guide-note h3,
.gr-next-steps h2,
.gr-next-steps h3 {
  border-bottom: 0;
  font-size: 1.25rem;
  margin: 0 0 .7rem !important;
  padding: 0;
}

.single-post-body .gr-guide-summary ul,
.single-post-body .gr-guide-note ul,
.single-post-body .gr-next-steps ul,
.single-post-article .gr-guide-summary ul,
.single-post-article .gr-guide-note ul,
.single-post-article .gr-next-steps ul {
  margin: .65rem 0 0 !important;
  padding-left: 1.2rem !important;
}

.single-post-body .gr-guide-summary li,
.single-post-body .gr-guide-note li,
.single-post-body .gr-next-steps li,
.single-post-article .gr-guide-summary li,
.single-post-article .gr-guide-note li,
.single-post-article .gr-next-steps li {
  margin-bottom: .35rem;
}

.gr-article-jump-list {
  border-top: 1px solid var(--gr-blog-line);
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .7rem;
  margin-top: 1rem;
  padding-top: 1rem;
}

.gr-article-jump-list a {
  background: #fff;
  border: 1px solid var(--gr-blog-line);
  border-radius: 999px;
  color: var(--gr-blog-ink);
  display: inline-flex;
  font-size: .92rem;
  line-height: 1.25;
  padding: .38rem .72rem;
  text-decoration: none;
}

.gr-article-jump-list a:hover {
  border-color: var(--gr-blog-gold);
  color: var(--gr-blog-ink);
}

.gr-product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.5rem 0 2.25rem;
}

.gr-product-card {
  background: #fff;
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  display: grid;
  gap: .85rem;
  grid-template-columns: 140px minmax(0, 1fr);
  padding: .9rem;
}

.gr-product-card figure {
  margin: 0;
}

.gr-product-card img,
.single-post-body .gr-product-card img,
.single-post-article .gr-product-card img {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  box-shadow: none;
  height: auto;
  margin: 0;
  object-fit: contain;
  width: 100% !important;
}

.gr-product-card h3,
.gr-product-card h4 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0 0 .35rem !important;
}

.gr-product-card p {
  color: var(--gr-blog-muted);
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: .45rem !important;
}

.gr-product-card .gr-product-spec {
  color: var(--gr-blog-ink);
  font-weight: 600;
}

.gr-watchlist {
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  margin: 1.5rem 0 2.25rem;
  overflow: hidden;
}

.gr-watchlist-row {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--gr-blog-line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 96px 1.1fr .9fr;
  padding: .95rem;
}

.gr-watchlist-row:first-child {
  border-top: 0;
}

.gr-watchlist-row img,
.single-post-body .gr-watchlist-row img,
.single-post-article .gr-watchlist-row img {
  aspect-ratio: 1 / 1;
  box-shadow: none;
  height: auto;
  margin: 0;
  object-fit: contain;
  width: 96px !important;
}

.gr-watchlist-row h3,
.gr-watchlist-row h4 {
  font-size: 1rem;
  margin: 0 0 .25rem !important;
}

.gr-watchlist-row p {
  color: var(--gr-blog-muted);
  font-size: .94rem;
  line-height: 1.42;
  margin-bottom: 0 !important;
}

.gr-tier-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.4rem 0 2.3rem;
}

.gr-tier-card {
  background: var(--gr-blog-panel);
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  padding: 1rem;
}

.gr-tier-card h3,
.gr-tier-card h4 {
  font-size: 1.05rem;
  margin: 0 0 .55rem !important;
}

.single-post-body .gr-tier-card ul,
.single-post-article .gr-tier-card ul {
  margin: .5rem 0 .7rem !important;
  padding-left: 1.15rem !important;
}

.gr-source-note {
  border-left-width: 3px;
  color: var(--gr-blog-muted);
  font-size: .94rem;
  margin-top: 1rem;
  padding: .9rem 1rem;
}

.gr-next-links {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .8rem;
}

.gr-next-links a {
  background: #fff;
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  color: var(--gr-blog-ink);
  display: block;
  line-height: 1.35;
  padding: .8rem .9rem;
}

.gr-next-links a:hover {
  border-color: var(--gr-blog-gold);
}

@media (max-width: 992px) {
  .gr-product-grid,
  .gr-tier-grid {
    grid-template-columns: 1fr;
  }

  .gr-watchlist-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .gr-watchlist-row .gr-watchlist-note {
    grid-column: 2;
  }
}

@media (max-width: 768px) {
  .single-post-body table,
  .single-post-article table {
    font-size: .92rem;
    width: 100% !important;
  }

  .single-post-body th,
  .single-post-body td,
  .single-post-article th,
  .single-post-article td {
    min-width: 8rem;
    padding: .65rem;
  }

  .gr-guide-summary,
  .gr-guide-note,
  .gr-source-note,
  .gr-next-steps {
    padding: 1rem;
  }

  .gr-product-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .gr-product-card h3,
  .gr-product-card h4,
  .gr-watchlist-row h3,
  .gr-watchlist-row h4 {
    font-size: .98rem;
  }

  .gr-product-card p,
  .gr-watchlist-row p {
    font-size: .9rem;
  }

  .gr-next-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .gr-product-card {
    grid-template-columns: 1fr;
  }

  .gr-product-card img,
  .single-post-body .gr-product-card img,
  .single-post-article .gr-product-card img {
    justify-self: center;
    max-width: 170px;
  }

  .gr-watchlist-row {
    align-items: start;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: .8rem;
  }

  .gr-watchlist-row img,
  .single-post-body .gr-watchlist-row img,
  .single-post-article .gr-watchlist-row img {
    width: 72px !important;
  }
}

/*
 * Enhanced collector-guide presentation.
 * Scoped to guide posts so legacy /learn articles keep their prior shape.
 */

.gr-enhanced-post-hero {
  background-position: center;
  background-size: cover;
  border-bottom: 3px solid #bd994c;
  min-height: 520px;
  padding: 0;
}

.gr-enhanced-post-hero .container {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding-bottom: 3rem;
  padding-top: 3rem;
}

.gr-enhanced-post-hero h1 {
  font-size: clamp(2.35rem, 5vw, 4.7rem) !important;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.16 !important;
  margin: 0 auto;
  max-width: 1040px;
  text-transform: none !important;
}

.gr-enhanced-post-hero h1 b {
  font-weight: 400;
  text-transform: none !important;
}

.gr-enhanced-post-hero .single-post-meta {
  color: #fff;
  font-size: 1.05rem;
  gap: .8rem 1.35rem;
  margin-top: 1.7rem;
}

.gr-enhanced-post-hero .single-post-meta span {
  color: #fff;
}

.gr-enhanced-post-hero .single-post-meta span + span::before {
  background: #bd994c;
  content: "";
  display: inline-block;
  height: 1.35rem;
  margin-right: 1.25rem;
  width: 1px;
}

.gr-enhanced-post-hero .single-post-meta .post-categories a + a::before,
.innrBnner .single-post-meta .post-categories a + a::before {
  content: none;
}

.gr-enhanced-post-hero .category-separator {
  color: #fff;
}

.gr-enhanced-post-hero .iconBox {
  display: none;
}

.gr-enhanced-collector-guide {
  border-radius: 0;
  box-shadow: none;
  max-width: 1040px;
}

.gr-enhanced-collector-guide .single-post-body {
  font-size: 1.08rem;
  line-height: 1.75;
  padding: 0 2.25rem;
}

.gr-enhanced-collector-guide .single-post-body > figure {
  margin: 2rem auto 2.4rem;
  max-width: 860px;
}

.gr-enhanced-collector-guide .single-post-body > figure img {
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  margin: 0 auto .7rem;
  width: 100% !important;
}

.gr-enhanced-collector-guide table.gr-responsive-table {
  border-collapse: collapse;
  display: table;
  overflow: visible;
  table-layout: fixed;
  width: 100% !important;
}

.gr-enhanced-collector-guide table.gr-responsive-table th,
.gr-enhanced-collector-guide table.gr-responsive-table td {
  min-width: 0;
}

.gr-enhanced-collector-guide .gr-product-grid {
  gap: 2.1rem 2.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 2rem auto 2.75rem;
  max-width: 900px;
}

.gr-enhanced-collector-guide .gr-product-card {
  background: #fff;
  border: 0;
  border-radius: 0;
  display: block;
  padding: 0;
  text-align: center;
}

.gr-enhanced-collector-guide .gr-product-card > p:empty,
.gr-enhanced-collector-guide .gr-watchlist-row > p:empty {
  display: none;
}

.gr-enhanced-collector-guide .gr-product-card img,
.single-post-body .gr-enhanced-collector-guide .gr-product-card img,
.gr-enhanced-collector-guide .single-post-body .gr-product-card img {
  aspect-ratio: auto;
  background: transparent;
  border-radius: 4px;
  box-shadow: none;
  display: block;
  margin: 0 auto .95rem;
  max-height: 390px;
  object-fit: contain;
  width: min(100%, 360px) !important;
}

.gr-enhanced-collector-guide .gr-product-card h3,
.gr-enhanced-collector-guide .gr-product-card h4 {
  font-size: 1.14rem;
  line-height: 1.24;
  margin: 0 auto .35rem !important;
  max-width: 22rem;
}

.gr-enhanced-collector-guide .gr-product-card p {
  color: #222;
  font-size: .98rem;
  line-height: 1.48;
  margin: 0 auto .55rem !important;
  max-width: 24rem;
}

.gr-enhanced-collector-guide .gr-product-card a,
.gr-enhanced-collector-guide .gr-watchlist a,
.gr-enhanced-collector-guide .gr-tier-card a {
  color: #a87405;
  font-weight: 700;
}

.gr-enhanced-collector-guide .gr-product-card a::after {
  content: " ->";
  font-weight: 400;
}

.gr-enhanced-collector-guide .gr-watchlist {
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .04);
  margin: 2rem auto 2.75rem;
  max-width: 920px;
}

.gr-enhanced-collector-guide .gr-watchlist-row {
  gap: 1.2rem;
  grid-template-columns: 118px minmax(0, 1fr);
  padding: 1.1rem 1.25rem;
}

.gr-enhanced-collector-guide .gr-watchlist-row img,
.gr-enhanced-collector-guide .single-post-body .gr-watchlist-row img {
  width: 118px !important;
}

.gr-enhanced-collector-guide .gr-watchlist-row h3,
.gr-enhanced-collector-guide .gr-watchlist-row h4 {
  font-size: 1.08rem;
}

.gr-enhanced-collector-guide .gr-tier-grid {
  border: 1px solid var(--gr-blog-line);
  border-radius: 8px;
  counter-reset: gr-tier;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2rem 0 2.7rem;
  overflow: hidden;
}

.gr-enhanced-collector-guide .gr-tier-card {
  background: #fff;
  border: 0;
  border-left: 1px solid var(--gr-blog-line);
  border-radius: 0;
  counter-increment: gr-tier;
  padding: 1.35rem 1.25rem 1.45rem;
}

.gr-enhanced-collector-guide .gr-tier-card:first-child {
  border-left: 0;
}

.gr-enhanced-collector-guide .gr-tier-card::before {
  align-items: center;
  background: #f5eddb;
  border-radius: 999px;
  color: #a87405;
  content: counter(gr-tier);
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  height: 3.2rem;
  justify-content: center;
  margin-bottom: .95rem;
  width: 3.2rem;
}

.gr-enhanced-collector-guide .gr-tier-card h3,
.gr-enhanced-collector-guide .gr-tier-card h4 {
  font-size: 1.18rem;
  line-height: 1.25;
  margin-bottom: .85rem !important;
}

.gr-enhanced-collector-guide .gr-tier-card p {
  color: #222;
  font-size: .98rem;
  line-height: 1.52;
}

@media (max-width: 992px) {
  .gr-enhanced-post-hero,
  .gr-enhanced-post-hero .container {
    min-height: 430px;
  }

  .gr-enhanced-collector-guide .gr-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gr-enhanced-collector-guide .gr-tier-card:nth-child(odd) {
    border-left: 0;
  }

  .gr-enhanced-collector-guide .gr-tier-card:nth-child(n+3) {
    border-top: 1px solid var(--gr-blog-line);
  }
}

@media (max-width: 768px) {
  .gr-enhanced-post-hero,
  .gr-enhanced-post-hero .container {
    min-height: 360px;
  }

  .gr-enhanced-post-hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .gr-enhanced-post-hero .single-post-meta {
    font-size: .94rem;
  }

  .gr-enhanced-post-hero .single-post-meta span + span::before {
    display: none;
  }

  .gr-enhanced-collector-guide .single-post-body {
    padding: 0 1.15rem;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table,
  .gr-enhanced-collector-guide table.gr-responsive-table thead,
  .gr-enhanced-collector-guide table.gr-responsive-table tbody,
  .gr-enhanced-collector-guide table.gr-responsive-table tr,
  .gr-enhanced-collector-guide table.gr-responsive-table th,
  .gr-enhanced-collector-guide table.gr-responsive-table td {
    display: block;
    width: 100% !important;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table {
    border: 0;
    margin: 1.4rem 0 2.2rem !important;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table thead {
    display: none;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table tr {
    background: #fff;
    border: 1px solid var(--gr-blog-line);
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
    margin: 0 0 .9rem;
    overflow: hidden;
    padding: .85rem 1rem;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table td {
    border: 0;
    border-top: 1px solid var(--gr-blog-line);
    display: grid;
    gap: .8rem;
    grid-template-columns: minmax(5.8rem, .42fr) minmax(0, 1fr);
    line-height: 1.45;
    min-width: 0;
    padding: .72rem 0;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table td:first-child {
    border-top: 0;
  }

  .gr-enhanced-collector-guide table.gr-responsive-table td::before {
    color: #111;
    content: attr(data-label);
    font-weight: 800;
  }

  .gr-enhanced-collector-guide .gr-product-grid {
    gap: 1.1rem;
  }

  .gr-enhanced-collector-guide .gr-product-card {
    border: 1px solid var(--gr-blog-line);
    border-radius: 8px;
    padding: .85rem;
    text-align: left;
  }

  .gr-enhanced-collector-guide .gr-product-card img,
  .gr-enhanced-collector-guide .single-post-body .gr-product-card img {
    max-height: 260px;
    width: 100% !important;
  }

  .gr-enhanced-collector-guide .gr-product-card h3,
  .gr-enhanced-collector-guide .gr-product-card h4,
  .gr-enhanced-collector-guide .gr-product-card p {
    max-width: none;
  }

  .gr-enhanced-collector-guide .gr-watchlist-row {
    grid-template-columns: 88px minmax(0, 1fr);
    padding: .9rem;
  }

  .gr-enhanced-collector-guide .gr-watchlist-row img,
  .gr-enhanced-collector-guide .single-post-body .gr-watchlist-row img {
    width: 88px !important;
  }
}

@media (max-width: 520px) {
  .gr-enhanced-collector-guide .gr-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gr-enhanced-collector-guide .gr-product-card {
    padding: .7rem;
  }

  .gr-enhanced-collector-guide .gr-product-card h3,
  .gr-enhanced-collector-guide .gr-product-card h4 {
    font-size: .95rem;
  }

  .gr-enhanced-collector-guide .gr-product-card p {
    font-size: .86rem;
  }

  .gr-enhanced-collector-guide .gr-tier-grid {
    border: 0;
    display: block;
  }

  .gr-enhanced-collector-guide .gr-tier-card,
  .gr-enhanced-collector-guide .gr-tier-card:first-child,
  .gr-enhanced-collector-guide .gr-tier-card:nth-child(odd),
  .gr-enhanced-collector-guide .gr-tier-card:nth-child(n+3) {
    border: 1px solid var(--gr-blog-line);
    border-radius: 8px;
    margin-bottom: .9rem;
  }
}
