/* Ramps corporate site — shared styles */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.viz-tab {
  padding: 8px 18px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid rgba(23,26,23,0.2);
  background: transparent;
  color: #4A4F4A;
  transition: all 0.25s ease;
}
.viz-tab.active { background: #171A17; color: #F4F3EF; border-color: #171A17; }
.viz-caption { margin: 28px 0 0; font-size: 12.5px; color: #7A817A; line-height: 1.9; }
@media (max-width: 840px) {
  #challenge-viz > div:first-child { flex-wrap: wrap; }
  .kanko-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  img[src*="business-tomarin"], img[src*="business-kankodx"] {
    height: auto !important;
    object-fit: contain !important;
  }
  div:has(> img[src*="business-tomarin"]), div:has(> img[src*="business-kankodx"]) {
    height: auto !important;
  }
}
/* hover states (from style-hover) */
.hov1:hover { border-color: #5B7D57 !important;color: #5B7D57 !important; }
.hov2:hover { background: #6F936A !important;color: #F4F3EF !important; }
.hov3:hover { color: #6F936A !important;border-bottom-color: #6F936A !important; }
.hov4:hover { color: #5B7D57 !important; }
.hov5:hover { color: #6F936A !important; }
.hov6:hover { border-color: #5B7D57 !important; }

/* --- mobile refinements (round 2) --- */
@media (max-width: 840px) {
  /* circulation diagram: readable size, scrolls sideways */
  div[data-reveal]:has(> svg[viewBox="0 0 1160 560"]) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  svg[viewBox="0 0 1160 560"] { min-width: 860px; max-width: none; }

  /* inline text sizes the design's mobile layer doesn't cover */
  p[style*="font-size: 64px"], span[style*="font-size: 64px"] { font-size: 34px !important; }
  p[style*="font-size: 48px"], span[style*="font-size: 48px"] { font-size: 29px !important; }
  p[style*="font-size: 44px"], span[style*="font-size: 44px"] { font-size: 27px !important; }
  p[style*="font-size: 40px"], span[style*="font-size: 40px"] { font-size: 26px !important; }

  /* kanko-dx dashboard mocks: keep readable width, scroll inside panel */
  .kanko-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .kanko-panel > div { min-width: 900px !important; }
}

@media (max-width: 840px) {
  /* let grid items shrink below content min-width (prevents wide-column blowout) */
  [style*="grid-template-columns"] > * { min-width: 0 !important; }
  /* challenge viz divider indent (top page uses 64px) */
  [style*="border-left: 1px solid"][style*="padding-left: 64px"] {
    padding-left: 0 !important;
    border-left: none !important;
  }
}

@media (max-width: 840px) {
  p[style*="font-size: 38px"], span[style*="font-size: 38px"] { font-size: 24px !important; }
  p[style*="font-size: 36px"], span[style*="font-size: 36px"] { font-size: 24px !important; }
  p[style*="font-size: 34px"], span[style*="font-size: 34px"] { font-size: 22px !important; }
  p[style*="font-size: 32px"], span[style*="font-size: 32px"] { font-size: 22px !important; }
}
