/* ===== Resource article detail pages ===== */

.ra-page {
  background: var(--color-white);
}

/* Hero */
.ra-hero {
  padding: 48px 0 40px;
  background: linear-gradient(180deg, #eef7f8 0%, #f7fbfd 48%, #ffffff 100%);
}

.ra-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: var(--fs-sm);
  color: var(--color-teal);
  font-weight: var(--fw-medium);
}

.ra-breadcrumb a {
  color: var(--color-teal);
}

.ra-breadcrumb a:hover {
  color: var(--color-teal-dark);
}

.ra-breadcrumb .sep {
  color: rgba(67, 185, 172, 0.55);
}

.ra-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.ra-hero-copy h1 {
  font-size: 40px;
  line-height: 1.28;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 16em;
}

.ra-hero-copy>p {
  font-size: var(--fs-md);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 0;
}

.ra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 40px;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border-light);
}

.ra-callout {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 6px 20px rgba(12, 45, 73, 0.05);
}

.ra-callout .label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-teal);
  margin-bottom: 10px;
}

.ra-callout strong {
  display: block;
  font-size: var(--fs-lg);
  color: var(--color-navy);
  line-height: 1.45;
  margin-bottom: 8px;
}

.ra-callout p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Body layout */
.ra-body {
  padding: 24px 0 80px;
}

.ra-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.ra-main {
  max-width: 860px;
}

.ra-section {
  margin-bottom: 48px;
}

.ra-section:last-child {
  margin-bottom: 0;
}

.ra-kicker {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-teal);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.ra-section>h2 {
  font-size: 28px;
  line-height: 1.35;
  color: var(--color-navy);
  margin-bottom: 16px;
}

.ra-section>p {
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.ra-section>p:last-child {
  margin-bottom: 0;
}

/* Inline content figure */
.ra-figure {
  margin: 0 0 48px;
  padding: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(12, 45, 73, 0.05);
  overflow: hidden;
}

.ra-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Info / notice box */
.ra-info-box {
  margin-top: 20px;
  background: var(--color-teal-soft);
  border-left: 4px solid var(--color-teal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 20px;
  font-size: var(--fs-base);
  color: var(--color-navy);
  line-height: 1.7;
}

.ra-info-box strong {
  color: var(--color-navy);
}

/* Card grids */
.ra-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.ra-mini-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: none;
}

.ra-mini-card .idx {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-teal);
  margin-bottom: 10px;
}

.ra-mini-card .tag {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-teal);
  margin-bottom: 10px;
  background: none;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
}

.ra-mini-card h3 {
  font-size: var(--fs-md);
  color: var(--color-navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ra-mini-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Factor / compare rows */
.ra-factor-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.ra-factor-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.ra-factor-item h3 {
  font-size: var(--fs-md);
  color: var(--color-navy);
  margin-bottom: 6px;
}

.ra-factor-item p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* Numbered steps */
.ra-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.ra-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-bg);
  border-radius: 14px;
  padding: 16px 18px;
}

.ra-step .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-teal-soft);
  color: var(--color-teal);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ra-steps--zebra {
  gap: 8px;
}

.ra-steps--zebra .ra-step {
  background: transparent;
}

/*.ra-steps--zebra .ra-step:nth-child(odd) {
  background: var(--color-bg);
}*/
.ra-steps--zebra .green_bac {
  background: var(--color-bg);
}
.btn-pill {
  border-radius: 999px !important;
}

.ra-step p {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--color-text-secondary);
  line-height: 1.65;
  padding-top: 2px;
}

/* Tables */
.ra-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.ra-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.ra-table th,
.ra-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: var(--fs-sm);
  line-height: 1.55;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border-light);
}

.ra-table th {
  background: #e8eef3;
  color: var(--color-navy);
  font-weight: var(--fw-semibold);
}

.ra-table tbody tr:nth-child(even) {
  background: #f8fbfd;
}

.ra-table tbody tr:last-child td {
  border-bottom: none;
}

.ra-table td:first-child {
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  white-space: nowrap;
}

.ra-table td {
  color: var(--color-text-secondary);
}

/* Mobile table cards */
.ra-table-cards {
  display: none;
}

.ra-table-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 8px;
  margin-top: 12px;
}

.ra-table-card h3 {
  font-size: var(--fs-md);
  color: var(--color-navy);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

.ra-table-card .row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.ra-table-card .row .k {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
}

.ra-table-card .row .v {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* Sidebar */
.ra-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-h) + var(--topbar-h) + 20px);
}

.ra-side-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: none;
}

.ra-side-card h3 {
  font-size: var(--fs-lg);
  color: var(--color-navy);
  margin-bottom: 16px;
}

.ra-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ra-check-list li {
  position: relative;
  padding-left: 28px;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.55;
}

.ra-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-teal-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2343b9ac' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.ra-side-card>p {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.ra-side-card .btn {
  width: 100%;
  margin-bottom: 20px;
}

.ra-side-card .btn:last-child {
  margin-bottom: 0;
}

.ra-qr {
  text-align: center;
}

.ra-qr img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.ra-qr .qr-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  margin-bottom: 4px;
}

.ra-qr .qr-note {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Related */
.ra-related {
  padding: 64px 0 80px;
  background: var(--color-bg);
}

.ra-related h2 {
  font-size: var(--fs-2xl);
  color: var(--color-navy);
  margin-bottom: 28px;
}

.ra-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ra-related-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
}

.ra-related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.ra-related-card .idx {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-teal);
  margin-bottom: 10px;
}

.ra-related-card h3 {
  font-size: var(--fs-lg);
  color: var(--color-navy);
  margin-bottom: 10px;
}

.ra-related-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1;
}

/* Disclaimer under related or body */
.ra-disclaimer {
  margin-top: 28px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1100px) {

  .ra-hero-grid,
  .ra-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 32px;
  }

  .ra-hero-copy h1 {
    font-size: 34px;
  }
}

@media (max-width: 900px) {

  .ra-hero-grid,
  .ra-layout {
    grid-template-columns: 1fr;
  }

  .ra-sidebar {
    position: static;
  }

  .ra-main {
    max-width: none;
  }

  .ra-hero-copy h1 {
    max-width: none;
  }

  .ra-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ra-hero {
    padding: 28px 0 24px;
  }

  .ra-hero-copy h1 {
    font-size: 28px;
  }

  .ra-body {
    padding: 8px 0 48px;
  }

  .ra-section>h2 {
    font-size: 22px;
  }

  .ra-card-grid {
    grid-template-columns: 1fr;
  }

  .ra-table-wrap {
    display: none;
  }

  .ra-table-cards {
    display: block;
  }

  .ra-related {
    padding: 48px 0 56px;
  }

  .ra-callout {
    margin-top: 8px;
  }

  .ra-figure {
    margin-bottom: 36px;
    padding: 8px;
    border-radius: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ra-figure img {
    min-width: 720px;
    border-radius: 10px;
  }
}

/* ===== Resource article motion ===== */

.ra-breadcrumb,
.ra-hero-copy h1,
.ra-hero-copy>p,
.ra-meta,
.ra-callout {
  animation: hero-fade-up var(--dur-enter) var(--ease-out) both;
}

.ra-breadcrumb {
  animation-delay: 0.04s;
}

.ra-hero-copy h1 {
  animation-delay: 0.12s;
}

.ra-hero-copy>p {
  animation-delay: 0.22s;
}

.ra-meta {
  animation-delay: 0.3s;
}

.ra-callout {
  animation-delay: 0.28s;
}

.ra-mini-card,
.ra-side-card,
.ra-related-card,
.ra-table-card,
.ra-callout {
  transition: transform 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out), border-color 0.32s var(--ease-out);
}

.ra-mini-card:hover,
.ra-table-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(67, 185, 172, 0.35);
}

.ra-side-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.ra-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.ra-callout:hover {
  box-shadow: 0 8px 24px rgba(12, 45, 73, 0.08);
  transform: translateY(-2px);
}

.ra-step,
.ra-factor-item,
.ra-check-list li {
  transition: transform 0.28s var(--ease-out), background-color var(--transition);
}

.ra-step:hover {
  transform: translateX(4px);
  background: #e8f3f6;
}

.ra-factor-item:hover {
  transform: translateX(4px);
}

.ra-check-list li:hover {
  transform: translateX(3px);
  color: var(--color-navy);
}

.ra-side-card .btn {
  transition: background var(--transition), border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.ra-side-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(67, 185, 172, 0.28);
}

.ra-qr img {
  transition: transform 0.35s var(--ease-out);
}

.ra-side-card:hover .ra-qr img {
  transform: scale(1.03);
}

.ra-info-box {
  transition: box-shadow 0.32s var(--ease-out), border-color 0.32s var(--ease-out);
}

.ra-info-box:hover {
  box-shadow: 0 6px 18px rgba(67, 185, 172, 0.12);
}

.ra-section.reveal {
  transition-delay: 0s;
}

.ra-section.reveal:nth-child(2) {
  transition-delay: 0.06s;
}

.ra-section.reveal:nth-child(3) {
  transition-delay: 0.12s;
}

.ra-sidebar.reveal {
  transition-delay: 0.08s;
}

.ra-related.reveal {
  transition-delay: 0.04s;
}

.ra-related-card .idx {
  transition: transform 0.28s var(--ease-out), color var(--transition);
}

.ra-related-card:hover .idx {
  transform: translateX(2px);
}

@media (max-width: 900px) {
  .ra-callout {
    animation-name: hero-fade-in;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ra-breadcrumb,
  .ra-hero-copy h1,
  .ra-hero-copy>p,
  .ra-meta,
  .ra-callout {
    animation: none;
  }

  .ra-mini-card:hover,
  .ra-table-card:hover,
  .ra-side-card:hover,
  .ra-related-card:hover,
  .ra-callout:hover,
  .ra-step:hover,
  .ra-factor-item:hover,
  .ra-check-list li:hover,
  .ra-side-card .btn:hover,
  .ra-side-card:hover .ra-qr img {
    transform: none;
  }
}